@jeffusion/bungee-core 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/worker.js +22 -17
  2. package/package.json +2 -2
package/dist/worker.js CHANGED
@@ -21235,13 +21235,11 @@ var init_assets = __esm(() => {
21235
21235
  <meta charset="UTF-8" />
21236
21236
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
21237
21237
  <title>Bungee Dashboard</title>
21238
- <script type="module" crossorigin src="/__ui/assets/index-CoOjxcQP.js"></script>
21239
- <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-7HrnnMjF.js">
21240
- <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-charts-o8j72P7f.js">
21238
+ <script type="module" crossorigin src="/__ui/assets/index-BFVayO0q.js"></script>
21239
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-charts-Bo4qyjB7.js">
21240
+ <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-C5kRSwys.js">
21241
21241
  <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-lodash-CRdCilnf.js">
21242
- <link rel="modulepreload" crossorigin href="/__ui/assets/vendor-svelte-CMCOGsuu.js">
21243
- <link rel="stylesheet" crossorigin href="/__ui/assets/vendor-svelte-DJA7stl0.css">
21244
- <link rel="stylesheet" crossorigin href="/__ui/assets/index-m5oE-oos.css">
21242
+ <link rel="stylesheet" crossorigin href="/__ui/assets/index-D-TPeiTP.css">
21245
21243
  </head>
21246
21244
  <body>
21247
21245
  <div id="app"></div>
@@ -21249,28 +21247,35 @@ var init_assets = __esm(() => {
21249
21247
  </html>
21250
21248
  `,
21251
21249
  assets: {
21252
- "vendor-svelte-CMCOGsuu.js": 'import{d as n2,I as E0,v as gr}from"./vendor-7HrnnMjF.js";import{L as r2,C as of,a as T0,b as M0,P as a2,c as i2,p as u2,d as nf,e as rf,D as f2,A as c2,B as d2,f as p2}from"./vendor-charts-o8j72P7f.js";import{s as h2}from"./vendor-lodash-CRdCilnf.js";function tt(){}function Jb(t,l){for(const e in l)t[e]=l[e];return t}function S0(t){return t()}function I1(){return Object.create(null)}function bt(t){t.forEach(S0)}function ko(t){return typeof t=="function"}function At(t,l){return t!=t?l==l:t!==l||t&&typeof t=="object"||typeof t=="function"}function m2(t){return Object.keys(t).length===0}function af(t,...l){if(t==null){for(const n of l)n(void 0);return tt}const e=t.subscribe(...l);return e.unsubscribe?()=>e.unsubscribe():e}function Cs(t){let l;return af(t,e=>l=e)(),l}function Dt(t,l,e){t.$$.on_destroy.push(af(l,e))}function Wb(t){const l={};for(const e in t)e[0]!=="$"&&(l[e]=t[e]);return l}function s(t,l){t.appendChild(l)}function j(t,l,e){t.insertBefore(l,e||null)}function P(t){t.parentNode&&t.parentNode.removeChild(t)}function Gt(t,l){for(let e=0;e<t.length;e+=1)t[e]&&t[e].d(l)}function a(t){return document.createElement(t)}function ae(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function _(t){return document.createTextNode(t)}function h(){return _(" ")}function Ul(){return _("")}function V(t,l,e,n){return t.addEventListener(l,e,n),()=>t.removeEventListener(l,e,n)}function o(t,l,e){e==null?t.removeAttribute(l):t.getAttribute(l)!==e&&t.setAttribute(l,e)}const g2=["width","height"];function Gb(t,l){const e=Object.getOwnPropertyDescriptors(t.__proto__);for(const n in l)l[n]==null?t.removeAttribute(n):n==="style"?t.style.cssText=l[n]:n==="__value"?t.value=t[n]=l[n]:e[n]&&e[n].set&&g2.indexOf(n)===-1?t[n]=l[n]:o(t,n,l[n])}function uf(t){let l;return{p(...e){l=e,l.forEach(n=>t.push(n))},r(){l.forEach(e=>t.splice(t.indexOf(e),1))}}}function St(t){return t===""?null:+t}function _2(t){return Array.from(t.childNodes)}function k(t,l){l=""+l,t.data!==l&&(t.data=l)}function Q(t,l){t.value=l??""}function B1(t,l,e,n){e==null?t.style.removeProperty(l):t.style.setProperty(l,e,"")}function kt(t,l,e){for(let n=0;n<t.options.length;n+=1){const r=t.options[n];if(r.__value===l){r.selected=!0;return}}(!e||l!==void 0)&&(t.selectedIndex=-1)}function pl(t){const l=t.querySelector(":checked");return l&&l.__value}function le(t,l,e){t.classList.toggle(l,!!e)}function b2(t,l,{bubbles:e=!1,cancelable:n=!1}={}){return new CustomEvent(t,{detail:l,bubbles:e,cancelable:n})}let wr;function _r(t){wr=t}function Si(){if(!wr)throw new Error("Function called outside component initialization");return wr}function Hs(t){Si().$$.on_mount.push(t)}function Kb(t){Si().$$.after_update.push(t)}function ir(t){Si().$$.on_destroy.push(t)}function Cr(){const t=Si();return(l,e,{cancelable:n=!1}={})=>{const r=t.$$.callbacks[l];if(r){const i=b2(l,e,{cancelable:n});return r.slice().forEach(u=>{u.call(t,i)}),!i.defaultPrevented}return!0}}function Qb(t,l){const e=t.$$.callbacks[l.type];e&&e.slice().forEach(n=>n.call(this,l))}const sr=[],bl=[];let nr=[];const tf=[],R0=Promise.resolve();let lf=!1;function q0(){lf||(lf=!0,R0.then(P0))}function H0(){return q0(),R0}function tl(t){nr.push(t)}function Sl(t){tf.push(t)}const Xu=new Set;let tr=0;function P0(){if(tr!==0)return;const t=wr;do{try{for(;tr<sr.length;){const l=sr[tr];tr++,_r(l),v2(l.$$)}}catch(l){throw sr.length=0,tr=0,l}for(_r(null),sr.length=0,tr=0;bl.length;)bl.pop()();for(let l=0;l<nr.length;l+=1){const e=nr[l];Xu.has(e)||(Xu.add(e),e())}nr.length=0}while(sr.length);for(;tf.length;)tf.pop()();lf=!1,Xu.clear(),_r(t)}function v2(t){if(t.fragment!==null){t.update(),bt(t.before_update);const l=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,l),t.after_update.forEach(tl)}}function k2(t){const l=[],e=[];nr.forEach(n=>t.indexOf(n)===-1?l.push(n):e.push(n)),e.forEach(n=>n()),nr=l}const vi=new Set;let So;function Gl(){So={r:0,c:[],p:So}}function Kl(){So.r||bt(So.c),So=So.p}function et(t,l){t&&t.i&&(vi.delete(t),t.i(l))}function st(t,l,e,n){if(t&&t.o){if(vi.has(t))return;vi.add(t),So.c.push(()=>{vi.delete(t),n&&(e&&t.d(1),n())}),t.o(l)}else n&&n()}function ut(t){return t?.length!==void 0?t:Array.from(t)}function j0(t,l){t.d(1),l.delete(t.key)}function w2(t,l){st(t,1,1,()=>{l.delete(t.key)})}function ff(t,l,e,n,r,i,u,c,f,d,p,m){let g=t.length,b=i.length,v=g;const w={};for(;v--;)w[t[v].key]=v;const C=[],E=new Map,y=new Map,T=[];for(v=b;v--;){const H=m(r,i,v),I=e(H);let R=u.get(I);R?T.push(()=>R.p(H,l)):(R=d(I,H),R.c()),E.set(I,C[v]=R),I in w&&y.set(I,Math.abs(v-w[I]))}const S=new Set,q=new Set;function D(H){et(H,1),H.m(c,p),u.set(H.key,H),p=H.first,b--}for(;g&&b;){const H=C[b-1],I=t[g-1],R=H.key,L=I.key;H===I?(p=H.first,g--,b--):E.has(L)?!u.has(R)||S.has(R)?D(H):q.has(L)?g--:y.get(R)>y.get(L)?(q.add(R),D(H)):(S.add(L),g--):(f(I,u),g--)}for(;g--;){const H=t[g];E.has(H.key)||f(H,u)}for(;b;)D(C[b-1]);return bt(T),C}function Yb(t,l){const e={},n={},r={$$scope:1};let i=t.length;for(;i--;){const u=t[i],c=l[i];if(c){for(const f in u)f in c||(n[f]=1);for(const f in c)r[f]||(e[f]=c[f],r[f]=1);t[i]=c}else for(const f in u)r[f]=1}for(const u in n)u in e||(e[u]=void 0);return e}function Zb(t){return typeof t=="object"&&t!==null?t:{}}function Rl(t,l,e){const n=t.$$.props[l];n!==void 0&&(t.$$.bound[n]=e,e(t.$$.ctx[n]))}function Et(t){t&&t.c()}function yt(t,l,e){const{fragment:n,after_update:r}=t.$$;n&&n.m(l,e),tl(()=>{const i=t.$$.on_mount.map(S0).filter(ko);t.$$.on_destroy?t.$$.on_destroy.push(...i):bt(i),t.$$.on_mount=[]}),r.forEach(tl)}function Ct(t,l){const e=t.$$;e.fragment!==null&&(k2(e.after_update),bt(e.on_destroy),e.fragment&&e.fragment.d(l),e.on_destroy=e.fragment=null,e.ctx=[])}function y2(t,l){t.$$.dirty[0]===-1&&(sr.push(t),q0(),t.$$.dirty.fill(0)),t.$$.dirty[l/31|0]|=1<<l%31}function Ut(t,l,e,n,r,i,u=null,c=[-1]){const f=wr;_r(t);const d=t.$$={fragment:null,ctx:[],props:i,update:tt,not_equal:r,bound:I1(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(f?f.$$.context:[])),callbacks:I1(),dirty:c,skip_bound:!1,root:l.target||f.$$.root};u&&u(d.root);let p=!1;if(d.ctx=e?e(t,l.props||{},(m,g,...b)=>{const v=b.length?b[0]:g;return d.ctx&&r(d.ctx[m],d.ctx[m]=v)&&(!d.skip_bound&&d.bound[m]&&d.bound[m](v),p&&y2(t,m)),g}):[],d.update(),p=!0,bt(d.before_update),d.fragment=n?n(d.ctx):!1,l.target){if(l.hydrate){const m=_2(l.target);d.fragment&&d.fragment.l(m),m.forEach(P)}else d.fragment&&d.fragment.c();l.intro&&et(t.$$.fragment),yt(t,l.target,l.anchor),P0()}_r(f)}class Vt{$$=void 0;$$set=void 0;$destroy(){Ct(this,1),this.$destroy=tt}$on(l,e){if(!ko(e))return tt;const n=this.$$.callbacks[l]||(this.$$.callbacks[l]=[]);return n.push(e),()=>{const r=n.indexOf(e);r!==-1&&n.splice(r,1)}}$set(l){this.$$set&&!m2(l)&&(this.$$.skip_bound=!0,this.$$set(l),this.$$.skip_bound=!1)}}const C2="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(C2);const lr=[];function L0(t,l){return{subscribe:lo(t,l).subscribe}}function lo(t,l=tt){let e;const n=new Set;function r(c){if(At(t,c)&&(t=c,e)){const f=!lr.length;for(const d of n)d[1](),lr.push(d,t);if(f){for(let d=0;d<lr.length;d+=2)lr[d][0](lr[d+1]);lr.length=0}}}function i(c){r(c(t))}function u(c,f=tt){const d=[c,f];return n.add(d),n.size===1&&(e=l(r,i)||tt),c(t),()=>{n.delete(d),n.size===0&&e&&(e(),e=null)}}return{set:r,update:i,subscribe:u}}function so(t,l,e){const n=!Array.isArray(t),r=n?[t]:t;if(!r.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=l.length<2;return L0(e,(u,c)=>{let f=!1;const d=[];let p=0,m=tt;const g=()=>{if(p)return;m();const v=l(n?d[0]:d,u,c);i?u(v):m=ko(v)?v:tt},b=r.map((v,w)=>af(v,C=>{d[w]=C,p&=~(1<<w),f&&g()},()=>{p|=1<<w}));return f=!0,g(),function(){bt(b),m(),f=!1}})}function A1(){const t=window.location.href.indexOf("#/");let l=t>-1?window.location.href.substr(t+1):"/";const e=l.indexOf("?");let n="";return e>-1&&(n=l.substr(e+1),l=l.substr(0,e)),{location:l,querystring:n}}const D0=L0(null,function(l){l(A1());const e=()=>{l(A1())};return window.addEventListener("hashchange",e,!1),function(){window.removeEventListener("hashchange",e,!1)}}),E2=so(D0,t=>t.location);so(D0,t=>t.querystring);async function I0(t){if(!t||t.length<1||t.charAt(0)!="/"&&t.indexOf("#/")!==0)throw Error("Invalid parameter location");await H0(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(t.charAt(0)=="#"?"":"#")+t}async function hi(){await H0(),window.history.back()}function T2(t,l){if(l==null)return;if(l in t)return t[l];const e=l.split(".");let n=t;for(let r=0;r<e.length;r++)if(typeof n=="object"){if(r>0){const i=e.slice(r,e.length).join(".");if(i in n){n=n[i];break}}n=n[e[r]]}else n=void 0;return n}const bo={},M2=(t,l,e)=>e&&(l in bo||(bo[l]={}),t in bo[l]||(bo[l][t]=e),e),B0=(t,l)=>{if(l==null)return;if(l in bo&&t in bo[l])return bo[l][t];const e=Er(l);for(let n=0;n<e.length;n++){const r=e[n],i=R2(r,t);if(i)return M2(t,l,i)}};let cf;const ur=lo({});function S2(t){return cf[t]||null}function df(t){return t in cf}function R2(t,l){if(!df(t))return null;const e=S2(t);return T2(e,l)}function q2(t){if(t==null)return;const l=Er(t);for(let e=0;e<l.length;e++){const n=l[e];if(df(n))return n}}function H2(t,...l){delete bo[t],ur.update(e=>(e[t]=n2.all([e[t]||{},...l]),e))}so([ur],([t])=>Object.keys(t));ur.subscribe(t=>cf=t);const br={};function P2(t){br[t]=new Set}function j2(t,l){br[t].delete(l),br[t].size===0&&delete br[t]}function vr(t){return br[t]}function L2(t){return Er(t).map(l=>{const e=vr(l);return[l,e?[...e]:[]]}).filter(([,l])=>l.length>0)}function yi(t){return t==null?!1:Er(t).some(l=>{var e;return(e=vr(l))==null?void 0:e.size})}function D2(t,l){return Promise.all(l.map(n=>(j2(t,n),n().then(r=>r.default||r)))).then(n=>H2(t,...n))}const pr={};function A0(t){if(!yi(t))return t in pr?pr[t]:Promise.resolve();const l=L2(t);return pr[t]=Promise.all(l.map(([e,n])=>D2(e,n))).then(()=>{if(yi(t))return A0(t);delete pr[t]}),pr[t]}function O0(t,l){vr(t)||P2(t);const e=vr(t);vr(t).has(l)||(df(t)||ur.update(n=>(n[t]={},n)),e.add(l))}var O1=Object.getOwnPropertySymbols,I2=Object.prototype.hasOwnProperty,B2=Object.prototype.propertyIsEnumerable,A2=(t,l)=>{var e={};for(var n in t)I2.call(t,n)&&l.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&O1)for(var n of O1(t))l.indexOf(n)<0&&B2.call(t,n)&&(e[n]=t[n]);return e};const O2={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function F2({locale:t,id:l}){console.warn(`[svelte-i18n] The message "${l}" was not found in "${Er(t).join(\'", "\')}".${yi(wo())?`\n\nNote: there are at least one loader still registered to this locale that wasn\'t executed.`:""}`)}const z2={fallbackLocale:null,loadingDelay:200,formats:O2,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},hr=z2;function rr(){return hr}function N2(t){const l=t,{formats:e}=l,n=A2(l,["formats"]);let r=t.fallbackLocale;if(t.initialLocale)try{E0.resolveLocale(t.initialLocale)&&(r=t.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${t.initialLocale}" is not a valid locale.`)}return n.warnOnMissingMessages&&(delete n.warnOnMissingMessages,n.handleMissingMessage==null?n.handleMissingMessage=F2:console.warn(\'[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.\')),Object.assign(hr,n,{initialLocale:r}),e&&("number"in e&&Object.assign(hr.formats.number,e.number),"date"in e&&Object.assign(hr.formats.date,e.date),"time"in e&&Object.assign(hr.formats.time,e.time)),yo.set(r)}const ki=lo(!1);var U2=Object.defineProperty,V2=Object.defineProperties,J2=Object.getOwnPropertyDescriptors,F1=Object.getOwnPropertySymbols,W2=Object.prototype.hasOwnProperty,G2=Object.prototype.propertyIsEnumerable,z1=(t,l,e)=>l in t?U2(t,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[l]=e,K2=(t,l)=>{for(var e in l||(l={}))W2.call(l,e)&&z1(t,e,l[e]);if(F1)for(var e of F1(l))G2.call(l,e)&&z1(t,e,l[e]);return t},Q2=(t,l)=>V2(t,J2(l));let sf;const Ci=lo(null);function N1(t){return t.split("-").map((l,e,n)=>n.slice(0,e+1).join("-")).reverse()}function Er(t,l=rr().fallbackLocale){const e=N1(t);return l?[...new Set([...e,...N1(l)])]:e}function wo(){return sf??void 0}Ci.subscribe(t=>{sf=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const Y2=t=>{if(t&&q2(t)&&yi(t)){const{loadingDelay:l}=rr();let e;return typeof window<"u"&&wo()!=null&&l?e=window.setTimeout(()=>ki.set(!0),l):ki.set(!0),A0(t).then(()=>{Ci.set(t)}).finally(()=>{clearTimeout(e),ki.set(!1)})}return Ci.set(t)},yo=Q2(K2({},Ci),{set:Y2}),Z2=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Ri=t=>{const l=Object.create(null);return n=>{const r=JSON.stringify(n);return r in l?l[r]:l[r]=t(n)}};var X2=Object.defineProperty,Ei=Object.getOwnPropertySymbols,F0=Object.prototype.hasOwnProperty,z0=Object.prototype.propertyIsEnumerable,U1=(t,l,e)=>l in t?X2(t,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[l]=e,pf=(t,l)=>{for(var e in l||(l={}))F0.call(l,e)&&U1(t,e,l[e]);if(Ei)for(var e of Ei(l))z0.call(l,e)&&U1(t,e,l[e]);return t},fr=(t,l)=>{var e={};for(var n in t)F0.call(t,n)&&l.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&Ei)for(var n of Ei(t))l.indexOf(n)<0&&z0.call(t,n)&&(e[n]=t[n]);return e};const yr=(t,l)=>{const{formats:e}=rr();if(t in e&&l in e[t])return e[t][l];throw new Error(`[svelte-i18n] Unknown "${l}" ${t} format.`)},x2=Ri(t=>{var l=t,{locale:e,format:n}=l,r=fr(l,["locale","format"]);if(e==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format numbers\');return n&&(r=yr("number",n)),new Intl.NumberFormat(e,r)}),$2=Ri(t=>{var l=t,{locale:e,format:n}=l,r=fr(l,["locale","format"]);if(e==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format dates\');return n?r=yr("date",n):Object.keys(r).length===0&&(r=yr("date","short")),new Intl.DateTimeFormat(e,r)}),eh=Ri(t=>{var l=t,{locale:e,format:n}=l,r=fr(l,["locale","format"]);if(e==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format time values\');return n?r=yr("time",n):Object.keys(r).length===0&&(r=yr("time","short")),new Intl.DateTimeFormat(e,r)}),th=(t={})=>{var l=t,{locale:e=wo()}=l,n=fr(l,["locale"]);return x2(pf({locale:e},n))},lh=(t={})=>{var l=t,{locale:e=wo()}=l,n=fr(l,["locale"]);return $2(pf({locale:e},n))},sh=(t={})=>{var l=t,{locale:e=wo()}=l,n=fr(l,["locale"]);return eh(pf({locale:e},n))},oh=Ri((t,l=wo())=>new E0(t,l,rr().formats,{ignoreTag:rr().ignoreTag})),nh=(t,l={})=>{var e,n,r,i;let u=l;typeof t=="object"&&(u=t,t=u.id);const{values:c,locale:f=wo(),default:d}=u;if(f==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let p=B0(t,f);if(!p)p=(i=(r=(n=(e=rr()).handleMissingMessage)==null?void 0:n.call(e,{locale:f,id:t,defaultValue:d}))!=null?r:d)!=null?i:t;else if(typeof p!="string")return console.warn(`[svelte-i18n] Message with id "${t}" must be of type "string", found: "${typeof p}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),p;if(!c)return p;let m=p;try{m=oh(p,f).format(c)}catch(g){g instanceof Error&&console.warn(`[svelte-i18n] Message "${t}" has syntax error:`,g.message)}return m},rh=(t,l)=>sh(l).format(t),ah=(t,l)=>lh(l).format(t),ih=(t,l)=>th(l).format(t),uh=(t,l=wo())=>B0(t,l),Rt=so([yo,ur],()=>nh);so([yo],()=>rh);so([yo],()=>ah);so([yo],()=>ih);so([yo,ur],()=>uh);const fh="modulepreload",ch=function(t){return"/__ui/"+t},V1={},N0=function(l,e,n){let r=Promise.resolve();if(e&&e.length>0){let u=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");r=u(e.map(d=>{if(d=ch(d),d in V1)return;V1[d]=!0;const p=d.endsWith(".css"),m=p?\'[rel="stylesheet"]\':"";if(document.querySelector(`link[href="${d}"]${m}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":fh,p||(g.as="script"),g.crossOrigin="",g.href=d,f&&g.setAttribute("nonce",f),document.head.appendChild(g),p)return new Promise((b,v)=>{g.addEventListener("load",b),g.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return r.then(u=>{for(const c of u||[])c.status==="rejected"&&i(c.reason);return l().catch(i)})},U0="zh-CN",V0="locale",mi=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];O0("zh-CN",()=>N0(()=>import("./zh-CN-wPD53IzZ.js"),[]));O0("en",()=>N0(()=>import("./en-D_EcykrR.js"),[]));function dh(){return typeof localStorage<"u"?localStorage.getItem(V0):null}function ph(t){typeof localStorage<"u"&&localStorage.setItem(V0,t)}function hh(t){yo.set(t),ph(t)}const mh=dh(),gh=Z2(),_h=mh||gh||U0;N2({fallbackLocale:U0,initialLocale:_h});const Tr="bungee_auth_token",J0=lo(typeof window<"u"?localStorage.getItem(Tr):null),Ti=lo(typeof window<"u"?!!localStorage.getItem(Tr):!1),J1=lo(!1);function bh(t){typeof window>"u"||(localStorage.setItem(Tr,t),J0.set(t),Ti.set(!0))}function W0(){typeof window>"u"||(localStorage.removeItem(Tr),J0.set(null),Ti.set(!1))}function G0(){return typeof window>"u"?null:localStorage.getItem(Tr)}const vh="/__ui/api";async function gi(t,l){const e=`${vh}${t}`,n=G0(),r={"Content-Type":"application/json",...l?.headers};n&&(r.Authorization=`Bearer ${n}`);const i=await fetch(e,{...l,headers:r});if(i.status===401)throw W0(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!i.ok){const c=await i.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||`Request failed with status ${i.status}`)}return await i.json()}const Cl={get:t=>gi(t),post:(t,l)=>gi(t,{method:"POST",body:JSON.stringify(l)}),put:(t,l)=>gi(t,{method:"PUT",body:JSON.stringify(l)}),delete:t=>gi(t,{method:"DELETE"})};async function hf(){return Cl.get("/config")}async function kh(t){return Cl.put("/config",t)}async function wh(t){return Cl.post("/config/validate",t)}async function yh(t="1h"){return Cl.get(`/stats/history/v2?range=${t}`)}async function Ch(t="1h"){return Cl.get(`/stats/upstream-status-codes?range=${t}`)}async function W1(t="1h",l="all"){return Cl.get(`/stats/upstream-stats?range=${t}&type=${l}`)}const G1=typeof window<"u";function Eh(){const{subscribe:t,set:l}=lo({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let e=null,n=null,r=!1;function i(){if(!G1)return;const f=document.createElement("div");f.className="text-base-content",f.style.position="absolute",f.style.visibility="hidden",document.body.appendChild(f);const d=getComputedStyle(f).color;document.body.removeChild(f);const p=d.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/);if(p){const m=parseInt(p[1]),g=parseInt(p[2]),b=parseInt(p[3]),w=(m*299+g*587+b*114)/1e3<128?.2:.15,C=`rgba(${m}, ${g}, ${b}, ${w})`;l({textColor:d,gridColor:C})}else l({textColor:"rgba(100, 100, 100, 0.9)",gridColor:"rgba(100, 100, 100, 0.2)"})}function u(){if(!G1||r)return;r=!0,i(),e=new MutationObserver(()=>{i()}),e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),n=window.matchMedia("(prefers-color-scheme: dark)");const f=()=>i();n.addEventListener("change",f),typeof window<"u"&&window.addEventListener("beforeunload",()=>{c()})}function c(){e&&(e.disconnect(),e=null),n&&(n.removeEventListener("change",i),n=null),r=!1}return{subscribe:t,init:u,cleanup:c}}const Fs=Eh();so(Fs,t=>t.textColor);so(Fs,t=>t.gridColor);function mf(t,l,e=!0){return{display:e&&!!t,text:t,color:l,font:{size:16,weight:"bold"}}}function Th(t,l={}){const{position:e="top",display:n=!0,padding:r=15,fontSize:i=11}=l;return{display:n,position:e,labels:{padding:r,font:{size:i},color:t}}}function Mi(t,l,e={}){const{stacked:n=!1,beginAtZero:r=!0,fontSize:i=11,maxRotation:u,minRotation:c,title:f}=e,d={stacked:n,beginAtZero:r,ticks:{font:{size:i},color:t},grid:{color:l}};return f&&(d.title={display:f.display,text:f.text,color:t}),u!==void 0&&(d.ticks.maxRotation=u),c!==void 0&&(d.ticks.minRotation=c),d}function K0(t="index",l=!1){return{mode:t,intersect:l}}const wi=new Map,kr=new Map;function Q0(t){return wi.has(t)||wi.set(t,lo({activeIndex:null})),wi.get(t)}function Mh(t,l){kr.has(t)||kr.set(t,new Set),kr.get(t).add(l)}function Sh(t,l){const e=kr.get(t);e&&(e.delete(l),e.size===0&&(kr.delete(t),wi.delete(t)))}function K1(t,l,e){Q0(t).set({activeIndex:l,sourceChartId:e})}function Rh(t){let l=null,e=!1;return{id:`chartSync-${t}-${Math.random().toString(36).substring(2,11)}`,afterInit(r){Mh(t,r),l=Q0(t).subscribe(u=>{e||(u.activeIndex!==null&&u.sourceChartId!==r.id?qh(r,u.activeIndex):u.activeIndex===null&&Hh(r))})},afterEvent(r,i){const u=i.event;if(u.type==="mousemove"){const c=r.getElementsAtEventForMode(u,"index",{axis:"x",intersect:!1},!1);if(c.length>0){const f=c[0].index;K1(t,f,r.id),i.changed=!0}}else u.type==="mouseout"&&(K1(t,null,r.id),i.changed=!0)},destroy(r){e=!0,l&&(l(),l=null),Sh(t,r)}}}function qh(t,l){try{if(!t||!t.ctx||!t.tooltip||!t.data.datasets||t.data.datasets.length===0)return;const e=[];for(let n=0;n<t.data.datasets.length;n++){const r=t.data.datasets[n];if(!r.data||l<0||l>=r.data.length)continue;const i=t.getDatasetMeta(n);!i||!i.controller||!i.data||!i.data[l]||e.push({datasetIndex:n,index:l})}if(e.length===0)return;t.tooltip.setActiveElements(e,{x:0,y:0}),t.update("none")}catch(e){console.debug("Chart sync: tooltip update failed (chart may be destroying)",e)}}function Hh(t){try{if(!t||!t.ctx||!t.tooltip)return;t.tooltip.setActiveElements([],{x:0,y:0}),t.update("none")}catch(l){console.debug("Chart sync: tooltip hide failed (chart may be destroying)",l)}}function Ph(t){let l,e,n;return e=new r2({props:{data:t[2],options:t[1],plugins:t[0]}}),{c(){l=a("div"),Et(e.$$.fragment),o(l,"class","w-full h-full")},m(r,i){j(r,l,i),yt(e,l,null),n=!0},p(r,[i]){const u={};i&4&&(u.data=r[2]),i&2&&(u.options=r[1]),i&1&&(u.plugins=r[0]),e.$set(u)},i(r){n||(et(e.$$.fragment,r),n=!0)},o(r){st(e.$$.fragment,r),n=!1},d(r){r&&P(l),Ct(e)}}}function jh(t,l,e){let n,r,i,u;Dt(t,Fs,g=>e(8,u=g)),of.register(T0,M0,a2,i2,u2,nf,rf);let{title:c}=l,{labels:f}=l,{datasets:d}=l,{yAxisLabel:p=""}=l,{syncGroup:m=void 0}=l;return Hs(()=>{Fs.init()}),ir(()=>{Fs.cleanup()}),t.$$set=g=>{"title"in g&&e(3,c=g.title),"labels"in g&&e(4,f=g.labels),"datasets"in g&&e(5,d=g.datasets),"yAxisLabel"in g&&e(6,p=g.yAxisLabel),"syncGroup"in g&&e(7,m=g.syncGroup)},t.$$.update=()=>{t.$$.dirty&48&&e(2,n={labels:f,datasets:d.map(g=>({...g,borderColor:g.borderColor||"rgb(75, 192, 192)",backgroundColor:g.backgroundColor||"rgba(75, 192, 192, 0.2)",tension:g.tension??.4}))}),t.$$.dirty&360&&e(1,r={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:d.length>1,position:"top",labels:{color:u.textColor}},title:mf(c,u.textColor,!0),tooltip:K0("index",!1)},scales:{y:Mi(u.textColor,u.gridColor,{beginAtZero:!0,title:p?{display:!0,text:p}:void 0}),x:{...Mi(u.textColor,u.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:u.textColor}}},interaction:{mode:"index",axis:"x",intersect:!1}}),t.$$.dirty&128&&e(0,i=m?[Rh(m)]:[])},[i,r,n,c,f,d,p,m,u]}class _i extends Vt{constructor(l){super(),Ut(this,l,jh,Ph,At,{title:3,labels:4,datasets:5,yAxisLabel:6,syncGroup:7})}}function Lh(t){let l,e,n;return e=new f2({props:{data:t[1],options:t[0]}}),{c(){l=a("div"),Et(e.$$.fragment),o(l,"class","w-full h-full")},m(r,i){j(r,l,i),yt(e,l,null),n=!0},p(r,[i]){const u={};i&2&&(u.data=r[1]),i&1&&(u.options=r[0]),e.$set(u)},i(r){n||(et(e.$$.fragment,r),n=!0)},o(r){st(e.$$.fragment,r),n=!1},d(r){r&&P(l),Ct(e)}}}function Dh(t,l,e){let n,r,i;Dt(t,Fs,f=>e(4,i=f)),of.register(c2,nf,rf);let{data:u=[]}=l,{title:c=""}=l;return Hs(()=>{Fs.init()}),ir(()=>{Fs.cleanup()}),t.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},t.$$.update=()=>{t.$$.dirty&20&&e(1,n={labels:u.map(f=>f.label),datasets:[{data:u.map(f=>f.value),backgroundColor:["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(168, 85, 247, 0.8)","rgba(236, 72, 153, 0.8)","rgba(20, 184, 166, 0.8)","rgba(251, 146, 60, 0.8)","rgba(132, 204, 22, 0.8)","rgba(148, 163, 184, 0.8)"],borderColor:i.gridColor,borderWidth:1}]}),t.$$.dirty&28&&e(0,r={responsive:!0,maintainAspectRatio:!1,plugins:{title:mf(c,i.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:i.textColor,generateLabels:f=>{const p=f.data.datasets[0].backgroundColor,m=f.getDatasetMeta(0);return f.data.labels?.map((g,b)=>{const v=m.data[b],w=v&&typeof v.hidden<"u"?v.hidden:!1;return{text:`${g} (${u[b]?.percentage||0}%)`,fillStyle:p[b],strokeStyle:p[b],fontColor:i.textColor,hidden:w,index:b,datasetIndex:0}})||[]}},onClick:(f,d,p)=>{const m=d.index,g=p.chart,b=g.getDatasetMeta(0);b.data[m].hidden=!b.data[m].hidden,g.update()}},tooltip:{callbacks:{label:f=>{const d=f.label||"",p=f.parsed||0,m=u[f.dataIndex]?.percentage||0;return`${d}: ${p} (${m}%)`}}}}})},[r,n,u,c,i]}class Y0 extends Vt{constructor(l){super(),Ut(this,l,Dh,Lh,At,{data:2,title:3})}}function Ih(t){let l,e,n;return e=new d2({props:{data:t[1],options:t[0]}}),{c(){l=a("div"),Et(e.$$.fragment),o(l,"class","w-full h-full")},m(r,i){j(r,l,i),yt(e,l,null),n=!0},p(r,[i]){const u={};i&2&&(u.data=r[1]),i&1&&(u.options=r[0]),e.$set(u)},i(r){n||(et(e.$$.fragment,r),n=!0)},o(r){st(e.$$.fragment,r),n=!1},d(r){r&&P(l),Ct(e)}}}function Bh(t,l,e){let n,r,i;Dt(t,Fs,f=>e(4,i=f)),of.register(p2,T0,M0,nf,rf);let{data:u=[]}=l,{title:c=""}=l;return Hs(()=>{Fs.init()}),ir(()=>{Fs.cleanup()}),t.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},t.$$.update=()=>{t.$$.dirty&4&&e(1,n={labels:u.map(f=>f.label),datasets:[{label:"2xx",data:u.map(f=>f.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:u.map(f=>f.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:u.map(f=>f.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:u.map(f=>f.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),t.$$.dirty&24&&e(0,r={responsive:!0,maintainAspectRatio:!1,scales:{x:Mi(i.textColor,i.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:Mi(i.textColor,i.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:mf(c,i.textColor),legend:Th(i.textColor,{position:"top",padding:15,fontSize:11}),tooltip:K0("index",!1)}})},[r,n,u,c,i]}class Ah extends Vt{constructor(l){super(),Ut(this,l,Bh,Ih,At,{data:2,title:3})}}function Oh(t){let l,e,n,r,i,u=t[11]("monitoring.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(l,"class","alert alert-info")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("monitoring.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Fh(t){let l,e,n,r,i=t[11]("monitoring.charts.requestsTrend")+"",u,c,f,d,p,m,g,b,v=t[11]("monitoring.charts.responseTimeTrend")+"",w,C,E,y,T,S,q,D,H=t[11]("monitoring.charts.successRateTrend")+"",I,R,L,A,N,Z,Y,x,F=t[11]("monitoring.charts.errorsTrend")+"",K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge=t[11]("dashboard.upstreamFailures")+"",he,ye,Fe,je,we,Oe,Je,Le,Pe,Me=t[11]("dashboard.upstreamStatusCodes")+"",fe,_e,Be,De,se,ke;d=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodRequests"),data:t[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.requests"),syncGroup:"monitoring-trends"}}),y=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.avgResponseTime"),data:t[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.milliseconds"),syncGroup:"monitoring-trends"}}),A=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.successRate"),data:t[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.percentage"),syncGroup:"monitoring-trends"}}),U=new _i({props:{labels:t[10],datasets:[{label:t[11]("monitoring.charts.periodErrors"),data:t[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}],yAxisLabel:t[11]("monitoring.charts.errors"),syncGroup:"monitoring-trends"}});const me=[Vh,Uh],Ee=[];function Ve(de,Te){return de[5].length>0?0:1}te=Ve(t),re=Ee[te]=me[te](t);const Ie=[Wh,Jh],nt=[];function Ne(de,Te){return de[4].length>0?0:1}je=Ne(t),we=nt[je]=Ie[je](t);const Ye=[Kh,Gh],Qe=[];function ve(de,Te){return de[3].length>0?0:1}return De=ve(t),se=Qe[De]=Ye[De](t),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h3"),u=_(i),c=h(),f=a("div"),Et(d.$$.fragment),p=h(),m=a("div"),g=a("div"),b=a("h3"),w=_(v),C=h(),E=a("div"),Et(y.$$.fragment),T=h(),S=a("div"),q=a("div"),D=a("h3"),I=_(H),R=h(),L=a("div"),Et(A.$$.fragment),N=h(),Z=a("div"),Y=a("div"),x=a("h3"),K=_(F),M=h(),B=a("div"),Et(U.$$.fragment),O=h(),J=a("div"),ie=a("div"),ue=a("h3"),ue.textContent="\u4E0A\u6E38\u6210\u529F\u7EDF\u8BA1",ne=h(),$=a("div"),re.c(),ee=h(),G=a("div"),pe=a("div"),oe=a("h3"),he=_(ge),ye=h(),Fe=a("div"),we.c(),Oe=h(),Je=a("div"),Le=a("div"),Pe=a("h3"),fe=_(Me),_e=h(),Be=a("div"),se.c(),o(r,"class","text-base font-semibold mb-3"),o(f,"class","h-64"),o(n,"class","card-body p-4"),o(e,"class","card bg-base-100 shadow-xl"),o(b,"class","text-base font-semibold mb-3"),o(E,"class","h-64"),o(g,"class","card-body p-4"),o(m,"class","card bg-base-100 shadow-xl"),o(D,"class","text-base font-semibold mb-3"),o(L,"class","h-64"),o(q,"class","card-body p-4"),o(S,"class","card bg-base-100 shadow-xl"),o(x,"class","text-base font-semibold mb-3"),o(B,"class","h-64"),o(Y,"class","card-body p-4"),o(Z,"class","card bg-base-100 shadow-xl"),o(ue,"class","text-base font-semibold mb-3"),o($,"class","h-64"),o(ie,"class","card-body p-4"),o(J,"class","card bg-base-100 shadow-xl"),o(oe,"class","text-base font-semibold mb-3"),o(Fe,"class","h-64"),o(pe,"class","card-body p-4"),o(G,"class","card bg-base-100 shadow-xl"),o(Pe,"class","text-base font-semibold mb-3"),o(Be,"class","h-64"),o(Le,"class","card-body p-4"),o(Je,"class","card bg-base-100 shadow-xl lg:col-span-2"),o(l,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(de,Te){j(de,l,Te),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),yt(d,f,null),s(l,p),s(l,m),s(m,g),s(g,b),s(b,w),s(g,C),s(g,E),yt(y,E,null),s(l,T),s(l,S),s(S,q),s(q,D),s(D,I),s(q,R),s(q,L),yt(A,L,null),s(l,N),s(l,Z),s(Z,Y),s(Y,x),s(x,K),s(Y,M),s(Y,B),yt(U,B,null),s(l,O),s(l,J),s(J,ie),s(ie,ue),s(ie,ne),s(ie,$),Ee[te].m($,null),s(l,ee),s(l,G),s(G,pe),s(pe,oe),s(oe,he),s(pe,ye),s(pe,Fe),nt[je].m(Fe,null),s(l,Oe),s(l,Je),s(Je,Le),s(Le,Pe),s(Pe,fe),s(Le,_e),s(Le,Be),Qe[De].m(Be,null),ke=!0},p(de,Te){(!ke||Te&2048)&&i!==(i=de[11]("monitoring.charts.requestsTrend")+"")&&k(u,i);const Ze={};Te&1024&&(Ze.labels=de[10]),Te&2560&&(Ze.datasets=[{label:de[11]("monitoring.charts.periodRequests"),data:de[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),Te&2048&&(Ze.yAxisLabel=de[11]("monitoring.charts.requests")),d.$set(Ze),(!ke||Te&2048)&&v!==(v=de[11]("monitoring.charts.responseTimeTrend")+"")&&k(w,v);const Se={};Te&1024&&(Se.labels=de[10]),Te&2176&&(Se.datasets=[{label:de[11]("monitoring.charts.avgResponseTime"),data:de[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),Te&2048&&(Se.yAxisLabel=de[11]("monitoring.charts.milliseconds")),y.$set(Se),(!ke||Te&2048)&&H!==(H=de[11]("monitoring.charts.successRateTrend")+"")&&k(I,H);const Ue={};Te&1024&&(Ue.labels=de[10]),Te&2112&&(Ue.datasets=[{label:de[11]("monitoring.charts.successRate"),data:de[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),Te&2048&&(Ue.yAxisLabel=de[11]("monitoring.charts.percentage")),A.$set(Ue),(!ke||Te&2048)&&F!==(F=de[11]("monitoring.charts.errorsTrend")+"")&&k(K,F);const Ce={};Te&1024&&(Ce.labels=de[10]),Te&2304&&(Ce.datasets=[{label:de[11]("monitoring.charts.periodErrors"),data:de[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),Te&2048&&(Ce.yAxisLabel=de[11]("monitoring.charts.errors")),U.$set(Ce);let mt=te;te=Ve(de),te===mt?Ee[te].p(de,Te):(Gl(),st(Ee[mt],1,1,()=>{Ee[mt]=null}),Kl(),re=Ee[te],re?re.p(de,Te):(re=Ee[te]=me[te](de),re.c()),et(re,1),re.m($,null)),(!ke||Te&2048)&&ge!==(ge=de[11]("dashboard.upstreamFailures")+"")&&k(he,ge);let Ge=je;je=Ne(de),je===Ge?nt[je].p(de,Te):(Gl(),st(nt[Ge],1,1,()=>{nt[Ge]=null}),Kl(),we=nt[je],we?we.p(de,Te):(we=nt[je]=Ie[je](de),we.c()),et(we,1),we.m(Fe,null)),(!ke||Te&2048)&&Me!==(Me=de[11]("dashboard.upstreamStatusCodes")+"")&&k(fe,Me);let ce=De;De=ve(de),De===ce?Qe[De].p(de,Te):(Gl(),st(Qe[ce],1,1,()=>{Qe[ce]=null}),Kl(),se=Qe[De],se?se.p(de,Te):(se=Qe[De]=Ye[De](de),se.c()),et(se,1),se.m(Be,null))},i(de){ke||(et(d.$$.fragment,de),et(y.$$.fragment,de),et(A.$$.fragment,de),et(U.$$.fragment,de),et(re),et(we),et(se),ke=!0)},o(de){st(d.$$.fragment,de),st(y.$$.fragment,de),st(A.$$.fragment,de),st(U.$$.fragment,de),st(re),st(we),st(se),ke=!1},d(de){de&&P(l),Ct(d),Ct(y),Ct(A),Ct(U),Ee[te].d(),nt[je].d(),Qe[De].d()}}}function zh(t){let l,e,n,r,i,u=t[11]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[1]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m&2048&&u!==(u=p[11]("common.error")+"")&&k(c,u),m&2&&k(d,p[1])},i:tt,o:tt,d(p){p&&P(l)}}}function Nh(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function Uh(t){let l,e,n,r,i,u=t[11]("dashboard.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(l,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Vh(t){let l,e;return l=new Y0({props:{data:t[5]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&32&&(i.data=n[5]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Jh(t){let l,e,n,r,i,u=t[11]("dashboard.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(l,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Wh(t){let l,e;return l=new Y0({props:{data:t[4]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&16&&(i.data=n[4]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Gh(t){let l,e,n,r,i,u=t[11]("dashboard.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(l,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&k(c,u)},i:tt,o:tt,d(f){f&&P(l)}}}function Kh(t){let l,e;return l=new Ah({props:{data:t[3]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&8&&(i.data=n[3]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Qh(t){let l,e,n,r=t[11]("monitoring.title")+"",i,u,c,f,d;const p=[Nh,zh,Fh,Oh],m=[];function g(b,v){return b[2]&&!b[0]?0:b[1]?1:b[0]&&b[0].timestamps.length>0?2:3}return c=g(t),f=m[c]=p[c](t),{c(){l=a("div"),e=a("div"),n=a("h2"),i=_(r),u=h(),f.c(),o(n,"class","text-2xl font-bold"),o(l,"class","space-y-6")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(n,i),s(l,u),m[c].m(l,null),d=!0},p(b,[v]){(!d||v&2048)&&r!==(r=b[11]("monitoring.title")+"")&&k(i,r);let w=c;c=g(b),c===w?m[c].p(b,v):(Gl(),st(m[w],1,1,()=>{m[w]=null}),Kl(),f=m[c],f?f.p(b,v):(f=m[c]=p[c](b),f.c()),et(f,1),f.m(l,null))},i(b){d||(et(f),d=!0)},o(b){st(f),d=!1},d(b){b&&P(l),m[c].d()}}}function Yh(t,l,e){let n,r,i,u,c,f,d,p,m;Dt(t,Rt,I=>e(11,m=I));let{selectedRange:g="1h"}=l,{onDataLoaded:b=()=>{}}=l,v=null,w=!0,C=null,E,y=[],T=[],S=[];async function q(){try{e(2,w=!0),e(0,v=await yh(g)),e(1,C=null)}catch(I){e(1,C=I.message)}finally{e(2,w=!1)}}async function D(){try{const[I,R,L]=await Promise.all([W1(g,"success"),W1(g,"failure"),Ch(g)]);e(14,y=I.data),e(15,T=R.data),e(16,S=L.data)}catch(I){console.error("Failed to load upstream stats:",I)}finally{}}async function H(){await Promise.all([q(),D()])}return Hs(()=>{H(),E=setInterval(H,3e4)}),ir(()=>{E&&clearInterval(E)}),t.$$set=I=>{"selectedRange"in I&&e(12,g=I.selectedRange),"onDataLoaded"in I&&e(13,b=I.onDataLoaded)},t.$$.update=()=>{t.$$.dirty&4096&&g&&H(),t.$$.dirty&8195&&(v!==null||C!==null)&&b(C?null:v),t.$$.dirty&4097&&e(10,n=v?.timestamps.map(I=>{const R=new Date(I);switch(g){case"1h":return R.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return R.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return R.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return R.toLocaleTimeString("zh-CN")}})||[]),t.$$.dirty&1&&e(9,r=v?.requests||[]),t.$$.dirty&1&&e(8,i=v?.errors||[]),t.$$.dirty&1&&e(7,u=v?.responseTime||[]),t.$$.dirty&1&&e(6,c=v?.successRate||[]),t.$$.dirty&16384&&e(5,f=y.map(I=>({label:new URL(I.upstream).host,value:I.count,percentage:I.percentage}))),t.$$.dirty&32768&&e(4,d=T.filter(I=>I.failedRequests>0).sort((I,R)=>R.failedRequests-I.failedRequests).map(I=>({label:new URL(I.upstream).host,value:I.failedRequests,percentage:I.percentage}))),t.$$.dirty&65536&&e(3,p=S.map(I=>({label:new URL(I.upstream).host,status2xx:I.status2xx,status3xx:I.status3xx,status4xx:I.status4xx,status5xx:I.status5xx})))},[v,C,w,p,d,f,c,u,i,r,n,m,g,b,y,T,S]}class Zh extends Vt{constructor(l){super(),Ut(this,l,Yh,Qh,At,{selectedRange:12,onDataLoaded:13})}}function Xh(t){let l,e,n,r,i=t[2]("dashboard.totalRequests")+"",u,c,f,d,p,m,g,b=t[2]("dashboard.requestsPerSecond")+"",v,w,C,E,y,T,S,q=t[2]("dashboard.successRate")+"",D,H,I,R,L,A,N,Z=t[2]("dashboard.avgResponseTime")+"",Y,x,F;return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h2"),u=_(i),c=h(),f=a("p"),f.textContent="-",d=h(),p=a("div"),m=a("div"),g=a("h2"),v=_(b),w=h(),C=a("p"),C.textContent="-",E=h(),y=a("div"),T=a("div"),S=a("h2"),D=_(q),H=h(),I=a("p"),I.textContent="-",R=h(),L=a("div"),A=a("div"),N=a("h2"),Y=_(Z),x=h(),F=a("p"),F.textContent="-",o(r,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(g,"class","card-title text-sm"),o(C,"class","text-3xl font-bold"),o(m,"class","card-body"),o(p,"class","card bg-base-100 shadow-xl"),o(S,"class","card-title text-sm"),o(I,"class","text-3xl font-bold"),o(T,"class","card-body"),o(y,"class","card bg-base-100 shadow-xl"),o(N,"class","card-title text-sm"),o(F,"class","text-3xl font-bold"),o(A,"class","card-body"),o(L,"class","card bg-base-100 shadow-xl"),o(l,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(K,M){j(K,l,M),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(l,d),s(l,p),s(p,m),s(m,g),s(g,v),s(m,w),s(m,C),s(l,E),s(l,y),s(y,T),s(T,S),s(S,D),s(T,H),s(T,I),s(l,R),s(l,L),s(L,A),s(A,N),s(N,Y),s(A,x),s(A,F)},p(K,M){M&4&&i!==(i=K[2]("dashboard.totalRequests")+"")&&k(u,i),M&4&&b!==(b=K[2]("dashboard.requestsPerSecond")+"")&&k(v,b),M&4&&q!==(q=K[2]("dashboard.successRate")+"")&&k(D,q),M&4&&Z!==(Z=K[2]("dashboard.avgResponseTime")+"")&&k(Y,Z)},d(K){K&&P(l)}}}function xh(t){let l,e,n,r,i=t[2]("dashboard.totalRequests")+"",u,c,f,d=t[1].totalRequests+"",p,m,g,b,v,w=t[2]("dashboard.requestsPerSecond")+"",C,E,y,T=t[1].requestsPerSecond.toFixed(2)+"",S,q,D,H,I,R=t[2]("dashboard.successRate")+"",L,A,N,Z=t[1].successRate.toFixed(1)+"",Y,x,F,K,M,B,U=t[2]("dashboard.avgResponseTime")+"",O,J,ie,ue=t[1].avgResponseTime.toFixed(0)+"",ne,$;return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h2"),u=_(i),c=h(),f=a("p"),p=_(d),m=h(),g=a("div"),b=a("div"),v=a("h2"),C=_(w),E=h(),y=a("p"),S=_(T),q=h(),D=a("div"),H=a("div"),I=a("h2"),L=_(R),A=h(),N=a("p"),Y=_(Z),x=_("%"),F=h(),K=a("div"),M=a("div"),B=a("h2"),O=_(U),J=h(),ie=a("p"),ne=_(ue),$=_("ms"),o(r,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(v,"class","card-title text-sm"),o(y,"class","text-3xl font-bold"),o(b,"class","card-body"),o(g,"class","card bg-base-100 shadow-xl"),o(I,"class","card-title text-sm"),o(N,"class","text-3xl font-bold"),o(H,"class","card-body"),o(D,"class","card bg-base-100 shadow-xl"),o(B,"class","card-title text-sm"),o(ie,"class","text-3xl font-bold"),o(M,"class","card-body"),o(K,"class","card bg-base-100 shadow-xl"),o(l,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(te,re){j(te,l,re),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,p),s(l,m),s(l,g),s(g,b),s(b,v),s(v,C),s(b,E),s(b,y),s(y,S),s(l,q),s(l,D),s(D,H),s(H,I),s(I,L),s(H,A),s(H,N),s(N,Y),s(N,x),s(l,F),s(l,K),s(K,M),s(M,B),s(B,O),s(M,J),s(M,ie),s(ie,ne),s(ie,$)},p(te,re){re&4&&i!==(i=te[2]("dashboard.totalRequests")+"")&&k(u,i),re&2&&d!==(d=te[1].totalRequests+"")&&k(p,d),re&4&&w!==(w=te[2]("dashboard.requestsPerSecond")+"")&&k(C,w),re&2&&T!==(T=te[1].requestsPerSecond.toFixed(2)+"")&&k(S,T),re&4&&R!==(R=te[2]("dashboard.successRate")+"")&&k(L,R),re&2&&Z!==(Z=te[1].successRate.toFixed(1)+"")&&k(Y,Z),re&4&&U!==(U=te[2]("dashboard.avgResponseTime")+"")&&k(O,U),re&2&&ue!==(ue=te[1].avgResponseTime.toFixed(0)+"")&&k(ne,ue)},d(te){te&&P(l)}}}function $h(t){let l,e,n=t[2]("dashboard.title")+"",r,i,u,c,f=t[2]("dashboard.dataRange")+"",d,p,m=t[2]("monitoring.range."+t[0])+"",g,b,v,w,C,E,y,T=t[2]("monitoring.range.oneHour")+"",S,q,D,H,I,R,L=t[2]("monitoring.range.twelveHours")+"",A,N,Z,Y,x,F,K=t[2]("monitoring.range.twentyFourHours")+"",M,B,U,O,J,ie,ue,ne;function $(ee,G){return ee[1]?xh:Xh}let te=$(t),re=te(t);return O=new Zh({props:{selectedRange:t[0],onDataLoaded:t[3]}}),ie=uf(t[5][0]),{c(){l=a("div"),e=a("h1"),r=_(n),i=h(),u=a("div"),c=a("p"),d=_(f),p=_(": "),g=_(m),b=h(),v=a("div"),w=a("label"),C=a("input"),E=h(),y=a("span"),S=_(T),q=h(),D=a("label"),H=a("input"),I=h(),R=a("span"),A=_(L),N=h(),Z=a("label"),Y=a("input"),x=h(),F=a("span"),M=_(K),B=h(),re.c(),U=h(),Et(O.$$.fragment),o(e,"class","text-3xl font-bold mb-6"),o(c,"class","text-sm text-gray-500"),o(C,"class","sr-only"),o(C,"type","radio"),o(C,"name","range"),C.__value="1h",Q(C,C.__value),o(y,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(y,"bg-primary",t[0]==="1h"),le(y,"text-primary-content",t[0]==="1h"),le(y,"shadow",t[0]==="1h"),le(y,"text-gray-700",t[0]!=="1h"),le(y,"dark:text-gray-300",t[0]!=="1h"),le(y,"hover:text-gray-900",t[0]!=="1h"),le(y,"dark:hover:text-gray-100",t[0]!=="1h"),o(w,"class","cursor-pointer"),o(H,"class","sr-only"),o(H,"type","radio"),o(H,"name","range"),H.__value="12h",Q(H,H.__value),o(R,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(R,"bg-primary",t[0]==="12h"),le(R,"text-primary-content",t[0]==="12h"),le(R,"shadow",t[0]==="12h"),le(R,"text-gray-700",t[0]!=="12h"),le(R,"dark:text-gray-300",t[0]!=="12h"),le(R,"hover:text-gray-900",t[0]!=="12h"),le(R,"dark:hover:text-gray-100",t[0]!=="12h"),o(D,"class","cursor-pointer"),o(Y,"class","sr-only"),o(Y,"type","radio"),o(Y,"name","range"),Y.__value="24h",Q(Y,Y.__value),o(F,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(F,"bg-primary",t[0]==="24h"),le(F,"text-primary-content",t[0]==="24h"),le(F,"shadow",t[0]==="24h"),le(F,"text-gray-700",t[0]!=="24h"),le(F,"dark:text-gray-300",t[0]!=="24h"),le(F,"hover:text-gray-900",t[0]!=="24h"),le(F,"dark:hover:text-gray-100",t[0]!=="24h"),o(Z,"class","cursor-pointer"),o(v,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(u,"class","flex justify-between items-center mb-6"),o(l,"class","p-6"),ie.p(C,H,Y)},m(ee,G){j(ee,l,G),s(l,e),s(e,r),s(l,i),s(l,u),s(u,c),s(c,d),s(c,p),s(c,g),s(u,b),s(u,v),s(v,w),s(w,C),C.checked=C.__value===t[0],s(w,E),s(w,y),s(y,S),s(v,q),s(v,D),s(D,H),H.checked=H.__value===t[0],s(D,I),s(D,R),s(R,A),s(v,N),s(v,Z),s(Z,Y),Y.checked=Y.__value===t[0],s(Z,x),s(Z,F),s(F,M),s(l,B),re.m(l,null),s(l,U),yt(O,l,null),J=!0,ue||(ne=[V(C,"change",t[4]),V(H,"change",t[6]),V(Y,"change",t[7])],ue=!0)},p(ee,[G]){(!J||G&4)&&n!==(n=ee[2]("dashboard.title")+"")&&k(r,n),(!J||G&4)&&f!==(f=ee[2]("dashboard.dataRange")+"")&&k(d,f),(!J||G&5)&&m!==(m=ee[2]("monitoring.range."+ee[0])+"")&&k(g,m),G&1&&(C.checked=C.__value===ee[0]),(!J||G&4)&&T!==(T=ee[2]("monitoring.range.oneHour")+"")&&k(S,T),(!J||G&1)&&le(y,"bg-primary",ee[0]==="1h"),(!J||G&1)&&le(y,"text-primary-content",ee[0]==="1h"),(!J||G&1)&&le(y,"shadow",ee[0]==="1h"),(!J||G&1)&&le(y,"text-gray-700",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:text-gray-300",ee[0]!=="1h"),(!J||G&1)&&le(y,"hover:text-gray-900",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:hover:text-gray-100",ee[0]!=="1h"),G&1&&(H.checked=H.__value===ee[0]),(!J||G&4)&&L!==(L=ee[2]("monitoring.range.twelveHours")+"")&&k(A,L),(!J||G&1)&&le(R,"bg-primary",ee[0]==="12h"),(!J||G&1)&&le(R,"text-primary-content",ee[0]==="12h"),(!J||G&1)&&le(R,"shadow",ee[0]==="12h"),(!J||G&1)&&le(R,"text-gray-700",ee[0]!=="12h"),(!J||G&1)&&le(R,"dark:text-gray-300",ee[0]!=="12h"),(!J||G&1)&&le(R,"hover:text-gray-900",ee[0]!=="12h"),(!J||G&1)&&le(R,"dark:hover:text-gray-100",ee[0]!=="12h"),G&1&&(Y.checked=Y.__value===ee[0]),(!J||G&4)&&K!==(K=ee[2]("monitoring.range.twentyFourHours")+"")&&k(M,K),(!J||G&1)&&le(F,"bg-primary",ee[0]==="24h"),(!J||G&1)&&le(F,"text-primary-content",ee[0]==="24h"),(!J||G&1)&&le(F,"shadow",ee[0]==="24h"),(!J||G&1)&&le(F,"text-gray-700",ee[0]!=="24h"),(!J||G&1)&&le(F,"dark:text-gray-300",ee[0]!=="24h"),(!J||G&1)&&le(F,"hover:text-gray-900",ee[0]!=="24h"),(!J||G&1)&&le(F,"dark:hover:text-gray-100",ee[0]!=="24h"),te===(te=$(ee))&&re?re.p(ee,G):(re.d(1),re=te(ee),re&&(re.c(),re.m(l,U)));const pe={};G&1&&(pe.selectedRange=ee[0]),O.$set(pe)},i(ee){J||(et(O.$$.fragment,ee),J=!0)},o(ee){st(O.$$.fragment,ee),J=!1},d(ee){ee&&P(l),re.d(),Ct(O),ie.r(),ue=!1,bt(ne)}}}function em(t){switch(t){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function tm(t,l,e){let n;Dt(t,Rt,g=>e(2,n=g));let r="1h",i=null;function u(g){e(1,i=c(g))}function c(g){if(!g||g.requests.length===0)return null;const b=g.requests.reduce((T,S)=>T+S,0),v=em(r),w=b/v,C=g.errors.reduce((T,S)=>T+S,0),E=b>0?(b-C)/b*100:100,y=g.responseTime.length>0?g.responseTime.reduce((T,S)=>T+S,0)/g.responseTime.length:0;return{totalRequests:b,requestsPerSecond:w,successRate:E,avgResponseTime:y}}const f=[[]];function d(){r=this.__value,e(0,r)}function p(){r=this.__value,e(0,r)}function m(){r=this.__value,e(0,r)}return[r,i,n,u,d,f,p,m]}class lm extends Vt{constructor(l){super(),Ut(this,l,tm,$h,At,{})}}async function sm(){return Cl.post("/system/reload",{})}async function om(){return Cl.post("/system/restart",{})}function mr(){const{subscribe:t,update:l}=lo([]);let e=0;return{subscribe:t,show:(n,r="info",i=3e3)=>{const u=e++,c={id:u,message:n,type:r,duration:i};return l(f=>[...f,c]),i>0&&setTimeout(()=>{l(f=>f.filter(d=>d.id!==u))},i),u},success:(n,r=3e3)=>mr().show(n,"success",r),error:(n,r=4e3)=>mr().show(n,"error",r),warning:(n,r=3500)=>mr().show(n,"warning",r),info:(n,r=3e3)=>mr().show(n,"info",r),remove:n=>{l(r=>r.filter(i=>i.id!==n))},clear:()=>{l(()=>[])}}}const Lt=mr();function Q1(t,l,e){const n=t.slice();return n[13]=l[e],n[14]=l,n[15]=e,n}function Y1(t){let l,e=t[5]("auth.helpText")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&32&&e!==(e=r[5]("auth.helpText")+"")&&k(n,e)},d(r){r&&P(l)}}}function Z1(t){let l,e,n,r,i=t[5]("auth.tokens")+"",u,c,f=t[3].length+"",d,p,m,g,b,v,w,C,E,y,T=t[5]("auth.expressionSupport")+"",S,q,D,H,I,R,L,A,N=t[5]("auth.addToken")+"",Z,Y,x,F,K,M,B,U=t[5]("auth.securityNotice")+"",O,J,ie,ue=ut(t[3]),ne=[];for(let $=0;$<ue.length;$+=1)ne[$]=X1(Q1(t,ue,$));return{c(){l=a("div"),e=a("input"),n=h(),r=a("div"),u=_(i),c=_(" ("),d=_(f),p=_(")"),m=h(),g=a("div"),b=a("div"),v=ae("svg"),w=ae("path"),C=h(),E=a("div"),y=a("div"),S=_(T),q=h(),D=a("div"),H=a("code"),H.textContent="{{ env.API_TOKEN }}",I=h();for(let $=0;$<ne.length;$+=1)ne[$].c();R=h(),L=a("button"),A=_("+ "),Z=_(N),Y=h(),x=a("div"),F=ae("svg"),K=ae("path"),M=h(),B=a("div"),O=_(U),o(e,"type","checkbox"),e.checked=!0,o(r,"class","collapse-title text-sm font-medium"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(v,"xmlns","http://www.w3.org/2000/svg"),o(v,"fill","none"),o(v,"viewBox","0 0 24 24"),o(v,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),o(H,"class","text-xs bg-base-300 px-1 rounded"),o(D,"class","mt-1"),o(b,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),o(L,"type","button"),o(L,"class","btn btn-sm btn-ghost"),o(g,"class","collapse-content space-y-2"),o(l,"class","collapse collapse-arrow bg-base-200 collapse-open"),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"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"),o(F,"xmlns","http://www.w3.org/2000/svg"),o(F,"fill","none"),o(F,"viewBox","0 0 24 24"),o(F,"class","stroke-current shrink-0 w-4 h-4"),o(x,"class","alert alert-warning shadow-sm text-xs")},m($,te){j($,l,te),s(l,e),s(l,n),s(l,r),s(r,u),s(r,c),s(r,d),s(r,p),s(l,m),s(l,g),s(g,b),s(b,v),s(v,w),s(b,C),s(b,E),s(E,y),s(y,S),s(E,q),s(E,D),s(D,H),s(g,I);for(let re=0;re<ne.length;re+=1)ne[re]&&ne[re].m(g,null);s(g,R),s(g,L),s(L,A),s(L,Z),j($,Y,te),j($,x,te),s(x,F),s(F,K),s(x,M),s(x,B),s(B,O),J||(ie=V(L,"click",t[6]),J=!0)},p($,te){if(te&32&&i!==(i=$[5]("auth.tokens")+"")&&k(u,i),te&8&&f!==(f=$[3].length+"")&&k(d,f),te&32&&T!==(T=$[5]("auth.expressionSupport")+"")&&k(S,T),te&168){ue=ut($[3]);let re;for(re=0;re<ue.length;re+=1){const ee=Q1($,ue,re);ne[re]?ne[re].p(ee,te):(ne[re]=X1(ee),ne[re].c(),ne[re].m(g,R))}for(;re<ne.length;re+=1)ne[re].d(1);ne.length=ue.length}te&32&&N!==(N=$[5]("auth.addToken")+"")&&k(Z,N),te&32&&U!==(U=$[5]("auth.securityNotice")+"")&&k(O,U)},d($){$&&(P(l),P(Y),P(x)),Gt(ne,$),J=!1,ie()}}}function X1(t){let l,e,n,r,i,u,c;function f(){t[11].call(e,t[15])}function d(){return t[12](t[15])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("button"),i.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[5]("auth.tokenPlaceholder")),o(e,"class","input input-bordered input-sm flex-1 font-mono text-xs"),o(i,"type","button"),o(i,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(p,m){j(p,l,m),s(l,e),Q(e,t[3][t[15]]),s(l,r),s(l,i),u||(c=[V(e,"input",f),V(i,"click",d)],u=!0)},p(p,m){t=p,m&32&&n!==(n=t[5]("auth.tokenPlaceholder"))&&o(e,"placeholder",n),m&8&&e.value!==t[3][t[15]]&&Q(e,t[3][t[15]])},d(p){p&&P(l),u=!1,bt(c)}}}function nm(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=t[5]("auth.enableAuth")+"",v,w,C,E,y=t[1]&&Y1(t),T=t[2]&&Z1(t);return{c(){l=a("div"),e=a("div"),n=a("span"),r=_(t[0]),i=h(),y&&y.c(),u=h(),c=a("div"),f=a("div"),d=a("label"),p=a("input"),m=h(),g=a("span"),v=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(l,"class","form-control w-full")},m(S,q){j(S,l,q),s(l,e),s(e,n),s(n,r),s(e,i),y&&y.m(e,null),s(l,u),s(l,c),s(c,f),s(f,d),s(d,p),p.checked=t[2],s(d,m),s(d,g),s(g,v),s(c,w),T&&T.m(c,null),C||(E=[V(p,"change",t[9]),V(p,"change",t[10])],C=!0)},p(S,[q]){q&1&&k(r,S[0]),S[1]?y?y.p(S,q):(y=Y1(S),y.c(),y.m(e,null)):y&&(y.d(1),y=null),q&4&&(p.checked=S[2]),q&32&&b!==(b=S[5]("auth.enableAuth")+"")&&k(v,b),S[2]?T?T.p(S,q):(T=Z1(S),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:tt,o:tt,d(S){S&&P(l),y&&y.d(),T&&T.d(),C=!1,bt(E)}}}function rm(t,l,e){let n;Dt(t,Rt,C=>e(5,n=C));let{value:r=void 0}=l,{label:i="Authentication"}=l,{showHelp:u=!0}=l,c=!1,f=[],d=!1;function p(){e(3,f=[...f,""]),e(4,d=!0)}function m(C){e(3,f=f.filter((E,y)=>y!==C))}function g(){c=this.checked,e(2,c),e(4,d),e(8,r),e(3,f)}const b=()=>{c&&f.length===0&&e(3,f=[""]),e(4,d=!0)};function v(C){f[C]=this.value,e(3,f),e(4,d),e(8,r),e(2,c)}const w=C=>m(C);return t.$$set=C=>{"value"in C&&e(8,r=C.value),"label"in C&&e(0,i=C.label),"showHelp"in C&&e(1,u=C.showHelp)},t.$$.update=()=>{if(t.$$.dirty&284)if(!d&&r&&(e(2,c=r.enabled||!1),e(3,f=r.tokens?[...r.tokens]:[]),e(4,d=!0)),c){const C=f.filter(E=>E.trim()!=="");r?(e(8,r.enabled=!0,r),e(8,r.tokens=C,r)):e(8,r={enabled:!0,tokens:C})}else r&&(e(8,r.enabled=!1,r),e(8,r.tokens=[],r))},[i,u,c,f,d,n,p,m,r,g,b,v,w]}class Z0 extends Vt{constructor(l){super(),Ut(this,l,rm,nm,At,{value:8,label:0,showHelp:1})}}async function am(t={}){const l=new URLSearchParams;return Object.entries(t).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(r=>l.append(e,String(r))):l.append(e,String(n)))}),Cl.get(`/logs?${l.toString()}`)}async function im(t={},l="json"){const e=new URLSearchParams;Object.entries(t).forEach(([r,i])=>{i!=null&&e.append(r,String(i))}),e.append("format",l);const n=await fetch(`/__ui/api/logs/export?${e.toString()}`);if(!n.ok)throw new Error("Failed to export logs");return n.blob()}async function xu(t){return(await Cl.get(`/logs/body/${t}`)).content}async function $u(t){return Cl.get(`/logs/headers/${t}`)}async function um(){return Cl.get("/logs/cleanup/config")}async function fm(){return Cl.post("/logs/cleanup")}function x1(t){let l,e;return{c(){l=a("h3"),e=_(t[1]),o(l,"class","text-lg font-semibold")},m(n,r){j(n,l,r),s(l,e)},p(n,r){r&2&&k(e,n[1])},d(n){n&&P(l)}}}function $1(t){let l,e,n,r,i=t[6]("logging.maxSize")+"",u,c,f,d,p,m,g,b,v,w=t[6]("logging.maxSizeHelp")+"",C,E,y,T,S,q=t[6]("logging.retentionDays")+"",D,H,I,R,L,A,N=t[6]("logging.days")+"",Z,Y,x,F,K=t[6]("logging.retentionDaysHelp")+"",M,B,U;return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("div"),d=a("input"),p=h(),m=a("span"),m.textContent="KB",g=h(),b=a("div"),v=a("span"),C=_(w),E=h(),y=a("div"),T=a("label"),S=a("span"),D=_(q),H=h(),I=a("div"),R=a("input"),L=h(),A=a("span"),Z=_(N),Y=h(),x=a("div"),F=a("span"),M=_(K),o(r,"class","label-text"),o(n,"class","label"),o(n,"for","logging-max-size"),o(d,"id","logging-max-size"),o(d,"type","number"),o(d,"class","input input-bordered flex-1"),o(d,"min","1024"),o(d,"max","102400"),o(d,"step","1024"),o(m,"class","text-sm text-gray-500"),o(f,"class","flex gap-2 items-center"),o(v,"class","label-text-alt"),o(b,"class","label"),o(e,"class","form-control"),o(S,"class","label-text"),o(T,"class","label"),o(T,"for","logging-retention-days"),o(R,"id","logging-retention-days"),o(R,"type","number"),o(R,"class","input input-bordered flex-1"),o(R,"min","1"),o(R,"max","30"),o(A,"class","text-sm text-gray-500"),o(I,"class","flex gap-2 items-center"),o(F,"class","label-text-alt"),o(x,"class","label"),o(y,"class","form-control"),o(l,"class","ml-8 space-y-4")},m(O,J){j(O,l,J),s(l,e),s(e,n),s(n,r),s(r,u),s(e,c),s(e,f),s(f,d),Q(d,t[0].body.maxSize),s(f,p),s(f,m),s(e,g),s(e,b),s(b,v),s(v,C),s(l,E),s(l,y),s(y,T),s(T,S),s(S,D),s(y,H),s(y,I),s(I,R),Q(R,t[0].body.retentionDays),s(I,L),s(I,A),s(A,Z),s(y,Y),s(y,x),s(x,F),s(F,M),B||(U=[V(d,"input",t[10]),V(d,"input",t[7]),V(R,"input",t[11]),V(R,"input",t[7])],B=!0)},p(O,J){J&64&&i!==(i=O[6]("logging.maxSize")+"")&&k(u,i),J&1&&St(d.value)!==O[0].body.maxSize&&Q(d,O[0].body.maxSize),J&64&&w!==(w=O[6]("logging.maxSizeHelp")+"")&&k(C,w),J&64&&q!==(q=O[6]("logging.retentionDays")+"")&&k(D,q),J&1&&St(R.value)!==O[0].body.retentionDays&&Q(R,O[0].body.retentionDays),J&64&&N!==(N=O[6]("logging.days")+"")&&k(Z,N),J&64&&K!==(K=O[6]("logging.retentionDaysHelp")+"")&&k(M,K)},d(O){O&&P(l),B=!1,bt(U)}}}function cm(t){let l,e,n,r=t[6]("logging.cleanupStatus")+"",i,u,c,f=(t[2].isActive?t[6]("logging.active"):t[6]("logging.inactive"))+"",d,p,m,g,b,v=t[6]("logging.cleanupRetention")+"",w,C,E,y=t[2].retentionDays+"",T,S,q=t[6]("logging.days")+"",D,H,I,R,L=t[6]("logging.cleanupInterval")+"",A,N,Z,Y=t[2].scheduleIntervalHours+"",x,F,K=t[6]("logging.hours")+"",M,B,U,O,J=t[6]("logging.manualCleanup")+"",ie,ue,ne,$,te;function re(oe,ge){return oe[4]?hm:pm}let ee=re(t),G=ee(t),pe=t[5]&&ec(t);return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("span"),d=_(f),m=h(),g=a("div"),b=a("span"),w=_(v),C=h(),E=a("span"),T=_(y),S=h(),D=_(q),H=h(),I=a("div"),R=a("span"),A=_(L),N=h(),Z=a("span"),x=_(Y),F=h(),M=_(K),B=h(),U=a("button"),G.c(),O=h(),ie=_(J),ue=h(),pe&&pe.c(),ne=Ul(),o(n,"class","text-gray-500"),o(c,"class",p="font-semibold "+(t[2].isActive?"text-success":"text-error")),o(e,"class","flex justify-between text-sm"),o(b,"class","text-gray-500"),o(E,"class","font-semibold"),o(g,"class","flex justify-between text-sm"),o(R,"class","text-gray-500"),o(Z,"class","font-semibold"),o(I,"class","flex justify-between text-sm"),o(l,"class","bg-base-200 p-4 rounded-lg space-y-2"),o(U,"class","btn btn-outline btn-sm w-full"),U.disabled=t[4]},m(oe,ge){j(oe,l,ge),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,m),s(l,g),s(g,b),s(b,w),s(g,C),s(g,E),s(E,T),s(E,S),s(E,D),s(l,H),s(l,I),s(I,R),s(R,A),s(I,N),s(I,Z),s(Z,x),s(Z,F),s(Z,M),j(oe,B,ge),j(oe,U,ge),G.m(U,null),s(U,O),s(U,ie),j(oe,ue,ge),pe&&pe.m(oe,ge),j(oe,ne,ge),$||(te=V(U,"click",t[8]),$=!0)},p(oe,ge){ge&64&&r!==(r=oe[6]("logging.cleanupStatus")+"")&&k(i,r),ge&68&&f!==(f=(oe[2].isActive?oe[6]("logging.active"):oe[6]("logging.inactive"))+"")&&k(d,f),ge&4&&p!==(p="font-semibold "+(oe[2].isActive?"text-success":"text-error"))&&o(c,"class",p),ge&64&&v!==(v=oe[6]("logging.cleanupRetention")+"")&&k(w,v),ge&4&&y!==(y=oe[2].retentionDays+"")&&k(T,y),ge&64&&q!==(q=oe[6]("logging.days")+"")&&k(D,q),ge&64&&L!==(L=oe[6]("logging.cleanupInterval")+"")&&k(A,L),ge&4&&Y!==(Y=oe[2].scheduleIntervalHours+"")&&k(x,Y),ge&64&&K!==(K=oe[6]("logging.hours")+"")&&k(M,K),ee!==(ee=re(oe))&&(G.d(1),G=ee(oe),G&&(G.c(),G.m(U,O))),ge&64&&J!==(J=oe[6]("logging.manualCleanup")+"")&&k(ie,J),ge&16&&(U.disabled=oe[4]),oe[5]?pe?pe.p(oe,ge):(pe=ec(oe),pe.c(),pe.m(ne.parentNode,ne)):pe&&(pe.d(1),pe=null)},d(oe){oe&&(P(l),P(B),P(U),P(ue),P(ne)),G.d(),pe&&pe.d(oe),$=!1,te()}}}function dm(t){let l,e,n,r,i=t[6]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&64&&i!==(i=c[6]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function pm(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function hm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function ec(t){let l,e,n,r,i,u,c=t[6]("logging.lastCleanup")+"",f,d,p,m,g=t[6]("logging.deletedSqliteRecords")+"",b,v,w=t[5].deletedSqliteRecords+"",C,E,y,T=t[6]("logging.deletedFileLogFiles")+"",S,q,D=t[5].deletedFileLogFiles+"",H,I,R,L=t[6]("logging.deletedBodyFiles")+"",A,N,Z=t[5].deletedBodyDirs+"",Y,x,F=t[6]("logging.dirs")+"",K,M,B=t[5].deletedBodyFiles+"",U,O,J=t[6]("logging.files")+"",ie,ue,ne,$=t[6]("logging.duration")+"",te,re,ee=t[5].durationMs+"",G,pe;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("div"),u=a("div"),f=_(c),d=h(),p=a("div"),m=a("div"),b=_(g),v=_(": "),C=_(w),E=h(),y=a("div"),S=_(T),q=_(": "),H=_(D),I=h(),R=a("div"),A=_(L),N=_(": "),Y=_(Z),x=h(),K=_(F),M=_(", "),U=_(B),O=h(),ie=_(J),ue=h(),ne=a("div"),te=_($),re=_(": "),G=_(ee),pe=_("ms"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-semibold"),o(p,"class","mt-1 space-y-1"),o(i,"class","text-sm"),o(l,"class","alert alert-success")},m(oe,ge){j(oe,l,ge),s(l,e),s(e,n),s(l,r),s(l,i),s(i,u),s(u,f),s(i,d),s(i,p),s(p,m),s(m,b),s(m,v),s(m,C),s(p,E),s(p,y),s(y,S),s(y,q),s(y,H),s(p,I),s(p,R),s(R,A),s(R,N),s(R,Y),s(R,x),s(R,K),s(R,M),s(R,U),s(R,O),s(R,ie),s(p,ue),s(p,ne),s(ne,te),s(ne,re),s(ne,G),s(ne,pe)},p(oe,ge){ge&64&&c!==(c=oe[6]("logging.lastCleanup")+"")&&k(f,c),ge&64&&g!==(g=oe[6]("logging.deletedSqliteRecords")+"")&&k(b,g),ge&32&&w!==(w=oe[5].deletedSqliteRecords+"")&&k(C,w),ge&64&&T!==(T=oe[6]("logging.deletedFileLogFiles")+"")&&k(S,T),ge&32&&D!==(D=oe[5].deletedFileLogFiles+"")&&k(H,D),ge&64&&L!==(L=oe[6]("logging.deletedBodyFiles")+"")&&k(A,L),ge&32&&Z!==(Z=oe[5].deletedBodyDirs+"")&&k(Y,Z),ge&64&&F!==(F=oe[6]("logging.dirs")+"")&&k(K,F),ge&32&&B!==(B=oe[5].deletedBodyFiles+"")&&k(U,B),ge&64&&J!==(J=oe[6]("logging.files")+"")&&k(ie,J),ge&64&&$!==($=oe[6]("logging.duration")+"")&&k(te,$),ge&32&&ee!==(ee=oe[5].durationMs+"")&&k(G,ee)},d(oe){oe&&P(l)}}}function mm(t){let l,e,n,r,i,u,c,f,d=t[6]("logging.bodyRecording")+"",p,m,g,b=t[6]("logging.bodyRecordingHelp")+"",v,w,C,E,y,T,S=t[6]("logging.cleanupConfig")+"",q,D,H,I,R=t[1]&&x1(t),L=t[0].body.enabled&&$1(t);function A(Y,x){if(Y[3])return dm;if(Y[2])return cm}let N=A(t),Z=N&&N(t);return{c(){l=a("div"),R&&R.c(),e=h(),n=a("div"),r=a("label"),i=a("input"),u=h(),c=a("div"),f=a("span"),p=_(d),m=h(),g=a("p"),v=_(b),w=h(),L&&L.c(),C=h(),E=a("div"),y=h(),T=a("h4"),q=_(S),D=h(),Z&&Z.c(),o(i,"type","checkbox"),o(i,"class","checkbox"),o(f,"class","label-text font-semibold"),o(g,"class","text-xs text-gray-500 mt-1"),o(c,"class","flex-1"),o(r,"class","label cursor-pointer justify-start gap-4"),o(n,"class","form-control"),o(E,"class","divider"),o(T,"class","font-semibold"),o(l,"class","space-y-4")},m(Y,x){j(Y,l,x),R&&R.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),i.checked=t[0].body.enabled,s(r,u),s(r,c),s(c,f),s(f,p),s(c,m),s(c,g),s(g,v),s(l,w),L&&L.m(l,null),s(l,C),s(l,E),s(l,y),s(l,T),s(T,q),s(l,D),Z&&Z.m(l,null),H||(I=[V(i,"change",t[9]),V(i,"change",t[7])],H=!0)},p(Y,[x]){Y[1]?R?R.p(Y,x):(R=x1(Y),R.c(),R.m(l,e)):R&&(R.d(1),R=null),x&1&&(i.checked=Y[0].body.enabled),x&64&&d!==(d=Y[6]("logging.bodyRecording")+"")&&k(p,d),x&64&&b!==(b=Y[6]("logging.bodyRecordingHelp")+"")&&k(v,b),Y[0].body.enabled?L?L.p(Y,x):(L=$1(Y),L.c(),L.m(l,C)):L&&(L.d(1),L=null),x&64&&S!==(S=Y[6]("logging.cleanupConfig")+"")&&k(q,S),N===(N=A(Y))&&Z?Z.p(Y,x):(Z&&Z.d(1),Z=N&&N(Y),Z&&(Z.c(),Z.m(l,null)))},i:tt,o:tt,d(Y){Y&&P(l),R&&R.d(),L&&L.d(),Z&&Z.d(),H=!1,bt(I)}}}function gm(t,l,e){let n;Dt(t,Rt,E=>e(6,n=E));let{value:r=null}=l,{label:i=""}=l;const u=Cr();let c=null,f=!1,d=!1,p=null;function m(){u("input")}async function g(){e(3,f=!0);try{e(2,c=await um())}catch(E){console.error("Failed to load cleanup config:",E),Lt.show(n("common.error")+": "+(E instanceof Error?E.message:"Unknown error"),"error")}finally{e(3,f=!1)}}async function b(){if(confirm(n("logging.confirmCleanup"))){e(4,d=!0);try{e(5,p=await fm()),Lt.show(n("logging.cleanupSuccess"),"success"),await g()}catch(E){console.error("Failed to trigger cleanup:",E),Lt.show(n("logging.cleanupFailed",{values:{error:E instanceof Error?E.message:"Unknown error"}}),"error")}finally{e(4,d=!1)}}}Hs(()=>{g()});function v(){r.body.enabled=this.checked,e(0,r)}function w(){r.body.maxSize=St(this.value),e(0,r)}function C(){r.body.retentionDays=St(this.value),e(0,r)}return t.$$set=E=>{"value"in E&&e(0,r=E.value),"label"in E&&e(1,i=E.label)},t.$$.update=()=>{t.$$.dirty&1&&(r||e(0,r={body:{enabled:!1,maxSize:5120,retentionDays:1}})),t.$$.dirty&1&&r&&!r.body&&e(0,r.body={enabled:!1,maxSize:5120,retentionDays:1},r)},[r,i,c,f,d,p,n,m,b,v,w,C]}class _m extends Vt{constructor(l){super(),Ut(this,l,gm,mm,At,{value:0,label:1})}}function bm(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function vm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function km(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function wm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function ym(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function Cm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Em(t){let l,e,n,r,i,u=t[11]("configuration.formEditor")+"",c,f,d,p,m,g,b=t[11]("configuration.jsonEditor")+"",v,w,C,E,y,T,S,q,D;const H=[Rm,Sm],I=[];function R(L,A){return L[7]==="form"?0:1}return C=R(t),E=I[C]=H[C](t),S=uf(t[20][0]),{c(){l=a("div"),e=a("label"),n=a("input"),r=h(),i=a("span"),c=_(u),f=h(),d=a("label"),p=a("input"),m=h(),g=a("span"),v=_(b),w=h(),E.c(),y=Ul(),o(n,"class","sr-only"),o(n,"type","radio"),o(n,"name","editMode"),n.__value="form",Q(n,n.__value),o(i,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(i,"bg-primary",t[7]==="form"),le(i,"text-primary-content",t[7]==="form"),le(i,"shadow",t[7]==="form"),le(i,"text-gray-700",t[7]!=="form"),le(i,"dark:text-gray-300",t[7]!=="form"),le(i,"hover:text-gray-900",t[7]!=="form"),le(i,"dark:hover:text-gray-100",t[7]!=="form"),o(e,"class","cursor-pointer"),o(p,"class","sr-only"),o(p,"type","radio"),o(p,"name","editMode"),p.__value="json",Q(p,p.__value),o(g,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(g,"bg-primary",t[7]==="json"),le(g,"text-primary-content",t[7]==="json"),le(g,"shadow",t[7]==="json"),le(g,"text-gray-700",t[7]!=="json"),le(g,"dark:text-gray-300",t[7]!=="json"),le(g,"hover:text-gray-900",t[7]!=="json"),le(g,"dark:hover:text-gray-100",t[7]!=="json"),o(d,"class","cursor-pointer"),o(l,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm mb-4"),S.p(n,p)},m(L,A){j(L,l,A),s(l,e),s(e,n),n.checked=n.__value===t[7],s(e,r),s(e,i),s(i,c),s(l,f),s(l,d),s(d,p),p.checked=p.__value===t[7],s(d,m),s(d,g),s(g,v),j(L,w,A),I[C].m(L,A),j(L,y,A),T=!0,q||(D=[V(n,"change",t[19]),V(p,"change",t[21])],q=!0)},p(L,A){A[0]&128&&(n.checked=n.__value===L[7]),(!T||A[0]&2048)&&u!==(u=L[11]("configuration.formEditor")+"")&&k(c,u),(!T||A[0]&128)&&le(i,"bg-primary",L[7]==="form"),(!T||A[0]&128)&&le(i,"text-primary-content",L[7]==="form"),(!T||A[0]&128)&&le(i,"shadow",L[7]==="form"),(!T||A[0]&128)&&le(i,"text-gray-700",L[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:text-gray-300",L[7]!=="form"),(!T||A[0]&128)&&le(i,"hover:text-gray-900",L[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:hover:text-gray-100",L[7]!=="form"),A[0]&128&&(p.checked=p.__value===L[7]),(!T||A[0]&2048)&&b!==(b=L[11]("configuration.jsonEditor")+"")&&k(v,b),(!T||A[0]&128)&&le(g,"bg-primary",L[7]==="json"),(!T||A[0]&128)&&le(g,"text-primary-content",L[7]==="json"),(!T||A[0]&128)&&le(g,"shadow",L[7]==="json"),(!T||A[0]&128)&&le(g,"text-gray-700",L[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:text-gray-300",L[7]!=="json"),(!T||A[0]&128)&&le(g,"hover:text-gray-900",L[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:hover:text-gray-100",L[7]!=="json");let N=C;C=R(L),C===N?I[C].p(L,A):(Gl(),st(I[N],1,1,()=>{I[N]=null}),Kl(),E=I[C],E?E.p(L,A):(E=I[C]=H[C](L),E.c()),et(E,1),E.m(y.parentNode,y))},i(L){T||(et(E),T=!0)},o(L){st(E),T=!1},d(L){L&&(P(l),P(w),P(y)),I[C].d(L),S.r(),q=!1,bt(D)}}}function Tm(t){let l,e,n,r,i,u=t[11]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[2]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m[0]&2048&&u!==(u=p[11]("common.error")+"")&&k(c,u),m[0]&4&&k(d,p[2])},i:tt,o:tt,d(p){p&&P(l)}}}function Mm(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function Sm(t){let l,e,n,r=t[11]("configuration.jsonConfiguration")+"",i,u,c,f,d,p,m,g=t[11]("configuration.jsonHelp")+"",b,v,w,C=t[9]&&tc(t);return{c(){l=a("div"),e=a("div"),n=a("h2"),i=_(r),u=h(),C&&C.c(),c=h(),f=a("textarea"),p=h(),m=a("p"),b=_(g),o(n,"class","card-title"),o(f,"class","textarea textarea-bordered font-mono text-sm h-96"),o(f,"placeholder",d=t[11]("configuration.jsonPlaceholder")),o(m,"class","text-sm text-gray-500 mt-2"),o(e,"class","card-body"),o(l,"class","card bg-base-100 shadow-xl")},m(E,y){j(E,l,y),s(l,e),s(e,n),s(n,i),s(e,u),C&&C.m(e,null),s(e,c),s(e,f),Q(f,t[8]),s(e,p),s(e,m),s(m,b),v||(w=[V(f,"input",t[28]),V(f,"input",t[12])],v=!0)},p(E,y){y[0]&2048&&r!==(r=E[11]("configuration.jsonConfiguration")+"")&&k(i,r),E[9]?C?C.p(E,y):(C=tc(E),C.c(),C.m(e,c)):C&&(C.d(1),C=null),y[0]&2048&&d!==(d=E[11]("configuration.jsonPlaceholder"))&&o(f,"placeholder",d),y[0]&256&&Q(f,E[8]),y[0]&2048&&g!==(g=E[11]("configuration.jsonHelp")+"")&&k(b,g)},i:tt,o:tt,d(E){E&&P(l),C&&C.d(),v=!1,bt(w)}}}function Rm(t){let l,e,n,r=t[11]("configuration.systemSettings")+"",i,u,c,f,d,p=t[11]("configuration.serverPort")+"",m,g,b,v,w,C,E,y=t[11]("configuration.workerProcesses")+"",T,S,q,D,H,I,R=t[11]("configuration.workerProcessesHelp")+"",L,A,N,Z,Y,x=t[11]("configuration.logLevel")+"",F,K,M,B,U,O,J,ie,ue,ne,$,te=t[11]("configuration.bodyParserLimit")+"",re,ee,G,pe,oe,ge,he=t[11]("configuration.bodyParserLimitHelp")+"",ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e,Be,De,se,ke=t[11]("configuration.requiresRestart")+"",me,Ee,Ve,Ie,nt,Ne=t[11]("logging.title")+"",Ye,Qe,ve,de,Te,Ze,Se,Ue,Ce=t[11]("routes.title")+"",mt,Ge,ce,qe,Re,dt,We,z=t[11]("configuration.routesConfigured",{values:{count:t[1].routes.length}})+"",He,X,ft=t[11]("configuration.manageRoutes")+"",Ht,Ke,_t,lt;function it(at){t[26](at)}let ze={label:t[11]("auth.globalAuth")};t[1].auth!==void 0&&(ze.value=t[1].auth),Oe=new Z0({props:ze}),bl.push(()=>Rl(Oe,"value",it));function Xe(at){t[27](at)}let Bt={};return t[1].logging!==void 0&&(Bt.value=t[1].logging),ve=new _m({props:Bt}),bl.push(()=>Rl(ve,"value",Xe)),{c(){l=a("div"),e=a("div"),n=a("h2"),i=_(r),u=h(),c=a("div"),f=a("label"),d=a("span"),m=_(p),g=h(),b=a("input"),v=h(),w=a("div"),C=a("label"),E=a("span"),T=_(y),S=h(),q=a("input"),D=h(),H=a("div"),I=a("span"),L=_(R),A=h(),N=a("div"),Z=a("label"),Y=a("span"),F=_(x),K=h(),M=a("select"),B=a("option"),B.textContent="Debug",U=a("option"),U.textContent="Info",O=a("option"),O.textContent="Warning",J=a("option"),J.textContent="Error",ie=h(),ue=a("div"),ne=a("label"),$=a("span"),re=_(te),ee=h(),G=a("input"),pe=h(),oe=a("div"),ge=a("span"),ye=_(he),Fe=h(),je=a("div"),we=h(),Et(Oe.$$.fragment),Le=h(),Pe=a("div"),Me=h(),fe=a("div"),_e=ae("svg"),Be=ae("path"),De=h(),se=a("span"),me=_(ke),Ee=h(),Ve=a("div"),Ie=a("div"),nt=a("h2"),Ye=_(Ne),Qe=h(),Et(ve.$$.fragment),Te=h(),Ze=a("div"),Se=a("div"),Ue=a("h2"),mt=_(Ce),Ge=h(),ce=a("div"),qe=ae("svg"),Re=ae("path"),dt=h(),We=a("span"),He=_(z),X=h(),Ht=_(ft),o(n,"class","card-title"),o(d,"class","label-text"),o(f,"class","label"),o(f,"for","config-port"),o(b,"id","config-port"),o(b,"type","number"),o(b,"class","input input-bordered"),o(b,"placeholder","8088"),o(c,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","config-workers"),o(q,"id","config-workers"),o(q,"type","number"),o(q,"class","input input-bordered"),o(q,"min","1"),o(q,"placeholder","2"),o(I,"class","label-text-alt"),o(H,"class","label"),o(w,"class","form-control"),o(Y,"class","label-text"),o(Z,"class","label"),o(Z,"for","config-log-level"),B.__value="debug",Q(B,B.__value),U.__value="info",Q(U,U.__value),O.__value="warn",Q(O,O.__value),J.__value="error",Q(J,J.__value),o(M,"id","config-log-level"),o(M,"class","select select-bordered"),t[1].logLevel===void 0&&tl(()=>t[24].call(M)),o(N,"class","form-control"),o($,"class","label-text"),o(ne,"class","label"),o(ne,"for","config-body-limit"),o(G,"id","config-body-limit"),o(G,"type","text"),o(G,"class","input input-bordered"),o(G,"placeholder","50mb"),o(ge,"class","label-text-alt"),o(oe,"class","label"),o(ue,"class","form-control"),o(je,"class","divider"),o(Pe,"class","divider"),o(Be,"stroke-linecap","round"),o(Be,"stroke-linejoin","round"),o(Be,"stroke-width","2"),o(Be,"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"),o(_e,"xmlns","http://www.w3.org/2000/svg"),o(_e,"class","stroke-current shrink-0 h-6 w-6"),o(_e,"fill","none"),o(_e,"viewBox","0 0 24 24"),o(fe,"class","alert alert-warning"),o(e,"class","card-body"),o(l,"class","card bg-base-100 shadow-xl mb-4"),o(nt,"class","card-title"),o(Ie,"class","card-body"),o(Ve,"class","card bg-base-100 shadow-xl mb-4"),o(Ue,"class","card-title"),o(Re,"stroke-linecap","round"),o(Re,"stroke-linejoin","round"),o(Re,"stroke-width","2"),o(Re,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(qe,"xmlns","http://www.w3.org/2000/svg"),o(qe,"fill","none"),o(qe,"viewBox","0 0 24 24"),o(qe,"class","stroke-current shrink-0 w-6 h-6"),o(ce,"class","alert alert-info"),o(Se,"class","card-body"),o(Ze,"class","card bg-base-100 shadow-xl")},m(at,gt){j(at,l,gt),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,m),s(c,g),s(c,b),Q(b,t[1].port),s(e,v),s(e,w),s(w,C),s(C,E),s(E,T),s(w,S),s(w,q),Q(q,t[1].workers),s(w,D),s(w,H),s(H,I),s(I,L),s(e,A),s(e,N),s(N,Z),s(Z,Y),s(Y,F),s(N,K),s(N,M),s(M,B),s(M,U),s(M,O),s(M,J),kt(M,t[1].logLevel,!0),s(e,ie),s(e,ue),s(ue,ne),s(ne,$),s($,re),s(ue,ee),s(ue,G),Q(G,t[1].bodyParserLimit),s(ue,pe),s(ue,oe),s(oe,ge),s(ge,ye),s(e,Fe),s(e,je),s(e,we),yt(Oe,e,null),s(e,Le),s(e,Pe),s(e,Me),s(e,fe),s(fe,_e),s(_e,Be),s(fe,De),s(fe,se),s(se,me),j(at,Ee,gt),j(at,Ve,gt),s(Ve,Ie),s(Ie,nt),s(nt,Ye),s(Ie,Qe),yt(ve,Ie,null),j(at,Te,gt),j(at,Ze,gt),s(Ze,Se),s(Se,Ue),s(Ue,mt),s(Se,Ge),s(Se,ce),s(ce,qe),s(qe,Re),s(ce,dt),s(ce,We),s(We,He),s(We,X),s(We,Ht),Ke=!0,_t||(lt=[V(b,"input",t[22]),V(q,"input",t[23]),V(M,"change",t[24]),V(G,"input",t[25])],_t=!0)},p(at,gt){(!Ke||gt[0]&2048)&&r!==(r=at[11]("configuration.systemSettings")+"")&&k(i,r),(!Ke||gt[0]&2048)&&p!==(p=at[11]("configuration.serverPort")+"")&&k(m,p),gt[0]&2&&St(b.value)!==at[1].port&&Q(b,at[1].port),(!Ke||gt[0]&2048)&&y!==(y=at[11]("configuration.workerProcesses")+"")&&k(T,y),gt[0]&2&&St(q.value)!==at[1].workers&&Q(q,at[1].workers),(!Ke||gt[0]&2048)&&R!==(R=at[11]("configuration.workerProcessesHelp")+"")&&k(L,R),(!Ke||gt[0]&2048)&&x!==(x=at[11]("configuration.logLevel")+"")&&k(F,x),gt[0]&2&&kt(M,at[1].logLevel),(!Ke||gt[0]&2048)&&te!==(te=at[11]("configuration.bodyParserLimit")+"")&&k(re,te),gt[0]&2&&G.value!==at[1].bodyParserLimit&&Q(G,at[1].bodyParserLimit),(!Ke||gt[0]&2048)&&he!==(he=at[11]("configuration.bodyParserLimitHelp")+"")&&k(ye,he);const wt={};gt[0]&2048&&(wt.label=at[11]("auth.globalAuth")),!Je&&gt[0]&2&&(Je=!0,wt.value=at[1].auth,Sl(()=>Je=!1)),Oe.$set(wt),(!Ke||gt[0]&2048)&&ke!==(ke=at[11]("configuration.requiresRestart")+"")&&k(me,ke),(!Ke||gt[0]&2048)&&Ne!==(Ne=at[11]("logging.title")+"")&&k(Ye,Ne);const pt={};!de&&gt[0]&2&&(de=!0,pt.value=at[1].logging,Sl(()=>de=!1)),ve.$set(pt),(!Ke||gt[0]&2048)&&Ce!==(Ce=at[11]("routes.title")+"")&&k(mt,Ce),(!Ke||gt[0]&2050)&&z!==(z=at[11]("configuration.routesConfigured",{values:{count:at[1].routes.length}})+"")&&k(He,z),(!Ke||gt[0]&2048)&&ft!==(ft=at[11]("configuration.manageRoutes")+"")&&k(Ht,ft)},i(at){Ke||(et(Oe.$$.fragment,at),et(ve.$$.fragment,at),Ke=!0)},o(at){st(Oe.$$.fragment,at),st(ve.$$.fragment,at),Ke=!1},d(at){at&&(P(l),P(Ee),P(Ve),P(Te),P(Ze)),Ct(Oe),Ct(ve),_t=!1,bt(lt)}}}function tc(t){let l,e,n,r,i,u=t[11]("configuration.jsonParseError",{values:{error:t[9]}})+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error mb-4")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d[0]&2560&&u!==(u=f[11]("configuration.jsonParseError",{values:{error:f[9]}})+"")&&k(c,u)},d(f){f&&P(l)}}}function qm(t){let l,e,n,r,i=t[11]("configuration.title")+"",u,c,f,d=t[11]("configuration.subtitle")+"",p,m,g,b,v,w,C,E=t[11]("configuration.export")+"",y,T,S,q,D,H,I,R=t[11]("configuration.import")+"",L,A,N,Z,Y=t[11]("configuration.save")+"",x,F,K,M,B,U=t[11]("configuration.reload")+"",O,J,ie,ue,ne,$=t[11]("configuration.restart")+"",te,re,ee,G,pe,oe,ge,he,ye,Fe,je,we=t[11]("configuration.confirmRestart")+"",Oe,Je,Le,Pe=t[11]("configuration.restartMessage")+"",Me,fe,_e,Be,De,se,ke,me=t[11]("configuration.restartWarning")+"",Ee,Ve,Ie,nt,Ne=t[11]("common.cancel")+"",Ye,Qe,ve,de,Te,Ze,Se=t[11]("configuration.restart")+"",Ue,Ce,mt,Ge;function ce(lt,it){return lt[6]?vm:bm}let qe=ce(t),Re=qe(t);function dt(lt,it){return lt[4]?wm:km}let We=dt(t),z=We(t);function He(lt,it){return lt[5]?Cm:ym}let X=He(t),ft=X(t);const Ht=[Mm,Tm,Em],Ke=[];function _t(lt,it){return lt[3]?0:lt[2]?1:lt[1]?2:-1}return~(G=_t(t))&&(pe=Ke[G]=Ht[G](t)),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h1"),u=_(i),c=h(),f=a("p"),p=_(d),m=h(),g=a("div"),b=a("button"),v=ae("svg"),w=ae("path"),C=h(),y=_(E),S=h(),q=a("button"),D=ae("svg"),H=ae("path"),I=h(),L=_(R),A=h(),N=a("button"),Re.c(),Z=h(),x=_(Y),K=h(),M=a("button"),z.c(),B=h(),O=_(U),ie=h(),ue=a("button"),ft.c(),ne=h(),te=_($),ee=h(),pe&&pe.c(),oe=h(),ge=a("input"),he=h(),ye=a("div"),Fe=a("div"),je=a("h3"),Oe=_(we),Je=h(),Le=a("p"),Me=_(Pe),fe=h(),_e=a("div"),Be=ae("svg"),De=ae("path"),se=h(),ke=a("span"),Ee=_(me),Ve=h(),Ie=a("div"),nt=a("button"),Ye=_(Ne),Qe=h(),ve=a("button"),de=ae("svg"),Te=ae("path"),Ze=h(),Ue=_(Se),o(r,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(v,"xmlns","http://www.w3.org/2000/svg"),o(v,"class","h-4 w-4"),o(v,"fill","none"),o(v,"viewBox","0 0 24 24"),o(v,"stroke","currentColor"),o(b,"class","btn btn-outline btn-sm"),b.disabled=T=t[3]||!t[0],o(H,"stroke-linecap","round"),o(H,"stroke-linejoin","round"),o(H,"stroke-width","2"),o(H,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-4 w-4"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(q,"class","btn btn-outline btn-sm"),q.disabled=t[3],o(N,"class","btn btn-success btn-sm"),N.disabled=F=t[6]||t[3]||!!t[9],o(M,"class","btn btn-primary btn-sm"),M.disabled=J=t[4]||t[3],o(ue,"class","btn btn-warning btn-sm"),ue.disabled=re=t[5]||t[3],o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(ge,"type","checkbox"),o(ge,"class","modal-toggle"),o(je,"class","font-bold text-lg"),o(Le,"class","py-4"),o(De,"stroke-linecap","round"),o(De,"stroke-linejoin","round"),o(De,"stroke-width","2"),o(De,"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"),o(Be,"xmlns","http://www.w3.org/2000/svg"),o(Be,"class","stroke-current shrink-0 h-6 w-6"),o(Be,"fill","none"),o(Be,"viewBox","0 0 24 24"),o(_e,"class","alert alert-warning"),o(nt,"class","btn btn-ghost"),o(Te,"stroke-linecap","round"),o(Te,"stroke-linejoin","round"),o(Te,"stroke-width","2"),o(Te,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(de,"xmlns","http://www.w3.org/2000/svg"),o(de,"class","h-4 w-4 mr-1"),o(de,"fill","none"),o(de,"viewBox","0 0 24 24"),o(de,"stroke","currentColor"),o(ve,"class","btn btn-warning"),o(Ie,"class","modal-action"),o(Fe,"class","modal-box"),o(ye,"class","modal"),le(ye,"modal-open",t[10]),o(l,"class","p-6")},m(lt,it){j(lt,l,it),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,p),s(e,m),s(e,g),s(g,b),s(b,v),s(v,w),s(b,C),s(b,y),s(g,S),s(g,q),s(q,D),s(D,H),s(q,I),s(q,L),s(g,A),s(g,N),Re.m(N,null),s(N,Z),s(N,x),s(g,K),s(g,M),z.m(M,null),s(M,B),s(M,O),s(g,ie),s(g,ue),ft.m(ue,null),s(ue,ne),s(ue,te),s(l,ee),~G&&Ke[G].m(l,null),s(l,oe),s(l,ge),ge.checked=t[10],s(l,he),s(l,ye),s(ye,Fe),s(Fe,je),s(je,Oe),s(Fe,Je),s(Fe,Le),s(Le,Me),s(Fe,fe),s(Fe,_e),s(_e,Be),s(Be,De),s(_e,se),s(_e,ke),s(ke,Ee),s(Fe,Ve),s(Fe,Ie),s(Ie,nt),s(nt,Ye),s(Ie,Qe),s(Ie,ve),s(ve,de),s(de,Te),s(ve,Ze),s(ve,Ue),Ce=!0,mt||(Ge=[V(b,"click",t[14]),V(q,"click",t[15]),V(N,"click",t[13]),V(M,"click",t[16]),V(ue,"click",t[18]),V(ge,"change",t[29]),V(nt,"click",t[30]),V(ve,"click",t[17])],mt=!0)},p(lt,it){(!Ce||it[0]&2048)&&i!==(i=lt[11]("configuration.title")+"")&&k(u,i),(!Ce||it[0]&2048)&&d!==(d=lt[11]("configuration.subtitle")+"")&&k(p,d),(!Ce||it[0]&2048)&&E!==(E=lt[11]("configuration.export")+"")&&k(y,E),(!Ce||it[0]&9&&T!==(T=lt[3]||!lt[0]))&&(b.disabled=T),(!Ce||it[0]&2048)&&R!==(R=lt[11]("configuration.import")+"")&&k(L,R),(!Ce||it[0]&8)&&(q.disabled=lt[3]),qe!==(qe=ce(lt))&&(Re.d(1),Re=qe(lt),Re&&(Re.c(),Re.m(N,Z))),(!Ce||it[0]&2048)&&Y!==(Y=lt[11]("configuration.save")+"")&&k(x,Y),(!Ce||it[0]&584&&F!==(F=lt[6]||lt[3]||!!lt[9]))&&(N.disabled=F),We!==(We=dt(lt))&&(z.d(1),z=We(lt),z&&(z.c(),z.m(M,B))),(!Ce||it[0]&2048)&&U!==(U=lt[11]("configuration.reload")+"")&&k(O,U),(!Ce||it[0]&24&&J!==(J=lt[4]||lt[3]))&&(M.disabled=J),X!==(X=He(lt))&&(ft.d(1),ft=X(lt),ft&&(ft.c(),ft.m(ue,ne))),(!Ce||it[0]&2048)&&$!==($=lt[11]("configuration.restart")+"")&&k(te,$),(!Ce||it[0]&40&&re!==(re=lt[5]||lt[3]))&&(ue.disabled=re);let ze=G;G=_t(lt),G===ze?~G&&Ke[G].p(lt,it):(pe&&(Gl(),st(Ke[ze],1,1,()=>{Ke[ze]=null}),Kl()),~G?(pe=Ke[G],pe?pe.p(lt,it):(pe=Ke[G]=Ht[G](lt),pe.c()),et(pe,1),pe.m(l,oe)):pe=null),it[0]&1024&&(ge.checked=lt[10]),(!Ce||it[0]&2048)&&we!==(we=lt[11]("configuration.confirmRestart")+"")&&k(Oe,we),(!Ce||it[0]&2048)&&Pe!==(Pe=lt[11]("configuration.restartMessage")+"")&&k(Me,Pe),(!Ce||it[0]&2048)&&me!==(me=lt[11]("configuration.restartWarning")+"")&&k(Ee,me),(!Ce||it[0]&2048)&&Ne!==(Ne=lt[11]("common.cancel")+"")&&k(Ye,Ne),(!Ce||it[0]&2048)&&Se!==(Se=lt[11]("configuration.restart")+"")&&k(Ue,Se),(!Ce||it[0]&1024)&&le(ye,"modal-open",lt[10])},i(lt){Ce||(et(pe),Ce=!0)},o(lt){st(pe),Ce=!1},d(lt){lt&&P(l),Re.d(),z.d(),ft.d(),~G&&Ke[G].d(),mt=!1,bt(Ge)}}}function Hm(t,l,e){let n;Dt(t,Rt,B=>e(11,n=B));let r=null,i=null,u=null,c=!0,f=!1,d=!1,p=!1,m="form",g="",b=null,v=!1;async function w(){try{e(0,r=await hf()),e(1,i=JSON.parse(JSON.stringify(r))),e(8,g=JSON.stringify(r,null,2)),e(2,u=null)}catch(B){e(2,u=B.message)}finally{e(3,c=!1)}}function C(){e(9,b=null);try{e(1,i=JSON.parse(g))}catch(B){e(9,b=B.message)}}async function E(){if(i){e(6,p=!0);try{const B=await wh(i);if(!B.valid){Lt.show(n("configuration.validationFailed",{values:{error:B.error}}),"error");return}const U=await kh(i);U.success?(Lt.show(n("configuration.saved"),"success"),e(0,r=JSON.parse(JSON.stringify(i)))):Lt.show(n("configuration.saveFailed",{values:{error:U.message}}),"error")}catch(B){Lt.show(n("configuration.saveFailed",{values:{error:B.message}}),"error")}finally{e(6,p=!1)}}}function y(){if(!r)return;const B=JSON.stringify(r,null,2),U="data:application/json;charset=utf-8,"+encodeURIComponent(B),O=`bungee-config-${new Date().toISOString().split("T")[0]}.json`,J=document.createElement("a");J.setAttribute("href",U),J.setAttribute("download",O),J.click(),Lt.show(n("configuration.exported"),"success")}function T(){const B=document.createElement("input");B.type="file",B.accept=".json",B.onchange=async U=>{const O=U.target.files[0];if(O)try{const J=await O.text(),ie=JSON.parse(J);e(1,i=ie),e(8,g=JSON.stringify(ie,null,2)),Lt.show(n("configuration.imported"),"success")}catch(J){Lt.show(n("configuration.importFailed",{values:{error:J.message}}),"error")}},B.click()}async function S(){e(4,f=!0);try{const B=await sm();B.success?(Lt.show(n("configuration.reloaded"),"success"),await w()):Lt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}catch(B){Lt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}finally{e(4,f=!1)}}async function q(){e(10,v=!1),e(5,d=!0);try{const B=await om();B.success?Lt.show(n("configuration.restartSent"),"success"):B.error&&B.error.includes("daemon mode")?Lt.show(n("configuration.restartDaemonOnly"),"error",8e3):Lt.show(n("configuration.restartFailed",{values:{error:B.error||B.message}}),"error")}catch(B){Lt.show(n("configuration.restartFailed",{values:{error:B.message}}),"error")}finally{e(5,d=!1)}}Hs(()=>{w()});const D=[[]],H=()=>e(10,v=!0);function I(){m=this.__value,e(7,m)}function R(){m=this.__value,e(7,m)}function L(){i.port=St(this.value),e(1,i)}function A(){i.workers=St(this.value),e(1,i)}function N(){i.logLevel=pl(this),e(1,i)}function Z(){i.bodyParserLimit=this.value,e(1,i)}function Y(B){t.$$.not_equal(i.auth,B)&&(i.auth=B,e(1,i))}function x(B){t.$$.not_equal(i.logging,B)&&(i.logging=B,e(1,i))}function F(){g=this.value,e(8,g)}function K(){v=this.checked,e(10,v)}return[r,i,u,c,f,d,p,m,g,b,v,n,C,E,y,T,S,q,H,I,D,R,L,A,N,Z,Y,x,F,K,()=>e(10,v=!1)]}class Pm extends Vt{constructor(l){super(),Ut(this,l,Hm,qm,At,{},null,[-1,-1])}}class Ro{static async list(){return await Cl.get("/routes")}static async get(l){return(await this.list()).find(n=>n.path===l)||null}static async create(l){const e=await Cl.get("/config");if(e.routes?.some(n=>n.path===l.path))throw new Error(`Route with path "${l.path}" already exists`);e.routes=e.routes||[],e.routes.push(l),await Cl.put("/config",e)}static async update(l,e){const n=await Cl.get("/config"),r=n.routes?.findIndex(i=>i.path===l);if(r===void 0||r===-1)throw new Error(`Route with path "${l}" not found`);if(l!==e.path&&n.routes?.some(i=>i.path===e.path))throw new Error(`Route with path "${e.path}" already exists`);n.routes[r]=e,await Cl.put("/config",n)}static async delete(l){const e=await Cl.get("/config"),n=e.routes?.findIndex(r=>r.path===l);if(n===void 0||n===-1)throw new Error(`Route with path "${l}" not found`);e.routes.splice(n,1),await Cl.put("/config",e)}static async validateRoute(l){const e={routes:[l]};return await Cl.post("/config/validate",e)}static async duplicate(l){const e=await this.get(l);if(!e)throw new Error(`Route with path "${l}" not found`);const n={...e};let r=1,i=`${l}-copy`;const u=await this.list();for(;u.some(c=>c.path===i);)r++,i=`${l}-copy-${r}`;n.path=i,await this.create(n)}}function lc(t,l,e){const n=t.slice();return n[6]=l[e],n}function sc(t){let l;return{c(){l=a("span"),l.textContent="RED",o(l,"class","text-xs text-error font-semibold")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function oc(t){let l,e,n,r,i,u,c=Ls(t[6])==="unhealthy",f,d,p,m=t[6].target+"",g,b,v,w=(t[6].weight||100)+"",C,E,y,T=(t[6].priority||1)+"",S,q,D=c&&sc();return{c(){l=a("tr"),e=a("td"),n=a("div"),r=a("div"),u=h(),D&&D.c(),f=h(),d=a("td"),p=a("code"),g=_(m),b=h(),v=a("td"),C=_(w),E=h(),y=a("td"),S=_(T),q=h(),o(r,"class","w-3 h-3 rounded-full tooltip tooltip-right"),o(r,"data-tip",i=t[6].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${nc(t[6].lastFailureTime)}`:Ls(t[6])==="healthy"?t[3]("upstreamsModal.statusHealthy"):Ls(t[6])==="unhealthy"?t[3]("upstreamsModal.statusUnhealthy"):t[3]("upstreamsModal.statusUnknown")),le(r,"bg-success",Ls(t[6])==="healthy"),le(r,"bg-error",Ls(t[6])==="unhealthy"),le(r,"bg-warning",Ls(t[6])==="unknown"),o(n,"class","flex items-center gap-2"),o(p,"class","text-sm"),o(v,"class","text-right"),o(y,"class","text-right"),o(l,"class","hover")},m(H,I){j(H,l,I),s(l,e),s(e,n),s(n,r),s(n,u),D&&D.m(n,null),s(l,f),s(l,d),s(d,p),s(p,g),s(l,b),s(l,v),s(v,C),s(l,E),s(l,y),s(y,S),s(l,q)},p(H,I){I&12&&i!==(i=H[6].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${nc(H[6].lastFailureTime)}`:Ls(H[6])==="healthy"?H[3]("upstreamsModal.statusHealthy"):Ls(H[6])==="unhealthy"?H[3]("upstreamsModal.statusUnhealthy"):H[3]("upstreamsModal.statusUnknown"))&&o(r,"data-tip",i),I&4&&le(r,"bg-success",Ls(H[6])==="healthy"),I&4&&le(r,"bg-error",Ls(H[6])==="unhealthy"),I&4&&le(r,"bg-warning",Ls(H[6])==="unknown"),I&4&&(c=Ls(H[6])==="unhealthy"),c?D||(D=sc(),D.c(),D.m(n,null)):D&&(D.d(1),D=null),I&4&&m!==(m=H[6].target+"")&&k(g,m),I&4&&w!==(w=(H[6].weight||100)+"")&&k(C,w),I&4&&T!==(T=(H[6].priority||1)+"")&&k(S,T)},d(H){H&&P(l),D&&D.d()}}}function jm(t){let l,e,n,r=t[3]("upstreamsModal.title")+"",i,u,c,f,d,p,m,g,b,v,w=t[3]("routeCard.tableHeaders.status")+"",C,E,y,T=t[3]("routeCard.tableHeaders.target")+"",S,q,D,H=t[3]("routeCard.tableHeaders.weight")+"",I,R,L,A=t[3]("routeCard.tableHeaders.priority")+"",N,Z,Y,x,F,K,M=t[3]("upstreamsModal.close")+"",B,U,O,J,ie,ue,ne=ut(t[2]),$=[];for(let te=0;te<ne.length;te+=1)$[te]=oc(lc(t,ne,te));return{c(){l=a("dialog"),e=a("div"),n=a("h3"),i=_(r),u=_(" - "),c=a("code"),f=_(t[1]),d=h(),p=a("div"),m=a("table"),g=a("thead"),b=a("tr"),v=a("th"),C=_(w),E=h(),y=a("th"),S=_(T),q=h(),D=a("th"),I=_(H),R=h(),L=a("th"),N=_(A),Z=h(),Y=a("tbody");for(let te=0;te<$.length;te+=1)$[te].c();x=h(),F=a("div"),K=a("button"),B=_(M),U=h(),O=a("form"),J=a("button"),J.textContent="close",o(c,"class","text-primary"),o(n,"class","font-bold text-lg mb-4"),o(v,"class","w-20"),o(D,"class","w-24 text-right"),o(L,"class","w-20 text-right"),o(m,"class","table table-zebra w-full"),o(p,"class","overflow-x-auto max-h-[60vh]"),o(K,"class","btn"),o(F,"class","modal-action"),o(e,"class","modal-box max-w-3xl"),o(O,"method","dialog"),o(O,"class","modal-backdrop"),o(l,"class","modal"),le(l,"modal-open",t[0])},m(te,re){j(te,l,re),s(l,e),s(e,n),s(n,i),s(n,u),s(n,c),s(c,f),s(e,d),s(e,p),s(p,m),s(m,g),s(g,b),s(b,v),s(v,C),s(b,E),s(b,y),s(y,S),s(b,q),s(b,D),s(D,I),s(b,R),s(b,L),s(L,N),s(m,Z),s(m,Y);for(let ee=0;ee<$.length;ee+=1)$[ee]&&$[ee].m(Y,null);s(e,x),s(e,F),s(F,K),s(K,B),s(l,U),s(l,O),s(O,J),ie||(ue=[V(window,"keydown",t[5]),V(K,"click",t[4]),V(J,"click",t[4])],ie=!0)},p(te,[re]){if(re&8&&r!==(r=te[3]("upstreamsModal.title")+"")&&k(i,r),re&2&&k(f,te[1]),re&8&&w!==(w=te[3]("routeCard.tableHeaders.status")+"")&&k(C,w),re&8&&T!==(T=te[3]("routeCard.tableHeaders.target")+"")&&k(S,T),re&8&&H!==(H=te[3]("routeCard.tableHeaders.weight")+"")&&k(I,H),re&8&&A!==(A=te[3]("routeCard.tableHeaders.priority")+"")&&k(N,A),re&12){ne=ut(te[2]);let ee;for(ee=0;ee<ne.length;ee+=1){const G=lc(te,ne,ee);$[ee]?$[ee].p(G,re):($[ee]=oc(G),$[ee].c(),$[ee].m(Y,null))}for(;ee<$.length;ee+=1)$[ee].d(1);$.length=ne.length}re&8&&M!==(M=te[3]("upstreamsModal.close")+"")&&k(B,M),re&1&&le(l,"modal-open",te[0])},i:tt,o:tt,d(te){te&&P(l),Gt($,te),ie=!1,bt(ue)}}}function Ls(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function nc(t){if(!t)return"";const l=new Date(t),n=new Date().getTime()-l.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),u=Math.floor(i/60);return r<60?`${r}\u79D2\u524D`:i<60?`${i}\u5206\u949F\u524D`:u<24?`${u}\u5C0F\u65F6\u524D`:l.toLocaleString("zh-CN")}function Lm(t,l,e){let n;Dt(t,Rt,d=>e(3,n=d));let{open:r=!1}=l,{routePath:i}=l,{upstreams:u=[]}=l;function c(){e(0,r=!1)}function f(d){d.key==="Escape"&&r&&c()}return t.$$set=d=>{"open"in d&&e(0,r=d.open),"routePath"in d&&e(1,i=d.routePath),"upstreams"in d&&e(2,u=d.upstreams)},[r,i,u,n,c,f]}class Dm extends Vt{constructor(l){super(),Ut(this,l,Lm,jm,At,{open:0,routePath:1,upstreams:2})}}function rc(t,l,e){const n=t.slice();return n[12]=l[e][0],n[13]=l[e][1],n}function ac(t,l,e){const n=t.slice();return n[16]=l[e],n}function ic(t){let l,e=t[8]("routeCard.hasTransformer")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm badge-info")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&256&&e!==(e=r[8]("routeCard.hasTransformer")+"")&&k(n,e)},d(r){r&&P(l)}}}function uc(t){let l,e=t[8]("routeCard.failover")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm badge-success")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&256&&e!==(e=r[8]("routeCard.failover")+"")&&k(n,e)},d(r){r&&P(l)}}}function Im(t){let l,e,n,r,i=t[8]("routeCard.duplicate")+"",u;return{c(){l=ae("svg"),e=ae("path"),n=h(),r=a("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(c,f){j(c,l,f),s(l,e),j(c,n,f),j(c,r,f),s(r,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.duplicate")+"")&&k(u,i)},d(c){c&&(P(l),P(n),P(r))}}}function Bm(t){let l,e,n,r=t[8]("routeCard.duplicating")+"",i;return{c(){l=a("span"),e=h(),n=a("span"),i=_(r),o(l,"class","loading loading-spinner loading-xs")},m(u,c){j(u,l,c),j(u,e,c),j(u,n,c),s(n,i)},p(u,c){c&256&&r!==(r=u[8]("routeCard.duplicating")+"")&&k(i,r)},d(u){u&&(P(l),P(e),P(n))}}}function Am(t){let l,e,n,r,i=t[8]("routeCard.delete")+"",u;return{c(){l=ae("svg"),e=ae("path"),n=h(),r=a("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(c,f){j(c,l,f),s(l,e),j(c,n,f),j(c,r,f),s(r,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.delete")+"")&&k(u,i)},d(c){c&&(P(l),P(n),P(r))}}}function Om(t){let l,e,n,r=t[8]("routeCard.deleting")+"",i;return{c(){l=a("span"),e=h(),n=a("span"),i=_(r),o(l,"class","loading loading-spinner loading-xs")},m(u,c){j(u,l,c),j(u,e,c),j(u,n,c),s(n,i)},p(u,c){c&256&&r!==(r=u[8]("routeCard.deleting")+"")&&k(i,r)},d(u){u&&(P(l),P(e),P(n))}}}function fc(t){let l,e,n,r,i,u,c,f=t[16].target+"",d,p,m,g,b=(t[16].weight||100)+"",v,w,C,E=(t[16].priority||1)+"",y,T;return{c(){l=a("tr"),e=a("td"),n=a("div"),i=h(),u=a("td"),c=a("code"),d=_(f),m=h(),g=a("td"),v=_(b),w=h(),C=a("td"),y=_(E),T=h(),o(n,"class","w-2.5 h-2.5 rounded-full tooltip tooltip-right"),o(n,"data-tip",r=t[16].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${mc(t[16].lastFailureTime)}`:to(t[16])==="healthy"?"\u5065\u5EB7":to(t[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5"),le(n,"bg-success",to(t[16])==="healthy"),le(n,"bg-error",to(t[16])==="unhealthy"),le(n,"bg-warning",to(t[16])==="unknown"),o(c,"class","text-xs truncate max-w-xs block"),o(c,"title",p=t[16].target),o(g,"class","text-right text-xs"),o(C,"class","text-right text-xs"),o(l,"class","hover")},m(S,q){j(S,l,q),s(l,e),s(e,n),s(l,i),s(l,u),s(u,c),s(c,d),s(l,m),s(l,g),s(g,v),s(l,w),s(l,C),s(C,y),s(l,T)},p(S,q){q&128&&r!==(r=S[16].lastFailureTime?`\u6700\u540E\u5931\u8D25: ${mc(S[16].lastFailureTime)}`:to(S[16])==="healthy"?"\u5065\u5EB7":to(S[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5")&&o(n,"data-tip",r),q&128&&le(n,"bg-success",to(S[16])==="healthy"),q&128&&le(n,"bg-error",to(S[16])==="unhealthy"),q&128&&le(n,"bg-warning",to(S[16])==="unknown"),q&128&&f!==(f=S[16].target+"")&&k(d,f),q&128&&p!==(p=S[16].target)&&o(c,"title",p),q&128&&b!==(b=(S[16].weight||100)+"")&&k(v,b),q&128&&E!==(E=(S[16].priority||1)+"")&&k(y,E)},d(S){S&&P(l)}}}function cc(t){let l,e,n,r,i,u=t[8]("routeCard.viewAll",{values:{count:t[0].upstreams.length}})+"",c,f,d;return{c(){l=a("div"),e=a("button"),n=ae("svg"),r=ae("path"),i=h(),c=_(u),o(r,"stroke-linecap","round"),o(r,"stroke-linejoin","round"),o(r,"stroke-width","2"),o(r,"d","M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-3 w-3"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"class","btn btn-sm btn-outline gap-1"),o(l,"class","flex justify-center mt-2")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,r),s(e,i),s(e,c),f||(d=V(e,"click",t[10]),f=!0)},p(p,m){m&257&&u!==(u=p[8]("routeCard.viewAll",{values:{count:p[0].upstreams.length}})+"")&&k(c,u)},d(p){p&&P(l),f=!1,d()}}}function dc(t){let l,e,n,r=ut(Object.entries(t[0].pathRewrite)),i=[];for(let u=0;u<r.length;u+=1)i[u]=pc(rc(t,r,u));return{c(){l=a("div"),e=a("p"),e.textContent="Path Rewrite:",n=h();for(let u=0;u<i.length;u+=1)i[u].c();o(e,"class","text-sm font-semibold mb-1"),o(l,"class","mt-3")},m(u,c){j(u,l,c),s(l,e),s(l,n);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(l,null)},p(u,c){if(c&257){r=ut(Object.entries(u[0].pathRewrite));let f;for(f=0;f<r.length;f+=1){const d=rc(u,r,f);i[f]?i[f].p(d,c):(i[f]=pc(d),i[f].c(),i[f].m(l,null))}for(;f<i.length;f+=1)i[f].d(1);i.length=r.length}},d(u){u&&P(l),Gt(i,u)}}}function pc(t){let l,e=t[8]("routeCard.pathRewrite.original")+"",n,r,i,u=t[12]+"",c,f,d=t[8]("routeCard.pathRewrite.rewriteTo")+"",p,m,g,b=t[13]+"",v,w;return{c(){l=a("div"),n=_(e),r=h(),i=a("code"),c=_(u),f=_(" \u2192 "),p=_(d),m=h(),g=a("code"),v=_(b),w=h(),o(i,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(g,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(l,"class","text-sm text-gray-600")},m(C,E){j(C,l,E),s(l,n),s(l,r),s(l,i),s(i,c),s(l,f),s(l,p),s(l,m),s(l,g),s(g,v),s(l,w)},p(C,E){E&256&&e!==(e=C[8]("routeCard.pathRewrite.original")+"")&&k(n,e),E&1&&u!==(u=C[12]+"")&&k(c,u),E&256&&d!==(d=C[8]("routeCard.pathRewrite.rewriteTo")+"")&&k(p,d),E&1&&b!==(b=C[13]+"")&&k(v,b)},d(C){C&&P(l)}}}function Fm(t){let l,e,n,r,i,u,c=t[0].path+"",f,d,p,m,g=t[8]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"",b,v,w,C,E,y,T,S,q,D=t[8]("routeCard.edit")+"",H,I,R,L,A,N,Z,Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re=t[8]("routeCard.tableHeaders.status")+"",ee,G,pe,oe=t[8]("routeCard.tableHeaders.target")+"",ge,he,ye,Fe=t[8]("routeCard.tableHeaders.weight")+"",je,we,Oe,Je=t[8]("routeCard.tableHeaders.priority")+"",Le,Pe,Me,fe,_e,Be,De,se,ke,me,Ee,Ve=t[0].transformer&&ic(t),Ie=t[0].failover?.enabled&&uc(t);function nt(Ge,ce){return Ge[4]?Bm:Im}let Ne=nt(t),Ye=Ne(t);function Qe(Ge,ce){return Ge[3]?Om:Am}let ve=Qe(t),de=ve(t),Te=ut(t[7]),Ze=[];for(let Ge=0;Ge<Te.length;Ge+=1)Ze[Ge]=fc(ac(t,Te,Ge));let Se=t[6]&&cc(t),Ue=t[0].pathRewrite&&dc(t);function Ce(Ge){t[11](Ge)}let mt={routePath:t[0].path,upstreams:t[0].upstreams};return t[5]!==void 0&&(mt.open=t[5]),De=new Dm({props:mt}),bl.push(()=>Rl(De,"open",Ce)),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=a("h2"),u=a("code"),f=_(c),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),Ve&&Ve.c(),w=h(),Ie&&Ie.c(),C=h(),E=a("div"),y=a("button"),T=ae("svg"),S=ae("path"),q=h(),H=_(D),I=h(),R=a("div"),L=a("button"),A=ae("svg"),N=ae("path"),Y=h(),x=a("ul"),F=a("li"),K=a("button"),Ye.c(),M=h(),B=a("li"),U=a("button"),de.c(),O=h(),J=a("div"),ie=a("div"),ue=a("table"),ne=a("thead"),$=a("tr"),te=a("th"),ee=_(re),G=h(),pe=a("th"),ge=_(oe),he=h(),ye=a("th"),je=_(Fe),we=h(),Oe=a("th"),Le=_(Je),Pe=h(),Me=a("tbody");for(let Ge=0;Ge<Ze.length;Ge+=1)Ze[Ge].c();fe=h(),Se&&Se.c(),_e=h(),Ue&&Ue.c(),Be=h(),Et(De.$$.fragment),o(u,"class","text-primary"),o(i,"class","card-title text-lg"),o(m,"class","badge badge-sm"),o(p,"class","flex gap-2 mt-2 flex-wrap"),o(r,"class","flex-1"),o(S,"stroke-linecap","round"),o(S,"stroke-linejoin","round"),o(S,"stroke-width","2"),o(S,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(T,"xmlns","http://www.w3.org/2000/svg"),o(T,"class","h-4 w-4"),o(T,"fill","none"),o(T,"viewBox","0 0 24 24"),o(T,"stroke","currentColor"),o(y,"class","btn btn-sm btn-primary gap-1"),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(L,"type","button"),o(L,"class","btn btn-sm btn-ghost btn-square"),o(L,"title",Z=t[8]("routeCard.moreActions")),K.disabled=t[4],o(U,"class","text-error"),U.disabled=t[3],o(x,"class","dropdown-content menu p-2 shadow-lg bg-base-100 rounded-box w-40 z-10"),o(R,"class","dropdown dropdown-end"),o(E,"class","flex gap-2"),o(n,"class","flex justify-between items-start"),o(te,"class","w-12"),o(ye,"class","w-16 text-right"),o(Oe,"class","w-12 text-right"),o($,"class","bg-base-200"),o(ue,"class","table table-xs w-full"),o(ie,"class","overflow-x-auto border border-base-300 rounded-lg"),o(J,"class","mt-4"),o(e,"class","card-body flex flex-col"),o(l,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(Ge,ce){j(Ge,l,ce),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,f),s(r,d),s(r,p),s(p,m),s(m,b),s(p,v),Ve&&Ve.m(p,null),s(p,w),Ie&&Ie.m(p,null),s(n,C),s(n,E),s(E,y),s(y,T),s(T,S),s(y,q),s(y,H),s(E,I),s(E,R),s(R,L),s(L,A),s(A,N),s(R,Y),s(R,x),s(x,F),s(F,K),Ye.m(K,null),s(x,M),s(x,B),s(B,U),de.m(U,null),s(e,O),s(e,J),s(J,ie),s(ie,ue),s(ue,ne),s(ne,$),s($,te),s(te,ee),s($,G),s($,pe),s(pe,ge),s($,he),s($,ye),s(ye,je),s($,we),s($,Oe),s(Oe,Le),s(ue,Pe),s(ue,Me);for(let qe=0;qe<Ze.length;qe+=1)Ze[qe]&&Ze[qe].m(Me,null);s(J,fe),Se&&Se.m(J,null),s(e,_e),Ue&&Ue.m(e,null),j(Ge,Be,ce),yt(De,Ge,ce),ke=!0,me||(Ee=[V(y,"click",t[9]),V(K,"click",function(){ko(t[2])&&t[2].apply(this,arguments)}),V(U,"click",function(){ko(t[1])&&t[1].apply(this,arguments)})],me=!0)},p(Ge,[ce]){if(t=Ge,(!ke||ce&1)&&c!==(c=t[0].path+"")&&k(f,c),(!ke||ce&257)&&g!==(g=t[8]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"")&&k(b,g),t[0].transformer?Ve?Ve.p(t,ce):(Ve=ic(t),Ve.c(),Ve.m(p,w)):Ve&&(Ve.d(1),Ve=null),t[0].failover?.enabled?Ie?Ie.p(t,ce):(Ie=uc(t),Ie.c(),Ie.m(p,null)):Ie&&(Ie.d(1),Ie=null),(!ke||ce&256)&&D!==(D=t[8]("routeCard.edit")+"")&&k(H,D),(!ke||ce&256&&Z!==(Z=t[8]("routeCard.moreActions")))&&o(L,"title",Z),Ne===(Ne=nt(t))&&Ye?Ye.p(t,ce):(Ye.d(1),Ye=Ne(t),Ye&&(Ye.c(),Ye.m(K,null))),(!ke||ce&16)&&(K.disabled=t[4]),ve===(ve=Qe(t))&&de?de.p(t,ce):(de.d(1),de=ve(t),de&&(de.c(),de.m(U,null))),(!ke||ce&8)&&(U.disabled=t[3]),(!ke||ce&256)&&re!==(re=t[8]("routeCard.tableHeaders.status")+"")&&k(ee,re),(!ke||ce&256)&&oe!==(oe=t[8]("routeCard.tableHeaders.target")+"")&&k(ge,oe),(!ke||ce&256)&&Fe!==(Fe=t[8]("routeCard.tableHeaders.weight")+"")&&k(je,Fe),(!ke||ce&256)&&Je!==(Je=t[8]("routeCard.tableHeaders.priority")+"")&&k(Le,Je),ce&128){Te=ut(t[7]);let Re;for(Re=0;Re<Te.length;Re+=1){const dt=ac(t,Te,Re);Ze[Re]?Ze[Re].p(dt,ce):(Ze[Re]=fc(dt),Ze[Re].c(),Ze[Re].m(Me,null))}for(;Re<Ze.length;Re+=1)Ze[Re].d(1);Ze.length=Te.length}t[6]?Se?Se.p(t,ce):(Se=cc(t),Se.c(),Se.m(J,null)):Se&&(Se.d(1),Se=null),t[0].pathRewrite?Ue?Ue.p(t,ce):(Ue=dc(t),Ue.c(),Ue.m(e,null)):Ue&&(Ue.d(1),Ue=null);const qe={};ce&1&&(qe.routePath=t[0].path),ce&1&&(qe.upstreams=t[0].upstreams),!se&&ce&32&&(se=!0,qe.open=t[5],Sl(()=>se=!1)),De.$set(qe)},i(Ge){ke||(et(De.$$.fragment,Ge),ke=!0)},o(Ge){st(De.$$.fragment,Ge),ke=!1},d(Ge){Ge&&(P(l),P(Be)),Ve&&Ve.d(),Ie&&Ie.d(),Ye.d(),de.d(),Gt(Ze,Ge),Se&&Se.d(),Ue&&Ue.d(),Ct(De,Ge),me=!1,bt(Ee)}}}const hc=5;function to(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function mc(t){if(!t)return"";const l=new Date(t),n=new Date().getTime()-l.getTime(),r=Math.floor(n/1e3),i=Math.floor(r/60),u=Math.floor(i/60);return r<60?`${r}\u79D2\u524D`:i<60?`${i}\u5206\u949F\u524D`:u<24?`${u}\u5C0F\u65F6\u524D`:l.toLocaleString("zh-CN")}function zm(t,l,e){let n,r,i;Dt(t,Rt,w=>e(8,i=w));let{route:u}=l,{onDelete:c}=l,{onDuplicate:f}=l,{isDeleting:d=!1}=l,{isDuplicating:p=!1}=l,m=!1;function g(){I0(`/routes/edit/${encodeURIComponent(u.path)}`)}function b(){e(5,m=!0)}function v(w){m=w,e(5,m)}return t.$$set=w=>{"route"in w&&e(0,u=w.route),"onDelete"in w&&e(1,c=w.onDelete),"onDuplicate"in w&&e(2,f=w.onDuplicate),"isDeleting"in w&&e(3,d=w.isDeleting),"isDuplicating"in w&&e(4,p=w.isDuplicating)},t.$$.update=()=>{t.$$.dirty&1&&e(7,n=u.upstreams.slice(0,hc)),t.$$.dirty&1&&e(6,r=u.upstreams.length>hc)},[u,c,f,d,p,m,r,n,i,g,b,v]}class Nm extends Vt{constructor(l){super(),Ut(this,l,zm,Fm,At,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function gc(t){let l,e,n,r,i,u,c,f,d,p,m,g,b,v,w,C,E;return{c(){l=a("dialog"),e=a("div"),n=a("h3"),r=_(t[5]),i=h(),u=a("p"),c=_(t[4]),f=h(),d=a("div"),p=a("button"),m=_(t[2]),g=h(),b=a("button"),v=_(t[3]),o(n,"class","font-bold text-lg"),o(u,"class","py-4"),o(p,"class","btn"),o(b,"class",w="btn "+t[1]),o(d,"class","modal-action"),o(e,"class","modal-box"),o(l,"class","modal modal-open")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,r),s(e,i),s(e,u),s(u,c),s(e,f),s(e,d),s(d,p),s(p,m),s(d,g),s(d,b),s(b,v),C||(E=[V(p,"click",t[7]),V(b,"click",t[6]),V(l,"click",t[8])],C=!0)},p(y,T){T&32&&k(r,y[5]),T&16&&k(c,y[4]),T&4&&k(m,y[2]),T&8&&k(v,y[3]),T&2&&w!==(w="btn "+y[1])&&o(b,"class",w)},d(y){y&&P(l),C=!1,bt(E)}}}function Um(t){let l,e=t[0]&&gc(t);return{c(){e&&e.c(),l=Ul()},m(n,r){e&&e.m(n,r),j(n,l,r)},p(n,[r]){n[0]?e?e.p(n,r):(e=gc(n),e.c(),e.m(l.parentNode,l)):e&&(e.d(1),e=null)},i:tt,o:tt,d(n){n&&P(l),e&&e.d(n)}}}function Vm(t,l,e){let n,r,i,u,c;Dt(t,Rt,y=>e(13,c=y));let{open:f=!1}=l,{title:d=""}=l,{message:p=""}=l,{confirmText:m=""}=l,{cancelText:g=""}=l,{confirmClass:b="btn-error"}=l;const v=Cr();function w(){v("confirm"),e(0,f=!1)}function C(){v("cancel"),e(0,f=!1)}function E(y){y.target===y.currentTarget&&C()}return t.$$set=y=>{"open"in y&&e(0,f=y.open),"title"in y&&e(9,d=y.title),"message"in y&&e(10,p=y.message),"confirmText"in y&&e(11,m=y.confirmText),"cancelText"in y&&e(12,g=y.cancelText),"confirmClass"in y&&e(1,b=y.confirmClass)},t.$$.update=()=>{t.$$.dirty&8704&&e(5,n=d||c("confirmDialog.title")),t.$$.dirty&1024&&e(4,r=p),t.$$.dirty&10240&&e(3,i=m||c("confirmDialog.confirm")),t.$$.dirty&12288&&e(2,u=g||c("confirmDialog.cancel"))},[f,b,u,i,r,n,w,C,E,d,p,m,g,c]}class X0 extends Vt{constructor(l){super(),Ut(this,l,Vm,Um,At,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function _c(t,l,e){const n=t.slice();return n[29]=l[e],n}function bc(t,l,e){const n=t.slice();return n[32]=l[e],n}function Jm(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function Wm(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function vc(t){let l,e=t[32]+"",n,r;return{c(){l=a("option"),n=_(e),l.__value=r=t[32],Q(l,l.__value)},m(i,u){j(i,l,u),s(l,n)},p(i,u){u[0]&2048&&e!==(e=i[32]+"")&&k(n,e),u[0]&2048&&r!==(r=i[32])&&(l.__value=r,Q(l,l.__value))},d(i){i&&P(l)}}}function Gm(t){let l,e,n=ut(t[12]),r=[];for(let u=0;u<n.length;u+=1)r[u]=kc(_c(t,n,u));const i=u=>st(r[u],1,1,()=>{r[u]=null});return{c(){l=a("div");for(let u=0;u<r.length;u+=1)r[u].c();o(l,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(u,c){j(u,l,c);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(l,null);e=!0},p(u,c){if(c[0]&152320){n=ut(u[12]);let f;for(f=0;f<n.length;f+=1){const d=_c(u,n,f);r[f]?(r[f].p(d,c),et(r[f],1)):(r[f]=kc(d),r[f].c(),et(r[f],1),r[f].m(l,null))}for(Gl(),f=n.length;f<r.length;f+=1)i(f);Kl()}},i(u){if(!e){for(let c=0;c<n.length;c+=1)et(r[c]);e=!0}},o(u){r=r.filter(Boolean);for(let c=0;c<r.length;c+=1)st(r[c]);e=!1},d(u){u&&P(l),Gt(r,u)}}}function Km(t){let l;function e(i,u){return i[0].length===0?Xm:Zm}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","text-center py-12")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},i:tt,o:tt,d(i){i&&P(l),r.d()}}}function Qm(t){let l,e,n,r,i,u=t[13]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m[0]&8192&&u!==(u=p[13]("common.error")+"")&&k(c,u),m[0]&32&&k(d,p[5])},i:tt,o:tt,d(p){p&&P(l)}}}function Ym(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function kc(t){let l,e;function n(){return t[24](t[29])}function r(){return t[25](t[29])}return l=new Nm({props:{route:t[29],onDelete:n,onDuplicate:r,isDeleting:t[8].has(t[29].path),isDuplicating:t[9].has(t[29].path)}}),{c(){Et(l.$$.fragment)},m(i,u){yt(l,i,u),e=!0},p(i,u){t=i;const c={};u[0]&4096&&(c.route=t[29]),u[0]&4096&&(c.onDelete=n),u[0]&4096&&(c.onDuplicate=r),u[0]&4352&&(c.isDeleting=t[8].has(t[29].path)),u[0]&4608&&(c.isDuplicating=t[9].has(t[29].path)),l.$set(c)},i(i){e||(et(l.$$.fragment,i),e=!0)},o(i){st(l.$$.fragment,i),e=!1},d(i){Ct(l,i)}}}function Zm(t){let l,e,n,r=t[13]("routes.noMatchingRoutes")+"",i,u,c,f=t[13]("routes.noMatchingMessage")+"",d;return{c(){l=a("div"),l.textContent="\uD83D\uDD0D",e=h(),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),o(l,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500")},m(p,m){j(p,l,m),j(p,e,m),j(p,n,m),s(n,i),j(p,u,m),j(p,c,m),s(c,d)},p(p,m){m[0]&8192&&r!==(r=p[13]("routes.noMatchingRoutes")+"")&&k(i,r),m[0]&8192&&f!==(f=p[13]("routes.noMatchingMessage")+"")&&k(d,f)},d(p){p&&(P(l),P(e),P(n),P(u),P(c))}}}function Xm(t){let l,e,n,r=t[13]("routes.noRoutes")+"",i,u,c,f=t[13]("routes.noRoutesMessage")+"",d,p,m,g=t[13]("routes.createFirstRoute")+"",b,v,w;return{c(){l=a("div"),l.textContent="\uD83D\uDE80",e=h(),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),m=a("button"),b=_(g),o(l,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500 mb-4"),o(m,"class","btn btn-primary")},m(C,E){j(C,l,E),j(C,e,E),j(C,n,E),s(n,i),j(C,u,E),j(C,c,E),s(c,d),j(C,p,E),j(C,m,E),s(m,b),v||(w=V(m,"click",t[18]),v=!0)},p(C,E){E[0]&8192&&r!==(r=C[13]("routes.noRoutes")+"")&&k(i,r),E[0]&8192&&f!==(f=C[13]("routes.noRoutesMessage")+"")&&k(d,f),E[0]&8192&&g!==(g=C[13]("routes.createFirstRoute")+"")&&k(b,g)},d(C){C&&(P(l),P(e),P(n),P(u),P(c),P(p),P(m)),v=!1,w()}}}function wc(t){let l,e=t[13]("routes.showingRoutes",{values:{count:t[12].length,total:t[0].length}})+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","mt-6 text-sm text-gray-500 text-center")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&12289&&e!==(e=r[13]("routes.showingRoutes",{values:{count:r[12].length,total:r[0].length}})+"")&&k(n,e)},d(r){r&&P(l)}}}function xm(t){let l,e,n,r,i=t[13]("routes.title")+"",u,c,f,d=t[13]("routes.subtitle")+"",p,m,g,b,v,w,C,E=t[13]("routes.export")+"",y,T,S,q,D,H=t[13]("routes.import")+"",I,R,L,A,N=t[13]("routes.newRoute")+"",Z,Y,x,F,K,M,B,U,O,J,ie=t[13]("routes.allTransformers")+"",ue,ne,$,te,re,ee=t[13]("routes.filterStatus.all")+"",G,pe,oe=t[13]("routes.filterStatus.healthy")+"",ge,he,ye=t[13]("routes.filterStatus.unhealthy")+"",Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e,Be;function De(ve,de){return ve[10]?Wm:Jm}let se=De(t),ke=se(t),me=ut(t[11]),Ee=[];for(let ve=0;ve<me.length;ve+=1)Ee[ve]=vc(bc(t,me,ve));const Ve=[Ym,Qm,Km,Gm],Ie=[];function nt(ve,de){return ve[4]?0:ve[5]?1:ve[12].length===0?2:3}we=nt(t),Oe=Ie[we]=Ve[we](t);let Ne=!t[4]&&t[0].length>0&&wc(t);function Ye(ve){t[26](ve)}let Qe={title:t[13]("routes.confirmDelete"),message:t[7]?t[13]("routes.confirmDeleteMessage",{values:{path:t[7].path}}):"",confirmText:t[13]("common.delete"),cancelText:t[13]("common.cancel"),confirmClass:"btn-error"};return t[6]!==void 0&&(Qe.open=t[6]),Pe=new X0({props:Qe}),bl.push(()=>Rl(Pe,"open",Ye)),Pe.$on("confirm",t[15]),Pe.$on("cancel",t[16]),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h1"),u=_(i),c=h(),f=a("p"),p=_(d),m=h(),g=a("div"),b=a("button"),v=ae("svg"),w=ae("path"),C=h(),y=_(E),S=h(),q=a("button"),ke.c(),D=h(),I=_(H),L=h(),A=a("button"),Z=_(N),Y=h(),x=a("div"),F=a("div"),K=a("input"),B=h(),U=a("div"),O=a("select"),J=a("option"),ue=_(ie);for(let ve=0;ve<Ee.length;ve+=1)Ee[ve].c();ne=h(),$=a("div"),te=a("select"),re=a("option"),G=_(ee),pe=a("option"),ge=_(oe),he=a("option"),Fe=_(ye),je=h(),Oe.c(),Je=h(),Ne&&Ne.c(),Le=h(),Et(Pe.$$.fragment),o(r,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(v,"xmlns","http://www.w3.org/2000/svg"),o(v,"class","h-4 w-4"),o(v,"fill","none"),o(v,"viewBox","0 0 24 24"),o(v,"stroke","currentColor"),o(b,"class","btn btn-sm btn-outline"),b.disabled=T=t[4]||t[0].length===0,o(q,"class","btn btn-sm btn-outline"),q.disabled=R=t[4]||t[10],o(A,"class","btn btn-primary btn-sm"),o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(K,"type","text"),o(K,"placeholder",M=t[13]("routes.searchPlaceholder")),o(K,"class","input input-bordered"),o(F,"class","form-control flex-1"),J.__value="",Q(J,J.__value),o(O,"class","select select-bordered"),t[2]===void 0&&tl(()=>t[22].call(O)),o(U,"class","form-control w-48"),re.__value="all",Q(re,re.__value),pe.__value="healthy",Q(pe,pe.__value),he.__value="unhealthy",Q(he,he.__value),o(te,"class","select select-bordered"),t[3]===void 0&&tl(()=>t[23].call(te)),o($,"class","form-control w-32"),o(x,"class","flex gap-4 mb-6"),o(l,"class","p-6")},m(ve,de){j(ve,l,de),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,p),s(e,m),s(e,g),s(g,b),s(b,v),s(v,w),s(b,C),s(b,y),s(g,S),s(g,q),ke.m(q,null),s(q,D),s(q,I),s(g,L),s(g,A),s(A,Z),s(l,Y),s(l,x),s(x,F),s(F,K),Q(K,t[1]),s(x,B),s(x,U),s(U,O),s(O,J),s(J,ue);for(let Te=0;Te<Ee.length;Te+=1)Ee[Te]&&Ee[Te].m(O,null);kt(O,t[2],!0),s(x,ne),s(x,$),s($,te),s(te,re),s(re,G),s(te,pe),s(pe,ge),s(te,he),s(he,Fe),kt(te,t[3],!0),s(l,je),Ie[we].m(l,null),s(l,Je),Ne&&Ne.m(l,null),s(l,Le),yt(Pe,l,null),fe=!0,_e||(Be=[V(b,"click",t[19]),V(q,"click",t[20]),V(A,"click",t[18]),V(K,"input",t[21]),V(O,"change",t[22]),V(te,"change",t[23])],_e=!0)},p(ve,de){if((!fe||de[0]&8192)&&i!==(i=ve[13]("routes.title")+"")&&k(u,i),(!fe||de[0]&8192)&&d!==(d=ve[13]("routes.subtitle")+"")&&k(p,d),(!fe||de[0]&8192)&&E!==(E=ve[13]("routes.export")+"")&&k(y,E),(!fe||de[0]&17&&T!==(T=ve[4]||ve[0].length===0))&&(b.disabled=T),se!==(se=De(ve))&&(ke.d(1),ke=se(ve),ke&&(ke.c(),ke.m(q,D))),(!fe||de[0]&8192)&&H!==(H=ve[13]("routes.import")+"")&&k(I,H),(!fe||de[0]&1040&&R!==(R=ve[4]||ve[10]))&&(q.disabled=R),(!fe||de[0]&8192)&&N!==(N=ve[13]("routes.newRoute")+"")&&k(Z,N),(!fe||de[0]&8192&&M!==(M=ve[13]("routes.searchPlaceholder")))&&o(K,"placeholder",M),de[0]&2&&K.value!==ve[1]&&Q(K,ve[1]),(!fe||de[0]&8192)&&ie!==(ie=ve[13]("routes.allTransformers")+"")&&k(ue,ie),de[0]&2048){me=ut(ve[11]);let Se;for(Se=0;Se<me.length;Se+=1){const Ue=bc(ve,me,Se);Ee[Se]?Ee[Se].p(Ue,de):(Ee[Se]=vc(Ue),Ee[Se].c(),Ee[Se].m(O,null))}for(;Se<Ee.length;Se+=1)Ee[Se].d(1);Ee.length=me.length}de[0]&2052&&kt(O,ve[2]),(!fe||de[0]&8192)&&ee!==(ee=ve[13]("routes.filterStatus.all")+"")&&k(G,ee),(!fe||de[0]&8192)&&oe!==(oe=ve[13]("routes.filterStatus.healthy")+"")&&k(ge,oe),(!fe||de[0]&8192)&&ye!==(ye=ve[13]("routes.filterStatus.unhealthy")+"")&&k(Fe,ye),de[0]&8&&kt(te,ve[3]);let Te=we;we=nt(ve),we===Te?Ie[we].p(ve,de):(Gl(),st(Ie[Te],1,1,()=>{Ie[Te]=null}),Kl(),Oe=Ie[we],Oe?Oe.p(ve,de):(Oe=Ie[we]=Ve[we](ve),Oe.c()),et(Oe,1),Oe.m(l,Je)),!ve[4]&&ve[0].length>0?Ne?Ne.p(ve,de):(Ne=wc(ve),Ne.c(),Ne.m(l,Le)):Ne&&(Ne.d(1),Ne=null);const Ze={};de[0]&8192&&(Ze.title=ve[13]("routes.confirmDelete")),de[0]&8320&&(Ze.message=ve[7]?ve[13]("routes.confirmDeleteMessage",{values:{path:ve[7].path}}):""),de[0]&8192&&(Ze.confirmText=ve[13]("common.delete")),de[0]&8192&&(Ze.cancelText=ve[13]("common.cancel")),!Me&&de[0]&64&&(Me=!0,Ze.open=ve[6],Sl(()=>Me=!1)),Pe.$set(Ze)},i(ve){fe||(et(Oe),et(Pe.$$.fragment,ve),fe=!0)},o(ve){st(Oe),st(Pe.$$.fragment,ve),fe=!1},d(ve){ve&&P(l),ke.d(),Gt(Ee,ve),Ie[we].d(),Ne&&Ne.d(),Ct(Pe),_e=!1,bt(Be)}}}function $m(t,l,e){let n,r,i;Dt(t,Rt,F=>e(13,i=F));let u=[],c=!0,f=null,d="",p="",m="all",g=!0,b=!1,v=null,w=new Set,C=new Set,E=!1;async function y(F=!1){const K=!F&&g;try{K&&e(4,c=!0),e(0,u=await Ro.list()),e(5,f=null),g=!1}catch(M){e(5,f=M.message),F||Lt.show(M.message,"error")}finally{K&&e(4,c=!1)}}async function T(F){e(7,v=F),e(6,b=!0)}async function S(){if(v){w.add(v.path),e(8,w);try{await Ro.delete(v.path),Lt.show(i("routes.deleted",{values:{path:v.path}}),"success"),await y()}catch(F){Lt.show(i("routes.deleteFailed",{values:{error:F.message}}),"error")}finally{w.delete(v.path),e(8,w),e(7,v=null)}}}function q(){e(7,v=null)}async function D(F){C.add(F.path),e(9,C);try{await Ro.duplicate(F.path),Lt.show(i("routes.duplicated",{values:{path:F.path}}),"success"),await y()}catch(K){Lt.show(i("routes.duplicateFailed",{values:{error:K.message}}),"error")}finally{C.delete(F.path),e(9,C)}}function H(){I0("/routes/new")}function I(){if(u.length===0){Lt.show(i("routes.noRoutesToExport"),"warning");return}const F=JSON.stringify(u,null,2),K="data:application/json;charset=utf-8,"+encodeURIComponent(F),M=`bungee-routes-${new Date().toISOString().split("T")[0]}.json`,B=document.createElement("a");B.setAttribute("href",K),B.setAttribute("download",M),B.click(),Lt.show(i("routes.exported"),"success")}function R(){const F=document.createElement("input");F.type="file",F.accept=".json",F.onchange=async K=>{const M=K.target.files[0];if(M){e(10,E=!0);try{const B=await M.text(),U=JSON.parse(B);if(!Array.isArray(U))throw new Error(i("routes.importMustBeArray"));let O=0,J=0;for(const ie of U)try{await Ro.create(ie),O++}catch(ue){J++,console.error(`Failed to import route ${ie.path}:`,ue)}if(O>0){const ie=J>0?i("routes.importPartialSuccess",{values:{success:O,failed:J}}):i("routes.importSuccess",{values:{success:O}});Lt.show(ie,"success"),await y()}else Lt.show(i("routes.importFailed",{values:{error:`${J} routes failed`}}),"error")}catch(B){Lt.show(i("routes.importFailed",{values:{error:B.message}}),"error")}finally{e(10,E=!1)}}},F.click()}Hs(()=>{y();const F=setInterval(()=>{y(!0)},5e3);return()=>{clearInterval(F)}});function L(){d=this.value,e(1,d)}function A(){p=pl(this),e(2,p),e(11,r),e(0,u)}function N(){m=pl(this),e(3,m)}const Z=F=>T(F),Y=F=>D(F);function x(F){b=F,e(6,b)}return t.$$.update=()=>{t.$$.dirty[0]&15&&e(12,n=u.filter(F=>{const K=F.path.toLowerCase().includes(d.toLowerCase())||F.upstreams.some(U=>U.target.toLowerCase().includes(d.toLowerCase())),M=!p||typeof F.transformer=="string"&&F.transformer===p||F.upstreams.some(U=>typeof U.transformer=="string"&&U.transformer===p);let B=!0;return m==="healthy"?B=F.upstreams.every(U=>U.status==="HEALTHY"):m==="unhealthy"&&(B=F.upstreams.some(U=>U.status==="UNHEALTHY")),K&&M&&B})),t.$$.dirty[0]&1&&e(11,r=Array.from(new Set(u.flatMap(F=>{const K=[];return typeof F.transformer=="string"&&K.push(F.transformer),F.upstreams.forEach(M=>{typeof M.transformer=="string"&&K.push(M.transformer)}),K}))))},[u,d,p,m,c,f,b,v,w,C,E,r,n,i,T,S,q,D,H,I,R,L,A,N,Z,Y,x]}class eg extends Vt{constructor(l){super(),Ut(this,l,$m,xm,At,{},null,[-1,-1])}}const yc="/__ui/api";class x0{static async getAll(){const l=await fetch(`${yc}/transformers`);if(!l.ok)throw new Error(`HTTP ${l.status}: ${l.statusText}`);const e=await l.json();return e.plugins||e.transformers||[]}static async getById(l){const e=await fetch(`${yc}/transformers/${encodeURIComponent(l)}`);if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);return await e.json()}}let bi=null;async function tg(){if(bi===null)try{bi=await x0.getAll()}catch(t){console.warn("Failed to fetch transformers from API, using fallback:",t),bi=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return bi}function gf(t,l){const e=[],n=`upstreams[${l}]`;if(!t.target)e.push({field:`${n}.target`,message:Cs(Rt)("validation.targetRequired")});else try{const r=new URL(t.target);["http:","https:"].includes(r.protocol)||e.push({field:`${n}.target`,message:Cs(Rt)("validation.targetProtocol")})}catch{e.push({field:`${n}.target`,message:Cs(Rt)("validation.invalidUrl")})}return t.weight!==void 0&&(typeof t.weight!="number"||t.weight<=0)&&e.push({field:`${n}.weight`,message:Cs(Rt)("validation.weightPositive")}),t.priority!==void 0&&(typeof t.priority!="number"||t.priority<0)&&e.push({field:`${n}.priority`,message:Cs(Rt)("validation.priorityNonNegative")}),e}function lg(t){const l=[];return t.some(n=>n.weight!==void 0)&&t.reduce((r,i)=>r+(i.weight||0),0)===0&&l.push({field:"upstreams",message:Cs(Rt)("validation.totalWeightPositive")}),l}async function sg(t,l){const e=gf(t,l),n=`upstreams[${l}]`;if(t.plugins&&t.plugins.length>0){const r=t.plugins[0];if(typeof r=="string")try{const i=await tg();if(!i.includes(r)){const u=Cs(Rt);e.push({field:`${n}.plugins`,message:u("validation.unknownTransformer",{values:{transformer:r,options:i.join(", ")}})})}}catch(i){console.warn("Failed to validate plugin:",i)}}return e}async function og(t){const l=[];if(t.path?t.path.startsWith("/")||l.push({field:"path",message:Cs(Rt)("validation.pathStartSlash")}):l.push({field:"path",message:Cs(Rt)("validation.pathRequired")}),!t.upstreams||t.upstreams.length===0)l.push({field:"upstreams",message:Cs(Rt)("validation.upstreamRequired")});else{const e=t.upstreams.map((r,i)=>sg(r,i));(await Promise.all(e)).forEach(r=>l.push(...r))}return t.pathRewrite&&Object.keys(t.pathRewrite).forEach(e=>{try{new RegExp(e)}catch{const n=Cs(Rt);l.push({field:`pathRewrite.${e}`,message:n("validation.invalidRegex",{values:{pattern:e}})})}}),t.failover?.enabled&&(t.failover.retryableStatusCodes&&t.failover.retryableStatusCodes.forEach(e=>{if(e<100||e>599){const n=Cs(Rt);l.push({field:"failover.retryableStatusCodes",message:n("validation.invalidStatusCode",{values:{code:e}})})}}),t.failover.recoveryIntervalMs!==void 0&&t.failover.recoveryIntervalMs<=0&&l.push({field:"failover.recoveryIntervalMs",message:Cs(Rt)("validation.recoveryIntervalPositive")}),t.failover.recoveryTimeoutMs!==void 0&&t.failover.recoveryTimeoutMs<=0&&l.push({field:"failover.recoveryTimeoutMs",message:Cs(Rt)("validation.recoveryTimeoutPositive")})),l}function Cc(t){let l,e,n,r,i,u,c,f,d,p,m;function g(w,C){return w[2]==="success"?ig:w[2]==="error"?ag:w[2]==="warning"?rg:ng}let b=g(t),v=b(t);return{c(){l=a("div"),e=a("div"),n=a("div"),v.c(),r=h(),i=a("span"),u=_(t[1]),c=h(),f=a("button"),f.textContent="\u2715",o(f,"class","btn btn-sm btn-ghost"),o(e,"class",d="alert "+t[3]+" shadow-lg"),o(l,"class","toast toast-end toast-top z-50")},m(w,C){j(w,l,C),s(l,e),s(e,n),v.m(n,null),s(n,r),s(n,i),s(i,u),s(e,c),s(e,f),p||(m=V(f,"click",t[4]),p=!0)},p(w,C){b!==(b=g(w))&&(v.d(1),v=b(w),v&&(v.c(),v.m(n,r))),C&2&&k(u,w[1]),C&8&&d!==(d="alert "+w[3]+" shadow-lg")&&o(e,"class",d)},d(w){w&&P(l),v.d(),p=!1,m()}}}function ng(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"class","stroke-current shrink-0 w-6 h-6")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function rg(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"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"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","stroke-current shrink-0 h-6 w-6"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function ag(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","stroke-current shrink-0 h-6 w-6"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function ig(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","stroke-current shrink-0 h-6 w-6"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function ug(t){let l,e=t[0]&&Cc(t);return{c(){e&&e.c(),l=Ul()},m(n,r){e&&e.m(n,r),j(n,l,r)},p(n,[r]){n[0]?e?e.p(n,r):(e=Cc(n),e.c(),e.m(l.parentNode,l)):e&&(e.d(1),e=null)},i:tt,o:tt,d(n){n&&P(l),e&&e.d(n)}}}function fg(t,l,e){let n,{message:r}=l,{type:i="info"}=l,{duration:u=3e3}=l,{visible:c=!0}=l;const f=Cr();let d;Hs(()=>(u>0&&(d=setTimeout(()=>{e(0,c=!1),f("close")},u)),()=>{d&&clearTimeout(d)}));function p(){e(0,c=!1),f("close"),d&&clearTimeout(d)}return t.$$set=m=>{"message"in m&&e(1,r=m.message),"type"in m&&e(2,i=m.type),"duration"in m&&e(5,u=m.duration),"visible"in m&&e(0,c=m.visible)},t.$$.update=()=>{t.$$.dirty&4&&e(3,n={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[i])},[c,r,i,n,p,u]}class cg extends Vt{constructor(l){super(),Ut(this,l,fg,ug,At,{message:1,type:2,duration:5,visible:0})}}function Ec(t,l,e){const n=t.slice();return n[7]=l[e],n}function Tc(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=ut(t[1]),v=[];for(let w=0;w<b.length;w+=1)v[w]=Mc(Ec(t,b,w));return{c(){l=a("div"),e=a("div"),n=a("h3"),n.textContent="Select Route Template",r=h(),i=a("div");for(let w=0;w<v.length;w+=1)v[w].c();u=h(),c=a("div"),f=a("button"),f.textContent="Close",d=h(),p=a("button"),o(n,"class","font-bold text-lg mb-4"),o(i,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(f,"type","button"),o(f,"class","btn btn-sm"),o(c,"class","modal-action"),o(e,"class","modal-box max-w-4xl"),o(p,"type","button"),o(p,"class","modal-backdrop"),o(p,"aria-label","Close modal"),o(l,"class","modal modal-open")},m(w,C){j(w,l,C),s(l,e),s(e,n),s(e,r),s(e,i);for(let E=0;E<v.length;E+=1)v[E]&&v[E].m(i,null);s(e,u),s(e,c),s(c,f),s(l,d),s(l,p),m||(g=[V(f,"click",t[4]),V(p,"click",t[5])],m=!0)},p(w,C){if(C&6){b=ut(w[1]);let E;for(E=0;E<b.length;E+=1){const y=Ec(w,b,E);v[E]?v[E].p(y,C):(v[E]=Mc(y),v[E].c(),v[E].m(i,null))}for(;E<v.length;E+=1)v[E].d(1);v.length=b.length}},d(w){w&&P(l),Gt(v,w),m=!1,bt(g)}}}function Mc(t){let l,e,n,r,i,u,c,f,d,p,m;function g(){return t[3](t[7])}return{c(){l=a("button"),e=a("div"),n=a("h4"),n.textContent=`${t[7].name}`,r=h(),i=a("p"),i.textContent=`${t[7].description}`,u=h(),c=a("div"),f=a("div"),f.textContent=`${JSON.stringify(t[7].template,null,2)}`,d=h(),o(n,"class","card-title text-base"),o(i,"class","text-sm text-gray-600"),o(f,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),o(c,"class","mt-2"),o(e,"class","card-body"),o(l,"type","button"),o(l,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(e,r),s(e,i),s(e,u),s(e,c),s(c,f),s(l,d),p||(m=V(l,"click",g),p=!0)},p(b,v){t=b},d(b){b&&P(l),p=!1,m()}}}function dg(t){let l,e=t[0]&&Tc(t);return{c(){e&&e.c(),l=Ul()},m(n,r){e&&e.m(n,r),j(n,l,r)},p(n,[r]){n[0]?e?e.p(n,r):(e=Tc(n),e.c(),e.m(l.parentNode,l)):e&&(e.d(1),e=null)},i:tt,o:tt,d(n){n&&P(l),e&&e.d(n)}}}function pg(t,l,e){let{showTemplates:n=!1}=l;const r=Cr(),i=[{name:"Simple Proxy",description:"Basic reverse proxy to a single upstream",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}]}},{name:"Load Balanced",description:"Multiple upstreams with load balancing",template:{path:"/api",upstreams:[{target:"https://api1.example.com",weight:100,priority:1},{target:"https://api2.example.com",weight:100,priority:1}]}},{name:"Failover Setup",description:"Primary and backup upstreams with failover",template:{path:"/api",upstreams:[{target:"https://primary.example.com",weight:200,priority:1},{target:"https://backup.example.com",weight:100,priority:2}],failover:{enabled:!0,retryableStatusCodes:[500,502,503,504]}}},{name:"Anthropic to Gemini",description:"Convert Anthropic API to Google Gemini format",template:{path:"/v1/messages",transformer:"anthropic-to-gemini",upstreams:[{target:"https://generativelanguage.googleapis.com",weight:100,priority:1}]}},{name:"Anthropic to OpenAI",description:"Convert Anthropic API to OpenAI format",template:{path:"/v1/messages",transformer:"anthropic-to-openai",upstreams:[{target:"https://api.openai.com",weight:100,priority:1}]}},{name:"Health Checked API",description:"API with health checks enabled",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],healthCheck:{enabled:!0,interval:3e4,timeout:5e3,path:"/health"}}},{name:"Path Rewrite",description:"Route with path rewriting",template:{path:"/api/v2",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],pathRewrite:{"^/api/v2":"/v1"}}}];function u(p){r("select",p.template),e(0,n=!1)}const c=p=>u(p),f=()=>e(0,n=!1),d=()=>e(0,n=!1);return t.$$set=p=>{"showTemplates"in p&&e(0,n=p.showTemplates)},[n,i,u,c,f,d]}class hg extends Vt{constructor(l){super(),Ut(this,l,pg,dg,At,{showTemplates:0})}}function Sc(t,l,e){const n=t.slice();return n[16]=l[e],n}function mg(t){let l,e,n=t[7]("plugin.none")+"",r,i,u,c,f,d=ut(t[6]),p=[];for(let g=0;g<d.length;g+=1)p[g]=Rc(Sc(t,d,g));let m=t[0]&&qc(t);return{c(){l=a("select"),e=a("option"),r=_(n);for(let g=0;g<p.length;g+=1)p[g].c();i=h(),m&&m.c(),u=Ul(),e.__value=null,Q(e,e.__value),o(l,"id","plugin-select"),o(l,"class","select select-bordered"),t[0]===void 0&&tl(()=>t[11].call(l))},m(g,b){j(g,l,b),s(l,e),s(e,r);for(let v=0;v<p.length;v+=1)p[v]&&p[v].m(l,null);kt(l,t[0],!0),j(g,i,b),m&&m.m(g,b),j(g,u,b),c||(f=[V(l,"change",t[11]),V(l,"change",t[8])],c=!0)},p(g,b){if(b&128&&n!==(n=g[7]("plugin.none")+"")&&k(r,n),b&64){d=ut(g[6]);let v;for(v=0;v<d.length;v+=1){const w=Sc(g,d,v);p[v]?p[v].p(w,b):(p[v]=Rc(w),p[v].c(),p[v].m(l,null))}for(;v<p.length;v+=1)p[v].d(1);p.length=d.length}b&65&&kt(l,g[0]),g[0]?m?m.p(g,b):(m=qc(g),m.c(),m.m(u.parentNode,u)):m&&(m.d(1),m=null)},d(g){g&&(P(l),P(i),P(u)),Gt(p,g),m&&m.d(g),c=!1,bt(f)}}}function gg(t){let l,e,n,r,i,u=t[7]("routeEditor.noPluginsAvailable")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(l,"class","alert alert-info")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d&128&&u!==(u=f[7]("routeEditor.noPluginsAvailable")+"")&&k(c,u)},d(f){f&&P(l)}}}function Rc(t){let l,e=t[16].name+"",n,r;return{c(){l=a("option"),n=_(e),l.__value=r=t[16].id,Q(l,l.__value)},m(i,u){j(i,l,u),s(l,n)},p(i,u){u&64&&e!==(e=i[16].name+"")&&k(n,e),u&64&&r!==(r=i[16].id)&&(l.__value=r,Q(l,l.__value))},d(i){i&&P(l)}}}function qc(t){let l,e,n=t[6].find(t[12])?.description+"",r;return{c(){l=a("div"),e=a("span"),r=_(n),o(e,"class","label-text-alt text-gray-500"),o(l,"class","label")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&65&&n!==(n=i[6].find(i[12])?.description+"")&&k(r,n)},d(i){i&&P(l)}}}function Hc(t){let l,e,n=t[2]?"Hide":"Show",r,i,u,c,f,d,p=t[2]&&Pc(t);return{c(){l=a("div"),e=a("button"),r=_(n),i=_(" Preview"),u=h(),p&&p.c(),c=Ul(),o(e,"type","button"),o(e,"class","btn btn-xs btn-outline"),o(l,"class","flex items-center gap-2")},m(m,g){j(m,l,g),s(l,e),s(e,r),s(e,i),j(m,u,g),p&&p.m(m,g),j(m,c,g),f||(d=V(e,"click",t[13]),f=!0)},p(m,g){g&4&&n!==(n=m[2]?"Hide":"Show")&&k(r,n),m[2]?p?p.p(m,g):(p=Pc(m),p.c(),p.m(c.parentNode,c)):p&&(p.d(1),p=null)},d(m){m&&(P(l),P(u),P(c)),p&&p.d(m),f=!1,d()}}}function Pc(t){let l,e,n,r=t[7]("plugin.testPlugin")+"",i,u,c,f,d,p,m=t[7]("plugin.input")+"",g,b,v,w,C,E,y,T,S=t[7]("plugin.output")+"",q,D,H,I,R,L,A,N,Z,Y,x=t[7]("plugin.testPlugin")+"",F,K,M,B,U,O=(t[4]||t[5])&&jc(t),J=t[5]&&Lc(t);return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),f=a("div"),d=a("label"),p=a("span"),g=_(m),b=h(),v=a("textarea"),C=h(),E=a("div"),y=a("label"),T=a("span"),q=_(S),D=h(),H=a("textarea"),R=h(),L=a("div"),A=a("button"),N=ae("svg"),Z=ae("path"),Y=h(),F=_(x),K=h(),O&&O.c(),M=h(),J&&J.c(),o(n,"class","font-semibold text-sm"),o(p,"class","label-text text-xs"),o(d,"class","label py-1"),o(d,"for","plugin-input"),o(v,"id","plugin-input"),o(v,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),o(v,"placeholder",w=t[7]("plugin.inputPlaceholder")),o(v,"rows","10"),o(T,"class","label-text text-xs"),o(y,"class","label py-1"),o(y,"for","plugin-output"),o(H,"id","plugin-output"),o(H,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),H.value=t[4],H.readOnly=!0,o(H,"rows","10"),o(H,"placeholder",I=t[7]("plugin.outputPlaceholder")),o(c,"class","grid grid-cols-2 gap-4"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-3 w-3"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),o(A,"type","button"),o(A,"class","btn btn-xs btn-primary"),o(L,"class","flex gap-2"),o(e,"class","card-body p-4 space-y-3"),o(l,"class","card bg-base-200")},m(ie,ue){j(ie,l,ue),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,p),s(p,g),s(f,b),s(f,v),Q(v,t[3]),s(c,C),s(c,E),s(E,y),s(y,T),s(T,q),s(E,D),s(E,H),s(e,R),s(e,L),s(L,A),s(A,N),s(N,Z),s(A,Y),s(A,F),s(L,K),O&&O.m(L,null),s(e,M),J&&J.m(e,null),B||(U=[V(v,"input",t[14]),V(A,"click",t[9])],B=!0)},p(ie,ue){ue&128&&r!==(r=ie[7]("plugin.testPlugin")+"")&&k(i,r),ue&128&&m!==(m=ie[7]("plugin.input")+"")&&k(g,m),ue&128&&w!==(w=ie[7]("plugin.inputPlaceholder"))&&o(v,"placeholder",w),ue&8&&Q(v,ie[3]),ue&128&&S!==(S=ie[7]("plugin.output")+"")&&k(q,S),ue&16&&(H.value=ie[4]),ue&128&&I!==(I=ie[7]("plugin.outputPlaceholder"))&&o(H,"placeholder",I),ue&128&&x!==(x=ie[7]("plugin.testPlugin")+"")&&k(F,x),ie[4]||ie[5]?O?O.p(ie,ue):(O=jc(ie),O.c(),O.m(L,null)):O&&(O.d(1),O=null),ie[5]?J?J.p(ie,ue):(J=Lc(ie),J.c(),J.m(e,null)):J&&(J.d(1),J=null)},d(ie){ie&&P(l),O&&O.d(),J&&J.d(),B=!1,bt(U)}}}function jc(t){let l,e=t[7]("common.reset")+"",n,r,i;return{c(){l=a("button"),n=_(e),o(l,"type","button"),o(l,"class","btn btn-xs btn-ghost")},m(u,c){j(u,l,c),s(l,n),r||(i=V(l,"click",t[10]),r=!0)},p(u,c){c&128&&e!==(e=u[7]("common.reset")+"")&&k(n,e)},d(u){u&&P(l),r=!1,i()}}}function Lc(t){let l,e,n,r,i,u=t[7]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(i,"class","text-xs"),o(l,"class","alert alert-error py-2")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m&128&&u!==(u=p[7]("common.error")+"")&&k(c,u),m&32&&k(d,p[5])},d(p){p&&P(l)}}}function _g(t){let l,e,n,r,i,u,c;function f(g,b){return g[6].length===0?gg:mg}let d=f(t),p=d(t),m=t[0]&&Hc(t);return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),i=_(t[1]),u=h(),p.c(),c=h(),m&&m.c(),o(r,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","plugin-select"),o(e,"class","form-control"),o(l,"class","space-y-3")},m(g,b){j(g,l,b),s(l,e),s(e,n),s(n,r),s(r,i),s(e,u),p.m(e,null),s(l,c),m&&m.m(l,null)},p(g,[b]){b&2&&k(i,g[1]),d===(d=f(g))&&p?p.p(g,b):(p.d(1),p=d(g),p&&(p.c(),p.m(e,null))),g[0]?m?m.p(g,b):(m=Hc(g),m.c(),m.m(l,null)):m&&(m.d(1),m=null)},i:tt,o:tt,d(g){g&&P(l),p.d(),m&&m.d()}}}function $0(t){return t.split("-").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" \u2192 ")}function bg(t){const l=t.split("-to-");if(l.length===2){const[e,n]=l;return`Convert ${e.charAt(0).toUpperCase()+e.slice(1)} API format to ${n.charAt(0).toUpperCase()+n.slice(1)} format`}return`${$0(t)} plugin`}function vg(t,l,e){let n;Dt(t,Rt,T=>e(7,n=T));let{plugin:r=null}=l,{label:i="Plugin"}=l;const u=Cr();let c=!1,f=`{\n "model": "claude-3-5-sonnet-20241022",\n "messages": [\n {\n "role": "user",\n "content": "Hello"\n }\n ]\n}`,d="",p=null,m=[];Hs(async()=>{try{const T=await x0.getAll();e(6,m=T.map(S=>({id:S,name:$0(S),description:bg(S)})))}catch(T){console.warn("Failed to load plugins from API, using fallback:",T),e(6,m=[{id:"openai-to-anthropic",name:"OpenAI \u2192 Anthropic",description:"Convert OpenAI API format to Anthropic format"},{id:"anthropic-to-openai",name:"Anthropic \u2192 OpenAI",description:"Convert Anthropic API format to OpenAI format"},{id:"anthropic-to-gemini",name:"Anthropic \u2192 Gemini",description:"Convert Anthropic API format to Google Gemini format"}])}});function g(){u("change",r),e(4,d=""),e(5,p=null)}function b(){if(!r||!f){e(5,p=n("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const T=JSON.parse(f);let S;r==="anthropic-to-gemini"?S={contents:T.messages?.map(q=>({role:q.role==="user"?"user":"model",parts:[{text:q.content}]})),generationConfig:{temperature:T.temperature||1,maxOutputTokens:T.max_tokens||8192}}:r==="anthropic-to-openai"?S={model:T.model?.replace("claude","gpt-4"),messages:T.messages,temperature:T.temperature,max_tokens:T.max_tokens}:S={...T,_transformed:!0},e(4,d=JSON.stringify(S,null,2)),e(5,p=null)}catch(T){e(5,p=T.message),e(4,d="")}}function v(){e(4,d=""),e(5,p=null)}function w(){r=pl(this),e(0,r),e(6,m)}const C=T=>T.id===r,E=()=>e(2,c=!c);function y(){f=this.value,e(3,f)}return t.$$set=T=>{"plugin"in T&&e(0,r=T.plugin),"label"in T&&e(1,i=T.label)},[r,i,c,f,d,p,m,n,g,b,v,w,C,E,y]}class e2 extends Vt{constructor(l){super(),Ut(this,l,vg,_g,At,{plugin:0,label:1})}}function Dc(t,l,e){const n=t.slice();return n[15]=l[e],n[16]=l,n[17]=e,n}function kg(t){let l,e=t[5]("routeEditor.pathHelpLong")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&32&&e!==(e=r[5]("routeEditor.pathHelpLong")+"")&&k(n,e)},d(r){r&&P(l)}}}function wg(t){let l,e=t[1].find(Ac)?.message+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-error")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&2&&e!==(e=r[1].find(Ac)?.message+"")&&k(n,e)},d(r){r&&P(l)}}}function Ic(t){let l,e,n,r,i,u,c,f,d,p,m,g,b;function v(){t[11].call(e,t[16],t[17])}function w(){t[12].call(f,t[16],t[17])}function C(){return t[13](t[17])}return{c(){l=a("div"),e=a("input"),r=h(),i=ae("svg"),u=ae("path"),c=h(),f=a("input"),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg>\',o(e,"id",`path-rewrite-pattern-${t[17]}`),o(e,"type","text"),o(e,"placeholder",n=t[5]("routeEditor.patternPlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-5 w-5 text-gray-400 flex-shrink-0"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"id",`path-rewrite-replacement-${t[17]}`),o(f,"type","text"),o(f,"placeholder",d=t[5]("routeEditor.replacementPlaceholder")),o(f,"class","input input-bordered input-sm flex-1"),o(m,"type","button"),o(m,"class","btn btn-sm btn-error btn-square flex-shrink-0"),o(l,"class","flex gap-2 items-center")},m(E,y){j(E,l,y),s(l,e),Q(e,t[15].pattern),s(l,r),s(l,i),s(i,u),s(l,c),s(l,f),Q(f,t[15].replacement),s(l,p),s(l,m),g||(b=[V(e,"input",v),V(f,"input",w),V(m,"click",C)],g=!0)},p(E,y){t=E,y&32&&n!==(n=t[5]("routeEditor.patternPlaceholder"))&&o(e,"placeholder",n),y&4&&e.value!==t[15].pattern&&Q(e,t[15].pattern),y&32&&d!==(d=t[5]("routeEditor.replacementPlaceholder"))&&o(f,"placeholder",d),y&4&&f.value!==t[15].replacement&&Q(f,t[15].replacement)},d(E){E&&P(l),g=!1,bt(b)}}}function yg(t){let l,e,n,r,i=t[5]("routes.path")+"",u,c,f,d,p,m,g,b,v,w,C,E,y,T=t[5]("routeEditor.pathRewrite")+"",S,q,D=t[5]("routeEditor.optional")+"",H,I,R,L,A,N,Z,Y,x,F,K,M,B,U=t[5]("routeEditor.addPathRewriteRule")+"",O,J,ie,ue,ne,$,te=t[5]("routeEditor.transformer")+"",re,ee,G,pe=t[5]("routeEditor.transformerHelp")+"",oe,ge,he,ye,Fe,je,we,Oe,Je;function Le(se,ke){return ke&2&&(v=null),v==null&&(v=!!se[1].some(Cg)),v?wg:kg}let Pe=Le(t,-1),Me=Pe(t),fe=ut(t[2]),_e=[];for(let se=0;se<fe.length;se+=1)_e[se]=Ic(Dc(t,fe,se));function Be(se){t[14](se)}let De={label:t[5]("routeEditor.transformer")};return t[3]!==void 0&&(De.plugin=t[3]),he=new e2({props:De}),bl.push(()=>Rl(he,"plugin",Be)),je=new X0({props:{open:t[4]!==null,title:t[5]("common.confirm"),message:t[5]("routeEditor.confirmDeleteRule"),confirmText:t[5]("common.delete"),cancelText:t[5]("common.cancel"),confirmClass:"btn-error"}}),je.$on("confirm",t[8]),je.$on("cancel",t[9]),{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("span"),f.textContent="*",d=h(),p=a("input"),g=h(),b=a("div"),Me.c(),w=h(),C=a("div"),E=a("label"),y=a("span"),S=_(T),q=_(" ("),H=_(D),I=_(`)\n `),R=a("div"),L=ae("svg"),A=ae("path"),Z=h(),Y=a("div");for(let se=0;se<_e.length;se+=1)_e[se].c();x=h(),F=a("button"),K=ae("svg"),M=ae("path"),B=h(),O=_(U),J=h(),ie=a("div"),ue=h(),ne=a("div"),$=a("h3"),re=_(te),ee=h(),G=a("p"),oe=_(pe),ge=h(),Et(he.$$.fragment),Fe=h(),Et(je.$$.fragment),o(f,"class","text-error"),o(r,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","route-path"),o(p,"id","route-path"),o(p,"type","text"),o(p,"placeholder",m=t[5]("routeEditor.pathPlaceholder")),o(p,"class","input input-bordered"),p.required=!0,le(p,"input-error",t[1].some(Bc)),o(b,"class","label"),o(e,"class","form-control"),o(A,"stroke-linecap","round"),o(A,"stroke-linejoin","round"),o(A,"stroke-width","2"),o(A,"d","M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(L,"xmlns","http://www.w3.org/2000/svg"),o(L,"class","h-4 w-4 text-gray-400 cursor-help"),o(L,"fill","none"),o(L,"viewBox","0 0 24 24"),o(L,"stroke","currentColor"),o(R,"class","tooltip tooltip-right"),o(R,"data-tip",N=t[5]("routeEditor.pathRewriteTooltip")),o(y,"class","label-text font-semibold flex items-center gap-2"),o(E,"class","label"),o(E,"for","path-rewrite-pattern-0"),o(M,"stroke-linecap","round"),o(M,"stroke-linejoin","round"),o(M,"stroke-width","2"),o(M,"d","M12 4v16m8-8H4"),o(K,"xmlns","http://www.w3.org/2000/svg"),o(K,"class","h-4 w-4"),o(K,"fill","none"),o(K,"viewBox","0 0 24 24"),o(K,"stroke","currentColor"),o(F,"type","button"),o(F,"class","btn btn-sm btn-outline gap-2"),o(Y,"class","space-y-2"),o(C,"class","form-control"),o(ie,"class","divider"),o($,"class","text-lg font-semibold mb-2"),o(G,"class","text-sm text-gray-500 mb-4"),o(l,"class","space-y-6")},m(se,ke){j(se,l,ke),s(l,e),s(e,n),s(n,r),s(r,u),s(r,c),s(r,f),s(e,d),s(e,p),Q(p,t[0].path),s(e,g),s(e,b),Me.m(b,null),s(l,w),s(l,C),s(C,E),s(E,y),s(y,S),s(y,q),s(y,H),s(y,I),s(y,R),s(R,L),s(L,A),s(C,Z),s(C,Y);for(let me=0;me<_e.length;me+=1)_e[me]&&_e[me].m(Y,null);s(Y,x),s(Y,F),s(F,K),s(K,M),s(F,B),s(F,O),s(l,J),s(l,ie),s(l,ue),s(l,ne),s(ne,$),s($,re),s(ne,ee),s(ne,G),s(G,oe),s(ne,ge),yt(he,ne,null),j(se,Fe,ke),yt(je,se,ke),we=!0,Oe||(Je=[V(p,"input",t[10]),V(F,"click",t[6])],Oe=!0)},p(se,[ke]){if((!we||ke&32)&&i!==(i=se[5]("routes.path")+"")&&k(u,i),(!we||ke&32&&m!==(m=se[5]("routeEditor.pathPlaceholder")))&&o(p,"placeholder",m),ke&1&&p.value!==se[0].path&&Q(p,se[0].path),(!we||ke&2)&&le(p,"input-error",se[1].some(Bc)),Pe===(Pe=Le(se,ke))&&Me?Me.p(se,ke):(Me.d(1),Me=Pe(se),Me&&(Me.c(),Me.m(b,null))),(!we||ke&32)&&T!==(T=se[5]("routeEditor.pathRewrite")+"")&&k(S,T),(!we||ke&32)&&D!==(D=se[5]("routeEditor.optional")+"")&&k(H,D),(!we||ke&32&&N!==(N=se[5]("routeEditor.pathRewriteTooltip")))&&o(R,"data-tip",N),ke&164){fe=ut(se[2]);let Ve;for(Ve=0;Ve<fe.length;Ve+=1){const Ie=Dc(se,fe,Ve);_e[Ve]?_e[Ve].p(Ie,ke):(_e[Ve]=Ic(Ie),_e[Ve].c(),_e[Ve].m(Y,x))}for(;Ve<_e.length;Ve+=1)_e[Ve].d(1);_e.length=fe.length}(!we||ke&32)&&U!==(U=se[5]("routeEditor.addPathRewriteRule")+"")&&k(O,U),(!we||ke&32)&&te!==(te=se[5]("routeEditor.transformer")+"")&&k(re,te),(!we||ke&32)&&pe!==(pe=se[5]("routeEditor.transformerHelp")+"")&&k(oe,pe);const me={};ke&32&&(me.label=se[5]("routeEditor.transformer")),!ye&&ke&8&&(ye=!0,me.plugin=se[3],Sl(()=>ye=!1)),he.$set(me);const Ee={};ke&16&&(Ee.open=se[4]!==null),ke&32&&(Ee.title=se[5]("common.confirm")),ke&32&&(Ee.message=se[5]("routeEditor.confirmDeleteRule")),ke&32&&(Ee.confirmText=se[5]("common.delete")),ke&32&&(Ee.cancelText=se[5]("common.cancel")),je.$set(Ee)},i(se){we||(et(he.$$.fragment,se),et(je.$$.fragment,se),we=!0)},o(se){st(he.$$.fragment,se),st(je.$$.fragment,se),we=!1},d(se){se&&(P(l),P(Fe)),Me.d(),Gt(_e,se),Ct(he),Ct(je,se),Oe=!1,bt(Je)}}}const Cg=t=>t.field==="path",Bc=t=>t.field==="path",Ac=t=>t.field==="path";function Eg(t,l,e){let n;Dt(t,Rt,y=>e(5,n=y));let{route:r}=l,{errors:i=[]}=l,u=[],c=null,f=r.plugins?.[0]||null;function d(){e(2,u=[...u,{pattern:"",replacement:""}])}function p(y){e(4,c=y)}function m(){c!==null&&(e(2,u=u.filter((y,T)=>T!==c)),e(4,c=null))}function g(){e(4,c=null)}function b(){r.path=this.value,e(0,r),e(2,u),e(3,f)}function v(y,T){y[T].pattern=this.value,e(2,u),e(0,r),e(3,f)}function w(y,T){y[T].replacement=this.value,e(2,u),e(0,r),e(3,f)}const C=y=>p(y);function E(y){f=y,e(3,f)}return t.$$set=y=>{"route"in y&&e(0,r=y.route),"errors"in y&&e(1,i=y.errors)},t.$$.update=()=>{if(t.$$.dirty&5){!u.length&&r.pathRewrite&&e(2,u=Object.entries(r.pathRewrite||{}).map(([T,S])=>({pattern:T,replacement:S})));const y={};u.filter(T=>T.pattern.trim()).forEach(T=>{y[T.pattern]=T.replacement}),e(0,r.pathRewrite=Object.keys(y).length>0?y:void 0,r)}t.$$.dirty&8&&e(0,r.plugins=f?[f]:void 0,r)},[r,i,u,f,c,n,d,p,m,g,b,v,w,C,E]}class Tg extends Vt{constructor(l){super(),Ut(this,l,Eg,yg,At,{route:0,errors:1})}}function Oc(t,l,e){const n=t.slice();return n[31]=l[e],n[32]=l,n[33]=e,n}function Fc(t,l,e){const n=t.slice();return n[31]=l[e],n[34]=l,n[33]=e,n}function zc(t,l,e){const n=t.slice();return n[31]=l[e],n[33]=e,n}function Nc(t,l,e){const n=t.slice();return n[31]=l[e],n[36]=l,n[33]=e,n}function Uc(t){let l,e,n,r,i=t[1]&&Vc();return{c(){l=a("div"),e=a("span"),n=_(t[0]),r=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(l,"class","label")},m(u,c){j(u,l,c),s(l,e),s(e,n),s(l,r),i&&i.m(l,null)},p(u,c){c[0]&1&&k(n,u[0]),u[1]?i||(i=Vc(),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(u){u&&P(l),i&&i.d()}}}function Vc(t){let l,e,n;return{c(){l=a("span"),e=_("Support dynamic expressions: "),n=a("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,e),s(l,n)},d(r){r&&P(l)}}}function Jc(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[20].call(e,t[36],t[33])}function g(){t[21].call(i,t[36],t[33])}function b(){return t[22](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Mg(t){let l,e=t[8]("headers.empty")+"",n;return{c(){l=a("p"),n=_(e),o(l,"class","text-xs text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&256&&e!==(e=r[8]("headers.empty")+"")&&k(n,e)},d(r){r&&P(l)}}}function Sg(t){let l,e=ut(t[4]),n=[];for(let r=0;r<e.length;r+=1)n[r]=Wc(zc(t,e,r));return{c(){l=a("div");for(let r=0;r<n.length;r+=1)n[r].c();o(l,"class","flex flex-wrap gap-2 mt-2")},m(r,i){j(r,l,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(l,null)},p(r,i){if(i[0]&4112){e=ut(r[4]);let u;for(u=0;u<e.length;u+=1){const c=zc(r,e,u);n[u]?n[u].p(c,i):(n[u]=Wc(c),n[u].c(),n[u].m(l,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function Wc(t){let l,e=t[31]+"",n,r,i,u,c,f;function d(){return t[24](t[33])}return{c(){l=a("div"),n=_(e),r=h(),i=a("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(l,"class","badge badge-lg gap-2")},m(p,m){j(p,l,m),s(l,n),s(l,r),s(l,i),s(l,u),c||(f=V(i,"click",d),c=!0)},p(p,m){t=p,m[0]&16&&e!==(e=t[31]+"")&&k(n,e)},d(p){p&&P(l),c=!1,f()}}}function Gc(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[25].call(e,t[34],t[33])}function g(){t[26].call(i,t[34],t[33])}function b(){return t[27](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Kc(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[28].call(e,t[32],t[33])}function g(){t[29].call(i,t[32],t[33])}function b(){return t[30](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Rg(t){let l,e,n,r,i,u,c,f=t[8]("headers.add")+"",d,p,m=t[3].length+"",g,b,v,w,C,E,y=t[8]("headers.add")+"",T,S,q,D,H,I,R=t[8]("headers.remove")+"",L,A,N=t[4].length+"",Z,Y,x,F,K,M,B,U,O,J=t[8]("common.add")+"",ie,ue,ne,$,te,re,ee,G,pe=t[8]("headers.replace")+"",oe,ge,he=t[5].length+"",ye,Fe,je,we,Oe,Je,Le=t[8]("headers.add")+"",Pe,Me,fe,_e,Be,De,se=t[8]("headers.default")+"",ke,me,Ee=t[6].length+"",Ve,Ie,nt,Ne,Ye,Qe,ve=t[8]("headers.add")+"",de,Te,Ze,Se=t[2]&&Uc(t),Ue=ut(t[3]),Ce=[];for(let z=0;z<Ue.length;z+=1)Ce[z]=Jc(Nc(t,Ue,z));function mt(z,He){return z[4].length>0?Sg:Mg}let Ge=mt(t),ce=Ge(t),qe=ut(t[5]),Re=[];for(let z=0;z<qe.length;z+=1)Re[z]=Gc(Fc(t,qe,z));let dt=ut(t[6]),We=[];for(let z=0;z<dt.length;z+=1)We[z]=Kc(Oc(t,dt,z));return{c(){l=a("div"),Se&&Se.c(),e=h(),n=a("div"),r=a("div"),i=a("input"),u=h(),c=a("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),v=h(),w=a("div");for(let z=0;z<Ce.length;z+=1)Ce[z].c();C=h(),E=a("button"),T=_(y),S=h(),q=a("div"),D=a("input"),H=h(),I=a("div"),L=_(R),A=_(" ("),Z=_(N),Y=_(")"),x=h(),F=a("div"),K=a("div"),M=a("input"),U=h(),O=a("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=a("div"),re=a("input"),ee=h(),G=a("div"),oe=_(pe),ge=_(" ("),ye=_(he),Fe=_(")"),je=h(),we=a("div");for(let z=0;z<Re.length;z+=1)Re[z].c();Oe=h(),Je=a("button"),Pe=_(Le),Me=h(),fe=a("div"),_e=a("input"),Be=h(),De=a("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Ie=_(")"),nt=h(),Ne=a("div");for(let z=0;z<We.length;z+=1)We[z].c();Ye=h(),Qe=a("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(r,"class","collapse collapse-arrow bg-base-200"),o(D,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(M,"type","text"),o(M,"placeholder",B=t[8]("headers.namePlaceholder")),o(M,"class","input input-bordered input-sm flex-1"),o(O,"type","button"),o(O,"class","btn btn-sm btn-primary"),O.disabled=ue=!t[7].trim(),o(K,"class","flex gap-2"),o(F,"class","collapse-content space-y-2"),o(q,"class","collapse collapse-arrow bg-base-200"),o(re,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Qe,"type","button"),o(Qe,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(l,"class","form-control w-full")},m(z,He){j(z,l,He),Se&&Se.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),s(r,u),s(r,c),s(c,d),s(c,p),s(c,g),s(c,b),s(r,v),s(r,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);s(w,C),s(w,E),s(E,T),s(n,S),s(n,q),s(q,D),s(q,H),s(q,I),s(I,L),s(I,A),s(I,Z),s(I,Y),s(q,x),s(q,F),s(F,K),s(K,M),Q(M,t[7]),s(K,U),s(K,O),s(O,ie),s(F,ne),ce.m(F,null),s(n,$),s(n,te),s(te,re),s(te,ee),s(te,G),s(G,oe),s(G,ge),s(G,ye),s(G,Fe),s(te,je),s(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);s(we,Oe),s(we,Je),s(Je,Pe),s(n,Me),s(n,fe),s(fe,_e),s(fe,Be),s(fe,De),s(De,ke),s(De,me),s(De,Ve),s(De,Ie),s(fe,nt),s(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);s(Ne,Ye),s(Ne,Qe),s(Qe,de),Te||(Ze=[V(E,"click",t[9]),V(M,"input",t[23]),V(M,"keydown",t[13]),V(O,"click",t[11]),V(Je,"click",t[14]),V(Qe,"click",t[16])],Te=!0)},p(z,He){if(z[2]?Se?Se.p(z,He):(Se=Uc(z),Se.c(),Se.m(l,e)):Se&&(Se.d(1),Se=null),He[0]&256&&f!==(f=z[8]("headers.add")+"")&&k(d,f),He[0]&8&&m!==(m=z[3].length+"")&&k(g,m),He[0]&1288){Ue=ut(z[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=Nc(z,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=Jc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=z[8]("headers.add")+"")&&k(T,y),He[0]&256&&R!==(R=z[8]("headers.remove")+"")&&k(L,R),He[0]&16&&N!==(N=z[4].length+"")&&k(Z,N),He[0]&256&&B!==(B=z[8]("headers.namePlaceholder"))&&o(M,"placeholder",B),He[0]&128&&M.value!==z[7]&&Q(M,z[7]),He[0]&256&&J!==(J=z[8]("common.add")+"")&&k(ie,J),He[0]&128&&ue!==(ue=!z[7].trim())&&(O.disabled=ue),Ge===(Ge=mt(z))&&ce?ce.p(z,He):(ce.d(1),ce=Ge(z),ce&&(ce.c(),ce.m(F,null))),He[0]&256&&pe!==(pe=z[8]("headers.replace")+"")&&k(oe,pe),He[0]&32&&he!==(he=z[5].length+"")&&k(ye,he),He[0]&33056){qe=ut(z[5]);let X;for(X=0;X<qe.length;X+=1){const ft=Fc(z,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=Gc(ft),Re[X].c(),Re[X].m(we,Oe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&Le!==(Le=z[8]("headers.add")+"")&&k(Pe,Le),He[0]&256&&se!==(se=z[8]("headers.default")+"")&&k(ke,se),He[0]&64&&Ee!==(Ee=z[6].length+"")&&k(Ve,Ee),He[0]&131392){dt=ut(z[6]);let X;for(X=0;X<dt.length;X+=1){const ft=Oc(z,dt,X);We[X]?We[X].p(ft,He):(We[X]=Kc(ft),We[X].c(),We[X].m(Ne,Ye))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=z[8]("headers.add")+"")&&k(de,ve)},i:tt,o:tt,d(z){z&&P(l),Se&&Se.d(),Gt(Ce,z),ce.d(),Gt(Re,z),Gt(We,z),Te=!1,bt(Ze)}}}function qg(t,l,e){let n;Dt(t,Rt,M=>e(8,n=M));let{value:r={}}=l,{label:i="Headers"}=l,{showHelp:u=!0}=l,{showLabel:c=!0}=l,f=[],d=[],p="",m=[],g=[],b=!1;function v(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(M){e(3,f=f.filter((B,U)=>U!==M))}function C(){const M=p.trim();M&&!d.includes(M)&&(e(4,d=[...d,M]),e(7,p=""),e(19,b=!0))}function E(M){e(4,d=d.filter((B,U)=>U!==M))}function y(M){M.key==="Enter"&&(M.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function S(M){e(5,m=m.filter((B,U)=>U!==M))}function q(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function D(M){e(6,g=g.filter((B,U)=>U!==M))}function H(M,B){M[B].key=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}function I(M,B){M[B].value=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}const R=M=>w(M);function L(){p=this.value,e(7,p)}const A=M=>E(M);function N(M,B){M[B].key=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}function Z(M,B){M[B].value=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}const Y=M=>S(M);function x(M,B){M[B].key=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}function F(M,B){M[B].value=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}const K=M=>D(M);return t.$$set=M=>{"value"in M&&e(18,r=M.value),"label"in M&&e(0,i=M.label),"showHelp"in M&&e(1,u=M.showHelp),"showLabel"in M&&e(2,c=M.showLabel)},t.$$.update=()=>{if(t.$$.dirty[0]&786552){!b&&(r.add||r.remove||r.replace||r.default)&&(e(3,f=Object.entries(r.add||{}).map(([O,J])=>({key:O,value:String(J)}))),e(4,d=[...r.remove||[]]),e(5,m=Object.entries(r.replace||{}).map(([O,J])=>({key:O,value:String(J)}))),e(6,g=Object.entries(r.default||{}).map(([O,J])=>({key:O,value:String(J)}))),e(19,b=!0));const M={};f.filter(O=>O.key.trim()).forEach(O=>{M[O.key]=O.value}),e(18,r.add=Object.keys(M).length>0?M:void 0,r),e(18,r.remove=d.length>0?d:void 0,r);const B={};m.filter(O=>O.key.trim()).forEach(O=>{B[O.key]=O.value}),e(18,r.replace=Object.keys(B).length>0?B:void 0,r);const U={};g.filter(O=>O.key.trim()).forEach(O=>{U[O.key]=O.value}),e(18,r.default=Object.keys(U).length>0?U:void 0,r)}},[i,u,c,f,d,m,g,p,n,v,w,C,E,y,T,S,q,D,r,b,H,I,R,L,A,N,Z,Y,x,F,K]}class t2 extends Vt{constructor(l){super(),Ut(this,l,qg,Rg,At,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function Qc(t,l,e){const n=t.slice();return n[31]=l[e],n[32]=l,n[33]=e,n}function Yc(t,l,e){const n=t.slice();return n[31]=l[e],n[34]=l,n[33]=e,n}function Zc(t,l,e){const n=t.slice();return n[31]=l[e],n[33]=e,n}function Xc(t,l,e){const n=t.slice();return n[31]=l[e],n[36]=l,n[33]=e,n}function xc(t){let l,e,n,r,i=t[1]&&$c();return{c(){l=a("div"),e=a("span"),n=_(t[0]),r=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(l,"class","label")},m(u,c){j(u,l,c),s(l,e),s(e,n),s(l,r),i&&i.m(l,null)},p(u,c){c[0]&1&&k(n,u[0]),u[1]?i||(i=$c(),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(u){u&&P(l),i&&i.d()}}}function $c(t){let l;return{c(){l=a("span"),l.textContent="Support JSON values and dynamic expressions",o(l,"class","label-text-alt text-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function ed(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[20].call(e,t[36],t[33])}function g(){t[21].call(i,t[36],t[33])}function b(){return t[22](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.name"))&&o(e,"placeholder",n),w[0]&8&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.value"))&&o(i,"placeholder",u),w[0]&8&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Hg(t){let l,e=t[8]("body.empty")+"",n;return{c(){l=a("p"),n=_(e),o(l,"class","text-xs text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&256&&e!==(e=r[8]("body.empty")+"")&&k(n,e)},d(r){r&&P(l)}}}function Pg(t){let l,e=ut(t[4]),n=[];for(let r=0;r<e.length;r+=1)n[r]=td(Zc(t,e,r));return{c(){l=a("div");for(let r=0;r<n.length;r+=1)n[r].c();o(l,"class","flex flex-wrap gap-2 mt-2")},m(r,i){j(r,l,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(l,null)},p(r,i){if(i[0]&4112){e=ut(r[4]);let u;for(u=0;u<e.length;u+=1){const c=Zc(r,e,u);n[u]?n[u].p(c,i):(n[u]=td(c),n[u].c(),n[u].m(l,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function td(t){let l,e=t[31]+"",n,r,i,u,c,f;function d(){return t[24](t[33])}return{c(){l=a("div"),n=_(e),r=h(),i=a("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(l,"class","badge badge-lg gap-2")},m(p,m){j(p,l,m),s(l,n),s(l,r),s(l,i),s(l,u),c||(f=V(i,"click",d),c=!0)},p(p,m){t=p,m[0]&16&&e!==(e=t[31]+"")&&k(n,e)},d(p){p&&P(l),c=!1,f()}}}function ld(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[25].call(e,t[34],t[33])}function g(){t[26].call(i,t[34],t[33])}function b(){return t[27](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.name"))&&o(e,"placeholder",n),w[0]&32&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.value"))&&o(i,"placeholder",u),w[0]&32&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function sd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[28].call(e,t[32],t[33])}function g(){t[29].call(i,t[32],t[33])}function b(){return t[30](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("headers.name"))&&o(e,"placeholder",n),w[0]&64&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("headers.value"))&&o(i,"placeholder",u),w[0]&64&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function jg(t){let l,e,n,r,i,u,c,f=t[8]("body.add")+"",d,p,m=t[3].length+"",g,b,v,w,C,E,y=t[8]("body.add")+"",T,S,q,D,H,I,R=t[8]("body.remove")+"",L,A,N=t[4].length+"",Z,Y,x,F,K,M,B,U,O,J=t[8]("common.add")+"",ie,ue,ne,$,te,re,ee,G,pe=t[8]("body.replace")+"",oe,ge,he=t[5].length+"",ye,Fe,je,we,Oe,Je,Le=t[8]("body.add")+"",Pe,Me,fe,_e,Be,De,se=t[8]("body.default")+"",ke,me,Ee=t[6].length+"",Ve,Ie,nt,Ne,Ye,Qe,ve=t[8]("body.add")+"",de,Te,Ze,Se=t[2]&&xc(t),Ue=ut(t[3]),Ce=[];for(let z=0;z<Ue.length;z+=1)Ce[z]=ed(Xc(t,Ue,z));function mt(z,He){return z[4].length>0?Pg:Hg}let Ge=mt(t),ce=Ge(t),qe=ut(t[5]),Re=[];for(let z=0;z<qe.length;z+=1)Re[z]=ld(Yc(t,qe,z));let dt=ut(t[6]),We=[];for(let z=0;z<dt.length;z+=1)We[z]=sd(Qc(t,dt,z));return{c(){l=a("div"),Se&&Se.c(),e=h(),n=a("div"),r=a("div"),i=a("input"),u=h(),c=a("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),v=h(),w=a("div");for(let z=0;z<Ce.length;z+=1)Ce[z].c();C=h(),E=a("button"),T=_(y),S=h(),q=a("div"),D=a("input"),H=h(),I=a("div"),L=_(R),A=_(" ("),Z=_(N),Y=_(")"),x=h(),F=a("div"),K=a("div"),M=a("input"),U=h(),O=a("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=a("div"),re=a("input"),ee=h(),G=a("div"),oe=_(pe),ge=_(" ("),ye=_(he),Fe=_(")"),je=h(),we=a("div");for(let z=0;z<Re.length;z+=1)Re[z].c();Oe=h(),Je=a("button"),Pe=_(Le),Me=h(),fe=a("div"),_e=a("input"),Be=h(),De=a("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Ie=_(")"),nt=h(),Ne=a("div");for(let z=0;z<We.length;z+=1)We[z].c();Ye=h(),Qe=a("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(r,"class","collapse collapse-arrow bg-base-200"),o(D,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(M,"type","text"),o(M,"placeholder",B=t[8]("headers.name")),o(M,"class","input input-bordered input-sm flex-1"),o(O,"type","button"),o(O,"class","btn btn-sm btn-primary"),O.disabled=ue=!t[7].trim(),o(K,"class","flex gap-2"),o(F,"class","collapse-content space-y-2"),o(q,"class","collapse collapse-arrow bg-base-200"),o(re,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Qe,"type","button"),o(Qe,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(l,"class","form-control w-full")},m(z,He){j(z,l,He),Se&&Se.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),s(r,u),s(r,c),s(c,d),s(c,p),s(c,g),s(c,b),s(r,v),s(r,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);s(w,C),s(w,E),s(E,T),s(n,S),s(n,q),s(q,D),s(q,H),s(q,I),s(I,L),s(I,A),s(I,Z),s(I,Y),s(q,x),s(q,F),s(F,K),s(K,M),Q(M,t[7]),s(K,U),s(K,O),s(O,ie),s(F,ne),ce.m(F,null),s(n,$),s(n,te),s(te,re),s(te,ee),s(te,G),s(G,oe),s(G,ge),s(G,ye),s(G,Fe),s(te,je),s(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);s(we,Oe),s(we,Je),s(Je,Pe),s(n,Me),s(n,fe),s(fe,_e),s(fe,Be),s(fe,De),s(De,ke),s(De,me),s(De,Ve),s(De,Ie),s(fe,nt),s(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);s(Ne,Ye),s(Ne,Qe),s(Qe,de),Te||(Ze=[V(E,"click",t[9]),V(M,"input",t[23]),V(M,"keydown",t[13]),V(O,"click",t[11]),V(Je,"click",t[14]),V(Qe,"click",t[16])],Te=!0)},p(z,He){if(z[2]?Se?Se.p(z,He):(Se=xc(z),Se.c(),Se.m(l,e)):Se&&(Se.d(1),Se=null),He[0]&256&&f!==(f=z[8]("body.add")+"")&&k(d,f),He[0]&8&&m!==(m=z[3].length+"")&&k(g,m),He[0]&1288){Ue=ut(z[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=Xc(z,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=ed(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=z[8]("body.add")+"")&&k(T,y),He[0]&256&&R!==(R=z[8]("body.remove")+"")&&k(L,R),He[0]&16&&N!==(N=z[4].length+"")&&k(Z,N),He[0]&256&&B!==(B=z[8]("headers.name"))&&o(M,"placeholder",B),He[0]&128&&M.value!==z[7]&&Q(M,z[7]),He[0]&256&&J!==(J=z[8]("common.add")+"")&&k(ie,J),He[0]&128&&ue!==(ue=!z[7].trim())&&(O.disabled=ue),Ge===(Ge=mt(z))&&ce?ce.p(z,He):(ce.d(1),ce=Ge(z),ce&&(ce.c(),ce.m(F,null))),He[0]&256&&pe!==(pe=z[8]("body.replace")+"")&&k(oe,pe),He[0]&32&&he!==(he=z[5].length+"")&&k(ye,he),He[0]&33056){qe=ut(z[5]);let X;for(X=0;X<qe.length;X+=1){const ft=Yc(z,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=ld(ft),Re[X].c(),Re[X].m(we,Oe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&Le!==(Le=z[8]("body.add")+"")&&k(Pe,Le),He[0]&256&&se!==(se=z[8]("body.default")+"")&&k(ke,se),He[0]&64&&Ee!==(Ee=z[6].length+"")&&k(Ve,Ee),He[0]&131392){dt=ut(z[6]);let X;for(X=0;X<dt.length;X+=1){const ft=Qc(z,dt,X);We[X]?We[X].p(ft,He):(We[X]=sd(ft),We[X].c(),We[X].m(Ne,Ye))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=z[8]("body.add")+"")&&k(de,ve)},i:tt,o:tt,d(z){z&&P(l),Se&&Se.d(),Gt(Ce,z),ce.d(),Gt(Re,z),Gt(We,z),Te=!1,bt(Ze)}}}function Lg(t,l,e){let n;Dt(t,Rt,M=>e(8,n=M));let{value:r={}}=l,{label:i="Body"}=l,{showHelp:u=!0}=l,{showLabel:c=!0}=l,f=[],d=[],p="",m=[],g=[],b=!1;function v(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(M){e(3,f=f.filter((B,U)=>U!==M))}function C(){const M=p.trim();M&&!d.includes(M)&&(e(4,d=[...d,M]),e(7,p=""),e(19,b=!0))}function E(M){e(4,d=d.filter((B,U)=>U!==M))}function y(M){M.key==="Enter"&&(M.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function S(M){e(5,m=m.filter((B,U)=>U!==M))}function q(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function D(M){e(6,g=g.filter((B,U)=>U!==M))}function H(M,B){M[B].key=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}function I(M,B){M[B].value=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}const R=M=>w(M);function L(){p=this.value,e(7,p)}const A=M=>E(M);function N(M,B){M[B].key=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}function Z(M,B){M[B].value=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}const Y=M=>S(M);function x(M,B){M[B].key=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}function F(M,B){M[B].value=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}const K=M=>D(M);return t.$$set=M=>{"value"in M&&e(18,r=M.value),"label"in M&&e(0,i=M.label),"showHelp"in M&&e(1,u=M.showHelp),"showLabel"in M&&e(2,c=M.showLabel)},t.$$.update=()=>{if(t.$$.dirty[0]&786552){!b&&(r.add||r.remove||r.replace||r.default)&&(e(3,f=Object.entries(r.add||{}).map(([O,J])=>({key:O,value:typeof J=="string"?J:JSON.stringify(J)}))),e(4,d=[...r.remove||[]]),e(5,m=Object.entries(r.replace||{}).map(([O,J])=>({key:O,value:typeof J=="string"?J:JSON.stringify(J)}))),e(6,g=Object.entries(r.default||{}).map(([O,J])=>({key:O,value:typeof J=="string"?J:JSON.stringify(J)}))),e(19,b=!0));const M={};f.filter(O=>O.key.trim()).forEach(O=>{try{M[O.key]=JSON.parse(O.value)}catch{M[O.key]=O.value}}),e(18,r.add=Object.keys(M).length>0?M:void 0,r),e(18,r.remove=d.length>0?d:void 0,r);const B={};m.filter(O=>O.key.trim()).forEach(O=>{try{B[O.key]=JSON.parse(O.value)}catch{B[O.key]=O.value}}),e(18,r.replace=Object.keys(B).length>0?B:void 0,r);const U={};g.filter(O=>O.key.trim()).forEach(O=>{try{U[O.key]=JSON.parse(O.value)}catch{U[O.key]=O.value}}),e(18,r.default=Object.keys(U).length>0?U:void 0,r)}},[i,u,c,f,d,m,g,p,n,v,w,C,E,y,T,S,q,D,r,b,H,I,R,L,A,N,Z,Y,x,F,K]}class l2 extends Vt{constructor(l){super(),Ut(this,l,Lg,jg,At,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function od(t,l,e){const n=t.slice();return n[31]=l[e],n[32]=l,n[33]=e,n}function nd(t,l,e){const n=t.slice();return n[31]=l[e],n[34]=l,n[33]=e,n}function rd(t,l,e){const n=t.slice();return n[31]=l[e],n[33]=e,n}function ad(t,l,e){const n=t.slice();return n[31]=l[e],n[36]=l,n[33]=e,n}function id(t){let l,e,n,r,i=t[1]&&ud();return{c(){l=a("div"),e=a("span"),n=_(t[0]),r=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(l,"class","label")},m(u,c){j(u,l,c),s(l,e),s(e,n),s(l,r),i&&i.m(l,null)},p(u,c){c[0]&1&&k(n,u[0]),u[1]?i||(i=ud(),i.c(),i.m(l,null)):i&&(i.d(1),i=null)},d(u){u&&P(l),i&&i.d()}}}function ud(t){let l,e,n;return{c(){l=a("span"),e=_("Support dynamic expressions: "),n=a("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,e),s(l,n)},d(r){r&&P(l)}}}function fd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[20].call(e,t[36],t[33])}function g(){t[21].call(i,t[36],t[33])}function b(){return t[22](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Dg(t){let l,e=t[8]("query.empty")+"",n;return{c(){l=a("p"),n=_(e),o(l,"class","text-xs text-gray-500")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&256&&e!==(e=r[8]("query.empty")+"")&&k(n,e)},d(r){r&&P(l)}}}function Ig(t){let l,e=ut(t[4]),n=[];for(let r=0;r<e.length;r+=1)n[r]=cd(rd(t,e,r));return{c(){l=a("div");for(let r=0;r<n.length;r+=1)n[r].c();o(l,"class","flex flex-wrap gap-2 mt-2")},m(r,i){j(r,l,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(l,null)},p(r,i){if(i[0]&4112){e=ut(r[4]);let u;for(u=0;u<e.length;u+=1){const c=rd(r,e,u);n[u]?n[u].p(c,i):(n[u]=cd(c),n[u].c(),n[u].m(l,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function cd(t){let l,e=t[31]+"",n,r,i,u,c,f;function d(){return t[24](t[33])}return{c(){l=a("div"),n=_(e),r=h(),i=a("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(l,"class","badge badge-lg gap-2")},m(p,m){j(p,l,m),s(l,n),s(l,r),s(l,i),s(l,u),c||(f=V(i,"click",d),c=!0)},p(p,m){t=p,m[0]&16&&e!==(e=t[31]+"")&&k(n,e)},d(p){p&&P(l),c=!1,f()}}}function dd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[25].call(e,t[34],t[33])}function g(){t[26].call(i,t[34],t[33])}function b(){return t[27](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function pd(t){let l,e,n,r,i,u,c,f,d,p;function m(){t[28].call(e,t[32],t[33])}function g(){t[29].call(i,t[32],t[33])}function b(){return t[30](t[33])}return{c(){l=a("div"),e=a("input"),r=h(),i=a("input"),c=h(),f=a("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=t[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=t[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(l,"class","flex gap-2")},m(v,w){j(v,l,w),s(l,e),Q(e,t[31].key),s(l,r),s(l,i),Q(i,t[31].value),s(l,c),s(l,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(v,w){t=v,w[0]&256&&n!==(n=t[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==t[31].key&&Q(e,t[31].key),w[0]&256&&u!==(u=t[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==t[31].value&&Q(i,t[31].value)},d(v){v&&P(l),d=!1,bt(p)}}}function Bg(t){let l,e,n,r,i,u,c,f=t[8]("query.add")+"",d,p,m=t[3].length+"",g,b,v,w,C,E,y=t[8]("query.add")+"",T,S,q,D,H,I,R=t[8]("query.remove")+"",L,A,N=t[4].length+"",Z,Y,x,F,K,M,B,U,O,J=t[8]("common.add")+"",ie,ue,ne,$,te,re,ee,G,pe=t[8]("query.replace")+"",oe,ge,he=t[5].length+"",ye,Fe,je,we,Oe,Je,Le=t[8]("query.add")+"",Pe,Me,fe,_e,Be,De,se=t[8]("query.default")+"",ke,me,Ee=t[6].length+"",Ve,Ie,nt,Ne,Ye,Qe,ve=t[8]("query.add")+"",de,Te,Ze,Se=t[2]&&id(t),Ue=ut(t[3]),Ce=[];for(let z=0;z<Ue.length;z+=1)Ce[z]=fd(ad(t,Ue,z));function mt(z,He){return z[4].length>0?Ig:Dg}let Ge=mt(t),ce=Ge(t),qe=ut(t[5]),Re=[];for(let z=0;z<qe.length;z+=1)Re[z]=dd(nd(t,qe,z));let dt=ut(t[6]),We=[];for(let z=0;z<dt.length;z+=1)We[z]=pd(od(t,dt,z));return{c(){l=a("div"),Se&&Se.c(),e=h(),n=a("div"),r=a("div"),i=a("input"),u=h(),c=a("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),v=h(),w=a("div");for(let z=0;z<Ce.length;z+=1)Ce[z].c();C=h(),E=a("button"),T=_(y),S=h(),q=a("div"),D=a("input"),H=h(),I=a("div"),L=_(R),A=_(" ("),Z=_(N),Y=_(")"),x=h(),F=a("div"),K=a("div"),M=a("input"),U=h(),O=a("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=a("div"),re=a("input"),ee=h(),G=a("div"),oe=_(pe),ge=_(" ("),ye=_(he),Fe=_(")"),je=h(),we=a("div");for(let z=0;z<Re.length;z+=1)Re[z].c();Oe=h(),Je=a("button"),Pe=_(Le),Me=h(),fe=a("div"),_e=a("input"),Be=h(),De=a("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Ie=_(")"),nt=h(),Ne=a("div");for(let z=0;z<We.length;z+=1)We[z].c();Ye=h(),Qe=a("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(r,"class","collapse collapse-arrow bg-base-200"),o(D,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(M,"type","text"),o(M,"placeholder",B=t[8]("query.namePlaceholder")),o(M,"class","input input-bordered input-sm flex-1"),o(O,"type","button"),o(O,"class","btn btn-sm btn-primary"),O.disabled=ue=!t[7].trim(),o(K,"class","flex gap-2"),o(F,"class","collapse-content space-y-2"),o(q,"class","collapse collapse-arrow bg-base-200"),o(re,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Qe,"type","button"),o(Qe,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(l,"class","form-control w-full")},m(z,He){j(z,l,He),Se&&Se.m(l,null),s(l,e),s(l,n),s(n,r),s(r,i),s(r,u),s(r,c),s(c,d),s(c,p),s(c,g),s(c,b),s(r,v),s(r,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);s(w,C),s(w,E),s(E,T),s(n,S),s(n,q),s(q,D),s(q,H),s(q,I),s(I,L),s(I,A),s(I,Z),s(I,Y),s(q,x),s(q,F),s(F,K),s(K,M),Q(M,t[7]),s(K,U),s(K,O),s(O,ie),s(F,ne),ce.m(F,null),s(n,$),s(n,te),s(te,re),s(te,ee),s(te,G),s(G,oe),s(G,ge),s(G,ye),s(G,Fe),s(te,je),s(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);s(we,Oe),s(we,Je),s(Je,Pe),s(n,Me),s(n,fe),s(fe,_e),s(fe,Be),s(fe,De),s(De,ke),s(De,me),s(De,Ve),s(De,Ie),s(fe,nt),s(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);s(Ne,Ye),s(Ne,Qe),s(Qe,de),Te||(Ze=[V(E,"click",t[9]),V(M,"input",t[23]),V(M,"keydown",t[13]),V(O,"click",t[11]),V(Je,"click",t[14]),V(Qe,"click",t[16])],Te=!0)},p(z,He){if(z[2]?Se?Se.p(z,He):(Se=id(z),Se.c(),Se.m(l,e)):Se&&(Se.d(1),Se=null),He[0]&256&&f!==(f=z[8]("query.add")+"")&&k(d,f),He[0]&8&&m!==(m=z[3].length+"")&&k(g,m),He[0]&1288){Ue=ut(z[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=ad(z,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=fd(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=z[8]("query.add")+"")&&k(T,y),He[0]&256&&R!==(R=z[8]("query.remove")+"")&&k(L,R),He[0]&16&&N!==(N=z[4].length+"")&&k(Z,N),He[0]&256&&B!==(B=z[8]("query.namePlaceholder"))&&o(M,"placeholder",B),He[0]&128&&M.value!==z[7]&&Q(M,z[7]),He[0]&256&&J!==(J=z[8]("common.add")+"")&&k(ie,J),He[0]&128&&ue!==(ue=!z[7].trim())&&(O.disabled=ue),Ge===(Ge=mt(z))&&ce?ce.p(z,He):(ce.d(1),ce=Ge(z),ce&&(ce.c(),ce.m(F,null))),He[0]&256&&pe!==(pe=z[8]("query.replace")+"")&&k(oe,pe),He[0]&32&&he!==(he=z[5].length+"")&&k(ye,he),He[0]&33056){qe=ut(z[5]);let X;for(X=0;X<qe.length;X+=1){const ft=nd(z,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=dd(ft),Re[X].c(),Re[X].m(we,Oe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&Le!==(Le=z[8]("query.add")+"")&&k(Pe,Le),He[0]&256&&se!==(se=z[8]("query.default")+"")&&k(ke,se),He[0]&64&&Ee!==(Ee=z[6].length+"")&&k(Ve,Ee),He[0]&131392){dt=ut(z[6]);let X;for(X=0;X<dt.length;X+=1){const ft=od(z,dt,X);We[X]?We[X].p(ft,He):(We[X]=pd(ft),We[X].c(),We[X].m(Ne,Ye))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=z[8]("query.add")+"")&&k(de,ve)},i:tt,o:tt,d(z){z&&P(l),Se&&Se.d(),Gt(Ce,z),ce.d(),Gt(Re,z),Gt(We,z),Te=!1,bt(Ze)}}}function Ag(t,l,e){let n;Dt(t,Rt,M=>e(8,n=M));let{value:r={}}=l,{label:i="Query Parameters"}=l,{showHelp:u=!0}=l,{showLabel:c=!0}=l,f=[],d=[],p="",m=[],g=[],b=!1;function v(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(M){e(3,f=f.filter((B,U)=>U!==M))}function C(){const M=p.trim();M&&!d.includes(M)&&(e(4,d=[...d,M]),e(7,p=""),e(19,b=!0))}function E(M){e(4,d=d.filter((B,U)=>U!==M))}function y(M){M.key==="Enter"&&(M.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function S(M){e(5,m=m.filter((B,U)=>U!==M))}function q(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function D(M){e(6,g=g.filter((B,U)=>U!==M))}function H(M,B){M[B].key=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}function I(M,B){M[B].value=this.value,e(3,f),e(19,b),e(18,r),e(4,d),e(5,m),e(6,g)}const R=M=>w(M);function L(){p=this.value,e(7,p)}const A=M=>E(M);function N(M,B){M[B].key=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}function Z(M,B){M[B].value=this.value,e(5,m),e(19,b),e(18,r),e(3,f),e(4,d),e(6,g)}const Y=M=>S(M);function x(M,B){M[B].key=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}function F(M,B){M[B].value=this.value,e(6,g),e(19,b),e(18,r),e(3,f),e(4,d),e(5,m)}const K=M=>D(M);return t.$$set=M=>{"value"in M&&e(18,r=M.value),"label"in M&&e(0,i=M.label),"showHelp"in M&&e(1,u=M.showHelp),"showLabel"in M&&e(2,c=M.showLabel)},t.$$.update=()=>{if(t.$$.dirty[0]&786552){!b&&(r.add||r.remove||r.replace||r.default)&&(e(3,f=Object.entries(r.add||{}).map(([O,J])=>({key:O,value:String(J)}))),e(4,d=[...r.remove||[]]),e(5,m=Object.entries(r.replace||{}).map(([O,J])=>({key:O,value:String(J)}))),e(6,g=Object.entries(r.default||{}).map(([O,J])=>({key:O,value:String(J)}))),e(19,b=!0));const M={};f.filter(O=>O.key.trim()).forEach(O=>{M[O.key]=O.value}),e(18,r.add=Object.keys(M).length>0?M:void 0,r),e(18,r.remove=d.length>0?d:void 0,r);const B={};m.filter(O=>O.key.trim()).forEach(O=>{B[O.key]=O.value}),e(18,r.replace=Object.keys(B).length>0?B:void 0,r);const U={};g.filter(O=>O.key.trim()).forEach(O=>{U[O.key]=O.value}),e(18,r.default=Object.keys(U).length>0?U:void 0,r)}},[i,u,c,f,d,m,g,p,n,v,w,C,E,y,T,S,q,D,r,b,H,I,R,L,A,N,Z,Y,x,F,K]}class s2 extends Vt{constructor(l){super(),Ut(this,l,Ag,Bg,At,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function hd(t){let l,e,n=t[7]("upstream.title",{values:{index:t[1]+1}})+"",r,i,u,c,f,d,p,m,g,b,v,w,C;return{c(){l=a("div"),e=a("h3"),r=_(n),i=h(),u=a("div"),c=a("button"),f=ae("svg"),d=ae("path"),m=h(),g=a("button"),b=_("\u2715"),o(e,"class","font-semibold"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline btn-square"),o(c,"title",p=t[7]("routeCard.duplicate")),o(g,"type","button"),o(g,"class","btn btn-sm btn-error btn-square"),o(g,"title",v=t[7]("upstream.remove")),o(u,"class","flex gap-2"),o(l,"class","flex justify-between items-center mb-4")},m(E,y){j(E,l,y),s(l,e),s(e,r),s(l,i),s(l,u),s(u,c),s(c,f),s(f,d),s(u,m),s(u,g),s(g,b),w||(C=[V(c,"click",function(){ko(t[3])&&t[3].apply(this,arguments)}),V(g,"click",function(){ko(t[2])&&t[2].apply(this,arguments)})],w=!0)},p(E,y){t=E,y&130&&n!==(n=t[7]("upstream.title",{values:{index:t[1]+1}})+"")&&k(r,n),y&128&&p!==(p=t[7]("routeCard.duplicate"))&&o(c,"title",p),y&128&&v!==(v=t[7]("upstream.remove"))&&o(g,"title",v)},d(E){E&&P(l),w=!1,bt(C)}}}function md(t){let l,e,n=t[6].find(bd)?.message+"",r,i;return{c(){l=a("label"),e=a("span"),r=_(n),o(e,"class","label-text-alt text-error"),o(l,"class","label"),o(l,"for",i="upstream-target-"+t[1])},m(u,c){j(u,l,c),s(l,e),s(e,r)},p(u,c){c&64&&n!==(n=u[6].find(bd)?.message+"")&&k(r,n),c&2&&i!==(i="upstream-target-"+u[1])&&o(l,"for",i)},d(u){u&&P(l)}}}function Og(t){let l,e,n,r,i,u,c,f=t[7]("upstream.targetUrl")+"",d,p,m,g,b,v,w,C,E,y=t[6].some(gd),T,S,q,D,H,I=t[7]("upstream.weight")+"",R,L,A,N=t[7]("upstream.weightHelp")+"",Z,Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge=t[7]("upstream.transformerHelp")+"",he,ye,Fe,je,we,Oe,Je=t[7]("headers.title")+"",Le,Pe,Me,fe,_e,Be,De,se,ke,me,Ee=t[7]("body.title")+"",Ve,Ie,nt,Ne,Ye,Qe,ve,de,Te,Ze,Se=t[7]("query.title")+"",Ue,Ce,mt,Ge,ce,qe,Re,dt,We=t[4]&&hd(t),z=y&&md(t);function He(ze){t[11](ze)}let X={label:t[7]("upstream.transformer")};t[5]!==void 0&&(X.plugin=t[5]),ee=new e2({props:X}),bl.push(()=>Rl(ee,"plugin",He));function ft(ze){t[12](ze)}let Ht={label:t[7]("headers.title"),showHelp:!1,showLabel:!1};t[0].headers!==void 0&&(Ht.value=t[0].headers),fe=new t2({props:Ht}),bl.push(()=>Rl(fe,"value",ft));function Ke(ze){t[13](ze)}let _t={label:t[7]("body.title"),showHelp:!1,showLabel:!1};t[0].body!==void 0&&(_t.value=t[0].body),Ne=new l2({props:_t}),bl.push(()=>Rl(Ne,"value",Ke));function lt(ze){t[14](ze)}let it={label:t[7]("query.title"),showHelp:!1,showLabel:!1};return t[0].query!==void 0&&(it.value=t[0].query),Ge=new s2({props:it}),bl.push(()=>Rl(Ge,"value",lt)),{c(){l=a("div"),e=a("div"),We&&We.c(),n=h(),r=a("div"),i=a("div"),u=a("label"),c=a("span"),d=_(f),p=h(),m=a("span"),m.textContent="*",b=h(),v=a("input"),E=h(),z&&z.c(),T=h(),S=a("div"),q=a("div"),D=a("label"),H=a("span"),R=_(I),L=h(),A=a("span"),Z=_(N),x=h(),F=a("input"),M=h(),B=a("div"),U=a("label"),O=a("span"),O.textContent="Priority",J=h(),ie=a("span"),ie.textContent="Failover order",ne=h(),$=a("input"),re=h(),Et(ee.$$.fragment),pe=h(),oe=a("div"),he=_(ge),ye=h(),Fe=a("div"),je=a("input"),we=h(),Oe=a("div"),Le=_(Je),Pe=h(),Me=a("div"),Et(fe.$$.fragment),Be=h(),De=a("div"),se=a("input"),ke=h(),me=a("div"),Ve=_(Ee),Ie=h(),nt=a("div"),Et(Ne.$$.fragment),Qe=h(),ve=a("div"),de=a("input"),Te=h(),Ze=a("div"),Ue=_(Se),Ce=h(),mt=a("div"),Et(Ge.$$.fragment),o(m,"class","text-error"),o(c,"class","label-text font-semibold"),o(u,"class","label"),o(u,"for",g="upstream-target-"+t[1]),o(v,"id",w="upstream-target-"+t[1]),o(v,"type","url"),o(v,"placeholder",C=t[7]("upstream.targetPlaceholder")),o(v,"class","input input-bordered"),v.required=!0,le(v,"input-error",t[6].some(_d)),o(i,"class","form-control"),o(H,"class","label-text"),o(A,"class","label-text-alt text-xs"),o(D,"class","label"),o(D,"for",Y="upstream-weight-"+t[1]),o(F,"id",K="upstream-weight-"+t[1]),o(F,"type","number"),o(F,"placeholder","100"),o(F,"class","input input-bordered"),o(F,"min","1"),o(q,"class","form-control"),o(O,"class","label-text"),o(ie,"class","label-text-alt text-xs"),o(U,"class","label"),o(U,"for",ue="upstream-priority-"+t[1]),o($,"id",te="upstream-priority-"+t[1]),o($,"type","number"),o($,"placeholder","1"),o($,"class","input input-bordered"),o($,"min","0"),o(B,"class","form-control"),o(S,"class","grid grid-cols-2 gap-4"),o(oe,"class","divider text-sm font-semibold"),o(je,"type","checkbox"),o(Oe,"class","collapse-title text-sm font-medium"),o(Me,"class","collapse-content"),o(Fe,"class","collapse collapse-arrow bg-base-200"),o(se,"type","checkbox"),o(me,"class","collapse-title text-sm font-medium"),o(nt,"class","collapse-content"),o(De,"class","collapse collapse-arrow bg-base-200"),o(de,"type","checkbox"),o(Ze,"class","collapse-title text-sm font-medium"),o(mt,"class","collapse-content"),o(ve,"class","collapse collapse-arrow bg-base-200"),o(r,"class","grid grid-cols-1 gap-4"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-100 shadow-sm border border-base-300")},m(ze,Xe){j(ze,l,Xe),s(l,e),We&&We.m(e,null),s(e,n),s(e,r),s(r,i),s(i,u),s(u,c),s(c,d),s(c,p),s(c,m),s(i,b),s(i,v),Q(v,t[0].target),s(i,E),z&&z.m(i,null),s(r,T),s(r,S),s(S,q),s(q,D),s(D,H),s(H,R),s(D,L),s(D,A),s(A,Z),s(q,x),s(q,F),Q(F,t[0].weight),s(S,M),s(S,B),s(B,U),s(U,O),s(U,J),s(U,ie),s(B,ne),s(B,$),Q($,t[0].priority),s(r,re),yt(ee,r,null),s(r,pe),s(r,oe),s(oe,he),s(r,ye),s(r,Fe),s(Fe,je),s(Fe,we),s(Fe,Oe),s(Oe,Le),s(Fe,Pe),s(Fe,Me),yt(fe,Me,null),s(r,Be),s(r,De),s(De,se),s(De,ke),s(De,me),s(me,Ve),s(De,Ie),s(De,nt),yt(Ne,nt,null),s(r,Qe),s(r,ve),s(ve,de),s(ve,Te),s(ve,Ze),s(Ze,Ue),s(ve,Ce),s(ve,mt),yt(Ge,mt,null),qe=!0,Re||(dt=[V(v,"input",t[8]),V(F,"input",t[9]),V($,"input",t[10])],Re=!0)},p(ze,[Xe]){ze[4]?We?We.p(ze,Xe):(We=hd(ze),We.c(),We.m(e,n)):We&&(We.d(1),We=null),(!qe||Xe&128)&&f!==(f=ze[7]("upstream.targetUrl")+"")&&k(d,f),(!qe||Xe&2&&g!==(g="upstream-target-"+ze[1]))&&o(u,"for",g),(!qe||Xe&2&&w!==(w="upstream-target-"+ze[1]))&&o(v,"id",w),(!qe||Xe&128&&C!==(C=ze[7]("upstream.targetPlaceholder")))&&o(v,"placeholder",C),Xe&1&&v.value!==ze[0].target&&Q(v,ze[0].target),(!qe||Xe&64)&&le(v,"input-error",ze[6].some(_d)),Xe&64&&(y=ze[6].some(gd)),y?z?z.p(ze,Xe):(z=md(ze),z.c(),z.m(i,null)):z&&(z.d(1),z=null),(!qe||Xe&128)&&I!==(I=ze[7]("upstream.weight")+"")&&k(R,I),(!qe||Xe&128)&&N!==(N=ze[7]("upstream.weightHelp")+"")&&k(Z,N),(!qe||Xe&2&&Y!==(Y="upstream-weight-"+ze[1]))&&o(D,"for",Y),(!qe||Xe&2&&K!==(K="upstream-weight-"+ze[1]))&&o(F,"id",K),Xe&1&&St(F.value)!==ze[0].weight&&Q(F,ze[0].weight),(!qe||Xe&2&&ue!==(ue="upstream-priority-"+ze[1]))&&o(U,"for",ue),(!qe||Xe&2&&te!==(te="upstream-priority-"+ze[1]))&&o($,"id",te),Xe&1&&St($.value)!==ze[0].priority&&Q($,ze[0].priority);const Bt={};Xe&128&&(Bt.label=ze[7]("upstream.transformer")),!G&&Xe&32&&(G=!0,Bt.plugin=ze[5],Sl(()=>G=!1)),ee.$set(Bt),(!qe||Xe&128)&&ge!==(ge=ze[7]("upstream.transformerHelp")+"")&&k(he,ge),(!qe||Xe&128)&&Je!==(Je=ze[7]("headers.title")+"")&&k(Le,Je);const at={};Xe&128&&(at.label=ze[7]("headers.title")),!_e&&Xe&1&&(_e=!0,at.value=ze[0].headers,Sl(()=>_e=!1)),fe.$set(at),(!qe||Xe&128)&&Ee!==(Ee=ze[7]("body.title")+"")&&k(Ve,Ee);const gt={};Xe&128&&(gt.label=ze[7]("body.title")),!Ye&&Xe&1&&(Ye=!0,gt.value=ze[0].body,Sl(()=>Ye=!1)),Ne.$set(gt),(!qe||Xe&128)&&Se!==(Se=ze[7]("query.title")+"")&&k(Ue,Se);const wt={};Xe&128&&(wt.label=ze[7]("query.title")),!ce&&Xe&1&&(ce=!0,wt.value=ze[0].query,Sl(()=>ce=!1)),Ge.$set(wt)},i(ze){qe||(et(ee.$$.fragment,ze),et(fe.$$.fragment,ze),et(Ne.$$.fragment,ze),et(Ge.$$.fragment,ze),qe=!0)},o(ze){st(ee.$$.fragment,ze),st(fe.$$.fragment,ze),st(Ne.$$.fragment,ze),st(Ge.$$.fragment,ze),qe=!1},d(ze){ze&&P(l),We&&We.d(),z&&z.d(),Ct(ee),Ct(fe),Ct(Ne),Ct(Ge),Re=!1,bt(dt)}}}const gd=t=>t.field.includes("target"),_d=t=>t.field.includes("target"),bd=t=>t.field.includes("target");function Fg(t,l,e){let n,r;Dt(t,Rt,y=>e(7,r=y));let{upstream:i}=l,{index:u}=l,{onRemove:c}=l,{onDuplicate:f}=l,{showHeader:d=!0}=l,p=i.plugins?.[0]||null;function m(){i.target=this.value,e(0,i),e(5,p)}function g(){i.weight=St(this.value),e(0,i),e(5,p)}function b(){i.priority=St(this.value),e(0,i),e(5,p)}function v(y){p=y,e(5,p)}function w(y){t.$$.not_equal(i.headers,y)&&(i.headers=y,e(0,i),e(5,p))}function C(y){t.$$.not_equal(i.body,y)&&(i.body=y,e(0,i),e(5,p))}function E(y){t.$$.not_equal(i.query,y)&&(i.query=y,e(0,i),e(5,p))}return t.$$set=y=>{"upstream"in y&&e(0,i=y.upstream),"index"in y&&e(1,u=y.index),"onRemove"in y&&e(2,c=y.onRemove),"onDuplicate"in y&&e(3,f=y.onDuplicate),"showHeader"in y&&e(4,d=y.showHeader)},t.$$.update=()=>{t.$$.dirty&1&&(e(0,i.headers=i.headers||{add:{},remove:[],default:{}},i),e(0,i.body=i.body||{add:{},remove:[],replace:{},default:{}},i),e(0,i.query=i.query||{add:{},remove:[],replace:{},default:{}},i)),t.$$.dirty&32&&e(0,i.plugins=p?[p]:void 0,i),t.$$.dirty&3&&e(6,n=gf(i,u))},[i,u,c,f,d,p,n,r,m,g,b,v,w,C,E]}class zg extends Vt{constructor(l){super(),Ut(this,l,Fg,Og,At,{upstream:0,index:1,onRemove:2,onDuplicate:3,showHeader:4})}}function vd(t,l,e){const n=t.slice();return n[22]=l[e].u,n[23]=l[e].i,n}function kd(t){let l,e,n=t[0].find(Sd)?.message+"",r;return{c(){l=a("div"),e=a("span"),r=_(n),o(l,"class","alert alert-error")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&1&&n!==(n=i[0].find(Sd)?.message+"")&&k(r,n)},d(i){i&&P(l)}}}function wd(t){let l;return{c(){l=a("span"),l.textContent="Transformer",o(l,"class","badge badge-sm badge-info mt-1")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function yd(t,l){let e,n,r=(l[22].priority||1)+"",i,u,c,f,d,p=l[22].target+"",m,g,b,v,w,C=(l[22].weight||100)+"",E,y,T,S,q,D,H,I,R,L,A,N,Z,Y,x,F,K,M,B,U,O=l[22].plugins&&l[22].plugins.length>0&&wd();function J(){return l[18](l[23])}function ie(){return l[19](l[23])}function ue(){return l[20](l[23])}return{key:t,first:null,c(){e=a("tr"),n=a("td"),i=_(r),u=h(),c=a("td"),f=a("div"),d=a("div"),m=_(p),b=h(),O&&O.c(),v=h(),w=a("td"),E=_(C),y=h(),T=a("td"),S=a("div"),q=a("button"),D=ae("svg"),H=ae("path"),R=h(),L=a("button"),A=ae("svg"),N=ae("path"),Y=h(),x=a("button"),F=ae("svg"),K=ae("path"),o(d,"class","font-bold truncate max-w-xs"),o(d,"title",g=l[22].target),o(f,"class","flex flex-col"),o(H,"stroke-linecap","round"),o(H,"stroke-linejoin","round"),o(H,"stroke-width","2"),o(H,"d","M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-4 w-4"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(q,"type","button"),o(q,"class","btn btn-square btn-xs"),o(q,"title",I=l[8]("common.edit")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(L,"type","button"),o(L,"class","btn btn-square btn-xs"),o(L,"title",Z=l[8]("routeCard.duplicate")),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"d","M6 18L18 6M6 6l12 12"),o(F,"xmlns","http://www.w3.org/2000/svg"),o(F,"class","h-4 w-4"),o(F,"fill","none"),o(F,"viewBox","0 0 24 24"),o(F,"stroke","currentColor"),o(x,"type","button"),o(x,"class","btn btn-square btn-xs btn-error"),o(x,"title",M=l[8]("common.delete")),o(S,"class","flex gap-1"),o(e,"class","hover"),this.first=e},m(ne,$){j(ne,e,$),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,m),s(f,b),O&&O.m(f,null),s(e,v),s(e,w),s(w,E),s(e,y),s(e,T),s(T,S),s(S,q),s(q,D),s(D,H),s(S,R),s(S,L),s(L,A),s(A,N),s(S,Y),s(S,x),s(x,F),s(F,K),B||(U=[V(q,"click",J),V(L,"click",ie),V(x,"click",ue)],B=!0)},p(ne,$){l=ne,$&128&&r!==(r=(l[22].priority||1)+"")&&k(i,r),$&128&&p!==(p=l[22].target+"")&&k(m,p),$&128&&g!==(g=l[22].target)&&o(d,"title",g),l[22].plugins&&l[22].plugins.length>0?O||(O=wd(),O.c(),O.m(f,null)):O&&(O.d(1),O=null),$&128&&C!==(C=(l[22].weight||100)+"")&&k(E,C),$&256&&I!==(I=l[8]("common.edit"))&&o(q,"title",I),$&256&&Z!==(Z=l[8]("routeCard.duplicate"))&&o(L,"title",Z),$&256&&M!==(M=l[8]("common.delete"))&&o(x,"title",M)},d(ne){ne&&P(e),O&&O.d(),B=!1,bt(U)}}}function Cd(t){let l,e,n=(t[2]?t[8]("routes.noMatchingRoutes"):t[8]("routes.noRoutesMessage"))+"",r;return{c(){l=a("tr"),e=a("td"),r=_(n),o(e,"colspan","4"),o(e,"class","text-center text-gray-500 py-8")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&260&&n!==(n=(i[2]?i[8]("routes.noMatchingRoutes"):i[8]("routes.noRoutesMessage"))+"")&&k(r,n)},d(i){i&&P(l)}}}function Ed(t){let l,e,n=t[1][0].message+"",r;return{c(){l=a("div"),e=a("span"),r=_(n),o(l,"class","alert alert-warning")},m(i,u){j(i,l,u),s(l,e),s(e,r)},p(i,u){u&2&&n!==(n=i[1][0].message+"")&&k(r,n)},d(i){i&&P(l)}}}function Td(t){let l,e,n,r=(t[4]>=0?t[8]("upstream.title",{values:{index:t[4]+1}}):t[8]("routeEditor.addUpstream"))+"",i,u,c,f,d,p,m,g,b=t[8]("common.cancel")+"",v,w,C,E=t[8]("common.save")+"",y,T,S,q,D;function H(R){t[21](R)}let I={index:t[4],showHeader:!1,onRemove:Ug,onDuplicate:Vg};return t[5]!==void 0&&(I.upstream=t[5]),f=new zg({props:I}),bl.push(()=>Rl(f,"upstream",H)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("div"),Et(f.$$.fragment),p=h(),m=a("div"),g=a("button"),v=_(b),w=h(),C=a("button"),y=_(E),o(n,"class","font-bold text-lg mb-4"),o(c,"class","max-h-[70vh] overflow-y-auto"),o(g,"type","button"),o(g,"class","btn"),o(C,"type","button"),o(C,"class","btn btn-primary"),C.disabled=T=!t[6],o(m,"class","modal-action"),o(e,"class","modal-box w-11/12 max-w-3xl"),o(l,"class","modal modal-open")},m(R,L){j(R,l,L),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),yt(f,c,null),s(e,p),s(e,m),s(m,g),s(g,v),s(m,w),s(m,C),s(C,y),S=!0,q||(D=[V(g,"click",t[10]),V(C,"click",t[11])],q=!0)},p(R,L){(!S||L&272)&&r!==(r=(R[4]>=0?R[8]("upstream.title",{values:{index:R[4]+1}}):R[8]("routeEditor.addUpstream"))+"")&&k(i,r);const A={};L&16&&(A.index=R[4]),!d&&L&32&&(d=!0,A.upstream=R[5],Sl(()=>d=!1)),f.$set(A),(!S||L&256)&&b!==(b=R[8]("common.cancel")+"")&&k(v,b),(!S||L&256)&&E!==(E=R[8]("common.save")+"")&&k(y,E),(!S||L&64&&T!==(T=!R[6]))&&(C.disabled=T)},i(R){S||(et(f.$$.fragment,R),S=!0)},o(R){st(f.$$.fragment,R),S=!1},d(R){R&&P(l),Ct(f),q=!1,bt(D)}}}function Ng(t){let l,e,n,r,i=t[8]("routeEditor.upstreams")+"",u,c,f,d,p,m=t[8]("routeEditor.upstreamsHelp")+"",g,b,v,w,C,E,y,T=t[8]("routeEditor.addUpstream")+"",S,q,D=t[0].some(Md),H,I,R,L,A,N,Z=t[8]("upstream.priority")+"",Y,x,F,K=t[8]("upstream.target")+"",M,B,U,O=t[8]("upstream.weight")+"",J,ie,ue,ne=t[8]("routes.actions")+"",$,te,re,ee=[],G=new Map,pe,oe,ge,he,ye,Fe,je,we=D&&kd(t),Oe=ut(t[7]);const Je=fe=>fe[22]._uid;for(let fe=0;fe<Oe.length;fe+=1){let _e=vd(t,Oe,fe),Be=Je(_e);G.set(Be,ee[fe]=yd(Be,_e))}let Le=t[7].length===0&&Cd(t),Pe=t[1].length>0&&Ed(t),Me=t[3]&&t[5]&&Td(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h3"),u=_(i),c=h(),f=a("span"),f.textContent="*",d=h(),p=a("p"),g=_(m),b=h(),v=a("div"),w=a("input"),E=h(),y=a("button"),S=_(T),q=h(),we&&we.c(),H=h(),I=a("div"),R=a("table"),L=a("thead"),A=a("tr"),N=a("th"),Y=_(Z),x=h(),F=a("th"),M=_(K),B=h(),U=a("th"),J=_(O),ie=h(),ue=a("th"),$=_(ne),te=h(),re=a("tbody");for(let fe=0;fe<ee.length;fe+=1)ee[fe].c();pe=h(),Le&&Le.c(),oe=h(),Pe&&Pe.c(),ge=h(),Me&&Me.c(),he=Ul(),o(f,"class","text-error"),o(r,"class","text-lg font-semibold"),o(p,"class","text-sm text-gray-500 mt-1"),o(w,"type","text"),o(w,"placeholder",C=t[8]("common.search")),o(w,"class","input input-bordered input-sm"),o(y,"type","button"),o(y,"class","btn btn-sm btn-primary"),o(v,"class","flex gap-2"),o(e,"class","flex justify-between items-center"),o(N,"class","w-20"),o(U,"class","w-24"),o(ue,"class","w-32"),o(R,"class","table table-zebra w-full"),o(I,"class","overflow-x-auto"),o(l,"class","space-y-4")},m(fe,_e){j(fe,l,_e),s(l,e),s(e,n),s(n,r),s(r,u),s(r,c),s(r,f),s(n,d),s(n,p),s(p,g),s(e,b),s(e,v),s(v,w),Q(w,t[2]),s(v,E),s(v,y),s(y,S),s(l,q),we&&we.m(l,null),s(l,H),s(l,I),s(I,R),s(R,L),s(L,A),s(A,N),s(N,Y),s(A,x),s(A,F),s(F,M),s(A,B),s(A,U),s(U,J),s(A,ie),s(A,ue),s(ue,$),s(R,te),s(R,re);for(let Be=0;Be<ee.length;Be+=1)ee[Be]&&ee[Be].m(re,null);s(re,pe),Le&&Le.m(re,null),s(l,oe),Pe&&Pe.m(l,null),j(fe,ge,_e),Me&&Me.m(fe,_e),j(fe,he,_e),ye=!0,Fe||(je=[V(w,"input",t[16]),V(y,"click",t[17])],Fe=!0)},p(fe,[_e]){(!ye||_e&256)&&i!==(i=fe[8]("routeEditor.upstreams")+"")&&k(u,i),(!ye||_e&256)&&m!==(m=fe[8]("routeEditor.upstreamsHelp")+"")&&k(g,m),(!ye||_e&256&&C!==(C=fe[8]("common.search")))&&o(w,"placeholder",C),_e&4&&w.value!==fe[2]&&Q(w,fe[2]),(!ye||_e&256)&&T!==(T=fe[8]("routeEditor.addUpstream")+"")&&k(S,T),_e&1&&(D=fe[0].some(Md)),D?we?we.p(fe,_e):(we=kd(fe),we.c(),we.m(l,H)):we&&(we.d(1),we=null),(!ye||_e&256)&&Z!==(Z=fe[8]("upstream.priority")+"")&&k(Y,Z),(!ye||_e&256)&&K!==(K=fe[8]("upstream.target")+"")&&k(M,K),(!ye||_e&256)&&O!==(O=fe[8]("upstream.weight")+"")&&k(J,O),(!ye||_e&256)&&ne!==(ne=fe[8]("routes.actions")+"")&&k($,ne),_e&13184&&(Oe=ut(fe[7]),ee=ff(ee,_e,Je,1,fe,Oe,G,re,j0,yd,pe,vd)),fe[7].length===0?Le?Le.p(fe,_e):(Le=Cd(fe),Le.c(),Le.m(re,null)):Le&&(Le.d(1),Le=null),fe[1].length>0?Pe?Pe.p(fe,_e):(Pe=Ed(fe),Pe.c(),Pe.m(l,null)):Pe&&(Pe.d(1),Pe=null),fe[3]&&fe[5]?Me?(Me.p(fe,_e),_e&40&&et(Me,1)):(Me=Td(fe),Me.c(),et(Me,1),Me.m(he.parentNode,he)):Me&&(Gl(),st(Me,1,1,()=>{Me=null}),Kl())},i(fe){ye||(et(Me),ye=!0)},o(fe){st(Me),ye=!1},d(fe){fe&&(P(l),P(ge),P(he)),we&&we.d();for(let _e=0;_e<ee.length;_e+=1)ee[_e].d();Le&&Le.d(),Pe&&Pe.d(),Me&&Me.d(fe),Fe=!1,bt(je)}}}const Md=t=>t.field==="upstreams",Sd=t=>t.field==="upstreams",Ug=()=>{},Vg=()=>{};function Jg(t,l,e){let n,r,i;Dt(t,Rt,R=>e(8,i=R));let{route:u}=l,{errors:c=[]}=l,{weightErrors:f=[]}=l,d="",p=!1,m=-1,g=null,b=[];function v(R=-1){e(4,m=R),R>=0?e(5,g=JSON.parse(JSON.stringify(u.upstreams[R]))):e(5,g={_uid:gr(),target:"",weight:100,priority:u.upstreams.length+1,headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}}),e(3,p=!0)}function w(){e(3,p=!1),e(5,g=null)}function C(){r&&(m>=0?e(14,u.upstreams[m]=g,u):e(14,u.upstreams=[...u.upstreams,g],u),w())}function E(R){if(u.upstreams.length<=1){alert(i("routeEditor.upstreamRequired"));return}e(14,u.upstreams=u.upstreams.filter((L,A)=>A!==R),u)}function y(R){const L=u.upstreams[R],A=JSON.parse(JSON.stringify(L));if(A._uid=gr(),A.target){const N=A.target.match(/^(.+?)(-\\d+)?$/);if(N){const[,Z,Y]=N;if(Y){const x=parseInt(Y.slice(1))+1;A.target=`${Z}-${x}`}else A.target=`${Z}-copy`}else A.target=`${A.target}-copy`}A.priority!==void 0&&(A.priority=Math.max(...u.upstreams.map(N=>N.priority||1))+1),e(14,u.upstreams=[...u.upstreams.slice(0,R+1),A,...u.upstreams.slice(R+1)],u)}function T(){d=this.value,e(2,d)}const S=()=>v(-1),q=R=>v(R),D=R=>y(R),H=R=>E(R);function I(R){g=R,e(5,g)}return t.$$set=R=>{"route"in R&&e(14,u=R.route),"errors"in R&&e(0,c=R.errors),"weightErrors"in R&&e(1,f=R.weightErrors)},t.$$.update=()=>{t.$$.dirty&16388&&e(7,n=u.upstreams.map((R,L)=>({u:R,i:L})).filter(({u:R})=>!d||R.target.toLowerCase().includes(d.toLowerCase()))),t.$$.dirty&16440&&p&&g&&e(15,b=gf(g,m===-1?u.upstreams.length:m)),t.$$.dirty&32808&&e(6,r=p&&g&&b.length===0)},[c,f,d,p,m,g,r,n,i,v,w,C,E,y,u,b,T,S,q,D,H,I]}class Wg extends Vt{constructor(l){super(),Ut(this,l,Jg,Ng,At,{route:14,errors:0,weightErrors:1})}}function Gg(t){let l,e,n;function r(u){t[8](u)}let i={label:t[2]("query.title"),showLabel:!1};return t[0].query!==void 0&&(i.value=t[0].query),l=new s2({props:i}),bl.push(()=>Rl(l,"value",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("query.title")),!e&&c&1&&(e=!0,f.value=u[0].query,Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Kg(t){let l,e,n;function r(u){t[7](u)}let i={label:t[2]("body.title"),showLabel:!1};return t[0].body!==void 0&&(i.value=t[0].body),l=new l2({props:i}),bl.push(()=>Rl(l,"value",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("body.title")),!e&&c&1&&(e=!0,f.value=u[0].body,Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Qg(t){let l,e,n;function r(u){t[6](u)}let i={label:t[2]("headers.title"),showLabel:!1};return t[0].headers!==void 0&&(i.value=t[0].headers),l=new t2({props:i}),bl.push(()=>Rl(l,"value",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("headers.title")),!e&&c&1&&(e=!0,f.value=u[0].headers,Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Yg(t){let l,e,n,r=t[2]("routeEditor.requestModification")+"",i,u,c,f=t[2]("routeEditor.requestModificationHelp")+"",d,p,m,g,b=t[2]("headers.title")+"",v,w,C,E=t[2]("body.title")+"",y,T,S,q=t[2]("query.title")+"",D,H,I,R,L,A,N,Z,Y,x,F,K=t[2]("routeEditor.routeLevelModificationNote")+"",M,B,U,O;const J=[Qg,Kg,Gg],ie=[];function ue(ne,$){return ne[1]==="headers"?0:ne[1]==="body"?1:ne[1]==="query"?2:-1}return~(R=ue(t))&&(L=ie[R]=J[R](t)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),m=a("div"),g=a("button"),v=_(b),w=h(),C=a("button"),y=_(E),T=h(),S=a("button"),D=_(q),H=h(),I=a("div"),L&&L.c(),A=h(),N=a("div"),Z=ae("svg"),Y=ae("path"),x=h(),F=a("span"),M=_(K),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(g,"role","tab"),o(g,"class","tab"),le(g,"tab-active",t[1]==="headers"),o(C,"role","tab"),o(C,"class","tab"),le(C,"tab-active",t[1]==="body"),o(S,"role","tab"),o(S,"class","tab"),le(S,"tab-active",t[1]==="query"),o(m,"role","tablist"),o(m,"class","tabs tabs-boxed"),o(I,"class","mt-4"),o(Y,"stroke-linecap","round"),o(Y,"stroke-linejoin","round"),o(Y,"stroke-width","2"),o(Y,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Z,"xmlns","http://www.w3.org/2000/svg"),o(Z,"fill","none"),o(Z,"viewBox","0 0 24 24"),o(Z,"class","stroke-current shrink-0 w-6 h-6"),o(F,"class","text-sm"),o(N,"class","alert alert-info mt-4"),o(l,"class","space-y-4")},m(ne,$){j(ne,l,$),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),s(l,m),s(m,g),s(g,v),s(m,w),s(m,C),s(C,y),s(m,T),s(m,S),s(S,D),s(l,H),s(l,I),~R&&ie[R].m(I,null),s(l,A),s(l,N),s(N,Z),s(Z,Y),s(N,x),s(N,F),s(F,M),B=!0,U||(O=[V(g,"click",t[3]),V(C,"click",t[4]),V(S,"click",t[5])],U=!0)},p(ne,[$]){(!B||$&4)&&r!==(r=ne[2]("routeEditor.requestModification")+"")&&k(i,r),(!B||$&4)&&f!==(f=ne[2]("routeEditor.requestModificationHelp")+"")&&k(d,f),(!B||$&4)&&b!==(b=ne[2]("headers.title")+"")&&k(v,b),(!B||$&2)&&le(g,"tab-active",ne[1]==="headers"),(!B||$&4)&&E!==(E=ne[2]("body.title")+"")&&k(y,E),(!B||$&2)&&le(C,"tab-active",ne[1]==="body"),(!B||$&4)&&q!==(q=ne[2]("query.title")+"")&&k(D,q),(!B||$&2)&&le(S,"tab-active",ne[1]==="query");let te=R;R=ue(ne),R===te?~R&&ie[R].p(ne,$):(L&&(Gl(),st(ie[te],1,1,()=>{ie[te]=null}),Kl()),~R?(L=ie[R],L?L.p(ne,$):(L=ie[R]=J[R](ne),L.c()),et(L,1),L.m(I,null)):L=null),(!B||$&4)&&K!==(K=ne[2]("routeEditor.routeLevelModificationNote")+"")&&k(M,K)},i(ne){B||(et(L),B=!0)},o(ne){st(L),B=!1},d(ne){ne&&P(l),~R&&ie[R].d(),U=!1,bt(O)}}}function Zg(t,l,e){let n;Dt(t,Rt,g=>e(2,n=g));let{route:r}=l,i="headers";const u=()=>e(1,i="headers"),c=()=>e(1,i="body"),f=()=>e(1,i="query");function d(g){t.$$.not_equal(r.headers,g)&&(r.headers=g,e(0,r))}function p(g){t.$$.not_equal(r.body,g)&&(r.body=g,e(0,r))}function m(g){t.$$.not_equal(r.query,g)&&(r.query=g,e(0,r))}return t.$$set=g=>{"route"in g&&e(0,r=g.route)},[r,i,n,u,c,f,d,p,m]}class Xg extends Vt{constructor(l){super(),Ut(this,l,Zg,Yg,At,{route:0})}}function xg(t){let l,e,n,r=t[1]("auth.routeAuth")+"",i,u,c,f=t[1]("auth.routeAuthHelp")+"",d,p,m,g,b;function v(C){t[2](C)}let w={label:t[1]("auth.routeAuth"),showHelp:!0,showLabel:!1};return t[0].auth!==void 0&&(w.value=t[0].auth),m=new Z0({props:w}),bl.push(()=>Rl(m,"value",v)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(l,"class","space-y-4")},m(C,E){j(C,l,E),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),yt(m,l,null),b=!0},p(C,[E]){(!b||E&2)&&r!==(r=C[1]("auth.routeAuth")+"")&&k(i,r),(!b||E&2)&&f!==(f=C[1]("auth.routeAuthHelp")+"")&&k(d,f);const y={};E&2&&(y.label=C[1]("auth.routeAuth")),!g&&E&1&&(g=!0,y.value=C[0].auth,Sl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&P(l),Ct(m)}}}function $g(t,l,e){let n;Dt(t,Rt,u=>e(1,n=u));let{route:r}=l;function i(u){t.$$.not_equal(r.auth,u)&&(r.auth=u,e(0,r))}return t.$$set=u=>{"route"in u&&e(0,r=u.route)},[r,n,i]}class e_ extends Vt{constructor(l){super(),Ut(this,l,$g,xg,At,{route:0})}}function Rd(t){let l,e=t[22]("routeEditor.failoverHelp")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","label-text-alt text-xs")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&4194304&&e!==(e=r[22]("routeEditor.failoverHelp")+"")&&k(n,e)},d(r){r&&P(l)}}}function qd(t){let l,e,n,r=t[22]("routeEditor.retryableStatusCodes")+"",i,u,c,f,d,p,m,g=t[22]("routeEditor.retryableStatusCodesHelp")+"",b,v,w,C,E,y,T=t[22]("routeEditor.passiveHealthCheck")+"",S,q,D,H,I,R,L,A,N=t[22]("routeEditor.passiveHealthCheckTooltip")+"",Z,Y,x,F,K,M,B=t[22]("routeEditor.consecutiveFailuresThreshold")+"",U,O,J,ie,ue,ne,$=t[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",te,re,ee,G,pe,oe=t[22]("routeEditor.healthyThreshold")+"",ge,he,ye,Fe,je,we,Oe=t[22]("routeEditor.healthyThresholdHelp")+"",Je,Le,Pe,Me,fe,_e=t[22]("routeEditor.requestTimeoutMs")+"",Be,De,se,ke,me,Ee,Ve=t[22]("routeEditor.requestTimeoutMsHelp")+"",Ie,nt,Ne,Ye,Qe,ve=t[22]("routeEditor.connectTimeoutMs")+"",de,Te,Ze,Se,Ue,Ce,mt=t[22]("routeEditor.connectTimeoutMsHelp")+"",Ge,ce,qe,Re,dt,We=t[22]("routeEditor.recoveryIntervalMs")+"",z,He,X,ft,Ht,Ke,_t=t[22]("routeEditor.recoveryIntervalHelp")+"",lt,it,ze,Xe,Bt,at=t[22]("routeEditor.recoveryTimeoutMs")+"",gt,wt,pt,vl,rt,Mt,ht=t[22]("routeEditor.recoveryTimeoutHelp")+"",Tt,kl,Ot,hl,ml,ql,Jt=t[22]("routeEditor.activeHealthCheck")+"",Ql,Qt,Yt,Hl,Il,gl,ol,Yl,Ft=t[22]("routeEditor.activeHealthCheckTooltip")+"",Pl,Vl,Jl,El,zt,Zl,Pt,jl=t[22]("routeEditor.enableActiveHealthCheck")+"",Ll,$l,xt,wl,es,Fl,Bl,Wl=t[22]("routeEditor.slowStart")+"",Ps,nl,yl,rl,zl,al,_l,ll,Dl=t[22]("routeEditor.slowStartTooltip")+"",Nl,Tl,Wt,It,jt,$t,el,Kt=t[22]("routeEditor.enableSlowStart")+"",Zt,il,Xt,$e,Al,ts,Xl,xl,ls=t[22]("routeEditor.failoverInfoNotice")+"",Ds,ss,zs,ul=t[11]&&Hd(t),Nt=t[19]&&Pd(t);return{c(){l=a("div"),e=a("label"),n=a("span"),i=_(r),u=h(),c=a("input"),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("div"),C=a("input"),E=h(),y=a("div"),S=_(T),q=h(),D=a("div"),H=a("div"),I=ae("svg"),R=ae("path"),L=h(),A=a("span"),Z=_(N),Y=h(),x=a("div"),F=a("div"),K=a("label"),M=a("span"),U=_(B),O=h(),J=a("input"),ie=h(),ue=a("div"),ne=a("span"),te=_($),re=h(),ee=a("div"),G=a("label"),pe=a("span"),ge=_(oe),he=h(),ye=a("input"),Fe=h(),je=a("div"),we=a("span"),Je=_(Oe),Le=h(),Pe=a("div"),Me=a("label"),fe=a("span"),Be=_(_e),De=h(),se=a("input"),ke=h(),me=a("div"),Ee=a("span"),Ie=_(Ve),nt=h(),Ne=a("div"),Ye=a("label"),Qe=a("span"),de=_(ve),Te=h(),Ze=a("input"),Se=h(),Ue=a("div"),Ce=a("span"),Ge=_(mt),ce=h(),qe=a("div"),Re=a("label"),dt=a("span"),z=_(We),He=h(),X=a("input"),ft=h(),Ht=a("div"),Ke=a("span"),lt=_(_t),it=h(),ze=a("div"),Xe=a("label"),Bt=a("span"),gt=_(at),wt=h(),pt=a("input"),vl=h(),rt=a("div"),Mt=a("span"),Tt=_(ht),kl=h(),Ot=a("div"),hl=a("input"),ml=h(),ql=a("div"),Ql=_(Jt),Qt=h(),Yt=a("div"),Hl=a("div"),Il=ae("svg"),gl=ae("path"),ol=h(),Yl=a("span"),Pl=_(Ft),Vl=h(),Jl=a("div"),El=a("label"),zt=a("input"),Zl=h(),Pt=a("span"),Ll=_(jl),$l=h(),ul&&ul.c(),xt=h(),wl=a("div"),es=a("input"),Fl=h(),Bl=a("div"),Ps=_(Wl),nl=h(),yl=a("div"),rl=a("div"),zl=ae("svg"),al=ae("path"),_l=h(),ll=a("span"),Nl=_(Dl),Tl=h(),Wt=a("div"),It=a("label"),jt=a("input"),$t=h(),el=a("span"),Zt=_(Kt),il=h(),Nt&&Nt.c(),Xt=h(),$e=a("div"),Al=ae("svg"),ts=ae("path"),Xl=h(),xl=a("div"),Ds=_(ls),o(n,"class","label-text"),o(e,"class","label"),o(e,"for","failover-status-codes"),o(c,"id","failover-status-codes"),o(c,"type","text"),o(c,"placeholder",f=t[22]("routeEditor.retryableStatusCodesPlaceholder")),o(c,"class","input input-bordered input-sm"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(l,"class","form-control"),o(C,"type","checkbox"),o(y,"class","collapse-title text-sm font-medium"),o(R,"stroke-linecap","round"),o(R,"stroke-linejoin","round"),o(R,"stroke-width","2"),o(R,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(I,"xmlns","http://www.w3.org/2000/svg"),o(I,"fill","none"),o(I,"viewBox","0 0 24 24"),o(I,"class","stroke-current shrink-0 w-4 h-4"),o(H,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(M,"class","label-text"),o(K,"class","label"),o(K,"for","consecutive-failures-threshold"),o(J,"id","consecutive-failures-threshold"),o(J,"type","number"),o(J,"placeholder","3"),o(J,"class","input input-bordered input-sm"),o(J,"min","1"),o(ne,"class","label-text-alt text-xs"),o(ue,"class","label"),o(F,"class","form-control"),o(pe,"class","label-text"),o(G,"class","label"),o(G,"for","healthy-threshold"),o(ye,"id","healthy-threshold"),o(ye,"type","number"),o(ye,"placeholder","2"),o(ye,"class","input input-bordered input-sm"),o(ye,"min","1"),o(we,"class","label-text-alt text-xs"),o(je,"class","label"),o(ee,"class","form-control"),o(fe,"class","label-text"),o(Me,"class","label"),o(Me,"for","request-timeout-ms"),o(se,"id","request-timeout-ms"),o(se,"type","number"),o(se,"placeholder","30000"),o(se,"class","input input-bordered input-sm"),o(se,"min","100"),o(Ee,"class","label-text-alt text-xs"),o(me,"class","label"),o(Pe,"class","form-control"),o(Qe,"class","label-text"),o(Ye,"class","label"),o(Ye,"for","connect-timeout-ms"),o(Ze,"id","connect-timeout-ms"),o(Ze,"type","number"),o(Ze,"placeholder","5000"),o(Ze,"class","input input-bordered input-sm"),o(Ze,"min","100"),o(Ce,"class","label-text-alt text-xs"),o(Ue,"class","label"),o(Ne,"class","form-control"),o(dt,"class","label-text"),o(Re,"class","label"),o(Re,"for","recovery-interval-ms"),o(X,"id","recovery-interval-ms"),o(X,"type","number"),o(X,"placeholder","5000"),o(X,"class","input input-bordered input-sm"),o(X,"min","1000"),o(Ke,"class","label-text-alt text-xs"),o(Ht,"class","label"),o(qe,"class","form-control"),o(Bt,"class","label-text"),o(Xe,"class","label"),o(Xe,"for","recovery-timeout-ms"),o(pt,"id","recovery-timeout-ms"),o(pt,"type","number"),o(pt,"placeholder","3000"),o(pt,"class","input input-bordered input-sm"),o(pt,"min","100"),o(Mt,"class","label-text-alt text-xs"),o(rt,"class","label"),o(ze,"class","form-control"),o(x,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(D,"class","collapse-content space-y-4"),o(w,"class","collapse collapse-arrow bg-base-200"),o(hl,"type","checkbox"),o(ql,"class","collapse-title text-sm font-medium"),o(gl,"stroke-linecap","round"),o(gl,"stroke-linejoin","round"),o(gl,"stroke-width","2"),o(gl,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Il,"xmlns","http://www.w3.org/2000/svg"),o(Il,"fill","none"),o(Il,"viewBox","0 0 24 24"),o(Il,"class","stroke-current shrink-0 w-4 h-4"),o(Hl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(zt,"type","checkbox"),o(zt,"class","checkbox checkbox-sm"),o(Pt,"class","label-text"),o(El,"class","label cursor-pointer justify-start gap-4"),o(Jl,"class","form-control"),o(Yt,"class","collapse-content space-y-4"),o(Ot,"class","collapse collapse-arrow bg-base-200"),o(es,"type","checkbox"),o(Bl,"class","collapse-title text-sm font-medium"),o(al,"stroke-linecap","round"),o(al,"stroke-linejoin","round"),o(al,"stroke-width","2"),o(al,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(zl,"xmlns","http://www.w3.org/2000/svg"),o(zl,"fill","none"),o(zl,"viewBox","0 0 24 24"),o(zl,"class","stroke-current shrink-0 w-4 h-4"),o(rl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(jt,"type","checkbox"),o(jt,"class","checkbox checkbox-sm"),o(el,"class","label-text"),o(It,"class","label cursor-pointer justify-start gap-4"),o(Wt,"class","form-control"),o(yl,"class","collapse-content space-y-4"),o(wl,"class","collapse collapse-arrow bg-base-200"),o(ts,"stroke-linecap","round"),o(ts,"stroke-linejoin","round"),o(ts,"stroke-width","2"),o(ts,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Al,"xmlns","http://www.w3.org/2000/svg"),o(Al,"fill","none"),o(Al,"viewBox","0 0 24 24"),o(Al,"class","stroke-current shrink-0 w-4 h-4"),o($e,"class","alert alert-info shadow-sm text-xs")},m(ot,ct){j(ot,l,ct),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[4]),s(l,d),s(l,p),s(p,m),s(m,b),j(ot,v,ct),j(ot,w,ct),s(w,C),s(w,E),s(w,y),s(y,S),s(w,q),s(w,D),s(D,H),s(H,I),s(I,R),s(H,L),s(H,A),s(A,Z),s(D,Y),s(D,x),s(x,F),s(F,K),s(K,M),s(M,U),s(F,O),s(F,J),Q(J,t[5]),s(F,ie),s(F,ue),s(ue,ne),s(ne,te),s(x,re),s(x,ee),s(ee,G),s(G,pe),s(pe,ge),s(ee,he),s(ee,ye),Q(ye,t[6]),s(ee,Fe),s(ee,je),s(je,we),s(we,Je),s(x,Le),s(x,Pe),s(Pe,Me),s(Me,fe),s(fe,Be),s(Pe,De),s(Pe,se),Q(se,t[7]),s(Pe,ke),s(Pe,me),s(me,Ee),s(Ee,Ie),s(x,nt),s(x,Ne),s(Ne,Ye),s(Ye,Qe),s(Qe,de),s(Ne,Te),s(Ne,Ze),Q(Ze,t[8]),s(Ne,Se),s(Ne,Ue),s(Ue,Ce),s(Ce,Ge),s(x,ce),s(x,qe),s(qe,Re),s(Re,dt),s(dt,z),s(qe,He),s(qe,X),Q(X,t[9]),s(qe,ft),s(qe,Ht),s(Ht,Ke),s(Ke,lt),s(x,it),s(x,ze),s(ze,Xe),s(Xe,Bt),s(Bt,gt),s(ze,wt),s(ze,pt),Q(pt,t[10]),s(ze,vl),s(ze,rt),s(rt,Mt),s(Mt,Tt),j(ot,kl,ct),j(ot,Ot,ct),s(Ot,hl),s(Ot,ml),s(Ot,ql),s(ql,Ql),s(Ot,Qt),s(Ot,Yt),s(Yt,Hl),s(Hl,Il),s(Il,gl),s(Hl,ol),s(Hl,Yl),s(Yl,Pl),s(Yt,Vl),s(Yt,Jl),s(Jl,El),s(El,zt),zt.checked=t[11],s(El,Zl),s(El,Pt),s(Pt,Ll),s(Yt,$l),ul&&ul.m(Yt,null),j(ot,xt,ct),j(ot,wl,ct),s(wl,es),s(wl,Fl),s(wl,Bl),s(Bl,Ps),s(wl,nl),s(wl,yl),s(yl,rl),s(rl,zl),s(zl,al),s(rl,_l),s(rl,ll),s(ll,Nl),s(yl,Tl),s(yl,Wt),s(Wt,It),s(It,jt),jt.checked=t[19],s(It,$t),s(It,el),s(el,Zt),s(yl,il),Nt&&Nt.m(yl,null),j(ot,Xt,ct),j(ot,$e,ct),s($e,Al),s(Al,ts),s($e,Xl),s($e,xl),s(xl,Ds),ss||(zs=[V(c,"input",t[28]),V(J,"input",t[29]),V(ye,"input",t[30]),V(se,"input",t[31]),V(Ze,"input",t[32]),V(X,"input",t[33]),V(pt,"input",t[34]),V(zt,"change",t[35]),V(jt,"change",t[43])],ss=!0)},p(ot,ct){ct[0]&4194304&&r!==(r=ot[22]("routeEditor.retryableStatusCodes")+"")&&k(i,r),ct[0]&4194304&&f!==(f=ot[22]("routeEditor.retryableStatusCodesPlaceholder"))&&o(c,"placeholder",f),ct[0]&16&&c.value!==ot[4]&&Q(c,ot[4]),ct[0]&4194304&&g!==(g=ot[22]("routeEditor.retryableStatusCodesHelp")+"")&&k(b,g),ct[0]&4194304&&T!==(T=ot[22]("routeEditor.passiveHealthCheck")+"")&&k(S,T),ct[0]&4194304&&N!==(N=ot[22]("routeEditor.passiveHealthCheckTooltip")+"")&&k(Z,N),ct[0]&4194304&&B!==(B=ot[22]("routeEditor.consecutiveFailuresThreshold")+"")&&k(U,B),ct[0]&32&&St(J.value)!==ot[5]&&Q(J,ot[5]),ct[0]&4194304&&$!==($=ot[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&k(te,$),ct[0]&4194304&&oe!==(oe=ot[22]("routeEditor.healthyThreshold")+"")&&k(ge,oe),ct[0]&64&&St(ye.value)!==ot[6]&&Q(ye,ot[6]),ct[0]&4194304&&Oe!==(Oe=ot[22]("routeEditor.healthyThresholdHelp")+"")&&k(Je,Oe),ct[0]&4194304&&_e!==(_e=ot[22]("routeEditor.requestTimeoutMs")+"")&&k(Be,_e),ct[0]&128&&St(se.value)!==ot[7]&&Q(se,ot[7]),ct[0]&4194304&&Ve!==(Ve=ot[22]("routeEditor.requestTimeoutMsHelp")+"")&&k(Ie,Ve),ct[0]&4194304&&ve!==(ve=ot[22]("routeEditor.connectTimeoutMs")+"")&&k(de,ve),ct[0]&256&&St(Ze.value)!==ot[8]&&Q(Ze,ot[8]),ct[0]&4194304&&mt!==(mt=ot[22]("routeEditor.connectTimeoutMsHelp")+"")&&k(Ge,mt),ct[0]&4194304&&We!==(We=ot[22]("routeEditor.recoveryIntervalMs")+"")&&k(z,We),ct[0]&512&&St(X.value)!==ot[9]&&Q(X,ot[9]),ct[0]&4194304&&_t!==(_t=ot[22]("routeEditor.recoveryIntervalHelp")+"")&&k(lt,_t),ct[0]&4194304&&at!==(at=ot[22]("routeEditor.recoveryTimeoutMs")+"")&&k(gt,at),ct[0]&1024&&St(pt.value)!==ot[10]&&Q(pt,ot[10]),ct[0]&4194304&&ht!==(ht=ot[22]("routeEditor.recoveryTimeoutHelp")+"")&&k(Tt,ht),ct[0]&4194304&&Jt!==(Jt=ot[22]("routeEditor.activeHealthCheck")+"")&&k(Ql,Jt),ct[0]&4194304&&Ft!==(Ft=ot[22]("routeEditor.activeHealthCheckTooltip")+"")&&k(Pl,Ft),ct[0]&2048&&(zt.checked=ot[11]),ct[0]&4194304&&jl!==(jl=ot[22]("routeEditor.enableActiveHealthCheck")+"")&&k(Ll,jl),ot[11]?ul?ul.p(ot,ct):(ul=Hd(ot),ul.c(),ul.m(Yt,null)):ul&&(ul.d(1),ul=null),ct[0]&4194304&&Wl!==(Wl=ot[22]("routeEditor.slowStart")+"")&&k(Ps,Wl),ct[0]&4194304&&Dl!==(Dl=ot[22]("routeEditor.slowStartTooltip")+"")&&k(Nl,Dl),ct[0]&524288&&(jt.checked=ot[19]),ct[0]&4194304&&Kt!==(Kt=ot[22]("routeEditor.enableSlowStart")+"")&&k(Zt,Kt),ot[19]?Nt?Nt.p(ot,ct):(Nt=Pd(ot),Nt.c(),Nt.m(yl,null)):Nt&&(Nt.d(1),Nt=null),ct[0]&4194304&&ls!==(ls=ot[22]("routeEditor.failoverInfoNotice")+"")&&k(Ds,ls)},d(ot){ot&&(P(l),P(v),P(w),P(kl),P(Ot),P(xt),P(wl),P(Xt),P($e)),ul&&ul.d(),Nt&&Nt.d(),ss=!1,bt(zs)}}}function Hd(t){let l,e,n,r,i=t[22]("routeEditor.healthCheckIntervalMs")+"",u,c,f,d,p,m,g=t[22]("routeEditor.healthCheckIntervalMsHelp")+"",b,v,w,C,E,y=t[22]("routeEditor.healthCheckTimeoutMs")+"",T,S,q,D,H,I,R=t[22]("routeEditor.healthCheckTimeoutMsHelp")+"",L,A,N,Z,Y,x=t[22]("routeEditor.healthCheckPath")+"",F,K,M,B,U,O,J=t[22]("routeEditor.healthCheckPathHelp")+"",ie,ue,ne,$,te,re=t[22]("routeEditor.healthCheckMethod")+"",ee,G,pe,oe,ge,he,ye,Fe,je,we,Oe,Je=t[22]("routeEditor.healthCheckExpectedStatus")+"",Le,Pe,Me,fe,_e,Be,De=t[22]("routeEditor.healthCheckExpectedStatusHelp")+"",se,ke,me,Ee,Ve,Ie=t[22]("routeEditor.healthCheckUnhealthyThreshold")+"",nt,Ne,Ye,Qe,ve,de,Te=t[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Ze,Se,Ue,Ce,mt,Ge=t[22]("routeEditor.healthCheckHealthyThreshold")+"",ce,qe,Re,dt,We,z,He=t[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",X,ft,Ht;return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("input"),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("div"),C=a("label"),E=a("span"),T=_(y),S=h(),q=a("input"),D=h(),H=a("div"),I=a("span"),L=_(R),A=h(),N=a("div"),Z=a("label"),Y=a("span"),F=_(x),K=h(),M=a("input"),B=h(),U=a("div"),O=a("span"),ie=_(J),ue=h(),ne=a("div"),$=a("label"),te=a("span"),ee=_(re),G=h(),pe=a("select"),oe=a("option"),oe.textContent="GET (default)",ge=a("option"),ge.textContent="GET",he=a("option"),he.textContent="POST",ye=a("option"),ye.textContent="HEAD",Fe=h(),je=a("div"),we=a("label"),Oe=a("span"),Le=_(Je),Pe=h(),Me=a("input"),fe=h(),_e=a("div"),Be=a("span"),se=_(De),ke=h(),me=a("div"),Ee=a("label"),Ve=a("span"),nt=_(Ie),Ne=h(),Ye=a("input"),Qe=h(),ve=a("div"),de=a("span"),Ze=_(Te),Se=h(),Ue=a("div"),Ce=a("label"),mt=a("span"),ce=_(Ge),qe=h(),Re=a("input"),dt=h(),We=a("div"),z=a("span"),X=_(He),o(r,"class","label-text"),o(n,"class","label"),o(n,"for","health-check-interval-ms"),o(f,"id","health-check-interval-ms"),o(f,"type","number"),o(f,"placeholder","10000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","health-check-timeout-ms"),o(q,"id","health-check-timeout-ms"),o(q,"type","number"),o(q,"placeholder","3000"),o(q,"class","input input-bordered input-sm"),o(q,"min","100"),o(I,"class","label-text-alt text-xs"),o(H,"class","label"),o(w,"class","form-control"),o(Y,"class","label-text"),o(Z,"class","label"),o(Z,"for","health-check-path"),o(M,"id","health-check-path"),o(M,"type","text"),o(M,"placeholder","/health"),o(M,"class","input input-bordered input-sm"),o(O,"class","label-text-alt text-xs"),o(U,"class","label"),o(N,"class","form-control"),o(te,"class","label-text"),o($,"class","label"),o($,"for","health-check-method"),oe.__value="",Q(oe,oe.__value),ge.__value="GET",Q(ge,ge.__value),he.__value="POST",Q(he,he.__value),ye.__value="HEAD",Q(ye,ye.__value),o(pe,"id","health-check-method"),o(pe,"class","select select-bordered select-sm"),t[15]===void 0&&tl(()=>t[39].call(pe)),o(ne,"class","form-control"),o(Oe,"class","label-text"),o(we,"class","label"),o(we,"for","health-check-expected-status"),o(Me,"id","health-check-expected-status"),o(Me,"type","text"),o(Me,"placeholder","200"),o(Me,"class","input input-bordered input-sm"),o(Be,"class","label-text-alt text-xs"),o(_e,"class","label"),o(je,"class","form-control"),o(Ve,"class","label-text"),o(Ee,"class","label"),o(Ee,"for","health-check-unhealthy-threshold"),o(Ye,"id","health-check-unhealthy-threshold"),o(Ye,"type","number"),o(Ye,"placeholder","3"),o(Ye,"class","input input-bordered input-sm"),o(Ye,"min","1"),o(de,"class","label-text-alt text-xs"),o(ve,"class","label"),o(me,"class","form-control"),o(mt,"class","label-text"),o(Ce,"class","label"),o(Ce,"for","health-check-healthy-threshold"),o(Re,"id","health-check-healthy-threshold"),o(Re,"type","number"),o(Re,"placeholder","2"),o(Re,"class","input input-bordered input-sm"),o(Re,"min","1"),o(z,"class","label-text-alt text-xs"),o(We,"class","label"),o(Ue,"class","form-control"),o(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Ke,_t){j(Ke,l,_t),s(l,e),s(e,n),s(n,r),s(r,u),s(e,c),s(e,f),Q(f,t[12]),s(e,d),s(e,p),s(p,m),s(m,b),s(l,v),s(l,w),s(w,C),s(C,E),s(E,T),s(w,S),s(w,q),Q(q,t[13]),s(w,D),s(w,H),s(H,I),s(I,L),s(l,A),s(l,N),s(N,Z),s(Z,Y),s(Y,F),s(N,K),s(N,M),Q(M,t[14]),s(N,B),s(N,U),s(U,O),s(O,ie),s(l,ue),s(l,ne),s(ne,$),s($,te),s(te,ee),s(ne,G),s(ne,pe),s(pe,oe),s(pe,ge),s(pe,he),s(pe,ye),kt(pe,t[15],!0),s(l,Fe),s(l,je),s(je,we),s(we,Oe),s(Oe,Le),s(je,Pe),s(je,Me),Q(Me,t[16]),s(je,fe),s(je,_e),s(_e,Be),s(Be,se),s(l,ke),s(l,me),s(me,Ee),s(Ee,Ve),s(Ve,nt),s(me,Ne),s(me,Ye),Q(Ye,t[17]),s(me,Qe),s(me,ve),s(ve,de),s(de,Ze),s(l,Se),s(l,Ue),s(Ue,Ce),s(Ce,mt),s(mt,ce),s(Ue,qe),s(Ue,Re),Q(Re,t[18]),s(Ue,dt),s(Ue,We),s(We,z),s(z,X),ft||(Ht=[V(f,"input",t[36]),V(q,"input",t[37]),V(M,"input",t[38]),V(pe,"change",t[39]),V(Me,"input",t[40]),V(Ye,"input",t[41]),V(Re,"input",t[42])],ft=!0)},p(Ke,_t){_t[0]&4194304&&i!==(i=Ke[22]("routeEditor.healthCheckIntervalMs")+"")&&k(u,i),_t[0]&4096&&St(f.value)!==Ke[12]&&Q(f,Ke[12]),_t[0]&4194304&&g!==(g=Ke[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&k(b,g),_t[0]&4194304&&y!==(y=Ke[22]("routeEditor.healthCheckTimeoutMs")+"")&&k(T,y),_t[0]&8192&&St(q.value)!==Ke[13]&&Q(q,Ke[13]),_t[0]&4194304&&R!==(R=Ke[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&k(L,R),_t[0]&4194304&&x!==(x=Ke[22]("routeEditor.healthCheckPath")+"")&&k(F,x),_t[0]&16384&&M.value!==Ke[14]&&Q(M,Ke[14]),_t[0]&4194304&&J!==(J=Ke[22]("routeEditor.healthCheckPathHelp")+"")&&k(ie,J),_t[0]&4194304&&re!==(re=Ke[22]("routeEditor.healthCheckMethod")+"")&&k(ee,re),_t[0]&32768&&kt(pe,Ke[15]),_t[0]&4194304&&Je!==(Je=Ke[22]("routeEditor.healthCheckExpectedStatus")+"")&&k(Le,Je),_t[0]&65536&&Me.value!==Ke[16]&&Q(Me,Ke[16]),_t[0]&4194304&&De!==(De=Ke[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&k(se,De),_t[0]&4194304&&Ie!==(Ie=Ke[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&k(nt,Ie),_t[0]&131072&&St(Ye.value)!==Ke[17]&&Q(Ye,Ke[17]),_t[0]&4194304&&Te!==(Te=Ke[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&k(Ze,Te),_t[0]&4194304&&Ge!==(Ge=Ke[22]("routeEditor.healthCheckHealthyThreshold")+"")&&k(ce,Ge),_t[0]&262144&&St(Re.value)!==Ke[18]&&Q(Re,Ke[18]),_t[0]&4194304&&He!==(He=Ke[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&k(X,He)},d(Ke){Ke&&P(l),ft=!1,bt(Ht)}}}function Pd(t){let l,e,n,r,i=t[22]("routeEditor.slowStartDurationMs")+"",u,c,f,d,p,m,g=t[22]("routeEditor.slowStartDurationMsHelp")+"",b,v,w,C,E,y=t[22]("routeEditor.slowStartInitialWeightFactor")+"",T,S,q,D,H,I,R=t[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",L,A,N;return{c(){l=a("div"),e=a("div"),n=a("label"),r=a("span"),u=_(i),c=h(),f=a("input"),d=h(),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("div"),C=a("label"),E=a("span"),T=_(y),S=h(),q=a("input"),D=h(),H=a("div"),I=a("span"),L=_(R),o(r,"class","label-text"),o(n,"class","label"),o(n,"for","slow-start-duration-ms"),o(f,"id","slow-start-duration-ms"),o(f,"type","number"),o(f,"placeholder","30000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","slow-start-initial-weight-factor"),o(q,"id","slow-start-initial-weight-factor"),o(q,"type","number"),o(q,"placeholder","0.1"),o(q,"class","input input-bordered input-sm"),o(q,"min","0.01"),o(q,"max","1"),o(q,"step","0.01"),o(I,"class","label-text-alt text-xs"),o(H,"class","label"),o(w,"class","form-control"),o(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Z,Y){j(Z,l,Y),s(l,e),s(e,n),s(n,r),s(r,u),s(e,c),s(e,f),Q(f,t[20]),s(e,d),s(e,p),s(p,m),s(m,b),s(l,v),s(l,w),s(w,C),s(C,E),s(E,T),s(w,S),s(w,q),Q(q,t[21]),s(w,D),s(w,H),s(H,I),s(I,L),A||(N=[V(f,"input",t[44]),V(q,"input",t[45])],A=!0)},p(Z,Y){Y[0]&4194304&&i!==(i=Z[22]("routeEditor.slowStartDurationMs")+"")&&k(u,i),Y[0]&1048576&&St(f.value)!==Z[20]&&Q(f,Z[20]),Y[0]&4194304&&g!==(g=Z[22]("routeEditor.slowStartDurationMsHelp")+"")&&k(b,g),Y[0]&4194304&&y!==(y=Z[22]("routeEditor.slowStartInitialWeightFactor")+"")&&k(T,y),Y[0]&2097152&&St(q.value)!==Z[21]&&Q(q,Z[21]),Y[0]&4194304&&R!==(R=Z[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&k(L,R)},d(Z){Z&&P(l),A=!1,bt(N)}}}function t_(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=t[22]("routeEditor.enableFailover")+"",v,w,C,E,y=t[1]&&Rd(t),T=t[2]&&qd(t);return{c(){l=a("div"),e=a("div"),n=a("span"),r=_(t[0]),i=h(),y&&y.c(),u=h(),c=a("div"),f=a("div"),d=a("label"),p=a("input"),m=h(),g=a("span"),v=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(l,"class","form-control w-full")},m(S,q){j(S,l,q),s(l,e),s(e,n),s(n,r),s(e,i),y&&y.m(e,null),s(l,u),s(l,c),s(c,f),s(f,d),s(d,p),p.checked=t[2],s(d,m),s(d,g),s(g,v),s(c,w),T&&T.m(c,null),C||(E=[V(p,"change",t[26]),V(p,"change",t[27])],C=!0)},p(S,q){q[0]&1&&k(r,S[0]),S[1]?y?y.p(S,q):(y=Rd(S),y.c(),y.m(e,null)):y&&(y.d(1),y=null),q[0]&4&&(p.checked=S[2]),q[0]&4194304&&b!==(b=S[22]("routeEditor.enableFailover")+"")&&k(v,b),S[2]?T?T.p(S,q):(T=qd(S),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:tt,o:tt,d(S){S&&P(l),y&&y.d(),T&&T.d(),C=!1,bt(E)}}}function jd(t){return t.split(",").map(l=>parseInt(l.trim())).filter(l=>!isNaN(l)&&l>=100&&l<600)}function l_(t,l,e){let n;Dt(t,Rt,ge=>e(22,n=ge));let{value:r=void 0}=l,{label:i="Failover"}=l,{showHelp:u=!0}=l,c=!1,f=!1,d=[],p="",m,g,b,v,w,C,E=!1,y,T,S,q,D=[],H="",I,R,L=!1,A,N;function Z(){c=this.checked,e(2,c),e(3,f),e(23,r),e(24,d),e(25,D),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}const Y=()=>{e(3,f=!0)};function x(){p=this.value,e(4,p),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(16,H)}function F(){m=St(this.value),e(5,m),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function K(){g=St(this.value),e(6,g),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function M(){b=St(this.value),e(7,b),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function B(){v=St(this.value),e(8,v),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function U(){w=St(this.value),e(9,w),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function O(){C=St(this.value),e(10,C),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function J(){E=this.checked,e(11,E),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ie(){y=St(this.value),e(12,y),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ue(){T=St(this.value),e(13,T),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ne(){S=this.value,e(14,S),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function $(){q=pl(this),e(15,q),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function te(){H=this.value,e(16,H),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p)}function re(){I=St(this.value),e(17,I),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(18,R),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function ee(){R=St(this.value),e(18,R),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(19,L),e(20,A),e(21,N),e(4,p),e(16,H)}function G(){L=this.checked,e(19,L),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(20,A),e(21,N),e(4,p),e(16,H)}function pe(){A=St(this.value),e(20,A),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(21,N),e(4,p),e(16,H)}function oe(){N=St(this.value),e(21,N),e(3,f),e(23,r),e(24,d),e(25,D),e(2,c),e(5,m),e(6,g),e(7,b),e(8,v),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,S),e(15,q),e(17,I),e(18,R),e(19,L),e(20,A),e(4,p),e(16,H)}return t.$$set=ge=>{"value"in ge&&e(23,r=ge.value),"label"in ge&&e(0,i=ge.label),"showHelp"in ge&&e(1,u=ge.showHelp)},t.$$.update=()=>{t.$$.dirty[0]&62849004&&(!f&&r&&(e(2,c=r.enabled||!1),e(24,d=r.retryableStatusCodes||[500,502,503,504]),e(4,p=d.join(", ")),e(5,m=r.consecutiveFailuresThreshold),e(6,g=r.healthyThreshold),e(7,b=r.requestTimeoutMs),e(8,v=r.connectTimeoutMs),e(9,w=r.recoveryIntervalMs),e(10,C=r.recoveryTimeoutMs),r.healthCheck&&(e(11,E=r.healthCheck.enabled||!1),e(12,y=r.healthCheck.intervalMs),e(13,T=r.healthCheck.timeoutMs),e(14,S=r.healthCheck.path),e(15,q=r.healthCheck.method),e(25,D=r.healthCheck.expectedStatus||[200]),e(16,H=D.join(", ")),e(17,I=r.healthCheck.unhealthyThreshold),e(18,R=r.healthCheck.healthyThreshold)),r.slowStart&&(e(19,L=r.slowStart.enabled||!1),e(20,A=r.slowStart.durationMs),e(21,N=r.slowStart.initialWeightFactor)),e(3,f=!0)),c?r?(e(23,r.enabled=!0,r),e(23,r.retryableStatusCodes=d.length>0?d:[500,502,503,504],r),m!==void 0&&e(23,r.consecutiveFailuresThreshold=m,r),g!==void 0&&e(23,r.healthyThreshold=g,r),b!==void 0&&e(23,r.requestTimeoutMs=b,r),v!==void 0&&e(23,r.connectTimeoutMs=v,r),w!==void 0&&e(23,r.recoveryIntervalMs=w,r),C!==void 0&&e(23,r.recoveryTimeoutMs=C,r),E?e(23,r.healthCheck={enabled:!0,intervalMs:y,timeoutMs:T,path:S,method:q,expectedStatus:D.length>0?D:[200],unhealthyThreshold:I,healthyThreshold:R},r):e(23,r.healthCheck=void 0,r),L?e(23,r.slowStart={enabled:!0,durationMs:A,initialWeightFactor:N},r):e(23,r.slowStart=void 0,r)):e(23,r={enabled:!0,retryableStatusCodes:d.length>0?d:[500,502,503,504]}):e(23,r=void 0)),t.$$.dirty[0]&16&&e(24,d=jd(p)),t.$$.dirty[0]&65536&&e(25,D=jd(H))},[i,u,c,f,p,m,g,b,v,w,C,E,y,T,S,q,H,I,R,L,A,N,n,r,d,D,Z,Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe]}class s_ extends Vt{constructor(l){super(),Ut(this,l,l_,t_,At,{value:23,label:0,showHelp:1},null,[-1,-1])}}function o_(t){let l,e,n,r=t[1]("routeEditor.failoverTitle")+"",i,u,c,f=t[1]("routeEditor.failoverHelp")+"",d,p,m,g,b;function v(C){t[2](C)}let w={label:t[1]("routeEditor.failoverTitle"),showHelp:!0,showLabel:!1};return t[0].failover!==void 0&&(w.value=t[0].failover),m=new s_({props:w}),bl.push(()=>Rl(m,"value",v)),{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(l,"class","space-y-4")},m(C,E){j(C,l,E),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),yt(m,l,null),b=!0},p(C,[E]){(!b||E&2)&&r!==(r=C[1]("routeEditor.failoverTitle")+"")&&k(i,r),(!b||E&2)&&f!==(f=C[1]("routeEditor.failoverHelp")+"")&&k(d,f);const y={};E&2&&(y.label=C[1]("routeEditor.failoverTitle")),!g&&E&1&&(g=!0,y.value=C[0].failover,Sl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&P(l),Ct(m)}}}function n_(t,l,e){let n;Dt(t,Rt,u=>e(1,n=u));let{route:r}=l;function i(u){t.$$.not_equal(r.failover,u)&&(r.failover=u,e(0,r))}return t.$$set=u=>{"route"in u&&e(0,r=u.route)},[r,n,i]}class r_ extends Vt{constructor(l){super(),Ut(this,l,n_,o_,At,{route:0})}}function Ld(t,l,e){const n=t.slice();return n[8]=l[e],n[10]=e,n}function Dd(t){let l;return{c(){l=a("span"),l.textContent="Transformer",o(l,"class","badge badge-xs badge-info ml-2")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Id(t){let l,e,n=(t[8].priority||t[10]+1)+"",r,i,u,c,f=(t[8].target||t[4]("routeEditor.notSet"))+"",d,p,m,g,b=t[4]("upstream.weight")+"",v,w,C=(t[8].weight||100)+"",E,y,T,S=t[8].plugins&&t[8].plugins.length>0&&Dd();return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),c=a("div"),d=_(f),m=h(),g=a("div"),v=_(b),w=_(": "),E=_(C),y=h(),S&&S.c(),T=h(),o(e,"class","badge badge-primary"),o(c,"class","font-medium text-sm truncate"),o(c,"title",p=t[8].target),o(g,"class","text-xs text-gray-500"),o(u,"class","flex-1"),o(l,"class","flex items-center gap-3 p-3 bg-base-100 rounded-lg")},m(q,D){j(q,l,D),s(l,e),s(e,r),s(l,i),s(l,u),s(u,c),s(c,d),s(u,m),s(u,g),s(g,v),s(g,w),s(g,E),s(g,y),S&&S.m(g,null),s(l,T)},p(q,D){D&1&&n!==(n=(q[8].priority||q[10]+1)+"")&&k(r,n),D&17&&f!==(f=(q[8].target||q[4]("routeEditor.notSet"))+"")&&k(d,f),D&1&&p!==(p=q[8].target)&&o(c,"title",p),D&16&&b!==(b=q[4]("upstream.weight")+"")&&k(v,b),D&1&&C!==(C=(q[8].weight||100)+"")&&k(E,C),q[8].plugins&&q[8].plugins.length>0?S||(S=Dd(),S.c(),S.m(g,null)):S&&(S.d(1),S=null)},d(q){q&&P(l),S&&S.d()}}}function Bd(t){let l,e,n,r,i,u,c,f,d,p,m=t[4]("common.copy")+"",g,b,v;return{c(){l=a("div"),e=a("pre"),n=a("code"),r=_(t[3]),i=h(),u=a("div"),c=a("button"),f=ae("svg"),d=ae("path"),p=h(),g=_(m),o(l,"class","mockup-code mt-4"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline"),o(u,"class","card-actions justify-end mt-4")},m(w,C){j(w,l,C),s(l,e),s(e,n),s(n,r),j(w,i,C),j(w,u,C),s(u,c),s(c,f),s(f,d),s(c,p),s(c,g),b||(v=V(c,"click",t[7]),b=!0)},p(w,C){C&8&&k(r,w[3]),C&16&&m!==(m=w[4]("common.copy")+"")&&k(g,m)},d(w){w&&(P(l),P(i),P(u)),b=!1,v()}}}function Ad(t){let l,e,n,r,i=t[4]("auth.routeAuth")+"",u;return{c(){l=a("div"),e=a("div"),e.textContent="\u2713",n=h(),r=a("div"),u=_(i),o(e,"class","badge badge-sm badge-success"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-3")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&16&&i!==(i=c[4]("auth.routeAuth")+"")&&k(u,i)},d(c){c&&P(l)}}}function Od(t){let l,e,n,r,i=t[4]("routeEditor.pathRewrite")+"",u;return{c(){l=a("div"),e=a("div"),e.textContent="\u2192",n=h(),r=a("div"),u=_(i),o(e,"class","badge badge-sm badge-info"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-3")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.pathRewrite")+"")&&k(u,i)},d(c){c&&P(l)}}}function Fd(t){let l,e,n,r,i=t[4]("routeEditor.transformer")+"",u;return{c(){l=a("div"),e=a("div"),e.textContent="\u26A1",n=h(),r=a("div"),u=_(i),o(e,"class","badge badge-sm badge-warning"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-3")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.transformer")+"")&&k(u,i)},d(c){c&&P(l)}}}function zd(t){let l,e=t[4]("routeEditor.failoverEnabled")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-success ml-1")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i&16&&e!==(e=r[4]("routeEditor.failoverEnabled")+"")&&k(n,e)},d(r){r&&P(l)}}}function a_(t){let l,e,n,r=t[4]("routeEditor.preview")+"",i,u,c,f=t[4]("routeEditor.previewHelp")+"",d,p,m,g,b,v=t[4]("routeEditor.upstreams")+"",w,C,E,y=t[2].upstreamsCount+"",T,S,q,D=t[4]("routeEditor.totalWeight")+"",H,I,R=t[2].totalWeight+"",L,A,N,Z,Y=t[4]("routeEditor.features")+"",x,F,K,M=[t[2].hasAuth,t[2].hasFailover,t[2].hasTransformer,t[2].hasPathRewrite].filter(Boolean).length+"",B,U,O,J=t[4]("routeEditor.featuresEnabled")+"",ie,ue,ne,$,te=t[4]("routes.path")+"",re,ee,G,pe=(t[0].path||t[4]("routeEditor.notSet"))+"",oe,ge,he,ye,Fe=t[4]("routeEditor.routePath")+"",je,we,Oe,Je,Le,Pe=t[4]("routeEditor.enabledFeatures")+"",Me,fe,_e,Be,De,se=t[2].hasAuth?"\u2713":"\u25CB",ke,me,Ee,Ve,Ie=t[4]("auth.routeAuth")+"",nt,Ne,Ye,Qe,ve=t[2].hasFailover?"\u2713":"\u25CB",de,Te,Ze,Se,Ue=t[4]("routeEditor.failoverTitle")+"",Ce,mt,Ge,ce,qe=t[2].hasTransformer?"\u2713":"\u25CB",Re,dt,We,z,He=t[4]("routeEditor.transformer")+"",X,ft,Ht,Ke,_t=t[2].hasPathRewrite?"\u2713":"\u25CB",lt,it,ze,Xe,Bt=t[4]("routeEditor.pathRewrite")+"",at,gt,wt,pt,vl,rt=t[4]("routeEditor.upstreams")+"",Mt,ht,Tt,kl,Ot,hl,ml,ql,Jt=t[4]("routeEditor.jsonConfig")+"",Ql,Qt,Yt,Hl=(t[1]?t[4]("common.hide"):t[4]("common.show"))+"",Il,gl,ol,Yl,Ft,Pl,Vl=t[4]("routeEditor.requestFlow")+"",Jl,El,zt,Zl,Pt,jl,Ll,$l,xt=t[4]("routeEditor.clientRequest")+"",wl,es,Fl,Bl=(t[0].path||"/")+"",Wl,Ps,nl,yl,rl,zl,al,_l,ll,Dl,Nl,Tl=t[4]("routeEditor.selectUpstream")+"",Wt,It,jt,$t=t[2].upstreamsCount+"",el,Kt,Zt=t[4]("routeEditor.upstreams")+"",il,Xt,$e,Al,ts,Xl,xl,ls=t[4]("routeEditor.returnResponse")+"",Ds,ss,zs,ul=ut(t[0].upstreams),Nt=[];for(let xe=0;xe<ul.length;xe+=1)Nt[xe]=Id(Ld(t,ul,xe));let ot=t[1]&&Bd(t),ct=t[2].hasAuth&&Ad(t),sl=t[2].hasPathRewrite&&Od(t),Ml=t[2].hasTransformer&&Fd(t),fl=t[2].hasFailover&&zd(t);return{c(){l=a("div"),e=a("div"),n=a("h3"),i=_(r),u=h(),c=a("p"),d=_(f),p=h(),m=a("div"),g=a("div"),b=a("div"),w=_(v),C=h(),E=a("div"),T=_(y),S=h(),q=a("div"),H=_(D),I=_(": "),L=_(R),A=h(),N=a("div"),Z=a("div"),x=_(Y),F=h(),K=a("div"),B=_(M),U=h(),O=a("div"),ie=_(J),ue=h(),ne=a("div"),$=a("div"),re=_(te),ee=h(),G=a("div"),oe=_(pe),he=h(),ye=a("div"),je=_(Fe),we=h(),Oe=a("div"),Je=a("div"),Le=a("h4"),Me=_(Pe),fe=h(),_e=a("div"),Be=a("div"),De=a("div"),ke=_(se),Ee=h(),Ve=a("span"),nt=_(Ie),Ne=h(),Ye=a("div"),Qe=a("div"),de=_(ve),Ze=h(),Se=a("span"),Ce=_(Ue),mt=h(),Ge=a("div"),ce=a("div"),Re=_(qe),We=h(),z=a("span"),X=_(He),ft=h(),Ht=a("div"),Ke=a("div"),lt=_(_t),ze=h(),Xe=a("span"),at=_(Bt),gt=h(),wt=a("div"),pt=a("div"),vl=a("h4"),Mt=_(rt),ht=h(),Tt=a("div");for(let xe=0;xe<Nt.length;xe+=1)Nt[xe].c();kl=h(),Ot=a("div"),hl=a("div"),ml=a("div"),ql=a("h4"),Ql=_(Jt),Qt=h(),Yt=a("button"),Il=_(Hl),gl=h(),ot&&ot.c(),ol=h(),Yl=a("div"),Ft=a("div"),Pl=a("h4"),Jl=_(Vl),El=h(),zt=a("div"),Zl=a("div"),Pt=a("div"),Pt.textContent="1",jl=h(),Ll=a("div"),$l=a("div"),wl=_(xt),es=h(),Fl=a("div"),Wl=_(Bl),Ps=h(),nl=a("div"),ct&&ct.c(),yl=h(),sl&&sl.c(),rl=h(),Ml&&Ml.c(),zl=h(),al=a("div"),_l=a("div"),_l.textContent="2",ll=h(),Dl=a("div"),Nl=a("div"),Wt=_(Tl),It=h(),jt=a("div"),el=_($t),Kt=h(),il=_(Zt),Xt=h(),fl&&fl.c(),$e=h(),Al=a("div"),ts=a("div"),ts.textContent="3",Xl=h(),xl=a("div"),Ds=_(ls),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(b,"class","stat-title"),o(E,"class","stat-value text-primary"),o(q,"class","stat-desc"),o(g,"class","stat bg-base-200 rounded-lg"),o(Z,"class","stat-title"),o(K,"class","stat-value text-2xl"),o(O,"class","stat-desc"),o(N,"class","stat bg-base-200 rounded-lg"),o($,"class","stat-title"),o(G,"class","stat-value text-sm truncate"),o(G,"title",ge=t[0].path),o(ye,"class","stat-desc"),o(ne,"class","stat bg-base-200 rounded-lg"),o(m,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"),o(Le,"class","card-title text-base"),o(De,"class",me=`badge ${t[2].hasAuth?"badge-success":"badge-ghost"}`),o(Ve,"class","text-sm"),o(Be,"class","flex items-center gap-2"),o(Qe,"class",Te=`badge ${t[2].hasFailover?"badge-success":"badge-ghost"}`),o(Se,"class","text-sm"),o(Ye,"class","flex items-center gap-2"),o(ce,"class",dt=`badge ${t[2].hasTransformer?"badge-success":"badge-ghost"}`),o(z,"class","text-sm"),o(Ge,"class","flex items-center gap-2"),o(Ke,"class",it=`badge ${t[2].hasPathRewrite?"badge-success":"badge-ghost"}`),o(Xe,"class","text-sm"),o(Ht,"class","flex items-center gap-2"),o(_e,"class","space-y-2"),o(Je,"class","card-body"),o(Oe,"class","card bg-base-200"),o(vl,"class","card-title text-base"),o(Tt,"class","space-y-2"),o(pt,"class","card-body"),o(wt,"class","card bg-base-200"),o(ql,"class","card-title text-base"),o(Yt,"type","button"),o(Yt,"class","btn btn-sm btn-ghost"),o(ml,"class","flex justify-between items-center"),o(hl,"class","card-body"),o(Ot,"class","card bg-base-200"),o(Pl,"class","card-title text-base"),o(Pt,"class","badge badge-lg badge-neutral"),o($l,"class","font-medium"),o(Fl,"class","text-xs text-gray-500"),o(Ll,"class","flex-1"),o(Zl,"class","flex items-center gap-3"),o(_l,"class","badge badge-lg badge-primary"),o(Nl,"class","font-medium"),o(jt,"class","text-xs text-gray-500"),o(Dl,"class","flex-1"),o(al,"class","flex items-center gap-3"),o(ts,"class","badge badge-lg badge-accent"),o(xl,"class","font-medium"),o(Al,"class","flex items-center gap-3"),o(nl,"class","ml-6 border-l-2 border-base-300 pl-4 space-y-3"),o(zt,"class","flex flex-col gap-3 mt-4"),o(Ft,"class","card-body"),o(Yl,"class","card bg-base-200"),o(l,"class","space-y-6")},m(xe,vt){j(xe,l,vt),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(l,p),s(l,m),s(m,g),s(g,b),s(b,w),s(g,C),s(g,E),s(E,T),s(g,S),s(g,q),s(q,H),s(q,I),s(q,L),s(m,A),s(m,N),s(N,Z),s(Z,x),s(N,F),s(N,K),s(K,B),s(N,U),s(N,O),s(O,ie),s(m,ue),s(m,ne),s(ne,$),s($,re),s(ne,ee),s(ne,G),s(G,oe),s(ne,he),s(ne,ye),s(ye,je),s(l,we),s(l,Oe),s(Oe,Je),s(Je,Le),s(Le,Me),s(Je,fe),s(Je,_e),s(_e,Be),s(Be,De),s(De,ke),s(Be,Ee),s(Be,Ve),s(Ve,nt),s(_e,Ne),s(_e,Ye),s(Ye,Qe),s(Qe,de),s(Ye,Ze),s(Ye,Se),s(Se,Ce),s(_e,mt),s(_e,Ge),s(Ge,ce),s(ce,Re),s(Ge,We),s(Ge,z),s(z,X),s(_e,ft),s(_e,Ht),s(Ht,Ke),s(Ke,lt),s(Ht,ze),s(Ht,Xe),s(Xe,at),s(l,gt),s(l,wt),s(wt,pt),s(pt,vl),s(vl,Mt),s(pt,ht),s(pt,Tt);for(let cl=0;cl<Nt.length;cl+=1)Nt[cl]&&Nt[cl].m(Tt,null);s(l,kl),s(l,Ot),s(Ot,hl),s(hl,ml),s(ml,ql),s(ql,Ql),s(ml,Qt),s(ml,Yt),s(Yt,Il),s(hl,gl),ot&&ot.m(hl,null),s(l,ol),s(l,Yl),s(Yl,Ft),s(Ft,Pl),s(Pl,Jl),s(Ft,El),s(Ft,zt),s(zt,Zl),s(Zl,Pt),s(Zl,jl),s(Zl,Ll),s(Ll,$l),s($l,wl),s(Ll,es),s(Ll,Fl),s(Fl,Wl),s(zt,Ps),s(zt,nl),ct&&ct.m(nl,null),s(nl,yl),sl&&sl.m(nl,null),s(nl,rl),Ml&&Ml.m(nl,null),s(nl,zl),s(nl,al),s(al,_l),s(al,ll),s(al,Dl),s(Dl,Nl),s(Nl,Wt),s(Dl,It),s(Dl,jt),s(jt,el),s(jt,Kt),s(jt,il),s(jt,Xt),fl&&fl.m(jt,null),s(nl,$e),s(nl,Al),s(Al,ts),s(Al,Xl),s(Al,xl),s(xl,Ds),ss||(zs=V(Yt,"click",t[6]),ss=!0)},p(xe,[vt]){if(vt&16&&r!==(r=xe[4]("routeEditor.preview")+"")&&k(i,r),vt&16&&f!==(f=xe[4]("routeEditor.previewHelp")+"")&&k(d,f),vt&16&&v!==(v=xe[4]("routeEditor.upstreams")+"")&&k(w,v),vt&4&&y!==(y=xe[2].upstreamsCount+"")&&k(T,y),vt&16&&D!==(D=xe[4]("routeEditor.totalWeight")+"")&&k(H,D),vt&4&&R!==(R=xe[2].totalWeight+"")&&k(L,R),vt&16&&Y!==(Y=xe[4]("routeEditor.features")+"")&&k(x,Y),vt&4&&M!==(M=[xe[2].hasAuth,xe[2].hasFailover,xe[2].hasTransformer,xe[2].hasPathRewrite].filter(Boolean).length+"")&&k(B,M),vt&16&&J!==(J=xe[4]("routeEditor.featuresEnabled")+"")&&k(ie,J),vt&16&&te!==(te=xe[4]("routes.path")+"")&&k(re,te),vt&17&&pe!==(pe=(xe[0].path||xe[4]("routeEditor.notSet"))+"")&&k(oe,pe),vt&1&&ge!==(ge=xe[0].path)&&o(G,"title",ge),vt&16&&Fe!==(Fe=xe[4]("routeEditor.routePath")+"")&&k(je,Fe),vt&16&&Pe!==(Pe=xe[4]("routeEditor.enabledFeatures")+"")&&k(Me,Pe),vt&4&&se!==(se=xe[2].hasAuth?"\u2713":"\u25CB")&&k(ke,se),vt&4&&me!==(me=`badge ${xe[2].hasAuth?"badge-success":"badge-ghost"}`)&&o(De,"class",me),vt&16&&Ie!==(Ie=xe[4]("auth.routeAuth")+"")&&k(nt,Ie),vt&4&&ve!==(ve=xe[2].hasFailover?"\u2713":"\u25CB")&&k(de,ve),vt&4&&Te!==(Te=`badge ${xe[2].hasFailover?"badge-success":"badge-ghost"}`)&&o(Qe,"class",Te),vt&16&&Ue!==(Ue=xe[4]("routeEditor.failoverTitle")+"")&&k(Ce,Ue),vt&4&&qe!==(qe=xe[2].hasTransformer?"\u2713":"\u25CB")&&k(Re,qe),vt&4&&dt!==(dt=`badge ${xe[2].hasTransformer?"badge-success":"badge-ghost"}`)&&o(ce,"class",dt),vt&16&&He!==(He=xe[4]("routeEditor.transformer")+"")&&k(X,He),vt&4&&_t!==(_t=xe[2].hasPathRewrite?"\u2713":"\u25CB")&&k(lt,_t),vt&4&&it!==(it=`badge ${xe[2].hasPathRewrite?"badge-success":"badge-ghost"}`)&&o(Ke,"class",it),vt&16&&Bt!==(Bt=xe[4]("routeEditor.pathRewrite")+"")&&k(at,Bt),vt&16&&rt!==(rt=xe[4]("routeEditor.upstreams")+"")&&k(Mt,rt),vt&17){ul=ut(xe[0].upstreams);let cl;for(cl=0;cl<ul.length;cl+=1){const cr=Ld(xe,ul,cl);Nt[cl]?Nt[cl].p(cr,vt):(Nt[cl]=Id(cr),Nt[cl].c(),Nt[cl].m(Tt,null))}for(;cl<Nt.length;cl+=1)Nt[cl].d(1);Nt.length=ul.length}vt&16&&Jt!==(Jt=xe[4]("routeEditor.jsonConfig")+"")&&k(Ql,Jt),vt&18&&Hl!==(Hl=(xe[1]?xe[4]("common.hide"):xe[4]("common.show"))+"")&&k(Il,Hl),xe[1]?ot?ot.p(xe,vt):(ot=Bd(xe),ot.c(),ot.m(hl,null)):ot&&(ot.d(1),ot=null),vt&16&&Vl!==(Vl=xe[4]("routeEditor.requestFlow")+"")&&k(Jl,Vl),vt&16&&xt!==(xt=xe[4]("routeEditor.clientRequest")+"")&&k(wl,xt),vt&1&&Bl!==(Bl=(xe[0].path||"/")+"")&&k(Wl,Bl),xe[2].hasAuth?ct?ct.p(xe,vt):(ct=Ad(xe),ct.c(),ct.m(nl,yl)):ct&&(ct.d(1),ct=null),xe[2].hasPathRewrite?sl?sl.p(xe,vt):(sl=Od(xe),sl.c(),sl.m(nl,rl)):sl&&(sl.d(1),sl=null),xe[2].hasTransformer?Ml?Ml.p(xe,vt):(Ml=Fd(xe),Ml.c(),Ml.m(nl,zl)):Ml&&(Ml.d(1),Ml=null),vt&16&&Tl!==(Tl=xe[4]("routeEditor.selectUpstream")+"")&&k(Wt,Tl),vt&4&&$t!==($t=xe[2].upstreamsCount+"")&&k(el,$t),vt&16&&Zt!==(Zt=xe[4]("routeEditor.upstreams")+"")&&k(il,Zt),xe[2].hasFailover?fl?fl.p(xe,vt):(fl=zd(xe),fl.c(),fl.m(jt,null)):fl&&(fl.d(1),fl=null),vt&16&&ls!==(ls=xe[4]("routeEditor.returnResponse")+"")&&k(Ds,ls)},i:tt,o:tt,d(xe){xe&&P(l),Gt(Nt,xe),ot&&ot.d(),ct&&ct.d(),sl&&sl.d(),Ml&&Ml.d(),fl&&fl.d(),ss=!1,zs()}}}function i_(t,l,e){let n,r,i,u;Dt(t,Rt,m=>e(4,u=m));let{route:c}=l,f=!1;const d=()=>e(1,f=!f),p=()=>{navigator.clipboard.writeText(r),alert(u("common.copied"))};return t.$$set=m=>{"route"in m&&e(0,c=m.route)},t.$$.update=()=>{t.$$.dirty&1&&e(5,n={...c,upstreams:c.upstreams.map(({_uid:m,...g})=>g)}),t.$$.dirty&32&&e(3,r=JSON.stringify(n,null,2)),t.$$.dirty&1&&e(2,i={upstreamsCount:c.upstreams.length,hasAuth:c.auth?.enabled||!1,hasFailover:c.failover?.enabled||!1,hasTransformer:c.plugins&&c.plugins.length>0||!1,hasPathRewrite:c.pathRewrite&&Object.keys(c.pathRewrite).length>0,totalWeight:c.upstreams.reduce((m,g)=>m+(g.weight||100),0)})},[c,f,i,r,u,n,d,p]}class u_ extends Vt{constructor(l){super(),Ut(this,l,i_,a_,At,{route:0})}}function Nd(t,l,e){const n=t.slice();return n[52]=l[e],n}function Ud(t){let l,e;return{c(){l=a("code"),e=_(t[2]),o(l,"class","px-2 py-1 bg-base-200 rounded text-sm font-mono text-gray-600")},m(n,r){j(n,l,r),s(l,e)},p(n,r){r[0]&4&&k(e,n[2])},d(n){n&&P(l)}}}function f_(t){let l,e,n,r,i,u,c,f,d,p=t[16]("routeEditor.basicInfo")+"",m,g,b,v,w,C,E,y=t[16]("routeEditor.upstreams")+"",T,S,q,D=t[0].upstreams.length+"",H,I,R,L,A,N,Z,Y,x=t[16]("routeEditor.requestModification")+"",F,K,M,B,U,O,J,ie=t[16]("auth.routeAuth")+"",ue,ne,$,te,re,ee,G,pe,oe=t[16]("routeEditor.failoverTitle")+"",ge,he,ye,Fe,je,we,Oe,Je,Le,Pe=t[16]("routeEditor.preview")+"",Me,fe,_e,Be,De=t[16]("shortcuts.title")+"",se,ke,me,Ee,Ve,Ie,nt,Ne,Ye,Qe=t[16]("shortcuts.save")+"",ve,de,Te,Ze,Se,Ue,Ce,mt,Ge=t[16]("shortcuts.switchSection")+"",ce,qe,Re,dt,We,z,He=t[16]("shortcuts.cancel")+"",X,ft,Ht,Ke,_t,lt,it,ze,Xe,Bt,at,gt=t[0].auth?.enabled&&Vd(),wt=t[0].failover?.enabled&&Jd(),pt=!t[1]&&Wd(t);const vl=[__,g_,m_,h_,p_,d_],rt=[];function Mt(ht,Tt){return ht[6]==="basic"?0:ht[6]==="upstreams"?1:ht[6]==="modification"?2:ht[6]==="auth"?3:ht[6]==="failover"?4:ht[6]==="preview"?5:-1}return~(it=Mt(t))&&(ze=rt[it]=vl[it](t)),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("ul"),i=a("li"),u=a("button"),c=ae("svg"),f=ae("path"),d=h(),m=_(p),g=h(),b=a("li"),v=a("button"),w=ae("svg"),C=ae("path"),E=h(),T=_(y),S=h(),q=a("span"),H=_(D),R=h(),L=a("li"),A=a("button"),N=ae("svg"),Z=ae("path"),Y=h(),F=_(x),K=h(),M=a("li"),B=a("button"),U=ae("svg"),O=ae("path"),J=h(),ue=_(ie),ne=h(),gt&&gt.c(),$=h(),te=a("li"),re=a("button"),ee=ae("svg"),G=ae("path"),pe=h(),ge=_(oe),he=h(),wt&&wt.c(),ye=h(),Fe=a("li"),je=a("button"),we=ae("svg"),Oe=ae("path"),Je=ae("path"),Le=h(),Me=_(Pe),fe=h(),_e=a("div"),Be=a("div"),se=_(De),ke=h(),me=a("div"),Ee=a("div"),Ve=a("kbd"),Ve.textContent="\u2318",Ie=_(" + "),nt=a("kbd"),nt.textContent="S",Ne=h(),Ye=a("span"),ve=_(Qe),de=h(),Te=a("div"),Ze=a("kbd"),Ze.textContent="Ctrl",Se=_(" + "),Ue=a("kbd"),Ue.textContent="1-6",Ce=h(),mt=a("span"),ce=_(Ge),qe=h(),Re=a("div"),dt=a("kbd"),dt.textContent="Esc",We=h(),z=a("span"),X=_(He),ft=h(),pt&&pt.c(),Ht=h(),Ke=a("div"),_t=a("div"),lt=a("div"),ze&&ze.c(),o(f,"stroke-linecap","round"),o(f,"stroke-linejoin","round"),o(f,"stroke-width","2"),o(f,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(c,"xmlns","http://www.w3.org/2000/svg"),o(c,"class","h-5 w-5"),o(c,"fill","none"),o(c,"viewBox","0 0 24 24"),o(c,"stroke","currentColor"),le(u,"active",t[6]==="basic"),o(C,"stroke-linecap","round"),o(C,"stroke-linejoin","round"),o(C,"stroke-width","2"),o(C,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(w,"xmlns","http://www.w3.org/2000/svg"),o(w,"class","h-5 w-5"),o(w,"fill","none"),o(w,"viewBox","0 0 24 24"),o(w,"stroke","currentColor"),o(q,"class","badge badge-sm tooltip tooltip-right"),o(q,"data-tip",I=t[16]("routeEditor.upstreamCountTooltip",{values:{count:t[0].upstreams.length}})),le(v,"active",t[6]==="upstreams"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-5 w-5"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),le(A,"active",t[6]==="modification"),o(O,"stroke-linecap","round"),o(O,"stroke-linejoin","round"),o(O,"stroke-width","2"),o(O,"d","M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-5 w-5"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),le(B,"active",t[6]==="auth"),o(G,"stroke-linecap","round"),o(G,"stroke-linejoin","round"),o(G,"stroke-width","2"),o(G,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(ee,"xmlns","http://www.w3.org/2000/svg"),o(ee,"class","h-5 w-5"),o(ee,"fill","none"),o(ee,"viewBox","0 0 24 24"),o(ee,"stroke","currentColor"),le(re,"active",t[6]==="failover"),o(Oe,"stroke-linecap","round"),o(Oe,"stroke-linejoin","round"),o(Oe,"stroke-width","2"),o(Oe,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(Je,"stroke-linecap","round"),o(Je,"stroke-linejoin","round"),o(Je,"stroke-width","2"),o(Je,"d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"),o(we,"xmlns","http://www.w3.org/2000/svg"),o(we,"class","h-5 w-5"),o(we,"fill","none"),o(we,"viewBox","0 0 24 24"),o(we,"stroke","currentColor"),le(je,"active",t[6]==="preview"),o(r,"class","menu bg-base-100 rounded-box shadow-lg gap-1"),o(Be,"class","font-semibold mb-2"),o(Ve,"class","kbd kbd-xs"),o(nt,"class","kbd kbd-xs"),o(Ye,"class","ml-1"),o(Ze,"class","kbd kbd-xs"),o(Ue,"class","kbd kbd-xs"),o(mt,"class","ml-1"),o(dt,"class","kbd kbd-xs"),o(z,"class","ml-1"),o(me,"class","space-y-1 text-gray-500"),o(_e,"class","mt-4 p-3 bg-base-100 rounded-box shadow-lg text-xs"),o(n,"class","sticky top-24"),o(e,"class","w-56 flex-shrink-0 relative z-10"),o(lt,"class","card-body"),o(_t,"class","card bg-base-100 shadow-md"),o(Ke,"class","flex-1 ml-6 relative"),o(l,"class","max-w-7xl mx-auto flex gap-0 p-6 pb-32")},m(ht,Tt){j(ht,l,Tt),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,c),s(c,f),s(u,d),s(u,m),s(r,g),s(r,b),s(b,v),s(v,w),s(w,C),s(v,E),s(v,T),s(v,S),s(v,q),s(q,H),s(r,R),s(r,L),s(L,A),s(A,N),s(N,Z),s(A,Y),s(A,F),s(r,K),s(r,M),s(M,B),s(B,U),s(U,O),s(B,J),s(B,ue),s(B,ne),gt&&gt.m(B,null),s(r,$),s(r,te),s(te,re),s(re,ee),s(ee,G),s(re,pe),s(re,ge),s(re,he),wt&&wt.m(re,null),s(r,ye),s(r,Fe),s(Fe,je),s(je,we),s(we,Oe),s(we,Je),s(je,Le),s(je,Me),s(n,fe),s(n,_e),s(_e,Be),s(Be,se),s(_e,ke),s(_e,me),s(me,Ee),s(Ee,Ve),s(Ee,Ie),s(Ee,nt),s(Ee,Ne),s(Ee,Ye),s(Ye,ve),s(me,de),s(me,Te),s(Te,Ze),s(Te,Se),s(Te,Ue),s(Te,Ce),s(Te,mt),s(mt,ce),s(me,qe),s(me,Re),s(Re,dt),s(Re,We),s(Re,z),s(z,X),s(n,ft),pt&&pt.m(n,null),s(l,Ht),s(l,Ke),s(Ke,_t),s(_t,lt),~it&&rt[it].m(lt,null),Xe=!0,Bt||(at=[V(u,"click",t[27]),V(v,"click",t[28]),V(A,"click",t[29]),V(B,"click",t[30]),V(re,"click",t[31]),V(je,"click",t[32])],Bt=!0)},p(ht,Tt){(!Xe||Tt[0]&65536)&&p!==(p=ht[16]("routeEditor.basicInfo")+"")&&k(m,p),(!Xe||Tt[0]&64)&&le(u,"active",ht[6]==="basic"),(!Xe||Tt[0]&65536)&&y!==(y=ht[16]("routeEditor.upstreams")+"")&&k(T,y),(!Xe||Tt[0]&1)&&D!==(D=ht[0].upstreams.length+"")&&k(H,D),(!Xe||Tt[0]&65537&&I!==(I=ht[16]("routeEditor.upstreamCountTooltip",{values:{count:ht[0].upstreams.length}})))&&o(q,"data-tip",I),(!Xe||Tt[0]&64)&&le(v,"active",ht[6]==="upstreams"),(!Xe||Tt[0]&65536)&&x!==(x=ht[16]("routeEditor.requestModification")+"")&&k(F,x),(!Xe||Tt[0]&64)&&le(A,"active",ht[6]==="modification"),(!Xe||Tt[0]&65536)&&ie!==(ie=ht[16]("auth.routeAuth")+"")&&k(ue,ie),ht[0].auth?.enabled?gt||(gt=Vd(),gt.c(),gt.m(B,null)):gt&&(gt.d(1),gt=null),(!Xe||Tt[0]&64)&&le(B,"active",ht[6]==="auth"),(!Xe||Tt[0]&65536)&&oe!==(oe=ht[16]("routeEditor.failoverTitle")+"")&&k(ge,oe),ht[0].failover?.enabled?wt||(wt=Jd(),wt.c(),wt.m(re,null)):wt&&(wt.d(1),wt=null),(!Xe||Tt[0]&64)&&le(re,"active",ht[6]==="failover"),(!Xe||Tt[0]&65536)&&Pe!==(Pe=ht[16]("routeEditor.preview")+"")&&k(Me,Pe),(!Xe||Tt[0]&64)&&le(je,"active",ht[6]==="preview"),(!Xe||Tt[0]&65536)&&De!==(De=ht[16]("shortcuts.title")+"")&&k(se,De),(!Xe||Tt[0]&65536)&&Qe!==(Qe=ht[16]("shortcuts.save")+"")&&k(ve,Qe),(!Xe||Tt[0]&65536)&&Ge!==(Ge=ht[16]("shortcuts.switchSection")+"")&&k(ce,Ge),(!Xe||Tt[0]&65536)&&He!==(He=ht[16]("shortcuts.cancel")+"")&&k(X,He),ht[1]?pt&&(pt.d(1),pt=null):pt?pt.p(ht,Tt):(pt=Wd(ht),pt.c(),pt.m(n,null));let kl=it;it=Mt(ht),it===kl?~it&&rt[it].p(ht,Tt):(ze&&(Gl(),st(rt[kl],1,1,()=>{rt[kl]=null}),Kl()),~it?(ze=rt[it],ze?ze.p(ht,Tt):(ze=rt[it]=vl[it](ht),ze.c()),et(ze,1),ze.m(lt,null)):ze=null)},i(ht){Xe||(et(ze),Xe=!0)},o(ht){st(ze),Xe=!1},d(ht){ht&&P(l),gt&&gt.d(),wt&&wt.d(),pt&&pt.d(),~it&&rt[it].d(),Bt=!1,bt(at)}}}function c_(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function Vd(t){let l;return{c(){l=a("span"),l.textContent="\u2713",o(l,"class","badge badge-success badge-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Jd(t){let l;return{c(){l=a("span"),l.textContent="\u2713",o(l,"class","badge badge-success badge-xs")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Wd(t){let l,e,n,r,i,u=t[16]("routeEditor.useTemplate")+"",c,f,d;return{c(){l=a("div"),e=a("button"),n=ae("svg"),r=ae("path"),i=h(),c=_(u),o(r,"stroke-linecap","round"),o(r,"stroke-linejoin","round"),o(r,"stroke-width","2"),o(r,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"type","button"),o(e,"class","btn btn-sm btn-outline w-full gap-2"),o(l,"class","mt-4")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,r),s(e,i),s(e,c),f||(d=V(e,"click",t[33]),f=!0)},p(p,m){m[0]&65536&&u!==(u=p[16]("routeEditor.useTemplate")+"")&&k(c,u)},d(p){p&&P(l),f=!1,d()}}}function d_(t){let l,e;return l=new u_({props:{route:t[0]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r[0]&1&&(i.route=n[0]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function p_(t){let l,e,n;function r(u){t[38](u)}let i={};return t[0]!==void 0&&(i.route=t[0]),l=new r_({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function h_(t){let l,e,n;function r(u){t[37](u)}let i={};return t[0]!==void 0&&(i.route=t[0]),l=new e_({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function m_(t){let l,e,n;function r(u){t[36](u)}let i={};return t[0]!==void 0&&(i.route=t[0]),l=new Xg({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function g_(t){let l,e,n;function r(u){t[35](u)}let i={errors:t[8],weightErrors:t[9]};return t[0]!==void 0&&(i.route=t[0]),l=new Wg({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),c[0]&512&&(f.weightErrors=u[9]),!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function __(t){let l,e,n;function r(u){t[34](u)}let i={errors:t[8]};return t[0]!==void 0&&(i.route=t[0]),l=new Tg({props:i}),bl.push(()=>Rl(l,"route",r)),{c(){Et(l.$$.fragment)},m(u,c){yt(l,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),!e&&c[0]&1&&(e=!0,f.route=u[0],Sl(()=>e=!1)),l.$set(f)},i(u){n||(et(l.$$.fragment,u),n=!0)},o(u){st(l.$$.fragment,u),n=!1},d(u){Ct(l,u)}}}function Gd(t){let l,e=t[16]("autosave.lastSaved")+"",n,r,i=t[19](t[12])+"",u;return{c(){l=a("span"),n=_(e),r=_(": "),u=_(i),o(l,"class","text-xs text-gray-500")},m(c,f){j(c,l,f),s(l,n),s(l,r),s(l,u)},p(c,f){f[0]&65536&&e!==(e=c[16]("autosave.lastSaved")+"")&&k(n,e),f[0]&4096&&i!==(i=c[19](c[12])+"")&&k(u,i)},d(c){c&&P(l)}}}function b_(t){let l,e,n,r,i,u=t[16]("validation.allGood")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(l,"class","flex items-center gap-2 text-success")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d[0]&65536&&u!==(u=f[16]("validation.allGood")+"")&&k(c,u)},d(f){f&&P(l)}}}function v_(t){let l,e,n,r,i,u=t[10].length+"",c,f,d=t[16]("validation.errors")+"",p,m,g,b=(t[7]?t[16]("common.hide"):t[16]("common.show"))+"",v,w,C;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=h(),p=_(d),m=h(),g=a("button"),v=_(b),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(g,"class","btn btn-xs btn-ghost"),o(l,"class","flex items-center gap-2 text-error")},m(E,y){j(E,l,y),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,p),s(l,m),s(l,g),s(g,v),w||(C=V(g,"click",t[39]),w=!0)},p(E,y){y[0]&1024&&u!==(u=E[10].length+"")&&k(c,u),y[0]&65536&&d!==(d=E[16]("validation.errors")+"")&&k(p,d),y[0]&65664&&b!==(b=(E[7]?E[16]("common.hide"):E[16]("common.show"))+"")&&k(v,b)},d(E){E&&P(l),w=!1,C()}}}function k_(t){let l,e;return{c(){l=ae("svg"),e=ae("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-5 w-5"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor")},m(n,r){j(n,l,r),s(l,e)},d(n){n&&P(l)}}}function w_(t){let l;return{c(){l=a("span"),o(l,"class","loading loading-spinner loading-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Kd(t){let l,e,n=ut(t[10]),r=[];for(let i=0;i<n.length;i+=1)r[i]=Qd(Nd(t,n,i));return{c(){l=a("div"),e=a("ul");for(let i=0;i<r.length;i+=1)r[i].c();o(e,"class","text-sm space-y-1"),o(l,"class","mt-3 p-3 bg-error/10 rounded-lg border border-error/20")},m(i,u){j(i,l,u),s(l,e);for(let c=0;c<r.length;c+=1)r[c]&&r[c].m(e,null)},p(i,u){if(u[0]&1024){n=ut(i[10]);let c;for(c=0;c<n.length;c+=1){const f=Nd(i,n,c);r[c]?r[c].p(f,u):(r[c]=Qd(f),r[c].c(),r[c].m(e,null))}for(;c<r.length;c+=1)r[c].d(1);r.length=n.length}},d(i){i&&P(l),Gt(r,i)}}}function Qd(t){let l,e,n,r,i=t[52].field+"",u,c,f=t[52].message+"",d,p;return{c(){l=a("li"),e=a("span"),e.textContent="\u2022",n=h(),r=a("span"),u=_(i),c=_(": "),d=_(f),p=h(),o(e,"class","text-error"),o(l,"class","flex items-start gap-2")},m(m,g){j(m,l,g),s(l,e),s(l,n),s(l,r),s(r,u),s(r,c),s(r,d),s(l,p)},p(m,g){g[0]&1024&&i!==(i=m[52].field+"")&&k(u,i),g[0]&1024&&f!==(f=m[52].message+"")&&k(d,f)},d(m){m&&P(l)}}}function y_(t){let l,e,n,r,i,u,c,f=t[16]("breadcrumb.home")+"",d,p,m,g,b=t[16]("breadcrumb.routes")+"",v,w,C,E,y,T=(t[1]?t[16]("breadcrumb.editRoute"):t[16]("breadcrumb.newRoute"))+"",S,q,D,H,I,R,L,A,N,Z,Y,x,F,K,M,B=t[16]("common.cancel")+"",U,O,J,ie,ue=t[16]("common.save")+"",ne,$,te,re,ee,G,pe,oe,ge,he,ye,Fe,je,we,Oe,Je,Le,Pe=t[16]("confirmDialog.no")+"",Me,fe,_e,Be=t[16]("confirmDialog.yes")+"",De,se,ke,me,Ee,Ve,Ie=t[1]&&Ud(t);const nt=[c_,f_],Ne=[];function Ye(ce,qe){return ce[3]?0:1}H=Ye(t),I=Ne[H]=nt[H](t);let Qe=t[12]&&!t[1]&&Gd(t);function ve(ce,qe){if(ce[10].length>0)return v_;if(ce[11])return b_}let de=ve(t),Te=de&&de(t);function Ze(ce,qe){return ce[4]?w_:k_}let Se=Ze(t),Ue=Se(t),Ce=t[7]&&t[10].length>0&&Kd(t);function mt(ce){t[40](ce)}let Ge={};return t[5]!==void 0&&(Ge.showTemplates=t[5]),ee=new hg({props:Ge}),bl.push(()=>Rl(ee,"showTemplates",mt)),ee.$on("select",t[22]),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=a("ul"),u=a("li"),c=a("button"),d=_(f),p=h(),m=a("li"),g=a("button"),v=_(b),w=h(),C=a("li"),E=a("span"),y=a("span"),S=_(T),q=h(),Ie&&Ie.c(),D=h(),I.c(),R=h(),L=a("div"),A=a("div"),N=a("div"),Z=a("div"),Qe&&Qe.c(),Y=h(),x=a("div"),Te&&Te.c(),F=h(),K=a("div"),M=a("button"),U=_(B),O=h(),J=a("button"),Ue.c(),ie=h(),ne=_(ue),te=h(),Ce&&Ce.c(),re=h(),Et(ee.$$.fragment),pe=h(),oe=a("dialog"),ge=a("div"),he=a("h3"),ye=_(t[14]),Fe=h(),je=a("p"),we=_(t[15]),Oe=h(),Je=a("div"),Le=a("button"),Me=_(Pe),fe=h(),_e=a("button"),De=_(Be),se=h(),ke=a("button"),o(c,"type","button"),o(c,"class","link link-hover"),o(g,"type","button"),o(g,"class","link link-hover"),o(E,"class","flex items-center gap-2"),o(r,"class","breadcrumbs text-sm"),o(n,"class","max-w-7xl mx-auto px-6 py-4"),o(e,"class","bg-base-100 border-b border-base-300"),o(Z,"class","flex items-center gap-4"),o(M,"class","btn btn-outline"),M.disabled=t[4],o(J,"class","btn btn-primary"),J.disabled=$=!t[11]||t[4],o(K,"class","flex gap-3"),o(x,"class","flex items-center gap-4"),o(N,"class","flex justify-between items-center"),o(A,"class","max-w-7xl mx-auto px-6 py-4"),o(L,"class","fixed bottom-0 left-0 right-0 bg-base-100 border-t border-base-300 shadow-2xl z-40"),o(he,"class","font-bold text-lg"),o(je,"class","py-4"),o(Le,"class","btn btn-ghost"),o(_e,"class","btn btn-primary"),o(Je,"class","modal-action"),o(ge,"class","modal-box"),o(ke,"type","button"),o(ke,"class","modal-backdrop"),o(ke,"aria-label","Close dialog"),o(oe,"class","modal"),le(oe,"modal-open",t[13]),o(l,"class","min-h-screen bg-base-200")},m(ce,qe){j(ce,l,qe),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,c),s(c,d),s(i,p),s(i,m),s(m,g),s(g,v),s(i,w),s(i,C),s(C,E),s(E,y),s(y,S),s(E,q),Ie&&Ie.m(E,null),s(l,D),Ne[H].m(l,null),s(l,R),s(l,L),s(L,A),s(A,N),s(N,Z),Qe&&Qe.m(Z,null),s(N,Y),s(N,x),Te&&Te.m(x,null),s(x,F),s(x,K),s(K,M),s(M,U),s(K,O),s(K,J),Ue.m(J,null),s(J,ie),s(J,ne),s(A,te),Ce&&Ce.m(A,null),s(l,re),yt(ee,l,null),s(l,pe),s(l,oe),s(oe,ge),s(ge,he),s(he,ye),s(ge,Fe),s(ge,je),s(je,we),s(ge,Oe),s(ge,Je),s(Je,Le),s(Le,Me),s(Je,fe),s(Je,_e),s(_e,De),s(oe,se),s(oe,ke),me=!0,Ee||(Ve=[V(c,"click",t[25]),V(g,"click",t[26]),V(M,"click",t[21]),V(J,"click",t[20]),V(Le,"click",t[18]),V(_e,"click",t[17]),V(ke,"click",t[18])],Ee=!0)},p(ce,qe){(!me||qe[0]&65536)&&f!==(f=ce[16]("breadcrumb.home")+"")&&k(d,f),(!me||qe[0]&65536)&&b!==(b=ce[16]("breadcrumb.routes")+"")&&k(v,b),(!me||qe[0]&65538)&&T!==(T=(ce[1]?ce[16]("breadcrumb.editRoute"):ce[16]("breadcrumb.newRoute"))+"")&&k(S,T),ce[1]?Ie?Ie.p(ce,qe):(Ie=Ud(ce),Ie.c(),Ie.m(E,null)):Ie&&(Ie.d(1),Ie=null);let Re=H;H=Ye(ce),H===Re?Ne[H].p(ce,qe):(Gl(),st(Ne[Re],1,1,()=>{Ne[Re]=null}),Kl(),I=Ne[H],I?I.p(ce,qe):(I=Ne[H]=nt[H](ce),I.c()),et(I,1),I.m(l,R)),ce[12]&&!ce[1]?Qe?Qe.p(ce,qe):(Qe=Gd(ce),Qe.c(),Qe.m(Z,null)):Qe&&(Qe.d(1),Qe=null),de===(de=ve(ce))&&Te?Te.p(ce,qe):(Te&&Te.d(1),Te=de&&de(ce),Te&&(Te.c(),Te.m(x,F))),(!me||qe[0]&65536)&&B!==(B=ce[16]("common.cancel")+"")&&k(U,B),(!me||qe[0]&16)&&(M.disabled=ce[4]),Se!==(Se=Ze(ce))&&(Ue.d(1),Ue=Se(ce),Ue&&(Ue.c(),Ue.m(J,ie))),(!me||qe[0]&65536)&&ue!==(ue=ce[16]("common.save")+"")&&k(ne,ue),(!me||qe[0]&2064&&$!==($=!ce[11]||ce[4]))&&(J.disabled=$),ce[7]&&ce[10].length>0?Ce?Ce.p(ce,qe):(Ce=Kd(ce),Ce.c(),Ce.m(A,null)):Ce&&(Ce.d(1),Ce=null);const dt={};!G&&qe[0]&32&&(G=!0,dt.showTemplates=ce[5],Sl(()=>G=!1)),ee.$set(dt),(!me||qe[0]&16384)&&k(ye,ce[14]),(!me||qe[0]&32768)&&k(we,ce[15]),(!me||qe[0]&65536)&&Pe!==(Pe=ce[16]("confirmDialog.no")+"")&&k(Me,Pe),(!me||qe[0]&65536)&&Be!==(Be=ce[16]("confirmDialog.yes")+"")&&k(De,Be),(!me||qe[0]&8192)&&le(oe,"modal-open",ce[13])},i(ce){me||(et(I),et(ee.$$.fragment,ce),me=!0)},o(ce){st(I),st(ee.$$.fragment,ce),me=!1},d(ce){ce&&P(l),Ie&&Ie.d(),Ne[H].d(),Qe&&Qe.d(),Te&&Te.d(),Ue.d(),Ce&&Ce.d(),Ct(ee),Ee=!1,bt(Ve)}}}function C_(t,l,e){let n;Dt(t,Rt,he=>e(16,n=he));let{params:r={}}=l,i=!1,u="",c=!0,f=!1,d=!1,p="basic",m=!1,g={path:"",upstreams:[{_uid:gr(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}},b=[],v=[],w=[],C=!1,E=null,y=null,T=null,S=!1,q="",D="",H=null;function I(he,ye,Fe){e(14,q=he),e(15,D=ye),H=Fe,e(13,S=!0)}function R(){e(13,S=!1),H&&(H(),H=null)}function L(){e(13,S=!1),H=null}function A(he){if((he.metaKey||he.ctrlKey)&&he.key==="s"&&(he.preventDefault(),C&&!f&&x()),he.key==="Escape"&&F(),he.key>="1"&&he.key<="6"&&he.ctrlKey&&!he.metaKey&&!he.altKey){const Fe=["basic","upstreams","modification","auth","failover","preview"][parseInt(he.key)-1];Fe&&(e(6,p=Fe),he.preventDefault())}}function N(){if(!i)try{localStorage.setItem("bungee-route-draft",JSON.stringify(g)),e(12,y=Date.now())}catch(he){console.error("Failed to auto-save draft:",he)}}function Z(he){const ye=Math.floor((Date.now()-he)/1e3);return ye<60?n("autosave.justNow"):ye<3600?n("autosave.minutesAgo",{values:{minutes:Math.floor(ye/60)}}):n("autosave.hoursAgo",{values:{hours:Math.floor(ye/3600)}})}async function Y(){try{const he=await og(g),ye=lg(g.upstreams);e(8,b=he),e(9,v=ye),e(10,w=[...he,...ye]),e(11,C=w.length===0&&g.upstreams.length>0)}catch(he){console.error("Validation failed:",he),e(11,C=!1)}}async function x(){if(!C){Lt.show(n("routeEditor.saveFailed",{values:{error:n("common.error")}}),"error");return}try{e(4,f=!0);const he={...g,upstreams:h2(g.upstreams,[ye=>ye.priority??1]).map(({_uid:ye,...Fe})=>Fe)};i?(await Ro.update(u,he),Lt.show(n("routeEditor.routeUpdated"),"success")):(await Ro.create(he),Lt.show(n("routeEditor.routeSaved"),"success"),localStorage.removeItem("bungee-route-draft")),hi()}catch(he){Lt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error")}finally{e(4,f=!1)}}function F(){I(n("confirmDialog.cancelTitle"),n("confirmDialog.cancelMessage"),()=>hi())}function K(he){const ye=he.detail;e(0,g={...g,...ye,headers:ye.headers||g.headers,body:ye.body||g.body,query:ye.query||g.query,upstreams:ye.upstreams?.map(Fe=>({...Fe,_uid:gr(),headers:Fe.headers||{add:{},remove:[],default:{}},body:Fe.body||{add:{},remove:[],replace:{},default:{}},query:Fe.query||{add:{},remove:[],replace:{},default:{}}}))||g.upstreams}),Lt.show(n("routeEditor.templateApplied"),"success")}Hs(async()=>{if(window.addEventListener("keydown",A),T=setInterval(()=>{N()},3e4),r.path){e(1,i=!0),e(2,u=decodeURIComponent(r.path));try{const he=await Ro.get(u);he?(e(0,g=he),e(0,g.headers=g.headers||{add:{},remove:[],default:{}},g),e(0,g.body=g.body||{add:{},remove:[],replace:{},default:{}},g),e(0,g.query=g.query||{add:{},remove:[],replace:{},default:{}},g),e(0,g.upstreams=g.upstreams.map(ye=>({...ye,_uid:gr(),headers:ye.headers||{add:{},remove:[],default:{}},body:ye.body||{add:{},remove:[],replace:{},default:{}},query:ye.query||{add:{},remove:[],replace:{},default:{}}})),g)):(Lt.show(n("routes.noRoutes"),"error"),hi())}catch(he){Lt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error"),hi()}}else try{const he=localStorage.getItem("bungee-route-draft");if(he){const ye=JSON.parse(he);I(n("confirmDialog.restoreDraftTitle"),n("confirmDialog.restoreDraftMessage"),()=>{e(0,g=ye)})}}catch(he){console.error("Failed to restore draft:",he)}e(3,c=!1)}),ir(()=>{window.removeEventListener("keydown",A),T&&clearInterval(T)});const M=()=>window.location.hash="/",B=()=>window.location.hash="/routes",U=()=>e(6,p="basic"),O=()=>e(6,p="upstreams"),J=()=>e(6,p="modification"),ie=()=>e(6,p="auth"),ue=()=>e(6,p="failover"),ne=()=>e(6,p="preview"),$=()=>e(5,d=!0);function te(he){g=he,e(0,g)}function re(he){g=he,e(0,g)}function ee(he){g=he,e(0,g)}function G(he){g=he,e(0,g)}function pe(he){g=he,e(0,g)}const oe=()=>e(7,m=!m);function ge(he){d=he,e(5,d)}return t.$$set=he=>{"params"in he&&e(23,r=he.params)},t.$$.update=()=>{t.$$.dirty[0]&16777217&&g&&(E&&clearTimeout(E),e(24,E=setTimeout(()=>{Y()},300)))},[g,i,u,c,f,d,p,m,b,v,w,C,y,S,q,D,n,R,L,Z,x,F,K,r,E,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge]}class o2 extends Vt{constructor(l){super(),Ut(this,l,C_,y_,At,{params:23},null,[-1,-1])}}function Yd(t,l,e){const n=t.slice();return n[43]=l[e][0],n[44]=l[e][1],n}function Zd(t,l,e){const n=t.slice();return n[43]=l[e][0],n[44]=l[e][1],n}function Xd(t,l,e){const n=t.slice();return n[43]=l[e][0],n[44]=l[e][1],n}function xd(t,l,e){const n=t.slice();n[52]=l[e],n[61]=e;const r=n[51].durations[n[61]];n[53]=r;const i=n[51].relativeTime[n[61]];n[54]=i;const u=n[53]/n[51].totalDuration*100;n[55]=u;const c=n[54]/n[51].totalDuration*100;n[56]=c;const f=ub(n[52].step);n[57]=f;const d=ib(n[52].step);n[58]=d;const p=(n[53]/n[51].totalDuration*100).toFixed(1);return n[59]=p,n}function $d(t,l,e){const n=t.slice();return n[62]=l[e],n}function ef(t){const l=t.slice(),e=l[27]();return l[51]=e,l}function ep(t,l,e){const n=t.slice();return n[52]=l[e],n}function E_(t){let l,e,n,r,i=t[24]("logs.detail.copyToClipboard")+"",u;return{c(){l=ae("svg"),e=ae("path"),n=h(),r=a("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(l,"xmlns","http://www.w3.org/2000/svg"),o(l,"class","h-4 w-4"),o(l,"fill","none"),o(l,"viewBox","0 0 24 24"),o(l,"stroke","currentColor"),o(r,"class","hidden md:inline")},m(c,f){j(c,l,f),s(l,e),j(c,n,f),j(c,r,f),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("logs.detail.copyToClipboard")+"")&&k(u,i)},d(c){c&&(P(l),P(n),P(r))}}}function T_(t){let l,e=t[24]("logs.detail.copied")+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","text-success")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.copied")+"")&&k(n,e)},d(r){r&&P(l)}}}function M_(t){let l;return{c(){l=a("span"),l.textContent="No steps recorded",o(l,"class","text-sm opacity-40")},m(e,n){j(e,l,n)},p:tt,d(e){e&&P(l)}}}function S_(t){let l,e,n=ut(t[0].processingSteps.slice(0,3)),r=[];for(let u=0;u<n.length;u+=1)r[u]=tp(ep(t,n,u));let i=t[0].processingSteps.length>3&&lp(t);return{c(){for(let u=0;u<r.length;u+=1)r[u].c();l=h(),i&&i.c(),e=Ul()},m(u,c){for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(u,c);j(u,l,c),i&&i.m(u,c),j(u,e,c)},p(u,c){if(c[0]&67108865){n=ut(u[0].processingSteps.slice(0,3));let f;for(f=0;f<n.length;f+=1){const d=ep(u,n,f);r[f]?r[f].p(d,c):(r[f]=tp(d),r[f].c(),r[f].m(l.parentNode,l))}for(;f<r.length;f+=1)r[f].d(1);r.length=n.length}u[0].processingSteps.length>3?i?i.p(u,c):(i=lp(u),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(u){u&&(P(l),P(e)),Gt(r,u),i&&i.d(u)}}}function tp(t){let l,e=t[26](t[52].step)+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm badge-outline")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[26](r[52].step)+"")&&k(n,e)},d(r){r&&P(l)}}}function lp(t){let l,e,n=t[0].processingSteps.length-3+"",r,i;return{c(){l=a("span"),e=_("+"),r=_(n),i=_(" more"),o(l,"class","badge badge-sm badge-ghost")},m(u,c){j(u,l,c),s(l,e),s(l,r),s(l,i)},p(u,c){c[0]&1&&n!==(n=u[0].processingSteps.length-3+"")&&k(r,n)},d(u){u&&P(l)}}}function sp(t){let l,e,n,r,i,u=t[24]("logs.detail.processingTimeline")+"",c,f,d,p=t[24]("logs.detail.totalSteps",{values:{count:t[0].processingSteps.length}})+"",m,g,b=t[24]("logs.detail.totalDuration",{values:{duration:vo(t[51].totalDuration)}})+"",v,w,C,E=(t[22]?t[24]("logs.detail.hideTimeline"):t[24]("logs.detail.showTimeline"))+"",y,T,S,q,D=t[22]&&op(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=a("h4"),c=_(u),f=h(),d=a("p"),m=_(p),g=_(`\uFF0C\n `),v=_(b),w=h(),C=a("button"),y=_(E),T=h(),D&&D.c(),o(i,"class","card-title text-base"),o(d,"class","text-xs opacity-60 mt-1"),o(C,"class","btn btn-sm btn-ghost"),o(n,"class","flex items-center justify-between mb-2"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(H,I){j(H,l,I),s(l,e),s(e,n),s(n,r),s(r,i),s(i,c),s(r,f),s(r,d),s(d,m),s(d,g),s(d,v),s(n,w),s(n,C),s(C,y),s(e,T),D&&D.m(e,null),S||(q=V(C,"click",t[31]),S=!0)},p(H,I){I[0]&16777216&&u!==(u=H[24]("logs.detail.processingTimeline")+"")&&k(c,u),I[0]&16777217&&p!==(p=H[24]("logs.detail.totalSteps",{values:{count:H[0].processingSteps.length}})+"")&&k(m,p),I[0]&16777216&&b!==(b=H[24]("logs.detail.totalDuration",{values:{duration:vo(H[51].totalDuration)}})+"")&&k(v,b),I[0]&20971520&&E!==(E=(H[22]?H[24]("logs.detail.hideTimeline"):H[24]("logs.detail.showTimeline"))+"")&&k(y,E),H[22]?D?D.p(H,I):(D=op(H),D.c(),D.m(e,null)):D&&(D.d(1),D=null)},d(H){H&&P(l),D&&D.d(),S=!1,q()}}}function op(t){let l,e,n,r,i,u,c,f,d,p,m=ut(t[0].processingSteps),g=[];for(let b=0;b<m.length;b+=1)g[b]=dp(xd(t,m,b));return{c(){l=a("div"),e=a("div"),n=a("span"),n.textContent="0ms",r=h(),i=a("div"),u=h(),c=a("span"),c.textContent=`${vo(t[51].totalDuration)}`,f=h();for(let b=0;b<g.length;b+=1)g[b].c();d=h(),p=a("div"),p.innerHTML=\'<div class="flex flex-wrap gap-4 text-xs"><div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-blue-500"></div> <span>Authentication</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-purple-500"></div> <span>Plugin</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-green-500"></div> <span>Upstream</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-orange-500"></div> <span>Transform</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-red-500"></div> <span>Error</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-yellow-500"></div> <span>Retry/Recovery</span></div></div>\',o(i,"class","flex-1 border-t border-dashed border-base-content/20"),o(c,"class","mr-32"),o(e,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),o(l,"class","mt-4"),o(p,"class","mt-6 pt-4 border-t border-base-300")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(e,r),s(e,i),s(e,u),s(e,c),s(l,f);for(let w=0;w<g.length;w+=1)g[w]&&g[w].m(l,null);j(b,d,v),j(b,p,v)},p(b,v){if(v[0]&201326593){m=ut(b[0].processingSteps);let w;for(w=0;w<m.length;w+=1){const C=xd(b,m,w);g[w]?g[w].p(C,v):(g[w]=dp(C),g[w].c(),g[w].m(l,null))}for(;w<g.length;w+=1)g[w].d(1);g.length=m.length}},d(b){b&&(P(l),P(d),P(p)),Gt(g,b)}}}function np(t){let l;return{c(){l=a("div"),o(l,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function rp(t){let l=t[52].detail.plugins&&Array.isArray(t[52].detail.plugins),e,n,r,i,u=l&&ap(t),c=t[52].detail.target&&up(t),f=t[52].detail.level&&fp(t),d=t[52].detail.error&&cp(t);return{c(){u&&u.c(),e=h(),c&&c.c(),n=h(),f&&f.c(),r=h(),d&&d.c(),i=Ul()},m(p,m){u&&u.m(p,m),j(p,e,m),c&&c.m(p,m),j(p,n,m),f&&f.m(p,m),j(p,r,m),d&&d.m(p,m),j(p,i,m)},p(p,m){m[0]&1&&(l=p[52].detail.plugins&&Array.isArray(p[52].detail.plugins)),l?u?u.p(p,m):(u=ap(p),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),p[52].detail.target?c?c.p(p,m):(c=up(p),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null),p[52].detail.level?f?f.p(p,m):(f=fp(p),f.c(),f.m(r.parentNode,r)):f&&(f.d(1),f=null),p[52].detail.error?d?d.p(p,m):(d=cp(p),d.c(),d.m(i.parentNode,i)):d&&(d.d(1),d=null)},d(p){p&&(P(e),P(n),P(r),P(i)),u&&u.d(p),c&&c.d(p),f&&f.d(p),d&&d.d(p)}}}function ap(t){let l,e=ut(t[52].detail.plugins),n=[];for(let r=0;r<e.length;r+=1)n[r]=ip($d(t,e,r));return{c(){for(let r=0;r<n.length;r+=1)n[r].c();l=Ul()},m(r,i){for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(r,i);j(r,l,i)},p(r,i){if(i[0]&1){e=ut(r[52].detail.plugins);let u;for(u=0;u<e.length;u+=1){const c=$d(r,e,u);n[u]?n[u].p(c,i):(n[u]=ip(c),n[u].c(),n[u].m(l.parentNode,l))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(r){r&&P(l),Gt(n,r)}}}function ip(t){let l,e=t[62]+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-primary badge-outline")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[62]+"")&&k(n,e)},d(r){r&&P(l)}}}function up(t){let l,e=t[52].detail.target+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-info badge-outline"),o(l,"title","Target upstream")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[52].detail.target+"")&&k(n,e)},d(r){r&&P(l)}}}function fp(t){let l,e=t[52].detail.level+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-xs badge-warning badge-outline")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1&&e!==(e=r[52].detail.level+"")&&k(n,e)},d(r){r&&P(l)}}}function cp(t){let l,e,n;return{c(){l=a("span"),e=_("Error"),o(l,"class","badge badge-xs badge-error badge-outline"),o(l,"title",n=t[52].detail.error)},m(r,i){j(r,l,i),s(l,e)},p(r,i){i[0]&1&&n!==(n=r[52].detail.error)&&o(l,"title",n)},d(r){r&&P(l)}}}function R_(t){let l;return{c(){l=a("span"),l.textContent=`${t[59]}%`,o(l,"class","text-xs text-white px-2 leading-7")},m(e,n){j(e,l,n)},p:tt,d(e){e&&P(l)}}}function dp(t){let l,e,n,r,i,u,c,f,d,p=t[26](t[52].step)+"",m,g,b,v,w=t[57]+"",C,E,y,T,S,q,D,H,I,R,L,A,N,Z,Y,x,F=t[61]<t[0].processingSteps.length-1&&np(),K=t[52].detail&&rp(t),M=t[55]>5&&R_(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),u=h(),F&&F.c(),c=h(),f=a("div"),d=a("div"),m=_(p),g=h(),b=a("div"),v=a("span"),C=_(w),E=h(),K&&K.c(),y=h(),T=a("div"),S=a("div"),q=a("div"),M&&M.c(),I=h(),R=a("div"),L=a("div"),L.textContent=`+${t[54]}ms`,A=h(),N=a("div"),N.textContent=`${vo(t[53])}`,Z=h(),Y=a("div"),Y.textContent=`${t[59]}%`,x=h(),o(r,"class",i="w-3 h-3 rounded-full "+t[58]+" z-10"),o(n,"class","flex flex-col items-center"),o(d,"class","text-sm font-medium"),o(v,"class","badge badge-xs badge-ghost"),o(b,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),o(f,"class","flex-1 -mt-0.5"),o(e,"class","flex gap-3 shrink-0 w-64"),o(q,"class",D="absolute h-full "+t[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),B1(q,"left",t[56]+"%"),B1(q,"width",Math.max(t[55],1)+"%"),o(q,"title",H=t[52].step+": "+vo(t[53])+" ("+t[59]+"%)"),o(S,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),o(T,"class","flex-1 flex items-center"),o(L,"class","opacity-60"),o(N,"class","font-semibold"),o(Y,"class","opacity-40"),o(R,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),o(l,"class","flex gap-4 group relative mb-3")},m(B,U){j(B,l,U),s(l,e),s(e,n),s(n,r),s(n,u),F&&F.m(n,null),s(e,c),s(e,f),s(f,d),s(d,m),s(f,g),s(f,b),s(b,v),s(v,C),s(b,E),K&&K.m(b,null),s(l,y),s(l,T),s(T,S),s(S,q),M&&M.m(q,null),s(l,I),s(l,R),s(R,L),s(R,A),s(R,N),s(R,Z),s(R,Y),s(l,x)},p(B,U){U[0]&1&&i!==(i="w-3 h-3 rounded-full "+B[58]+" z-10")&&o(r,"class",i),B[61]<B[0].processingSteps.length-1?F||(F=np(),F.c(),F.m(n,null)):F&&(F.d(1),F=null),U[0]&1&&p!==(p=B[26](B[52].step)+"")&&k(m,p),U[0]&1&&w!==(w=B[57]+"")&&k(C,w),B[52].detail?K?K.p(B,U):(K=rp(B),K.c(),K.m(b,null)):K&&(K.d(1),K=null),B[55]>5&&M.p(B,U),U[0]&1&&D!==(D="absolute h-full "+B[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&o(q,"class",D),U[0]&1&&H!==(H=B[52].step+": "+vo(B[53])+" ("+B[59]+"%)")&&o(q,"title",H)},d(B){B&&P(l),F&&F.d(),K&&K.d(),M&&M.d()}}}function q_(t){let l,e,n=t[24]("logs.detail.path")+"",r,i,u,c=t[0].path+"",f;return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.path")+"")&&k(r,n),p[0]&1&&c!==(c=d[0].path+"")&&k(f,c)},d(d){d&&P(l)}}}function H_(t){let l,e,n=t[24]("logs.detail.originalPath")+"",r,i,u,c=t[0].path+"",f,d,p,m,g=t[24]("logs.detail.transformedPath")+"",b,v,w,C=t[0].transformedPath+"",E;return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),f=_(c),d=h(),p=a("div"),m=a("div"),b=_(g),v=h(),w=a("div"),E=_(C),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),o(m,"class","text-xs opacity-60 mb-1"),o(w,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(y,T){j(y,l,T),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),j(y,d,T),j(y,p,T),s(p,m),s(m,b),s(p,v),s(p,w),s(w,E)},p(y,T){T[0]&16777216&&n!==(n=y[24]("logs.detail.originalPath")+"")&&k(r,n),T[0]&1&&c!==(c=y[0].path+"")&&k(f,c),T[0]&16777216&&g!==(g=y[24]("logs.detail.transformedPath")+"")&&k(b,g),T[0]&1&&C!==(C=y[0].transformedPath+"")&&k(E,C)},d(y){y&&(P(l),P(d),P(p))}}}function pp(t){let l,e,n=t[24]("logs.detail.query")+"",r,i,u,c=t[0].query+"",f;return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),u=a("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.query")+"")&&k(r,n),p[0]&1&&c!==(c=d[0].query+"")&&k(f,c)},d(d){d&&P(l)}}}function hp(t){let l,e,n,r=t[24]("logs.detail.routePath")+"",i,u,c,f=t[0].routePath+"",d;return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),d=_(f),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.detail.routePath")+"")&&k(i,r),m[0]&1&&f!==(f=p[0].routePath+"")&&k(d,f)},d(p){p&&P(l)}}}function mp(t){let l,e,n,r=t[24]("logs.detail.upstream")+"",i,u,c,f=t[0].upstream+"",d,p,m=t[0].transformer&&gp(t);return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),d=_(f),p=h(),m&&m.c(),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm mb-2"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(g,b){j(g,l,b),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,d),s(e,p),m&&m.m(e,null)},p(g,b){b[0]&16777216&&r!==(r=g[24]("logs.detail.upstream")+"")&&k(i,r),b[0]&1&&f!==(f=g[0].upstream+"")&&k(d,f),g[0].transformer?m?m.p(g,b):(m=gp(g),m.c(),m.m(e,null)):m&&(m.d(1),m=null)},d(g){g&&P(l),m&&m.d()}}}function gp(t){let l,e=t[24]("logs.detail.transformer")+"",n,r,i=t[0].transformer+"",u;return{c(){l=a("div"),n=_(e),r=_(": "),u=_(i),o(l,"class","text-xs opacity-60")},m(c,f){j(c,l,f),s(l,n),s(l,r),s(l,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.detail.transformer")+"")&&k(n,e),f[0]&1&&i!==(i=c[0].transformer+"")&&k(u,i)},d(c){c&&P(l)}}}function _p(t){let l,e,n,r,i,u,c=t[24]("logs.detail.errorInfo")+"",f,d,p,m=t[0].errorMessage+"",g;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("div"),u=a("div"),f=_(c),d=h(),p=a("div"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-bold"),o(p,"class","font-mono text-sm"),o(l,"class","alert alert-error")},m(b,v){j(b,l,v),s(l,e),s(e,n),s(l,r),s(l,i),s(i,u),s(u,f),s(i,d),s(i,p),s(p,g)},p(b,v){v[0]&16777216&&c!==(c=b[24]("logs.detail.errorInfo")+"")&&k(f,c),v[0]&1&&m!==(m=b[0].errorMessage+"")&&k(g,m)},d(b){b&&P(l)}}}function bp(t){let l;function e(i,u){return i[0].originalReqHeaderId||i[0].originalReqBodyId?j_:P_}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","space-y-4")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},d(i){i&&P(l),r.d()}}}function P_(t){let l,e=t[24]("logs.detail.noDataAvailable")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-center py-8 opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noDataAvailable")+"")&&k(n,e)},d(r){r&&P(l)}}}function j_(t){let l,e,n=t[0].originalReqHeaderId&&vp(t),r=t[8]&&t[0].originalReqBodyId&&wp(t);return{c(){n&&n.c(),l=h(),r&&r.c(),e=Ul()},m(i,u){n&&n.m(i,u),j(i,l,u),r&&r.m(i,u),j(i,e,u)},p(i,u){i[0].originalReqHeaderId?n?n.p(i,u):(n=vp(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null),i[8]&&i[0].originalReqBodyId?r?r.p(i,u):(r=wp(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(i){i&&(P(l),P(e)),n&&n.d(i),r&&r.d(i)}}}function vp(t){let l,e,n=t[24]("logs.detail.requestHeaders")+"",r,i;function u(d,p){return d[17]?B_:d[19]?I_:d[15]!==null?D_:L_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function L_(t){let l,e=t[24]("logs.detail.noHeaders")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noHeaders")+"")&&k(n,e)},d(r){r&&P(l)}}}function D_(t){let l,e,n,r,i,u=ut(Object.entries(t[15])),c=[];for(let f=0;f<u.length;f+=1)c[f]=kp(Xd(t,u,f));return{c(){l=a("div"),e=a("table"),n=a("thead"),n.innerHTML=\'<tr><th class="w-1/3">Name</th> <th>Value</th></tr>\',r=h(),i=a("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(l,"class","overflow-x-auto")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(e,r),s(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&32768){u=ut(Object.entries(f[15]));let p;for(p=0;p<u.length;p+=1){const m=Xd(f,u,p);c[p]?c[p].p(m,d):(c[p]=kp(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&P(l),Gt(c,f)}}}function I_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[19]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&524288&&k(n,r[19])},d(r){r&&P(l)}}}function B_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function kp(t){let l,e,n=t[43]+"",r,i,u,c=t[44]+"",f,d;return{c(){l=a("tr"),e=a("td"),r=_(n),i=h(),u=a("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){j(p,l,m),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d)},p(p,m){m[0]&32768&&n!==(n=p[43]+"")&&k(r,n),m[0]&32768&&c!==(c=p[44]+"")&&k(f,c)},d(p){p&&P(l)}}}function wp(t){let l,e,n=t[24]("logs.detail.requestBody")+"",r,i;function u(d,p){return d[18]?z_:d[20]?F_:d[16]!==null?O_:A_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function A_(t){let l,e=t[24]("logs.detail.noBody")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noBody")+"")&&k(n,e)},d(r){r&&P(l)}}}function O_(t){let l,e=ar(t[16])+"",n;return{c(){l=a("pre"),n=_(e),o(l,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&65536&&e!==(e=ar(r[16])+"")&&k(n,e)},d(r){r&&P(l)}}}function F_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[20]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&1048576&&k(n,r[20])},d(r){r&&P(l)}}}function z_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function yp(t){let l;function e(i,u){return i[0].reqHeaderId||i[0].reqBodyId?U_:N_}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","space-y-4")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},d(i){i&&P(l),r.d()}}}function N_(t){let l,e=t[24]("logs.detail.noDataAvailable")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-center py-8 opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noDataAvailable")+"")&&k(n,e)},d(r){r&&P(l)}}}function U_(t){let l,e,n=t[0].reqHeaderId&&Cp(t),r=t[8]&&t[0].reqBodyId&&Tp(t);return{c(){n&&n.c(),l=h(),r&&r.c(),e=Ul()},m(i,u){n&&n.m(i,u),j(i,l,u),r&&r.m(i,u),j(i,e,u)},p(i,u){i[0].reqHeaderId?n?n.p(i,u):(n=Cp(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null),i[8]&&i[0].reqBodyId?r?r.p(i,u):(r=Tp(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(i){i&&(P(l),P(e)),n&&n.d(i),r&&r.d(i)}}}function Cp(t){let l,e,n=t[24]("logs.detail.requestHeaders")+"",r,i;function u(d,p){return d[11]?G_:d[13]?W_:d[9]!==null?J_:V_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function V_(t){let l,e=t[24]("logs.detail.noHeaders")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noHeaders")+"")&&k(n,e)},d(r){r&&P(l)}}}function J_(t){let l,e,n,r,i,u=ut(Object.entries(t[9])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Ep(Zd(t,u,f));return{c(){l=a("div"),e=a("table"),n=a("thead"),n.innerHTML=\'<tr><th class="w-1/3">Name</th> <th>Value</th></tr>\',r=h(),i=a("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(l,"class","overflow-x-auto")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(e,r),s(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&512){u=ut(Object.entries(f[9]));let p;for(p=0;p<u.length;p+=1){const m=Zd(f,u,p);c[p]?c[p].p(m,d):(c[p]=Ep(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&P(l),Gt(c,f)}}}function W_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[13]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&8192&&k(n,r[13])},d(r){r&&P(l)}}}function G_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Ep(t){let l,e,n=t[43]+"",r,i,u,c=t[44]+"",f,d;return{c(){l=a("tr"),e=a("td"),r=_(n),i=h(),u=a("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){j(p,l,m),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d)},p(p,m){m[0]&512&&n!==(n=p[43]+"")&&k(r,n),m[0]&512&&c!==(c=p[44]+"")&&k(f,c)},d(p){p&&P(l)}}}function Tp(t){let l,e,n=t[24]("logs.detail.requestBody")+"",r,i;function u(d,p){return d[4]?Z_:d[6]?Y_:d[2]!==null?Q_:K_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function K_(t){let l,e=t[24]("logs.detail.noBody")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noBody")+"")&&k(n,e)},d(r){r&&P(l)}}}function Q_(t){let l,e=ar(t[2])+"",n;return{c(){l=a("pre"),n=_(e),o(l,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&4&&e!==(e=ar(r[2])+"")&&k(n,e)},d(r){r&&P(l)}}}function Y_(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[6]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&64&&k(n,r[6])},d(r){r&&P(l)}}}function Z_(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Mp(t){let l;function e(i,u){return i[0].respHeaderId||i[0].respBodyId?x_:X_}let n=e(t),r=n(t);return{c(){l=a("div"),r.c(),o(l,"class","space-y-4")},m(i,u){j(i,l,u),r.m(l,null)},p(i,u){n===(n=e(i))&&r?r.p(i,u):(r.d(1),r=n(i),r&&(r.c(),r.m(l,null)))},d(i){i&&P(l),r.d()}}}function X_(t){let l,e=t[24]("logs.detail.noDataAvailable")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-center py-8 opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noDataAvailable")+"")&&k(n,e)},d(r){r&&P(l)}}}function x_(t){let l,e,n=t[0].respHeaderId&&Sp(t),r=t[8]&&t[0].respBodyId&&qp(t);return{c(){n&&n.c(),l=h(),r&&r.c(),e=Ul()},m(i,u){n&&n.m(i,u),j(i,l,u),r&&r.m(i,u),j(i,e,u)},p(i,u){i[0].respHeaderId?n?n.p(i,u):(n=Sp(i),n.c(),n.m(l.parentNode,l)):n&&(n.d(1),n=null),i[8]&&i[0].respBodyId?r?r.p(i,u):(r=qp(i),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null)},d(i){i&&(P(l),P(e)),n&&n.d(i),r&&r.d(i)}}}function Sp(t){let l,e,n=t[24]("logs.detail.responseHeaders")+"",r,i;function u(d,p){return d[12]?lb:d[14]?tb:d[10]!==null?eb:$_}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseHeaders")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function $_(t){let l,e=t[24]("logs.detail.noHeaders")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noHeaders")+"")&&k(n,e)},d(r){r&&P(l)}}}function eb(t){let l,e,n,r,i,u=ut(Object.entries(t[10])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Rp(Yd(t,u,f));return{c(){l=a("div"),e=a("table"),n=a("thead"),n.innerHTML=\'<tr><th class="w-1/3">Name</th> <th>Value</th></tr>\',r=h(),i=a("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(l,"class","overflow-x-auto")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(e,r),s(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&1024){u=ut(Object.entries(f[10]));let p;for(p=0;p<u.length;p+=1){const m=Yd(f,u,p);c[p]?c[p].p(m,d):(c[p]=Rp(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&P(l),Gt(c,f)}}}function tb(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[14]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&16384&&k(n,r[14])},d(r){r&&P(l)}}}function lb(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Rp(t){let l,e,n=t[43]+"",r,i,u,c=t[44]+"",f,d;return{c(){l=a("tr"),e=a("td"),r=_(n),i=h(),u=a("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){j(p,l,m),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d)},p(p,m){m[0]&1024&&n!==(n=p[43]+"")&&k(r,n),m[0]&1024&&c!==(c=p[44]+"")&&k(f,c)},d(p){p&&P(l)}}}function qp(t){let l,e,n=t[24]("logs.detail.responseBody")+"",r,i;function u(d,p){return d[5]?rb:d[7]?nb:d[3]!==null?ob:sb}let c=u(t),f=c(t);return{c(){l=a("div"),e=a("div"),r=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){j(d,l,p),s(l,e),s(e,r),s(l,i),f.m(l,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseBody")+"")&&k(r,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(l,null)))},d(d){d&&P(l),f.d()}}}function sb(t){let l,e=t[24]("logs.detail.noBody")+"",n;return{c(){l=a("div"),n=_(e),o(l,"class","text-sm opacity-60")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&16777216&&e!==(e=r[24]("logs.detail.noBody")+"")&&k(n,e)},d(r){r&&P(l)}}}function ob(t){let l,e=ar(t[3])+"",n;return{c(){l=a("pre"),n=_(e),o(l,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&8&&e!==(e=ar(r[3])+"")&&k(n,e)},d(r){r&&P(l)}}}function nb(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[7]),o(e,"class","text-sm"),o(l,"class","alert alert-error")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i[0]&128&&k(n,r[7])},d(r){r&&P(l)}}}function rb(t){let l,e,n,r,i=t[24]("common.loading")+"",u;return{c(){l=a("div"),e=a("span"),n=h(),r=a("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(r,"class","text-sm"),o(l,"class","flex items-center gap-2")},m(c,f){j(c,l,f),s(l,e),s(l,n),s(l,r),s(r,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&k(u,i)},d(c){c&&P(l)}}}function Hp(t){let l,e,n,r=t[24]("logs.detail.authInfo")+"",i,u,c,f,d,p=t[24]("logs.detail.authLevel")+"",m,g,b,v=t[0].authLevel+"",w,C,E,y,T=t[24]("logs.detail.authResult")+"",S,q,D,H=(t[0].authSuccess?t[24]("logs.detail.authSuccess"):t[24]("logs.detail.authFailed"))+"",I,R;return{c(){l=a("div"),e=a("div"),n=a("h4"),i=_(r),u=h(),c=a("div"),f=a("div"),d=a("div"),m=_(p),g=h(),b=a("div"),w=_(v),C=h(),E=a("div"),y=a("div"),S=_(T),q=h(),D=a("span"),I=_(H),o(n,"class","card-title text-base mb-2"),o(d,"class","text-xs opacity-60 mb-1"),o(b,"class","text-sm"),o(y,"class","text-xs opacity-60 mb-1"),o(D,"class",R="badge "+(t[0].authSuccess?"badge-success":"badge-error")),o(c,"class","grid grid-cols-2 gap-4"),o(e,"class","card-body p-4"),o(l,"class","card bg-base-200")},m(L,A){j(L,l,A),s(l,e),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,d),s(d,m),s(f,g),s(f,b),s(b,w),s(c,C),s(c,E),s(E,y),s(y,S),s(E,q),s(E,D),s(D,I)},p(L,A){A[0]&16777216&&r!==(r=L[24]("logs.detail.authInfo")+"")&&k(i,r),A[0]&16777216&&p!==(p=L[24]("logs.detail.authLevel")+"")&&k(m,p),A[0]&1&&v!==(v=L[0].authLevel+"")&&k(w,v),A[0]&16777216&&T!==(T=L[24]("logs.detail.authResult")+"")&&k(S,T),A[0]&16777217&&H!==(H=(L[0].authSuccess?L[24]("logs.detail.authSuccess"):L[24]("logs.detail.authFailed"))+"")&&k(I,H),A[0]&1&&R!==(R="badge "+(L[0].authSuccess?"badge-success":"badge-error"))&&o(D,"class",R)},d(L){L&&P(l)}}}function ab(t){let l,e,n,r,i=t[24]("logs.detail.title")+"",u,c,f,d,p,m,g,b,v,w,C,E=t[24]("logs.detail.downloadJson")+"",y,T,S,q,D,H,I,R,L,A=t[24]("logs.detail.overview")+"",N,Z,Y,x,F,K=t[24]("logs.detail.status")+"",M,B,U,O=t[0].status+"",J,ie,ue,ne,$,te=t[24]("logs.detail.method")+"",re,ee,G,pe=t[0].method+"",oe,ge,he,ye,Fe=t[24]("logs.requestType")+"",je,we,Oe,Je=t[25](t[0].requestType)+"",Le,Pe,Me,fe,_e,Be,De=t[24]("logs.detail.duration")+"",se,ke,me,Ee=vo(t[0].duration)+"",Ve,Ie,nt,Ne,Ye=t[24]("logs.detail.timestamp")+"",Qe,ve,de,Te=Pp(t[0].timestamp)+"",Ze,Se,Ue,Ce,mt=t[24]("logs.detail.requestId")+"",Ge,ce,qe,Re=t[0].requestId+"",dt,We,z,He,X=t[24]("logs.detail.processingSteps")+"",ft,Ht,Ke,_t,lt,it,ze,Xe,Bt=t[24]("logs.detail.requestInfo")+"",at,gt,wt,pt,vl,rt,Mt,ht,Tt,kl,Ot,hl,ml,ql,Jt,Ql,Qt,Yt=t[24]("logs.detail.tabOriginalRequest")+"",Hl,Il,gl,ol,Yl,Ft,Pl=t[24]("logs.detail.tabFinalRequest")+"",Vl,Jl,El,zt,Zl,Pt,jl=t[24]("logs.detail.tabResponse")+"",Ll,$l,xt,wl,es,Fl,Bl,Wl,Ps;function nl(Xt,$e){return Xt[23]?T_:E_}let yl=nl(t),rl=yl(t);function zl(Xt,$e){return Xt[0].processingSteps&&Xt[0].processingSteps.length>0?S_:M_}let al=zl(t),_l=al(t),ll=t[0].processingSteps&&t[0].processingSteps.length>0&&sp(ef(t));function Dl(Xt,$e){return Xt[0].transformedPath&&Xt[0].transformedPath!==Xt[0].path?H_:q_}let Nl=Dl(t),Tl=Nl(t),Wt=t[0].query&&pp(t),It=t[0].routePath&&hp(t),jt=t[0].upstream&&mp(t),$t=t[0].errorMessage&&_p(t),el=t[21]==="original"&&bp(t),Kt=t[21]==="transformed"&&yp(t),Zt=t[21]==="response"&&Mp(t),il=t[0].authLevel&&Hp(t);return Bl=uf(t[33][0]),{c(){l=a("div"),e=a("div"),n=a("div"),r=a("h3"),u=_(i),c=h(),f=a("div"),d=a("button"),rl.c(),m=h(),g=a("button"),b=ae("svg"),v=ae("path"),w=h(),C=a("span"),y=_(E),S=h(),q=a("button"),q.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',D=h(),H=a("div"),I=a("div"),R=a("div"),L=a("h4"),N=_(A),Z=h(),Y=a("div"),x=a("div"),F=a("div"),M=_(K),B=h(),U=a("span"),J=_(O),ue=h(),ne=a("div"),$=a("div"),re=_(te),ee=h(),G=a("span"),oe=_(pe),ge=h(),he=a("div"),ye=a("div"),je=_(Fe),we=h(),Oe=a("span"),Le=_(Je),fe=h(),_e=a("div"),Be=a("div"),se=_(De),ke=h(),me=a("div"),Ve=_(Ee),Ie=h(),nt=a("div"),Ne=a("div"),Qe=_(Ye),ve=h(),de=a("div"),Ze=_(Te),Se=h(),Ue=a("div"),Ce=a("div"),Ge=_(mt),ce=h(),qe=a("div"),dt=_(Re),We=h(),z=a("div"),He=a("div"),ft=_(X),Ht=h(),Ke=a("div"),_l.c(),_t=h(),ll&&ll.c(),lt=h(),it=a("div"),ze=a("div"),Xe=a("h4"),at=_(Bt),gt=h(),wt=a("div"),Tl.c(),pt=h(),Wt&&Wt.c(),vl=h(),rt=a("div"),It&&It.c(),Mt=h(),jt&&jt.c(),ht=h(),$t&&$t.c(),Tt=h(),kl=a("div"),Ot=a("div"),hl=a("div"),ml=a("div"),ql=a("label"),Jt=a("input"),Ql=h(),Qt=a("span"),Hl=_(Yt),Il=h(),gl=a("label"),ol=a("input"),Yl=h(),Ft=a("span"),Vl=_(Pl),Jl=h(),El=a("label"),zt=a("input"),Zl=h(),Pt=a("span"),Ll=_(jl),$l=h(),xt=a("div"),el&&el.c(),wl=h(),Kt&&Kt.c(),es=h(),Zt&&Zt.c(),Fl=h(),il&&il.c(),o(r,"id","modal-title"),o(r,"class","font-bold text-xl"),o(d,"class","btn btn-sm btn-ghost"),o(d,"title",p=t[24]("logs.detail.copyToClipboard")),o(v,"stroke-linecap","round"),o(v,"stroke-linejoin","round"),o(v,"stroke-width","2"),o(v,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(b,"xmlns","http://www.w3.org/2000/svg"),o(b,"class","h-4 w-4"),o(b,"fill","none"),o(b,"viewBox","0 0 24 24"),o(b,"stroke","currentColor"),o(C,"class","hidden md:inline"),o(g,"class","btn btn-sm btn-ghost"),o(g,"title",T=t[24]("logs.detail.downloadJson")),o(q,"class","btn btn-sm btn-circle btn-ghost"),o(f,"class","flex items-center gap-2"),o(n,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),o(L,"class","card-title text-base mb-3"),o(F,"class","text-xs opacity-60 mb-1"),o(U,"class",ie="badge "+jp(t[0].status)+" badge-lg"),o($,"class","text-xs opacity-60 mb-1"),o(G,"class","badge badge-lg"),o(ye,"class","text-xs opacity-60 mb-1"),o(Oe,"class",Pe="badge "+Lp(t[0].requestType)+" badge-lg"),o(Oe,"title",Me=t[24](`logs.requestType_${t[0].requestType}_desc`)),o(Be,"class","text-xs opacity-60 mb-1"),o(me,"class","font-semibold"),o(Ne,"class","text-xs opacity-60 mb-1"),o(de,"class","text-sm"),o(Ce,"class","text-xs opacity-60 mb-1"),o(qe,"class","font-mono text-xs break-all"),o(Ue,"class","col-span-2"),o(He,"class","text-xs opacity-60 mb-1"),o(Ke,"class","flex gap-2 flex-wrap"),o(z,"class","col-span-2 md:col-span-3 lg:col-span-6"),o(Y,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),o(R,"class","card-body p-4"),o(I,"class","card bg-base-200"),o(Xe,"class","card-title text-base mb-3"),o(wt,"class","space-y-2"),o(ze,"class","card-body p-4"),o(it,"class","card bg-base-200"),o(rt,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(Jt,"class","sr-only"),o(Jt,"type","radio"),o(Jt,"name","activeTab"),Jt.__value="original",Q(Jt,Jt.__value),o(Qt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Qt,"bg-primary",t[21]==="original"),le(Qt,"text-primary-content",t[21]==="original"),le(Qt,"shadow",t[21]==="original"),le(Qt,"text-gray-700",t[21]!=="original"),le(Qt,"dark:text-gray-300",t[21]!=="original"),le(Qt,"hover:text-gray-900",t[21]!=="original"),le(Qt,"dark:hover:text-gray-100",t[21]!=="original"),o(ql,"class","cursor-pointer"),o(ol,"class","sr-only"),o(ol,"type","radio"),o(ol,"name","activeTab"),ol.__value="transformed",Q(ol,ol.__value),o(Ft,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Ft,"bg-primary",t[21]==="transformed"),le(Ft,"text-primary-content",t[21]==="transformed"),le(Ft,"shadow",t[21]==="transformed"),le(Ft,"text-gray-700",t[21]!=="transformed"),le(Ft,"dark:text-gray-300",t[21]!=="transformed"),le(Ft,"hover:text-gray-900",t[21]!=="transformed"),le(Ft,"dark:hover:text-gray-100",t[21]!=="transformed"),o(gl,"class","cursor-pointer"),o(zt,"class","sr-only"),o(zt,"type","radio"),o(zt,"name","activeTab"),zt.__value="response",Q(zt,zt.__value),o(Pt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Pt,"bg-primary",t[21]==="response"),le(Pt,"text-primary-content",t[21]==="response"),le(Pt,"shadow",t[21]==="response"),le(Pt,"text-gray-700",t[21]!=="response"),le(Pt,"dark:text-gray-300",t[21]!=="response"),le(Pt,"hover:text-gray-900",t[21]!=="response"),le(Pt,"dark:hover:text-gray-100",t[21]!=="response"),o(El,"class","cursor-pointer"),o(ml,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(hl,"class","p-2 border-b border-base-300 flex justify-center"),o(xt,"class","p-4"),o(Ot,"class","card-body p-0"),o(kl,"class","card bg-base-200"),o(H,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),o(e,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),o(e,"role","dialog"),o(e,"aria-labelledby","modal-title"),o(e,"aria-modal","true"),o(l,"class","modal modal-open"),o(l,"role","presentation"),Bl.p(Jt,ol,zt)},m(Xt,$e){j(Xt,l,$e),s(l,e),s(e,n),s(n,r),s(r,u),s(n,c),s(n,f),s(f,d),rl.m(d,null),s(f,m),s(f,g),s(g,b),s(b,v),s(g,w),s(g,C),s(C,y),s(f,S),s(f,q),s(e,D),s(e,H),s(H,I),s(I,R),s(R,L),s(L,N),s(R,Z),s(R,Y),s(Y,x),s(x,F),s(F,M),s(x,B),s(x,U),s(U,J),s(Y,ue),s(Y,ne),s(ne,$),s($,re),s(ne,ee),s(ne,G),s(G,oe),s(Y,ge),s(Y,he),s(he,ye),s(ye,je),s(he,we),s(he,Oe),s(Oe,Le),s(Y,fe),s(Y,_e),s(_e,Be),s(Be,se),s(_e,ke),s(_e,me),s(me,Ve),s(Y,Ie),s(Y,nt),s(nt,Ne),s(Ne,Qe),s(nt,ve),s(nt,de),s(de,Ze),s(Y,Se),s(Y,Ue),s(Ue,Ce),s(Ce,Ge),s(Ue,ce),s(Ue,qe),s(qe,dt),s(Y,We),s(Y,z),s(z,He),s(He,ft),s(z,Ht),s(z,Ke),_l.m(Ke,null),s(H,_t),ll&&ll.m(H,null),s(H,lt),s(H,it),s(it,ze),s(ze,Xe),s(Xe,at),s(ze,gt),s(ze,wt),Tl.m(wt,null),s(wt,pt),Wt&&Wt.m(wt,null),s(H,vl),s(H,rt),It&&It.m(rt,null),s(rt,Mt),jt&&jt.m(rt,null),s(H,ht),$t&&$t.m(H,null),s(H,Tt),s(H,kl),s(kl,Ot),s(Ot,hl),s(hl,ml),s(ml,ql),s(ql,Jt),Jt.checked=Jt.__value===t[21],s(ql,Ql),s(ql,Qt),s(Qt,Hl),s(ml,Il),s(ml,gl),s(gl,ol),ol.checked=ol.__value===t[21],s(gl,Yl),s(gl,Ft),s(Ft,Vl),s(ml,Jl),s(ml,El),s(El,zt),zt.checked=zt.__value===t[21],s(El,Zl),s(El,Pt),s(Pt,Ll),s(Ot,$l),s(Ot,xt),el&&el.m(xt,null),s(xt,wl),Kt&&Kt.m(xt,null),s(xt,es),Zt&&Zt.m(xt,null),s(H,Fl),il&&il.m(H,null),Wl||(Ps=[V(d,"click",t[29]),V(g,"click",t[30]),V(q,"click",function(){ko(t[1])&&t[1].apply(this,arguments)}),V(Jt,"change",t[32]),V(ol,"change",t[34]),V(zt,"change",t[35]),V(l,"click",t[28]),V(l,"keydown",t[36])],Wl=!0)},p(Xt,$e){t=Xt,$e[0]&16777216&&i!==(i=t[24]("logs.detail.title")+"")&&k(u,i),yl===(yl=nl(t))&&rl?rl.p(t,$e):(rl.d(1),rl=yl(t),rl&&(rl.c(),rl.m(d,null))),$e[0]&16777216&&p!==(p=t[24]("logs.detail.copyToClipboard"))&&o(d,"title",p),$e[0]&16777216&&E!==(E=t[24]("logs.detail.downloadJson")+"")&&k(y,E),$e[0]&16777216&&T!==(T=t[24]("logs.detail.downloadJson"))&&o(g,"title",T),$e[0]&16777216&&A!==(A=t[24]("logs.detail.overview")+"")&&k(N,A),$e[0]&16777216&&K!==(K=t[24]("logs.detail.status")+"")&&k(M,K),$e[0]&1&&O!==(O=t[0].status+"")&&k(J,O),$e[0]&1&&ie!==(ie="badge "+jp(t[0].status)+" badge-lg")&&o(U,"class",ie),$e[0]&16777216&&te!==(te=t[24]("logs.detail.method")+"")&&k(re,te),$e[0]&1&&pe!==(pe=t[0].method+"")&&k(oe,pe),$e[0]&16777216&&Fe!==(Fe=t[24]("logs.requestType")+"")&&k(je,Fe),$e[0]&1&&Je!==(Je=t[25](t[0].requestType)+"")&&k(Le,Je),$e[0]&1&&Pe!==(Pe="badge "+Lp(t[0].requestType)+" badge-lg")&&o(Oe,"class",Pe),$e[0]&16777217&&Me!==(Me=t[24](`logs.requestType_${t[0].requestType}_desc`))&&o(Oe,"title",Me),$e[0]&16777216&&De!==(De=t[24]("logs.detail.duration")+"")&&k(se,De),$e[0]&1&&Ee!==(Ee=vo(t[0].duration)+"")&&k(Ve,Ee),$e[0]&16777216&&Ye!==(Ye=t[24]("logs.detail.timestamp")+"")&&k(Qe,Ye),$e[0]&1&&Te!==(Te=Pp(t[0].timestamp)+"")&&k(Ze,Te),$e[0]&16777216&&mt!==(mt=t[24]("logs.detail.requestId")+"")&&k(Ge,mt),$e[0]&1&&Re!==(Re=t[0].requestId+"")&&k(dt,Re),$e[0]&16777216&&X!==(X=t[24]("logs.detail.processingSteps")+"")&&k(ft,X),al===(al=zl(t))&&_l?_l.p(t,$e):(_l.d(1),_l=al(t),_l&&(_l.c(),_l.m(Ke,null))),t[0].processingSteps&&t[0].processingSteps.length>0?ll?ll.p(ef(t),$e):(ll=sp(ef(t)),ll.c(),ll.m(H,lt)):ll&&(ll.d(1),ll=null),$e[0]&16777216&&Bt!==(Bt=t[24]("logs.detail.requestInfo")+"")&&k(at,Bt),Nl===(Nl=Dl(t))&&Tl?Tl.p(t,$e):(Tl.d(1),Tl=Nl(t),Tl&&(Tl.c(),Tl.m(wt,pt))),t[0].query?Wt?Wt.p(t,$e):(Wt=pp(t),Wt.c(),Wt.m(wt,null)):Wt&&(Wt.d(1),Wt=null),t[0].routePath?It?It.p(t,$e):(It=hp(t),It.c(),It.m(rt,Mt)):It&&(It.d(1),It=null),t[0].upstream?jt?jt.p(t,$e):(jt=mp(t),jt.c(),jt.m(rt,null)):jt&&(jt.d(1),jt=null),t[0].errorMessage?$t?$t.p(t,$e):($t=_p(t),$t.c(),$t.m(H,Tt)):$t&&($t.d(1),$t=null),$e[0]&2097152&&(Jt.checked=Jt.__value===t[21]),$e[0]&16777216&&Yt!==(Yt=t[24]("logs.detail.tabOriginalRequest")+"")&&k(Hl,Yt),$e[0]&2097152&&le(Qt,"bg-primary",t[21]==="original"),$e[0]&2097152&&le(Qt,"text-primary-content",t[21]==="original"),$e[0]&2097152&&le(Qt,"shadow",t[21]==="original"),$e[0]&2097152&&le(Qt,"text-gray-700",t[21]!=="original"),$e[0]&2097152&&le(Qt,"dark:text-gray-300",t[21]!=="original"),$e[0]&2097152&&le(Qt,"hover:text-gray-900",t[21]!=="original"),$e[0]&2097152&&le(Qt,"dark:hover:text-gray-100",t[21]!=="original"),$e[0]&2097152&&(ol.checked=ol.__value===t[21]),$e[0]&16777216&&Pl!==(Pl=t[24]("logs.detail.tabFinalRequest")+"")&&k(Vl,Pl),$e[0]&2097152&&le(Ft,"bg-primary",t[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-primary-content",t[21]==="transformed"),$e[0]&2097152&&le(Ft,"shadow",t[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-gray-700",t[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:text-gray-300",t[21]!=="transformed"),$e[0]&2097152&&le(Ft,"hover:text-gray-900",t[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:hover:text-gray-100",t[21]!=="transformed"),$e[0]&2097152&&(zt.checked=zt.__value===t[21]),$e[0]&16777216&&jl!==(jl=t[24]("logs.detail.tabResponse")+"")&&k(Ll,jl),$e[0]&2097152&&le(Pt,"bg-primary",t[21]==="response"),$e[0]&2097152&&le(Pt,"text-primary-content",t[21]==="response"),$e[0]&2097152&&le(Pt,"shadow",t[21]==="response"),$e[0]&2097152&&le(Pt,"text-gray-700",t[21]!=="response"),$e[0]&2097152&&le(Pt,"dark:text-gray-300",t[21]!=="response"),$e[0]&2097152&&le(Pt,"hover:text-gray-900",t[21]!=="response"),$e[0]&2097152&&le(Pt,"dark:hover:text-gray-100",t[21]!=="response"),t[21]==="original"?el?el.p(t,$e):(el=bp(t),el.c(),el.m(xt,wl)):el&&(el.d(1),el=null),t[21]==="transformed"?Kt?Kt.p(t,$e):(Kt=yp(t),Kt.c(),Kt.m(xt,es)):Kt&&(Kt.d(1),Kt=null),t[21]==="response"?Zt?Zt.p(t,$e):(Zt=Mp(t),Zt.c(),Zt.m(xt,null)):Zt&&(Zt.d(1),Zt=null),t[0].authLevel?il?il.p(t,$e):(il=Hp(t),il.c(),il.m(H,null)):il&&(il.d(1),il=null)},i:tt,o:tt,d(Xt){Xt&&P(l),rl.d(),_l.d(),ll&&ll.d(),Tl.d(),Wt&&Wt.d(),It&&It.d(),jt&&jt.d(),$t&&$t.d(),el&&el.d(),Kt&&Kt.d(),Zt&&Zt.d(),il&&il.d(),Bl.r(),Wl=!1,bt(Ps)}}}function Pp(t){return new Date(t).toLocaleString()}function vo(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(2)}s`}function jp(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Lp(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function ar(t){return JSON.stringify(t,null,2)}function ib(t){const l=t.toLowerCase();return l.includes("auth")?"bg-blue-500":l.includes("plugin")?"bg-purple-500":l.includes("upstream")||l.includes("proxy")||l.includes("selected")?"bg-green-500":l.includes("transform")||l.includes("rewrite")?"bg-orange-500":l.includes("error")||l.includes("failed")?"bg-red-500":l.includes("retry")||l.includes("recover")||l.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function ub(t){const l=t.toLowerCase();return l.includes("auth")?"Auth":l.includes("plugin")?"Plugin":l.includes("upstream")||l.includes("proxy")||l.includes("selected")?"Upstream":l.includes("transform")||l.includes("rewrite")?"Transform":l.includes("retry")||l.includes("recover")||l.includes("circuit")?"Retry":"Other"}function fb(t,l,e){let n;Dt(t,Rt,G=>e(24,n=G));let{log:r}=l,{onClose:i}=l,u=null,c=null,f=!1,d=!1,p=null,m=null,g=!1,b=null,v=null,w=!1,C=!1,E=null,y=null,T=null,S=null,q=!1,D=!1,H=null,I=null,R="original",L=!1,A=!1;function N(G){return G?n(`logs.requestType_${G}`):"-"}function Z(G){const pe=`logs.steps.${G}`,oe=n(pe);return oe===pe?G.split("_").map(ge=>ge.charAt(0).toUpperCase()+ge.slice(1)).join(" "):oe}function Y(){if(!r.processingSteps||r.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const G=r.processingSteps,pe=G[0].timestamp,oe=G.map((ye,Fe)=>Fe===G.length-1?r.duration-(ye.timestamp-pe):G[Fe+1].timestamp-ye.timestamp),ge=G.map(ye=>ye.timestamp-pe),he=r.duration;return{durations:oe,relativeTime:ge,totalDuration:he}}function x(G){G.target===G.currentTarget&&i()}async function F(){const G={requestId:r.requestId,timestamp:r.timestamp,method:r.method,path:r.path,status:r.status,duration:r.duration,originalRequestHeaders:T,originalRequestBody:S,requestHeaders:b,requestBody:u,responseHeaders:v,responseBody:c,processingSteps:r.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),e(23,A=!0),setTimeout(()=>{e(23,A=!1)},2e3)}catch(pe){console.error("Failed to copy:",pe)}}async function K(){const G={requestId:r.requestId,timestamp:r.timestamp,method:r.method,path:r.path,status:r.status,duration:r.duration,originalRequestHeaders:T,originalRequestBody:S,requestHeaders:b,requestBody:u,responseHeaders:v,responseBody:c,processingSteps:r.processingSteps},pe=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),oe=URL.createObjectURL(pe),ge=document.createElement("a");ge.href=oe,ge.download=`log-${r.requestId}.json`,ge.click(),URL.revokeObjectURL(oe)}async function M(){if(!(!r.reqBodyId||u!==null)){e(4,f=!0),e(6,p=null);try{e(2,u=await xu(r.reqBodyId))}catch(G){e(6,p=G instanceof Error?G.message:"Failed to load request body")}finally{e(4,f=!1)}}}async function B(){if(!(!r.respBodyId||c!==null)){e(5,d=!0),e(7,m=null);try{e(3,c=await xu(r.respBodyId))}catch(G){e(7,m=G instanceof Error?G.message:"Failed to load response body")}finally{e(5,d=!1)}}}async function U(){if(!(!r.reqHeaderId||b!==null)){e(11,w=!0),e(13,E=null);try{e(9,b=await $u(r.reqHeaderId))}catch(G){e(13,E=G instanceof Error?G.message:"Failed to load request headers")}finally{e(11,w=!1)}}}async function O(){if(!(!r.respHeaderId||v!==null)){e(12,C=!0),e(14,y=null);try{e(10,v=await $u(r.respHeaderId))}catch(G){e(14,y=G instanceof Error?G.message:"Failed to load response headers")}finally{e(12,C=!1)}}}async function J(){if(!(!r.originalReqHeaderId||T!==null)){e(17,q=!0),e(19,H=null);try{e(15,T=await $u(r.originalReqHeaderId))}catch(G){e(19,H=G instanceof Error?G.message:"Failed to load original request headers")}finally{e(17,q=!1)}}}async function ie(){if(!(!r.originalReqBodyId||S!==null)){e(18,D=!0),e(20,I=null);try{e(16,S=await xu(r.originalReqBodyId))}catch(G){e(20,I=G instanceof Error?G.message:"Failed to load original request body")}finally{e(18,D=!1)}}}Hs(async()=>{try{const G=await hf();e(8,g=G.logging?.body?.enabled||!1)}catch(G){console.error("Failed to load config:",G),e(8,g=!1)}r.originalReqHeaderId&&J(),r.originalReqBodyId&&ie(),r.reqHeaderId&&U(),r.respHeaderId&&O(),r.reqBodyId&&M(),r.respBodyId&&B()});const ue=[[]],ne=()=>e(22,L=!L);function $(){R=this.__value,e(21,R)}function te(){R=this.__value,e(21,R)}function re(){R=this.__value,e(21,R)}const ee=G=>G.key==="Escape"&&i();return t.$$set=G=>{"log"in G&&e(0,r=G.log),"onClose"in G&&e(1,i=G.onClose)},[r,i,u,c,f,d,p,m,g,b,v,w,C,E,y,T,S,q,D,H,I,R,L,A,n,N,Z,Y,x,F,K,ne,$,ue,te,re,ee]}class cb extends Vt{constructor(l){super(),Ut(this,l,fb,ab,At,{log:0,onClose:1},null,[-1,-1,-1])}}function Dp(t,l,e){const n=t.slice();return n[104]=l[e],n}function Ip(t){let l,e,n,r,i,u=t[24]("logs.newDataAvailable")+"",c,f,d,p,m=t[24]("common.refresh")+"",g,b,v;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=h(),d=a("div"),p=a("button"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(p,"class","btn btn-sm"),o(d,"class","flex-none"),o(l,"class","alert alert-info shadow-lg mb-4")},m(w,C){j(w,l,C),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(l,f),s(l,d),s(d,p),s(p,g),b||(v=V(p,"click",t[29]),b=!0)},p(w,C){C[0]&16777216&&u!==(u=w[24]("logs.newDataAvailable")+"")&&k(c,u),C[0]&16777216&&m!==(m=w[24]("common.refresh")+"")&&k(g,m)},d(w){w&&P(l),b=!1,v()}}}function Bp(t){let l;return{c(){l=a("span"),l.textContent="1",o(l,"class","badge badge-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Ap(t){let l;return{c(){l=a("span"),l.textContent="1",o(l,"class","badge badge-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Op(t){let l;return{c(){l=a("span"),l.textContent="1",o(l,"class","badge badge-sm")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function Fp(t){let l,e=[t[5],t[8]!=="recent"||t[9]!==1,t[6]!=="timestamp"||t[7]!=="desc"].filter(Boolean).length+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&992&&e!==(e=[r[5],r[8]!=="recent"||r[9]!==1,r[6]!=="timestamp"||r[7]!=="desc"].filter(Boolean).length+"")&&k(n,e)},d(r){r&&P(l)}}}function zp(t){let l,e,n,r=t[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[9]),f||(d=V(c,"input",t[45]),f=!0)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.recentHours")+"")&&k(i,r),m[0]&512&&St(c.value)!==p[9]&&Q(c,p[9])},d(p){p&&P(l),f=!1,d()}}}function Np(t){let l,e,n,r=t[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=t[24]("logs.endTime")+"",b,v,w,C,E;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),f=h(),d=a("div"),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[10]),j(y,f,T),j(y,d,T),s(d,p),s(p,m),s(m,b),s(d,v),s(d,w),Q(w,t[11]),C||(E=[V(c,"input",t[46]),V(w,"input",t[47])],C=!0)},p(y,T){T[0]&16777216&&r!==(r=y[24]("logs.startTime")+"")&&k(i,r),T[0]&1024&&Q(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&k(b,g),T[0]&2048&&Q(w,y[11])},d(y){y&&(P(l),P(f),P(d)),C=!1,bt(E)}}}function Up(t){let l,e;return{c(){l=a("span"),e=_(t[13]),o(l,"class","badge badge-sm badge-primary")},m(n,r){j(n,l,r),s(l,e)},p(n,r){r[0]&8192&&k(e,n[13])},d(n){n&&P(l)}}}function Vp(t){let l,e,n,r=t[24]("logs.refreshInterval")+"",i,u,c,f,d=t[24]("logs.refreshEvery5s")+"",p,m,g=t[24]("logs.refreshEvery10s")+"",b,v,w=t[24]("logs.refreshEvery30s")+"",C,E,y=t[24]("logs.refreshEvery60s")+"",T,S,q;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("select"),f=a("option"),p=_(d),m=a("option"),b=_(g),v=a("option"),C=_(w),E=a("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Q(f,f.__value),m.__value="10s",Q(m,m.__value),v.__value="30s",Q(v,v.__value),E.__value="60s",Q(E,E.__value),o(c,"class","select select-bordered select-sm"),t[13]===void 0&&tl(()=>t[51].call(c)),o(l,"class","form-control")},m(D,H){j(D,l,H),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),s(c,f),s(f,p),s(c,m),s(m,b),s(c,v),s(v,C),s(c,E),s(E,T),kt(c,t[13],!0),S||(q=V(c,"change",t[51]),S=!0)},p(D,H){H[0]&16777216&&r!==(r=D[24]("logs.refreshInterval")+"")&&k(i,r),H[0]&16777216&&d!==(d=D[24]("logs.refreshEvery5s")+"")&&k(p,d),H[0]&16777216&&g!==(g=D[24]("logs.refreshEvery10s")+"")&&k(b,g),H[0]&16777216&&w!==(w=D[24]("logs.refreshEvery30s")+"")&&k(C,w),H[0]&16777216&&y!==(y=D[24]("logs.refreshEvery60s")+"")&&k(T,y),H[0]&8192&&kt(c,D[13])},d(D){D&&P(l),S=!1,q()}}}function Jp(t){let l,e,n,r,i=t[24]("logs.clearFilters")+"",u,c,f;return{c(){l=a("button"),e=ae("svg"),n=ae("path"),r=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(l,"type","button"),o(l,"class","btn btn-sm btn-ghost gap-1")},m(d,p){j(d,l,p),s(l,e),s(e,n),s(l,r),s(l,u),c||(f=V(l,"click",t[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&k(u,i)},d(d){d&&P(l),c=!1,f()}}}function Wp(t){let l,e=[t[2],t[3],t[4]!==void 0,t[5],t[8]!=="recent"||t[9]!==1,t[6]!=="timestamp"||t[7]!=="desc"].filter(Boolean).length+"",n;return{c(){l=a("span"),n=_(e),o(l,"class","badge badge-sm")},m(r,i){j(r,l,i),s(l,n)},p(r,i){i[0]&1020&&e!==(e=[r[2],r[3],r[4]!==void 0,r[5],r[8]!=="recent"||r[9]!==1,r[6]!=="timestamp"||r[7]!=="desc"].filter(Boolean).length+"")&&k(n,e)},d(r){r&&P(l)}}}function Gp(t){let l,e,n,r=t[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[9]),f||(d=V(c,"input",t[59]),f=!0)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.recentHours")+"")&&k(i,r),m[0]&512&&St(c.value)!==p[9]&&Q(c,p[9])},d(p){p&&P(l),f=!1,d()}}}function Kp(t){let l,e,n,r=t[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=t[24]("logs.endTime")+"",b,v,w,C,E;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),f=h(),d=a("div"),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[10]),j(y,f,T),j(y,d,T),s(d,p),s(p,m),s(m,b),s(d,v),s(d,w),Q(w,t[11]),C||(E=[V(c,"input",t[60]),V(w,"input",t[61])],C=!0)},p(y,T){T[0]&16777216&&r!==(r=y[24]("logs.startTime")+"")&&k(i,r),T[0]&1024&&Q(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&k(b,g),T[0]&2048&&Q(w,y[11])},d(y){y&&(P(l),P(f),P(d)),C=!1,bt(E)}}}function Qp(t){let l,e,n,r=t[24]("logs.refreshInterval")+"",i,u,c,f,d=t[24]("logs.refreshEvery5s")+"",p,m,g=t[24]("logs.refreshEvery10s")+"",b,v,w=t[24]("logs.refreshEvery30s")+"",C,E,y=t[24]("logs.refreshEvery60s")+"",T,S,q;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("select"),f=a("option"),p=_(d),m=a("option"),b=_(g),v=a("option"),C=_(w),E=a("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Q(f,f.__value),m.__value="10s",Q(m,m.__value),v.__value="30s",Q(v,v.__value),E.__value="60s",Q(E,E.__value),o(c,"class","select select-bordered select-sm"),t[13]===void 0&&tl(()=>t[65].call(c)),o(l,"class","form-control")},m(D,H){j(D,l,H),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),s(c,f),s(f,p),s(c,m),s(m,b),s(c,v),s(v,C),s(c,E),s(E,T),kt(c,t[13],!0),S||(q=V(c,"change",t[65]),S=!0)},p(D,H){H[0]&16777216&&r!==(r=D[24]("logs.refreshInterval")+"")&&k(i,r),H[0]&16777216&&d!==(d=D[24]("logs.refreshEvery5s")+"")&&k(p,d),H[0]&16777216&&g!==(g=D[24]("logs.refreshEvery10s")+"")&&k(b,g),H[0]&16777216&&w!==(w=D[24]("logs.refreshEvery30s")+"")&&k(C,w),H[0]&16777216&&y!==(y=D[24]("logs.refreshEvery60s")+"")&&k(T,y),H[0]&8192&&kt(c,D[13])},d(D){D&&P(l),S=!1,q()}}}function Yp(t){let l,e=t[24]("logs.lastRefreshed")+"",n,r,i=new Date(t[21]).toLocaleTimeString()+"",u;return{c(){l=a("div"),n=_(e),r=_(": "),u=_(i),o(l,"class","text-xs text-gray-500 text-center")},m(c,f){j(c,l,f),s(l,n),s(l,r),s(l,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.lastRefreshed")+"")&&k(n,e),f[0]&2097152&&i!==(i=new Date(c[21]).toLocaleTimeString()+"")&&k(u,i)},d(c){c&&P(l)}}}function Zp(t){let l,e,n,r,i=t[24]("logs.clearFilters")+"",u,c,f;return{c(){l=a("button"),e=ae("svg"),n=ae("path"),r=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(l,"type","button"),o(l,"class","btn btn-sm btn-ghost gap-1")},m(d,p){j(d,l,p),s(l,e),s(e,n),s(l,r),s(l,u),c||(f=V(l,"click",t[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&k(u,i)},d(d){d&&P(l),c=!1,f()}}}function Xp(t){let l;return{c(){l=a("span"),o(l,"class","badge badge-sm badge-primary")},m(e,n){j(e,l,n)},d(e){e&&P(l)}}}function xp(t){let l,e,n,r=t[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[9]),f||(d=V(c,"input",t[73]),f=!0)},p(p,m){m[0]&16777216&&r!==(r=p[24]("logs.recentHours")+"")&&k(i,r),m[0]&512&&St(c.value)!==p[9]&&Q(c,p[9])},d(p){p&&P(l),f=!1,d()}}}function $p(t){let l,e,n,r=t[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=t[24]("logs.endTime")+"",b,v,w,C,E;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("input"),f=h(),d=a("div"),p=a("div"),m=a("span"),b=_(g),v=h(),w=a("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(l,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){j(y,l,T),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),Q(c,t[10]),j(y,f,T),j(y,d,T),s(d,p),s(p,m),s(m,b),s(d,v),s(d,w),Q(w,t[11]),C||(E=[V(c,"input",t[74]),V(w,"input",t[75])],C=!0)},p(y,T){T[0]&16777216&&r!==(r=y[24]("logs.startTime")+"")&&k(i,r),T[0]&1024&&Q(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&k(b,g),T[0]&2048&&Q(w,y[11])},d(y){y&&(P(l),P(f),P(d)),C=!1,bt(E)}}}function e0(t){let l,e,n,r=t[24]("logs.refreshInterval")+"",i,u,c,f,d=t[24]("logs.refreshEvery5s")+"",p,m,g=t[24]("logs.refreshEvery10s")+"",b,v,w=t[24]("logs.refreshEvery30s")+"",C,E,y=t[24]("logs.refreshEvery60s")+"",T,S,q;return{c(){l=a("div"),e=a("div"),n=a("span"),i=_(r),u=h(),c=a("select"),f=a("option"),p=_(d),m=a("option"),b=_(g),v=a("option"),C=_(w),E=a("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Q(f,f.__value),m.__value="10s",Q(m,m.__value),v.__value="30s",Q(v,v.__value),E.__value="60s",Q(E,E.__value),o(c,"class","select select-bordered select-sm"),t[13]===void 0&&tl(()=>t[79].call(c)),o(l,"class","form-control")},m(D,H){j(D,l,H),s(l,e),s(e,n),s(n,i),s(l,u),s(l,c),s(c,f),s(f,p),s(c,m),s(m,b),s(c,v),s(v,C),s(c,E),s(E,T),kt(c,t[13],!0),S||(q=V(c,"change",t[79]),S=!0)},p(D,H){H[0]&16777216&&r!==(r=D[24]("logs.refreshInterval")+"")&&k(i,r),H[0]&16777216&&d!==(d=D[24]("logs.refreshEvery5s")+"")&&k(p,d),H[0]&16777216&&g!==(g=D[24]("logs.refreshEvery10s")+"")&&k(b,g),H[0]&16777216&&w!==(w=D[24]("logs.refreshEvery30s")+"")&&k(C,w),H[0]&16777216&&y!==(y=D[24]("logs.refreshEvery60s")+"")&&k(T,y),H[0]&8192&&kt(c,D[13])},d(D){D&&P(l),S=!1,q()}}}function t0(t){let l,e,n,r,i,u,c=t[24]("logs.clearFilters")+"",f,d,p;return{c(){l=a("div"),e=h(),n=a("button"),r=ae("svg"),i=ae("path"),u=h(),f=_(c),o(l,"class","divider my-2"),o(i,"stroke-linecap","round"),o(i,"stroke-linejoin","round"),o(i,"stroke-width","2"),o(i,"d","M6 18L18 6M6 6l12 12"),o(r,"xmlns","http://www.w3.org/2000/svg"),o(r,"class","h-4 w-4"),o(r,"fill","none"),o(r,"viewBox","0 0 24 24"),o(r,"stroke","currentColor"),o(n,"type","button"),o(n,"class","btn btn-sm btn-ghost w-full gap-1")},m(m,g){j(m,l,g),j(m,e,g),j(m,n,g),s(n,r),s(r,i),s(n,u),s(n,f),d||(p=V(n,"click",t[28]),d=!0)},p(m,g){g[0]&16777216&&c!==(c=m[24]("logs.clearFilters")+"")&&k(f,c)},d(m){m&&(P(l),P(e),P(n)),d=!1,p()}}}function l0(t){let l,e=t[1].trim(),n,r,i,u,c,f,d,p,m=e&&s0(t),g=t[2]&&o0(t),b=t[3]&&n0(t),v=t[4]!==void 0&&r0(t),w=t[5]&&a0(t),C=t[8]==="recent"&&t[9]!==1&&i0(t),E=t[8]==="custom"&&u0(t),y=t[8]==="all"&&f0(t),T=(t[6]!=="timestamp"||t[7]!=="desc")&&c0(t);return{c(){l=a("div"),m&&m.c(),n=h(),g&&g.c(),r=h(),b&&b.c(),i=h(),v&&v.c(),u=h(),w&&w.c(),c=h(),C&&C.c(),f=h(),E&&E.c(),d=h(),y&&y.c(),p=h(),T&&T.c(),o(l,"class","flex items-center gap-2 flex-wrap px-1")},m(S,q){j(S,l,q),m&&m.m(l,null),s(l,n),g&&g.m(l,null),s(l,r),b&&b.m(l,null),s(l,i),v&&v.m(l,null),s(l,u),w&&w.m(l,null),s(l,c),C&&C.m(l,null),s(l,f),E&&E.m(l,null),s(l,d),y&&y.m(l,null),s(l,p),T&&T.m(l,null)},p(S,q){q[0]&2&&(e=S[1].trim()),e?m?m.p(S,q):(m=s0(S),m.c(),m.m(l,n)):m&&(m.d(1),m=null),S[2]?g?g.p(S,q):(g=o0(S),g.c(),g.m(l,r)):g&&(g.d(1),g=null),S[3]?b?b.p(S,q):(b=n0(S),b.c(),b.m(l,i)):b&&(b.d(1),b=null),S[4]!==void 0?v?v.p(S,q):(v=r0(S),v.c(),v.m(l,u)):v&&(v.d(1),v=null),S[5]?w?w.p(S,q):(w=a0(S),w.c(),w.m(l,c)):w&&(w.d(1),w=null),S[8]==="recent"&&S[9]!==1?C?C.p(S,q):(C=i0(S),C.c(),C.m(l,f)):C&&(C.d(1),C=null),S[8]==="custom"?E?E.p(S,q):(E=u0(S),E.c(),E.m(l,d)):E&&(E.d(1),E=null),S[8]==="all"?y?y.p(S,q):(y=f0(S),y.c(),y.m(l,p)):y&&(y.d(1),y=null),S[6]!=="timestamp"||S[7]!=="desc"?T?T.p(S,q):(T=c0(S),T.c(),T.m(l,null)):T&&(T.d(1),T=null)},d(S){S&&P(l),m&&m.d(),g&&g.d(),b&&b.d(),v&&v.d(),w&&w.d(),C&&C.d(),E&&E.d(),y&&y.d(),T&&T.d()}}}function s0(t){let l,e,n=t[24]("logs.searchTerm")+"",r,i,u,c,f,d,p,m,g;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),f=_(t[1]),d=h(),p=a("button"),p.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-lg gap-2")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,f),s(l,d),s(l,p),m||(g=V(p,"click",t[82]),m=!0)},p(b,v){v[0]&16777216&&n!==(n=b[24]("logs.searchTerm")+"")&&k(r,n),v[0]&2&&k(f,b[1])},d(b){b&&P(l),m=!1,g()}}}function o0(t){let l,e,n=t[24]("logs.method")+"",r,i,u,c,f,d,p,m,g;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),f=_(t[2]),d=h(),p=a("button"),p.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,f),s(l,d),s(l,p),m||(g=V(p,"click",t[83]),m=!0)},p(b,v){v[0]&16777216&&n!==(n=b[24]("logs.method")+"")&&k(r,n),v[0]&4&&k(f,b[2])},d(b){b&&P(l),m=!1,g()}}}function n0(t){let l,e,n=t[24]("logs.status")+"",r,i,u,c,f,d,p,m,g;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),f=_(t[3]),d=h(),p=a("button"),p.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,f),s(l,d),s(l,p),m||(g=V(p,"click",t[84]),m=!0)},p(b,v){v[0]&16777216&&n!==(n=b[24]("logs.status")+"")&&k(r,n),v[0]&8&&k(f,b[3])},d(b){b&&P(l),m=!1,g()}}}function r0(t){let l,e,n=t[24]("logs.result")+"",r,i,u,c,f=(t[4]?t[24]("logs.success"):t[24]("logs.failed"))+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[85]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.result")+"")&&k(r,n),w[0]&16777232&&f!==(f=(v[4]?v[24]("logs.success"):v[24]("logs.failed"))+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function a0(t){let l,e,n=t[24]("logs.requestType")+"",r,i,u,c,f=t[24](`logs.requestType_${t[5]}`)+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[86]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.requestType")+"")&&k(r,n),w[0]&16777248&&f!==(f=v[24](`logs.requestType_${v[5]}`)+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function i0(t){let l,e,n=t[24]("logs.timeRange")+"",r,i,u,c,f=t[24]("logs.recentTime")+"",d,p,m,g,b,v,w,C;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=_(t[9]),g=_("h"),b=h(),v=a("button"),v.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(v,"type","button"),o(v,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(E,y){j(E,l,y),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(c,p),s(c,m),s(c,g),s(l,b),s(l,v),w||(C=V(v,"click",t[87]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.timeRange")+"")&&k(r,n),y[0]&16777216&&f!==(f=E[24]("logs.recentTime")+"")&&k(d,f),y[0]&512&&k(m,E[9])},d(E){E&&P(l),w=!1,C()}}}function u0(t){let l,e,n=t[24]("logs.timeRange")+"",r,i,u,c,f=t[24]("logs.customTime")+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[88]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.timeRange")+"")&&k(r,n),w[0]&16777216&&f!==(f=v[24]("logs.customTime")+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function f0(t){let l,e,n=t[24]("logs.timeRange")+"",r,i,u,c,f=t[24]("logs.allTime")+"",d,p,m,g,b;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),m=a("button"),m.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(v,w){j(v,l,w),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(l,p),s(l,m),g||(b=V(m,"click",t[89]),g=!0)},p(v,w){w[0]&16777216&&n!==(n=v[24]("logs.timeRange")+"")&&k(r,n),w[0]&16777216&&f!==(f=v[24]("logs.allTime")+"")&&k(d,f)},d(v){v&&P(l),g=!1,b()}}}function c0(t){let l,e,n=t[24]("logs.sortBy")+"",r,i,u,c,f=t[24](`logs.sortBy${t[6].charAt(0).toUpperCase()+t[6].slice(1)}`)+"",d,p,m=t[7]==="asc"?"\u2191":"\u2193",g,b,v,w,C;return{c(){l=a("div"),e=a("span"),r=_(n),i=_(":"),u=h(),c=a("span"),d=_(f),p=h(),g=_(m),b=h(),v=a("button"),v.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>\',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(v,"type","button"),o(v,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(l,"class","badge badge-primary badge-lg gap-2")},m(E,y){j(E,l,y),s(l,e),s(e,r),s(e,i),s(l,u),s(l,c),s(c,d),s(c,p),s(c,g),s(l,b),s(l,v),w||(C=V(v,"click",t[90]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.sortBy")+"")&&k(r,n),y[0]&16777280&&f!==(f=E[24](`logs.sortBy${E[6].charAt(0).toUpperCase()+E[6].slice(1)}`)+"")&&k(d,f),y[0]&128&&m!==(m=E[7]==="asc"?"\u2191":"\u2193")&&k(g,m)},d(E){E&&P(l),w=!1,C()}}}function db(t){let l,e,n,r,i,u,c,f=t[24]("logs.time")+"",d,p,m,g=t[24]("logs.method")+"",b,v,w,C=t[24]("logs.path")+"",E,y,T,S=t[24]("logs.status")+"",q,D,H,I=t[24]("logs.requestType")+"",R,L,A,N=t[24]("logs.duration")+"",Z,Y,x,F=t[24]("logs.upstream")+"",K,M,B,U=t[24]("logs.actions")+"",O,J,ie,ue=[],ne=new Map,$,te,re,ee=t[24]("logs.showing",{values:{start:(t[0]-1)*or+1,end:Math.min(t[0]*or,t[15]),total:t[15]}})+"",G,pe,oe,ge,he,ye,Fe,je,we=t[24]("logs.page",{values:{page:t[0],totalPages:t[16]}})+"",Oe,Je,Le,Pe,Me,fe,_e,Be=ut(t[14]);const De=se=>se[104].requestId;for(let se=0;se<Be.length;se+=1){let ke=Dp(t,Be,se),me=De(ke);ne.set(me,ue[se]=d0(me,ke))}return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("table"),i=a("thead"),u=a("tr"),c=a("th"),d=_(f),p=h(),m=a("th"),b=_(g),v=h(),w=a("th"),E=_(C),y=h(),T=a("th"),q=_(S),D=h(),H=a("th"),R=_(I),L=h(),A=a("th"),Z=_(N),Y=h(),x=a("th"),K=_(F),M=h(),B=a("th"),O=_(U),J=h(),ie=a("tbody");for(let se=0;se<ue.length;se+=1)ue[se].c();$=h(),te=a("div"),re=a("div"),G=_(ee),pe=h(),oe=a("div"),ge=a("button"),he=_("\xAB"),Fe=h(),je=a("button"),Oe=_(we),Je=h(),Le=a("button"),Pe=_("\xBB"),o(r,"class","table table-zebra table-sm"),o(n,"class","overflow-x-auto"),o(re,"class","text-sm"),o(ge,"class","join-item btn btn-sm"),ge.disabled=ye=t[0]<=1,o(je,"class","join-item btn btn-sm"),o(Le,"class","join-item btn btn-sm"),Le.disabled=Me=t[0]>=t[16],o(oe,"class","join"),o(te,"class","flex justify-between items-center p-4"),o(e,"class","card-body p-0"),o(l,"class","card bg-base-100 shadow-xl")},m(se,ke){j(se,l,ke),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(u,c),s(c,d),s(u,p),s(u,m),s(m,b),s(u,v),s(u,w),s(w,E),s(u,y),s(u,T),s(T,q),s(u,D),s(u,H),s(H,R),s(u,L),s(u,A),s(A,Z),s(u,Y),s(u,x),s(x,K),s(u,M),s(u,B),s(B,O),s(r,J),s(r,ie);for(let me=0;me<ue.length;me+=1)ue[me]&&ue[me].m(ie,null);s(e,$),s(e,te),s(te,re),s(re,G),s(te,pe),s(te,oe),s(oe,ge),s(ge,he),s(oe,Fe),s(oe,je),s(je,Oe),s(oe,Je),s(oe,Le),s(Le,Pe),fe||(_e=[V(ge,"click",t[92]),V(Le,"click",t[93])],fe=!0)},p(se,ke){ke[0]&16777216&&f!==(f=se[24]("logs.time")+"")&&k(d,f),ke[0]&16777216&&g!==(g=se[24]("logs.method")+"")&&k(b,g),ke[0]&16777216&&C!==(C=se[24]("logs.path")+"")&&k(E,C),ke[0]&16777216&&S!==(S=se[24]("logs.status")+"")&&k(q,S),ke[0]&16777216&&I!==(I=se[24]("logs.requestType")+"")&&k(R,I),ke[0]&16777216&&N!==(N=se[24]("logs.duration")+"")&&k(Z,N),ke[0]&16777216&&F!==(F=se[24]("logs.upstream")+"")&&k(K,F),ke[0]&16777216&&U!==(U=se[24]("logs.actions")+"")&&k(O,U),ke[0]&218120192&&(Be=ut(se[14]),ue=ff(ue,ke,De,1,se,Be,ne,ie,j0,d0,null,Dp)),ke[0]&16809985&&ee!==(ee=se[24]("logs.showing",{values:{start:(se[0]-1)*or+1,end:Math.min(se[0]*or,se[15]),total:se[15]}})+"")&&k(G,ee),ke[0]&1&&ye!==(ye=se[0]<=1)&&(ge.disabled=ye),ke[0]&16842753&&we!==(we=se[24]("logs.page",{values:{page:se[0],totalPages:se[16]}})+"")&&k(Oe,we),ke[0]&65537&&Me!==(Me=se[0]>=se[16])&&(Le.disabled=Me)},d(se){se&&P(l);for(let ke=0;ke<ue.length;ke+=1)ue[ke].d();fe=!1,bt(_e)}}}function pb(t){let l,e,n,r,i,u=t[24]("logs.noData")+"",c;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(l,"class","alert alert-info")},m(f,d){j(f,l,d),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c)},p(f,d){d[0]&16777216&&u!==(u=f[24]("logs.noData")+"")&&k(c,u)},d(f){f&&P(l)}}}function hb(t){let l,e,n,r,i,u=t[24]("common.error")+"",c,f,d;return{c(){l=a("div"),e=ae("svg"),n=ae("path"),r=h(),i=a("span"),c=_(u),f=_(": "),d=_(t[18]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(l,"class","alert alert-error")},m(p,m){j(p,l,m),s(l,e),s(e,n),s(l,r),s(l,i),s(i,c),s(i,f),s(i,d)},p(p,m){m[0]&16777216&&u!==(u=p[24]("common.error")+"")&&k(c,u),m[0]&262144&&k(d,p[18])},d(p){p&&P(l)}}}function mb(t){let l;return{c(){l=a("div"),l.innerHTML=\'<span class="loading loading-spinner loading-lg"></span>\',o(l,"class","flex justify-center items-center h-64")},m(e,n){j(e,l,n)},p:tt,d(e){e&&P(l)}}}function d0(t,l){let e,n,r=h0(l[104].timestamp)+"",i,u,c,f,d=l[104].method+"",p,m,g,b=l[104].path+"",v,w,C,E,y,T=l[104].status+"",S,q,D,H,I,R=l[27](l[104].requestType)+"",L,A,N,Z,Y,x=m0(l[104].duration)+"",F,K,M,B=(l[104].upstream||"-")+"",U,O,J,ie,ue,ne=l[24]("logs.viewDetail")+"",$,te,re,ee;function G(){return l[91](l[104])}return{key:t,first:null,c(){e=a("tr"),n=a("td"),i=_(r),u=h(),c=a("td"),f=a("span"),p=_(d),m=h(),g=a("td"),v=_(b),C=h(),E=a("td"),y=a("span"),S=_(T),D=h(),H=a("td"),I=a("span"),L=_(R),Z=h(),Y=a("td"),F=_(x),K=h(),M=a("td"),U=_(B),J=h(),ie=a("td"),ue=a("button"),$=_(ne),te=h(),o(n,"class","text-xs"),o(f,"class","badge badge-sm"),o(g,"class","font-mono text-xs truncate max-w-xs"),o(g,"title",w=l[104].path),o(y,"class",q="badge badge-sm "+g0(l[104].status)),o(I,"class",A="badge badge-sm "+_0(l[104].requestType)),o(I,"title",N=l[24](`logs.requestType_${l[104].requestType}_desc`)),o(Y,"class","text-xs"),o(M,"class","text-xs truncate max-w-xs"),o(M,"title",O=l[104].upstream||"-"),o(ue,"class","btn btn-xs btn-ghost"),o(e,"class","hover"),this.first=e},m(pe,oe){j(pe,e,oe),s(e,n),s(n,i),s(e,u),s(e,c),s(c,f),s(f,p),s(e,m),s(e,g),s(g,v),s(e,C),s(e,E),s(E,y),s(y,S),s(e,D),s(e,H),s(H,I),s(I,L),s(e,Z),s(e,Y),s(Y,F),s(e,K),s(e,M),s(M,U),s(e,J),s(e,ie),s(ie,ue),s(ue,$),s(e,te),re||(ee=V(ue,"click",G),re=!0)},p(pe,oe){l=pe,oe[0]&16384&&r!==(r=h0(l[104].timestamp)+"")&&k(i,r),oe[0]&16384&&d!==(d=l[104].method+"")&&k(p,d),oe[0]&16384&&b!==(b=l[104].path+"")&&k(v,b),oe[0]&16384&&w!==(w=l[104].path)&&o(g,"title",w),oe[0]&16384&&T!==(T=l[104].status+"")&&k(S,T),oe[0]&16384&&q!==(q="badge badge-sm "+g0(l[104].status))&&o(y,"class",q),oe[0]&16384&&R!==(R=l[27](l[104].requestType)+"")&&k(L,R),oe[0]&16384&&A!==(A="badge badge-sm "+_0(l[104].requestType))&&o(I,"class",A),oe[0]&16793600&&N!==(N=l[24](`logs.requestType_${l[104].requestType}_desc`))&&o(I,"title",N),oe[0]&16384&&x!==(x=m0(l[104].duration)+"")&&k(F,x),oe[0]&16384&&B!==(B=(l[104].upstream||"-")+"")&&k(U,B),oe[0]&16384&&O!==(O=l[104].upstream||"-")&&o(M,"title",O),oe[0]&16777216&&ne!==(ne=l[24]("logs.viewDetail")+"")&&k($,ne)},d(pe){pe&&P(e),re=!1,ee()}}}function p0(t){let l,e;return l=new cb({props:{log:t[19],onClose:t[94]}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r[0]&524288&&(i.log=n[19]),r[0]&1572864&&(i.onClose=n[94]),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function gb(t){let l,e,n,r=t[24]("logs.title")+"",i,u,c,f,d,p,m,g,b,v,w,C,E,y=t[24]("logs.method")+"",T,S,q,D,H,I,R,L,A,N,Z=t[24]("logs.allMethods")+"",Y,x,F,K,M,B,U,O,J,ie,ue,ne,$,te,re,ee,G,pe,oe,ge=t[24]("logs.status")+"",he,ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e=t[24]("logs.statusPlaceholder")+"",Be,De,se,ke,me,Ee,Ve=t[24]("logs.result")+"",Ie,nt,Ne,Ye,Qe,ve,de,Te,Ze,Se,Ue=t[24]("logs.allResults")+"",Ce,mt,Ge,ce,qe=t[24]("logs.success")+"",Re,dt,We,z,He=t[24]("logs.failed")+"",X,ft,Ht,Ke,_t=t[24]("logs.moreFilters")+"",lt,it,ze,Xe,Bt,at,gt,wt,pt,vl,rt,Mt,ht=t[24]("logs.requestTypeFilter")+"",Tt,kl,Ot,hl,ml=t[24]("logs.requestType_all")+"",ql,Jt,Ql=t[24]("logs.requestType_final")+"",Qt,Yt,Hl=t[24]("logs.requestType_retry")+"",Il,gl,ol=t[24]("logs.requestType_recovery")+"",Yl,Ft,Pl,Vl,Jl,El=t[24]("logs.timeRange")+"",zt,Zl,Pt,jl,Ll=t[24]("logs.allTime")+"",$l,xt,wl=t[24]("logs.recentTime")+"",es,Fl,Bl=t[24]("logs.customTime")+"",Wl,Ps,nl,yl,rl,zl,al,_l,ll,Dl=t[24]("logs.sortBy")+"",Nl,Tl,Wt,It,jt,$t=t[24]("logs.sortByTimestamp")+"",el,Kt,Zt=t[24]("logs.sortByDuration")+"",il,Xt,$e=t[24]("logs.sortByStatus")+"",Al,ts,Xl,xl,ls=t[24]("logs.desc")+"",Ds,ss,zs=t[24]("logs.asc")+"",ul,Nt,ot,ct,sl,Ml,fl,xe,vt,cl,cr,_f,qo,Co,Mr,Ho,Sr,Rr=t[24]("logs.autoRefresh")+"",qi,bf,Eo,vf,kf,Ns,Us,Po,wf,Hi,qr=t[24]("common.refresh")+"",Pi,yf,jo,io,uo,Lo,Cf,ji,Hr=t[24]("logs.export")+"",Li,Ef,fo,Di,Pr,Tf,Ii,jr,Mf,Sf,Is,Do,js,co,Io,Rf,Lr=t[24]("logs.filters")+"",Bi,qf,Dr,Hf,Bo,dl,Ao,Ir,Br,Ar=t[24]("logs.method")+"",Ai,Pf,Es,Oo,Or=t[24]("logs.allMethods")+"",Oi,Fo,zo,No,Uo,Vo,jf,Jo,Fr,zr,Nr=t[24]("logs.status")+"",Fi,Lf,oo,Df,Wo,Ur,Vr,Jr=t[24]("logs.result")+"",zi,If,Vs,Go,Wr=t[24]("logs.allResults")+"",Ni,Ko,Gr=t[24]("logs.success")+"",Ui,Qo,Kr=t[24]("logs.failed")+"",Vi,Bf,Ji,Af,Yo,Qr,Yr,Zr=t[24]("logs.requestTypeFilter")+"",Wi,Of,Bs,Zo,Xr=t[24]("logs.requestType_all")+"",Gi,Xo,xr=t[24]("logs.requestType_final")+"",Ki,xo,$r=t[24]("logs.requestType_retry")+"",Qi,$o,ea=t[24]("logs.requestType_recovery")+"",Yi,Ff,en,ta,la,sa=t[24]("logs.timeRange")+"",Zi,zf,Js,tn,oa=t[24]("logs.allTime")+"",Xi,ln,na=t[24]("logs.recentTime")+"",xi,sn,ra=t[24]("logs.customTime")+"",$i,Nf,eu,tu,lu,Uf,on,aa,ia,ua=t[24]("logs.sortBy")+"",su,Vf,nn,Ws,rn,fa=t[24]("logs.sortByTimestamp")+"",ou,an,ca=t[24]("logs.sortByDuration")+"",nu,un,da=t[24]("logs.sortByStatus")+"",ru,Jf,no,fn,pa=t[24]("logs.desc")+"",au,cn,ha=t[24]("logs.asc")+"",iu,Wf,dn,po,Gs,pn,Gf,ma=t[24]("common.refresh")+"",uu,Kf,hn,os,ga,mn,_a,ba=t[24]("logs.autoRefresh")+"",fu,Qf,To,Yf,cu,du,Zf,Ks,Qs,gn,Xf,va=t[24]("common.refresh")+"",pu,xf,$f,_n,ho,mo,bn,e1,ka=t[24]("logs.export")+"",hu,t1,go,mu,wa,l1,gu,ya,s1,o1,Ca,vn,As,_o,kn,n1,Ea=t[24]("logs.actions")+"",_u,r1,a1,wn,qt,Ta,Ma=t[24]("logs.filters")+"",bu,i1,yn,Sa,Ra,qa=t[24]("logs.method")+"",vu,u1,Ts,Cn,Ha=t[24]("logs.allMethods")+"",ku,En,Tn,Mn,Sn,Rn,f1,qn,Pa,ja,La=t[24]("logs.status")+"",wu,c1,ro,d1,Hn,Da,Ia,Ba=t[24]("logs.result")+"",yu,p1,Ys,Pn,Aa=t[24]("logs.allResults")+"",Cu,jn,Oa=t[24]("logs.success")+"",Eu,Ln,Fa=t[24]("logs.failed")+"",Tu,h1,Dn,za,Na,Ua=t[24]("logs.requestTypeFilter")+"",Mu,m1,Os,In,Va=t[24]("logs.requestType_all")+"",Su,Bn,Ja=t[24]("logs.requestType_final")+"",Ru,An,Wa=t[24]("logs.requestType_retry")+"",qu,On,Ga=t[24]("logs.requestType_recovery")+"",Hu,g1,Fn,Ka,Qa,Ya=t[24]("logs.timeRange")+"",Pu,_1,Zs,zn,Za=t[24]("logs.allTime")+"",ju,Nn,Xa=t[24]("logs.recentTime")+"",Lu,Un,xa=t[24]("logs.customTime")+"",Du,b1,Iu,Bu,Vn,$a,ei,ti=t[24]("logs.sortBy")+"",Au,v1,Jn,Xs,Wn,li=t[24]("logs.sortByTimestamp")+"",Ou,Gn,si=t[24]("logs.sortByDuration")+"",Fu,Kn,oi=t[24]("logs.sortByStatus")+"",zu,k1,ao,Qn,ni=t[24]("logs.desc")+"",Nu,Yn,ri=t[24]("logs.asc")+"",Uu,w1,Vu,y1,ai,ii=t[24]("common.refresh")+"",Ju,C1,ui,Zn,fi,ci=t[24]("logs.autoRefresh")+"",Wu,E1,Mo,T1,Gu,xs,$s,Xn,M1,di=t[24]("common.refresh")+"",Ku,S1,Qu,R1,xn,$n,q1,er,H1,P1,j1,Yu,dr,Ae,Zu,L1,ns=t[22]&&Ip(t),Ms=t[2]&&Bp(),Ss=t[3]&&Ap(),Rs=t[4]!==void 0&&Op(),rs=(t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc")&&Fp(t),as=t[8]==="recent"&&zp(t),is=t[8]==="custom"&&Np(t),us=t[12]&&Up(t),fs=t[12]&&Vp(t),cs=t[23]>0&&Jp(t),ds=(t[2]||t[3]||t[4]!==void 0||t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc")&&Wp(t),ps=t[8]==="recent"&&Gp(t),hs=t[8]==="custom"&&Kp(t),ms=t[12]&&Qp(t),gs=t[21]>0&&Yp(t),_s=t[23]>0&&Zp(t),qs=(t[2]||t[3]||t[4]!==void 0||t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc"||t[12])&&Xp(),bs=t[8]==="recent"&&xp(t),vs=t[8]==="custom"&&$p(t),ks=t[12]&&e0(t),ws=t[23]>0&&t0(t),ys=t[23]>0&&l0(t);function D1(W,be){return W[17]&&W[14].length===0?mb:W[18]?hb:W[14].length===0?pb:db}let pi=D1(t),eo=pi(t),Ol=t[20]&&t[19]&&p0(t);return{c(){l=a("div"),e=a("div"),n=a("h1"),i=_(r),u=h(),ns&&ns.c(),c=h(),f=a("div"),d=a("div"),p=a("div"),m=a("input"),b=h(),v=a("div"),w=a("div"),C=a("div"),E=a("div"),T=_(y),S=h(),Ms&&Ms.c(),q=h(),D=ae("svg"),H=ae("path"),R=h(),L=a("ul"),A=a("li"),N=a("button"),Y=_(Z),x=h(),F=a("li"),K=a("button"),K.textContent="GET",M=h(),B=a("li"),U=a("button"),U.textContent="POST",O=h(),J=a("li"),ie=a("button"),ie.textContent="PUT",ue=h(),ne=a("li"),$=a("button"),$.textContent="DELETE",te=h(),re=a("li"),ee=a("button"),ee.textContent="PATCH",G=h(),pe=a("div"),oe=a("div"),he=_(ge),ye=h(),Ss&&Ss.c(),Fe=h(),je=ae("svg"),we=ae("path"),Je=h(),Le=a("div"),Pe=a("div"),Me=a("div"),fe=a("span"),Be=_(_e),De=h(),se=a("input"),ke=h(),me=a("div"),Ee=a("div"),Ie=_(Ve),nt=h(),Rs&&Rs.c(),Ne=h(),Ye=ae("svg"),Qe=ae("path"),de=h(),Te=a("ul"),Ze=a("li"),Se=a("button"),Ce=_(Ue),mt=h(),Ge=a("li"),ce=a("button"),Re=_(qe),dt=h(),We=a("li"),z=a("button"),X=_(He),ft=h(),Ht=a("div"),Ke=a("div"),lt=_(_t),it=h(),rs&&rs.c(),ze=h(),Xe=ae("svg"),Bt=ae("path"),gt=h(),wt=a("div"),pt=a("div"),vl=a("div"),rt=a("div"),Mt=a("span"),Tt=_(ht),kl=h(),Ot=a("select"),hl=a("option"),ql=_(ml),Jt=a("option"),Qt=_(Ql),Yt=a("option"),Il=_(Hl),gl=a("option"),Yl=_(ol),Ft=h(),Pl=a("div"),Vl=a("div"),Jl=a("span"),zt=_(El),Zl=h(),Pt=a("select"),jl=a("option"),$l=_(Ll),xt=a("option"),es=_(wl),Fl=a("option"),Wl=_(Bl),Ps=h(),as&&as.c(),nl=h(),is&&is.c(),yl=h(),rl=a("div"),zl=h(),al=a("div"),_l=a("div"),ll=a("span"),Nl=_(Dl),Tl=h(),Wt=a("div"),It=a("select"),jt=a("option"),el=_($t),Kt=a("option"),il=_(Zt),Xt=a("option"),Al=_($e),ts=h(),Xl=a("select"),xl=a("option"),Ds=_(ls),ss=a("option"),ul=_(zs),Nt=h(),ot=a("div"),ct=h(),sl=a("div"),Ml=a("div"),fl=a("div"),xe=ae("svg"),vt=ae("path"),cl=ae("path"),cr=h(),us&&us.c(),_f=h(),qo=a("div"),Co=a("div"),Mr=a("div"),Ho=a("label"),Sr=a("span"),qi=_(Rr),bf=h(),Eo=a("input"),vf=h(),fs&&fs.c(),kf=h(),Ns=a("button"),Us=ae("svg"),Po=ae("path"),wf=h(),Hi=a("span"),Pi=_(qr),yf=h(),jo=a("div"),io=a("div"),uo=ae("svg"),Lo=ae("path"),Cf=h(),ji=a("span"),Li=_(Hr),Ef=h(),fo=a("ul"),Di=a("li"),Pr=a("button"),Pr.textContent="JSON",Tf=h(),Ii=a("li"),jr=a("button"),jr.textContent="CSV",Mf=h(),cs&&cs.c(),Sf=h(),Is=a("div"),Do=a("div"),js=a("div"),co=ae("svg"),Io=ae("path"),Rf=h(),Bi=_(Lr),qf=h(),ds&&ds.c(),Hf=h(),Bo=a("div"),dl=a("div"),Ao=a("div"),Ir=a("div"),Br=a("span"),Ai=_(Ar),Pf=h(),Es=a("select"),Oo=a("option"),Oi=_(Or),Fo=a("option"),Fo.textContent="GET",zo=a("option"),zo.textContent="POST",No=a("option"),No.textContent="PUT",Uo=a("option"),Uo.textContent="DELETE",Vo=a("option"),Vo.textContent="PATCH",jf=h(),Jo=a("div"),Fr=a("div"),zr=a("span"),Fi=_(Nr),Lf=h(),oo=a("input"),Df=h(),Wo=a("div"),Ur=a("div"),Vr=a("span"),zi=_(Jr),If=h(),Vs=a("select"),Go=a("option"),Ni=_(Wr),Ko=a("option"),Ui=_(Gr),Qo=a("option"),Vi=_(Kr),Bf=h(),Ji=a("div"),Af=h(),Yo=a("div"),Qr=a("div"),Yr=a("span"),Wi=_(Zr),Of=h(),Bs=a("select"),Zo=a("option"),Gi=_(Xr),Xo=a("option"),Ki=_(xr),xo=a("option"),Qi=_($r),$o=a("option"),Yi=_(ea),Ff=h(),en=a("div"),ta=a("div"),la=a("span"),Zi=_(sa),zf=h(),Js=a("select"),tn=a("option"),Xi=_(oa),ln=a("option"),xi=_(na),sn=a("option"),$i=_(ra),Nf=h(),ps&&ps.c(),eu=h(),hs&&hs.c(),tu=h(),lu=a("div"),Uf=h(),on=a("div"),aa=a("div"),ia=a("span"),su=_(ua),Vf=h(),nn=a("div"),Ws=a("select"),rn=a("option"),ou=_(fa),an=a("option"),nu=_(ca),un=a("option"),ru=_(da),Jf=h(),no=a("select"),fn=a("option"),au=_(pa),cn=a("option"),iu=_(ha),Wf=h(),dn=a("div"),po=a("div"),Gs=ae("svg"),pn=ae("path"),Gf=h(),uu=_(ma),Kf=h(),hn=a("div"),os=a("div"),ga=a("div"),mn=a("label"),_a=a("span"),fu=_(ba),Qf=h(),To=a("input"),Yf=h(),ms&&ms.c(),cu=h(),du=a("div"),Zf=h(),Ks=a("button"),Qs=ae("svg"),gn=ae("path"),Xf=h(),pu=_(va),xf=h(),gs&&gs.c(),$f=h(),_n=a("div"),ho=a("div"),mo=ae("svg"),bn=ae("path"),e1=h(),hu=_(ka),t1=h(),go=a("ul"),mu=a("li"),wa=a("button"),wa.textContent="JSON",l1=h(),gu=a("li"),ya=a("button"),ya.textContent="CSV",s1=h(),_s&&_s.c(),o1=h(),Ca=a("div"),vn=a("div"),As=a("div"),_o=ae("svg"),kn=ae("path"),n1=h(),_u=_(Ea),r1=h(),qs&&qs.c(),a1=h(),wn=a("div"),qt=a("div"),Ta=a("h3"),bu=_(Ma),i1=h(),yn=a("div"),Sa=a("div"),Ra=a("span"),vu=_(qa),u1=h(),Ts=a("select"),Cn=a("option"),ku=_(Ha),En=a("option"),En.textContent="GET",Tn=a("option"),Tn.textContent="POST",Mn=a("option"),Mn.textContent="PUT",Sn=a("option"),Sn.textContent="DELETE",Rn=a("option"),Rn.textContent="PATCH",f1=h(),qn=a("div"),Pa=a("div"),ja=a("span"),wu=_(La),c1=h(),ro=a("input"),d1=h(),Hn=a("div"),Da=a("div"),Ia=a("span"),yu=_(Ba),p1=h(),Ys=a("select"),Pn=a("option"),Cu=_(Aa),jn=a("option"),Eu=_(Oa),Ln=a("option"),Tu=_(Fa),h1=h(),Dn=a("div"),za=a("div"),Na=a("span"),Mu=_(Ua),m1=h(),Os=a("select"),In=a("option"),Su=_(Va),Bn=a("option"),Ru=_(Ja),An=a("option"),qu=_(Wa),On=a("option"),Hu=_(Ga),g1=h(),Fn=a("div"),Ka=a("div"),Qa=a("span"),Pu=_(Ya),_1=h(),Zs=a("select"),zn=a("option"),ju=_(Za),Nn=a("option"),Lu=_(Xa),Un=a("option"),Du=_(xa),b1=h(),bs&&bs.c(),Iu=h(),vs&&vs.c(),Bu=h(),Vn=a("div"),$a=a("div"),ei=a("span"),Au=_(ti),v1=h(),Jn=a("div"),Xs=a("select"),Wn=a("option"),Ou=_(li),Gn=a("option"),Fu=_(si),Kn=a("option"),zu=_(oi),k1=h(),ao=a("select"),Qn=a("option"),Nu=_(ni),Yn=a("option"),Uu=_(ri),w1=h(),Vu=a("div"),y1=h(),ai=a("h3"),Ju=_(ii),C1=h(),ui=a("div"),Zn=a("label"),fi=a("span"),Wu=_(ci),E1=h(),Mo=a("input"),T1=h(),ks&&ks.c(),Gu=h(),xs=a("button"),$s=ae("svg"),Xn=ae("path"),M1=h(),Ku=_(di),S1=h(),Qu=a("div"),R1=h(),xn=a("div"),$n=a("button"),$n.textContent="JSON",q1=h(),er=a("button"),er.textContent="CSV",H1=h(),ws&&ws.c(),P1=h(),ys&&ys.c(),j1=h(),eo.c(),Yu=h(),Ol&&Ol.c(),dr=Ul(),o(n,"class","text-2xl lg:text-3xl font-bold"),o(e,"class","mb-6"),o(m,"type","text"),o(m,"placeholder",g=t[24]("logs.searchPlaceholder")),o(m,"class","input input-bordered input-sm w-full"),o(p,"class","flex-1 min-w-[200px] xl:max-w-md"),o(H,"stroke-linecap","round"),o(H,"stroke-linejoin","round"),o(H,"stroke-width","2"),o(H,"d","M19 9l-7 7-7-7"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-3 w-3"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(E,"role","button"),o(E,"tabindex","0"),o(E,"class",I="btn btn-sm "+(t[2]?"btn-primary":"btn-ghost")+" gap-1"),le(K,"active",t[2]==="GET"),le(U,"active",t[2]==="POST"),le(ie,"active",t[2]==="PUT"),le($,"active",t[2]==="DELETE"),le(ee,"active",t[2]==="PATCH"),o(L,"role","menu"),o(L,"tabindex","0"),o(L,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(C,"class","dropdown dropdown-end"),o(we,"stroke-linecap","round"),o(we,"stroke-linejoin","round"),o(we,"stroke-width","2"),o(we,"d","M19 9l-7 7-7-7"),o(je,"xmlns","http://www.w3.org/2000/svg"),o(je,"class","h-3 w-3"),o(je,"fill","none"),o(je,"viewBox","0 0 24 24"),o(je,"stroke","currentColor"),o(oe,"role","button"),o(oe,"tabindex","0"),o(oe,"class",Oe="btn btn-sm "+(t[3]?"btn-primary":"btn-ghost")+" gap-1"),o(fe,"class","label-text text-xs"),o(Me,"class","label py-1"),o(se,"type","text"),o(se,"placeholder","200, 404, 500"),o(se,"class","input input-bordered input-sm"),o(Pe,"class","form-control"),o(Le,"role","menu"),o(Le,"tabindex","0"),o(Le,"class","dropdown-content bg-base-100 rounded-box p-3 shadow-lg w-48 z-[1]"),o(pe,"class","dropdown dropdown-end"),o(Qe,"stroke-linecap","round"),o(Qe,"stroke-linejoin","round"),o(Qe,"stroke-width","2"),o(Qe,"d","M19 9l-7 7-7-7"),o(Ye,"xmlns","http://www.w3.org/2000/svg"),o(Ye,"class","h-3 w-3"),o(Ye,"fill","none"),o(Ye,"viewBox","0 0 24 24"),o(Ye,"stroke","currentColor"),o(Ee,"role","button"),o(Ee,"tabindex","0"),o(Ee,"class",ve="btn btn-sm "+(t[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"),le(ce,"active",t[4]===!0),le(z,"active",t[4]===!1),o(Te,"role","menu"),o(Te,"tabindex","0"),o(Te,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(me,"class","dropdown dropdown-end"),o(Bt,"stroke-linecap","round"),o(Bt,"stroke-linejoin","round"),o(Bt,"stroke-width","2"),o(Bt,"d","M19 9l-7 7-7-7"),o(Xe,"xmlns","http://www.w3.org/2000/svg"),o(Xe,"class","h-3 w-3"),o(Xe,"fill","none"),o(Xe,"viewBox","0 0 24 24"),o(Xe,"stroke","currentColor"),o(Ke,"role","button"),o(Ke,"tabindex","0"),o(Ke,"class",at="btn btn-sm "+(t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(Mt,"class","label-text text-xs font-semibold"),o(rt,"class","label py-1"),hl.__value="",Q(hl,hl.__value),Jt.__value="final",Q(Jt,Jt.__value),Yt.__value="retry",Q(Yt,Yt.__value),gl.__value="recovery",Q(gl,gl.__value),o(Ot,"class","select select-bordered select-sm"),t[5]===void 0&&tl(()=>t[43].call(Ot)),o(vl,"class","form-control"),o(Jl,"class","label-text text-xs font-semibold"),o(Vl,"class","label py-1"),jl.__value="all",Q(jl,jl.__value),xt.__value="recent",Q(xt,xt.__value),Fl.__value="custom",Q(Fl,Fl.__value),o(Pt,"class","select select-bordered select-sm"),t[8]===void 0&&tl(()=>t[44].call(Pt)),o(Pl,"class","form-control"),o(rl,"class","divider my-2"),o(ll,"class","label-text text-xs font-semibold"),o(_l,"class","label py-1"),jt.__value="timestamp",Q(jt,jt.__value),Kt.__value="duration",Q(Kt,Kt.__value),Xt.__value="status",Q(Xt,Xt.__value),o(It,"class","select select-bordered select-sm flex-1"),t[6]===void 0&&tl(()=>t[48].call(It)),xl.__value="desc",Q(xl,xl.__value),ss.__value="asc",Q(ss,ss.__value),o(Xl,"class","select select-bordered select-sm w-24"),t[7]===void 0&&tl(()=>t[49].call(Xl)),o(Wt,"class","flex gap-2"),o(al,"class","form-control"),o(pt,"class","space-y-3"),o(wt,"role","menu"),o(wt,"tabindex","0"),o(wt,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Ht,"class","dropdown dropdown-end"),o(w,"class","flex items-center gap-2 flex-wrap"),o(ot,"class","flex-1"),o(vt,"stroke-linecap","round"),o(vt,"stroke-linejoin","round"),o(vt,"stroke-width","2"),o(vt,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(cl,"stroke-linecap","round"),o(cl,"stroke-linejoin","round"),o(cl,"stroke-width","2"),o(cl,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(xe,"xmlns","http://www.w3.org/2000/svg"),o(xe,"class","h-4 w-4"),o(xe,"fill","none"),o(xe,"viewBox","0 0 24 24"),o(xe,"stroke","currentColor"),o(fl,"role","button"),o(fl,"tabindex","0"),o(fl,"class","btn btn-sm btn-outline gap-1"),o(Sr,"class","label-text"),o(Eo,"type","checkbox"),o(Eo,"class","toggle toggle-primary toggle-sm"),o(Ho,"class","label cursor-pointer"),o(Mr,"class","form-control"),o(Co,"class","space-y-3"),o(qo,"role","menu"),o(qo,"tabindex","0"),o(qo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-64 z-[1]"),o(Ml,"class","dropdown dropdown-end"),o(Po,"stroke-linecap","round"),o(Po,"stroke-linejoin","round"),o(Po,"stroke-width","2"),o(Po,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Us,"xmlns","http://www.w3.org/2000/svg"),o(Us,"class","h-4 w-4"),o(Us,"fill","none"),o(Us,"viewBox","0 0 24 24"),o(Us,"stroke","currentColor"),le(Us,"animate-spin",t[17]),o(Ns,"type","button"),o(Ns,"class","btn btn-sm btn-outline gap-2"),Ns.disabled=t[17],o(Lo,"stroke-linecap","round"),o(Lo,"stroke-linejoin","round"),o(Lo,"stroke-width","2"),o(Lo,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(uo,"xmlns","http://www.w3.org/2000/svg"),o(uo,"class","h-4 w-4"),o(uo,"fill","none"),o(uo,"viewBox","0 0 24 24"),o(uo,"stroke","currentColor"),o(io,"role","button"),o(io,"tabindex","0"),o(io,"class","btn btn-sm btn-secondary gap-2"),o(fo,"role","menu"),o(fo,"tabindex","0"),o(fo,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(jo,"class","dropdown dropdown-end"),o(sl,"class","flex items-center gap-2 flex-wrap"),o(v,"class","hidden xl:flex items-center gap-2 flex-wrap flex-1"),o(Io,"stroke-linecap","round"),o(Io,"stroke-linejoin","round"),o(Io,"stroke-width","2"),o(Io,"d","M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"),o(co,"xmlns","http://www.w3.org/2000/svg"),o(co,"class","h-4 w-4"),o(co,"fill","none"),o(co,"viewBox","0 0 24 24"),o(co,"stroke","currentColor"),o(js,"role","button"),o(js,"tabindex","0"),o(js,"class",Dr="btn btn-sm "+(t[2]||t[3]||t[4]!==void 0||t[5]||t[8]!=="recent"||t[9]!==1||t[6]!=="timestamp"||t[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(Br,"class","label-text text-xs font-semibold"),o(Ir,"class","label py-1"),Oo.__value="",Q(Oo,Oo.__value),Fo.__value="GET",Q(Fo,Fo.__value),zo.__value="POST",Q(zo,zo.__value),No.__value="PUT",Q(No,No.__value),Uo.__value="DELETE",Q(Uo,Uo.__value),Vo.__value="PATCH",Q(Vo,Vo.__value),o(Es,"class","select select-bordered select-sm"),t[2]===void 0&&tl(()=>t[54].call(Es)),o(Ao,"class","form-control"),o(zr,"class","label-text text-xs font-semibold"),o(Fr,"class","label py-1"),o(oo,"type","text"),o(oo,"placeholder","200, 404, 500"),o(oo,"class","input input-bordered input-sm"),o(Jo,"class","form-control"),o(Vr,"class","label-text text-xs font-semibold"),o(Ur,"class","label py-1"),Go.__value=void 0,Q(Go,Go.__value),Ko.__value=!0,Q(Ko,Ko.__value),Qo.__value=!1,Q(Qo,Qo.__value),o(Vs,"class","select select-bordered select-sm"),t[4]===void 0&&tl(()=>t[56].call(Vs)),o(Wo,"class","form-control"),o(Ji,"class","divider my-2"),o(Yr,"class","label-text text-xs font-semibold"),o(Qr,"class","label py-1"),Zo.__value="",Q(Zo,Zo.__value),Xo.__value="final",Q(Xo,Xo.__value),xo.__value="retry",Q(xo,xo.__value),$o.__value="recovery",Q($o,$o.__value),o(Bs,"class","select select-bordered select-sm"),t[5]===void 0&&tl(()=>t[57].call(Bs)),o(Yo,"class","form-control"),o(la,"class","label-text text-xs font-semibold"),o(ta,"class","label py-1"),tn.__value="all",Q(tn,tn.__value),ln.__value="recent",Q(ln,ln.__value),sn.__value="custom",Q(sn,sn.__value),o(Js,"class","select select-bordered select-sm"),t[8]===void 0&&tl(()=>t[58].call(Js)),o(en,"class","form-control"),o(lu,"class","divider my-2"),o(ia,"class","label-text text-xs font-semibold"),o(aa,"class","label py-1"),rn.__value="timestamp",Q(rn,rn.__value),an.__value="duration",Q(an,an.__value),un.__value="status",Q(un,un.__value),o(Ws,"class","select select-bordered select-sm flex-1"),t[6]===void 0&&tl(()=>t[62].call(Ws)),fn.__value="desc",Q(fn,fn.__value),cn.__value="asc",Q(cn,cn.__value),o(no,"class","select select-bordered select-sm w-24"),t[7]===void 0&&tl(()=>t[63].call(no)),o(nn,"class","flex gap-2"),o(on,"class","form-control"),o(dl,"class","space-y-3"),o(Bo,"role","menu"),o(Bo,"tabindex","0"),o(Bo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Do,"class","dropdown dropdown-end"),o(pn,"stroke-linecap","round"),o(pn,"stroke-linejoin","round"),o(pn,"stroke-width","2"),o(pn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Gs,"xmlns","http://www.w3.org/2000/svg"),o(Gs,"class","h-4 w-4"),o(Gs,"fill","none"),o(Gs,"viewBox","0 0 24 24"),o(Gs,"stroke","currentColor"),le(Gs,"animate-spin",t[17]),o(po,"role","button"),o(po,"tabindex","0"),o(po,"class","btn btn-sm btn-ghost gap-2"),o(_a,"class","label-text"),o(To,"type","checkbox"),o(To,"class","toggle toggle-primary toggle-sm"),o(mn,"class","label cursor-pointer"),o(ga,"class","form-control"),o(du,"class","divider my-2"),o(gn,"stroke-linecap","round"),o(gn,"stroke-linejoin","round"),o(gn,"stroke-width","2"),o(gn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Qs,"xmlns","http://www.w3.org/2000/svg"),o(Qs,"class","h-4 w-4"),o(Qs,"fill","none"),o(Qs,"viewBox","0 0 24 24"),o(Qs,"stroke","currentColor"),le(Qs,"animate-spin",t[17]),o(Ks,"type","button"),o(Ks,"class","btn btn-sm btn-primary w-full gap-2"),Ks.disabled=t[17],o(os,"class","space-y-3"),o(hn,"role","menu"),o(hn,"tabindex","0"),o(hn,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-72 z-[1]"),o(dn,"class","dropdown dropdown-end"),o(bn,"stroke-linecap","round"),o(bn,"stroke-linejoin","round"),o(bn,"stroke-width","2"),o(bn,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(mo,"xmlns","http://www.w3.org/2000/svg"),o(mo,"class","h-4 w-4"),o(mo,"fill","none"),o(mo,"viewBox","0 0 24 24"),o(mo,"stroke","currentColor"),o(ho,"role","button"),o(ho,"tabindex","0"),o(ho,"class","btn btn-sm btn-secondary gap-2"),o(go,"role","menu"),o(go,"tabindex","0"),o(go,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(_n,"class","dropdown dropdown-end"),o(Is,"class","hidden md:flex xl:hidden items-center gap-2"),o(kn,"stroke-linecap","round"),o(kn,"stroke-linejoin","round"),o(kn,"stroke-width","2"),o(kn,"d","M4 6h16M4 12h16M4 18h16"),o(_o,"xmlns","http://www.w3.org/2000/svg"),o(_o,"class","h-4 w-4"),o(_o,"fill","none"),o(_o,"viewBox","0 0 24 24"),o(_o,"stroke","currentColor"),o(As,"role","button"),o(As,"tabindex","0"),o(As,"class","btn btn-sm btn-ghost gap-1"),o(Ta,"class","font-semibold text-sm"),o(Ra,"class","label-text text-xs font-semibold"),o(Sa,"class","label py-1"),Cn.__value="",Q(Cn,Cn.__value),En.__value="GET",Q(En,En.__value),Tn.__value="POST",Q(Tn,Tn.__value),Mn.__value="PUT",Q(Mn,Mn.__value),Sn.__value="DELETE",Q(Sn,Sn.__value),Rn.__value="PATCH",Q(Rn,Rn.__value),o(Ts,"class","select select-bordered select-sm"),t[2]===void 0&&tl(()=>t[68].call(Ts)),o(yn,"class","form-control"),o(ja,"class","label-text text-xs font-semibold"),o(Pa,"class","label py-1"),o(ro,"type","text"),o(ro,"placeholder","200, 404, 500"),o(ro,"class","input input-bordered input-sm"),o(qn,"class","form-control"),o(Ia,"class","label-text text-xs font-semibold"),o(Da,"class","label py-1"),Pn.__value=void 0,Q(Pn,Pn.__value),jn.__value=!0,Q(jn,jn.__value),Ln.__value=!1,Q(Ln,Ln.__value),o(Ys,"class","select select-bordered select-sm"),t[4]===void 0&&tl(()=>t[70].call(Ys)),o(Hn,"class","form-control"),o(Na,"class","label-text text-xs font-semibold"),o(za,"class","label py-1"),In.__value="",Q(In,In.__value),Bn.__value="final",Q(Bn,Bn.__value),An.__value="retry",Q(An,An.__value),On.__value="recovery",Q(On,On.__value),o(Os,"class","select select-bordered select-sm"),t[5]===void 0&&tl(()=>t[71].call(Os)),o(Dn,"class","form-control"),o(Qa,"class","label-text text-xs font-semibold"),o(Ka,"class","label py-1"),zn.__value="all",Q(zn,zn.__value),Nn.__value="recent",Q(Nn,Nn.__value),Un.__value="custom",Q(Un,Un.__value),o(Zs,"class","select select-bordered select-sm"),t[8]===void 0&&tl(()=>t[72].call(Zs)),o(Fn,"class","form-control"),o(ei,"class","label-text text-xs font-semibold"),o($a,"class","label py-1"),Wn.__value="timestamp",Q(Wn,Wn.__value),Gn.__value="duration",Q(Gn,Gn.__value),Kn.__value="status",Q(Kn,Kn.__value),o(Xs,"class","select select-bordered select-sm flex-1"),t[6]===void 0&&tl(()=>t[76].call(Xs)),Qn.__value="desc",Q(Qn,Qn.__value),Yn.__value="asc",Q(Yn,Yn.__value),o(ao,"class","select select-bordered select-sm w-24"),t[7]===void 0&&tl(()=>t[77].call(ao)),o(Jn,"class","flex gap-2"),o(Vn,"class","form-control"),o(Vu,"class","divider my-2"),o(ai,"class","font-semibold text-sm"),o(fi,"class","label-text"),o(Mo,"type","checkbox"),o(Mo,"class","toggle toggle-primary toggle-sm"),o(Zn,"class","label cursor-pointer"),o(ui,"class","form-control"),o(Xn,"stroke-linecap","round"),o(Xn,"stroke-linejoin","round"),o(Xn,"stroke-width","2"),o(Xn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o($s,"xmlns","http://www.w3.org/2000/svg"),o($s,"class","h-4 w-4"),o($s,"fill","none"),o($s,"viewBox","0 0 24 24"),o($s,"stroke","currentColor"),le($s,"animate-spin",t[17]),o(xs,"type","button"),o(xs,"class","btn btn-sm btn-primary w-full gap-2"),xs.disabled=t[17],o(Qu,"class","divider my-2"),o($n,"type","button"),o($n,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(er,"type","button"),o(er,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(xn,"class","flex gap-2"),o(qt,"class","space-y-3"),o(wn,"role","menu"),o(wn,"tabindex","0"),o(wn,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(vn,"class","dropdown dropdown-end"),o(Ca,"class","flex md:hidden items-center gap-2"),o(d,"class","flex items-center gap-2 mb-3"),o(f,"class","mb-6"),o(l,"class","p-6")},m(W,be){j(W,l,be),s(l,e),s(e,n),s(n,i),s(l,u),ns&&ns.m(l,null),s(l,c),s(l,f),s(f,d),s(d,p),s(p,m),Q(m,t[1]),s(d,b),s(d,v),s(v,w),s(w,C),s(C,E),s(E,T),s(E,S),Ms&&Ms.m(E,null),s(E,q),s(E,D),s(D,H),s(C,R),s(C,L),s(L,A),s(A,N),s(N,Y),s(L,x),s(L,F),s(F,K),s(L,M),s(L,B),s(B,U),s(L,O),s(L,J),s(J,ie),s(L,ue),s(L,ne),s(ne,$),s(L,te),s(L,re),s(re,ee),s(w,G),s(w,pe),s(pe,oe),s(oe,he),s(oe,ye),Ss&&Ss.m(oe,null),s(oe,Fe),s(oe,je),s(je,we),s(pe,Je),s(pe,Le),s(Le,Pe),s(Pe,Me),s(Me,fe),s(fe,Be),s(Pe,De),s(Pe,se),Q(se,t[3]),s(w,ke),s(w,me),s(me,Ee),s(Ee,Ie),s(Ee,nt),Rs&&Rs.m(Ee,null),s(Ee,Ne),s(Ee,Ye),s(Ye,Qe),s(me,de),s(me,Te),s(Te,Ze),s(Ze,Se),s(Se,Ce),s(Te,mt),s(Te,Ge),s(Ge,ce),s(ce,Re),s(Te,dt),s(Te,We),s(We,z),s(z,X),s(w,ft),s(w,Ht),s(Ht,Ke),s(Ke,lt),s(Ke,it),rs&&rs.m(Ke,null),s(Ke,ze),s(Ke,Xe),s(Xe,Bt),s(Ht,gt),s(Ht,wt),s(wt,pt),s(pt,vl),s(vl,rt),s(rt,Mt),s(Mt,Tt),s(vl,kl),s(vl,Ot),s(Ot,hl),s(hl,ql),s(Ot,Jt),s(Jt,Qt),s(Ot,Yt),s(Yt,Il),s(Ot,gl),s(gl,Yl),kt(Ot,t[5],!0),s(pt,Ft),s(pt,Pl),s(Pl,Vl),s(Vl,Jl),s(Jl,zt),s(Pl,Zl),s(Pl,Pt),s(Pt,jl),s(jl,$l),s(Pt,xt),s(xt,es),s(Pt,Fl),s(Fl,Wl),kt(Pt,t[8],!0),s(pt,Ps),as&&as.m(pt,null),s(pt,nl),is&&is.m(pt,null),s(pt,yl),s(pt,rl),s(pt,zl),s(pt,al),s(al,_l),s(_l,ll),s(ll,Nl),s(al,Tl),s(al,Wt),s(Wt,It),s(It,jt),s(jt,el),s(It,Kt),s(Kt,il),s(It,Xt),s(Xt,Al),kt(It,t[6],!0),s(Wt,ts),s(Wt,Xl),s(Xl,xl),s(xl,Ds),s(Xl,ss),s(ss,ul),kt(Xl,t[7],!0),s(v,Nt),s(v,ot),s(v,ct),s(v,sl),s(sl,Ml),s(Ml,fl),s(fl,xe),s(xe,vt),s(xe,cl),s(fl,cr),us&&us.m(fl,null),s(Ml,_f),s(Ml,qo),s(qo,Co),s(Co,Mr),s(Mr,Ho),s(Ho,Sr),s(Sr,qi),s(Ho,bf),s(Ho,Eo),Eo.checked=t[12],s(Co,vf),fs&&fs.m(Co,null),s(sl,kf),s(sl,Ns),s(Ns,Us),s(Us,Po),s(Ns,wf),s(Ns,Hi),s(Hi,Pi),s(sl,yf),s(sl,jo),s(jo,io),s(io,uo),s(uo,Lo),s(io,Cf),s(io,ji),s(ji,Li),s(jo,Ef),s(jo,fo),s(fo,Di),s(Di,Pr),s(fo,Tf),s(fo,Ii),s(Ii,jr),s(sl,Mf),cs&&cs.m(sl,null),s(d,Sf),s(d,Is),s(Is,Do),s(Do,js),s(js,co),s(co,Io),s(js,Rf),s(js,Bi),s(js,qf),ds&&ds.m(js,null),s(Do,Hf),s(Do,Bo),s(Bo,dl),s(dl,Ao),s(Ao,Ir),s(Ir,Br),s(Br,Ai),s(Ao,Pf),s(Ao,Es),s(Es,Oo),s(Oo,Oi),s(Es,Fo),s(Es,zo),s(Es,No),s(Es,Uo),s(Es,Vo),kt(Es,t[2],!0),s(dl,jf),s(dl,Jo),s(Jo,Fr),s(Fr,zr),s(zr,Fi),s(Jo,Lf),s(Jo,oo),Q(oo,t[3]),s(dl,Df),s(dl,Wo),s(Wo,Ur),s(Ur,Vr),s(Vr,zi),s(Wo,If),s(Wo,Vs),s(Vs,Go),s(Go,Ni),s(Vs,Ko),s(Ko,Ui),s(Vs,Qo),s(Qo,Vi),kt(Vs,t[4],!0),s(dl,Bf),s(dl,Ji),s(dl,Af),s(dl,Yo),s(Yo,Qr),s(Qr,Yr),s(Yr,Wi),s(Yo,Of),s(Yo,Bs),s(Bs,Zo),s(Zo,Gi),s(Bs,Xo),s(Xo,Ki),s(Bs,xo),s(xo,Qi),s(Bs,$o),s($o,Yi),kt(Bs,t[5],!0),s(dl,Ff),s(dl,en),s(en,ta),s(ta,la),s(la,Zi),s(en,zf),s(en,Js),s(Js,tn),s(tn,Xi),s(Js,ln),s(ln,xi),s(Js,sn),s(sn,$i),kt(Js,t[8],!0),s(dl,Nf),ps&&ps.m(dl,null),s(dl,eu),hs&&hs.m(dl,null),s(dl,tu),s(dl,lu),s(dl,Uf),s(dl,on),s(on,aa),s(aa,ia),s(ia,su),s(on,Vf),s(on,nn),s(nn,Ws),s(Ws,rn),s(rn,ou),s(Ws,an),s(an,nu),s(Ws,un),s(un,ru),kt(Ws,t[6],!0),s(nn,Jf),s(nn,no),s(no,fn),s(fn,au),s(no,cn),s(cn,iu),kt(no,t[7],!0),s(Is,Wf),s(Is,dn),s(dn,po),s(po,Gs),s(Gs,pn),s(po,Gf),s(po,uu),s(dn,Kf),s(dn,hn),s(hn,os),s(os,ga),s(ga,mn),s(mn,_a),s(_a,fu),s(mn,Qf),s(mn,To),To.checked=t[12],s(os,Yf),ms&&ms.m(os,null),s(os,cu),s(os,du),s(os,Zf),s(os,Ks),s(Ks,Qs),s(Qs,gn),s(Ks,Xf),s(Ks,pu),s(os,xf),gs&&gs.m(os,null),s(Is,$f),s(Is,_n),s(_n,ho),s(ho,mo),s(mo,bn),s(ho,e1),s(ho,hu),s(_n,t1),s(_n,go),s(go,mu),s(mu,wa),s(go,l1),s(go,gu),s(gu,ya),s(Is,s1),_s&&_s.m(Is,null),s(d,o1),s(d,Ca),s(Ca,vn),s(vn,As),s(As,_o),s(_o,kn),s(As,n1),s(As,_u),s(As,r1),qs&&qs.m(As,null),s(vn,a1),s(vn,wn),s(wn,qt),s(qt,Ta),s(Ta,bu),s(qt,i1),s(qt,yn),s(yn,Sa),s(Sa,Ra),s(Ra,vu),s(yn,u1),s(yn,Ts),s(Ts,Cn),s(Cn,ku),s(Ts,En),s(Ts,Tn),s(Ts,Mn),s(Ts,Sn),s(Ts,Rn),kt(Ts,t[2],!0),s(qt,f1),s(qt,qn),s(qn,Pa),s(Pa,ja),s(ja,wu),s(qn,c1),s(qn,ro),Q(ro,t[3]),s(qt,d1),s(qt,Hn),s(Hn,Da),s(Da,Ia),s(Ia,yu),s(Hn,p1),s(Hn,Ys),s(Ys,Pn),s(Pn,Cu),s(Ys,jn),s(jn,Eu),s(Ys,Ln),s(Ln,Tu),kt(Ys,t[4],!0),s(qt,h1),s(qt,Dn),s(Dn,za),s(za,Na),s(Na,Mu),s(Dn,m1),s(Dn,Os),s(Os,In),s(In,Su),s(Os,Bn),s(Bn,Ru),s(Os,An),s(An,qu),s(Os,On),s(On,Hu),kt(Os,t[5],!0),s(qt,g1),s(qt,Fn),s(Fn,Ka),s(Ka,Qa),s(Qa,Pu),s(Fn,_1),s(Fn,Zs),s(Zs,zn),s(zn,ju),s(Zs,Nn),s(Nn,Lu),s(Zs,Un),s(Un,Du),kt(Zs,t[8],!0),s(qt,b1),bs&&bs.m(qt,null),s(qt,Iu),vs&&vs.m(qt,null),s(qt,Bu),s(qt,Vn),s(Vn,$a),s($a,ei),s(ei,Au),s(Vn,v1),s(Vn,Jn),s(Jn,Xs),s(Xs,Wn),s(Wn,Ou),s(Xs,Gn),s(Gn,Fu),s(Xs,Kn),s(Kn,zu),kt(Xs,t[6],!0),s(Jn,k1),s(Jn,ao),s(ao,Qn),s(Qn,Nu),s(ao,Yn),s(Yn,Uu),kt(ao,t[7],!0),s(qt,w1),s(qt,Vu),s(qt,y1),s(qt,ai),s(ai,Ju),s(qt,C1),s(qt,ui),s(ui,Zn),s(Zn,fi),s(fi,Wu),s(Zn,E1),s(Zn,Mo),Mo.checked=t[12],s(qt,T1),ks&&ks.m(qt,null),s(qt,Gu),s(qt,xs),s(xs,$s),s($s,Xn),s(xs,M1),s(xs,Ku),s(qt,S1),s(qt,Qu),s(qt,R1),s(qt,xn),s(xn,$n),s(xn,q1),s(xn,er),s(qt,H1),ws&&ws.m(qt,null),s(f,P1),ys&&ys.m(f,null),s(l,j1),eo.m(l,null),j(W,Yu,be),Ol&&Ol.m(W,be),j(W,dr,be),Ae=!0,Zu||(L1=[V(m,"input",t[32]),V(N,"click",t[33]),V(K,"click",t[34]),V(U,"click",t[35]),V(ie,"click",t[36]),V($,"click",t[37]),V(ee,"click",t[38]),V(se,"input",t[39]),V(Se,"click",t[40]),V(ce,"click",t[41]),V(z,"click",t[42]),V(Ot,"change",t[43]),V(Pt,"change",t[44]),V(It,"change",t[48]),V(Xl,"change",t[49]),V(Eo,"change",t[50]),V(Ns,"click",t[29]),V(Pr,"click",t[52]),V(jr,"click",t[53]),V(Es,"change",t[54]),V(oo,"input",t[55]),V(Vs,"change",t[56]),V(Bs,"change",t[57]),V(Js,"change",t[58]),V(Ws,"change",t[62]),V(no,"change",t[63]),V(To,"change",t[64]),V(Ks,"click",t[29]),V(wa,"click",t[66]),V(ya,"click",t[67]),V(Ts,"change",t[68]),V(ro,"input",t[69]),V(Ys,"change",t[70]),V(Os,"change",t[71]),V(Zs,"change",t[72]),V(Xs,"change",t[76]),V(ao,"change",t[77]),V(Mo,"change",t[78]),V(xs,"click",t[29]),V($n,"click",t[80]),V(er,"click",t[81])],Zu=!0)},p(W,be){(!Ae||be[0]&16777216)&&r!==(r=W[24]("logs.title")+"")&&k(i,r),W[22]?ns?ns.p(W,be):(ns=Ip(W),ns.c(),ns.m(l,c)):ns&&(ns.d(1),ns=null),(!Ae||be[0]&16777216&&g!==(g=W[24]("logs.searchPlaceholder")))&&o(m,"placeholder",g),be[0]&2&&m.value!==W[1]&&Q(m,W[1]),(!Ae||be[0]&16777216)&&y!==(y=W[24]("logs.method")+"")&&k(T,y),W[2]?Ms||(Ms=Bp(),Ms.c(),Ms.m(E,q)):Ms&&(Ms.d(1),Ms=null),(!Ae||be[0]&4&&I!==(I="btn btn-sm "+(W[2]?"btn-primary":"btn-ghost")+" gap-1"))&&o(E,"class",I),(!Ae||be[0]&16777216)&&Z!==(Z=W[24]("logs.allMethods")+"")&&k(Y,Z),(!Ae||be[0]&4)&&le(K,"active",W[2]==="GET"),(!Ae||be[0]&4)&&le(U,"active",W[2]==="POST"),(!Ae||be[0]&4)&&le(ie,"active",W[2]==="PUT"),(!Ae||be[0]&4)&&le($,"active",W[2]==="DELETE"),(!Ae||be[0]&4)&&le(ee,"active",W[2]==="PATCH"),(!Ae||be[0]&16777216)&&ge!==(ge=W[24]("logs.status")+"")&&k(he,ge),W[3]?Ss||(Ss=Ap(),Ss.c(),Ss.m(oe,Fe)):Ss&&(Ss.d(1),Ss=null),(!Ae||be[0]&8&&Oe!==(Oe="btn btn-sm "+(W[3]?"btn-primary":"btn-ghost")+" gap-1"))&&o(oe,"class",Oe),(!Ae||be[0]&16777216)&&_e!==(_e=W[24]("logs.statusPlaceholder")+"")&&k(Be,_e),be[0]&8&&se.value!==W[3]&&Q(se,W[3]),(!Ae||be[0]&16777216)&&Ve!==(Ve=W[24]("logs.result")+"")&&k(Ie,Ve),W[4]!==void 0?Rs||(Rs=Op(),Rs.c(),Rs.m(Ee,Ne)):Rs&&(Rs.d(1),Rs=null),(!Ae||be[0]&16&&ve!==(ve="btn btn-sm "+(W[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ee,"class",ve),(!Ae||be[0]&16777216)&&Ue!==(Ue=W[24]("logs.allResults")+"")&&k(Ce,Ue),(!Ae||be[0]&16777216)&&qe!==(qe=W[24]("logs.success")+"")&&k(Re,qe),(!Ae||be[0]&16)&&le(ce,"active",W[4]===!0),(!Ae||be[0]&16777216)&&He!==(He=W[24]("logs.failed")+"")&&k(X,He),(!Ae||be[0]&16)&&le(z,"active",W[4]===!1),(!Ae||be[0]&16777216)&&_t!==(_t=W[24]("logs.moreFilters")+"")&&k(lt,_t),W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?rs?rs.p(W,be):(rs=Fp(W),rs.c(),rs.m(Ke,ze)):rs&&(rs.d(1),rs=null),(!Ae||be[0]&992&&at!==(at="btn btn-sm "+(W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ke,"class",at),(!Ae||be[0]&16777216)&&ht!==(ht=W[24]("logs.requestTypeFilter")+"")&&k(Tt,ht),(!Ae||be[0]&16777216)&&ml!==(ml=W[24]("logs.requestType_all")+"")&&k(ql,ml),(!Ae||be[0]&16777216)&&Ql!==(Ql=W[24]("logs.requestType_final")+"")&&k(Qt,Ql),(!Ae||be[0]&16777216)&&Hl!==(Hl=W[24]("logs.requestType_retry")+"")&&k(Il,Hl),(!Ae||be[0]&16777216)&&ol!==(ol=W[24]("logs.requestType_recovery")+"")&&k(Yl,ol),be[0]&32&&kt(Ot,W[5]),(!Ae||be[0]&16777216)&&El!==(El=W[24]("logs.timeRange")+"")&&k(zt,El),(!Ae||be[0]&16777216)&&Ll!==(Ll=W[24]("logs.allTime")+"")&&k($l,Ll),(!Ae||be[0]&16777216)&&wl!==(wl=W[24]("logs.recentTime")+"")&&k(es,wl),(!Ae||be[0]&16777216)&&Bl!==(Bl=W[24]("logs.customTime")+"")&&k(Wl,Bl),be[0]&256&&kt(Pt,W[8]),W[8]==="recent"?as?as.p(W,be):(as=zp(W),as.c(),as.m(pt,nl)):as&&(as.d(1),as=null),W[8]==="custom"?is?is.p(W,be):(is=Np(W),is.c(),is.m(pt,yl)):is&&(is.d(1),is=null),(!Ae||be[0]&16777216)&&Dl!==(Dl=W[24]("logs.sortBy")+"")&&k(Nl,Dl),(!Ae||be[0]&16777216)&&$t!==($t=W[24]("logs.sortByTimestamp")+"")&&k(el,$t),(!Ae||be[0]&16777216)&&Zt!==(Zt=W[24]("logs.sortByDuration")+"")&&k(il,Zt),(!Ae||be[0]&16777216)&&$e!==($e=W[24]("logs.sortByStatus")+"")&&k(Al,$e),be[0]&64&&kt(It,W[6]),(!Ae||be[0]&16777216)&&ls!==(ls=W[24]("logs.desc")+"")&&k(Ds,ls),(!Ae||be[0]&16777216)&&zs!==(zs=W[24]("logs.asc")+"")&&k(ul,zs),be[0]&128&&kt(Xl,W[7]),W[12]?us?us.p(W,be):(us=Up(W),us.c(),us.m(fl,null)):us&&(us.d(1),us=null),(!Ae||be[0]&16777216)&&Rr!==(Rr=W[24]("logs.autoRefresh")+"")&&k(qi,Rr),be[0]&4096&&(Eo.checked=W[12]),W[12]?fs?fs.p(W,be):(fs=Vp(W),fs.c(),fs.m(Co,null)):fs&&(fs.d(1),fs=null),(!Ae||be[0]&131072)&&le(Us,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&qr!==(qr=W[24]("common.refresh")+"")&&k(Pi,qr),(!Ae||be[0]&131072)&&(Ns.disabled=W[17]),(!Ae||be[0]&16777216)&&Hr!==(Hr=W[24]("logs.export")+"")&&k(Li,Hr),W[23]>0?cs?cs.p(W,be):(cs=Jp(W),cs.c(),cs.m(sl,null)):cs&&(cs.d(1),cs=null),(!Ae||be[0]&16777216)&&Lr!==(Lr=W[24]("logs.filters")+"")&&k(Bi,Lr),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?ds?ds.p(W,be):(ds=Wp(W),ds.c(),ds.m(js,null)):ds&&(ds.d(1),ds=null),(!Ae||be[0]&1020&&Dr!==(Dr="btn btn-sm "+(W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(js,"class",Dr),(!Ae||be[0]&16777216)&&Ar!==(Ar=W[24]("logs.method")+"")&&k(Ai,Ar),(!Ae||be[0]&16777216)&&Or!==(Or=W[24]("logs.allMethods")+"")&&k(Oi,Or),be[0]&4&&kt(Es,W[2]),(!Ae||be[0]&16777216)&&Nr!==(Nr=W[24]("logs.status")+"")&&k(Fi,Nr),be[0]&8&&oo.value!==W[3]&&Q(oo,W[3]),(!Ae||be[0]&16777216)&&Jr!==(Jr=W[24]("logs.result")+"")&&k(zi,Jr),(!Ae||be[0]&16777216)&&Wr!==(Wr=W[24]("logs.allResults")+"")&&k(Ni,Wr),(!Ae||be[0]&16777216)&&Gr!==(Gr=W[24]("logs.success")+"")&&k(Ui,Gr),(!Ae||be[0]&16777216)&&Kr!==(Kr=W[24]("logs.failed")+"")&&k(Vi,Kr),be[0]&16&&kt(Vs,W[4]),(!Ae||be[0]&16777216)&&Zr!==(Zr=W[24]("logs.requestTypeFilter")+"")&&k(Wi,Zr),(!Ae||be[0]&16777216)&&Xr!==(Xr=W[24]("logs.requestType_all")+"")&&k(Gi,Xr),(!Ae||be[0]&16777216)&&xr!==(xr=W[24]("logs.requestType_final")+"")&&k(Ki,xr),(!Ae||be[0]&16777216)&&$r!==($r=W[24]("logs.requestType_retry")+"")&&k(Qi,$r),(!Ae||be[0]&16777216)&&ea!==(ea=W[24]("logs.requestType_recovery")+"")&&k(Yi,ea),be[0]&32&&kt(Bs,W[5]),(!Ae||be[0]&16777216)&&sa!==(sa=W[24]("logs.timeRange")+"")&&k(Zi,sa),(!Ae||be[0]&16777216)&&oa!==(oa=W[24]("logs.allTime")+"")&&k(Xi,oa),(!Ae||be[0]&16777216)&&na!==(na=W[24]("logs.recentTime")+"")&&k(xi,na),(!Ae||be[0]&16777216)&&ra!==(ra=W[24]("logs.customTime")+"")&&k($i,ra),be[0]&256&&kt(Js,W[8]),W[8]==="recent"?ps?ps.p(W,be):(ps=Gp(W),ps.c(),ps.m(dl,eu)):ps&&(ps.d(1),ps=null),W[8]==="custom"?hs?hs.p(W,be):(hs=Kp(W),hs.c(),hs.m(dl,tu)):hs&&(hs.d(1),hs=null),(!Ae||be[0]&16777216)&&ua!==(ua=W[24]("logs.sortBy")+"")&&k(su,ua),(!Ae||be[0]&16777216)&&fa!==(fa=W[24]("logs.sortByTimestamp")+"")&&k(ou,fa),(!Ae||be[0]&16777216)&&ca!==(ca=W[24]("logs.sortByDuration")+"")&&k(nu,ca),(!Ae||be[0]&16777216)&&da!==(da=W[24]("logs.sortByStatus")+"")&&k(ru,da),be[0]&64&&kt(Ws,W[6]),(!Ae||be[0]&16777216)&&pa!==(pa=W[24]("logs.desc")+"")&&k(au,pa),(!Ae||be[0]&16777216)&&ha!==(ha=W[24]("logs.asc")+"")&&k(iu,ha),be[0]&128&&kt(no,W[7]),(!Ae||be[0]&131072)&&le(Gs,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&ma!==(ma=W[24]("common.refresh")+"")&&k(uu,ma),(!Ae||be[0]&16777216)&&ba!==(ba=W[24]("logs.autoRefresh")+"")&&k(fu,ba),be[0]&4096&&(To.checked=W[12]),W[12]?ms?ms.p(W,be):(ms=Qp(W),ms.c(),ms.m(os,cu)):ms&&(ms.d(1),ms=null),(!Ae||be[0]&131072)&&le(Qs,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&va!==(va=W[24]("common.refresh")+"")&&k(pu,va),(!Ae||be[0]&131072)&&(Ks.disabled=W[17]),W[21]>0?gs?gs.p(W,be):(gs=Yp(W),gs.c(),gs.m(os,null)):gs&&(gs.d(1),gs=null),(!Ae||be[0]&16777216)&&ka!==(ka=W[24]("logs.export")+"")&&k(hu,ka),W[23]>0?_s?_s.p(W,be):(_s=Zp(W),_s.c(),_s.m(Is,null)):_s&&(_s.d(1),_s=null),(!Ae||be[0]&16777216)&&Ea!==(Ea=W[24]("logs.actions")+"")&&k(_u,Ea),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"||W[12]?qs||(qs=Xp(),qs.c(),qs.m(As,null)):qs&&(qs.d(1),qs=null),(!Ae||be[0]&16777216)&&Ma!==(Ma=W[24]("logs.filters")+"")&&k(bu,Ma),(!Ae||be[0]&16777216)&&qa!==(qa=W[24]("logs.method")+"")&&k(vu,qa),(!Ae||be[0]&16777216)&&Ha!==(Ha=W[24]("logs.allMethods")+"")&&k(ku,Ha),be[0]&4&&kt(Ts,W[2]),(!Ae||be[0]&16777216)&&La!==(La=W[24]("logs.status")+"")&&k(wu,La),be[0]&8&&ro.value!==W[3]&&Q(ro,W[3]),(!Ae||be[0]&16777216)&&Ba!==(Ba=W[24]("logs.result")+"")&&k(yu,Ba),(!Ae||be[0]&16777216)&&Aa!==(Aa=W[24]("logs.allResults")+"")&&k(Cu,Aa),(!Ae||be[0]&16777216)&&Oa!==(Oa=W[24]("logs.success")+"")&&k(Eu,Oa),(!Ae||be[0]&16777216)&&Fa!==(Fa=W[24]("logs.failed")+"")&&k(Tu,Fa),be[0]&16&&kt(Ys,W[4]),(!Ae||be[0]&16777216)&&Ua!==(Ua=W[24]("logs.requestTypeFilter")+"")&&k(Mu,Ua),(!Ae||be[0]&16777216)&&Va!==(Va=W[24]("logs.requestType_all")+"")&&k(Su,Va),(!Ae||be[0]&16777216)&&Ja!==(Ja=W[24]("logs.requestType_final")+"")&&k(Ru,Ja),(!Ae||be[0]&16777216)&&Wa!==(Wa=W[24]("logs.requestType_retry")+"")&&k(qu,Wa),(!Ae||be[0]&16777216)&&Ga!==(Ga=W[24]("logs.requestType_recovery")+"")&&k(Hu,Ga),be[0]&32&&kt(Os,W[5]),(!Ae||be[0]&16777216)&&Ya!==(Ya=W[24]("logs.timeRange")+"")&&k(Pu,Ya),(!Ae||be[0]&16777216)&&Za!==(Za=W[24]("logs.allTime")+"")&&k(ju,Za),(!Ae||be[0]&16777216)&&Xa!==(Xa=W[24]("logs.recentTime")+"")&&k(Lu,Xa),(!Ae||be[0]&16777216)&&xa!==(xa=W[24]("logs.customTime")+"")&&k(Du,xa),be[0]&256&&kt(Zs,W[8]),W[8]==="recent"?bs?bs.p(W,be):(bs=xp(W),bs.c(),bs.m(qt,Iu)):bs&&(bs.d(1),bs=null),W[8]==="custom"?vs?vs.p(W,be):(vs=$p(W),vs.c(),vs.m(qt,Bu)):vs&&(vs.d(1),vs=null),(!Ae||be[0]&16777216)&&ti!==(ti=W[24]("logs.sortBy")+"")&&k(Au,ti),(!Ae||be[0]&16777216)&&li!==(li=W[24]("logs.sortByTimestamp")+"")&&k(Ou,li),(!Ae||be[0]&16777216)&&si!==(si=W[24]("logs.sortByDuration")+"")&&k(Fu,si),(!Ae||be[0]&16777216)&&oi!==(oi=W[24]("logs.sortByStatus")+"")&&k(zu,oi),be[0]&64&&kt(Xs,W[6]),(!Ae||be[0]&16777216)&&ni!==(ni=W[24]("logs.desc")+"")&&k(Nu,ni),(!Ae||be[0]&16777216)&&ri!==(ri=W[24]("logs.asc")+"")&&k(Uu,ri),be[0]&128&&kt(ao,W[7]),(!Ae||be[0]&16777216)&&ii!==(ii=W[24]("common.refresh")+"")&&k(Ju,ii),(!Ae||be[0]&16777216)&&ci!==(ci=W[24]("logs.autoRefresh")+"")&&k(Wu,ci),be[0]&4096&&(Mo.checked=W[12]),W[12]?ks?ks.p(W,be):(ks=e0(W),ks.c(),ks.m(qt,Gu)):ks&&(ks.d(1),ks=null),(!Ae||be[0]&131072)&&le($s,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&di!==(di=W[24]("common.refresh")+"")&&k(Ku,di),(!Ae||be[0]&131072)&&(xs.disabled=W[17]),W[23]>0?ws?ws.p(W,be):(ws=t0(W),ws.c(),ws.m(qt,null)):ws&&(ws.d(1),ws=null),W[23]>0?ys?ys.p(W,be):(ys=l0(W),ys.c(),ys.m(f,null)):ys&&(ys.d(1),ys=null),pi===(pi=D1(W))&&eo?eo.p(W,be):(eo.d(1),eo=pi(W),eo&&(eo.c(),eo.m(l,null))),W[20]&&W[19]?Ol?(Ol.p(W,be),be[0]&1572864&&et(Ol,1)):(Ol=p0(W),Ol.c(),et(Ol,1),Ol.m(dr.parentNode,dr)):Ol&&(Gl(),st(Ol,1,1,()=>{Ol=null}),Kl())},i(W){Ae||(et(Ol),Ae=!0)},o(W){st(Ol),Ae=!1},d(W){W&&(P(l),P(Yu),P(dr)),ns&&ns.d(),Ms&&Ms.d(),Ss&&Ss.d(),Rs&&Rs.d(),rs&&rs.d(),as&&as.d(),is&&is.d(),us&&us.d(),fs&&fs.d(),cs&&cs.d(),ds&&ds.d(),ps&&ps.d(),hs&&hs.d(),ms&&ms.d(),gs&&gs.d(),_s&&_s.d(),qs&&qs.d(),bs&&bs.d(),vs&&vs.d(),ks&&ks.d(),ws&&ws.d(),ys&&ys.d(),eo.d(),Ol&&Ol.d(W),Zu=!1,bt(L1)}}}let or=50;function h0(t){return new Date(t).toLocaleString()}function m0(t){return t<1e3?`${t}ms`:`${(t/1e3).toFixed(2)}s`}function g0(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function _0(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function _b(t,l,e){let n,r;Dt(t,Rt,rt=>e(24,r=rt));let i=1,u="",c="",f="",d,p="",m="timestamp",g="desc",b="recent",v=1,w="",C="",E=[],y=0,T=0,S=!0,q=null,D=null,H=!1,I=!0,R="30s",L=null,A=0,N=!1;const Z={"5s":5e3,"10s":1e4,"30s":3e4,"60s":6e4};let Y="",x="";async function F(){try{e(17,S=!0),e(18,q=null);const rt={page:i,limit:or,sortBy:m,sortOrder:g};u.trim()&&(rt.searchTerm=u.trim()),c&&(rt.method=c),f&&(rt.status=parseInt(f)),d!==void 0&&(rt.success=d),p&&(rt.requestType=p),b==="recent"?(rt.endTime=Date.now(),rt.startTime=Date.now()-v*60*60*1e3):b==="custom"&&(w&&(rt.startTime=new Date(w).getTime()),C&&(rt.endTime=new Date(C).getTime()));const Mt=await am(rt);e(14,E=Mt.data),e(15,y=Mt.total),e(16,T=Mt.totalPages)}catch(rt){e(18,q=rt.message)}finally{e(17,S=!1)}}async function K(rt){try{const Mt={};u.trim()&&(Mt.searchTerm=u.trim()),c&&(Mt.method=c),f&&(Mt.status=parseInt(f)),d!==void 0&&(Mt.success=d),p&&(Mt.requestType=p),b==="recent"?(Mt.endTime=Date.now(),Mt.startTime=Date.now()-v*60*60*1e3):b==="custom"&&(w&&(Mt.startTime=new Date(w).getTime()),C&&(Mt.endTime=new Date(C).getTime()));const ht=await im(Mt,rt),Tt=URL.createObjectURL(ht),kl=document.createElement("a");kl.href=Tt,kl.download=`access-logs-${Date.now()}.${rt}`,kl.click(),URL.revokeObjectURL(Tt)}catch(Mt){alert(`Export failed: ${Mt.message}`)}}function M(rt){e(19,D=rt),e(20,H=!0)}function B(rt){return rt?r(`logs.requestType_${rt}`):"-"}function U(){e(1,u=""),e(2,c=""),e(3,f=""),e(4,d=void 0),e(5,p=""),e(8,b="recent"),e(9,v=1),e(10,w=""),e(11,C=""),e(6,m="timestamp"),e(7,g="desc"),e(0,i=1)}function O(){return!!(u||c||f||d!==void 0||p)}function J(){if(L&&clearInterval(L),I){const rt=Z[R];L=window.setInterval(()=>{document.visibilityState==="visible"&&(O()?e(22,N=!0):(F(),e(21,A=Date.now()),e(22,N=!1)))},rt)}}function ie(){L&&(clearInterval(L),L=null)}async function ue(){await F(),e(21,A=Date.now()),e(22,N=!1)}function ne(){if(document.visibilityState==="visible"){const rt=Date.now()-A,Mt=Z[R];rt>=Mt&&F(),I&&J()}else ie()}Hs(()=>{localStorage.getItem("logsAdvancedFiltersExpanded");const rt=localStorage.getItem("logsRefreshInterval");rt&&e(13,R=rt);const Mt=localStorage.getItem("logsAutoRefresh");Mt!==null&&e(12,I=Mt==="true"),F(),J(),document.addEventListener("visibilitychange",ne)}),ir(()=>{ie(),document.removeEventListener("visibilitychange",ne)});function $(){u=this.value,e(1,u)}const te=()=>e(2,c=""),re=()=>e(2,c="GET"),ee=()=>e(2,c="POST"),G=()=>e(2,c="PUT"),pe=()=>e(2,c="DELETE"),oe=()=>e(2,c="PATCH");function ge(){f=this.value,e(3,f)}const he=()=>e(4,d=void 0),ye=()=>e(4,d=!0),Fe=()=>e(4,d=!1);function je(){p=pl(this),e(5,p)}function we(){b=pl(this),e(8,b)}function Oe(){v=St(this.value),e(9,v)}function Je(){w=this.value,e(10,w)}function Le(){C=this.value,e(11,C)}function Pe(){m=pl(this),e(6,m)}function Me(){g=pl(this),e(7,g)}function fe(){I=this.checked,e(12,I)}function _e(){R=pl(this),e(13,R)}const Be=()=>K("json"),De=()=>K("csv");function se(){c=pl(this),e(2,c)}function ke(){f=this.value,e(3,f)}function me(){d=pl(this),e(4,d)}function Ee(){p=pl(this),e(5,p)}function Ve(){b=pl(this),e(8,b)}function Ie(){v=St(this.value),e(9,v)}function nt(){w=this.value,e(10,w)}function Ne(){C=this.value,e(11,C)}function Ye(){m=pl(this),e(6,m)}function Qe(){g=pl(this),e(7,g)}function ve(){I=this.checked,e(12,I)}function de(){R=pl(this),e(13,R)}const Te=()=>K("json"),Ze=()=>K("csv");function Se(){c=pl(this),e(2,c)}function Ue(){f=this.value,e(3,f)}function Ce(){d=pl(this),e(4,d)}function mt(){p=pl(this),e(5,p)}function Ge(){b=pl(this),e(8,b)}function ce(){v=St(this.value),e(9,v)}function qe(){w=this.value,e(10,w)}function Re(){C=this.value,e(11,C)}function dt(){m=pl(this),e(6,m)}function We(){g=pl(this),e(7,g)}function z(){I=this.checked,e(12,I)}function He(){R=pl(this),e(13,R)}const X=()=>K("json"),ft=()=>K("csv"),Ht=()=>e(1,u=""),Ke=()=>e(2,c=""),_t=()=>e(3,f=""),lt=()=>e(4,d=void 0),it=()=>e(5,p=""),ze=()=>e(9,v=1),Xe=()=>{e(8,b="recent"),e(10,w=""),e(11,C="")},Bt=()=>e(8,b="recent"),at=()=>{e(6,m="timestamp"),e(7,g="desc")},gt=rt=>M(rt),wt=()=>e(0,i=i-1),pt=()=>e(0,i=i+1),vl=()=>{e(20,H=!1),e(19,D=null)};return t.$$.update=()=>{if(t.$$.dirty[0]&4096&&(I?J():ie()),t.$$.dirty[0]&12288&&(localStorage.setItem("logsRefreshInterval",R),localStorage.setItem("logsAutoRefresh",String(I))),t.$$.dirty[0]&1022&&e(23,n=[u.trim(),c,f,d!==void 0,p,b!=="all"&&b!=="recent"||v!==1,m!=="timestamp"||g!=="desc"].filter(Boolean).length),t.$$.dirty[0]&1073742846){const rt=JSON.stringify({limit:or,searchTerm:u,method:c,statusFilter:f,successFilter:d,requestTypeFilter:p,sortBy:m,sortOrder:g,timeRangeType:b,recentHours:v});Y&&rt!==Y&&e(0,i=1),e(30,Y=rt)}if(t.$$.dirty[0]&3328|t.$$.dirty[1]&1){const rt=JSON.stringify({customStartTime:w,customEndTime:C});b==="custom"&&x&&rt!==x&&e(0,i=1),e(31,x=rt)}t.$$.dirty[0]&4095&&F()},[i,u,c,f,d,p,m,g,b,v,w,C,I,R,E,y,T,S,q,D,H,A,N,n,r,K,M,B,U,ue,Y,x,$,te,re,ee,G,pe,oe,ge,he,ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe,_e,Be,De,se,ke,me,Ee,Ve,Ie,nt,Ne,Ye,Qe,ve,de,Te,Ze,Se,Ue,Ce,mt,Ge,ce,qe,Re,dt,We,z,He,X,ft,Ht,Ke,_t,lt,it,ze,Xe,Bt,at,gt,wt,pt,vl]}class bb extends Vt{constructor(l){super(),Ut(this,l,_b,gb,At,{},null,[-1,-1,-1,-1])}}async function vb(t){return Cl.post("/auth/login",{token:t})}function b0(t){let l,e,n;return{c(){l=a("div"),e=a("span"),n=_(t[2]),o(e,"class","label-text-alt text-error"),o(l,"class","label")},m(r,i){j(r,l,i),s(l,e),s(e,n)},p(r,i){i&4&&k(n,r[2])},d(r){r&&P(l)}}}function kb(t){let l,e,n,r,i,u,c,f,d=t[3]("login.title")+"",p,m,g,b=t[3]("login.subtitle")+"",v,w,C,E,y,T=t[3]("login.token")+"",S,q,D,H,I,R,L,A,N=(t[1]?t[3]("login.loggingIn"):t[3]("login.submit"))+"",Z,Y,x,F,K,M=t[2]&&b0(t);return{c(){l=a("div"),e=a("div"),n=a("div"),r=a("div"),i=ae("svg"),u=ae("path"),c=h(),f=a("h1"),p=_(d),m=h(),g=a("p"),v=_(b),w=h(),C=a("div"),E=a("label"),y=a("span"),S=_(T),q=h(),D=a("input"),I=h(),M&&M.c(),R=h(),L=a("div"),A=a("button"),Z=_(N),Y=h(),x=a("div"),x.textContent="Bungee Reverse Proxy",o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-16 w-16 text-primary mb-4"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"class","text-3xl font-bold text-center"),o(g,"class","text-sm text-base-content/60 text-center mt-2"),o(r,"class","flex flex-col items-center mb-6"),o(y,"class","label-text"),o(E,"class","label"),o(E,"for","token-input"),o(D,"id","token-input"),o(D,"type","password"),o(D,"placeholder",H=t[3]("login.tokenPlaceholder")),o(D,"class","input input-bordered w-full"),D.disabled=t[1],o(D,"autocomplete","off"),le(D,"input-error",!!t[2]),o(C,"class","form-control w-full"),o(A,"class","btn btn-primary"),A.disabled=t[1],le(A,"loading",t[1]),o(L,"class","form-control mt-6"),o(x,"class","divider text-xs opacity-50 mt-6"),o(n,"class","card-body"),o(e,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),o(l,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(B,U){j(B,l,U),s(l,e),s(e,n),s(n,r),s(r,i),s(i,u),s(r,c),s(r,f),s(f,p),s(r,m),s(r,g),s(g,v),s(n,w),s(n,C),s(C,E),s(E,y),s(y,S),s(C,q),s(C,D),Q(D,t[0]),s(C,I),M&&M.m(C,null),s(n,R),s(n,L),s(L,A),s(A,Z),s(n,Y),s(n,x),F||(K=[V(D,"input",t[6]),V(D,"keypress",t[5]),V(A,"click",t[4])],F=!0)},p(B,[U]){U&8&&d!==(d=B[3]("login.title")+"")&&k(p,d),U&8&&b!==(b=B[3]("login.subtitle")+"")&&k(v,b),U&8&&T!==(T=B[3]("login.token")+"")&&k(S,T),U&8&&H!==(H=B[3]("login.tokenPlaceholder"))&&o(D,"placeholder",H),U&2&&(D.disabled=B[1]),U&1&&D.value!==B[0]&&Q(D,B[0]),U&4&&le(D,"input-error",!!B[2]),B[2]?M?M.p(B,U):(M=b0(B),M.c(),M.m(C,null)):M&&(M.d(1),M=null),U&10&&N!==(N=(B[1]?B[3]("login.loggingIn"):B[3]("login.submit"))+"")&&k(Z,N),U&2&&(A.disabled=B[1]),U&2&&le(A,"loading",B[1])},i:tt,o:tt,d(B){B&&P(l),M&&M.d(),F=!1,bt(K)}}}function wb(t,l,e){let n;Dt(t,Rt,p=>e(3,n=p));let r="",i=!1,u="";async function c(){if(!r.trim()){e(2,u=n("login.required"));return}e(1,i=!0),e(2,u="");try{const p=await vb(r);p.success?(bh(r),Lt.show(n("login.success"),"success"),window.location.hash="#/"):e(2,u=p.error||n("login.unauthorized"))}catch(p){e(2,u=n("login.failed",{values:{error:p.message}}))}finally{e(1,i=!1)}}function f(p){p.key==="Enter"&&!i&&c()}function d(){r=this.value,e(0,r)}return[r,i,u,n,c,f,d]}class yb extends Vt{constructor(l){super(),Ut(this,l,wb,kb,At,{})}}function Cb(t){let l,e,n=t[0]("notFound.title")+"",r,i,u,c=t[0]("notFound.message")+"",f,d,p,m=t[0]("notFound.goHome")+"",g;return{c(){l=a("div"),e=a("h1"),r=_(n),i=h(),u=a("p"),f=_(c),d=h(),p=a("a"),g=_(m),o(e,"class","text-6xl font-bold mb-4"),o(u,"class","text-2xl mb-8"),o(p,"href","/__ui/#/"),o(p,"class","btn btn-primary"),o(l,"class","flex flex-col items-center justify-center h-screen")},m(b,v){j(b,l,v),s(l,e),s(e,r),s(l,i),s(l,u),s(u,f),s(l,d),s(l,p),s(p,g)},p(b,[v]){v&1&&n!==(n=b[0]("notFound.title")+"")&&k(r,n),v&1&&c!==(c=b[0]("notFound.message")+"")&&k(f,c),v&1&&m!==(m=b[0]("notFound.goHome")+"")&&k(g,m)},i:tt,o:tt,d(b){b&&P(l)}}}function Eb(t,l,e){let n;return Dt(t,Rt,r=>e(0,n=r)),[n]}class Tb extends Vt{constructor(l){super(),Ut(this,l,Eb,Cb,At,{})}}function v0(t,l,e){const n=t.slice();return n[3]=l[e],n}function k0(t,l){let e,n,r;function i(){return l[2](l[3])}return n=new cg({props:{message:l[3].message,type:l[3].type,duration:l[3].duration}}),n.$on("close",i),{key:t,first:null,c(){e=Ul(),Et(n.$$.fragment),this.first=e},m(u,c){j(u,e,c),yt(n,u,c),r=!0},p(u,c){l=u;const f={};c&1&&(f.message=l[3].message),c&1&&(f.type=l[3].type),c&1&&(f.duration=l[3].duration),n.$set(f)},i(u){r||(et(n.$$.fragment,u),r=!0)},o(u){st(n.$$.fragment,u),r=!1},d(u){u&&P(e),Ct(n,u)}}}function Mb(t){let l=[],e=new Map,n,r,i=ut(t[0]);const u=c=>c[3].id;for(let c=0;c<i.length;c+=1){let f=v0(t,i,c),d=u(f);e.set(d,l[c]=k0(d,f))}return{c(){for(let c=0;c<l.length;c+=1)l[c].c();n=Ul()},m(c,f){for(let d=0;d<l.length;d+=1)l[d]&&l[d].m(c,f);j(c,n,f),r=!0},p(c,[f]){f&3&&(i=ut(c[0]),Gl(),l=ff(l,f,u,1,c,i,e,n.parentNode,w2,k0,n,v0),Kl())},i(c){if(!r){for(let f=0;f<i.length;f+=1)et(l[f]);r=!0}},o(c){for(let f=0;f<l.length;f+=1)st(l[f]);r=!1},d(c){c&&P(n);for(let f=0;f<l.length;f+=1)l[f].d(c)}}}function Sb(t,l,e){let n;Dt(t,Lt,u=>e(0,n=u));function r(u){Lt.remove(u)}return[n,r,u=>r(u.id)]}class Rb extends Vt{constructor(l){super(),Ut(this,l,Sb,Mb,At,{})}}function w0(t,l,e){const n=t.slice();return n[11]=l[e],n}function qb(t){let l,e,n,r,i,u,c,f,d,p,m,g,b=t[0]("nav.dashboard")+"",v,w,C,E,y,T,S,q,D=t[0]("nav.routes")+"",H,I,R,L,A,N,Z,Y,x=t[0]("nav.logs")+"",F,K,M,B,U,O,J,ie,ue,ne=t[0]("nav.configuration")+"",$,te,re,ee,G,pe,oe,ge,he=mi.find(t[8])?.name+"",ye,Fe,je,we,Oe,Je,Le,Pe,Me,fe=ut(mi),_e=[];for(let me=0;me<fe.length;me+=1)_e[me]=y0(w0(t,fe,me));let Be=t[4]&&t[5]&&C0(t);const De=[Ob,Ab,Bb,Ib,Db,Lb,jb,Pb],se=[];function ke(me,Ee){return Ee&2&&(Je=null),me[1]==="/login"?0:me[1]==="/"?1:me[1]==="/routes"?2:(Je==null&&(Je=!!me[1].startsWith("/routes/edit/")),Je?3:me[1]==="/routes/new"?4:me[1]==="/logs"?5:me[1]==="/config"?6:7)}return Le=ke(t,-1),Pe=se[Le]=De[Le](t),{c(){l=a("div"),e=a("div"),n=a("div"),n.innerHTML=\'<a href="/__ui/#/" class="flex items-center gap-2 px-4 py-2 hover:bg-base-200 rounded-lg transition-colors"><svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> <div class="flex flex-col"><span class="text-xl font-bold">Bungee</span> <span class="text-xs text-base-content/60">Reverse Proxy</span></div></a>\',r=h(),i=a("div"),u=a("ul"),c=a("li"),f=a("a"),d=ae("svg"),p=ae("path"),m=h(),g=a("span"),v=_(b),w=h(),C=a("li"),E=a("a"),y=ae("svg"),T=ae("path"),S=h(),q=a("span"),H=_(D),I=h(),R=a("li"),L=a("a"),A=ae("svg"),N=ae("path"),Z=h(),Y=a("span"),F=_(x),K=h(),M=a("li"),B=a("a"),U=ae("svg"),O=ae("path"),J=ae("path"),ie=h(),ue=a("span"),$=_(ne),te=h(),re=a("div"),ee=a("div"),G=ae("svg"),pe=ae("path"),oe=h(),ge=a("span"),ye=_(he),Fe=h(),je=a("ul");for(let me=0;me<_e.length;me+=1)_e[me].c();we=h(),Be&&Be.c(),Oe=h(),Pe.c(),o(n,"class","flex-1"),o(p,"stroke-linecap","round"),o(p,"stroke-linejoin","round"),o(p,"stroke-width","2"),o(p,"d","M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"),o(d,"xmlns","http://www.w3.org/2000/svg"),o(d,"class","h-4 w-4"),o(d,"fill","none"),o(d,"viewBox","0 0 24 24"),o(d,"stroke","currentColor"),o(f,"href","/__ui/#/"),o(f,"class","flex items-center gap-2 svelte-1fgps4v"),le(f,"active",t[1]==="/"),o(T,"stroke-linecap","round"),o(T,"stroke-linejoin","round"),o(T,"stroke-width","2"),o(T,"d","M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"),o(y,"xmlns","http://www.w3.org/2000/svg"),o(y,"class","h-4 w-4"),o(y,"fill","none"),o(y,"viewBox","0 0 24 24"),o(y,"stroke","currentColor"),o(E,"href","/__ui/#/routes"),o(E,"class","flex items-center gap-2 svelte-1fgps4v"),le(E,"active",t[1].startsWith("/routes")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(L,"href","/__ui/#/logs"),o(L,"class","flex items-center gap-2 svelte-1fgps4v"),le(L,"active",t[1]==="/logs"),o(O,"stroke-linecap","round"),o(O,"stroke-linejoin","round"),o(O,"stroke-width","2"),o(O,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(J,"stroke-linecap","round"),o(J,"stroke-linejoin","round"),o(J,"stroke-width","2"),o(J,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-4 w-4"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),o(B,"href","/__ui/#/config"),o(B,"class","flex items-center gap-2 svelte-1fgps4v"),le(B,"active",t[1]==="/config"),o(u,"class","menu menu-horizontal px-1 gap-1"),o(pe,"stroke-linecap","round"),o(pe,"stroke-linejoin","round"),o(pe,"stroke-width","2"),o(pe,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),o(G,"xmlns","http://www.w3.org/2000/svg"),o(G,"class","h-4 w-4"),o(G,"fill","none"),o(G,"viewBox","0 0 24 24"),o(G,"stroke","currentColor"),o(ge,"class","text-xs"),o(ee,"role","button"),o(ee,"tabindex","0"),o(ee,"class","btn btn-ghost btn-sm gap-1"),o(je,"role","menu"),o(je,"tabindex","0"),o(je,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),o(re,"class","dropdown dropdown-end mx-2"),o(i,"class","flex-none"),o(e,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),o(l,"class","min-h-screen bg-base-200")},m(me,Ee){j(me,l,Ee),s(l,e),s(e,n),s(e,r),s(e,i),s(i,u),s(u,c),s(c,f),s(f,d),s(d,p),s(f,m),s(f,g),s(g,v),s(u,w),s(u,C),s(C,E),s(E,y),s(y,T),s(E,S),s(E,q),s(q,H),s(u,I),s(u,R),s(R,L),s(L,A),s(A,N),s(L,Z),s(L,Y),s(Y,F),s(u,K),s(u,M),s(M,B),s(B,U),s(U,O),s(U,J),s(B,ie),s(B,ue),s(ue,$),s(i,te),s(i,re),s(re,ee),s(ee,G),s(G,pe),s(ee,oe),s(ee,ge),s(ge,ye),s(re,Fe),s(re,je);for(let Ve=0;Ve<_e.length;Ve+=1)_e[Ve]&&_e[Ve].m(je,null);s(i,we),Be&&Be.m(i,null),s(l,Oe),se[Le].m(l,null),Me=!0},p(me,Ee){if((!Me||Ee&1)&&b!==(b=me[0]("nav.dashboard")+"")&&k(v,b),(!Me||Ee&2)&&le(f,"active",me[1]==="/"),(!Me||Ee&1)&&D!==(D=me[0]("nav.routes")+"")&&k(H,D),(!Me||Ee&2)&&le(E,"active",me[1].startsWith("/routes")),(!Me||Ee&1)&&x!==(x=me[0]("nav.logs")+"")&&k(F,x),(!Me||Ee&2)&&le(L,"active",me[1]==="/logs"),(!Me||Ee&1)&&ne!==(ne=me[0]("nav.configuration")+"")&&k($,ne),(!Me||Ee&2)&&le(B,"active",me[1]==="/config"),(!Me||Ee&8)&&he!==(he=mi.find(me[8])?.name+"")&&k(ye,he),Ee&72){fe=ut(mi);let Ie;for(Ie=0;Ie<fe.length;Ie+=1){const nt=w0(me,fe,Ie);_e[Ie]?_e[Ie].p(nt,Ee):(_e[Ie]=y0(nt),_e[Ie].c(),_e[Ie].m(je,null))}for(;Ie<_e.length;Ie+=1)_e[Ie].d(1);_e.length=fe.length}me[4]&&me[5]?Be?Be.p(me,Ee):(Be=C0(me),Be.c(),Be.m(i,null)):Be&&(Be.d(1),Be=null);let Ve=Le;Le=ke(me,Ee),Le===Ve?se[Le].p(me,Ee):(Gl(),st(se[Ve],1,1,()=>{se[Ve]=null}),Kl(),Pe=se[Le],Pe?Pe.p(me,Ee):(Pe=se[Le]=De[Le](me),Pe.c()),et(Pe,1),Pe.m(l,null))},i(me){Me||(et(Pe),Me=!0)},o(me){st(Pe),Me=!1},d(me){me&&P(l),Gt(_e,me),Be&&Be.d(),se[Le].d()}}}function Hb(t){let l;return{c(){l=a("div"),l.innerHTML=\'<div class="flex flex-col items-center gap-4"><span class="loading loading-spinner loading-lg"></span> <p class="text-base-content/60">Loading...</p></div>\',o(l,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(e,n){j(e,l,n)},p:tt,i:tt,o:tt,d(e){e&&P(l)}}}function y0(t){let l,e,n,r,i;function u(){return t[9](t[11])}return{c(){l=a("li"),e=a("button"),e.textContent=`${t[11].name}`,n=h(),o(e,"class","svelte-1fgps4v"),le(e,"active",t[3]===t[11].code)},m(c,f){j(c,l,f),s(l,e),s(l,n),r||(i=V(e,"click",u),r=!0)},p(c,f){t=c,f&8&&le(e,"active",t[3]===t[11].code)},d(c){c&&P(l),r=!1,i()}}}function C0(t){let l,e,n,r,i,u,c=t[0]("login.logout")+"",f,d,p;return{c(){l=a("div"),e=a("button"),n=ae("svg"),r=ae("path"),i=h(),u=a("span"),f=_(c),o(r,"stroke-linecap","round"),o(r,"stroke-linejoin","round"),o(r,"stroke-width","2"),o(r,"d","M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(u,"class","text-xs hidden md:inline"),o(e,"class","btn btn-ghost btn-sm gap-1"),o(l,"class","mx-2")},m(m,g){j(m,l,g),s(l,e),s(e,n),s(n,r),s(e,i),s(e,u),s(u,f),d||(p=V(e,"click",t[7]),d=!0)},p(m,g){g&1&&c!==(c=m[0]("login.logout")+"")&&k(f,c)},d(m){m&&P(l),d=!1,p()}}}function Pb(t){let l,e;return l=new Tb({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function jb(t){let l,e;return l=new Pm({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Lb(t){let l,e;return l=new bb({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Db(t){let l,e;return l=new o2({props:{params:{}}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Ib(t){let l,e;return l=new o2({props:{params:{path:t[1].replace("/routes/edit/","")}}}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p(n,r){const i={};r&2&&(i.params={path:n[1].replace("/routes/edit/","")}),l.$set(i)},i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Bb(t){let l,e;return l=new eg({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Ab(t){let l,e;return l=new lm({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Ob(t){let l,e;return l=new yb({}),{c(){Et(l.$$.fragment)},m(n,r){yt(l,n,r),e=!0},p:tt,i(n){e||(et(l.$$.fragment,n),e=!0)},o(n){st(l.$$.fragment,n),e=!1},d(n){Ct(l,n)}}}function Fb(t){let l,e,n,r,i;const u=[Hb,qb],c=[];function f(d,p){return d[2]?0:1}return l=f(t),e=c[l]=u[l](t),r=new Rb({}),{c(){e.c(),n=h(),Et(r.$$.fragment)},m(d,p){c[l].m(d,p),j(d,n,p),yt(r,d,p),i=!0},p(d,[p]){let m=l;l=f(d),l===m?c[l].p(d,p):(Gl(),st(c[m],1,1,()=>{c[m]=null}),Kl(),e=c[l],e?e.p(d,p):(e=c[l]=u[l](d),e.c()),et(e,1),e.m(n.parentNode,n))},i(d){i||(et(e),et(r.$$.fragment,d),i=!0)},o(d){st(e),st(r.$$.fragment,d),i=!1},d(d){d&&P(n),c[l].d(d),Ct(r,d)}}}function zb(t,l,e){let n,r,i,u,c,f;Dt(t,Rt,b=>e(0,n=b)),Dt(t,E2,b=>e(1,r=b)),Dt(t,ki,b=>e(2,i=b)),Dt(t,yo,b=>e(3,u=b)),Dt(t,J1,b=>e(4,c=b)),Dt(t,Ti,b=>e(5,f=b));function d(b){hh(b)}Hs(async()=>{try{const v=(await hf()).auth?.enabled||!1;if(J1.set(v),v){const w=G0();Ti.set(!!w),!w&&r!=="/login"&&(window.location.hash="#/login")}}catch(b){console.error("Failed to check auth status:",b)}});function p(){confirm(n("login.logoutConfirm"))&&(W0(),window.location.hash="#/login")}return[n,r,i,u,c,f,d,p,b=>b.code===u,b=>d(b.code)]}class Xb extends Vt{constructor(l){super(),Ut(this,l,zb,Fb,At,{})}}export{Xb as A,Vt as S,ir as a,Qb as b,wr as c,Jb as d,P as e,j as f,a as g,Gb as h,Ut as i,Kb as j,Wb as k,V as l,bl as m,tt as n,Hs as o,Rl as p,Ct as q,et as r,At as s,st as t,Yb as u,Zb as v,Sl as w,yt as x,Et as y};\n',
21253
- "index-m5oE-oos.css": "*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}*:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box, 1rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width: 640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.breadcrumbs{max-width:100%;overflow-x:auto;padding-top:.5rem;padding-bottom:.5rem}.breadcrumbs>ul,.breadcrumbs>ol{display:flex;align-items:center;white-space:nowrap;min-height:-moz-min-content;min-height:min-content}.breadcrumbs>ul>li,.breadcrumbs>ol>li{display:flex;align-items:center}.breadcrumbs>ul>li>a,.breadcrumbs>ol>li>a{display:flex;cursor:pointer;align-items:center}@media (hover:hover){.breadcrumbs>ul>li>a:hover,.breadcrumbs>ol>li>a:hover{text-decoration-line:underline}.link-hover:hover{text-decoration-line:underline}.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.tab:hover{--tw-text-opacity: 1}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):hover,.tabs-boxed :is(input:checked):hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{height:3rem;width:3rem;border-radius:9999px;padding:0}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:\"\";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box, 1rem)}.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio],.collapse-content{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-content{visibility:hidden;grid-column-start:1;grid-row-start:2;min-height:0px;transition:visibility .2s;transition:padding .2s ease-out,background-color .2s ease-out;padding-left:1rem;padding-right:1rem;cursor:unset}.collapse[open],.collapse-open,.collapse:focus:not(.collapse-close){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse[open]>.collapse-content,.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:before,.divider:after{height:.125rem;width:100%;flex-grow:1;--tw-content: \"\";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown-end .dropdown-content{inset-inline-end:0px}.dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}.dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}.dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}.dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}.dropdown-end.dropdown-right .dropdown-content,.dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}.dropdown.dropdown-open .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content,.dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media (hover: hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>*.disabled:hover,.btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}.btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}.btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}.btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}.btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}.btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}.tab[disabled],.tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.indicator{position:relative;display:inline-flex;width:-moz-max-content;width:max-content}.indicator :where(.indicator-item){z-index:1;position:absolute;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));white-space:nowrap}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.kbd{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:.5rem;padding-right:.5rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));border-bottom-width:2px;min-height:2.2em;min-width:2.2em}.link{cursor:pointer;text-decoration-line:underline}.link-hover{text-decoration-line:none}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.mockup-code{position:relative;overflow:hidden;overflow-x:auto;min-width:18rem;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));padding-top:1.25rem;padding-bottom:1.25rem;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));direction:ltr}.mockup-code pre[data-prefix]:before{content:attr(data-prefix);display:inline-block;text-align:right;width:2rem;opacity:.5}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:32rem;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:1.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}.modal-action{display:flex;margin-top:1.5rem;justify-content:flex-end}.modal-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;width:100%}:where(.navbar>*:not(script,style)){display:inline-flex;align-items:center}.radio{flex-shrink:0;--chkbg: var(--bc);height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.range{height:1.5rem;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stats{display:inline-grid;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}:where(.stats){grid-auto-flow:column;overflow-x:auto}.stat{display:inline-grid;width:100%;grid-template-columns:repeat(1,1fr);-moz-column-gap:1rem;column-gap:1rem;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .1;padding:1rem 1.5rem}.stat-title{grid-column-start:1;white-space:nowrap;color:var(--fallback-bc,oklch(var(--bc)/.6))}.stat-value{grid-column-start:1;white-space:nowrap;font-size:2.25rem;line-height:2.5rem;font-weight:800}.stat-desc{grid-column-start:1;white-space:nowrap;font-size:.75rem;line-height:1rem;color:var(--fallback-bc,oklch(var(--bc)/.6))}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.tabs{display:grid;align-items:flex-end}.tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),.tabs-lifted:has(.tab-content[class*=\" rounded-\"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}.tab{position:relative;grid-row-start:1;display:inline-flex;height:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem;--tw-text-opacity: .5;--tab-color: var(--fallback-bc,oklch(var(--bc)/1));--tab-bg: var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color: var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem)}.tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}.tab:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.tab:not(input):empty{cursor:default;grid-column-start:span 9999}:checked+.tab-content:nth-child(2),:is(.tab-active,[aria-selected=true])+.tab-content:nth-child(2){border-start-start-radius:0px}input.tab:checked+.tab-content,:is(.tab-active,[aria-selected=true])+.tab-content{display:block}.table{position:relative;width:100%;border-radius:var(--rounded-box, 1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.toast{position:fixed;display:flex;min-width:-moz-fit-content;min-width:fit-content;flex-direction:column;white-space:nowrap;gap:.5rem;padding:1rem}.toggle{flex-shrink:0;--tglbg: var(--fallback-b1,oklch(var(--b1)/1));--handleoffset: 1.5rem;--handleoffsetcalculator: calc(var(--handleoffset) * -1);--togglehandleborder: 0 0;height:1.5rem;width:3rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input, .2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg: var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.badge-neutral{--tw-border-opacity: 1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.badge-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.badge-accent{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.badge-info{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.badge-success{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-warning{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-ghost{--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}.badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}.badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>*.disabled,.btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}.breadcrumbs>ul>li>a:focus,.breadcrumbs>ol>li>a:focus{outline:2px solid transparent;outline-offset:2px}.breadcrumbs>ul>li>a:focus-visible,.breadcrumbs>ol>li>a:focus-visible{outline:2px solid currentColor;outline-offset:2px}.breadcrumbs>ul>li+*:before,.breadcrumbs>ol>li+*:before{content:\"\";margin-left:.5rem;margin-right:.75rem;display:block;height:.375rem;width:.375rem;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:.4;border-top:1px solid;border-right:1px solid;background-color:transparent}[dir=rtl] .breadcrumbs>ul>li+*:before,[dir=rtl] .breadcrumbs>ol>li+*:before{--tw-rotate: -135deg}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}.btn-secondary{--btn-color: var(--fallback-s)}.btn-success{--btn-color: var(--fallback-su)}.btn-warning{--btn-color: var(--fallback-wa)}.btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}.btn-secondary{--btn-color: var(--s)}.btn-success{--btn-color: var(--su)}.btn-warning{--btn-color: var(--wa)}.btn-error{--btn-color: var(--er)}}.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}.btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}.btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse-arrow>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;--tw-translate-y: -100%;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.15s;transition-duration:.2s;top:1.9rem;inset-inline-end:1.4rem;content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.collapse-plus>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.3s;top:.9rem;inset-inline-end:1.4rem;content:\"+\";pointer-events:none}.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title{position:relative}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse[open]>:where(.collapse-content),.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{--tw-translate-y: -50%;--tw-rotate: 225deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.collapse[open].collapse-plus>.collapse-title:after,.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{content:\"\u2212\"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input-error{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)))}.input-error:focus,.input-error:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.join-item:focus{isolation:isolate}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.\\!loading{pointer-events:none!important;display:inline-block!important;aspect-ratio:1 / 1!important;width:1.5rem!important;background-color:currentColor!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important;-webkit-mask-position:center!important;mask-position:center!important;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important;mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-spinner{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-lg{width:2.5rem}:where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0px;top:.75rem;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:\"\"}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, .5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>details>summary):after,.menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}.mockup-code:before{content:\"\";margin-bottom:1rem;display:block;height:.75rem;width:.75rem;border-radius:9999px;opacity:.3;box-shadow:1.4em 0,2.8em 0,4.2em 0}.mockup-code pre{padding-right:1.25rem}.mockup-code pre:before{content:\"\";margin-right:2ch}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:\"\";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:\"\";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal:not(dialog:not(.modal-open)),.modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.modal-action>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.modal-action:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 100rem;--filler-offset: .6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 100rem;--filler-offset: .5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-multiple,.select[multiple],.select[size].select:not([size=\"1\"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}[dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}.steps .step:before{top:0;grid-column-start:1;grid-row-start:1;height:.5rem;width:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:\"\";margin-inline-start:-100%}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;grid-column-start:1;grid-row-start:1;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 1;--tw-text-opacity: 1}.tab:focus{outline:2px solid transparent;outline-offset:2px}.tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}.tab-disabled,.tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}.tabs-lifted>.tab{border:var(--tab-border, 1px) solid transparent;border-width:0 0 var(--tab-border, 1px) 0;border-start-start-radius:var(--tab-radius, .5rem);border-start-end-radius:var(--tab-radius, .5rem);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem);padding-top:var(--tab-border, 1px)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-bottom:var(--tab-border, 1px);padding-top:0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked):before{z-index:1;content:\"\";display:block;position:absolute;width:calc(100% + var(--tab-radius, .5rem) * 2);height:var(--tab-radius, .5rem);bottom:0;background-size:var(--tab-radius, .5rem);background-position:top left,top right;background-repeat:no-repeat;--tab-grad: calc(69% - var(--tab-border, 1px));--radius-start: radial-gradient( circle at top left, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );--radius-end: radial-gradient( circle at top right, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );background-image:var(--radius-start),var(--radius-end)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,.tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:top right}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:top left}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,.tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:top left}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:top right}.tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before{background-image:var(--radius-end);background-position:top right}.tabs-boxed{border-radius:var(--rounded-btn, .5rem);--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding:.25rem}.tabs-boxed .tab{border-radius:var(--rounded-btn, .5rem)}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed :is(input:checked){--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.toast>*{animation:toast-pop .25s ease-out}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}[dir=rtl] .toggle{--handleoffsetcalculator: calc(var(--handleoffset) * 1)}.toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.toggle:hover{background-color:currentColor}.toggle:checked,.toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator: var(--handleoffset);--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}[dir=rtl] .toggle:checked,[dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator: calc(var(--handleoffset) * -1)}.toggle:indeterminate{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}[dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}.toggle-primary:focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}.toggle-primary:checked,.toggle-primary[aria-checked=true]{border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.toggle:disabled{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset, var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}.badge-xs{height:.75rem;font-size:.75rem;line-height:.75rem;padding-left:.313rem;padding-right:.313rem}.badge-sm{height:1rem;font-size:.75rem;line-height:1rem;padding-left:.438rem;padding-right:.438rem}.badge-lg{height:1.5rem;font-size:1rem;line-height:1.5rem;padding-left:.688rem;padding-right:.688rem}.btm-nav-xs>*:where(.active){border-top-width:1px}.btm-nav-sm>*:where(.active){border-top-width:2px}.btm-nav-md>*:where(.active){border-top-width:2px}.btm-nav-lg>*:where(.active){border-top-width:4px}.btn-xs{height:1.5rem;min-height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}[type=checkbox].checkbox-sm{height:1.25rem;width:1.25rem}.indicator :where(.indicator-item){bottom:auto;inset-inline-end:0px;inset-inline-start:auto;top:0;--tw-translate-y: -50%;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-bottom){bottom:0;top:auto;--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-middle){bottom:50%;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-top){bottom:auto;top:0;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.input-sm{height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem;line-height:2rem}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.kbd-xs{padding-left:.25rem;padding-right:.25rem;font-size:.75rem;line-height:1rem;min-height:1.2em;min-width:1.2em}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.select-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:2rem;font-size:.875rem;line-height:2rem}[dir=rtl] .select-sm{padding-left:2rem;padding-right:.75rem}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.tabs-md :where(.tab){height:2rem;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem}.tabs-lg :where(.tab){height:3rem;font-size:1.125rem;line-height:1.75rem;line-height:2;--tab-padding: 1.25rem}.tabs-sm :where(.tab){height:1.5rem;font-size:.875rem;line-height:.75rem;--tab-padding: .75rem}.tabs-xs :where(.tab){height:1.25rem;font-size:.75rem;line-height:.75rem;--tab-padding: .5rem}.textarea-sm{padding:.25rem .75rem;font-size:.875rem;line-height:2rem}:where(.toast){bottom:0;inset-inline-end:0px;inset-inline-start:auto;top:auto;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-bottom){bottom:0;top:auto;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-middle){bottom:auto;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-top){bottom:auto;top:0;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[type=checkbox].toggle-sm{--handleoffset: .75rem;height:1.25rem;width:2rem}.tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}.tooltip:before,.tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.tooltip-right:before{transform:translateY(-50%);top:50%;left:var(--tooltip-offset);right:auto;bottom:auto}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0px;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:0;border-top-right-radius:0}.modal-middle :where(.modal-box){width:91.666667%;max-width:32rem;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:0;border-bottom-left-radius:0}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));content:\"\";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.table-xs :not(thead):not(tfoot) tr{font-size:.75rem;line-height:1rem}.table-xs :where(th,td){padding:.25rem .5rem}.table-sm :not(thead):not(tfoot) tr{font-size:.875rem;line-height:1.25rem}.table-sm :where(th,td){padding:.5rem .75rem}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: .1875rem;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + .0625rem - var(--tooltip-tail))}.tooltip:before,.tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:\"\";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}.tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:hover:after{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:before,.tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.tooltip:after,.tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.tooltip-right:after{transform:translateY(-50%);border-color:transparent var(--tooltip-color) transparent transparent;top:50%;left:calc(var(--tooltip-tail-offset) + .0625rem);right:auto;bottom:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-24{top:6rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-0\\.5{margin-top:-.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-6{margin-left:1.5rem}.ml-8{margin-left:2rem}.mr-1{margin-right:.25rem}.mr-32{margin-right:8rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-12{height:3rem}.h-16{height:4rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[70vh\\]{max-height:70vh}.min-h-0{min-height:0px}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-11\\/12{width:91.666667%}.w-12{width:3rem}.w-16{width:4rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.w-px{width:1px}.min-w-\\[200px\\]{min-width:200px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--rounded-box, 1rem)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}.border-base-content\\/20{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.border-error\\/20{border-color:var(--fallback-er,oklch(var(--er)/.2))}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}.bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.bg-base-300\\/30{background-color:var(--fallback-b3,oklch(var(--b3)/.3))}.bg-base-content{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity, 1)))}.bg-base-content\\/30{background-color:var(--fallback-bc,oklch(var(--bc)/.3))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-error{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity, 1)))}.bg-error\\/10{background-color:var(--fallback-er,oklch(var(--er)/.1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity, 1)))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}.bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.stroke-current{stroke:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-64{padding-left:16rem;padding-right:16rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-32{padding-bottom:8rem}.pl-4{padding-left:1rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}.text-base-content\\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-base-content\\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}.text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity, 1)))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity, 1)))}.text-primary-content{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity, 1)))}.text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.hover\\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\\:opacity-90{opacity:.9}@media (min-width: 768px){.md\\:col-span-3{grid-column:span 3 / span 3}.md\\:inline{display:inline}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:col-span-2{grid-column:span 2 / span 2}.lg\\:col-span-6{grid-column:span 6 / span 6}.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\\:flex{display:flex}.xl\\:hidden{display:none}.xl\\:max-w-md{max-width:28rem}}@media (prefers-color-scheme: dark){.dark\\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\\:hover\\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}}\n",
21254
- "vendor-7HrnnMjF.js": 'function Ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Y,ce;function Ze(){if(ce)return Y;ce=1;var e=function(b){return t(b)&&!n(b)};function t(f){return!!f&&typeof f=="object"}function n(f){var b=Object.prototype.toString.call(f);return b==="[object RegExp]"||b==="[object Date]"||a(f)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function a(f){return f.$$typeof===i}function s(f){return Array.isArray(f)?[]:{}}function o(f,b){return b.clone!==!1&&b.isMergeableObject(f)?H(s(f),f,b):f}function l(f,b,m){return f.concat(b).map(function(_){return o(_,m)})}function u(f,b){if(!b.customMerge)return H;var m=b.customMerge(f);return typeof m=="function"?m:H}function h(f){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f).filter(function(b){return Object.propertyIsEnumerable.call(f,b)}):[]}function p(f){return Object.keys(f).concat(h(f))}function c(f,b){try{return b in f}catch{return!1}}function v(f,b){return c(f,b)&&!(Object.hasOwnProperty.call(f,b)&&Object.propertyIsEnumerable.call(f,b))}function B(f,b,m){var _={};return m.isMergeableObject(f)&&p(f).forEach(function(E){_[E]=o(f[E],m)}),p(b).forEach(function(E){v(f,E)||(c(f,E)&&m.isMergeableObject(b[E])?_[E]=u(E,m)(f[E],b[E],m):_[E]=o(b[E],m))}),_}function H(f,b,m){m=m||{},m.arrayMerge=m.arrayMerge||l,m.isMergeableObject=m.isMergeableObject||e,m.cloneUnlessOtherwiseSpecified=o;var _=Array.isArray(b),E=Array.isArray(f),L=_===E;return L?_?m.arrayMerge(f,b,m):B(f,b,m):o(b,m)}H.all=function(b,m){if(!Array.isArray(b))throw new Error("first argument should be an array");return b.reduce(function(_,E){return H(_,E,m)},{})};var P=H;return Y=P,Y}var We=Ze();const cr=Ye(We);var K=function(e,t){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},K(e,t)};function j(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");K(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var d=function(){return d=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},d.apply(this,arguments)};function $e(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Z(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function W(e,t){var n=t&&t.cache?t.cache:tt,r=t&&t.serializer?t.serializer:Ke,i=t&&t.strategy?t.strategy:Qe;return i(e,{cache:n,serializer:r})}function ze(e){return e==null||typeof e=="number"||typeof e=="boolean"}function qe(e,t,n,r){var i=ze(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function Be(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Ae(e,t,n,r,i){return n.bind(t,e,r,i)}function Qe(e,t){var n=e.length===1?qe:Be;return Ae(e,this,n,t.cache.create(),t.serializer)}function Je(e,t){return Ae(e,this,Be,t.cache.create(),t.serializer)}var Ke=function(){return JSON.stringify(arguments)},et=(function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e})(),tt={create:function(){return new et}},$={variadic:Je},g;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(g||(g={}));var y;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(y||(y={}));var M;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(M||(M={}));function be(e){return e.type===y.literal}function rt(e){return e.type===y.argument}function Pe(e){return e.type===y.number}function Ie(e){return e.type===y.date}function Ne(e){return e.type===y.time}function Oe(e){return e.type===y.select}function Le(e){return e.type===y.plural}function nt(e){return e.type===y.pound}function Re(e){return e.type===y.tag}function Me(e){return!!(e&&typeof e=="object"&&e.type===M.number)}function ee(e){return!!(e&&typeof e=="object"&&e.type===M.dateTime)}var Ce=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,it=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^\']*\'[^\']*\')*[^\']*$)/g;function at(e){var t={};return e.replace(it,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var st=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function ot(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(st).filter(function(c){return c.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],s=a.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var o=s[0],l=s.slice(1),u=0,h=l;u<h.length;u++){var p=h[u];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:o,options:l})}return n}function ht(e){return e.replace(/^(.*?)-/,"")}var pe=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,we=/^(@+)?(\\+|#+)?[rs]?$/g,ut=/(\\*)(0+)|(#+)(0+)|(0+)/g,Ue=/^(0+)$/;function me(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(we,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function Ge(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ft(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Ue.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function ge(e){var t={},n=Ge(e);return n||t}function lt(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=ht(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=d(d(d({},t),{notation:"scientific"}),i.options.reduce(function(l,u){return d(d({},l),ge(u))},{}));continue;case"engineering":t=d(d(d({},t),{notation:"engineering"}),i.options.reduce(function(l,u){return d(d({},l),ge(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(ut,function(l,u,h,p,c,v){if(u)t.minimumIntegerDigits=h.length;else{if(p&&c)throw new Error("We currently do not support maximum integer digits");if(v)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Ue.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(pe.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(pe,function(l,u,h,p,c,v){return h==="*"?t.minimumFractionDigits=u.length:p&&p[0]==="#"?t.maximumFractionDigits=p.length:c&&v?(t.minimumFractionDigits=c.length,t.maximumFractionDigits=c.length+v.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var a=i.options[0];a==="w"?t=d(d({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=d(d({},t),me(a)));continue}if(we.test(i.stem)){t=d(d({},t),me(i.stem));continue}var s=Ge(i.stem);s&&(t=d(d({},t),s));var o=ft(i.stem);o&&(t=d(d({},t),o))}return t}var G={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function ct(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var s=1+(a&1),o=a<2?1:3+(a>>1),l="a",u=bt(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)n+=l;for(;s-- >0;)n=u+n}else i==="J"?n+="H":n+=i}return n}function bt(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=G[r||""]||G[n||""]||G["".concat(n,"-001")]||G["001"];return i[0]}var z,pt=new RegExp("^".concat(Ce.source,"*")),mt=new RegExp("".concat(Ce.source,"*$"));function x(e,t){return{start:e,end:t}}var gt=!!String.prototype.startsWith&&"_a".startsWith("a",1),xt=!!String.fromCodePoint,dt=!!Object.fromEntries,Et=!!String.prototype.codePointAt,yt=!!String.prototype.trimStart,vt=!!String.prototype.trimEnd,Ht=!!Number.isSafeInteger,_t=Ht?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},te=!0;try{var Tt=De("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");te=((z=Tt.exec("a"))===null||z===void 0?void 0:z[0])==="a"}catch{te=!1}var xe=gt?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},re=xt?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,s;i>a;){if(s=t[a++],s>1114111)throw RangeError(s+" is not a valid code point");r+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return r},de=dt?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],s=a[0],o=a[1];n[s]=o}return n},Fe=Et?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},St=yt?function(t){return t.trimStart()}:function(t){return t.replace(pt,"")},Bt=vt?function(t){return t.trimEnd()}:function(t){return t.replace(mt,"")};function De(e,t){return new RegExp(e,t)}var ne;if(te){var Ee=De("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");ne=function(t,n){var r;Ee.lastIndex=n;var i=Ee.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else ne=function(t,n){for(var r=[];;){var i=Fe(t,n);if(i===void 0||Ve(i)||Nt(i))break;r.push(i),n+=i>=65536?2:1}return re.apply(void 0,r)};var At=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var s=this.parseArgument(t,r);if(s.err)return s;i.push(s.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var o=this.clonePosition();this.bump(),i.push({type:y.pound,location:x(o,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(g.UNMATCHED_CLOSING_TAG,x(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&ie(this.peek()||0)){var s=this.parseTag(t,n);if(s.err)return s;i.push(s.val)}else{var s=this.parseLiteral(t,n);if(s.err)return s;i.push(s.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:y.literal,value:"<".concat(i,"/>"),location:x(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var s=a.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ie(this.char()))return this.error(g.INVALID_TAG,x(o,this.clonePosition()));var l=this.clonePosition(),u=this.parseTagName();return i!==u?this.error(g.UNMATCHED_CLOSING_TAG,x(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:y.tag,value:i,children:s,location:x(r,this.clonePosition())},err:null}:this.error(g.INVALID_TAG,x(o,this.clonePosition())))}else return this.error(g.UNCLOSED_TAG,x(r,this.clonePosition()))}else return this.error(g.INVALID_TAG,x(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&It(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var s=this.tryParseUnquoted(t,n);if(s){i+=s;continue}var o=this.tryParseLeftAngleBracket();if(o){i+=o;continue}break}var l=x(r,this.clonePosition());return{val:{type:y.literal,value:i,location:l},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Pt(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"\'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return re.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),re(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(g.EMPTY_ARGUMENT,x(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(g.MALFORMED_ARGUMENT,x(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:y.argument,value:i,location:x(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(g.MALFORMED_ARGUMENT,x(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=ne(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),s=x(t,a);return{value:r,location:s}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,s=this.clonePosition(),o=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(o){case"":return this.error(g.EXPECT_ARGUMENT_TYPE,x(s,l));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var c=Bt(p.val);if(c.length===0)return this.error(g.EXPECT_ARGUMENT_STYLE,x(this.clonePosition(),this.clonePosition()));var v=x(h,this.clonePosition());u={style:c,styleLocation:v}}var B=this.tryParseArgumentClose(i);if(B.err)return B;var H=x(i,this.clonePosition());if(u&&xe(u?.style,"::",0)){var P=St(u.style.slice(2));if(o==="number"){var p=this.parseNumberSkeletonFromString(P,u.styleLocation);return p.err?p:{val:{type:y.number,value:r,location:H,style:p.val},err:null}}else{if(P.length===0)return this.error(g.EXPECT_DATE_TIME_SKELETON,H);var f=P;this.locale&&(f=ct(P,this.locale));var c={type:M.dateTime,pattern:f,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?at(f):{}},b=o==="date"?y.date:y.time;return{val:{type:b,value:r,location:H,style:c},err:null}}}return{val:{type:o==="number"?y.number:o==="date"?y.date:y.time,value:r,location:H,style:(a=u?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(g.EXPECT_SELECT_ARGUMENT_OPTIONS,x(m,d({},m)));this.bumpSpace();var _=this.parseIdentifierIfPossible(),E=0;if(o!=="select"&&_.value==="offset"){if(!this.bumpIf(":"))return this.error(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,x(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),_=this.parseIdentifierIfPossible(),E=p.val}var L=this.tryParsePluralOrSelectOptions(t,o,n,_);if(L.err)return L;var B=this.tryParseArgumentClose(i);if(B.err)return B;var le=x(i,this.clonePosition());return o==="select"?{val:{type:y.select,value:r,options:de(L.val),location:le},err:null}:{val:{type:y.plural,value:r,options:de(L.val),offset:E,pluralType:o==="plural"?"cardinal":"ordinal",location:le},err:null}}default:return this.error(g.INVALID_ARGUMENT_TYPE,x(s,l))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(g.EXPECT_ARGUMENT_CLOSING_BRACE,x(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("\'"))return this.error(g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,x(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ot(t)}catch{return this.error(g.INVALID_NUMBER_SKELETON,n)}return{val:{type:M.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?lt(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,s=!1,o=[],l=new Set,u=i.value,h=i.location;;){if(u.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(g.EXPECT_PLURAL_ARGUMENT_SELECTOR,g.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;h=x(p,this.clonePosition()),u=this.message.slice(p.offset,this.offset())}else break}if(l.has(u))return this.error(n==="select"?g.DUPLICATE_SELECT_ARGUMENT_SELECTOR:g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);u==="other"&&(s=!0),this.bumpSpace();var v=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,x(this.clonePosition(),this.clonePosition()));var B=this.parseMessage(t+1,n,r);if(B.err)return B;var H=this.tryParseArgumentClose(v);if(H.err)return H;o.push([u,{value:B.val,location:x(v,this.clonePosition())}]),l.add(u),this.bumpSpace(),a=this.parseIdentifierIfPossible(),u=a.value,h=a.location}return o.length===0?this.error(n==="select"?g.EXPECT_SELECT_ARGUMENT_SELECTOR:g.EXPECT_PLURAL_ARGUMENT_SELECTOR,x(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(g.MISSING_OTHER_CLAUSE,x(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,s=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)a=!0,s=s*10+(o-48),this.bump();else break}var l=x(i,this.clonePosition());return a?(s*=r,_t(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=Fe(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(xe(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Ve(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function ie(e){return e>=97&&e<=122||e>=65&&e<=90}function Pt(e){return ie(e)||e===47}function It(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Ve(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Nt(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function ae(e){e.forEach(function(t){if(delete t.location,Oe(t)||Le(t))for(var n in t.options)delete t.options[n].location,ae(t.options[n].value);else Pe(t)&&Me(t.style)||(Ie(t)||Ne(t))&&ee(t.style)?delete t.style.location:Re(t)&&ae(t.children)})}function Ot(e,t){t===void 0&&(t={}),t=d({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new At(e,t).parse();if(n.err){var r=SyntaxError(g[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||ae(n.val),n.val}var C;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(C||(C={}));var k=(function(e){j(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),ye=(function(e){j(t,e);function t(n,r,i,a){return e.call(this,\'Invalid values for "\'.concat(n,\'": "\').concat(r,\'". Options are "\').concat(Object.keys(i).join(\'", "\'),\'"\'),C.INVALID_VALUE,a)||this}return t})(k),Lt=(function(e){j(t,e);function t(n,r,i){return e.call(this,\'Value for "\'.concat(n,\'" must be of type \').concat(r),C.INVALID_VALUE,i)||this}return t})(k),Rt=(function(e){j(t,e);function t(n,r){return e.call(this,\'The intl string context variable "\'.concat(n,\'" was not provided to the string "\').concat(r,\'"\'),C.MISSING_VALUE,r)||this}return t})(k),S;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(S||(S={}));function Mt(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==S.literal||n.type!==S.literal?t.push(n):r.value+=n.value,t},[])}function Ct(e){return typeof e=="function"}function X(e,t,n,r,i,a,s){if(e.length===1&&be(e[0]))return[{type:S.literal,value:e[0].value}];for(var o=[],l=0,u=e;l<u.length;l++){var h=u[l];if(be(h)){o.push({type:S.literal,value:h.value});continue}if(nt(h)){typeof a=="number"&&o.push({type:S.literal,value:n.getNumberFormat(t).format(a)});continue}var p=h.value;if(!(i&&p in i))throw new Rt(p,s);var c=i[p];if(rt(h)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),o.push({type:typeof c=="string"?S.literal:S.object,value:c});continue}if(Ie(h)){var v=typeof h.style=="string"?r.date[h.style]:ee(h.style)?h.style.parsedOptions:void 0;o.push({type:S.literal,value:n.getDateTimeFormat(t,v).format(c)});continue}if(Ne(h)){var v=typeof h.style=="string"?r.time[h.style]:ee(h.style)?h.style.parsedOptions:r.time.medium;o.push({type:S.literal,value:n.getDateTimeFormat(t,v).format(c)});continue}if(Pe(h)){var v=typeof h.style=="string"?r.number[h.style]:Me(h.style)?h.style.parsedOptions:void 0;v&&v.scale&&(c=c*(v.scale||1)),o.push({type:S.literal,value:n.getNumberFormat(t,v).format(c)});continue}if(Re(h)){var B=h.children,H=h.value,P=i[H];if(!Ct(P))throw new Lt(H,"function",s);var f=X(B,t,n,r,i,a),b=P(f.map(function(E){return E.value}));Array.isArray(b)||(b=[b]),o.push.apply(o,b.map(function(E){return{type:typeof E=="string"?S.literal:S.object,value:E}}))}if(Oe(h)){var m=h.options[c]||h.options.other;if(!m)throw new ye(h.value,c,Object.keys(h.options),s);o.push.apply(o,X(m.value,t,n,r,i));continue}if(Le(h)){var m=h.options["=".concat(c)];if(!m){if(!Intl.PluralRules)throw new k(`Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n`,C.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:h.pluralType}).select(c-(h.offset||0));m=h.options[_]||h.options.other}if(!m)throw new ye(h.value,c,Object.keys(h.options),s);o.push.apply(o,X(m.value,t,n,r,i,c-(h.offset||0)));continue}}return Mt(o)}function wt(e,t){return t?d(d(d({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=d(d({},e[r]),t[r]||{}),n},{})):e}function Ut(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=wt(e[r],t[r]),n},d({},e)):e}function q(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Gt(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:W(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Z([void 0],n,!1)))},{cache:q(e.number),strategy:$.variadic}),getDateTimeFormat:W(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Z([void 0],n,!1)))},{cache:q(e.dateTime),strategy:$.variadic}),getPluralRules:W(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Z([void 0],n,!1)))},{cache:q(e.pluralRules),strategy:$.variadic})}}var br=(function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(l){var u=a.formatToParts(l);if(u.length===1)return u[0].value;var h=u.reduce(function(p,c){return!p.length||c.type!==S.literal||typeof p[p.length-1]!="string"?p.push(c.value):p[p.length-1]+=c.value,p},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(l){return X(a.ast,a.locales,a.formatters,a.formats,l,void 0,a.message)},this.resolvedOptions=function(){var l;return{locale:((l=a.resolvedLocale)===null||l===void 0?void 0:l.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=i||{};s.formatters;var o=$e(s,["formatters"]);this.ast=e.__parse(t,d(d({},o),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ut(e.formats,r),this.formatters=i&&i.formatters||Gt(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Ot,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})();/*!\n * @kurkle/color v0.3.4\n * https://github.com/kurkle/color#readme\n * (c) 2024 Jukka Kurkela\n * Released under the MIT License\n */function U(e){return e+.5|0}const N=(e,t,n)=>Math.max(Math.min(e,n),t);function w(e){return N(U(e*2.55),0,255)}function O(e){return N(U(e*255),0,255)}function I(e){return N(U(e/2.55)/100,0,1)}function ve(e){return N(U(e*100),0,100)}const A={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},se=[..."0123456789ABCDEF"],Ft=e=>se[e&15],Dt=e=>se[(e&240)>>4]+se[e&15],F=e=>(e&240)>>4===(e&15),Vt=e=>F(e.r)&&F(e.g)&&F(e.b)&&F(e.a);function Xt(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&A[e[1]]*17,g:255&A[e[2]]*17,b:255&A[e[3]]*17,a:t===5?A[e[4]]*17:255}:(t===7||t===9)&&(n={r:A[e[1]]<<4|A[e[2]],g:A[e[3]]<<4|A[e[4]],b:A[e[5]]<<4|A[e[6]],a:t===9?A[e[7]]<<4|A[e[8]]:255})),n}const jt=(e,t)=>e<255?t(e):"";function kt(e){var t=Vt(e)?Ft:Dt;return e?"#"+t(e.r)+t(e.g)+t(e.b)+jt(e.a,t):void 0}const Yt=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Xe(e,t,n){const r=t*Math.min(n,1-n),i=(a,s=(a+e/30)%12)=>n-r*Math.max(Math.min(s-3,9-s,1),-1);return[i(0),i(8),i(4)]}function Zt(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function Wt(e,t,n){const r=Xe(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function $t(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function he(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),s=Math.min(n,r,i),o=(a+s)/2;let l,u,h;return a!==s&&(h=a-s,u=o>.5?h/(2-a-s):h/(a+s),l=$t(n,r,i,h,a),l=l*60+.5),[l|0,u||0,o]}function ue(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(O)}function fe(e,t,n){return ue(Xe,e,t,n)}function zt(e,t,n){return ue(Wt,e,t,n)}function qt(e,t,n){return ue(Zt,e,t,n)}function je(e){return(e%360+360)%360}function Qt(e){const t=Yt.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?w(+t[5]):O(+t[5]));const i=je(+t[2]),a=+t[3]/100,s=+t[4]/100;return t[1]==="hwb"?r=zt(i,a,s):t[1]==="hsv"?r=qt(i,a,s):r=fe(i,a,s),{r:r[0],g:r[1],b:r[2],a:n}}function Jt(e,t){var n=he(e);n[0]=je(n[0]+t),n=fe(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Kt(e){if(!e)return;const t=he(e),n=t[0],r=ve(t[1]),i=ve(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${I(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const He={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},_e={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function er(){const e={},t=Object.keys(_e),n=Object.keys(He);let r,i,a,s,o;for(r=0;r<t.length;r++){for(s=o=t[r],i=0;i<n.length;i++)a=n[i],o=o.replace(a,He[a]);a=parseInt(_e[s],16),e[o]=[a>>16&255,a>>8&255,a&255]}return e}let D;function tr(e){D||(D=er(),D.transparent=[0,0,0,0]);const t=D[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const rr=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function nr(e){const t=rr.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const s=+t[7];n=t[8]?w(s):N(s*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?w(r):N(r,0,255)),i=255&(t[4]?w(i):N(i,0,255)),a=255&(t[6]?w(a):N(a,0,255)),{r,g:i,b:a,a:n}}}function ir(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${I(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Q=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,R=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function ar(e,t,n){const r=R(I(e.r)),i=R(I(e.g)),a=R(I(e.b));return{r:O(Q(r+n*(R(I(t.r))-r))),g:O(Q(i+n*(R(I(t.g))-i))),b:O(Q(a+n*(R(I(t.b))-a))),a:e.a+n*(t.a-e.a)}}function V(e,t,n){if(e){let r=he(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=fe(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function ke(e,t){return e&&Object.assign(t||{},e)}function Te(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=O(e[3]))):(t=ke(e,{r:0,g:0,b:0,a:1}),t.a=O(t.a)),t}function sr(e){return e.charAt(0)==="r"?nr(e):Qt(e)}class oe{constructor(t){if(t instanceof oe)return t;const n=typeof t;let r;n==="object"?r=Te(t):n==="string"&&(r=Xt(t)||tr(t)||sr(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=ke(this._rgb);return t&&(t.a=I(t.a)),t}set rgb(t){this._rgb=Te(t)}rgbString(){return this._valid?ir(this._rgb):void 0}hexString(){return this._valid?kt(this._rgb):void 0}hslString(){return this._valid?Kt(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const s=n===a?.5:n,o=2*s-1,l=r.a-i.a,u=((o*l===-1?o:(o+l)/(1+o*l))+1)/2;a=1-u,r.r=255&u*r.r+a*i.r+.5,r.g=255&u*r.g+a*i.g+.5,r.b=255&u*r.b+a*i.b+.5,r.a=s*r.a+(1-s)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=ar(this._rgb,t._rgb,n)),this}clone(){return new oe(this.rgb)}alpha(t){return this._rgb.a=O(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=U(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return V(this._rgb,2,t),this}darken(t){return V(this._rgb,2,-t),this}saturate(t){return V(this._rgb,1,t),this}desaturate(t){return V(this._rgb,1,-t),this}rotate(t){return Jt(this._rgb,t),this}}const T=[];for(let e=0;e<256;++e)T.push((e+256).toString(16).slice(1));function or(e,t=0){return(T[e[t+0]]+T[e[t+1]]+T[e[t+2]]+T[e[t+3]]+"-"+T[e[t+4]]+T[e[t+5]]+"-"+T[e[t+6]]+T[e[t+7]]+"-"+T[e[t+8]]+T[e[t+9]]+"-"+T[e[t+10]]+T[e[t+11]]+T[e[t+12]]+T[e[t+13]]+T[e[t+14]]+T[e[t+15]]).toLowerCase()}let J;const hr=new Uint8Array(16);function ur(){if(!J){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");J=crypto.getRandomValues.bind(crypto)}return J(hr)}const fr=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Se={randomUUID:fr};function lr(e,t,n){e=e||{};const r=e.random??e.rng?.()??ur();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,or(r)}function pr(e,t,n){return Se.randomUUID&&!e?Se.randomUUID():lr(e)}export{oe as C,br as I,cr as d,pr as v};\n',
21250
+ "index-BFVayO0q.js": `import{r as Ip,g as r0,i as i0,$ as Ap,w as Zn,d as Fp,S as Nt,a as Ut,s as Vt,L as u0,b as H,c as yt,t as st,e as et,f as L,m as Ct,h as r,j as Et,k as o,l as Dt,o as Hs,n as Xn,D as f0,B as c0,p as v,q as Gl,u as Kl,v as t,x as _,y as h,z as Rt,A as ot,E as re,F as Mu,G as vt,H as le,I as V,J as Y,K as ut,M as Gt,N as oa,O as Mt,P as Ul,Q as dl,R as Sl,T as Ml,U as kt,V as Rl,W as pl,X as sa,Y as zp,Z as Cs,_ as Ru,a0 as Op,a1 as ta,a2 as Yr,a3 as e1,a4 as d0,a5 as p0,a6 as h0}from"./vendor-C5kRSwys.js";import{C as qu,a as Np,b as Up,P as m0,c as g0,p as _0,d as Hu,e as Lu,A as b0,f as v0}from"./vendor-charts-Bo4qyjB7.js";import{s as k0}from"./vendor-lodash-CRdCilnf.js";(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function e(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=e(a);fetch(a.href,i)}})();const w0="modulepreload",y0=function(l){return"/__ui/"+l},t1={},Vp=function(s,e,n){let a=Promise.resolve();if(e&&e.length>0){let u=function(d){return Promise.all(d.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");a=u(e.map(d=>{if(d=y0(d),d in t1)return;t1[d]=!0;const p=d.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(\`link[href="\${d}"]\${m}\`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":w0,p||(g.as="script"),g.crossOrigin="",g.href=d,f&&g.setAttribute("nonce",f),document.head.appendChild(g),p)return new Promise((b,k)=>{g.addEventListener("load",b),g.addEventListener("error",()=>k(new Error(\`Unable to preload CSS for \${d}\`)))})}))}function i(u){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=u,window.dispatchEvent(c),!c.defaultPrevented)throw u}return a.then(u=>{for(const c of u||[])c.status==="rejected"&&i(c.reason);return s().catch(i)})},Jp="zh-CN",Wp="locale",Qr=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];Ip("zh-CN",()=>Vp(()=>import("./zh-CN-wPD53IzZ.js"),[]));Ip("en",()=>Vp(()=>import("./en-D_EcykrR.js"),[]));function C0(){return typeof localStorage<"u"?localStorage.getItem(Wp):null}function E0(l){typeof localStorage<"u"&&localStorage.setItem(Wp,l)}function T0(l){Ap.set(l),E0(l)}const S0=C0(),M0=r0(),R0=S0||M0||Jp;i0({fallbackLocale:Jp,initialLocale:R0});const na="bungee_auth_token",Gp=Zn(typeof window<"u"?localStorage.getItem(na):null),ei=Zn(typeof window<"u"?!!localStorage.getItem(na):!1),l1=Zn(!1);function q0(l){typeof window>"u"||(localStorage.setItem(na,l),Gp.set(l),ei.set(!0))}function Kp(){typeof window>"u"||(localStorage.removeItem(na),Gp.set(null),ei.set(!1))}function Yp(){return typeof window>"u"?null:localStorage.getItem(na)}const H0="/__ui/api";async function Zr(l,s){const e=\`\${H0}\${l}\`,n=Yp(),a={"Content-Type":"application/json",...s?.headers};n&&(a.Authorization=\`Bearer \${n}\`);const i=await fetch(e,{...s,headers:a});if(i.status===401)throw Kp(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!i.ok){const c=await i.json().catch(()=>({error:"Unknown error"}));throw new Error(c.error||\`Request failed with status \${i.status}\`)}return await i.json()}const yl={get:l=>Zr(l),post:(l,s)=>Zr(l,{method:"POST",body:JSON.stringify(s)}),put:(l,s)=>Zr(l,{method:"PUT",body:JSON.stringify(s)}),delete:l=>Zr(l,{method:"DELETE"})};async function Pu(){return yl.get("/config")}async function L0(l){return yl.put("/config",l)}async function P0(l){return yl.post("/config/validate",l)}async function j0(l="1h"){return yl.get(\`/stats/history/v2?range=\${l}\`)}async function D0(l="1h"){return yl.get(\`/stats/upstream-status-codes?range=\${l}\`)}async function s1(l="1h",s="all"){return yl.get(\`/stats/upstream-stats?range=\${l}&type=\${s}\`)}const o1=typeof window<"u";function B0(){const{subscribe:l,set:s}=Zn({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let e=null,n=null,a=!1;function i(){if(!o1)return;const f=document.createElement("div");f.className="text-base-content",f.style.position="absolute",f.style.visibility="hidden",document.body.appendChild(f);const d=getComputedStyle(f).color;document.body.removeChild(f);const p=d.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/);if(p){const m=parseInt(p[1]),g=parseInt(p[2]),b=parseInt(p[3]),w=(m*299+g*587+b*114)/1e3<128?.2:.15,C=\`rgba(\${m}, \${g}, \${b}, \${w})\`;s({textColor:d,gridColor:C})}else s({textColor:"rgba(100, 100, 100, 0.9)",gridColor:"rgba(100, 100, 100, 0.2)"})}function u(){if(!o1||a)return;a=!0,i(),e=new MutationObserver(()=>{i()}),e.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),n=window.matchMedia("(prefers-color-scheme: dark)");const f=()=>i();n.addEventListener("change",f),typeof window<"u"&&window.addEventListener("beforeunload",()=>{c()})}function c(){e&&(e.disconnect(),e=null),n&&(n.removeEventListener("change",i),n=null),a=!1}return{subscribe:l,init:u,cleanup:c}}const zs=B0();Fp(zs,l=>l.textColor);Fp(zs,l=>l.gridColor);function ju(l,s,e=!0){return{display:e&&!!l,text:l,color:s,font:{size:16,weight:"bold"}}}function I0(l,s={}){const{position:e="top",display:n=!0,padding:a=15,fontSize:i=11}=s;return{display:n,position:e,labels:{padding:a,font:{size:i},color:l}}}function ti(l,s,e={}){const{stacked:n=!1,beginAtZero:a=!0,fontSize:i=11,maxRotation:u,minRotation:c,title:f}=e,d={stacked:n,beginAtZero:a,ticks:{font:{size:i},color:l},grid:{color:s}};return f&&(d.title={display:f.display,text:f.text,color:l}),u!==void 0&&(d.ticks.maxRotation=u),c!==void 0&&(d.ticks.minRotation=c),d}function Qp(l="index",s=!1){return{mode:l,intersect:s}}const $r=new Map,la=new Map;function Zp(l){return $r.has(l)||$r.set(l,Zn({activeIndex:null})),$r.get(l)}function A0(l,s){la.has(l)||la.set(l,new Set),la.get(l).add(s)}function F0(l,s){const e=la.get(l);e&&(e.delete(s),e.size===0&&(la.delete(l),$r.delete(l)))}function n1(l,s,e){Zp(l).set({activeIndex:s,sourceChartId:e})}function z0(l){let s=null,e=!1;return{id:\`chartSync-\${l}-\${Math.random().toString(36).substring(2,11)}\`,afterInit(a){A0(l,a),s=Zp(l).subscribe(u=>{e||(u.activeIndex!==null&&u.sourceChartId!==a.id?O0(a,u.activeIndex):u.activeIndex===null&&N0(a))})},afterEvent(a,i){const u=i.event;if(u.type==="mousemove"){const c=a.getElementsAtEventForMode(u,"index",{axis:"x",intersect:!1},!1);if(c.length>0){const f=c[0].index;n1(l,f,a.id),i.changed=!0}}else u.type==="mouseout"&&(n1(l,null,a.id),i.changed=!0)},destroy(a){e=!0,s&&(s(),s=null),F0(l,a)}}}function O0(l,s){try{if(!l||!l.ctx||!l.tooltip||!l.data.datasets||l.data.datasets.length===0)return;const e=[];for(let n=0;n<l.data.datasets.length;n++){const a=l.data.datasets[n];if(!a.data||s<0||s>=a.data.length)continue;const i=l.getDatasetMeta(n);!i||!i.controller||!i.data||!i.data[s]||e.push({datasetIndex:n,index:s})}if(e.length===0)return;l.tooltip.setActiveElements(e,{x:0,y:0}),l.update("none")}catch(e){console.debug("Chart sync: tooltip update failed (chart may be destroying)",e)}}function N0(l){try{if(!l||!l.ctx||!l.tooltip)return;l.tooltip.setActiveElements([],{x:0,y:0}),l.update("none")}catch(s){console.debug("Chart sync: tooltip hide failed (chart may be destroying)",s)}}function U0(l){let s,e,n;return e=new u0({props:{data:l[2],options:l[1],plugins:l[0]}}),{c(){s=r("div"),Et(e.$$.fragment),o(s,"class","w-full h-full")},m(a,i){L(a,s,i),Ct(e,s,null),n=!0},p(a,[i]){const u={};i&4&&(u.data=a[2]),i&2&&(u.options=a[1]),i&1&&(u.plugins=a[0]),e.$set(u)},i(a){n||(et(e.$$.fragment,a),n=!0)},o(a){st(e.$$.fragment,a),n=!1},d(a){a&&H(s),yt(e)}}}function V0(l,s,e){let n,a,i,u;Dt(l,zs,g=>e(8,u=g)),qu.register(Np,Up,m0,g0,_0,Hu,Lu);let{title:c}=s,{labels:f}=s,{datasets:d}=s,{yAxisLabel:p=""}=s,{syncGroup:m=void 0}=s;return Hs(()=>{zs.init()}),Xn(()=>{zs.cleanup()}),l.$$set=g=>{"title"in g&&e(3,c=g.title),"labels"in g&&e(4,f=g.labels),"datasets"in g&&e(5,d=g.datasets),"yAxisLabel"in g&&e(6,p=g.yAxisLabel),"syncGroup"in g&&e(7,m=g.syncGroup)},l.$$.update=()=>{l.$$.dirty&48&&e(2,n={labels:f,datasets:d.map(g=>({...g,borderColor:g.borderColor||"rgb(75, 192, 192)",backgroundColor:g.backgroundColor||"rgba(75, 192, 192, 0.2)",tension:g.tension??.4}))}),l.$$.dirty&360&&e(1,a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:d.length>1,position:"top",labels:{color:u.textColor}},title:ju(c,u.textColor,!0),tooltip:Qp("index",!1)},scales:{y:ti(u.textColor,u.gridColor,{beginAtZero:!0,title:p?{display:!0,text:p}:void 0}),x:{...ti(u.textColor,u.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:u.textColor}}},interaction:{mode:"index",axis:"x",intersect:!1}}),l.$$.dirty&128&&e(0,i=m?[z0(m)]:[])},[i,a,n,c,f,d,p,m,u]}class Xr extends Nt{constructor(s){super(),Ut(this,s,V0,U0,Vt,{title:3,labels:4,datasets:5,yAxisLabel:6,syncGroup:7})}}function J0(l){let s,e,n;return e=new f0({props:{data:l[1],options:l[0]}}),{c(){s=r("div"),Et(e.$$.fragment),o(s,"class","w-full h-full")},m(a,i){L(a,s,i),Ct(e,s,null),n=!0},p(a,[i]){const u={};i&2&&(u.data=a[1]),i&1&&(u.options=a[0]),e.$set(u)},i(a){n||(et(e.$$.fragment,a),n=!0)},o(a){st(e.$$.fragment,a),n=!1},d(a){a&&H(s),yt(e)}}}function W0(l,s,e){let n,a,i;Dt(l,zs,f=>e(4,i=f)),qu.register(b0,Hu,Lu);let{data:u=[]}=s,{title:c=""}=s;return Hs(()=>{zs.init()}),Xn(()=>{zs.cleanup()}),l.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},l.$$.update=()=>{l.$$.dirty&20&&e(1,n={labels:u.map(f=>f.label),datasets:[{data:u.map(f=>f.value),backgroundColor:["rgba(59, 130, 246, 0.8)","rgba(16, 185, 129, 0.8)","rgba(245, 158, 11, 0.8)","rgba(239, 68, 68, 0.8)","rgba(168, 85, 247, 0.8)","rgba(236, 72, 153, 0.8)","rgba(20, 184, 166, 0.8)","rgba(251, 146, 60, 0.8)","rgba(132, 204, 22, 0.8)","rgba(148, 163, 184, 0.8)"],borderColor:i.gridColor,borderWidth:1}]}),l.$$.dirty&28&&e(0,a={responsive:!0,maintainAspectRatio:!1,plugins:{title:ju(c,i.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:i.textColor,generateLabels:f=>{const p=f.data.datasets[0].backgroundColor,m=f.getDatasetMeta(0);return f.data.labels?.map((g,b)=>{const k=m.data[b],w=k&&typeof k.hidden<"u"?k.hidden:!1;return{text:\`\${g} (\${u[b]?.percentage||0}%)\`,fillStyle:p[b],strokeStyle:p[b],fontColor:i.textColor,hidden:w,index:b,datasetIndex:0}})||[]}},onClick:(f,d,p)=>{const m=d.index,g=p.chart,b=g.getDatasetMeta(0);b.data[m].hidden=!b.data[m].hidden,g.update()}},tooltip:{callbacks:{label:f=>{const d=f.label||"",p=f.parsed||0,m=u[f.dataIndex]?.percentage||0;return\`\${d}: \${p} (\${m}%)\`}}}}})},[a,n,u,c,i]}class Xp extends Nt{constructor(s){super(),Ut(this,s,W0,J0,Vt,{data:2,title:3})}}function G0(l){let s,e,n;return e=new c0({props:{data:l[1],options:l[0]}}),{c(){s=r("div"),Et(e.$$.fragment),o(s,"class","w-full h-full")},m(a,i){L(a,s,i),Ct(e,s,null),n=!0},p(a,[i]){const u={};i&2&&(u.data=a[1]),i&1&&(u.options=a[0]),e.$set(u)},i(a){n||(et(e.$$.fragment,a),n=!0)},o(a){st(e.$$.fragment,a),n=!1},d(a){a&&H(s),yt(e)}}}function K0(l,s,e){let n,a,i;Dt(l,zs,f=>e(4,i=f)),qu.register(v0,Np,Up,Hu,Lu);let{data:u=[]}=s,{title:c=""}=s;return Hs(()=>{zs.init()}),Xn(()=>{zs.cleanup()}),l.$$set=f=>{"data"in f&&e(2,u=f.data),"title"in f&&e(3,c=f.title)},l.$$.update=()=>{l.$$.dirty&4&&e(1,n={labels:u.map(f=>f.label),datasets:[{label:"2xx",data:u.map(f=>f.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:u.map(f=>f.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:u.map(f=>f.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:u.map(f=>f.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),l.$$.dirty&24&&e(0,a={responsive:!0,maintainAspectRatio:!1,scales:{x:ti(i.textColor,i.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:ti(i.textColor,i.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:ju(c,i.textColor),legend:I0(i.textColor,{position:"top",padding:15,fontSize:11}),tooltip:Qp("index",!1)}})},[a,n,u,c,i]}class Y0 extends Nt{constructor(s){super(),Ut(this,s,K0,G0,Vt,{data:2,title:3})}}function Q0(l){let s,e,n,a,i,u=l[11]("monitoring.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(s,"class","alert alert-info")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("monitoring.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function Z0(l){let s,e,n,a,i=l[11]("monitoring.charts.requestsTrend")+"",u,c,f,d,p,m,g,b,k=l[11]("monitoring.charts.responseTimeTrend")+"",w,C,E,y,T,M,R,j,P=l[11]("monitoring.charts.successRateTrend")+"",I,q,D,A,N,Z,Q,x,z=l[11]("monitoring.charts.errorsTrend")+"",K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge=l[11]("dashboard.upstreamFailures")+"",he,ye,ze,Pe,we,Fe,Je,je,Le,Se=l[11]("dashboard.upstreamStatusCodes")+"",fe,_e,Ie,De,se,ke;d=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.periodRequests"),data:l[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.requests"),syncGroup:"monitoring-trends"}}),y=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.avgResponseTime"),data:l[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.milliseconds"),syncGroup:"monitoring-trends"}}),A=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.successRate"),data:l[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.percentage"),syncGroup:"monitoring-trends"}}),U=new Xr({props:{labels:l[10],datasets:[{label:l[11]("monitoring.charts.periodErrors"),data:l[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}],yAxisLabel:l[11]("monitoring.charts.errors"),syncGroup:"monitoring-trends"}});const me=[e2,$0],Ee=[];function Ve(de,Te){return de[5].length>0?0:1}te=Ve(l),ae=Ee[te]=me[te](l);const Be=[l2,t2],nt=[];function Ne(de,Te){return de[4].length>0?0:1}Pe=Ne(l),we=nt[Pe]=Be[Pe](l);const Qe=[o2,s2],Ye=[];function ve(de,Te){return de[3].length>0?0:1}return De=ve(l),se=Ye[De]=Qe[De](l),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h3"),u=_(i),c=h(),f=r("div"),Et(d.$$.fragment),p=h(),m=r("div"),g=r("div"),b=r("h3"),w=_(k),C=h(),E=r("div"),Et(y.$$.fragment),T=h(),M=r("div"),R=r("div"),j=r("h3"),I=_(P),q=h(),D=r("div"),Et(A.$$.fragment),N=h(),Z=r("div"),Q=r("div"),x=r("h3"),K=_(z),S=h(),B=r("div"),Et(U.$$.fragment),F=h(),J=r("div"),ie=r("div"),ue=r("h3"),ue.textContent="\u4E0A\u6E38\u6210\u529F\u7EDF\u8BA1",ne=h(),$=r("div"),ae.c(),ee=h(),G=r("div"),pe=r("div"),oe=r("h3"),he=_(ge),ye=h(),ze=r("div"),we.c(),Fe=h(),Je=r("div"),je=r("div"),Le=r("h3"),fe=_(Se),_e=h(),Ie=r("div"),se.c(),o(a,"class","text-base font-semibold mb-3"),o(f,"class","h-64"),o(n,"class","card-body p-4"),o(e,"class","card bg-base-100 shadow-xl"),o(b,"class","text-base font-semibold mb-3"),o(E,"class","h-64"),o(g,"class","card-body p-4"),o(m,"class","card bg-base-100 shadow-xl"),o(j,"class","text-base font-semibold mb-3"),o(D,"class","h-64"),o(R,"class","card-body p-4"),o(M,"class","card bg-base-100 shadow-xl"),o(x,"class","text-base font-semibold mb-3"),o(B,"class","h-64"),o(Q,"class","card-body p-4"),o(Z,"class","card bg-base-100 shadow-xl"),o(ue,"class","text-base font-semibold mb-3"),o($,"class","h-64"),o(ie,"class","card-body p-4"),o(J,"class","card bg-base-100 shadow-xl"),o(oe,"class","text-base font-semibold mb-3"),o(ze,"class","h-64"),o(pe,"class","card-body p-4"),o(G,"class","card bg-base-100 shadow-xl"),o(Le,"class","text-base font-semibold mb-3"),o(Ie,"class","h-64"),o(je,"class","card-body p-4"),o(Je,"class","card bg-base-100 shadow-xl lg:col-span-2"),o(s,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(de,Te){L(de,s,Te),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),Ct(d,f,null),t(s,p),t(s,m),t(m,g),t(g,b),t(b,w),t(g,C),t(g,E),Ct(y,E,null),t(s,T),t(s,M),t(M,R),t(R,j),t(j,I),t(R,q),t(R,D),Ct(A,D,null),t(s,N),t(s,Z),t(Z,Q),t(Q,x),t(x,K),t(Q,S),t(Q,B),Ct(U,B,null),t(s,F),t(s,J),t(J,ie),t(ie,ue),t(ie,ne),t(ie,$),Ee[te].m($,null),t(s,ee),t(s,G),t(G,pe),t(pe,oe),t(oe,he),t(pe,ye),t(pe,ze),nt[Pe].m(ze,null),t(s,Fe),t(s,Je),t(Je,je),t(je,Le),t(Le,fe),t(je,_e),t(je,Ie),Ye[De].m(Ie,null),ke=!0},p(de,Te){(!ke||Te&2048)&&i!==(i=de[11]("monitoring.charts.requestsTrend")+"")&&v(u,i);const Ze={};Te&1024&&(Ze.labels=de[10]),Te&2560&&(Ze.datasets=[{label:de[11]("monitoring.charts.periodRequests"),data:de[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),Te&2048&&(Ze.yAxisLabel=de[11]("monitoring.charts.requests")),d.$set(Ze),(!ke||Te&2048)&&k!==(k=de[11]("monitoring.charts.responseTimeTrend")+"")&&v(w,k);const Me={};Te&1024&&(Me.labels=de[10]),Te&2176&&(Me.datasets=[{label:de[11]("monitoring.charts.avgResponseTime"),data:de[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),Te&2048&&(Me.yAxisLabel=de[11]("monitoring.charts.milliseconds")),y.$set(Me),(!ke||Te&2048)&&P!==(P=de[11]("monitoring.charts.successRateTrend")+"")&&v(I,P);const Ue={};Te&1024&&(Ue.labels=de[10]),Te&2112&&(Ue.datasets=[{label:de[11]("monitoring.charts.successRate"),data:de[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),Te&2048&&(Ue.yAxisLabel=de[11]("monitoring.charts.percentage")),A.$set(Ue),(!ke||Te&2048)&&z!==(z=de[11]("monitoring.charts.errorsTrend")+"")&&v(K,z);const Ce={};Te&1024&&(Ce.labels=de[10]),Te&2304&&(Ce.datasets=[{label:de[11]("monitoring.charts.periodErrors"),data:de[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),Te&2048&&(Ce.yAxisLabel=de[11]("monitoring.charts.errors")),U.$set(Ce);let mt=te;te=Ve(de),te===mt?Ee[te].p(de,Te):(Gl(),st(Ee[mt],1,1,()=>{Ee[mt]=null}),Kl(),ae=Ee[te],ae?ae.p(de,Te):(ae=Ee[te]=me[te](de),ae.c()),et(ae,1),ae.m($,null)),(!ke||Te&2048)&&ge!==(ge=de[11]("dashboard.upstreamFailures")+"")&&v(he,ge);let Ge=Pe;Pe=Ne(de),Pe===Ge?nt[Pe].p(de,Te):(Gl(),st(nt[Ge],1,1,()=>{nt[Ge]=null}),Kl(),we=nt[Pe],we?we.p(de,Te):(we=nt[Pe]=Be[Pe](de),we.c()),et(we,1),we.m(ze,null)),(!ke||Te&2048)&&Se!==(Se=de[11]("dashboard.upstreamStatusCodes")+"")&&v(fe,Se);let ce=De;De=ve(de),De===ce?Ye[De].p(de,Te):(Gl(),st(Ye[ce],1,1,()=>{Ye[ce]=null}),Kl(),se=Ye[De],se?se.p(de,Te):(se=Ye[De]=Qe[De](de),se.c()),et(se,1),se.m(Ie,null))},i(de){ke||(et(d.$$.fragment,de),et(y.$$.fragment,de),et(A.$$.fragment,de),et(U.$$.fragment,de),et(ae),et(we),et(se),ke=!0)},o(de){st(d.$$.fragment,de),st(y.$$.fragment,de),st(A.$$.fragment,de),st(U.$$.fragment,de),st(ae),st(we),st(se),ke=!1},d(de){de&&H(s),yt(d),yt(y),yt(A),yt(U),Ee[te].d(),nt[Pe].d(),Ye[De].d()}}}function X0(l){let s,e,n,a,i,u=l[11]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[1]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m&2048&&u!==(u=p[11]("common.error")+"")&&v(c,u),m&2&&v(d,p[1])},i:ot,o:ot,d(p){p&&H(s)}}}function x0(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function $0(l){let s,e,n,a,i,u=l[11]("dashboard.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(s,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function e2(l){let s,e;return s=new Xp({props:{data:l[5]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&32&&(i.data=n[5]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function t2(l){let s,e,n,a,i,u=l[11]("dashboard.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(s,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function l2(l){let s,e;return s=new Xp({props:{data:l[4]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&16&&(i.data=n[4]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function s2(l){let s,e,n,a,i,u=l[11]("dashboard.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","1.5"),o(n,"d","M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-12 w-12"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm"),o(s,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&2048&&u!==(u=f[11]("dashboard.noData")+"")&&v(c,u)},i:ot,o:ot,d(f){f&&H(s)}}}function o2(l){let s,e;return s=new Y0({props:{data:l[3]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&8&&(i.data=n[3]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function n2(l){let s,e,n,a=l[11]("monitoring.title")+"",i,u,c,f,d;const p=[x0,X0,Z0,Q0],m=[];function g(b,k){return b[2]&&!b[0]?0:b[1]?1:b[0]&&b[0].timestamps.length>0?2:3}return c=g(l),f=m[c]=p[c](l),{c(){s=r("div"),e=r("div"),n=r("h2"),i=_(a),u=h(),f.c(),o(n,"class","text-2xl font-bold"),o(s,"class","space-y-6")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(n,i),t(s,u),m[c].m(s,null),d=!0},p(b,[k]){(!d||k&2048)&&a!==(a=b[11]("monitoring.title")+"")&&v(i,a);let w=c;c=g(b),c===w?m[c].p(b,k):(Gl(),st(m[w],1,1,()=>{m[w]=null}),Kl(),f=m[c],f?f.p(b,k):(f=m[c]=p[c](b),f.c()),et(f,1),f.m(s,null))},i(b){d||(et(f),d=!0)},o(b){st(f),d=!1},d(b){b&&H(s),m[c].d()}}}function a2(l,s,e){let n,a,i,u,c,f,d,p,m;Dt(l,Rt,I=>e(11,m=I));let{selectedRange:g="1h"}=s,{onDataLoaded:b=()=>{}}=s,k=null,w=!0,C=null,E,y=[],T=[],M=[];async function R(){try{e(2,w=!0),e(0,k=await j0(g)),e(1,C=null)}catch(I){e(1,C=I.message)}finally{e(2,w=!1)}}async function j(){try{const[I,q,D]=await Promise.all([s1(g,"success"),s1(g,"failure"),D0(g)]);e(14,y=I.data),e(15,T=q.data),e(16,M=D.data)}catch(I){console.error("Failed to load upstream stats:",I)}finally{}}async function P(){await Promise.all([R(),j()])}return Hs(()=>{P(),E=setInterval(P,3e4)}),Xn(()=>{E&&clearInterval(E)}),l.$$set=I=>{"selectedRange"in I&&e(12,g=I.selectedRange),"onDataLoaded"in I&&e(13,b=I.onDataLoaded)},l.$$.update=()=>{l.$$.dirty&4096&&g&&P(),l.$$.dirty&8195&&(k!==null||C!==null)&&b(C?null:k),l.$$.dirty&4097&&e(10,n=k?.timestamps.map(I=>{const q=new Date(I);switch(g){case"1h":return q.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return q.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return q.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return q.toLocaleTimeString("zh-CN")}})||[]),l.$$.dirty&1&&e(9,a=k?.requests||[]),l.$$.dirty&1&&e(8,i=k?.errors||[]),l.$$.dirty&1&&e(7,u=k?.responseTime||[]),l.$$.dirty&1&&e(6,c=k?.successRate||[]),l.$$.dirty&16384&&e(5,f=y.map(I=>({label:new URL(I.upstream).host,value:I.count,percentage:I.percentage}))),l.$$.dirty&32768&&e(4,d=T.filter(I=>I.failedRequests>0).sort((I,q)=>q.failedRequests-I.failedRequests).map(I=>({label:new URL(I.upstream).host,value:I.failedRequests,percentage:I.percentage}))),l.$$.dirty&65536&&e(3,p=M.map(I=>({label:new URL(I.upstream).host,status2xx:I.status2xx,status3xx:I.status3xx,status4xx:I.status4xx,status5xx:I.status5xx})))},[k,C,w,p,d,f,c,u,i,a,n,m,g,b,y,T,M]}class r2 extends Nt{constructor(s){super(),Ut(this,s,a2,n2,Vt,{selectedRange:12,onDataLoaded:13})}}function i2(l){let s,e,n,a,i=l[2]("dashboard.totalRequests")+"",u,c,f,d,p,m,g,b=l[2]("dashboard.requestsPerSecond")+"",k,w,C,E,y,T,M,R=l[2]("dashboard.successRate")+"",j,P,I,q,D,A,N,Z=l[2]("dashboard.avgResponseTime")+"",Q,x,z;return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h2"),u=_(i),c=h(),f=r("p"),f.textContent="-",d=h(),p=r("div"),m=r("div"),g=r("h2"),k=_(b),w=h(),C=r("p"),C.textContent="-",E=h(),y=r("div"),T=r("div"),M=r("h2"),j=_(R),P=h(),I=r("p"),I.textContent="-",q=h(),D=r("div"),A=r("div"),N=r("h2"),Q=_(Z),x=h(),z=r("p"),z.textContent="-",o(a,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(g,"class","card-title text-sm"),o(C,"class","text-3xl font-bold"),o(m,"class","card-body"),o(p,"class","card bg-base-100 shadow-xl"),o(M,"class","card-title text-sm"),o(I,"class","text-3xl font-bold"),o(T,"class","card-body"),o(y,"class","card bg-base-100 shadow-xl"),o(N,"class","card-title text-sm"),o(z,"class","text-3xl font-bold"),o(A,"class","card-body"),o(D,"class","card bg-base-100 shadow-xl"),o(s,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(K,S){L(K,s,S),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(s,d),t(s,p),t(p,m),t(m,g),t(g,k),t(m,w),t(m,C),t(s,E),t(s,y),t(y,T),t(T,M),t(M,j),t(T,P),t(T,I),t(s,q),t(s,D),t(D,A),t(A,N),t(N,Q),t(A,x),t(A,z)},p(K,S){S&4&&i!==(i=K[2]("dashboard.totalRequests")+"")&&v(u,i),S&4&&b!==(b=K[2]("dashboard.requestsPerSecond")+"")&&v(k,b),S&4&&R!==(R=K[2]("dashboard.successRate")+"")&&v(j,R),S&4&&Z!==(Z=K[2]("dashboard.avgResponseTime")+"")&&v(Q,Z)},d(K){K&&H(s)}}}function u2(l){let s,e,n,a,i=l[2]("dashboard.totalRequests")+"",u,c,f,d=l[1].totalRequests+"",p,m,g,b,k,w=l[2]("dashboard.requestsPerSecond")+"",C,E,y,T=l[1].requestsPerSecond.toFixed(2)+"",M,R,j,P,I,q=l[2]("dashboard.successRate")+"",D,A,N,Z=l[1].successRate.toFixed(1)+"",Q,x,z,K,S,B,U=l[2]("dashboard.avgResponseTime")+"",F,J,ie,ue=l[1].avgResponseTime.toFixed(0)+"",ne,$;return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h2"),u=_(i),c=h(),f=r("p"),p=_(d),m=h(),g=r("div"),b=r("div"),k=r("h2"),C=_(w),E=h(),y=r("p"),M=_(T),R=h(),j=r("div"),P=r("div"),I=r("h2"),D=_(q),A=h(),N=r("p"),Q=_(Z),x=_("%"),z=h(),K=r("div"),S=r("div"),B=r("h2"),F=_(U),J=h(),ie=r("p"),ne=_(ue),$=_("ms"),o(a,"class","card-title text-sm"),o(f,"class","text-3xl font-bold"),o(n,"class","card-body"),o(e,"class","card bg-base-100 shadow-xl"),o(k,"class","card-title text-sm"),o(y,"class","text-3xl font-bold"),o(b,"class","card-body"),o(g,"class","card bg-base-100 shadow-xl"),o(I,"class","card-title text-sm"),o(N,"class","text-3xl font-bold"),o(P,"class","card-body"),o(j,"class","card bg-base-100 shadow-xl"),o(B,"class","card-title text-sm"),o(ie,"class","text-3xl font-bold"),o(S,"class","card-body"),o(K,"class","card bg-base-100 shadow-xl"),o(s,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(te,ae){L(te,s,ae),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,p),t(s,m),t(s,g),t(g,b),t(b,k),t(k,C),t(b,E),t(b,y),t(y,M),t(s,R),t(s,j),t(j,P),t(P,I),t(I,D),t(P,A),t(P,N),t(N,Q),t(N,x),t(s,z),t(s,K),t(K,S),t(S,B),t(B,F),t(S,J),t(S,ie),t(ie,ne),t(ie,$)},p(te,ae){ae&4&&i!==(i=te[2]("dashboard.totalRequests")+"")&&v(u,i),ae&2&&d!==(d=te[1].totalRequests+"")&&v(p,d),ae&4&&w!==(w=te[2]("dashboard.requestsPerSecond")+"")&&v(C,w),ae&2&&T!==(T=te[1].requestsPerSecond.toFixed(2)+"")&&v(M,T),ae&4&&q!==(q=te[2]("dashboard.successRate")+"")&&v(D,q),ae&2&&Z!==(Z=te[1].successRate.toFixed(1)+"")&&v(Q,Z),ae&4&&U!==(U=te[2]("dashboard.avgResponseTime")+"")&&v(F,U),ae&2&&ue!==(ue=te[1].avgResponseTime.toFixed(0)+"")&&v(ne,ue)},d(te){te&&H(s)}}}function f2(l){let s,e,n=l[2]("dashboard.title")+"",a,i,u,c,f=l[2]("dashboard.dataRange")+"",d,p,m=l[2]("monitoring.range."+l[0])+"",g,b,k,w,C,E,y,T=l[2]("monitoring.range.oneHour")+"",M,R,j,P,I,q,D=l[2]("monitoring.range.twelveHours")+"",A,N,Z,Q,x,z,K=l[2]("monitoring.range.twentyFourHours")+"",S,B,U,F,J,ie,ue,ne;function $(ee,G){return ee[1]?u2:i2}let te=$(l),ae=te(l);return F=new r2({props:{selectedRange:l[0],onDataLoaded:l[3]}}),ie=Mu(l[5][0]),{c(){s=r("div"),e=r("h1"),a=_(n),i=h(),u=r("div"),c=r("p"),d=_(f),p=_(": "),g=_(m),b=h(),k=r("div"),w=r("label"),C=r("input"),E=h(),y=r("span"),M=_(T),R=h(),j=r("label"),P=r("input"),I=h(),q=r("span"),A=_(D),N=h(),Z=r("label"),Q=r("input"),x=h(),z=r("span"),S=_(K),B=h(),ae.c(),U=h(),Et(F.$$.fragment),o(e,"class","text-3xl font-bold mb-6"),o(c,"class","text-sm text-gray-500"),o(C,"class","sr-only"),o(C,"type","radio"),o(C,"name","range"),C.__value="1h",Y(C,C.__value),o(y,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(y,"bg-primary",l[0]==="1h"),le(y,"text-primary-content",l[0]==="1h"),le(y,"shadow",l[0]==="1h"),le(y,"text-gray-700",l[0]!=="1h"),le(y,"dark:text-gray-300",l[0]!=="1h"),le(y,"hover:text-gray-900",l[0]!=="1h"),le(y,"dark:hover:text-gray-100",l[0]!=="1h"),o(w,"class","cursor-pointer"),o(P,"class","sr-only"),o(P,"type","radio"),o(P,"name","range"),P.__value="12h",Y(P,P.__value),o(q,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(q,"bg-primary",l[0]==="12h"),le(q,"text-primary-content",l[0]==="12h"),le(q,"shadow",l[0]==="12h"),le(q,"text-gray-700",l[0]!=="12h"),le(q,"dark:text-gray-300",l[0]!=="12h"),le(q,"hover:text-gray-900",l[0]!=="12h"),le(q,"dark:hover:text-gray-100",l[0]!=="12h"),o(j,"class","cursor-pointer"),o(Q,"class","sr-only"),o(Q,"type","radio"),o(Q,"name","range"),Q.__value="24h",Y(Q,Q.__value),o(z,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(z,"bg-primary",l[0]==="24h"),le(z,"text-primary-content",l[0]==="24h"),le(z,"shadow",l[0]==="24h"),le(z,"text-gray-700",l[0]!=="24h"),le(z,"dark:text-gray-300",l[0]!=="24h"),le(z,"hover:text-gray-900",l[0]!=="24h"),le(z,"dark:hover:text-gray-100",l[0]!=="24h"),o(Z,"class","cursor-pointer"),o(k,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(u,"class","flex justify-between items-center mb-6"),o(s,"class","p-6"),ie.p(C,P,Q)},m(ee,G){L(ee,s,G),t(s,e),t(e,a),t(s,i),t(s,u),t(u,c),t(c,d),t(c,p),t(c,g),t(u,b),t(u,k),t(k,w),t(w,C),C.checked=C.__value===l[0],t(w,E),t(w,y),t(y,M),t(k,R),t(k,j),t(j,P),P.checked=P.__value===l[0],t(j,I),t(j,q),t(q,A),t(k,N),t(k,Z),t(Z,Q),Q.checked=Q.__value===l[0],t(Z,x),t(Z,z),t(z,S),t(s,B),ae.m(s,null),t(s,U),Ct(F,s,null),J=!0,ue||(ne=[V(C,"change",l[4]),V(P,"change",l[6]),V(Q,"change",l[7])],ue=!0)},p(ee,[G]){(!J||G&4)&&n!==(n=ee[2]("dashboard.title")+"")&&v(a,n),(!J||G&4)&&f!==(f=ee[2]("dashboard.dataRange")+"")&&v(d,f),(!J||G&5)&&m!==(m=ee[2]("monitoring.range."+ee[0])+"")&&v(g,m),G&1&&(C.checked=C.__value===ee[0]),(!J||G&4)&&T!==(T=ee[2]("monitoring.range.oneHour")+"")&&v(M,T),(!J||G&1)&&le(y,"bg-primary",ee[0]==="1h"),(!J||G&1)&&le(y,"text-primary-content",ee[0]==="1h"),(!J||G&1)&&le(y,"shadow",ee[0]==="1h"),(!J||G&1)&&le(y,"text-gray-700",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:text-gray-300",ee[0]!=="1h"),(!J||G&1)&&le(y,"hover:text-gray-900",ee[0]!=="1h"),(!J||G&1)&&le(y,"dark:hover:text-gray-100",ee[0]!=="1h"),G&1&&(P.checked=P.__value===ee[0]),(!J||G&4)&&D!==(D=ee[2]("monitoring.range.twelveHours")+"")&&v(A,D),(!J||G&1)&&le(q,"bg-primary",ee[0]==="12h"),(!J||G&1)&&le(q,"text-primary-content",ee[0]==="12h"),(!J||G&1)&&le(q,"shadow",ee[0]==="12h"),(!J||G&1)&&le(q,"text-gray-700",ee[0]!=="12h"),(!J||G&1)&&le(q,"dark:text-gray-300",ee[0]!=="12h"),(!J||G&1)&&le(q,"hover:text-gray-900",ee[0]!=="12h"),(!J||G&1)&&le(q,"dark:hover:text-gray-100",ee[0]!=="12h"),G&1&&(Q.checked=Q.__value===ee[0]),(!J||G&4)&&K!==(K=ee[2]("monitoring.range.twentyFourHours")+"")&&v(S,K),(!J||G&1)&&le(z,"bg-primary",ee[0]==="24h"),(!J||G&1)&&le(z,"text-primary-content",ee[0]==="24h"),(!J||G&1)&&le(z,"shadow",ee[0]==="24h"),(!J||G&1)&&le(z,"text-gray-700",ee[0]!=="24h"),(!J||G&1)&&le(z,"dark:text-gray-300",ee[0]!=="24h"),(!J||G&1)&&le(z,"hover:text-gray-900",ee[0]!=="24h"),(!J||G&1)&&le(z,"dark:hover:text-gray-100",ee[0]!=="24h"),te===(te=$(ee))&&ae?ae.p(ee,G):(ae.d(1),ae=te(ee),ae&&(ae.c(),ae.m(s,U)));const pe={};G&1&&(pe.selectedRange=ee[0]),F.$set(pe)},i(ee){J||(et(F.$$.fragment,ee),J=!0)},o(ee){st(F.$$.fragment,ee),J=!1},d(ee){ee&&H(s),ae.d(),yt(F),ie.r(),ue=!1,vt(ne)}}}function c2(l){switch(l){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function d2(l,s,e){let n;Dt(l,Rt,g=>e(2,n=g));let a="1h",i=null;function u(g){e(1,i=c(g))}function c(g){if(!g||g.requests.length===0)return null;const b=g.requests.reduce((T,M)=>T+M,0),k=c2(a),w=b/k,C=g.errors.reduce((T,M)=>T+M,0),E=b>0?(b-C)/b*100:100,y=g.responseTime.length>0?g.responseTime.reduce((T,M)=>T+M,0)/g.responseTime.length:0;return{totalRequests:b,requestsPerSecond:w,successRate:E,avgResponseTime:y}}const f=[[]];function d(){a=this.__value,e(0,a)}function p(){a=this.__value,e(0,a)}function m(){a=this.__value,e(0,a)}return[a,i,n,u,d,f,p,m]}class p2 extends Nt{constructor(s){super(),Ut(this,s,d2,f2,Vt,{})}}async function h2(){return yl.post("/system/reload",{})}async function m2(){return yl.post("/system/restart",{})}function ea(){const{subscribe:l,update:s}=Zn([]);let e=0;return{subscribe:l,show:(n,a="info",i=3e3)=>{const u=e++,c={id:u,message:n,type:a,duration:i};return s(f=>[...f,c]),i>0&&setTimeout(()=>{s(f=>f.filter(d=>d.id!==u))},i),u},success:(n,a=3e3)=>ea().show(n,"success",a),error:(n,a=4e3)=>ea().show(n,"error",a),warning:(n,a=3500)=>ea().show(n,"warning",a),info:(n,a=3e3)=>ea().show(n,"info",a),remove:n=>{s(a=>a.filter(i=>i.id!==n))},clear:()=>{s(()=>[])}}}const jt=ea();function a1(l,s,e){const n=l.slice();return n[13]=s[e],n[14]=s,n[15]=e,n}function r1(l){let s,e=l[5]("auth.helpText")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&32&&e!==(e=a[5]("auth.helpText")+"")&&v(n,e)},d(a){a&&H(s)}}}function i1(l){let s,e,n,a,i=l[5]("auth.tokens")+"",u,c,f=l[3].length+"",d,p,m,g,b,k,w,C,E,y,T=l[5]("auth.expressionSupport")+"",M,R,j,P,I,q,D,A,N=l[5]("auth.addToken")+"",Z,Q,x,z,K,S,B,U=l[5]("auth.securityNotice")+"",F,J,ie,ue=ut(l[3]),ne=[];for(let $=0;$<ue.length;$+=1)ne[$]=u1(a1(l,ue,$));return{c(){s=r("div"),e=r("input"),n=h(),a=r("div"),u=_(i),c=_(" ("),d=_(f),p=_(")"),m=h(),g=r("div"),b=r("div"),k=re("svg"),w=re("path"),C=h(),E=r("div"),y=r("div"),M=_(T),R=h(),j=r("div"),P=r("code"),P.textContent="{{ env.API_TOKEN }}",I=h();for(let $=0;$<ne.length;$+=1)ne[$].c();q=h(),D=r("button"),A=_("+ "),Z=_(N),Q=h(),x=r("div"),z=re("svg"),K=re("path"),S=h(),B=r("div"),F=_(U),o(e,"type","checkbox"),e.checked=!0,o(a,"class","collapse-title text-sm font-medium"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(k,"xmlns","http://www.w3.org/2000/svg"),o(k,"fill","none"),o(k,"viewBox","0 0 24 24"),o(k,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),o(P,"class","text-xs bg-base-300 px-1 rounded"),o(j,"class","mt-1"),o(b,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),o(D,"type","button"),o(D,"class","btn btn-sm btn-ghost"),o(g,"class","collapse-content space-y-2"),o(s,"class","collapse collapse-arrow bg-base-200 collapse-open"),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"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"),o(z,"xmlns","http://www.w3.org/2000/svg"),o(z,"fill","none"),o(z,"viewBox","0 0 24 24"),o(z,"class","stroke-current shrink-0 w-4 h-4"),o(x,"class","alert alert-warning shadow-sm text-xs")},m($,te){L($,s,te),t(s,e),t(s,n),t(s,a),t(a,u),t(a,c),t(a,d),t(a,p),t(s,m),t(s,g),t(g,b),t(b,k),t(k,w),t(b,C),t(b,E),t(E,y),t(y,M),t(E,R),t(E,j),t(j,P),t(g,I);for(let ae=0;ae<ne.length;ae+=1)ne[ae]&&ne[ae].m(g,null);t(g,q),t(g,D),t(D,A),t(D,Z),L($,Q,te),L($,x,te),t(x,z),t(z,K),t(x,S),t(x,B),t(B,F),J||(ie=V(D,"click",l[6]),J=!0)},p($,te){if(te&32&&i!==(i=$[5]("auth.tokens")+"")&&v(u,i),te&8&&f!==(f=$[3].length+"")&&v(d,f),te&32&&T!==(T=$[5]("auth.expressionSupport")+"")&&v(M,T),te&168){ue=ut($[3]);let ae;for(ae=0;ae<ue.length;ae+=1){const ee=a1($,ue,ae);ne[ae]?ne[ae].p(ee,te):(ne[ae]=u1(ee),ne[ae].c(),ne[ae].m(g,q))}for(;ae<ne.length;ae+=1)ne[ae].d(1);ne.length=ue.length}te&32&&N!==(N=$[5]("auth.addToken")+"")&&v(Z,N),te&32&&U!==(U=$[5]("auth.securityNotice")+"")&&v(F,U)},d($){$&&(H(s),H(Q),H(x)),Gt(ne,$),J=!1,ie()}}}function u1(l){let s,e,n,a,i,u,c;function f(){l[11].call(e,l[15])}function d(){return l[12](l[15])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("button"),i.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[5]("auth.tokenPlaceholder")),o(e,"class","input input-bordered input-sm flex-1 font-mono text-xs"),o(i,"type","button"),o(i,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(p,m){L(p,s,m),t(s,e),Y(e,l[3][l[15]]),t(s,a),t(s,i),u||(c=[V(e,"input",f),V(i,"click",d)],u=!0)},p(p,m){l=p,m&32&&n!==(n=l[5]("auth.tokenPlaceholder"))&&o(e,"placeholder",n),m&8&&e.value!==l[3][l[15]]&&Y(e,l[3][l[15]])},d(p){p&&H(s),u=!1,vt(c)}}}function g2(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=l[5]("auth.enableAuth")+"",k,w,C,E,y=l[1]&&r1(l),T=l[2]&&i1(l);return{c(){s=r("div"),e=r("div"),n=r("span"),a=_(l[0]),i=h(),y&&y.c(),u=h(),c=r("div"),f=r("div"),d=r("label"),p=r("input"),m=h(),g=r("span"),k=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(s,"class","form-control w-full")},m(M,R){L(M,s,R),t(s,e),t(e,n),t(n,a),t(e,i),y&&y.m(e,null),t(s,u),t(s,c),t(c,f),t(f,d),t(d,p),p.checked=l[2],t(d,m),t(d,g),t(g,k),t(c,w),T&&T.m(c,null),C||(E=[V(p,"change",l[9]),V(p,"change",l[10])],C=!0)},p(M,[R]){R&1&&v(a,M[0]),M[1]?y?y.p(M,R):(y=r1(M),y.c(),y.m(e,null)):y&&(y.d(1),y=null),R&4&&(p.checked=M[2]),R&32&&b!==(b=M[5]("auth.enableAuth")+"")&&v(k,b),M[2]?T?T.p(M,R):(T=i1(M),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:ot,o:ot,d(M){M&&H(s),y&&y.d(),T&&T.d(),C=!1,vt(E)}}}function _2(l,s,e){let n;Dt(l,Rt,C=>e(5,n=C));let{value:a=void 0}=s,{label:i="Authentication"}=s,{showHelp:u=!0}=s,c=!1,f=[],d=!1;function p(){e(3,f=[...f,""]),e(4,d=!0)}function m(C){e(3,f=f.filter((E,y)=>y!==C))}function g(){c=this.checked,e(2,c),e(4,d),e(8,a),e(3,f)}const b=()=>{c&&f.length===0&&e(3,f=[""]),e(4,d=!0)};function k(C){f[C]=this.value,e(3,f),e(4,d),e(8,a),e(2,c)}const w=C=>m(C);return l.$$set=C=>{"value"in C&&e(8,a=C.value),"label"in C&&e(0,i=C.label),"showHelp"in C&&e(1,u=C.showHelp)},l.$$.update=()=>{if(l.$$.dirty&284)if(!d&&a&&(e(2,c=a.enabled||!1),e(3,f=a.tokens?[...a.tokens]:[]),e(4,d=!0)),c){const C=f.filter(E=>E.trim()!=="");a?(e(8,a.enabled=!0,a),e(8,a.tokens=C,a)):e(8,a={enabled:!0,tokens:C})}else a&&(e(8,a.enabled=!1,a),e(8,a.tokens=[],a))},[i,u,c,f,d,n,p,m,a,g,b,k,w]}class xp extends Nt{constructor(s){super(),Ut(this,s,_2,g2,Vt,{value:8,label:0,showHelp:1})}}async function b2(l={}){const s=new URLSearchParams;return Object.entries(l).forEach(([e,n])=>{n!=null&&(Array.isArray(n)?n.forEach(a=>s.append(e,String(a))):s.append(e,String(n)))}),yl.get(\`/logs?\${s.toString()}\`)}async function v2(l={},s="json"){const e=new URLSearchParams;Object.entries(l).forEach(([a,i])=>{i!=null&&e.append(a,String(i))}),e.append("format",s);const n=await fetch(\`/__ui/api/logs/export?\${e.toString()}\`);if(!n.ok)throw new Error("Failed to export logs");return n.blob()}async function Eu(l){return(await yl.get(\`/logs/body/\${l}\`)).content}async function Tu(l){return yl.get(\`/logs/headers/\${l}\`)}async function k2(){return yl.get("/logs/cleanup/config")}async function w2(){return yl.post("/logs/cleanup")}function f1(l){let s,e;return{c(){s=r("h3"),e=_(l[1]),o(s,"class","text-lg font-semibold")},m(n,a){L(n,s,a),t(s,e)},p(n,a){a&2&&v(e,n[1])},d(n){n&&H(s)}}}function c1(l){let s,e,n,a,i=l[6]("logging.maxSize")+"",u,c,f,d,p,m,g,b,k,w=l[6]("logging.maxSizeHelp")+"",C,E,y,T,M,R=l[6]("logging.retentionDays")+"",j,P,I,q,D,A,N=l[6]("logging.days")+"",Z,Q,x,z,K=l[6]("logging.retentionDaysHelp")+"",S,B,U;return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("div"),d=r("input"),p=h(),m=r("span"),m.textContent="KB",g=h(),b=r("div"),k=r("span"),C=_(w),E=h(),y=r("div"),T=r("label"),M=r("span"),j=_(R),P=h(),I=r("div"),q=r("input"),D=h(),A=r("span"),Z=_(N),Q=h(),x=r("div"),z=r("span"),S=_(K),o(a,"class","label-text"),o(n,"class","label"),o(n,"for","logging-max-size"),o(d,"id","logging-max-size"),o(d,"type","number"),o(d,"class","input input-bordered flex-1"),o(d,"min","1024"),o(d,"max","102400"),o(d,"step","1024"),o(m,"class","text-sm text-gray-500"),o(f,"class","flex gap-2 items-center"),o(k,"class","label-text-alt"),o(b,"class","label"),o(e,"class","form-control"),o(M,"class","label-text"),o(T,"class","label"),o(T,"for","logging-retention-days"),o(q,"id","logging-retention-days"),o(q,"type","number"),o(q,"class","input input-bordered flex-1"),o(q,"min","1"),o(q,"max","30"),o(A,"class","text-sm text-gray-500"),o(I,"class","flex gap-2 items-center"),o(z,"class","label-text-alt"),o(x,"class","label"),o(y,"class","form-control"),o(s,"class","ml-8 space-y-4")},m(F,J){L(F,s,J),t(s,e),t(e,n),t(n,a),t(a,u),t(e,c),t(e,f),t(f,d),Y(d,l[0].body.maxSize),t(f,p),t(f,m),t(e,g),t(e,b),t(b,k),t(k,C),t(s,E),t(s,y),t(y,T),t(T,M),t(M,j),t(y,P),t(y,I),t(I,q),Y(q,l[0].body.retentionDays),t(I,D),t(I,A),t(A,Z),t(y,Q),t(y,x),t(x,z),t(z,S),B||(U=[V(d,"input",l[10]),V(d,"input",l[7]),V(q,"input",l[11]),V(q,"input",l[7])],B=!0)},p(F,J){J&64&&i!==(i=F[6]("logging.maxSize")+"")&&v(u,i),J&1&&Mt(d.value)!==F[0].body.maxSize&&Y(d,F[0].body.maxSize),J&64&&w!==(w=F[6]("logging.maxSizeHelp")+"")&&v(C,w),J&64&&R!==(R=F[6]("logging.retentionDays")+"")&&v(j,R),J&1&&Mt(q.value)!==F[0].body.retentionDays&&Y(q,F[0].body.retentionDays),J&64&&N!==(N=F[6]("logging.days")+"")&&v(Z,N),J&64&&K!==(K=F[6]("logging.retentionDaysHelp")+"")&&v(S,K)},d(F){F&&H(s),B=!1,vt(U)}}}function y2(l){let s,e,n,a=l[6]("logging.cleanupStatus")+"",i,u,c,f=(l[2].isActive?l[6]("logging.active"):l[6]("logging.inactive"))+"",d,p,m,g,b,k=l[6]("logging.cleanupRetention")+"",w,C,E,y=l[2].retentionDays+"",T,M,R=l[6]("logging.days")+"",j,P,I,q,D=l[6]("logging.cleanupInterval")+"",A,N,Z,Q=l[2].scheduleIntervalHours+"",x,z,K=l[6]("logging.hours")+"",S,B,U,F,J=l[6]("logging.manualCleanup")+"",ie,ue,ne,$,te;function ae(oe,ge){return oe[4]?T2:E2}let ee=ae(l),G=ee(l),pe=l[5]&&d1(l);return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("span"),d=_(f),m=h(),g=r("div"),b=r("span"),w=_(k),C=h(),E=r("span"),T=_(y),M=h(),j=_(R),P=h(),I=r("div"),q=r("span"),A=_(D),N=h(),Z=r("span"),x=_(Q),z=h(),S=_(K),B=h(),U=r("button"),G.c(),F=h(),ie=_(J),ue=h(),pe&&pe.c(),ne=Ul(),o(n,"class","text-gray-500"),o(c,"class",p="font-semibold "+(l[2].isActive?"text-success":"text-error")),o(e,"class","flex justify-between text-sm"),o(b,"class","text-gray-500"),o(E,"class","font-semibold"),o(g,"class","flex justify-between text-sm"),o(q,"class","text-gray-500"),o(Z,"class","font-semibold"),o(I,"class","flex justify-between text-sm"),o(s,"class","bg-base-200 p-4 rounded-lg space-y-2"),o(U,"class","btn btn-outline btn-sm w-full"),U.disabled=l[4]},m(oe,ge){L(oe,s,ge),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,m),t(s,g),t(g,b),t(b,w),t(g,C),t(g,E),t(E,T),t(E,M),t(E,j),t(s,P),t(s,I),t(I,q),t(q,A),t(I,N),t(I,Z),t(Z,x),t(Z,z),t(Z,S),L(oe,B,ge),L(oe,U,ge),G.m(U,null),t(U,F),t(U,ie),L(oe,ue,ge),pe&&pe.m(oe,ge),L(oe,ne,ge),$||(te=V(U,"click",l[8]),$=!0)},p(oe,ge){ge&64&&a!==(a=oe[6]("logging.cleanupStatus")+"")&&v(i,a),ge&68&&f!==(f=(oe[2].isActive?oe[6]("logging.active"):oe[6]("logging.inactive"))+"")&&v(d,f),ge&4&&p!==(p="font-semibold "+(oe[2].isActive?"text-success":"text-error"))&&o(c,"class",p),ge&64&&k!==(k=oe[6]("logging.cleanupRetention")+"")&&v(w,k),ge&4&&y!==(y=oe[2].retentionDays+"")&&v(T,y),ge&64&&R!==(R=oe[6]("logging.days")+"")&&v(j,R),ge&64&&D!==(D=oe[6]("logging.cleanupInterval")+"")&&v(A,D),ge&4&&Q!==(Q=oe[2].scheduleIntervalHours+"")&&v(x,Q),ge&64&&K!==(K=oe[6]("logging.hours")+"")&&v(S,K),ee!==(ee=ae(oe))&&(G.d(1),G=ee(oe),G&&(G.c(),G.m(U,F))),ge&64&&J!==(J=oe[6]("logging.manualCleanup")+"")&&v(ie,J),ge&16&&(U.disabled=oe[4]),oe[5]?pe?pe.p(oe,ge):(pe=d1(oe),pe.c(),pe.m(ne.parentNode,ne)):pe&&(pe.d(1),pe=null)},d(oe){oe&&(H(s),H(B),H(U),H(ue),H(ne)),G.d(),pe&&pe.d(oe),$=!1,te()}}}function C2(l){let s,e,n,a,i=l[6]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&64&&i!==(i=c[6]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function E2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function T2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function d1(l){let s,e,n,a,i,u,c=l[6]("logging.lastCleanup")+"",f,d,p,m,g=l[6]("logging.deletedSqliteRecords")+"",b,k,w=l[5].deletedSqliteRecords+"",C,E,y,T=l[6]("logging.deletedFileLogFiles")+"",M,R,j=l[5].deletedFileLogFiles+"",P,I,q,D=l[6]("logging.deletedBodyFiles")+"",A,N,Z=l[5].deletedBodyDirs+"",Q,x,z=l[6]("logging.dirs")+"",K,S,B=l[5].deletedBodyFiles+"",U,F,J=l[6]("logging.files")+"",ie,ue,ne,$=l[6]("logging.duration")+"",te,ae,ee=l[5].durationMs+"",G,pe;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("div"),u=r("div"),f=_(c),d=h(),p=r("div"),m=r("div"),b=_(g),k=_(": "),C=_(w),E=h(),y=r("div"),M=_(T),R=_(": "),P=_(j),I=h(),q=r("div"),A=_(D),N=_(": "),Q=_(Z),x=h(),K=_(z),S=_(", "),U=_(B),F=h(),ie=_(J),ue=h(),ne=r("div"),te=_($),ae=_(": "),G=_(ee),pe=_("ms"),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-semibold"),o(p,"class","mt-1 space-y-1"),o(i,"class","text-sm"),o(s,"class","alert alert-success")},m(oe,ge){L(oe,s,ge),t(s,e),t(e,n),t(s,a),t(s,i),t(i,u),t(u,f),t(i,d),t(i,p),t(p,m),t(m,b),t(m,k),t(m,C),t(p,E),t(p,y),t(y,M),t(y,R),t(y,P),t(p,I),t(p,q),t(q,A),t(q,N),t(q,Q),t(q,x),t(q,K),t(q,S),t(q,U),t(q,F),t(q,ie),t(p,ue),t(p,ne),t(ne,te),t(ne,ae),t(ne,G),t(ne,pe)},p(oe,ge){ge&64&&c!==(c=oe[6]("logging.lastCleanup")+"")&&v(f,c),ge&64&&g!==(g=oe[6]("logging.deletedSqliteRecords")+"")&&v(b,g),ge&32&&w!==(w=oe[5].deletedSqliteRecords+"")&&v(C,w),ge&64&&T!==(T=oe[6]("logging.deletedFileLogFiles")+"")&&v(M,T),ge&32&&j!==(j=oe[5].deletedFileLogFiles+"")&&v(P,j),ge&64&&D!==(D=oe[6]("logging.deletedBodyFiles")+"")&&v(A,D),ge&32&&Z!==(Z=oe[5].deletedBodyDirs+"")&&v(Q,Z),ge&64&&z!==(z=oe[6]("logging.dirs")+"")&&v(K,z),ge&32&&B!==(B=oe[5].deletedBodyFiles+"")&&v(U,B),ge&64&&J!==(J=oe[6]("logging.files")+"")&&v(ie,J),ge&64&&$!==($=oe[6]("logging.duration")+"")&&v(te,$),ge&32&&ee!==(ee=oe[5].durationMs+"")&&v(G,ee)},d(oe){oe&&H(s)}}}function S2(l){let s,e,n,a,i,u,c,f,d=l[6]("logging.bodyRecording")+"",p,m,g,b=l[6]("logging.bodyRecordingHelp")+"",k,w,C,E,y,T,M=l[6]("logging.cleanupConfig")+"",R,j,P,I,q=l[1]&&f1(l),D=l[0].body.enabled&&c1(l);function A(Q,x){if(Q[3])return C2;if(Q[2])return y2}let N=A(l),Z=N&&N(l);return{c(){s=r("div"),q&&q.c(),e=h(),n=r("div"),a=r("label"),i=r("input"),u=h(),c=r("div"),f=r("span"),p=_(d),m=h(),g=r("p"),k=_(b),w=h(),D&&D.c(),C=h(),E=r("div"),y=h(),T=r("h4"),R=_(M),j=h(),Z&&Z.c(),o(i,"type","checkbox"),o(i,"class","checkbox"),o(f,"class","label-text font-semibold"),o(g,"class","text-xs text-gray-500 mt-1"),o(c,"class","flex-1"),o(a,"class","label cursor-pointer justify-start gap-4"),o(n,"class","form-control"),o(E,"class","divider"),o(T,"class","font-semibold"),o(s,"class","space-y-4")},m(Q,x){L(Q,s,x),q&&q.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),i.checked=l[0].body.enabled,t(a,u),t(a,c),t(c,f),t(f,p),t(c,m),t(c,g),t(g,k),t(s,w),D&&D.m(s,null),t(s,C),t(s,E),t(s,y),t(s,T),t(T,R),t(s,j),Z&&Z.m(s,null),P||(I=[V(i,"change",l[9]),V(i,"change",l[7])],P=!0)},p(Q,[x]){Q[1]?q?q.p(Q,x):(q=f1(Q),q.c(),q.m(s,e)):q&&(q.d(1),q=null),x&1&&(i.checked=Q[0].body.enabled),x&64&&d!==(d=Q[6]("logging.bodyRecording")+"")&&v(p,d),x&64&&b!==(b=Q[6]("logging.bodyRecordingHelp")+"")&&v(k,b),Q[0].body.enabled?D?D.p(Q,x):(D=c1(Q),D.c(),D.m(s,C)):D&&(D.d(1),D=null),x&64&&M!==(M=Q[6]("logging.cleanupConfig")+"")&&v(R,M),N===(N=A(Q))&&Z?Z.p(Q,x):(Z&&Z.d(1),Z=N&&N(Q),Z&&(Z.c(),Z.m(s,null)))},i:ot,o:ot,d(Q){Q&&H(s),q&&q.d(),D&&D.d(),Z&&Z.d(),P=!1,vt(I)}}}function M2(l,s,e){let n;Dt(l,Rt,E=>e(6,n=E));let{value:a=null}=s,{label:i=""}=s;const u=oa();let c=null,f=!1,d=!1,p=null;function m(){u("input")}async function g(){e(3,f=!0);try{e(2,c=await k2())}catch(E){console.error("Failed to load cleanup config:",E),jt.show(n("common.error")+": "+(E instanceof Error?E.message:"Unknown error"),"error")}finally{e(3,f=!1)}}async function b(){if(confirm(n("logging.confirmCleanup"))){e(4,d=!0);try{e(5,p=await w2()),jt.show(n("logging.cleanupSuccess"),"success"),await g()}catch(E){console.error("Failed to trigger cleanup:",E),jt.show(n("logging.cleanupFailed",{values:{error:E instanceof Error?E.message:"Unknown error"}}),"error")}finally{e(4,d=!1)}}}Hs(()=>{g()});function k(){a.body.enabled=this.checked,e(0,a)}function w(){a.body.maxSize=Mt(this.value),e(0,a)}function C(){a.body.retentionDays=Mt(this.value),e(0,a)}return l.$$set=E=>{"value"in E&&e(0,a=E.value),"label"in E&&e(1,i=E.label)},l.$$.update=()=>{l.$$.dirty&1&&(a||e(0,a={body:{enabled:!1,maxSize:5120,retentionDays:1}})),l.$$.dirty&1&&a&&!a.body&&e(0,a.body={enabled:!1,maxSize:5120,retentionDays:1},a)},[a,i,c,f,d,p,n,m,b,k,w,C]}class R2 extends Nt{constructor(s){super(),Ut(this,s,M2,S2,Vt,{value:0,label:1})}}function q2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function H2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function L2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function P2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function j2(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function D2(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function B2(l){let s,e,n,a,i,u=l[11]("configuration.formEditor")+"",c,f,d,p,m,g,b=l[11]("configuration.jsonEditor")+"",k,w,C,E,y,T,M,R,j;const P=[z2,F2],I=[];function q(D,A){return D[7]==="form"?0:1}return C=q(l),E=I[C]=P[C](l),M=Mu(l[20][0]),{c(){s=r("div"),e=r("label"),n=r("input"),a=h(),i=r("span"),c=_(u),f=h(),d=r("label"),p=r("input"),m=h(),g=r("span"),k=_(b),w=h(),E.c(),y=Ul(),o(n,"class","sr-only"),o(n,"type","radio"),o(n,"name","editMode"),n.__value="form",Y(n,n.__value),o(i,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(i,"bg-primary",l[7]==="form"),le(i,"text-primary-content",l[7]==="form"),le(i,"shadow",l[7]==="form"),le(i,"text-gray-700",l[7]!=="form"),le(i,"dark:text-gray-300",l[7]!=="form"),le(i,"hover:text-gray-900",l[7]!=="form"),le(i,"dark:hover:text-gray-100",l[7]!=="form"),o(e,"class","cursor-pointer"),o(p,"class","sr-only"),o(p,"type","radio"),o(p,"name","editMode"),p.__value="json",Y(p,p.__value),o(g,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(g,"bg-primary",l[7]==="json"),le(g,"text-primary-content",l[7]==="json"),le(g,"shadow",l[7]==="json"),le(g,"text-gray-700",l[7]!=="json"),le(g,"dark:text-gray-300",l[7]!=="json"),le(g,"hover:text-gray-900",l[7]!=="json"),le(g,"dark:hover:text-gray-100",l[7]!=="json"),o(d,"class","cursor-pointer"),o(s,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm mb-4"),M.p(n,p)},m(D,A){L(D,s,A),t(s,e),t(e,n),n.checked=n.__value===l[7],t(e,a),t(e,i),t(i,c),t(s,f),t(s,d),t(d,p),p.checked=p.__value===l[7],t(d,m),t(d,g),t(g,k),L(D,w,A),I[C].m(D,A),L(D,y,A),T=!0,R||(j=[V(n,"change",l[19]),V(p,"change",l[21])],R=!0)},p(D,A){A[0]&128&&(n.checked=n.__value===D[7]),(!T||A[0]&2048)&&u!==(u=D[11]("configuration.formEditor")+"")&&v(c,u),(!T||A[0]&128)&&le(i,"bg-primary",D[7]==="form"),(!T||A[0]&128)&&le(i,"text-primary-content",D[7]==="form"),(!T||A[0]&128)&&le(i,"shadow",D[7]==="form"),(!T||A[0]&128)&&le(i,"text-gray-700",D[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:text-gray-300",D[7]!=="form"),(!T||A[0]&128)&&le(i,"hover:text-gray-900",D[7]!=="form"),(!T||A[0]&128)&&le(i,"dark:hover:text-gray-100",D[7]!=="form"),A[0]&128&&(p.checked=p.__value===D[7]),(!T||A[0]&2048)&&b!==(b=D[11]("configuration.jsonEditor")+"")&&v(k,b),(!T||A[0]&128)&&le(g,"bg-primary",D[7]==="json"),(!T||A[0]&128)&&le(g,"text-primary-content",D[7]==="json"),(!T||A[0]&128)&&le(g,"shadow",D[7]==="json"),(!T||A[0]&128)&&le(g,"text-gray-700",D[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:text-gray-300",D[7]!=="json"),(!T||A[0]&128)&&le(g,"hover:text-gray-900",D[7]!=="json"),(!T||A[0]&128)&&le(g,"dark:hover:text-gray-100",D[7]!=="json");let N=C;C=q(D),C===N?I[C].p(D,A):(Gl(),st(I[N],1,1,()=>{I[N]=null}),Kl(),E=I[C],E?E.p(D,A):(E=I[C]=P[C](D),E.c()),et(E,1),E.m(y.parentNode,y))},i(D){T||(et(E),T=!0)},o(D){st(E),T=!1},d(D){D&&(H(s),H(w),H(y)),I[C].d(D),M.r(),R=!1,vt(j)}}}function I2(l){let s,e,n,a,i,u=l[11]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[2]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m[0]&2048&&u!==(u=p[11]("common.error")+"")&&v(c,u),m[0]&4&&v(d,p[2])},i:ot,o:ot,d(p){p&&H(s)}}}function A2(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function F2(l){let s,e,n,a=l[11]("configuration.jsonConfiguration")+"",i,u,c,f,d,p,m,g=l[11]("configuration.jsonHelp")+"",b,k,w,C=l[9]&&p1(l);return{c(){s=r("div"),e=r("div"),n=r("h2"),i=_(a),u=h(),C&&C.c(),c=h(),f=r("textarea"),p=h(),m=r("p"),b=_(g),o(n,"class","card-title"),o(f,"class","textarea textarea-bordered font-mono text-sm h-96"),o(f,"placeholder",d=l[11]("configuration.jsonPlaceholder")),o(m,"class","text-sm text-gray-500 mt-2"),o(e,"class","card-body"),o(s,"class","card bg-base-100 shadow-xl")},m(E,y){L(E,s,y),t(s,e),t(e,n),t(n,i),t(e,u),C&&C.m(e,null),t(e,c),t(e,f),Y(f,l[8]),t(e,p),t(e,m),t(m,b),k||(w=[V(f,"input",l[28]),V(f,"input",l[12])],k=!0)},p(E,y){y[0]&2048&&a!==(a=E[11]("configuration.jsonConfiguration")+"")&&v(i,a),E[9]?C?C.p(E,y):(C=p1(E),C.c(),C.m(e,c)):C&&(C.d(1),C=null),y[0]&2048&&d!==(d=E[11]("configuration.jsonPlaceholder"))&&o(f,"placeholder",d),y[0]&256&&Y(f,E[8]),y[0]&2048&&g!==(g=E[11]("configuration.jsonHelp")+"")&&v(b,g)},i:ot,o:ot,d(E){E&&H(s),C&&C.d(),k=!1,vt(w)}}}function z2(l){let s,e,n,a=l[11]("configuration.systemSettings")+"",i,u,c,f,d,p=l[11]("configuration.serverPort")+"",m,g,b,k,w,C,E,y=l[11]("configuration.workerProcesses")+"",T,M,R,j,P,I,q=l[11]("configuration.workerProcessesHelp")+"",D,A,N,Z,Q,x=l[11]("configuration.logLevel")+"",z,K,S,B,U,F,J,ie,ue,ne,$,te=l[11]("configuration.bodyParserLimit")+"",ae,ee,G,pe,oe,ge,he=l[11]("configuration.bodyParserLimitHelp")+"",ye,ze,Pe,we,Fe,Je,je,Le,Se,fe,_e,Ie,De,se,ke=l[11]("configuration.requiresRestart")+"",me,Ee,Ve,Be,nt,Ne=l[11]("logging.title")+"",Qe,Ye,ve,de,Te,Ze,Me,Ue,Ce=l[11]("routes.title")+"",mt,Ge,ce,qe,Re,dt,We,O=l[11]("configuration.routesConfigured",{values:{count:l[1].routes.length}})+"",He,X,ft=l[11]("configuration.manageRoutes")+"",Ht,Ke,_t,tt;function it(rt){l[26](rt)}let Oe={label:l[11]("auth.globalAuth")};l[1].auth!==void 0&&(Oe.value=l[1].auth),Fe=new xp({props:Oe}),Sl.push(()=>Ml(Fe,"value",it));function Xe(rt){l[27](rt)}let It={};return l[1].logging!==void 0&&(It.value=l[1].logging),ve=new R2({props:It}),Sl.push(()=>Ml(ve,"value",Xe)),{c(){s=r("div"),e=r("div"),n=r("h2"),i=_(a),u=h(),c=r("div"),f=r("label"),d=r("span"),m=_(p),g=h(),b=r("input"),k=h(),w=r("div"),C=r("label"),E=r("span"),T=_(y),M=h(),R=r("input"),j=h(),P=r("div"),I=r("span"),D=_(q),A=h(),N=r("div"),Z=r("label"),Q=r("span"),z=_(x),K=h(),S=r("select"),B=r("option"),B.textContent="Debug",U=r("option"),U.textContent="Info",F=r("option"),F.textContent="Warning",J=r("option"),J.textContent="Error",ie=h(),ue=r("div"),ne=r("label"),$=r("span"),ae=_(te),ee=h(),G=r("input"),pe=h(),oe=r("div"),ge=r("span"),ye=_(he),ze=h(),Pe=r("div"),we=h(),Et(Fe.$$.fragment),je=h(),Le=r("div"),Se=h(),fe=r("div"),_e=re("svg"),Ie=re("path"),De=h(),se=r("span"),me=_(ke),Ee=h(),Ve=r("div"),Be=r("div"),nt=r("h2"),Qe=_(Ne),Ye=h(),Et(ve.$$.fragment),Te=h(),Ze=r("div"),Me=r("div"),Ue=r("h2"),mt=_(Ce),Ge=h(),ce=r("div"),qe=re("svg"),Re=re("path"),dt=h(),We=r("span"),He=_(O),X=h(),Ht=_(ft),o(n,"class","card-title"),o(d,"class","label-text"),o(f,"class","label"),o(f,"for","config-port"),o(b,"id","config-port"),o(b,"type","number"),o(b,"class","input input-bordered"),o(b,"placeholder","8088"),o(c,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","config-workers"),o(R,"id","config-workers"),o(R,"type","number"),o(R,"class","input input-bordered"),o(R,"min","1"),o(R,"placeholder","2"),o(I,"class","label-text-alt"),o(P,"class","label"),o(w,"class","form-control"),o(Q,"class","label-text"),o(Z,"class","label"),o(Z,"for","config-log-level"),B.__value="debug",Y(B,B.__value),U.__value="info",Y(U,U.__value),F.__value="warn",Y(F,F.__value),J.__value="error",Y(J,J.__value),o(S,"id","config-log-level"),o(S,"class","select select-bordered"),l[1].logLevel===void 0&&pl(()=>l[24].call(S)),o(N,"class","form-control"),o($,"class","label-text"),o(ne,"class","label"),o(ne,"for","config-body-limit"),o(G,"id","config-body-limit"),o(G,"type","text"),o(G,"class","input input-bordered"),o(G,"placeholder","50mb"),o(ge,"class","label-text-alt"),o(oe,"class","label"),o(ue,"class","form-control"),o(Pe,"class","divider"),o(Le,"class","divider"),o(Ie,"stroke-linecap","round"),o(Ie,"stroke-linejoin","round"),o(Ie,"stroke-width","2"),o(Ie,"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"),o(_e,"xmlns","http://www.w3.org/2000/svg"),o(_e,"class","stroke-current shrink-0 h-6 w-6"),o(_e,"fill","none"),o(_e,"viewBox","0 0 24 24"),o(fe,"class","alert alert-warning"),o(e,"class","card-body"),o(s,"class","card bg-base-100 shadow-xl mb-4"),o(nt,"class","card-title"),o(Be,"class","card-body"),o(Ve,"class","card bg-base-100 shadow-xl mb-4"),o(Ue,"class","card-title"),o(Re,"stroke-linecap","round"),o(Re,"stroke-linejoin","round"),o(Re,"stroke-width","2"),o(Re,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(qe,"xmlns","http://www.w3.org/2000/svg"),o(qe,"fill","none"),o(qe,"viewBox","0 0 24 24"),o(qe,"class","stroke-current shrink-0 w-6 h-6"),o(ce,"class","alert alert-info"),o(Me,"class","card-body"),o(Ze,"class","card bg-base-100 shadow-xl")},m(rt,gt){L(rt,s,gt),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,m),t(c,g),t(c,b),Y(b,l[1].port),t(e,k),t(e,w),t(w,C),t(C,E),t(E,T),t(w,M),t(w,R),Y(R,l[1].workers),t(w,j),t(w,P),t(P,I),t(I,D),t(e,A),t(e,N),t(N,Z),t(Z,Q),t(Q,z),t(N,K),t(N,S),t(S,B),t(S,U),t(S,F),t(S,J),kt(S,l[1].logLevel,!0),t(e,ie),t(e,ue),t(ue,ne),t(ne,$),t($,ae),t(ue,ee),t(ue,G),Y(G,l[1].bodyParserLimit),t(ue,pe),t(ue,oe),t(oe,ge),t(ge,ye),t(e,ze),t(e,Pe),t(e,we),Ct(Fe,e,null),t(e,je),t(e,Le),t(e,Se),t(e,fe),t(fe,_e),t(_e,Ie),t(fe,De),t(fe,se),t(se,me),L(rt,Ee,gt),L(rt,Ve,gt),t(Ve,Be),t(Be,nt),t(nt,Qe),t(Be,Ye),Ct(ve,Be,null),L(rt,Te,gt),L(rt,Ze,gt),t(Ze,Me),t(Me,Ue),t(Ue,mt),t(Me,Ge),t(Me,ce),t(ce,qe),t(qe,Re),t(ce,dt),t(ce,We),t(We,He),t(We,X),t(We,Ht),Ke=!0,_t||(tt=[V(b,"input",l[22]),V(R,"input",l[23]),V(S,"change",l[24]),V(G,"input",l[25])],_t=!0)},p(rt,gt){(!Ke||gt[0]&2048)&&a!==(a=rt[11]("configuration.systemSettings")+"")&&v(i,a),(!Ke||gt[0]&2048)&&p!==(p=rt[11]("configuration.serverPort")+"")&&v(m,p),gt[0]&2&&Mt(b.value)!==rt[1].port&&Y(b,rt[1].port),(!Ke||gt[0]&2048)&&y!==(y=rt[11]("configuration.workerProcesses")+"")&&v(T,y),gt[0]&2&&Mt(R.value)!==rt[1].workers&&Y(R,rt[1].workers),(!Ke||gt[0]&2048)&&q!==(q=rt[11]("configuration.workerProcessesHelp")+"")&&v(D,q),(!Ke||gt[0]&2048)&&x!==(x=rt[11]("configuration.logLevel")+"")&&v(z,x),gt[0]&2&&kt(S,rt[1].logLevel),(!Ke||gt[0]&2048)&&te!==(te=rt[11]("configuration.bodyParserLimit")+"")&&v(ae,te),gt[0]&2&&G.value!==rt[1].bodyParserLimit&&Y(G,rt[1].bodyParserLimit),(!Ke||gt[0]&2048)&&he!==(he=rt[11]("configuration.bodyParserLimitHelp")+"")&&v(ye,he);const wt={};gt[0]&2048&&(wt.label=rt[11]("auth.globalAuth")),!Je&&gt[0]&2&&(Je=!0,wt.value=rt[1].auth,Rl(()=>Je=!1)),Fe.$set(wt),(!Ke||gt[0]&2048)&&ke!==(ke=rt[11]("configuration.requiresRestart")+"")&&v(me,ke),(!Ke||gt[0]&2048)&&Ne!==(Ne=rt[11]("logging.title")+"")&&v(Qe,Ne);const pt={};!de&&gt[0]&2&&(de=!0,pt.value=rt[1].logging,Rl(()=>de=!1)),ve.$set(pt),(!Ke||gt[0]&2048)&&Ce!==(Ce=rt[11]("routes.title")+"")&&v(mt,Ce),(!Ke||gt[0]&2050)&&O!==(O=rt[11]("configuration.routesConfigured",{values:{count:rt[1].routes.length}})+"")&&v(He,O),(!Ke||gt[0]&2048)&&ft!==(ft=rt[11]("configuration.manageRoutes")+"")&&v(Ht,ft)},i(rt){Ke||(et(Fe.$$.fragment,rt),et(ve.$$.fragment,rt),Ke=!0)},o(rt){st(Fe.$$.fragment,rt),st(ve.$$.fragment,rt),Ke=!1},d(rt){rt&&(H(s),H(Ee),H(Ve),H(Te),H(Ze)),yt(Fe),yt(ve),_t=!1,vt(tt)}}}function p1(l){let s,e,n,a,i,u=l[11]("configuration.jsonParseError",{values:{error:l[9]}})+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error mb-4")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d[0]&2560&&u!==(u=f[11]("configuration.jsonParseError",{values:{error:f[9]}})+"")&&v(c,u)},d(f){f&&H(s)}}}function O2(l){let s,e,n,a,i=l[11]("configuration.title")+"",u,c,f,d=l[11]("configuration.subtitle")+"",p,m,g,b,k,w,C,E=l[11]("configuration.export")+"",y,T,M,R,j,P,I,q=l[11]("configuration.import")+"",D,A,N,Z,Q=l[11]("configuration.save")+"",x,z,K,S,B,U=l[11]("configuration.reload")+"",F,J,ie,ue,ne,$=l[11]("configuration.restart")+"",te,ae,ee,G,pe,oe,ge,he,ye,ze,Pe,we=l[11]("configuration.confirmRestart")+"",Fe,Je,je,Le=l[11]("configuration.restartMessage")+"",Se,fe,_e,Ie,De,se,ke,me=l[11]("configuration.restartWarning")+"",Ee,Ve,Be,nt,Ne=l[11]("common.cancel")+"",Qe,Ye,ve,de,Te,Ze,Me=l[11]("configuration.restart")+"",Ue,Ce,mt,Ge;function ce(tt,it){return tt[6]?H2:q2}let qe=ce(l),Re=qe(l);function dt(tt,it){return tt[4]?P2:L2}let We=dt(l),O=We(l);function He(tt,it){return tt[5]?D2:j2}let X=He(l),ft=X(l);const Ht=[A2,I2,B2],Ke=[];function _t(tt,it){return tt[3]?0:tt[2]?1:tt[1]?2:-1}return~(G=_t(l))&&(pe=Ke[G]=Ht[G](l)),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h1"),u=_(i),c=h(),f=r("p"),p=_(d),m=h(),g=r("div"),b=r("button"),k=re("svg"),w=re("path"),C=h(),y=_(E),M=h(),R=r("button"),j=re("svg"),P=re("path"),I=h(),D=_(q),A=h(),N=r("button"),Re.c(),Z=h(),x=_(Q),K=h(),S=r("button"),O.c(),B=h(),F=_(U),ie=h(),ue=r("button"),ft.c(),ne=h(),te=_($),ee=h(),pe&&pe.c(),oe=h(),ge=r("input"),he=h(),ye=r("div"),ze=r("div"),Pe=r("h3"),Fe=_(we),Je=h(),je=r("p"),Se=_(Le),fe=h(),_e=r("div"),Ie=re("svg"),De=re("path"),se=h(),ke=r("span"),Ee=_(me),Ve=h(),Be=r("div"),nt=r("button"),Qe=_(Ne),Ye=h(),ve=r("button"),de=re("svg"),Te=re("path"),Ze=h(),Ue=_(Me),o(a,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(k,"xmlns","http://www.w3.org/2000/svg"),o(k,"class","h-4 w-4"),o(k,"fill","none"),o(k,"viewBox","0 0 24 24"),o(k,"stroke","currentColor"),o(b,"class","btn btn-outline btn-sm"),b.disabled=T=l[3]||!l[0],o(P,"stroke-linecap","round"),o(P,"stroke-linejoin","round"),o(P,"stroke-width","2"),o(P,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(j,"xmlns","http://www.w3.org/2000/svg"),o(j,"class","h-4 w-4"),o(j,"fill","none"),o(j,"viewBox","0 0 24 24"),o(j,"stroke","currentColor"),o(R,"class","btn btn-outline btn-sm"),R.disabled=l[3],o(N,"class","btn btn-success btn-sm"),N.disabled=z=l[6]||l[3]||!!l[9],o(S,"class","btn btn-primary btn-sm"),S.disabled=J=l[4]||l[3],o(ue,"class","btn btn-warning btn-sm"),ue.disabled=ae=l[5]||l[3],o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(ge,"type","checkbox"),o(ge,"class","modal-toggle"),o(Pe,"class","font-bold text-lg"),o(je,"class","py-4"),o(De,"stroke-linecap","round"),o(De,"stroke-linejoin","round"),o(De,"stroke-width","2"),o(De,"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"),o(Ie,"xmlns","http://www.w3.org/2000/svg"),o(Ie,"class","stroke-current shrink-0 h-6 w-6"),o(Ie,"fill","none"),o(Ie,"viewBox","0 0 24 24"),o(_e,"class","alert alert-warning"),o(nt,"class","btn btn-ghost"),o(Te,"stroke-linecap","round"),o(Te,"stroke-linejoin","round"),o(Te,"stroke-width","2"),o(Te,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(de,"xmlns","http://www.w3.org/2000/svg"),o(de,"class","h-4 w-4 mr-1"),o(de,"fill","none"),o(de,"viewBox","0 0 24 24"),o(de,"stroke","currentColor"),o(ve,"class","btn btn-warning"),o(Be,"class","modal-action"),o(ze,"class","modal-box"),o(ye,"class","modal"),le(ye,"modal-open",l[10]),o(s,"class","p-6")},m(tt,it){L(tt,s,it),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,p),t(e,m),t(e,g),t(g,b),t(b,k),t(k,w),t(b,C),t(b,y),t(g,M),t(g,R),t(R,j),t(j,P),t(R,I),t(R,D),t(g,A),t(g,N),Re.m(N,null),t(N,Z),t(N,x),t(g,K),t(g,S),O.m(S,null),t(S,B),t(S,F),t(g,ie),t(g,ue),ft.m(ue,null),t(ue,ne),t(ue,te),t(s,ee),~G&&Ke[G].m(s,null),t(s,oe),t(s,ge),ge.checked=l[10],t(s,he),t(s,ye),t(ye,ze),t(ze,Pe),t(Pe,Fe),t(ze,Je),t(ze,je),t(je,Se),t(ze,fe),t(ze,_e),t(_e,Ie),t(Ie,De),t(_e,se),t(_e,ke),t(ke,Ee),t(ze,Ve),t(ze,Be),t(Be,nt),t(nt,Qe),t(Be,Ye),t(Be,ve),t(ve,de),t(de,Te),t(ve,Ze),t(ve,Ue),Ce=!0,mt||(Ge=[V(b,"click",l[14]),V(R,"click",l[15]),V(N,"click",l[13]),V(S,"click",l[16]),V(ue,"click",l[18]),V(ge,"change",l[29]),V(nt,"click",l[30]),V(ve,"click",l[17])],mt=!0)},p(tt,it){(!Ce||it[0]&2048)&&i!==(i=tt[11]("configuration.title")+"")&&v(u,i),(!Ce||it[0]&2048)&&d!==(d=tt[11]("configuration.subtitle")+"")&&v(p,d),(!Ce||it[0]&2048)&&E!==(E=tt[11]("configuration.export")+"")&&v(y,E),(!Ce||it[0]&9&&T!==(T=tt[3]||!tt[0]))&&(b.disabled=T),(!Ce||it[0]&2048)&&q!==(q=tt[11]("configuration.import")+"")&&v(D,q),(!Ce||it[0]&8)&&(R.disabled=tt[3]),qe!==(qe=ce(tt))&&(Re.d(1),Re=qe(tt),Re&&(Re.c(),Re.m(N,Z))),(!Ce||it[0]&2048)&&Q!==(Q=tt[11]("configuration.save")+"")&&v(x,Q),(!Ce||it[0]&584&&z!==(z=tt[6]||tt[3]||!!tt[9]))&&(N.disabled=z),We!==(We=dt(tt))&&(O.d(1),O=We(tt),O&&(O.c(),O.m(S,B))),(!Ce||it[0]&2048)&&U!==(U=tt[11]("configuration.reload")+"")&&v(F,U),(!Ce||it[0]&24&&J!==(J=tt[4]||tt[3]))&&(S.disabled=J),X!==(X=He(tt))&&(ft.d(1),ft=X(tt),ft&&(ft.c(),ft.m(ue,ne))),(!Ce||it[0]&2048)&&$!==($=tt[11]("configuration.restart")+"")&&v(te,$),(!Ce||it[0]&40&&ae!==(ae=tt[5]||tt[3]))&&(ue.disabled=ae);let Oe=G;G=_t(tt),G===Oe?~G&&Ke[G].p(tt,it):(pe&&(Gl(),st(Ke[Oe],1,1,()=>{Ke[Oe]=null}),Kl()),~G?(pe=Ke[G],pe?pe.p(tt,it):(pe=Ke[G]=Ht[G](tt),pe.c()),et(pe,1),pe.m(s,oe)):pe=null),it[0]&1024&&(ge.checked=tt[10]),(!Ce||it[0]&2048)&&we!==(we=tt[11]("configuration.confirmRestart")+"")&&v(Fe,we),(!Ce||it[0]&2048)&&Le!==(Le=tt[11]("configuration.restartMessage")+"")&&v(Se,Le),(!Ce||it[0]&2048)&&me!==(me=tt[11]("configuration.restartWarning")+"")&&v(Ee,me),(!Ce||it[0]&2048)&&Ne!==(Ne=tt[11]("common.cancel")+"")&&v(Qe,Ne),(!Ce||it[0]&2048)&&Me!==(Me=tt[11]("configuration.restart")+"")&&v(Ue,Me),(!Ce||it[0]&1024)&&le(ye,"modal-open",tt[10])},i(tt){Ce||(et(pe),Ce=!0)},o(tt){st(pe),Ce=!1},d(tt){tt&&H(s),Re.d(),O.d(),ft.d(),~G&&Ke[G].d(),mt=!1,vt(Ge)}}}function N2(l,s,e){let n;Dt(l,Rt,B=>e(11,n=B));let a=null,i=null,u=null,c=!0,f=!1,d=!1,p=!1,m="form",g="",b=null,k=!1;async function w(){try{e(0,a=await Pu()),e(1,i=JSON.parse(JSON.stringify(a))),e(8,g=JSON.stringify(a,null,2)),e(2,u=null)}catch(B){e(2,u=B.message)}finally{e(3,c=!1)}}function C(){e(9,b=null);try{e(1,i=JSON.parse(g))}catch(B){e(9,b=B.message)}}async function E(){if(i){e(6,p=!0);try{const B=await P0(i);if(!B.valid){jt.show(n("configuration.validationFailed",{values:{error:B.error}}),"error");return}const U=await L0(i);U.success?(jt.show(n("configuration.saved"),"success"),e(0,a=JSON.parse(JSON.stringify(i)))):jt.show(n("configuration.saveFailed",{values:{error:U.message}}),"error")}catch(B){jt.show(n("configuration.saveFailed",{values:{error:B.message}}),"error")}finally{e(6,p=!1)}}}function y(){if(!a)return;const B=JSON.stringify(a,null,2),U="data:application/json;charset=utf-8,"+encodeURIComponent(B),F=\`bungee-config-\${new Date().toISOString().split("T")[0]}.json\`,J=document.createElement("a");J.setAttribute("href",U),J.setAttribute("download",F),J.click(),jt.show(n("configuration.exported"),"success")}function T(){const B=document.createElement("input");B.type="file",B.accept=".json",B.onchange=async U=>{const F=U.target.files[0];if(F)try{const J=await F.text(),ie=JSON.parse(J);e(1,i=ie),e(8,g=JSON.stringify(ie,null,2)),jt.show(n("configuration.imported"),"success")}catch(J){jt.show(n("configuration.importFailed",{values:{error:J.message}}),"error")}},B.click()}async function M(){e(4,f=!0);try{const B=await h2();B.success?(jt.show(n("configuration.reloaded"),"success"),await w()):jt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}catch(B){jt.show(n("configuration.reloadFailed",{values:{error:B.message}}),"error")}finally{e(4,f=!1)}}async function R(){e(10,k=!1),e(5,d=!0);try{const B=await m2();B.success?jt.show(n("configuration.restartSent"),"success"):B.error&&B.error.includes("daemon mode")?jt.show(n("configuration.restartDaemonOnly"),"error",8e3):jt.show(n("configuration.restartFailed",{values:{error:B.error||B.message}}),"error")}catch(B){jt.show(n("configuration.restartFailed",{values:{error:B.message}}),"error")}finally{e(5,d=!1)}}Hs(()=>{w()});const j=[[]],P=()=>e(10,k=!0);function I(){m=this.__value,e(7,m)}function q(){m=this.__value,e(7,m)}function D(){i.port=Mt(this.value),e(1,i)}function A(){i.workers=Mt(this.value),e(1,i)}function N(){i.logLevel=dl(this),e(1,i)}function Z(){i.bodyParserLimit=this.value,e(1,i)}function Q(B){l.$$.not_equal(i.auth,B)&&(i.auth=B,e(1,i))}function x(B){l.$$.not_equal(i.logging,B)&&(i.logging=B,e(1,i))}function z(){g=this.value,e(8,g)}function K(){k=this.checked,e(10,k)}return[a,i,u,c,f,d,p,m,g,b,k,n,C,E,y,T,M,R,P,I,j,q,D,A,N,Z,Q,x,z,K,()=>e(10,k=!1)]}class U2 extends Nt{constructor(s){super(),Ut(this,s,N2,O2,Vt,{},null,[-1,-1])}}class wo{static async list(){return await yl.get("/routes")}static async get(s){return(await this.list()).find(n=>n.path===s)||null}static async create(s){const e=await yl.get("/config");if(e.routes?.some(n=>n.path===s.path))throw new Error(\`Route with path "\${s.path}" already exists\`);e.routes=e.routes||[],e.routes.push(s),await yl.put("/config",e)}static async update(s,e){const n=await yl.get("/config"),a=n.routes?.findIndex(i=>i.path===s);if(a===void 0||a===-1)throw new Error(\`Route with path "\${s}" not found\`);if(s!==e.path&&n.routes?.some(i=>i.path===e.path))throw new Error(\`Route with path "\${e.path}" already exists\`);n.routes[a]=e,await yl.put("/config",n)}static async delete(s){const e=await yl.get("/config"),n=e.routes?.findIndex(a=>a.path===s);if(n===void 0||n===-1)throw new Error(\`Route with path "\${s}" not found\`);e.routes.splice(n,1),await yl.put("/config",e)}static async validateRoute(s){const e={routes:[s]};return await yl.post("/config/validate",e)}static async duplicate(s){const e=await this.get(s);if(!e)throw new Error(\`Route with path "\${s}" not found\`);const n={...e};let a=1,i=\`\${s}-copy\`;const u=await this.list();for(;u.some(c=>c.path===i);)a++,i=\`\${s}-copy-\${a}\`;n.path=i,await this.create(n)}}function h1(l,s,e){const n=l.slice();return n[6]=s[e],n}function m1(l){let s;return{c(){s=r("span"),s.textContent="RED",o(s,"class","text-xs text-error font-semibold")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function g1(l){let s,e,n,a,i,u,c=js(l[6])==="unhealthy",f,d,p,m=l[6].target+"",g,b,k,w=(l[6].weight||100)+"",C,E,y,T=(l[6].priority||1)+"",M,R,j=c&&m1();return{c(){s=r("tr"),e=r("td"),n=r("div"),a=r("div"),u=h(),j&&j.c(),f=h(),d=r("td"),p=r("code"),g=_(m),b=h(),k=r("td"),C=_(w),E=h(),y=r("td"),M=_(T),R=h(),o(a,"class","w-3 h-3 rounded-full tooltip tooltip-right"),o(a,"data-tip",i=l[6].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${_1(l[6].lastFailureTime)}\`:js(l[6])==="healthy"?l[3]("upstreamsModal.statusHealthy"):js(l[6])==="unhealthy"?l[3]("upstreamsModal.statusUnhealthy"):l[3]("upstreamsModal.statusUnknown")),le(a,"bg-success",js(l[6])==="healthy"),le(a,"bg-error",js(l[6])==="unhealthy"),le(a,"bg-warning",js(l[6])==="unknown"),o(n,"class","flex items-center gap-2"),o(p,"class","text-sm"),o(k,"class","text-right"),o(y,"class","text-right"),o(s,"class","hover")},m(P,I){L(P,s,I),t(s,e),t(e,n),t(n,a),t(n,u),j&&j.m(n,null),t(s,f),t(s,d),t(d,p),t(p,g),t(s,b),t(s,k),t(k,C),t(s,E),t(s,y),t(y,M),t(s,R)},p(P,I){I&12&&i!==(i=P[6].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${_1(P[6].lastFailureTime)}\`:js(P[6])==="healthy"?P[3]("upstreamsModal.statusHealthy"):js(P[6])==="unhealthy"?P[3]("upstreamsModal.statusUnhealthy"):P[3]("upstreamsModal.statusUnknown"))&&o(a,"data-tip",i),I&4&&le(a,"bg-success",js(P[6])==="healthy"),I&4&&le(a,"bg-error",js(P[6])==="unhealthy"),I&4&&le(a,"bg-warning",js(P[6])==="unknown"),I&4&&(c=js(P[6])==="unhealthy"),c?j||(j=m1(),j.c(),j.m(n,null)):j&&(j.d(1),j=null),I&4&&m!==(m=P[6].target+"")&&v(g,m),I&4&&w!==(w=(P[6].weight||100)+"")&&v(C,w),I&4&&T!==(T=(P[6].priority||1)+"")&&v(M,T)},d(P){P&&H(s),j&&j.d()}}}function V2(l){let s,e,n,a=l[3]("upstreamsModal.title")+"",i,u,c,f,d,p,m,g,b,k,w=l[3]("routeCard.tableHeaders.status")+"",C,E,y,T=l[3]("routeCard.tableHeaders.target")+"",M,R,j,P=l[3]("routeCard.tableHeaders.weight")+"",I,q,D,A=l[3]("routeCard.tableHeaders.priority")+"",N,Z,Q,x,z,K,S=l[3]("upstreamsModal.close")+"",B,U,F,J,ie,ue,ne=ut(l[2]),$=[];for(let te=0;te<ne.length;te+=1)$[te]=g1(h1(l,ne,te));return{c(){s=r("dialog"),e=r("div"),n=r("h3"),i=_(a),u=_(" - "),c=r("code"),f=_(l[1]),d=h(),p=r("div"),m=r("table"),g=r("thead"),b=r("tr"),k=r("th"),C=_(w),E=h(),y=r("th"),M=_(T),R=h(),j=r("th"),I=_(P),q=h(),D=r("th"),N=_(A),Z=h(),Q=r("tbody");for(let te=0;te<$.length;te+=1)$[te].c();x=h(),z=r("div"),K=r("button"),B=_(S),U=h(),F=r("form"),J=r("button"),J.textContent="close",o(c,"class","text-primary"),o(n,"class","font-bold text-lg mb-4"),o(k,"class","w-20"),o(j,"class","w-24 text-right"),o(D,"class","w-20 text-right"),o(m,"class","table table-zebra w-full"),o(p,"class","overflow-x-auto max-h-[60vh]"),o(K,"class","btn"),o(z,"class","modal-action"),o(e,"class","modal-box max-w-3xl"),o(F,"method","dialog"),o(F,"class","modal-backdrop"),o(s,"class","modal"),le(s,"modal-open",l[0])},m(te,ae){L(te,s,ae),t(s,e),t(e,n),t(n,i),t(n,u),t(n,c),t(c,f),t(e,d),t(e,p),t(p,m),t(m,g),t(g,b),t(b,k),t(k,C),t(b,E),t(b,y),t(y,M),t(b,R),t(b,j),t(j,I),t(b,q),t(b,D),t(D,N),t(m,Z),t(m,Q);for(let ee=0;ee<$.length;ee+=1)$[ee]&&$[ee].m(Q,null);t(e,x),t(e,z),t(z,K),t(K,B),t(s,U),t(s,F),t(F,J),ie||(ue=[V(window,"keydown",l[5]),V(K,"click",l[4]),V(J,"click",l[4])],ie=!0)},p(te,[ae]){if(ae&8&&a!==(a=te[3]("upstreamsModal.title")+"")&&v(i,a),ae&2&&v(f,te[1]),ae&8&&w!==(w=te[3]("routeCard.tableHeaders.status")+"")&&v(C,w),ae&8&&T!==(T=te[3]("routeCard.tableHeaders.target")+"")&&v(M,T),ae&8&&P!==(P=te[3]("routeCard.tableHeaders.weight")+"")&&v(I,P),ae&8&&A!==(A=te[3]("routeCard.tableHeaders.priority")+"")&&v(N,A),ae&12){ne=ut(te[2]);let ee;for(ee=0;ee<ne.length;ee+=1){const G=h1(te,ne,ee);$[ee]?$[ee].p(G,ae):($[ee]=g1(G),$[ee].c(),$[ee].m(Q,null))}for(;ee<$.length;ee+=1)$[ee].d(1);$.length=ne.length}ae&8&&S!==(S=te[3]("upstreamsModal.close")+"")&&v(B,S),ae&1&&le(s,"modal-open",te[0])},i:ot,o:ot,d(te){te&&H(s),Gt($,te),ie=!1,vt(ue)}}}function js(l){return l.status?l.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function _1(l){if(!l)return"";const s=new Date(l),n=new Date().getTime()-s.getTime(),a=Math.floor(n/1e3),i=Math.floor(a/60),u=Math.floor(i/60);return a<60?\`\${a}\u79D2\u524D\`:i<60?\`\${i}\u5206\u949F\u524D\`:u<24?\`\${u}\u5C0F\u65F6\u524D\`:s.toLocaleString("zh-CN")}function J2(l,s,e){let n;Dt(l,Rt,d=>e(3,n=d));let{open:a=!1}=s,{routePath:i}=s,{upstreams:u=[]}=s;function c(){e(0,a=!1)}function f(d){d.key==="Escape"&&a&&c()}return l.$$set=d=>{"open"in d&&e(0,a=d.open),"routePath"in d&&e(1,i=d.routePath),"upstreams"in d&&e(2,u=d.upstreams)},[a,i,u,n,c,f]}class W2 extends Nt{constructor(s){super(),Ut(this,s,J2,V2,Vt,{open:0,routePath:1,upstreams:2})}}function b1(l,s,e){const n=l.slice();return n[12]=s[e][0],n[13]=s[e][1],n}function v1(l,s,e){const n=l.slice();return n[16]=s[e],n}function k1(l){let s,e=l[8]("routeCard.hasTransformer")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm badge-info")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&256&&e!==(e=a[8]("routeCard.hasTransformer")+"")&&v(n,e)},d(a){a&&H(s)}}}function w1(l){let s,e=l[8]("routeCard.failover")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm badge-success")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&256&&e!==(e=a[8]("routeCard.failover")+"")&&v(n,e)},d(a){a&&H(s)}}}function G2(l){let s,e,n,a,i=l[8]("routeCard.duplicate")+"",u;return{c(){s=re("svg"),e=re("path"),n=h(),a=r("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(c,f){L(c,s,f),t(s,e),L(c,n,f),L(c,a,f),t(a,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.duplicate")+"")&&v(u,i)},d(c){c&&(H(s),H(n),H(a))}}}function K2(l){let s,e,n,a=l[8]("routeCard.duplicating")+"",i;return{c(){s=r("span"),e=h(),n=r("span"),i=_(a),o(s,"class","loading loading-spinner loading-xs")},m(u,c){L(u,s,c),L(u,e,c),L(u,n,c),t(n,i)},p(u,c){c&256&&a!==(a=u[8]("routeCard.duplicating")+"")&&v(i,a)},d(u){u&&(H(s),H(e),H(n))}}}function Y2(l){let s,e,n,a,i=l[8]("routeCard.delete")+"",u;return{c(){s=re("svg"),e=re("path"),n=h(),a=r("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(c,f){L(c,s,f),t(s,e),L(c,n,f),L(c,a,f),t(a,u)},p(c,f){f&256&&i!==(i=c[8]("routeCard.delete")+"")&&v(u,i)},d(c){c&&(H(s),H(n),H(a))}}}function Q2(l){let s,e,n,a=l[8]("routeCard.deleting")+"",i;return{c(){s=r("span"),e=h(),n=r("span"),i=_(a),o(s,"class","loading loading-spinner loading-xs")},m(u,c){L(u,s,c),L(u,e,c),L(u,n,c),t(n,i)},p(u,c){c&256&&a!==(a=u[8]("routeCard.deleting")+"")&&v(i,a)},d(u){u&&(H(s),H(e),H(n))}}}function y1(l){let s,e,n,a,i,u,c,f=l[16].target+"",d,p,m,g,b=(l[16].weight||100)+"",k,w,C,E=(l[16].priority||1)+"",y,T;return{c(){s=r("tr"),e=r("td"),n=r("div"),i=h(),u=r("td"),c=r("code"),d=_(f),m=h(),g=r("td"),k=_(b),w=h(),C=r("td"),y=_(E),T=h(),o(n,"class","w-2.5 h-2.5 rounded-full tooltip tooltip-right"),o(n,"data-tip",a=l[16].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${M1(l[16].lastFailureTime)}\`:to(l[16])==="healthy"?"\u5065\u5EB7":to(l[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5"),le(n,"bg-success",to(l[16])==="healthy"),le(n,"bg-error",to(l[16])==="unhealthy"),le(n,"bg-warning",to(l[16])==="unknown"),o(c,"class","text-xs truncate max-w-xs block"),o(c,"title",p=l[16].target),o(g,"class","text-right text-xs"),o(C,"class","text-right text-xs"),o(s,"class","hover")},m(M,R){L(M,s,R),t(s,e),t(e,n),t(s,i),t(s,u),t(u,c),t(c,d),t(s,m),t(s,g),t(g,k),t(s,w),t(s,C),t(C,y),t(s,T)},p(M,R){R&128&&a!==(a=M[16].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${M1(M[16].lastFailureTime)}\`:to(M[16])==="healthy"?"\u5065\u5EB7":to(M[16])==="unhealthy"?"\u5F02\u5E38":"\u672A\u77E5")&&o(n,"data-tip",a),R&128&&le(n,"bg-success",to(M[16])==="healthy"),R&128&&le(n,"bg-error",to(M[16])==="unhealthy"),R&128&&le(n,"bg-warning",to(M[16])==="unknown"),R&128&&f!==(f=M[16].target+"")&&v(d,f),R&128&&p!==(p=M[16].target)&&o(c,"title",p),R&128&&b!==(b=(M[16].weight||100)+"")&&v(k,b),R&128&&E!==(E=(M[16].priority||1)+"")&&v(y,E)},d(M){M&&H(s)}}}function C1(l){let s,e,n,a,i,u=l[8]("routeCard.viewAll",{values:{count:l[0].upstreams.length}})+"",c,f,d;return{c(){s=r("div"),e=r("button"),n=re("svg"),a=re("path"),i=h(),c=_(u),o(a,"stroke-linecap","round"),o(a,"stroke-linejoin","round"),o(a,"stroke-width","2"),o(a,"d","M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-3 w-3"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"class","btn btn-sm btn-outline gap-1"),o(s,"class","flex justify-center mt-2")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,a),t(e,i),t(e,c),f||(d=V(e,"click",l[10]),f=!0)},p(p,m){m&257&&u!==(u=p[8]("routeCard.viewAll",{values:{count:p[0].upstreams.length}})+"")&&v(c,u)},d(p){p&&H(s),f=!1,d()}}}function E1(l){let s,e,n,a=ut(Object.entries(l[0].pathRewrite)),i=[];for(let u=0;u<a.length;u+=1)i[u]=T1(b1(l,a,u));return{c(){s=r("div"),e=r("p"),e.textContent="Path Rewrite:",n=h();for(let u=0;u<i.length;u+=1)i[u].c();o(e,"class","text-sm font-semibold mb-1"),o(s,"class","mt-3")},m(u,c){L(u,s,c),t(s,e),t(s,n);for(let f=0;f<i.length;f+=1)i[f]&&i[f].m(s,null)},p(u,c){if(c&257){a=ut(Object.entries(u[0].pathRewrite));let f;for(f=0;f<a.length;f+=1){const d=b1(u,a,f);i[f]?i[f].p(d,c):(i[f]=T1(d),i[f].c(),i[f].m(s,null))}for(;f<i.length;f+=1)i[f].d(1);i.length=a.length}},d(u){u&&H(s),Gt(i,u)}}}function T1(l){let s,e=l[8]("routeCard.pathRewrite.original")+"",n,a,i,u=l[12]+"",c,f,d=l[8]("routeCard.pathRewrite.rewriteTo")+"",p,m,g,b=l[13]+"",k,w;return{c(){s=r("div"),n=_(e),a=h(),i=r("code"),c=_(u),f=_(" \u2192 "),p=_(d),m=h(),g=r("code"),k=_(b),w=h(),o(i,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(g,"class","bg-base-200 px-1.5 py-0.5 rounded text-sm font-mono"),o(s,"class","text-sm text-gray-600")},m(C,E){L(C,s,E),t(s,n),t(s,a),t(s,i),t(i,c),t(s,f),t(s,p),t(s,m),t(s,g),t(g,k),t(s,w)},p(C,E){E&256&&e!==(e=C[8]("routeCard.pathRewrite.original")+"")&&v(n,e),E&1&&u!==(u=C[12]+"")&&v(c,u),E&256&&d!==(d=C[8]("routeCard.pathRewrite.rewriteTo")+"")&&v(p,d),E&1&&b!==(b=C[13]+"")&&v(k,b)},d(C){C&&H(s)}}}function Z2(l){let s,e,n,a,i,u,c=l[0].path+"",f,d,p,m,g=l[8]("routeCard.upstreams",{values:{count:l[0].upstreams.length}})+"",b,k,w,C,E,y,T,M,R,j=l[8]("routeCard.edit")+"",P,I,q,D,A,N,Z,Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae=l[8]("routeCard.tableHeaders.status")+"",ee,G,pe,oe=l[8]("routeCard.tableHeaders.target")+"",ge,he,ye,ze=l[8]("routeCard.tableHeaders.weight")+"",Pe,we,Fe,Je=l[8]("routeCard.tableHeaders.priority")+"",je,Le,Se,fe,_e,Ie,De,se,ke,me,Ee,Ve=l[0].transformer&&k1(l),Be=l[0].failover?.enabled&&w1(l);function nt(Ge,ce){return Ge[4]?K2:G2}let Ne=nt(l),Qe=Ne(l);function Ye(Ge,ce){return Ge[3]?Q2:Y2}let ve=Ye(l),de=ve(l),Te=ut(l[7]),Ze=[];for(let Ge=0;Ge<Te.length;Ge+=1)Ze[Ge]=y1(v1(l,Te,Ge));let Me=l[6]&&C1(l),Ue=l[0].pathRewrite&&E1(l);function Ce(Ge){l[11](Ge)}let mt={routePath:l[0].path,upstreams:l[0].upstreams};return l[5]!==void 0&&(mt.open=l[5]),De=new W2({props:mt}),Sl.push(()=>Ml(De,"open",Ce)),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=r("h2"),u=r("code"),f=_(c),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),Ve&&Ve.c(),w=h(),Be&&Be.c(),C=h(),E=r("div"),y=r("button"),T=re("svg"),M=re("path"),R=h(),P=_(j),I=h(),q=r("div"),D=r("button"),A=re("svg"),N=re("path"),Q=h(),x=r("ul"),z=r("li"),K=r("button"),Qe.c(),S=h(),B=r("li"),U=r("button"),de.c(),F=h(),J=r("div"),ie=r("div"),ue=r("table"),ne=r("thead"),$=r("tr"),te=r("th"),ee=_(ae),G=h(),pe=r("th"),ge=_(oe),he=h(),ye=r("th"),Pe=_(ze),we=h(),Fe=r("th"),je=_(Je),Le=h(),Se=r("tbody");for(let Ge=0;Ge<Ze.length;Ge+=1)Ze[Ge].c();fe=h(),Me&&Me.c(),_e=h(),Ue&&Ue.c(),Ie=h(),Et(De.$$.fragment),o(u,"class","text-primary"),o(i,"class","card-title text-lg"),o(m,"class","badge badge-sm"),o(p,"class","flex gap-2 mt-2 flex-wrap"),o(a,"class","flex-1"),o(M,"stroke-linecap","round"),o(M,"stroke-linejoin","round"),o(M,"stroke-width","2"),o(M,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(T,"xmlns","http://www.w3.org/2000/svg"),o(T,"class","h-4 w-4"),o(T,"fill","none"),o(T,"viewBox","0 0 24 24"),o(T,"stroke","currentColor"),o(y,"class","btn btn-sm btn-primary gap-1"),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(D,"type","button"),o(D,"class","btn btn-sm btn-ghost btn-square"),o(D,"title",Z=l[8]("routeCard.moreActions")),K.disabled=l[4],o(U,"class","text-error"),U.disabled=l[3],o(x,"class","dropdown-content menu p-2 shadow-lg bg-base-100 rounded-box w-40 z-10"),o(q,"class","dropdown dropdown-end"),o(E,"class","flex gap-2"),o(n,"class","flex justify-between items-start"),o(te,"class","w-12"),o(ye,"class","w-16 text-right"),o(Fe,"class","w-12 text-right"),o($,"class","bg-base-200"),o(ue,"class","table table-xs w-full"),o(ie,"class","overflow-x-auto border border-base-300 rounded-lg"),o(J,"class","mt-4"),o(e,"class","card-body flex flex-col"),o(s,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(Ge,ce){L(Ge,s,ce),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,f),t(a,d),t(a,p),t(p,m),t(m,b),t(p,k),Ve&&Ve.m(p,null),t(p,w),Be&&Be.m(p,null),t(n,C),t(n,E),t(E,y),t(y,T),t(T,M),t(y,R),t(y,P),t(E,I),t(E,q),t(q,D),t(D,A),t(A,N),t(q,Q),t(q,x),t(x,z),t(z,K),Qe.m(K,null),t(x,S),t(x,B),t(B,U),de.m(U,null),t(e,F),t(e,J),t(J,ie),t(ie,ue),t(ue,ne),t(ne,$),t($,te),t(te,ee),t($,G),t($,pe),t(pe,ge),t($,he),t($,ye),t(ye,Pe),t($,we),t($,Fe),t(Fe,je),t(ue,Le),t(ue,Se);for(let qe=0;qe<Ze.length;qe+=1)Ze[qe]&&Ze[qe].m(Se,null);t(J,fe),Me&&Me.m(J,null),t(e,_e),Ue&&Ue.m(e,null),L(Ge,Ie,ce),Ct(De,Ge,ce),ke=!0,me||(Ee=[V(y,"click",l[9]),V(K,"click",function(){sa(l[2])&&l[2].apply(this,arguments)}),V(U,"click",function(){sa(l[1])&&l[1].apply(this,arguments)})],me=!0)},p(Ge,[ce]){if(l=Ge,(!ke||ce&1)&&c!==(c=l[0].path+"")&&v(f,c),(!ke||ce&257)&&g!==(g=l[8]("routeCard.upstreams",{values:{count:l[0].upstreams.length}})+"")&&v(b,g),l[0].transformer?Ve?Ve.p(l,ce):(Ve=k1(l),Ve.c(),Ve.m(p,w)):Ve&&(Ve.d(1),Ve=null),l[0].failover?.enabled?Be?Be.p(l,ce):(Be=w1(l),Be.c(),Be.m(p,null)):Be&&(Be.d(1),Be=null),(!ke||ce&256)&&j!==(j=l[8]("routeCard.edit")+"")&&v(P,j),(!ke||ce&256&&Z!==(Z=l[8]("routeCard.moreActions")))&&o(D,"title",Z),Ne===(Ne=nt(l))&&Qe?Qe.p(l,ce):(Qe.d(1),Qe=Ne(l),Qe&&(Qe.c(),Qe.m(K,null))),(!ke||ce&16)&&(K.disabled=l[4]),ve===(ve=Ye(l))&&de?de.p(l,ce):(de.d(1),de=ve(l),de&&(de.c(),de.m(U,null))),(!ke||ce&8)&&(U.disabled=l[3]),(!ke||ce&256)&&ae!==(ae=l[8]("routeCard.tableHeaders.status")+"")&&v(ee,ae),(!ke||ce&256)&&oe!==(oe=l[8]("routeCard.tableHeaders.target")+"")&&v(ge,oe),(!ke||ce&256)&&ze!==(ze=l[8]("routeCard.tableHeaders.weight")+"")&&v(Pe,ze),(!ke||ce&256)&&Je!==(Je=l[8]("routeCard.tableHeaders.priority")+"")&&v(je,Je),ce&128){Te=ut(l[7]);let Re;for(Re=0;Re<Te.length;Re+=1){const dt=v1(l,Te,Re);Ze[Re]?Ze[Re].p(dt,ce):(Ze[Re]=y1(dt),Ze[Re].c(),Ze[Re].m(Se,null))}for(;Re<Ze.length;Re+=1)Ze[Re].d(1);Ze.length=Te.length}l[6]?Me?Me.p(l,ce):(Me=C1(l),Me.c(),Me.m(J,null)):Me&&(Me.d(1),Me=null),l[0].pathRewrite?Ue?Ue.p(l,ce):(Ue=E1(l),Ue.c(),Ue.m(e,null)):Ue&&(Ue.d(1),Ue=null);const qe={};ce&1&&(qe.routePath=l[0].path),ce&1&&(qe.upstreams=l[0].upstreams),!se&&ce&32&&(se=!0,qe.open=l[5],Rl(()=>se=!1)),De.$set(qe)},i(Ge){ke||(et(De.$$.fragment,Ge),ke=!0)},o(Ge){st(De.$$.fragment,Ge),ke=!1},d(Ge){Ge&&(H(s),H(Ie)),Ve&&Ve.d(),Be&&Be.d(),Qe.d(),de.d(),Gt(Ze,Ge),Me&&Me.d(),Ue&&Ue.d(),yt(De,Ge),me=!1,vt(Ee)}}}const S1=5;function to(l){return l.status?l.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function M1(l){if(!l)return"";const s=new Date(l),n=new Date().getTime()-s.getTime(),a=Math.floor(n/1e3),i=Math.floor(a/60),u=Math.floor(i/60);return a<60?\`\${a}\u79D2\u524D\`:i<60?\`\${i}\u5206\u949F\u524D\`:u<24?\`\${u}\u5C0F\u65F6\u524D\`:s.toLocaleString("zh-CN")}function X2(l,s,e){let n,a,i;Dt(l,Rt,w=>e(8,i=w));let{route:u}=s,{onDelete:c}=s,{onDuplicate:f}=s,{isDeleting:d=!1}=s,{isDuplicating:p=!1}=s,m=!1;function g(){zp(\`/routes/edit/\${encodeURIComponent(u.path)}\`)}function b(){e(5,m=!0)}function k(w){m=w,e(5,m)}return l.$$set=w=>{"route"in w&&e(0,u=w.route),"onDelete"in w&&e(1,c=w.onDelete),"onDuplicate"in w&&e(2,f=w.onDuplicate),"isDeleting"in w&&e(3,d=w.isDeleting),"isDuplicating"in w&&e(4,p=w.isDuplicating)},l.$$.update=()=>{l.$$.dirty&1&&e(7,n=u.upstreams.slice(0,S1)),l.$$.dirty&1&&e(6,a=u.upstreams.length>S1)},[u,c,f,d,p,m,a,n,i,g,b,k]}class x2 extends Nt{constructor(s){super(),Ut(this,s,X2,Z2,Vt,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function R1(l){let s,e,n,a,i,u,c,f,d,p,m,g,b,k,w,C,E;return{c(){s=r("dialog"),e=r("div"),n=r("h3"),a=_(l[5]),i=h(),u=r("p"),c=_(l[4]),f=h(),d=r("div"),p=r("button"),m=_(l[2]),g=h(),b=r("button"),k=_(l[3]),o(n,"class","font-bold text-lg"),o(u,"class","py-4"),o(p,"class","btn"),o(b,"class",w="btn "+l[1]),o(d,"class","modal-action"),o(e,"class","modal-box"),o(s,"class","modal modal-open")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,a),t(e,i),t(e,u),t(u,c),t(e,f),t(e,d),t(d,p),t(p,m),t(d,g),t(d,b),t(b,k),C||(E=[V(p,"click",l[7]),V(b,"click",l[6]),V(s,"click",l[8])],C=!0)},p(y,T){T&32&&v(a,y[5]),T&16&&v(c,y[4]),T&4&&v(m,y[2]),T&8&&v(k,y[3]),T&2&&w!==(w="btn "+y[1])&&o(b,"class",w)},d(y){y&&H(s),C=!1,vt(E)}}}function $2(l){let s,e=l[0]&&R1(l);return{c(){e&&e.c(),s=Ul()},m(n,a){e&&e.m(n,a),L(n,s,a)},p(n,[a]){n[0]?e?e.p(n,a):(e=R1(n),e.c(),e.m(s.parentNode,s)):e&&(e.d(1),e=null)},i:ot,o:ot,d(n){n&&H(s),e&&e.d(n)}}}function eh(l,s,e){let n,a,i,u,c;Dt(l,Rt,y=>e(13,c=y));let{open:f=!1}=s,{title:d=""}=s,{message:p=""}=s,{confirmText:m=""}=s,{cancelText:g=""}=s,{confirmClass:b="btn-error"}=s;const k=oa();function w(){k("confirm"),e(0,f=!1)}function C(){k("cancel"),e(0,f=!1)}function E(y){y.target===y.currentTarget&&C()}return l.$$set=y=>{"open"in y&&e(0,f=y.open),"title"in y&&e(9,d=y.title),"message"in y&&e(10,p=y.message),"confirmText"in y&&e(11,m=y.confirmText),"cancelText"in y&&e(12,g=y.cancelText),"confirmClass"in y&&e(1,b=y.confirmClass)},l.$$.update=()=>{l.$$.dirty&8704&&e(5,n=d||c("confirmDialog.title")),l.$$.dirty&1024&&e(4,a=p),l.$$.dirty&10240&&e(3,i=m||c("confirmDialog.confirm")),l.$$.dirty&12288&&e(2,u=g||c("confirmDialog.cancel"))},[f,b,u,i,a,n,w,C,E,d,p,m,g,c]}class $p extends Nt{constructor(s){super(),Ut(this,s,eh,$2,Vt,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function q1(l,s,e){const n=l.slice();return n[29]=s[e],n}function H1(l,s,e){const n=l.slice();return n[32]=s[e],n}function th(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function lh(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function L1(l){let s,e=l[32]+"",n,a;return{c(){s=r("option"),n=_(e),s.__value=a=l[32],Y(s,s.__value)},m(i,u){L(i,s,u),t(s,n)},p(i,u){u[0]&2048&&e!==(e=i[32]+"")&&v(n,e),u[0]&2048&&a!==(a=i[32])&&(s.__value=a,Y(s,s.__value))},d(i){i&&H(s)}}}function sh(l){let s,e,n=ut(l[12]),a=[];for(let u=0;u<n.length;u+=1)a[u]=P1(q1(l,n,u));const i=u=>st(a[u],1,1,()=>{a[u]=null});return{c(){s=r("div");for(let u=0;u<a.length;u+=1)a[u].c();o(s,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(u,c){L(u,s,c);for(let f=0;f<a.length;f+=1)a[f]&&a[f].m(s,null);e=!0},p(u,c){if(c[0]&152320){n=ut(u[12]);let f;for(f=0;f<n.length;f+=1){const d=q1(u,n,f);a[f]?(a[f].p(d,c),et(a[f],1)):(a[f]=P1(d),a[f].c(),et(a[f],1),a[f].m(s,null))}for(Gl(),f=n.length;f<a.length;f+=1)i(f);Kl()}},i(u){if(!e){for(let c=0;c<n.length;c+=1)et(a[c]);e=!0}},o(u){a=a.filter(Boolean);for(let c=0;c<a.length;c+=1)st(a[c]);e=!1},d(u){u&&H(s),Gt(a,u)}}}function oh(l){let s;function e(i,u){return i[0].length===0?ih:rh}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","text-center py-12")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},i:ot,o:ot,d(i){i&&H(s),a.d()}}}function nh(l){let s,e,n,a,i,u=l[13]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m[0]&8192&&u!==(u=p[13]("common.error")+"")&&v(c,u),m[0]&32&&v(d,p[5])},i:ot,o:ot,d(p){p&&H(s)}}}function ah(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function P1(l){let s,e;function n(){return l[24](l[29])}function a(){return l[25](l[29])}return s=new x2({props:{route:l[29],onDelete:n,onDuplicate:a,isDeleting:l[8].has(l[29].path),isDuplicating:l[9].has(l[29].path)}}),{c(){Et(s.$$.fragment)},m(i,u){Ct(s,i,u),e=!0},p(i,u){l=i;const c={};u[0]&4096&&(c.route=l[29]),u[0]&4096&&(c.onDelete=n),u[0]&4096&&(c.onDuplicate=a),u[0]&4352&&(c.isDeleting=l[8].has(l[29].path)),u[0]&4608&&(c.isDuplicating=l[9].has(l[29].path)),s.$set(c)},i(i){e||(et(s.$$.fragment,i),e=!0)},o(i){st(s.$$.fragment,i),e=!1},d(i){yt(s,i)}}}function rh(l){let s,e,n,a=l[13]("routes.noMatchingRoutes")+"",i,u,c,f=l[13]("routes.noMatchingMessage")+"",d;return{c(){s=r("div"),s.textContent="\uD83D\uDD0D",e=h(),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),o(s,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500")},m(p,m){L(p,s,m),L(p,e,m),L(p,n,m),t(n,i),L(p,u,m),L(p,c,m),t(c,d)},p(p,m){m[0]&8192&&a!==(a=p[13]("routes.noMatchingRoutes")+"")&&v(i,a),m[0]&8192&&f!==(f=p[13]("routes.noMatchingMessage")+"")&&v(d,f)},d(p){p&&(H(s),H(e),H(n),H(u),H(c))}}}function ih(l){let s,e,n,a=l[13]("routes.noRoutes")+"",i,u,c,f=l[13]("routes.noRoutesMessage")+"",d,p,m,g=l[13]("routes.createFirstRoute")+"",b,k,w;return{c(){s=r("div"),s.textContent="\uD83D\uDE80",e=h(),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),m=r("button"),b=_(g),o(s,"class","text-6xl mb-4"),o(n,"class","text-xl font-semibold mb-2"),o(c,"class","text-gray-500 mb-4"),o(m,"class","btn btn-primary")},m(C,E){L(C,s,E),L(C,e,E),L(C,n,E),t(n,i),L(C,u,E),L(C,c,E),t(c,d),L(C,p,E),L(C,m,E),t(m,b),k||(w=V(m,"click",l[18]),k=!0)},p(C,E){E[0]&8192&&a!==(a=C[13]("routes.noRoutes")+"")&&v(i,a),E[0]&8192&&f!==(f=C[13]("routes.noRoutesMessage")+"")&&v(d,f),E[0]&8192&&g!==(g=C[13]("routes.createFirstRoute")+"")&&v(b,g)},d(C){C&&(H(s),H(e),H(n),H(u),H(c),H(p),H(m)),k=!1,w()}}}function j1(l){let s,e=l[13]("routes.showingRoutes",{values:{count:l[12].length,total:l[0].length}})+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","mt-6 text-sm text-gray-500 text-center")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&12289&&e!==(e=a[13]("routes.showingRoutes",{values:{count:a[12].length,total:a[0].length}})+"")&&v(n,e)},d(a){a&&H(s)}}}function uh(l){let s,e,n,a,i=l[13]("routes.title")+"",u,c,f,d=l[13]("routes.subtitle")+"",p,m,g,b,k,w,C,E=l[13]("routes.export")+"",y,T,M,R,j,P=l[13]("routes.import")+"",I,q,D,A,N=l[13]("routes.newRoute")+"",Z,Q,x,z,K,S,B,U,F,J,ie=l[13]("routes.allTransformers")+"",ue,ne,$,te,ae,ee=l[13]("routes.filterStatus.all")+"",G,pe,oe=l[13]("routes.filterStatus.healthy")+"",ge,he,ye=l[13]("routes.filterStatus.unhealthy")+"",ze,Pe,we,Fe,Je,je,Le,Se,fe,_e,Ie;function De(ve,de){return ve[10]?lh:th}let se=De(l),ke=se(l),me=ut(l[11]),Ee=[];for(let ve=0;ve<me.length;ve+=1)Ee[ve]=L1(H1(l,me,ve));const Ve=[ah,nh,oh,sh],Be=[];function nt(ve,de){return ve[4]?0:ve[5]?1:ve[12].length===0?2:3}we=nt(l),Fe=Be[we]=Ve[we](l);let Ne=!l[4]&&l[0].length>0&&j1(l);function Qe(ve){l[26](ve)}let Ye={title:l[13]("routes.confirmDelete"),message:l[7]?l[13]("routes.confirmDeleteMessage",{values:{path:l[7].path}}):"",confirmText:l[13]("common.delete"),cancelText:l[13]("common.cancel"),confirmClass:"btn-error"};return l[6]!==void 0&&(Ye.open=l[6]),Le=new $p({props:Ye}),Sl.push(()=>Ml(Le,"open",Qe)),Le.$on("confirm",l[15]),Le.$on("cancel",l[16]),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h1"),u=_(i),c=h(),f=r("p"),p=_(d),m=h(),g=r("div"),b=r("button"),k=re("svg"),w=re("path"),C=h(),y=_(E),M=h(),R=r("button"),ke.c(),j=h(),I=_(P),D=h(),A=r("button"),Z=_(N),Q=h(),x=r("div"),z=r("div"),K=r("input"),B=h(),U=r("div"),F=r("select"),J=r("option"),ue=_(ie);for(let ve=0;ve<Ee.length;ve+=1)Ee[ve].c();ne=h(),$=r("div"),te=r("select"),ae=r("option"),G=_(ee),pe=r("option"),ge=_(oe),he=r("option"),ze=_(ye),Pe=h(),Fe.c(),Je=h(),Ne&&Ne.c(),je=h(),Et(Le.$$.fragment),o(a,"class","text-3xl font-bold"),o(f,"class","text-sm text-gray-500 mt-1"),o(w,"stroke-linecap","round"),o(w,"stroke-linejoin","round"),o(w,"stroke-width","2"),o(w,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(k,"xmlns","http://www.w3.org/2000/svg"),o(k,"class","h-4 w-4"),o(k,"fill","none"),o(k,"viewBox","0 0 24 24"),o(k,"stroke","currentColor"),o(b,"class","btn btn-sm btn-outline"),b.disabled=T=l[4]||l[0].length===0,o(R,"class","btn btn-sm btn-outline"),R.disabled=q=l[4]||l[10],o(A,"class","btn btn-primary btn-sm"),o(g,"class","flex gap-2"),o(e,"class","flex justify-between items-center mb-6"),o(K,"type","text"),o(K,"placeholder",S=l[13]("routes.searchPlaceholder")),o(K,"class","input input-bordered"),o(z,"class","form-control flex-1"),J.__value="",Y(J,J.__value),o(F,"class","select select-bordered"),l[2]===void 0&&pl(()=>l[22].call(F)),o(U,"class","form-control w-48"),ae.__value="all",Y(ae,ae.__value),pe.__value="healthy",Y(pe,pe.__value),he.__value="unhealthy",Y(he,he.__value),o(te,"class","select select-bordered"),l[3]===void 0&&pl(()=>l[23].call(te)),o($,"class","form-control w-32"),o(x,"class","flex gap-4 mb-6"),o(s,"class","p-6")},m(ve,de){L(ve,s,de),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,p),t(e,m),t(e,g),t(g,b),t(b,k),t(k,w),t(b,C),t(b,y),t(g,M),t(g,R),ke.m(R,null),t(R,j),t(R,I),t(g,D),t(g,A),t(A,Z),t(s,Q),t(s,x),t(x,z),t(z,K),Y(K,l[1]),t(x,B),t(x,U),t(U,F),t(F,J),t(J,ue);for(let Te=0;Te<Ee.length;Te+=1)Ee[Te]&&Ee[Te].m(F,null);kt(F,l[2],!0),t(x,ne),t(x,$),t($,te),t(te,ae),t(ae,G),t(te,pe),t(pe,ge),t(te,he),t(he,ze),kt(te,l[3],!0),t(s,Pe),Be[we].m(s,null),t(s,Je),Ne&&Ne.m(s,null),t(s,je),Ct(Le,s,null),fe=!0,_e||(Ie=[V(b,"click",l[19]),V(R,"click",l[20]),V(A,"click",l[18]),V(K,"input",l[21]),V(F,"change",l[22]),V(te,"change",l[23])],_e=!0)},p(ve,de){if((!fe||de[0]&8192)&&i!==(i=ve[13]("routes.title")+"")&&v(u,i),(!fe||de[0]&8192)&&d!==(d=ve[13]("routes.subtitle")+"")&&v(p,d),(!fe||de[0]&8192)&&E!==(E=ve[13]("routes.export")+"")&&v(y,E),(!fe||de[0]&17&&T!==(T=ve[4]||ve[0].length===0))&&(b.disabled=T),se!==(se=De(ve))&&(ke.d(1),ke=se(ve),ke&&(ke.c(),ke.m(R,j))),(!fe||de[0]&8192)&&P!==(P=ve[13]("routes.import")+"")&&v(I,P),(!fe||de[0]&1040&&q!==(q=ve[4]||ve[10]))&&(R.disabled=q),(!fe||de[0]&8192)&&N!==(N=ve[13]("routes.newRoute")+"")&&v(Z,N),(!fe||de[0]&8192&&S!==(S=ve[13]("routes.searchPlaceholder")))&&o(K,"placeholder",S),de[0]&2&&K.value!==ve[1]&&Y(K,ve[1]),(!fe||de[0]&8192)&&ie!==(ie=ve[13]("routes.allTransformers")+"")&&v(ue,ie),de[0]&2048){me=ut(ve[11]);let Me;for(Me=0;Me<me.length;Me+=1){const Ue=H1(ve,me,Me);Ee[Me]?Ee[Me].p(Ue,de):(Ee[Me]=L1(Ue),Ee[Me].c(),Ee[Me].m(F,null))}for(;Me<Ee.length;Me+=1)Ee[Me].d(1);Ee.length=me.length}de[0]&2052&&kt(F,ve[2]),(!fe||de[0]&8192)&&ee!==(ee=ve[13]("routes.filterStatus.all")+"")&&v(G,ee),(!fe||de[0]&8192)&&oe!==(oe=ve[13]("routes.filterStatus.healthy")+"")&&v(ge,oe),(!fe||de[0]&8192)&&ye!==(ye=ve[13]("routes.filterStatus.unhealthy")+"")&&v(ze,ye),de[0]&8&&kt(te,ve[3]);let Te=we;we=nt(ve),we===Te?Be[we].p(ve,de):(Gl(),st(Be[Te],1,1,()=>{Be[Te]=null}),Kl(),Fe=Be[we],Fe?Fe.p(ve,de):(Fe=Be[we]=Ve[we](ve),Fe.c()),et(Fe,1),Fe.m(s,Je)),!ve[4]&&ve[0].length>0?Ne?Ne.p(ve,de):(Ne=j1(ve),Ne.c(),Ne.m(s,je)):Ne&&(Ne.d(1),Ne=null);const Ze={};de[0]&8192&&(Ze.title=ve[13]("routes.confirmDelete")),de[0]&8320&&(Ze.message=ve[7]?ve[13]("routes.confirmDeleteMessage",{values:{path:ve[7].path}}):""),de[0]&8192&&(Ze.confirmText=ve[13]("common.delete")),de[0]&8192&&(Ze.cancelText=ve[13]("common.cancel")),!Se&&de[0]&64&&(Se=!0,Ze.open=ve[6],Rl(()=>Se=!1)),Le.$set(Ze)},i(ve){fe||(et(Fe),et(Le.$$.fragment,ve),fe=!0)},o(ve){st(Fe),st(Le.$$.fragment,ve),fe=!1},d(ve){ve&&H(s),ke.d(),Gt(Ee,ve),Be[we].d(),Ne&&Ne.d(),yt(Le),_e=!1,vt(Ie)}}}function fh(l,s,e){let n,a,i;Dt(l,Rt,z=>e(13,i=z));let u=[],c=!0,f=null,d="",p="",m="all",g=!0,b=!1,k=null,w=new Set,C=new Set,E=!1;async function y(z=!1){const K=!z&&g;try{K&&e(4,c=!0),e(0,u=await wo.list()),e(5,f=null),g=!1}catch(S){e(5,f=S.message),z||jt.show(S.message,"error")}finally{K&&e(4,c=!1)}}async function T(z){e(7,k=z),e(6,b=!0)}async function M(){if(k){w.add(k.path),e(8,w);try{await wo.delete(k.path),jt.show(i("routes.deleted",{values:{path:k.path}}),"success"),await y()}catch(z){jt.show(i("routes.deleteFailed",{values:{error:z.message}}),"error")}finally{w.delete(k.path),e(8,w),e(7,k=null)}}}function R(){e(7,k=null)}async function j(z){C.add(z.path),e(9,C);try{await wo.duplicate(z.path),jt.show(i("routes.duplicated",{values:{path:z.path}}),"success"),await y()}catch(K){jt.show(i("routes.duplicateFailed",{values:{error:K.message}}),"error")}finally{C.delete(z.path),e(9,C)}}function P(){zp("/routes/new")}function I(){if(u.length===0){jt.show(i("routes.noRoutesToExport"),"warning");return}const z=JSON.stringify(u,null,2),K="data:application/json;charset=utf-8,"+encodeURIComponent(z),S=\`bungee-routes-\${new Date().toISOString().split("T")[0]}.json\`,B=document.createElement("a");B.setAttribute("href",K),B.setAttribute("download",S),B.click(),jt.show(i("routes.exported"),"success")}function q(){const z=document.createElement("input");z.type="file",z.accept=".json",z.onchange=async K=>{const S=K.target.files[0];if(S){e(10,E=!0);try{const B=await S.text(),U=JSON.parse(B);if(!Array.isArray(U))throw new Error(i("routes.importMustBeArray"));let F=0,J=0;for(const ie of U)try{await wo.create(ie),F++}catch(ue){J++,console.error(\`Failed to import route \${ie.path}:\`,ue)}if(F>0){const ie=J>0?i("routes.importPartialSuccess",{values:{success:F,failed:J}}):i("routes.importSuccess",{values:{success:F}});jt.show(ie,"success"),await y()}else jt.show(i("routes.importFailed",{values:{error:\`\${J} routes failed\`}}),"error")}catch(B){jt.show(i("routes.importFailed",{values:{error:B.message}}),"error")}finally{e(10,E=!1)}}},z.click()}Hs(()=>{y();const z=setInterval(()=>{y(!0)},5e3);return()=>{clearInterval(z)}});function D(){d=this.value,e(1,d)}function A(){p=dl(this),e(2,p),e(11,a),e(0,u)}function N(){m=dl(this),e(3,m)}const Z=z=>T(z),Q=z=>j(z);function x(z){b=z,e(6,b)}return l.$$.update=()=>{l.$$.dirty[0]&15&&e(12,n=u.filter(z=>{const K=z.path.toLowerCase().includes(d.toLowerCase())||z.upstreams.some(U=>U.target.toLowerCase().includes(d.toLowerCase())),S=!p||typeof z.transformer=="string"&&z.transformer===p||z.upstreams.some(U=>typeof U.transformer=="string"&&U.transformer===p);let B=!0;return m==="healthy"?B=z.upstreams.every(U=>U.status==="HEALTHY"):m==="unhealthy"&&(B=z.upstreams.some(U=>U.status==="UNHEALTHY")),K&&S&&B})),l.$$.dirty[0]&1&&e(11,a=Array.from(new Set(u.flatMap(z=>{const K=[];return typeof z.transformer=="string"&&K.push(z.transformer),z.upstreams.forEach(S=>{typeof S.transformer=="string"&&K.push(S.transformer)}),K}))))},[u,d,p,m,c,f,b,k,w,C,E,a,n,i,T,M,R,j,P,I,q,D,A,N,Z,Q,x]}class ch extends Nt{constructor(s){super(),Ut(this,s,fh,uh,Vt,{},null,[-1,-1])}}const D1="/__ui/api";class e0{static async getAll(){const s=await fetch(\`\${D1}/transformers\`);if(!s.ok)throw new Error(\`HTTP \${s.status}: \${s.statusText}\`);const e=await s.json();return e.plugins||e.transformers||[]}static async getById(s){const e=await fetch(\`\${D1}/transformers/\${encodeURIComponent(s)}\`);if(!e.ok)throw new Error(\`HTTP \${e.status}: \${e.statusText}\`);return await e.json()}}let xr=null;async function dh(){if(xr===null)try{xr=await e0.getAll()}catch(l){console.warn("Failed to fetch transformers from API, using fallback:",l),xr=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return xr}function Du(l,s){const e=[],n=\`upstreams[\${s}]\`;if(!l.target)e.push({field:\`\${n}.target\`,message:Cs(Rt)("validation.targetRequired")});else try{const a=new URL(l.target);["http:","https:"].includes(a.protocol)||e.push({field:\`\${n}.target\`,message:Cs(Rt)("validation.targetProtocol")})}catch{e.push({field:\`\${n}.target\`,message:Cs(Rt)("validation.invalidUrl")})}return l.weight!==void 0&&(typeof l.weight!="number"||l.weight<=0)&&e.push({field:\`\${n}.weight\`,message:Cs(Rt)("validation.weightPositive")}),l.priority!==void 0&&(typeof l.priority!="number"||l.priority<0)&&e.push({field:\`\${n}.priority\`,message:Cs(Rt)("validation.priorityNonNegative")}),e}function ph(l){const s=[];return l.some(n=>n.weight!==void 0)&&l.reduce((a,i)=>a+(i.weight||0),0)===0&&s.push({field:"upstreams",message:Cs(Rt)("validation.totalWeightPositive")}),s}async function hh(l,s){const e=Du(l,s),n=\`upstreams[\${s}]\`;if(l.plugins&&l.plugins.length>0){const a=l.plugins[0];if(typeof a=="string")try{const i=await dh();if(!i.includes(a)){const u=Cs(Rt);e.push({field:\`\${n}.plugins\`,message:u("validation.unknownTransformer",{values:{transformer:a,options:i.join(", ")}})})}}catch(i){console.warn("Failed to validate plugin:",i)}}return e}async function mh(l){const s=[];if(l.path?l.path.startsWith("/")||s.push({field:"path",message:Cs(Rt)("validation.pathStartSlash")}):s.push({field:"path",message:Cs(Rt)("validation.pathRequired")}),!l.upstreams||l.upstreams.length===0)s.push({field:"upstreams",message:Cs(Rt)("validation.upstreamRequired")});else{const e=l.upstreams.map((a,i)=>hh(a,i));(await Promise.all(e)).forEach(a=>s.push(...a))}return l.pathRewrite&&Object.keys(l.pathRewrite).forEach(e=>{try{new RegExp(e)}catch{const n=Cs(Rt);s.push({field:\`pathRewrite.\${e}\`,message:n("validation.invalidRegex",{values:{pattern:e}})})}}),l.failover?.enabled&&(l.failover.retryableStatusCodes&&l.failover.retryableStatusCodes.forEach(e=>{if(e<100||e>599){const n=Cs(Rt);s.push({field:"failover.retryableStatusCodes",message:n("validation.invalidStatusCode",{values:{code:e}})})}}),l.failover.recoveryIntervalMs!==void 0&&l.failover.recoveryIntervalMs<=0&&s.push({field:"failover.recoveryIntervalMs",message:Cs(Rt)("validation.recoveryIntervalPositive")}),l.failover.recoveryTimeoutMs!==void 0&&l.failover.recoveryTimeoutMs<=0&&s.push({field:"failover.recoveryTimeoutMs",message:Cs(Rt)("validation.recoveryTimeoutPositive")})),s}function B1(l){let s,e,n,a,i,u,c,f,d,p,m;function g(w,C){return w[2]==="success"?vh:w[2]==="error"?bh:w[2]==="warning"?_h:gh}let b=g(l),k=b(l);return{c(){s=r("div"),e=r("div"),n=r("div"),k.c(),a=h(),i=r("span"),u=_(l[1]),c=h(),f=r("button"),f.textContent="\u2715",o(f,"class","btn btn-sm btn-ghost"),o(e,"class",d="alert "+l[3]+" shadow-lg"),o(s,"class","toast toast-end toast-top z-50")},m(w,C){L(w,s,C),t(s,e),t(e,n),k.m(n,null),t(n,a),t(n,i),t(i,u),t(e,c),t(e,f),p||(m=V(f,"click",l[4]),p=!0)},p(w,C){b!==(b=g(w))&&(k.d(1),k=b(w),k&&(k.c(),k.m(n,a))),C&2&&v(u,w[1]),C&8&&d!==(d="alert "+w[3]+" shadow-lg")&&o(e,"class",d)},d(w){w&&H(s),k.d(),p=!1,m()}}}function gh(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"class","stroke-current shrink-0 w-6 h-6")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function _h(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"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"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","stroke-current shrink-0 h-6 w-6"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function bh(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","stroke-current shrink-0 h-6 w-6"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function vh(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","stroke-current shrink-0 h-6 w-6"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function kh(l){let s,e=l[0]&&B1(l);return{c(){e&&e.c(),s=Ul()},m(n,a){e&&e.m(n,a),L(n,s,a)},p(n,[a]){n[0]?e?e.p(n,a):(e=B1(n),e.c(),e.m(s.parentNode,s)):e&&(e.d(1),e=null)},i:ot,o:ot,d(n){n&&H(s),e&&e.d(n)}}}function wh(l,s,e){let n,{message:a}=s,{type:i="info"}=s,{duration:u=3e3}=s,{visible:c=!0}=s;const f=oa();let d;Hs(()=>(u>0&&(d=setTimeout(()=>{e(0,c=!1),f("close")},u)),()=>{d&&clearTimeout(d)}));function p(){e(0,c=!1),f("close"),d&&clearTimeout(d)}return l.$$set=m=>{"message"in m&&e(1,a=m.message),"type"in m&&e(2,i=m.type),"duration"in m&&e(5,u=m.duration),"visible"in m&&e(0,c=m.visible)},l.$$.update=()=>{l.$$.dirty&4&&e(3,n={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[i])},[c,a,i,n,p,u]}class yh extends Nt{constructor(s){super(),Ut(this,s,wh,kh,Vt,{message:1,type:2,duration:5,visible:0})}}function I1(l,s,e){const n=l.slice();return n[7]=s[e],n}function A1(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=ut(l[1]),k=[];for(let w=0;w<b.length;w+=1)k[w]=F1(I1(l,b,w));return{c(){s=r("div"),e=r("div"),n=r("h3"),n.textContent="Select Route Template",a=h(),i=r("div");for(let w=0;w<k.length;w+=1)k[w].c();u=h(),c=r("div"),f=r("button"),f.textContent="Close",d=h(),p=r("button"),o(n,"class","font-bold text-lg mb-4"),o(i,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(f,"type","button"),o(f,"class","btn btn-sm"),o(c,"class","modal-action"),o(e,"class","modal-box max-w-4xl"),o(p,"type","button"),o(p,"class","modal-backdrop"),o(p,"aria-label","Close modal"),o(s,"class","modal modal-open")},m(w,C){L(w,s,C),t(s,e),t(e,n),t(e,a),t(e,i);for(let E=0;E<k.length;E+=1)k[E]&&k[E].m(i,null);t(e,u),t(e,c),t(c,f),t(s,d),t(s,p),m||(g=[V(f,"click",l[4]),V(p,"click",l[5])],m=!0)},p(w,C){if(C&6){b=ut(w[1]);let E;for(E=0;E<b.length;E+=1){const y=I1(w,b,E);k[E]?k[E].p(y,C):(k[E]=F1(y),k[E].c(),k[E].m(i,null))}for(;E<k.length;E+=1)k[E].d(1);k.length=b.length}},d(w){w&&H(s),Gt(k,w),m=!1,vt(g)}}}function F1(l){let s,e,n,a,i,u,c,f,d,p,m;function g(){return l[3](l[7])}return{c(){s=r("button"),e=r("div"),n=r("h4"),n.textContent=\`\${l[7].name}\`,a=h(),i=r("p"),i.textContent=\`\${l[7].description}\`,u=h(),c=r("div"),f=r("div"),f.textContent=\`\${JSON.stringify(l[7].template,null,2)}\`,d=h(),o(n,"class","card-title text-base"),o(i,"class","text-sm text-gray-600"),o(f,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),o(c,"class","mt-2"),o(e,"class","card-body"),o(s,"type","button"),o(s,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(e,a),t(e,i),t(e,u),t(e,c),t(c,f),t(s,d),p||(m=V(s,"click",g),p=!0)},p(b,k){l=b},d(b){b&&H(s),p=!1,m()}}}function Ch(l){let s,e=l[0]&&A1(l);return{c(){e&&e.c(),s=Ul()},m(n,a){e&&e.m(n,a),L(n,s,a)},p(n,[a]){n[0]?e?e.p(n,a):(e=A1(n),e.c(),e.m(s.parentNode,s)):e&&(e.d(1),e=null)},i:ot,o:ot,d(n){n&&H(s),e&&e.d(n)}}}function Eh(l,s,e){let{showTemplates:n=!1}=s;const a=oa(),i=[{name:"Simple Proxy",description:"Basic reverse proxy to a single upstream",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}]}},{name:"Load Balanced",description:"Multiple upstreams with load balancing",template:{path:"/api",upstreams:[{target:"https://api1.example.com",weight:100,priority:1},{target:"https://api2.example.com",weight:100,priority:1}]}},{name:"Failover Setup",description:"Primary and backup upstreams with failover",template:{path:"/api",upstreams:[{target:"https://primary.example.com",weight:200,priority:1},{target:"https://backup.example.com",weight:100,priority:2}],failover:{enabled:!0,retryableStatusCodes:[500,502,503,504]}}},{name:"Anthropic to Gemini",description:"Convert Anthropic API to Google Gemini format",template:{path:"/v1/messages",transformer:"anthropic-to-gemini",upstreams:[{target:"https://generativelanguage.googleapis.com",weight:100,priority:1}]}},{name:"Anthropic to OpenAI",description:"Convert Anthropic API to OpenAI format",template:{path:"/v1/messages",transformer:"anthropic-to-openai",upstreams:[{target:"https://api.openai.com",weight:100,priority:1}]}},{name:"Health Checked API",description:"API with health checks enabled",template:{path:"/api",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],healthCheck:{enabled:!0,interval:3e4,timeout:5e3,path:"/health"}}},{name:"Path Rewrite",description:"Route with path rewriting",template:{path:"/api/v2",upstreams:[{target:"https://api.example.com",weight:100,priority:1}],pathRewrite:{"^/api/v2":"/v1"}}}];function u(p){a("select",p.template),e(0,n=!1)}const c=p=>u(p),f=()=>e(0,n=!1),d=()=>e(0,n=!1);return l.$$set=p=>{"showTemplates"in p&&e(0,n=p.showTemplates)},[n,i,u,c,f,d]}class Th extends Nt{constructor(s){super(),Ut(this,s,Eh,Ch,Vt,{showTemplates:0})}}function z1(l,s,e){const n=l.slice();return n[16]=s[e],n}function Sh(l){let s,e,n=l[7]("plugin.none")+"",a,i,u,c,f,d=ut(l[6]),p=[];for(let g=0;g<d.length;g+=1)p[g]=O1(z1(l,d,g));let m=l[0]&&N1(l);return{c(){s=r("select"),e=r("option"),a=_(n);for(let g=0;g<p.length;g+=1)p[g].c();i=h(),m&&m.c(),u=Ul(),e.__value=null,Y(e,e.__value),o(s,"id","plugin-select"),o(s,"class","select select-bordered"),l[0]===void 0&&pl(()=>l[11].call(s))},m(g,b){L(g,s,b),t(s,e),t(e,a);for(let k=0;k<p.length;k+=1)p[k]&&p[k].m(s,null);kt(s,l[0],!0),L(g,i,b),m&&m.m(g,b),L(g,u,b),c||(f=[V(s,"change",l[11]),V(s,"change",l[8])],c=!0)},p(g,b){if(b&128&&n!==(n=g[7]("plugin.none")+"")&&v(a,n),b&64){d=ut(g[6]);let k;for(k=0;k<d.length;k+=1){const w=z1(g,d,k);p[k]?p[k].p(w,b):(p[k]=O1(w),p[k].c(),p[k].m(s,null))}for(;k<p.length;k+=1)p[k].d(1);p.length=d.length}b&65&&kt(s,g[0]),g[0]?m?m.p(g,b):(m=N1(g),m.c(),m.m(u.parentNode,u)):m&&(m.d(1),m=null)},d(g){g&&(H(s),H(i),H(u)),Gt(p,g),m&&m.d(g),c=!1,vt(f)}}}function Mh(l){let s,e,n,a,i,u=l[7]("routeEditor.noPluginsAvailable")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(s,"class","alert alert-info")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d&128&&u!==(u=f[7]("routeEditor.noPluginsAvailable")+"")&&v(c,u)},d(f){f&&H(s)}}}function O1(l){let s,e=l[16].name+"",n,a;return{c(){s=r("option"),n=_(e),s.__value=a=l[16].id,Y(s,s.__value)},m(i,u){L(i,s,u),t(s,n)},p(i,u){u&64&&e!==(e=i[16].name+"")&&v(n,e),u&64&&a!==(a=i[16].id)&&(s.__value=a,Y(s,s.__value))},d(i){i&&H(s)}}}function N1(l){let s,e,n=l[6].find(l[12])?.description+"",a;return{c(){s=r("div"),e=r("span"),a=_(n),o(e,"class","label-text-alt text-gray-500"),o(s,"class","label")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&65&&n!==(n=i[6].find(i[12])?.description+"")&&v(a,n)},d(i){i&&H(s)}}}function U1(l){let s,e,n=l[2]?"Hide":"Show",a,i,u,c,f,d,p=l[2]&&V1(l);return{c(){s=r("div"),e=r("button"),a=_(n),i=_(" Preview"),u=h(),p&&p.c(),c=Ul(),o(e,"type","button"),o(e,"class","btn btn-xs btn-outline"),o(s,"class","flex items-center gap-2")},m(m,g){L(m,s,g),t(s,e),t(e,a),t(e,i),L(m,u,g),p&&p.m(m,g),L(m,c,g),f||(d=V(e,"click",l[13]),f=!0)},p(m,g){g&4&&n!==(n=m[2]?"Hide":"Show")&&v(a,n),m[2]?p?p.p(m,g):(p=V1(m),p.c(),p.m(c.parentNode,c)):p&&(p.d(1),p=null)},d(m){m&&(H(s),H(u),H(c)),p&&p.d(m),f=!1,d()}}}function V1(l){let s,e,n,a=l[7]("plugin.testPlugin")+"",i,u,c,f,d,p,m=l[7]("plugin.input")+"",g,b,k,w,C,E,y,T,M=l[7]("plugin.output")+"",R,j,P,I,q,D,A,N,Z,Q,x=l[7]("plugin.testPlugin")+"",z,K,S,B,U,F=(l[4]||l[5])&&J1(l),J=l[5]&&W1(l);return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),f=r("div"),d=r("label"),p=r("span"),g=_(m),b=h(),k=r("textarea"),C=h(),E=r("div"),y=r("label"),T=r("span"),R=_(M),j=h(),P=r("textarea"),q=h(),D=r("div"),A=r("button"),N=re("svg"),Z=re("path"),Q=h(),z=_(x),K=h(),F&&F.c(),S=h(),J&&J.c(),o(n,"class","font-semibold text-sm"),o(p,"class","label-text text-xs"),o(d,"class","label py-1"),o(d,"for","plugin-input"),o(k,"id","plugin-input"),o(k,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),o(k,"placeholder",w=l[7]("plugin.inputPlaceholder")),o(k,"rows","10"),o(T,"class","label-text text-xs"),o(y,"class","label py-1"),o(y,"for","plugin-output"),o(P,"id","plugin-output"),o(P,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),P.value=l[4],P.readOnly=!0,o(P,"rows","10"),o(P,"placeholder",I=l[7]("plugin.outputPlaceholder")),o(c,"class","grid grid-cols-2 gap-4"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-3 w-3"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),o(A,"type","button"),o(A,"class","btn btn-xs btn-primary"),o(D,"class","flex gap-2"),o(e,"class","card-body p-4 space-y-3"),o(s,"class","card bg-base-200")},m(ie,ue){L(ie,s,ue),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,p),t(p,g),t(f,b),t(f,k),Y(k,l[3]),t(c,C),t(c,E),t(E,y),t(y,T),t(T,R),t(E,j),t(E,P),t(e,q),t(e,D),t(D,A),t(A,N),t(N,Z),t(A,Q),t(A,z),t(D,K),F&&F.m(D,null),t(e,S),J&&J.m(e,null),B||(U=[V(k,"input",l[14]),V(A,"click",l[9])],B=!0)},p(ie,ue){ue&128&&a!==(a=ie[7]("plugin.testPlugin")+"")&&v(i,a),ue&128&&m!==(m=ie[7]("plugin.input")+"")&&v(g,m),ue&128&&w!==(w=ie[7]("plugin.inputPlaceholder"))&&o(k,"placeholder",w),ue&8&&Y(k,ie[3]),ue&128&&M!==(M=ie[7]("plugin.output")+"")&&v(R,M),ue&16&&(P.value=ie[4]),ue&128&&I!==(I=ie[7]("plugin.outputPlaceholder"))&&o(P,"placeholder",I),ue&128&&x!==(x=ie[7]("plugin.testPlugin")+"")&&v(z,x),ie[4]||ie[5]?F?F.p(ie,ue):(F=J1(ie),F.c(),F.m(D,null)):F&&(F.d(1),F=null),ie[5]?J?J.p(ie,ue):(J=W1(ie),J.c(),J.m(e,null)):J&&(J.d(1),J=null)},d(ie){ie&&H(s),F&&F.d(),J&&J.d(),B=!1,vt(U)}}}function J1(l){let s,e=l[7]("common.reset")+"",n,a,i;return{c(){s=r("button"),n=_(e),o(s,"type","button"),o(s,"class","btn btn-xs btn-ghost")},m(u,c){L(u,s,c),t(s,n),a||(i=V(s,"click",l[10]),a=!0)},p(u,c){c&128&&e!==(e=u[7]("common.reset")+"")&&v(n,e)},d(u){u&&H(s),a=!1,i()}}}function W1(l){let s,e,n,a,i,u=l[7]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[5]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(i,"class","text-xs"),o(s,"class","alert alert-error py-2")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m&128&&u!==(u=p[7]("common.error")+"")&&v(c,u),m&32&&v(d,p[5])},d(p){p&&H(s)}}}function Rh(l){let s,e,n,a,i,u,c;function f(g,b){return g[6].length===0?Mh:Sh}let d=f(l),p=d(l),m=l[0]&&U1(l);return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),i=_(l[1]),u=h(),p.c(),c=h(),m&&m.c(),o(a,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","plugin-select"),o(e,"class","form-control"),o(s,"class","space-y-3")},m(g,b){L(g,s,b),t(s,e),t(e,n),t(n,a),t(a,i),t(e,u),p.m(e,null),t(s,c),m&&m.m(s,null)},p(g,[b]){b&2&&v(i,g[1]),d===(d=f(g))&&p?p.p(g,b):(p.d(1),p=d(g),p&&(p.c(),p.m(e,null))),g[0]?m?m.p(g,b):(m=U1(g),m.c(),m.m(s,null)):m&&(m.d(1),m=null)},i:ot,o:ot,d(g){g&&H(s),p.d(),m&&m.d()}}}function t0(l){return l.split("-").map(s=>s.charAt(0).toUpperCase()+s.slice(1)).join(" \u2192 ")}function qh(l){const s=l.split("-to-");if(s.length===2){const[e,n]=s;return\`Convert \${e.charAt(0).toUpperCase()+e.slice(1)} API format to \${n.charAt(0).toUpperCase()+n.slice(1)} format\`}return\`\${t0(l)} plugin\`}function Hh(l,s,e){let n;Dt(l,Rt,T=>e(7,n=T));let{plugin:a=null}=s,{label:i="Plugin"}=s;const u=oa();let c=!1,f=\`{
21251
+ "model": "claude-3-5-sonnet-20241022",
21252
+ "messages": [
21253
+ {
21254
+ "role": "user",
21255
+ "content": "Hello"
21256
+ }
21257
+ ]
21258
+ }\`,d="",p=null,m=[];Hs(async()=>{try{const T=await e0.getAll();e(6,m=T.map(M=>({id:M,name:t0(M),description:qh(M)})))}catch(T){console.warn("Failed to load plugins from API, using fallback:",T),e(6,m=[{id:"openai-to-anthropic",name:"OpenAI \u2192 Anthropic",description:"Convert OpenAI API format to Anthropic format"},{id:"anthropic-to-openai",name:"Anthropic \u2192 OpenAI",description:"Convert Anthropic API format to OpenAI format"},{id:"anthropic-to-gemini",name:"Anthropic \u2192 Gemini",description:"Convert Anthropic API format to Google Gemini format"}])}});function g(){u("change",a),e(4,d=""),e(5,p=null)}function b(){if(!a||!f){e(5,p=n("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const T=JSON.parse(f);let M;a==="anthropic-to-gemini"?M={contents:T.messages?.map(R=>({role:R.role==="user"?"user":"model",parts:[{text:R.content}]})),generationConfig:{temperature:T.temperature||1,maxOutputTokens:T.max_tokens||8192}}:a==="anthropic-to-openai"?M={model:T.model?.replace("claude","gpt-4"),messages:T.messages,temperature:T.temperature,max_tokens:T.max_tokens}:M={...T,_transformed:!0},e(4,d=JSON.stringify(M,null,2)),e(5,p=null)}catch(T){e(5,p=T.message),e(4,d="")}}function k(){e(4,d=""),e(5,p=null)}function w(){a=dl(this),e(0,a),e(6,m)}const C=T=>T.id===a,E=()=>e(2,c=!c);function y(){f=this.value,e(3,f)}return l.$$set=T=>{"plugin"in T&&e(0,a=T.plugin),"label"in T&&e(1,i=T.label)},[a,i,c,f,d,p,m,n,g,b,k,w,C,E,y]}class l0 extends Nt{constructor(s){super(),Ut(this,s,Hh,Rh,Vt,{plugin:0,label:1})}}function G1(l,s,e){const n=l.slice();return n[15]=s[e],n[16]=s,n[17]=e,n}function Lh(l){let s,e=l[5]("routeEditor.pathHelpLong")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&32&&e!==(e=a[5]("routeEditor.pathHelpLong")+"")&&v(n,e)},d(a){a&&H(s)}}}function Ph(l){let s,e=l[1].find(Q1)?.message+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-error")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&2&&e!==(e=a[1].find(Q1)?.message+"")&&v(n,e)},d(a){a&&H(s)}}}function K1(l){let s,e,n,a,i,u,c,f,d,p,m,g,b;function k(){l[11].call(e,l[16],l[17])}function w(){l[12].call(f,l[16],l[17])}function C(){return l[13](l[17])}return{c(){s=r("div"),e=r("input"),a=h(),i=re("svg"),u=re("path"),c=h(),f=r("input"),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path></svg>',o(e,"id",\`path-rewrite-pattern-\${l[17]}\`),o(e,"type","text"),o(e,"placeholder",n=l[5]("routeEditor.patternPlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M14 5l7 7m0 0l-7 7m7-7H3"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-5 w-5 text-gray-400 flex-shrink-0"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"id",\`path-rewrite-replacement-\${l[17]}\`),o(f,"type","text"),o(f,"placeholder",d=l[5]("routeEditor.replacementPlaceholder")),o(f,"class","input input-bordered input-sm flex-1"),o(m,"type","button"),o(m,"class","btn btn-sm btn-error btn-square flex-shrink-0"),o(s,"class","flex gap-2 items-center")},m(E,y){L(E,s,y),t(s,e),Y(e,l[15].pattern),t(s,a),t(s,i),t(i,u),t(s,c),t(s,f),Y(f,l[15].replacement),t(s,p),t(s,m),g||(b=[V(e,"input",k),V(f,"input",w),V(m,"click",C)],g=!0)},p(E,y){l=E,y&32&&n!==(n=l[5]("routeEditor.patternPlaceholder"))&&o(e,"placeholder",n),y&4&&e.value!==l[15].pattern&&Y(e,l[15].pattern),y&32&&d!==(d=l[5]("routeEditor.replacementPlaceholder"))&&o(f,"placeholder",d),y&4&&f.value!==l[15].replacement&&Y(f,l[15].replacement)},d(E){E&&H(s),g=!1,vt(b)}}}function jh(l){let s,e,n,a,i=l[5]("routes.path")+"",u,c,f,d,p,m,g,b,k,w,C,E,y,T=l[5]("routeEditor.pathRewrite")+"",M,R,j=l[5]("routeEditor.optional")+"",P,I,q,D,A,N,Z,Q,x,z,K,S,B,U=l[5]("routeEditor.addPathRewriteRule")+"",F,J,ie,ue,ne,$,te=l[5]("routeEditor.transformer")+"",ae,ee,G,pe=l[5]("routeEditor.transformerHelp")+"",oe,ge,he,ye,ze,Pe,we,Fe,Je;function je(se,ke){return ke&2&&(k=null),k==null&&(k=!!se[1].some(Dh)),k?Ph:Lh}let Le=je(l,-1),Se=Le(l),fe=ut(l[2]),_e=[];for(let se=0;se<fe.length;se+=1)_e[se]=K1(G1(l,fe,se));function Ie(se){l[14](se)}let De={label:l[5]("routeEditor.transformer")};return l[3]!==void 0&&(De.plugin=l[3]),he=new l0({props:De}),Sl.push(()=>Ml(he,"plugin",Ie)),Pe=new $p({props:{open:l[4]!==null,title:l[5]("common.confirm"),message:l[5]("routeEditor.confirmDeleteRule"),confirmText:l[5]("common.delete"),cancelText:l[5]("common.cancel"),confirmClass:"btn-error"}}),Pe.$on("confirm",l[8]),Pe.$on("cancel",l[9]),{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("span"),f.textContent="*",d=h(),p=r("input"),g=h(),b=r("div"),Se.c(),w=h(),C=r("div"),E=r("label"),y=r("span"),M=_(T),R=_(" ("),P=_(j),I=_(\`)
21259
+ \`),q=r("div"),D=re("svg"),A=re("path"),Z=h(),Q=r("div");for(let se=0;se<_e.length;se+=1)_e[se].c();x=h(),z=r("button"),K=re("svg"),S=re("path"),B=h(),F=_(U),J=h(),ie=r("div"),ue=h(),ne=r("div"),$=r("h3"),ae=_(te),ee=h(),G=r("p"),oe=_(pe),ge=h(),Et(he.$$.fragment),ze=h(),Et(Pe.$$.fragment),o(f,"class","text-error"),o(a,"class","label-text font-semibold"),o(n,"class","label"),o(n,"for","route-path"),o(p,"id","route-path"),o(p,"type","text"),o(p,"placeholder",m=l[5]("routeEditor.pathPlaceholder")),o(p,"class","input input-bordered"),p.required=!0,le(p,"input-error",l[1].some(Y1)),o(b,"class","label"),o(e,"class","form-control"),o(A,"stroke-linecap","round"),o(A,"stroke-linejoin","round"),o(A,"stroke-width","2"),o(A,"d","M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(D,"xmlns","http://www.w3.org/2000/svg"),o(D,"class","h-4 w-4 text-gray-400 cursor-help"),o(D,"fill","none"),o(D,"viewBox","0 0 24 24"),o(D,"stroke","currentColor"),o(q,"class","tooltip tooltip-right"),o(q,"data-tip",N=l[5]("routeEditor.pathRewriteTooltip")),o(y,"class","label-text font-semibold flex items-center gap-2"),o(E,"class","label"),o(E,"for","path-rewrite-pattern-0"),o(S,"stroke-linecap","round"),o(S,"stroke-linejoin","round"),o(S,"stroke-width","2"),o(S,"d","M12 4v16m8-8H4"),o(K,"xmlns","http://www.w3.org/2000/svg"),o(K,"class","h-4 w-4"),o(K,"fill","none"),o(K,"viewBox","0 0 24 24"),o(K,"stroke","currentColor"),o(z,"type","button"),o(z,"class","btn btn-sm btn-outline gap-2"),o(Q,"class","space-y-2"),o(C,"class","form-control"),o(ie,"class","divider"),o($,"class","text-lg font-semibold mb-2"),o(G,"class","text-sm text-gray-500 mb-4"),o(s,"class","space-y-6")},m(se,ke){L(se,s,ke),t(s,e),t(e,n),t(n,a),t(a,u),t(a,c),t(a,f),t(e,d),t(e,p),Y(p,l[0].path),t(e,g),t(e,b),Se.m(b,null),t(s,w),t(s,C),t(C,E),t(E,y),t(y,M),t(y,R),t(y,P),t(y,I),t(y,q),t(q,D),t(D,A),t(C,Z),t(C,Q);for(let me=0;me<_e.length;me+=1)_e[me]&&_e[me].m(Q,null);t(Q,x),t(Q,z),t(z,K),t(K,S),t(z,B),t(z,F),t(s,J),t(s,ie),t(s,ue),t(s,ne),t(ne,$),t($,ae),t(ne,ee),t(ne,G),t(G,oe),t(ne,ge),Ct(he,ne,null),L(se,ze,ke),Ct(Pe,se,ke),we=!0,Fe||(Je=[V(p,"input",l[10]),V(z,"click",l[6])],Fe=!0)},p(se,[ke]){if((!we||ke&32)&&i!==(i=se[5]("routes.path")+"")&&v(u,i),(!we||ke&32&&m!==(m=se[5]("routeEditor.pathPlaceholder")))&&o(p,"placeholder",m),ke&1&&p.value!==se[0].path&&Y(p,se[0].path),(!we||ke&2)&&le(p,"input-error",se[1].some(Y1)),Le===(Le=je(se,ke))&&Se?Se.p(se,ke):(Se.d(1),Se=Le(se),Se&&(Se.c(),Se.m(b,null))),(!we||ke&32)&&T!==(T=se[5]("routeEditor.pathRewrite")+"")&&v(M,T),(!we||ke&32)&&j!==(j=se[5]("routeEditor.optional")+"")&&v(P,j),(!we||ke&32&&N!==(N=se[5]("routeEditor.pathRewriteTooltip")))&&o(q,"data-tip",N),ke&164){fe=ut(se[2]);let Ve;for(Ve=0;Ve<fe.length;Ve+=1){const Be=G1(se,fe,Ve);_e[Ve]?_e[Ve].p(Be,ke):(_e[Ve]=K1(Be),_e[Ve].c(),_e[Ve].m(Q,x))}for(;Ve<_e.length;Ve+=1)_e[Ve].d(1);_e.length=fe.length}(!we||ke&32)&&U!==(U=se[5]("routeEditor.addPathRewriteRule")+"")&&v(F,U),(!we||ke&32)&&te!==(te=se[5]("routeEditor.transformer")+"")&&v(ae,te),(!we||ke&32)&&pe!==(pe=se[5]("routeEditor.transformerHelp")+"")&&v(oe,pe);const me={};ke&32&&(me.label=se[5]("routeEditor.transformer")),!ye&&ke&8&&(ye=!0,me.plugin=se[3],Rl(()=>ye=!1)),he.$set(me);const Ee={};ke&16&&(Ee.open=se[4]!==null),ke&32&&(Ee.title=se[5]("common.confirm")),ke&32&&(Ee.message=se[5]("routeEditor.confirmDeleteRule")),ke&32&&(Ee.confirmText=se[5]("common.delete")),ke&32&&(Ee.cancelText=se[5]("common.cancel")),Pe.$set(Ee)},i(se){we||(et(he.$$.fragment,se),et(Pe.$$.fragment,se),we=!0)},o(se){st(he.$$.fragment,se),st(Pe.$$.fragment,se),we=!1},d(se){se&&(H(s),H(ze)),Se.d(),Gt(_e,se),yt(he),yt(Pe,se),Fe=!1,vt(Je)}}}const Dh=l=>l.field==="path",Y1=l=>l.field==="path",Q1=l=>l.field==="path";function Bh(l,s,e){let n;Dt(l,Rt,y=>e(5,n=y));let{route:a}=s,{errors:i=[]}=s,u=[],c=null,f=a.plugins?.[0]||null;function d(){e(2,u=[...u,{pattern:"",replacement:""}])}function p(y){e(4,c=y)}function m(){c!==null&&(e(2,u=u.filter((y,T)=>T!==c)),e(4,c=null))}function g(){e(4,c=null)}function b(){a.path=this.value,e(0,a),e(2,u),e(3,f)}function k(y,T){y[T].pattern=this.value,e(2,u),e(0,a),e(3,f)}function w(y,T){y[T].replacement=this.value,e(2,u),e(0,a),e(3,f)}const C=y=>p(y);function E(y){f=y,e(3,f)}return l.$$set=y=>{"route"in y&&e(0,a=y.route),"errors"in y&&e(1,i=y.errors)},l.$$.update=()=>{if(l.$$.dirty&5){!u.length&&a.pathRewrite&&e(2,u=Object.entries(a.pathRewrite||{}).map(([T,M])=>({pattern:T,replacement:M})));const y={};u.filter(T=>T.pattern.trim()).forEach(T=>{y[T.pattern]=T.replacement}),e(0,a.pathRewrite=Object.keys(y).length>0?y:void 0,a)}l.$$.dirty&8&&e(0,a.plugins=f?[f]:void 0,a)},[a,i,u,f,c,n,d,p,m,g,b,k,w,C,E]}class Ih extends Nt{constructor(s){super(),Ut(this,s,Bh,jh,Vt,{route:0,errors:1})}}function Z1(l,s,e){const n=l.slice();return n[31]=s[e],n[32]=s,n[33]=e,n}function X1(l,s,e){const n=l.slice();return n[31]=s[e],n[34]=s,n[33]=e,n}function x1(l,s,e){const n=l.slice();return n[31]=s[e],n[33]=e,n}function $1(l,s,e){const n=l.slice();return n[31]=s[e],n[36]=s,n[33]=e,n}function ec(l){let s,e,n,a,i=l[1]&&tc();return{c(){s=r("div"),e=r("span"),n=_(l[0]),a=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(s,"class","label")},m(u,c){L(u,s,c),t(s,e),t(e,n),t(s,a),i&&i.m(s,null)},p(u,c){c[0]&1&&v(n,u[0]),u[1]?i||(i=tc(),i.c(),i.m(s,null)):i&&(i.d(1),i=null)},d(u){u&&H(s),i&&i.d()}}}function tc(l){let s,e,n;return{c(){s=r("span"),e=_("Support dynamic expressions: "),n=r("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,e),t(s,n)},d(a){a&&H(s)}}}function lc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[20].call(e,l[36],l[33])}function g(){l[21].call(i,l[36],l[33])}function b(){return l[22](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Ah(l){let s,e=l[8]("headers.empty")+"",n;return{c(){s=r("p"),n=_(e),o(s,"class","text-xs text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&256&&e!==(e=a[8]("headers.empty")+"")&&v(n,e)},d(a){a&&H(s)}}}function Fh(l){let s,e=ut(l[4]),n=[];for(let a=0;a<e.length;a+=1)n[a]=sc(x1(l,e,a));return{c(){s=r("div");for(let a=0;a<n.length;a+=1)n[a].c();o(s,"class","flex flex-wrap gap-2 mt-2")},m(a,i){L(a,s,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(s,null)},p(a,i){if(i[0]&4112){e=ut(a[4]);let u;for(u=0;u<e.length;u+=1){const c=x1(a,e,u);n[u]?n[u].p(c,i):(n[u]=sc(c),n[u].c(),n[u].m(s,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function sc(l){let s,e=l[31]+"",n,a,i,u,c,f;function d(){return l[24](l[33])}return{c(){s=r("div"),n=_(e),a=h(),i=r("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(s,"class","badge badge-lg gap-2")},m(p,m){L(p,s,m),t(s,n),t(s,a),t(s,i),t(s,u),c||(f=V(i,"click",d),c=!0)},p(p,m){l=p,m[0]&16&&e!==(e=l[31]+"")&&v(n,e)},d(p){p&&H(s),c=!1,f()}}}function oc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[25].call(e,l[34],l[33])}function g(){l[26].call(i,l[34],l[33])}function b(){return l[27](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function nc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[28].call(e,l[32],l[33])}function g(){l[29].call(i,l[32],l[33])}function b(){return l[30](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function zh(l){let s,e,n,a,i,u,c,f=l[8]("headers.add")+"",d,p,m=l[3].length+"",g,b,k,w,C,E,y=l[8]("headers.add")+"",T,M,R,j,P,I,q=l[8]("headers.remove")+"",D,A,N=l[4].length+"",Z,Q,x,z,K,S,B,U,F,J=l[8]("common.add")+"",ie,ue,ne,$,te,ae,ee,G,pe=l[8]("headers.replace")+"",oe,ge,he=l[5].length+"",ye,ze,Pe,we,Fe,Je,je=l[8]("headers.add")+"",Le,Se,fe,_e,Ie,De,se=l[8]("headers.default")+"",ke,me,Ee=l[6].length+"",Ve,Be,nt,Ne,Qe,Ye,ve=l[8]("headers.add")+"",de,Te,Ze,Me=l[2]&&ec(l),Ue=ut(l[3]),Ce=[];for(let O=0;O<Ue.length;O+=1)Ce[O]=lc($1(l,Ue,O));function mt(O,He){return O[4].length>0?Fh:Ah}let Ge=mt(l),ce=Ge(l),qe=ut(l[5]),Re=[];for(let O=0;O<qe.length;O+=1)Re[O]=oc(X1(l,qe,O));let dt=ut(l[6]),We=[];for(let O=0;O<dt.length;O+=1)We[O]=nc(Z1(l,dt,O));return{c(){s=r("div"),Me&&Me.c(),e=h(),n=r("div"),a=r("div"),i=r("input"),u=h(),c=r("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),k=h(),w=r("div");for(let O=0;O<Ce.length;O+=1)Ce[O].c();C=h(),E=r("button"),T=_(y),M=h(),R=r("div"),j=r("input"),P=h(),I=r("div"),D=_(q),A=_(" ("),Z=_(N),Q=_(")"),x=h(),z=r("div"),K=r("div"),S=r("input"),U=h(),F=r("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=r("div"),ae=r("input"),ee=h(),G=r("div"),oe=_(pe),ge=_(" ("),ye=_(he),ze=_(")"),Pe=h(),we=r("div");for(let O=0;O<Re.length;O+=1)Re[O].c();Fe=h(),Je=r("button"),Le=_(je),Se=h(),fe=r("div"),_e=r("input"),Ie=h(),De=r("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Be=_(")"),nt=h(),Ne=r("div");for(let O=0;O<We.length;O+=1)We[O].c();Qe=h(),Ye=r("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(a,"class","collapse collapse-arrow bg-base-200"),o(j,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(S,"type","text"),o(S,"placeholder",B=l[8]("headers.namePlaceholder")),o(S,"class","input input-bordered input-sm flex-1"),o(F,"type","button"),o(F,"class","btn btn-sm btn-primary"),F.disabled=ue=!l[7].trim(),o(K,"class","flex gap-2"),o(z,"class","collapse-content space-y-2"),o(R,"class","collapse collapse-arrow bg-base-200"),o(ae,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Ye,"type","button"),o(Ye,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(s,"class","form-control w-full")},m(O,He){L(O,s,He),Me&&Me.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),t(a,u),t(a,c),t(c,d),t(c,p),t(c,g),t(c,b),t(a,k),t(a,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);t(w,C),t(w,E),t(E,T),t(n,M),t(n,R),t(R,j),t(R,P),t(R,I),t(I,D),t(I,A),t(I,Z),t(I,Q),t(R,x),t(R,z),t(z,K),t(K,S),Y(S,l[7]),t(K,U),t(K,F),t(F,ie),t(z,ne),ce.m(z,null),t(n,$),t(n,te),t(te,ae),t(te,ee),t(te,G),t(G,oe),t(G,ge),t(G,ye),t(G,ze),t(te,Pe),t(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);t(we,Fe),t(we,Je),t(Je,Le),t(n,Se),t(n,fe),t(fe,_e),t(fe,Ie),t(fe,De),t(De,ke),t(De,me),t(De,Ve),t(De,Be),t(fe,nt),t(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);t(Ne,Qe),t(Ne,Ye),t(Ye,de),Te||(Ze=[V(E,"click",l[9]),V(S,"input",l[23]),V(S,"keydown",l[13]),V(F,"click",l[11]),V(Je,"click",l[14]),V(Ye,"click",l[16])],Te=!0)},p(O,He){if(O[2]?Me?Me.p(O,He):(Me=ec(O),Me.c(),Me.m(s,e)):Me&&(Me.d(1),Me=null),He[0]&256&&f!==(f=O[8]("headers.add")+"")&&v(d,f),He[0]&8&&m!==(m=O[3].length+"")&&v(g,m),He[0]&1288){Ue=ut(O[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=$1(O,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=lc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=O[8]("headers.add")+"")&&v(T,y),He[0]&256&&q!==(q=O[8]("headers.remove")+"")&&v(D,q),He[0]&16&&N!==(N=O[4].length+"")&&v(Z,N),He[0]&256&&B!==(B=O[8]("headers.namePlaceholder"))&&o(S,"placeholder",B),He[0]&128&&S.value!==O[7]&&Y(S,O[7]),He[0]&256&&J!==(J=O[8]("common.add")+"")&&v(ie,J),He[0]&128&&ue!==(ue=!O[7].trim())&&(F.disabled=ue),Ge===(Ge=mt(O))&&ce?ce.p(O,He):(ce.d(1),ce=Ge(O),ce&&(ce.c(),ce.m(z,null))),He[0]&256&&pe!==(pe=O[8]("headers.replace")+"")&&v(oe,pe),He[0]&32&&he!==(he=O[5].length+"")&&v(ye,he),He[0]&33056){qe=ut(O[5]);let X;for(X=0;X<qe.length;X+=1){const ft=X1(O,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=oc(ft),Re[X].c(),Re[X].m(we,Fe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&je!==(je=O[8]("headers.add")+"")&&v(Le,je),He[0]&256&&se!==(se=O[8]("headers.default")+"")&&v(ke,se),He[0]&64&&Ee!==(Ee=O[6].length+"")&&v(Ve,Ee),He[0]&131392){dt=ut(O[6]);let X;for(X=0;X<dt.length;X+=1){const ft=Z1(O,dt,X);We[X]?We[X].p(ft,He):(We[X]=nc(ft),We[X].c(),We[X].m(Ne,Qe))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=O[8]("headers.add")+"")&&v(de,ve)},i:ot,o:ot,d(O){O&&H(s),Me&&Me.d(),Gt(Ce,O),ce.d(),Gt(Re,O),Gt(We,O),Te=!1,vt(Ze)}}}function Oh(l,s,e){let n;Dt(l,Rt,S=>e(8,n=S));let{value:a={}}=s,{label:i="Headers"}=s,{showHelp:u=!0}=s,{showLabel:c=!0}=s,f=[],d=[],p="",m=[],g=[],b=!1;function k(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(S){e(3,f=f.filter((B,U)=>U!==S))}function C(){const S=p.trim();S&&!d.includes(S)&&(e(4,d=[...d,S]),e(7,p=""),e(19,b=!0))}function E(S){e(4,d=d.filter((B,U)=>U!==S))}function y(S){S.key==="Enter"&&(S.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function M(S){e(5,m=m.filter((B,U)=>U!==S))}function R(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function j(S){e(6,g=g.filter((B,U)=>U!==S))}function P(S,B){S[B].key=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}function I(S,B){S[B].value=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}const q=S=>w(S);function D(){p=this.value,e(7,p)}const A=S=>E(S);function N(S,B){S[B].key=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}function Z(S,B){S[B].value=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}const Q=S=>M(S);function x(S,B){S[B].key=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}function z(S,B){S[B].value=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}const K=S=>j(S);return l.$$set=S=>{"value"in S&&e(18,a=S.value),"label"in S&&e(0,i=S.label),"showHelp"in S&&e(1,u=S.showHelp),"showLabel"in S&&e(2,c=S.showLabel)},l.$$.update=()=>{if(l.$$.dirty[0]&786552){!b&&(a.add||a.remove||a.replace||a.default)&&(e(3,f=Object.entries(a.add||{}).map(([F,J])=>({key:F,value:String(J)}))),e(4,d=[...a.remove||[]]),e(5,m=Object.entries(a.replace||{}).map(([F,J])=>({key:F,value:String(J)}))),e(6,g=Object.entries(a.default||{}).map(([F,J])=>({key:F,value:String(J)}))),e(19,b=!0));const S={};f.filter(F=>F.key.trim()).forEach(F=>{S[F.key]=F.value}),e(18,a.add=Object.keys(S).length>0?S:void 0,a),e(18,a.remove=d.length>0?d:void 0,a);const B={};m.filter(F=>F.key.trim()).forEach(F=>{B[F.key]=F.value}),e(18,a.replace=Object.keys(B).length>0?B:void 0,a);const U={};g.filter(F=>F.key.trim()).forEach(F=>{U[F.key]=F.value}),e(18,a.default=Object.keys(U).length>0?U:void 0,a)}},[i,u,c,f,d,m,g,p,n,k,w,C,E,y,T,M,R,j,a,b,P,I,q,D,A,N,Z,Q,x,z,K]}class s0 extends Nt{constructor(s){super(),Ut(this,s,Oh,zh,Vt,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function ac(l,s,e){const n=l.slice();return n[31]=s[e],n[32]=s,n[33]=e,n}function rc(l,s,e){const n=l.slice();return n[31]=s[e],n[34]=s,n[33]=e,n}function ic(l,s,e){const n=l.slice();return n[31]=s[e],n[33]=e,n}function uc(l,s,e){const n=l.slice();return n[31]=s[e],n[36]=s,n[33]=e,n}function fc(l){let s,e,n,a,i=l[1]&&cc();return{c(){s=r("div"),e=r("span"),n=_(l[0]),a=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(s,"class","label")},m(u,c){L(u,s,c),t(s,e),t(e,n),t(s,a),i&&i.m(s,null)},p(u,c){c[0]&1&&v(n,u[0]),u[1]?i||(i=cc(),i.c(),i.m(s,null)):i&&(i.d(1),i=null)},d(u){u&&H(s),i&&i.d()}}}function cc(l){let s;return{c(){s=r("span"),s.textContent="Support JSON values and dynamic expressions",o(s,"class","label-text-alt text-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function dc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[20].call(e,l[36],l[33])}function g(){l[21].call(i,l[36],l[33])}function b(){return l[22](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.name"))&&o(e,"placeholder",n),w[0]&8&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.value"))&&o(i,"placeholder",u),w[0]&8&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Nh(l){let s,e=l[8]("body.empty")+"",n;return{c(){s=r("p"),n=_(e),o(s,"class","text-xs text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&256&&e!==(e=a[8]("body.empty")+"")&&v(n,e)},d(a){a&&H(s)}}}function Uh(l){let s,e=ut(l[4]),n=[];for(let a=0;a<e.length;a+=1)n[a]=pc(ic(l,e,a));return{c(){s=r("div");for(let a=0;a<n.length;a+=1)n[a].c();o(s,"class","flex flex-wrap gap-2 mt-2")},m(a,i){L(a,s,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(s,null)},p(a,i){if(i[0]&4112){e=ut(a[4]);let u;for(u=0;u<e.length;u+=1){const c=ic(a,e,u);n[u]?n[u].p(c,i):(n[u]=pc(c),n[u].c(),n[u].m(s,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function pc(l){let s,e=l[31]+"",n,a,i,u,c,f;function d(){return l[24](l[33])}return{c(){s=r("div"),n=_(e),a=h(),i=r("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(s,"class","badge badge-lg gap-2")},m(p,m){L(p,s,m),t(s,n),t(s,a),t(s,i),t(s,u),c||(f=V(i,"click",d),c=!0)},p(p,m){l=p,m[0]&16&&e!==(e=l[31]+"")&&v(n,e)},d(p){p&&H(s),c=!1,f()}}}function hc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[25].call(e,l[34],l[33])}function g(){l[26].call(i,l[34],l[33])}function b(){return l[27](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.name"))&&o(e,"placeholder",n),w[0]&32&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.value"))&&o(i,"placeholder",u),w[0]&32&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function mc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[28].call(e,l[32],l[33])}function g(){l[29].call(i,l[32],l[33])}function b(){return l[30](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("headers.name")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("headers.value")),o(i,"class","input input-bordered input-sm flex-[2]"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("headers.name"))&&o(e,"placeholder",n),w[0]&64&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("headers.value"))&&o(i,"placeholder",u),w[0]&64&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Vh(l){let s,e,n,a,i,u,c,f=l[8]("body.add")+"",d,p,m=l[3].length+"",g,b,k,w,C,E,y=l[8]("body.add")+"",T,M,R,j,P,I,q=l[8]("body.remove")+"",D,A,N=l[4].length+"",Z,Q,x,z,K,S,B,U,F,J=l[8]("common.add")+"",ie,ue,ne,$,te,ae,ee,G,pe=l[8]("body.replace")+"",oe,ge,he=l[5].length+"",ye,ze,Pe,we,Fe,Je,je=l[8]("body.add")+"",Le,Se,fe,_e,Ie,De,se=l[8]("body.default")+"",ke,me,Ee=l[6].length+"",Ve,Be,nt,Ne,Qe,Ye,ve=l[8]("body.add")+"",de,Te,Ze,Me=l[2]&&fc(l),Ue=ut(l[3]),Ce=[];for(let O=0;O<Ue.length;O+=1)Ce[O]=dc(uc(l,Ue,O));function mt(O,He){return O[4].length>0?Uh:Nh}let Ge=mt(l),ce=Ge(l),qe=ut(l[5]),Re=[];for(let O=0;O<qe.length;O+=1)Re[O]=hc(rc(l,qe,O));let dt=ut(l[6]),We=[];for(let O=0;O<dt.length;O+=1)We[O]=mc(ac(l,dt,O));return{c(){s=r("div"),Me&&Me.c(),e=h(),n=r("div"),a=r("div"),i=r("input"),u=h(),c=r("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),k=h(),w=r("div");for(let O=0;O<Ce.length;O+=1)Ce[O].c();C=h(),E=r("button"),T=_(y),M=h(),R=r("div"),j=r("input"),P=h(),I=r("div"),D=_(q),A=_(" ("),Z=_(N),Q=_(")"),x=h(),z=r("div"),K=r("div"),S=r("input"),U=h(),F=r("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=r("div"),ae=r("input"),ee=h(),G=r("div"),oe=_(pe),ge=_(" ("),ye=_(he),ze=_(")"),Pe=h(),we=r("div");for(let O=0;O<Re.length;O+=1)Re[O].c();Fe=h(),Je=r("button"),Le=_(je),Se=h(),fe=r("div"),_e=r("input"),Ie=h(),De=r("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Be=_(")"),nt=h(),Ne=r("div");for(let O=0;O<We.length;O+=1)We[O].c();Qe=h(),Ye=r("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(a,"class","collapse collapse-arrow bg-base-200"),o(j,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(S,"type","text"),o(S,"placeholder",B=l[8]("headers.name")),o(S,"class","input input-bordered input-sm flex-1"),o(F,"type","button"),o(F,"class","btn btn-sm btn-primary"),F.disabled=ue=!l[7].trim(),o(K,"class","flex gap-2"),o(z,"class","collapse-content space-y-2"),o(R,"class","collapse collapse-arrow bg-base-200"),o(ae,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Ye,"type","button"),o(Ye,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(s,"class","form-control w-full")},m(O,He){L(O,s,He),Me&&Me.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),t(a,u),t(a,c),t(c,d),t(c,p),t(c,g),t(c,b),t(a,k),t(a,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);t(w,C),t(w,E),t(E,T),t(n,M),t(n,R),t(R,j),t(R,P),t(R,I),t(I,D),t(I,A),t(I,Z),t(I,Q),t(R,x),t(R,z),t(z,K),t(K,S),Y(S,l[7]),t(K,U),t(K,F),t(F,ie),t(z,ne),ce.m(z,null),t(n,$),t(n,te),t(te,ae),t(te,ee),t(te,G),t(G,oe),t(G,ge),t(G,ye),t(G,ze),t(te,Pe),t(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);t(we,Fe),t(we,Je),t(Je,Le),t(n,Se),t(n,fe),t(fe,_e),t(fe,Ie),t(fe,De),t(De,ke),t(De,me),t(De,Ve),t(De,Be),t(fe,nt),t(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);t(Ne,Qe),t(Ne,Ye),t(Ye,de),Te||(Ze=[V(E,"click",l[9]),V(S,"input",l[23]),V(S,"keydown",l[13]),V(F,"click",l[11]),V(Je,"click",l[14]),V(Ye,"click",l[16])],Te=!0)},p(O,He){if(O[2]?Me?Me.p(O,He):(Me=fc(O),Me.c(),Me.m(s,e)):Me&&(Me.d(1),Me=null),He[0]&256&&f!==(f=O[8]("body.add")+"")&&v(d,f),He[0]&8&&m!==(m=O[3].length+"")&&v(g,m),He[0]&1288){Ue=ut(O[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=uc(O,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=dc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=O[8]("body.add")+"")&&v(T,y),He[0]&256&&q!==(q=O[8]("body.remove")+"")&&v(D,q),He[0]&16&&N!==(N=O[4].length+"")&&v(Z,N),He[0]&256&&B!==(B=O[8]("headers.name"))&&o(S,"placeholder",B),He[0]&128&&S.value!==O[7]&&Y(S,O[7]),He[0]&256&&J!==(J=O[8]("common.add")+"")&&v(ie,J),He[0]&128&&ue!==(ue=!O[7].trim())&&(F.disabled=ue),Ge===(Ge=mt(O))&&ce?ce.p(O,He):(ce.d(1),ce=Ge(O),ce&&(ce.c(),ce.m(z,null))),He[0]&256&&pe!==(pe=O[8]("body.replace")+"")&&v(oe,pe),He[0]&32&&he!==(he=O[5].length+"")&&v(ye,he),He[0]&33056){qe=ut(O[5]);let X;for(X=0;X<qe.length;X+=1){const ft=rc(O,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=hc(ft),Re[X].c(),Re[X].m(we,Fe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&je!==(je=O[8]("body.add")+"")&&v(Le,je),He[0]&256&&se!==(se=O[8]("body.default")+"")&&v(ke,se),He[0]&64&&Ee!==(Ee=O[6].length+"")&&v(Ve,Ee),He[0]&131392){dt=ut(O[6]);let X;for(X=0;X<dt.length;X+=1){const ft=ac(O,dt,X);We[X]?We[X].p(ft,He):(We[X]=mc(ft),We[X].c(),We[X].m(Ne,Qe))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=O[8]("body.add")+"")&&v(de,ve)},i:ot,o:ot,d(O){O&&H(s),Me&&Me.d(),Gt(Ce,O),ce.d(),Gt(Re,O),Gt(We,O),Te=!1,vt(Ze)}}}function Jh(l,s,e){let n;Dt(l,Rt,S=>e(8,n=S));let{value:a={}}=s,{label:i="Body"}=s,{showHelp:u=!0}=s,{showLabel:c=!0}=s,f=[],d=[],p="",m=[],g=[],b=!1;function k(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(S){e(3,f=f.filter((B,U)=>U!==S))}function C(){const S=p.trim();S&&!d.includes(S)&&(e(4,d=[...d,S]),e(7,p=""),e(19,b=!0))}function E(S){e(4,d=d.filter((B,U)=>U!==S))}function y(S){S.key==="Enter"&&(S.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function M(S){e(5,m=m.filter((B,U)=>U!==S))}function R(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function j(S){e(6,g=g.filter((B,U)=>U!==S))}function P(S,B){S[B].key=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}function I(S,B){S[B].value=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}const q=S=>w(S);function D(){p=this.value,e(7,p)}const A=S=>E(S);function N(S,B){S[B].key=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}function Z(S,B){S[B].value=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}const Q=S=>M(S);function x(S,B){S[B].key=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}function z(S,B){S[B].value=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}const K=S=>j(S);return l.$$set=S=>{"value"in S&&e(18,a=S.value),"label"in S&&e(0,i=S.label),"showHelp"in S&&e(1,u=S.showHelp),"showLabel"in S&&e(2,c=S.showLabel)},l.$$.update=()=>{if(l.$$.dirty[0]&786552){!b&&(a.add||a.remove||a.replace||a.default)&&(e(3,f=Object.entries(a.add||{}).map(([F,J])=>({key:F,value:typeof J=="string"?J:JSON.stringify(J)}))),e(4,d=[...a.remove||[]]),e(5,m=Object.entries(a.replace||{}).map(([F,J])=>({key:F,value:typeof J=="string"?J:JSON.stringify(J)}))),e(6,g=Object.entries(a.default||{}).map(([F,J])=>({key:F,value:typeof J=="string"?J:JSON.stringify(J)}))),e(19,b=!0));const S={};f.filter(F=>F.key.trim()).forEach(F=>{try{S[F.key]=JSON.parse(F.value)}catch{S[F.key]=F.value}}),e(18,a.add=Object.keys(S).length>0?S:void 0,a),e(18,a.remove=d.length>0?d:void 0,a);const B={};m.filter(F=>F.key.trim()).forEach(F=>{try{B[F.key]=JSON.parse(F.value)}catch{B[F.key]=F.value}}),e(18,a.replace=Object.keys(B).length>0?B:void 0,a);const U={};g.filter(F=>F.key.trim()).forEach(F=>{try{U[F.key]=JSON.parse(F.value)}catch{U[F.key]=F.value}}),e(18,a.default=Object.keys(U).length>0?U:void 0,a)}},[i,u,c,f,d,m,g,p,n,k,w,C,E,y,T,M,R,j,a,b,P,I,q,D,A,N,Z,Q,x,z,K]}class o0 extends Nt{constructor(s){super(),Ut(this,s,Jh,Vh,Vt,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function gc(l,s,e){const n=l.slice();return n[31]=s[e],n[32]=s,n[33]=e,n}function _c(l,s,e){const n=l.slice();return n[31]=s[e],n[34]=s,n[33]=e,n}function bc(l,s,e){const n=l.slice();return n[31]=s[e],n[33]=e,n}function vc(l,s,e){const n=l.slice();return n[31]=s[e],n[36]=s,n[33]=e,n}function kc(l){let s,e,n,a,i=l[1]&&wc();return{c(){s=r("div"),e=r("span"),n=_(l[0]),a=h(),i&&i.c(),o(e,"class","label-text font-semibold"),o(s,"class","label")},m(u,c){L(u,s,c),t(s,e),t(e,n),t(s,a),i&&i.m(s,null)},p(u,c){c[0]&1&&v(n,u[0]),u[1]?i||(i=wc(),i.c(),i.m(s,null)):i&&(i.d(1),i=null)},d(u){u&&H(s),i&&i.d()}}}function wc(l){let s,e,n;return{c(){s=r("span"),e=_("Support dynamic expressions: "),n=r("code"),n.textContent="{{ expression }}",o(n,"class","text-xs"),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,e),t(s,n)},d(a){a&&H(s)}}}function yc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[20].call(e,l[36],l[33])}function g(){l[21].call(i,l[36],l[33])}function b(){return l[22](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&8&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&8&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Wh(l){let s,e=l[8]("query.empty")+"",n;return{c(){s=r("p"),n=_(e),o(s,"class","text-xs text-gray-500")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&256&&e!==(e=a[8]("query.empty")+"")&&v(n,e)},d(a){a&&H(s)}}}function Gh(l){let s,e=ut(l[4]),n=[];for(let a=0;a<e.length;a+=1)n[a]=Cc(bc(l,e,a));return{c(){s=r("div");for(let a=0;a<n.length;a+=1)n[a].c();o(s,"class","flex flex-wrap gap-2 mt-2")},m(a,i){L(a,s,i);for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(s,null)},p(a,i){if(i[0]&4112){e=ut(a[4]);let u;for(u=0;u<e.length;u+=1){const c=bc(a,e,u);n[u]?n[u].p(c,i):(n[u]=Cc(c),n[u].c(),n[u].m(s,null))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function Cc(l){let s,e=l[31]+"",n,a,i,u,c,f;function d(){return l[24](l[33])}return{c(){s=r("div"),n=_(e),a=h(),i=r("button"),i.textContent="\u2715",u=h(),o(i,"type","button"),o(i,"class","btn btn-ghost btn-xs btn-circle"),o(s,"class","badge badge-lg gap-2")},m(p,m){L(p,s,m),t(s,n),t(s,a),t(s,i),t(s,u),c||(f=V(i,"click",d),c=!0)},p(p,m){l=p,m[0]&16&&e!==(e=l[31]+"")&&v(n,e)},d(p){p&&H(s),c=!1,f()}}}function Ec(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[25].call(e,l[34],l[33])}function g(){l[26].call(i,l[34],l[33])}function b(){return l[27](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&32&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&32&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Tc(l){let s,e,n,a,i,u,c,f,d,p;function m(){l[28].call(e,l[32],l[33])}function g(){l[29].call(i,l[32],l[33])}function b(){return l[30](l[33])}return{c(){s=r("div"),e=r("input"),a=h(),i=r("input"),c=h(),f=r("button"),f.textContent="\u2715",o(e,"type","text"),o(e,"placeholder",n=l[8]("query.namePlaceholder")),o(e,"class","input input-bordered input-sm flex-1"),o(i,"type","text"),o(i,"placeholder",u=l[8]("query.valuePlaceholder")),o(i,"class","input input-bordered input-sm flex-1"),o(f,"type","button"),o(f,"class","btn btn-sm btn-error btn-square"),o(s,"class","flex gap-2")},m(k,w){L(k,s,w),t(s,e),Y(e,l[31].key),t(s,a),t(s,i),Y(i,l[31].value),t(s,c),t(s,f),d||(p=[V(e,"input",m),V(i,"input",g),V(f,"click",b)],d=!0)},p(k,w){l=k,w[0]&256&&n!==(n=l[8]("query.namePlaceholder"))&&o(e,"placeholder",n),w[0]&64&&e.value!==l[31].key&&Y(e,l[31].key),w[0]&256&&u!==(u=l[8]("query.valuePlaceholder"))&&o(i,"placeholder",u),w[0]&64&&i.value!==l[31].value&&Y(i,l[31].value)},d(k){k&&H(s),d=!1,vt(p)}}}function Kh(l){let s,e,n,a,i,u,c,f=l[8]("query.add")+"",d,p,m=l[3].length+"",g,b,k,w,C,E,y=l[8]("query.add")+"",T,M,R,j,P,I,q=l[8]("query.remove")+"",D,A,N=l[4].length+"",Z,Q,x,z,K,S,B,U,F,J=l[8]("common.add")+"",ie,ue,ne,$,te,ae,ee,G,pe=l[8]("query.replace")+"",oe,ge,he=l[5].length+"",ye,ze,Pe,we,Fe,Je,je=l[8]("query.add")+"",Le,Se,fe,_e,Ie,De,se=l[8]("query.default")+"",ke,me,Ee=l[6].length+"",Ve,Be,nt,Ne,Qe,Ye,ve=l[8]("query.add")+"",de,Te,Ze,Me=l[2]&&kc(l),Ue=ut(l[3]),Ce=[];for(let O=0;O<Ue.length;O+=1)Ce[O]=yc(vc(l,Ue,O));function mt(O,He){return O[4].length>0?Gh:Wh}let Ge=mt(l),ce=Ge(l),qe=ut(l[5]),Re=[];for(let O=0;O<qe.length;O+=1)Re[O]=Ec(_c(l,qe,O));let dt=ut(l[6]),We=[];for(let O=0;O<dt.length;O+=1)We[O]=Tc(gc(l,dt,O));return{c(){s=r("div"),Me&&Me.c(),e=h(),n=r("div"),a=r("div"),i=r("input"),u=h(),c=r("div"),d=_(f),p=_(" ("),g=_(m),b=_(")"),k=h(),w=r("div");for(let O=0;O<Ce.length;O+=1)Ce[O].c();C=h(),E=r("button"),T=_(y),M=h(),R=r("div"),j=r("input"),P=h(),I=r("div"),D=_(q),A=_(" ("),Z=_(N),Q=_(")"),x=h(),z=r("div"),K=r("div"),S=r("input"),U=h(),F=r("button"),ie=_(J),ne=h(),ce.c(),$=h(),te=r("div"),ae=r("input"),ee=h(),G=r("div"),oe=_(pe),ge=_(" ("),ye=_(he),ze=_(")"),Pe=h(),we=r("div");for(let O=0;O<Re.length;O+=1)Re[O].c();Fe=h(),Je=r("button"),Le=_(je),Se=h(),fe=r("div"),_e=r("input"),Ie=h(),De=r("div"),ke=_(se),me=_(" ("),Ve=_(Ee),Be=_(")"),nt=h(),Ne=r("div");for(let O=0;O<We.length;O+=1)We[O].c();Qe=h(),Ye=r("button"),de=_(ve),o(i,"type","checkbox"),i.checked=!0,o(c,"class","collapse-title text-sm font-medium"),o(E,"type","button"),o(E,"class","btn btn-sm btn-ghost"),o(w,"class","collapse-content space-y-2"),o(a,"class","collapse collapse-arrow bg-base-200"),o(j,"type","checkbox"),o(I,"class","collapse-title text-sm font-medium"),o(S,"type","text"),o(S,"placeholder",B=l[8]("query.namePlaceholder")),o(S,"class","input input-bordered input-sm flex-1"),o(F,"type","button"),o(F,"class","btn btn-sm btn-primary"),F.disabled=ue=!l[7].trim(),o(K,"class","flex gap-2"),o(z,"class","collapse-content space-y-2"),o(R,"class","collapse collapse-arrow bg-base-200"),o(ae,"type","checkbox"),o(G,"class","collapse-title text-sm font-medium"),o(Je,"type","button"),o(Je,"class","btn btn-sm btn-ghost"),o(we,"class","collapse-content space-y-2"),o(te,"class","collapse collapse-arrow bg-base-200"),o(_e,"type","checkbox"),o(De,"class","collapse-title text-sm font-medium"),o(Ye,"type","button"),o(Ye,"class","btn btn-sm btn-ghost"),o(Ne,"class","collapse-content space-y-2"),o(fe,"class","collapse collapse-arrow bg-base-200"),o(n,"class","space-y-4"),o(s,"class","form-control w-full")},m(O,He){L(O,s,He),Me&&Me.m(s,null),t(s,e),t(s,n),t(n,a),t(a,i),t(a,u),t(a,c),t(c,d),t(c,p),t(c,g),t(c,b),t(a,k),t(a,w);for(let X=0;X<Ce.length;X+=1)Ce[X]&&Ce[X].m(w,null);t(w,C),t(w,E),t(E,T),t(n,M),t(n,R),t(R,j),t(R,P),t(R,I),t(I,D),t(I,A),t(I,Z),t(I,Q),t(R,x),t(R,z),t(z,K),t(K,S),Y(S,l[7]),t(K,U),t(K,F),t(F,ie),t(z,ne),ce.m(z,null),t(n,$),t(n,te),t(te,ae),t(te,ee),t(te,G),t(G,oe),t(G,ge),t(G,ye),t(G,ze),t(te,Pe),t(te,we);for(let X=0;X<Re.length;X+=1)Re[X]&&Re[X].m(we,null);t(we,Fe),t(we,Je),t(Je,Le),t(n,Se),t(n,fe),t(fe,_e),t(fe,Ie),t(fe,De),t(De,ke),t(De,me),t(De,Ve),t(De,Be),t(fe,nt),t(fe,Ne);for(let X=0;X<We.length;X+=1)We[X]&&We[X].m(Ne,null);t(Ne,Qe),t(Ne,Ye),t(Ye,de),Te||(Ze=[V(E,"click",l[9]),V(S,"input",l[23]),V(S,"keydown",l[13]),V(F,"click",l[11]),V(Je,"click",l[14]),V(Ye,"click",l[16])],Te=!0)},p(O,He){if(O[2]?Me?Me.p(O,He):(Me=kc(O),Me.c(),Me.m(s,e)):Me&&(Me.d(1),Me=null),He[0]&256&&f!==(f=O[8]("query.add")+"")&&v(d,f),He[0]&8&&m!==(m=O[3].length+"")&&v(g,m),He[0]&1288){Ue=ut(O[3]);let X;for(X=0;X<Ue.length;X+=1){const ft=vc(O,Ue,X);Ce[X]?Ce[X].p(ft,He):(Ce[X]=yc(ft),Ce[X].c(),Ce[X].m(w,C))}for(;X<Ce.length;X+=1)Ce[X].d(1);Ce.length=Ue.length}if(He[0]&256&&y!==(y=O[8]("query.add")+"")&&v(T,y),He[0]&256&&q!==(q=O[8]("query.remove")+"")&&v(D,q),He[0]&16&&N!==(N=O[4].length+"")&&v(Z,N),He[0]&256&&B!==(B=O[8]("query.namePlaceholder"))&&o(S,"placeholder",B),He[0]&128&&S.value!==O[7]&&Y(S,O[7]),He[0]&256&&J!==(J=O[8]("common.add")+"")&&v(ie,J),He[0]&128&&ue!==(ue=!O[7].trim())&&(F.disabled=ue),Ge===(Ge=mt(O))&&ce?ce.p(O,He):(ce.d(1),ce=Ge(O),ce&&(ce.c(),ce.m(z,null))),He[0]&256&&pe!==(pe=O[8]("query.replace")+"")&&v(oe,pe),He[0]&32&&he!==(he=O[5].length+"")&&v(ye,he),He[0]&33056){qe=ut(O[5]);let X;for(X=0;X<qe.length;X+=1){const ft=_c(O,qe,X);Re[X]?Re[X].p(ft,He):(Re[X]=Ec(ft),Re[X].c(),Re[X].m(we,Fe))}for(;X<Re.length;X+=1)Re[X].d(1);Re.length=qe.length}if(He[0]&256&&je!==(je=O[8]("query.add")+"")&&v(Le,je),He[0]&256&&se!==(se=O[8]("query.default")+"")&&v(ke,se),He[0]&64&&Ee!==(Ee=O[6].length+"")&&v(Ve,Ee),He[0]&131392){dt=ut(O[6]);let X;for(X=0;X<dt.length;X+=1){const ft=gc(O,dt,X);We[X]?We[X].p(ft,He):(We[X]=Tc(ft),We[X].c(),We[X].m(Ne,Qe))}for(;X<We.length;X+=1)We[X].d(1);We.length=dt.length}He[0]&256&&ve!==(ve=O[8]("query.add")+"")&&v(de,ve)},i:ot,o:ot,d(O){O&&H(s),Me&&Me.d(),Gt(Ce,O),ce.d(),Gt(Re,O),Gt(We,O),Te=!1,vt(Ze)}}}function Yh(l,s,e){let n;Dt(l,Rt,S=>e(8,n=S));let{value:a={}}=s,{label:i="Query Parameters"}=s,{showHelp:u=!0}=s,{showLabel:c=!0}=s,f=[],d=[],p="",m=[],g=[],b=!1;function k(){e(3,f=[...f,{key:"",value:""}]),e(19,b=!0)}function w(S){e(3,f=f.filter((B,U)=>U!==S))}function C(){const S=p.trim();S&&!d.includes(S)&&(e(4,d=[...d,S]),e(7,p=""),e(19,b=!0))}function E(S){e(4,d=d.filter((B,U)=>U!==S))}function y(S){S.key==="Enter"&&(S.preventDefault(),C())}function T(){e(5,m=[...m,{key:"",value:""}]),e(19,b=!0)}function M(S){e(5,m=m.filter((B,U)=>U!==S))}function R(){e(6,g=[...g,{key:"",value:""}]),e(19,b=!0)}function j(S){e(6,g=g.filter((B,U)=>U!==S))}function P(S,B){S[B].key=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}function I(S,B){S[B].value=this.value,e(3,f),e(19,b),e(18,a),e(4,d),e(5,m),e(6,g)}const q=S=>w(S);function D(){p=this.value,e(7,p)}const A=S=>E(S);function N(S,B){S[B].key=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}function Z(S,B){S[B].value=this.value,e(5,m),e(19,b),e(18,a),e(3,f),e(4,d),e(6,g)}const Q=S=>M(S);function x(S,B){S[B].key=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}function z(S,B){S[B].value=this.value,e(6,g),e(19,b),e(18,a),e(3,f),e(4,d),e(5,m)}const K=S=>j(S);return l.$$set=S=>{"value"in S&&e(18,a=S.value),"label"in S&&e(0,i=S.label),"showHelp"in S&&e(1,u=S.showHelp),"showLabel"in S&&e(2,c=S.showLabel)},l.$$.update=()=>{if(l.$$.dirty[0]&786552){!b&&(a.add||a.remove||a.replace||a.default)&&(e(3,f=Object.entries(a.add||{}).map(([F,J])=>({key:F,value:String(J)}))),e(4,d=[...a.remove||[]]),e(5,m=Object.entries(a.replace||{}).map(([F,J])=>({key:F,value:String(J)}))),e(6,g=Object.entries(a.default||{}).map(([F,J])=>({key:F,value:String(J)}))),e(19,b=!0));const S={};f.filter(F=>F.key.trim()).forEach(F=>{S[F.key]=F.value}),e(18,a.add=Object.keys(S).length>0?S:void 0,a),e(18,a.remove=d.length>0?d:void 0,a);const B={};m.filter(F=>F.key.trim()).forEach(F=>{B[F.key]=F.value}),e(18,a.replace=Object.keys(B).length>0?B:void 0,a);const U={};g.filter(F=>F.key.trim()).forEach(F=>{U[F.key]=F.value}),e(18,a.default=Object.keys(U).length>0?U:void 0,a)}},[i,u,c,f,d,m,g,p,n,k,w,C,E,y,T,M,R,j,a,b,P,I,q,D,A,N,Z,Q,x,z,K]}class n0 extends Nt{constructor(s){super(),Ut(this,s,Yh,Kh,Vt,{value:18,label:0,showHelp:1,showLabel:2},null,[-1,-1])}}function Sc(l){let s,e,n=l[7]("upstream.title",{values:{index:l[1]+1}})+"",a,i,u,c,f,d,p,m,g,b,k,w,C;return{c(){s=r("div"),e=r("h3"),a=_(n),i=h(),u=r("div"),c=r("button"),f=re("svg"),d=re("path"),m=h(),g=r("button"),b=_("\u2715"),o(e,"class","font-semibold"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline btn-square"),o(c,"title",p=l[7]("routeCard.duplicate")),o(g,"type","button"),o(g,"class","btn btn-sm btn-error btn-square"),o(g,"title",k=l[7]("upstream.remove")),o(u,"class","flex gap-2"),o(s,"class","flex justify-between items-center mb-4")},m(E,y){L(E,s,y),t(s,e),t(e,a),t(s,i),t(s,u),t(u,c),t(c,f),t(f,d),t(u,m),t(u,g),t(g,b),w||(C=[V(c,"click",function(){sa(l[3])&&l[3].apply(this,arguments)}),V(g,"click",function(){sa(l[2])&&l[2].apply(this,arguments)})],w=!0)},p(E,y){l=E,y&130&&n!==(n=l[7]("upstream.title",{values:{index:l[1]+1}})+"")&&v(a,n),y&128&&p!==(p=l[7]("routeCard.duplicate"))&&o(c,"title",p),y&128&&k!==(k=l[7]("upstream.remove"))&&o(g,"title",k)},d(E){E&&H(s),w=!1,vt(C)}}}function Mc(l){let s,e,n=l[6].find(Hc)?.message+"",a,i;return{c(){s=r("label"),e=r("span"),a=_(n),o(e,"class","label-text-alt text-error"),o(s,"class","label"),o(s,"for",i="upstream-target-"+l[1])},m(u,c){L(u,s,c),t(s,e),t(e,a)},p(u,c){c&64&&n!==(n=u[6].find(Hc)?.message+"")&&v(a,n),c&2&&i!==(i="upstream-target-"+u[1])&&o(s,"for",i)},d(u){u&&H(s)}}}function Qh(l){let s,e,n,a,i,u,c,f=l[7]("upstream.targetUrl")+"",d,p,m,g,b,k,w,C,E,y=l[6].some(Rc),T,M,R,j,P,I=l[7]("upstream.weight")+"",q,D,A,N=l[7]("upstream.weightHelp")+"",Z,Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge=l[7]("upstream.transformerHelp")+"",he,ye,ze,Pe,we,Fe,Je=l[7]("headers.title")+"",je,Le,Se,fe,_e,Ie,De,se,ke,me,Ee=l[7]("body.title")+"",Ve,Be,nt,Ne,Qe,Ye,ve,de,Te,Ze,Me=l[7]("query.title")+"",Ue,Ce,mt,Ge,ce,qe,Re,dt,We=l[4]&&Sc(l),O=y&&Mc(l);function He(Oe){l[11](Oe)}let X={label:l[7]("upstream.transformer")};l[5]!==void 0&&(X.plugin=l[5]),ee=new l0({props:X}),Sl.push(()=>Ml(ee,"plugin",He));function ft(Oe){l[12](Oe)}let Ht={label:l[7]("headers.title"),showHelp:!1,showLabel:!1};l[0].headers!==void 0&&(Ht.value=l[0].headers),fe=new s0({props:Ht}),Sl.push(()=>Ml(fe,"value",ft));function Ke(Oe){l[13](Oe)}let _t={label:l[7]("body.title"),showHelp:!1,showLabel:!1};l[0].body!==void 0&&(_t.value=l[0].body),Ne=new o0({props:_t}),Sl.push(()=>Ml(Ne,"value",Ke));function tt(Oe){l[14](Oe)}let it={label:l[7]("query.title"),showHelp:!1,showLabel:!1};return l[0].query!==void 0&&(it.value=l[0].query),Ge=new n0({props:it}),Sl.push(()=>Ml(Ge,"value",tt)),{c(){s=r("div"),e=r("div"),We&&We.c(),n=h(),a=r("div"),i=r("div"),u=r("label"),c=r("span"),d=_(f),p=h(),m=r("span"),m.textContent="*",b=h(),k=r("input"),E=h(),O&&O.c(),T=h(),M=r("div"),R=r("div"),j=r("label"),P=r("span"),q=_(I),D=h(),A=r("span"),Z=_(N),x=h(),z=r("input"),S=h(),B=r("div"),U=r("label"),F=r("span"),F.textContent="Priority",J=h(),ie=r("span"),ie.textContent="Failover order",ne=h(),$=r("input"),ae=h(),Et(ee.$$.fragment),pe=h(),oe=r("div"),he=_(ge),ye=h(),ze=r("div"),Pe=r("input"),we=h(),Fe=r("div"),je=_(Je),Le=h(),Se=r("div"),Et(fe.$$.fragment),Ie=h(),De=r("div"),se=r("input"),ke=h(),me=r("div"),Ve=_(Ee),Be=h(),nt=r("div"),Et(Ne.$$.fragment),Ye=h(),ve=r("div"),de=r("input"),Te=h(),Ze=r("div"),Ue=_(Me),Ce=h(),mt=r("div"),Et(Ge.$$.fragment),o(m,"class","text-error"),o(c,"class","label-text font-semibold"),o(u,"class","label"),o(u,"for",g="upstream-target-"+l[1]),o(k,"id",w="upstream-target-"+l[1]),o(k,"type","url"),o(k,"placeholder",C=l[7]("upstream.targetPlaceholder")),o(k,"class","input input-bordered"),k.required=!0,le(k,"input-error",l[6].some(qc)),o(i,"class","form-control"),o(P,"class","label-text"),o(A,"class","label-text-alt text-xs"),o(j,"class","label"),o(j,"for",Q="upstream-weight-"+l[1]),o(z,"id",K="upstream-weight-"+l[1]),o(z,"type","number"),o(z,"placeholder","100"),o(z,"class","input input-bordered"),o(z,"min","1"),o(R,"class","form-control"),o(F,"class","label-text"),o(ie,"class","label-text-alt text-xs"),o(U,"class","label"),o(U,"for",ue="upstream-priority-"+l[1]),o($,"id",te="upstream-priority-"+l[1]),o($,"type","number"),o($,"placeholder","1"),o($,"class","input input-bordered"),o($,"min","0"),o(B,"class","form-control"),o(M,"class","grid grid-cols-2 gap-4"),o(oe,"class","divider text-sm font-semibold"),o(Pe,"type","checkbox"),o(Fe,"class","collapse-title text-sm font-medium"),o(Se,"class","collapse-content"),o(ze,"class","collapse collapse-arrow bg-base-200"),o(se,"type","checkbox"),o(me,"class","collapse-title text-sm font-medium"),o(nt,"class","collapse-content"),o(De,"class","collapse collapse-arrow bg-base-200"),o(de,"type","checkbox"),o(Ze,"class","collapse-title text-sm font-medium"),o(mt,"class","collapse-content"),o(ve,"class","collapse collapse-arrow bg-base-200"),o(a,"class","grid grid-cols-1 gap-4"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-100 shadow-sm border border-base-300")},m(Oe,Xe){L(Oe,s,Xe),t(s,e),We&&We.m(e,null),t(e,n),t(e,a),t(a,i),t(i,u),t(u,c),t(c,d),t(c,p),t(c,m),t(i,b),t(i,k),Y(k,l[0].target),t(i,E),O&&O.m(i,null),t(a,T),t(a,M),t(M,R),t(R,j),t(j,P),t(P,q),t(j,D),t(j,A),t(A,Z),t(R,x),t(R,z),Y(z,l[0].weight),t(M,S),t(M,B),t(B,U),t(U,F),t(U,J),t(U,ie),t(B,ne),t(B,$),Y($,l[0].priority),t(a,ae),Ct(ee,a,null),t(a,pe),t(a,oe),t(oe,he),t(a,ye),t(a,ze),t(ze,Pe),t(ze,we),t(ze,Fe),t(Fe,je),t(ze,Le),t(ze,Se),Ct(fe,Se,null),t(a,Ie),t(a,De),t(De,se),t(De,ke),t(De,me),t(me,Ve),t(De,Be),t(De,nt),Ct(Ne,nt,null),t(a,Ye),t(a,ve),t(ve,de),t(ve,Te),t(ve,Ze),t(Ze,Ue),t(ve,Ce),t(ve,mt),Ct(Ge,mt,null),qe=!0,Re||(dt=[V(k,"input",l[8]),V(z,"input",l[9]),V($,"input",l[10])],Re=!0)},p(Oe,[Xe]){Oe[4]?We?We.p(Oe,Xe):(We=Sc(Oe),We.c(),We.m(e,n)):We&&(We.d(1),We=null),(!qe||Xe&128)&&f!==(f=Oe[7]("upstream.targetUrl")+"")&&v(d,f),(!qe||Xe&2&&g!==(g="upstream-target-"+Oe[1]))&&o(u,"for",g),(!qe||Xe&2&&w!==(w="upstream-target-"+Oe[1]))&&o(k,"id",w),(!qe||Xe&128&&C!==(C=Oe[7]("upstream.targetPlaceholder")))&&o(k,"placeholder",C),Xe&1&&k.value!==Oe[0].target&&Y(k,Oe[0].target),(!qe||Xe&64)&&le(k,"input-error",Oe[6].some(qc)),Xe&64&&(y=Oe[6].some(Rc)),y?O?O.p(Oe,Xe):(O=Mc(Oe),O.c(),O.m(i,null)):O&&(O.d(1),O=null),(!qe||Xe&128)&&I!==(I=Oe[7]("upstream.weight")+"")&&v(q,I),(!qe||Xe&128)&&N!==(N=Oe[7]("upstream.weightHelp")+"")&&v(Z,N),(!qe||Xe&2&&Q!==(Q="upstream-weight-"+Oe[1]))&&o(j,"for",Q),(!qe||Xe&2&&K!==(K="upstream-weight-"+Oe[1]))&&o(z,"id",K),Xe&1&&Mt(z.value)!==Oe[0].weight&&Y(z,Oe[0].weight),(!qe||Xe&2&&ue!==(ue="upstream-priority-"+Oe[1]))&&o(U,"for",ue),(!qe||Xe&2&&te!==(te="upstream-priority-"+Oe[1]))&&o($,"id",te),Xe&1&&Mt($.value)!==Oe[0].priority&&Y($,Oe[0].priority);const It={};Xe&128&&(It.label=Oe[7]("upstream.transformer")),!G&&Xe&32&&(G=!0,It.plugin=Oe[5],Rl(()=>G=!1)),ee.$set(It),(!qe||Xe&128)&&ge!==(ge=Oe[7]("upstream.transformerHelp")+"")&&v(he,ge),(!qe||Xe&128)&&Je!==(Je=Oe[7]("headers.title")+"")&&v(je,Je);const rt={};Xe&128&&(rt.label=Oe[7]("headers.title")),!_e&&Xe&1&&(_e=!0,rt.value=Oe[0].headers,Rl(()=>_e=!1)),fe.$set(rt),(!qe||Xe&128)&&Ee!==(Ee=Oe[7]("body.title")+"")&&v(Ve,Ee);const gt={};Xe&128&&(gt.label=Oe[7]("body.title")),!Qe&&Xe&1&&(Qe=!0,gt.value=Oe[0].body,Rl(()=>Qe=!1)),Ne.$set(gt),(!qe||Xe&128)&&Me!==(Me=Oe[7]("query.title")+"")&&v(Ue,Me);const wt={};Xe&128&&(wt.label=Oe[7]("query.title")),!ce&&Xe&1&&(ce=!0,wt.value=Oe[0].query,Rl(()=>ce=!1)),Ge.$set(wt)},i(Oe){qe||(et(ee.$$.fragment,Oe),et(fe.$$.fragment,Oe),et(Ne.$$.fragment,Oe),et(Ge.$$.fragment,Oe),qe=!0)},o(Oe){st(ee.$$.fragment,Oe),st(fe.$$.fragment,Oe),st(Ne.$$.fragment,Oe),st(Ge.$$.fragment,Oe),qe=!1},d(Oe){Oe&&H(s),We&&We.d(),O&&O.d(),yt(ee),yt(fe),yt(Ne),yt(Ge),Re=!1,vt(dt)}}}const Rc=l=>l.field.includes("target"),qc=l=>l.field.includes("target"),Hc=l=>l.field.includes("target");function Zh(l,s,e){let n,a;Dt(l,Rt,y=>e(7,a=y));let{upstream:i}=s,{index:u}=s,{onRemove:c}=s,{onDuplicate:f}=s,{showHeader:d=!0}=s,p=i.plugins?.[0]||null;function m(){i.target=this.value,e(0,i),e(5,p)}function g(){i.weight=Mt(this.value),e(0,i),e(5,p)}function b(){i.priority=Mt(this.value),e(0,i),e(5,p)}function k(y){p=y,e(5,p)}function w(y){l.$$.not_equal(i.headers,y)&&(i.headers=y,e(0,i),e(5,p))}function C(y){l.$$.not_equal(i.body,y)&&(i.body=y,e(0,i),e(5,p))}function E(y){l.$$.not_equal(i.query,y)&&(i.query=y,e(0,i),e(5,p))}return l.$$set=y=>{"upstream"in y&&e(0,i=y.upstream),"index"in y&&e(1,u=y.index),"onRemove"in y&&e(2,c=y.onRemove),"onDuplicate"in y&&e(3,f=y.onDuplicate),"showHeader"in y&&e(4,d=y.showHeader)},l.$$.update=()=>{l.$$.dirty&1&&(e(0,i.headers=i.headers||{add:{},remove:[],default:{}},i),e(0,i.body=i.body||{add:{},remove:[],replace:{},default:{}},i),e(0,i.query=i.query||{add:{},remove:[],replace:{},default:{}},i)),l.$$.dirty&32&&e(0,i.plugins=p?[p]:void 0,i),l.$$.dirty&3&&e(6,n=Du(i,u))},[i,u,c,f,d,p,n,a,m,g,b,k,w,C,E]}class Xh extends Nt{constructor(s){super(),Ut(this,s,Zh,Qh,Vt,{upstream:0,index:1,onRemove:2,onDuplicate:3,showHeader:4})}}function Lc(l,s,e){const n=l.slice();return n[22]=s[e].u,n[23]=s[e].i,n}function Pc(l){let s,e,n=l[0].find(zc)?.message+"",a;return{c(){s=r("div"),e=r("span"),a=_(n),o(s,"class","alert alert-error")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&1&&n!==(n=i[0].find(zc)?.message+"")&&v(a,n)},d(i){i&&H(s)}}}function jc(l){let s;return{c(){s=r("span"),s.textContent="Transformer",o(s,"class","badge badge-sm badge-info mt-1")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Dc(l,s){let e,n,a=(s[22].priority||1)+"",i,u,c,f,d,p=s[22].target+"",m,g,b,k,w,C=(s[22].weight||100)+"",E,y,T,M,R,j,P,I,q,D,A,N,Z,Q,x,z,K,S,B,U,F=s[22].plugins&&s[22].plugins.length>0&&jc();function J(){return s[18](s[23])}function ie(){return s[19](s[23])}function ue(){return s[20](s[23])}return{key:l,first:null,c(){e=r("tr"),n=r("td"),i=_(a),u=h(),c=r("td"),f=r("div"),d=r("div"),m=_(p),b=h(),F&&F.c(),k=h(),w=r("td"),E=_(C),y=h(),T=r("td"),M=r("div"),R=r("button"),j=re("svg"),P=re("path"),q=h(),D=r("button"),A=re("svg"),N=re("path"),Q=h(),x=r("button"),z=re("svg"),K=re("path"),o(d,"class","font-bold truncate max-w-xs"),o(d,"title",g=s[22].target),o(f,"class","flex flex-col"),o(P,"stroke-linecap","round"),o(P,"stroke-linejoin","round"),o(P,"stroke-width","2"),o(P,"d","M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"),o(j,"xmlns","http://www.w3.org/2000/svg"),o(j,"class","h-4 w-4"),o(j,"fill","none"),o(j,"viewBox","0 0 24 24"),o(j,"stroke","currentColor"),o(R,"type","button"),o(R,"class","btn btn-square btn-xs"),o(R,"title",I=s[8]("common.edit")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(D,"type","button"),o(D,"class","btn btn-square btn-xs"),o(D,"title",Z=s[8]("routeCard.duplicate")),o(K,"stroke-linecap","round"),o(K,"stroke-linejoin","round"),o(K,"stroke-width","2"),o(K,"d","M6 18L18 6M6 6l12 12"),o(z,"xmlns","http://www.w3.org/2000/svg"),o(z,"class","h-4 w-4"),o(z,"fill","none"),o(z,"viewBox","0 0 24 24"),o(z,"stroke","currentColor"),o(x,"type","button"),o(x,"class","btn btn-square btn-xs btn-error"),o(x,"title",S=s[8]("common.delete")),o(M,"class","flex gap-1"),o(e,"class","hover"),this.first=e},m(ne,$){L(ne,e,$),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,m),t(f,b),F&&F.m(f,null),t(e,k),t(e,w),t(w,E),t(e,y),t(e,T),t(T,M),t(M,R),t(R,j),t(j,P),t(M,q),t(M,D),t(D,A),t(A,N),t(M,Q),t(M,x),t(x,z),t(z,K),B||(U=[V(R,"click",J),V(D,"click",ie),V(x,"click",ue)],B=!0)},p(ne,$){s=ne,$&128&&a!==(a=(s[22].priority||1)+"")&&v(i,a),$&128&&p!==(p=s[22].target+"")&&v(m,p),$&128&&g!==(g=s[22].target)&&o(d,"title",g),s[22].plugins&&s[22].plugins.length>0?F||(F=jc(),F.c(),F.m(f,null)):F&&(F.d(1),F=null),$&128&&C!==(C=(s[22].weight||100)+"")&&v(E,C),$&256&&I!==(I=s[8]("common.edit"))&&o(R,"title",I),$&256&&Z!==(Z=s[8]("routeCard.duplicate"))&&o(D,"title",Z),$&256&&S!==(S=s[8]("common.delete"))&&o(x,"title",S)},d(ne){ne&&H(e),F&&F.d(),B=!1,vt(U)}}}function Bc(l){let s,e,n=(l[2]?l[8]("routes.noMatchingRoutes"):l[8]("routes.noRoutesMessage"))+"",a;return{c(){s=r("tr"),e=r("td"),a=_(n),o(e,"colspan","4"),o(e,"class","text-center text-gray-500 py-8")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&260&&n!==(n=(i[2]?i[8]("routes.noMatchingRoutes"):i[8]("routes.noRoutesMessage"))+"")&&v(a,n)},d(i){i&&H(s)}}}function Ic(l){let s,e,n=l[1][0].message+"",a;return{c(){s=r("div"),e=r("span"),a=_(n),o(s,"class","alert alert-warning")},m(i,u){L(i,s,u),t(s,e),t(e,a)},p(i,u){u&2&&n!==(n=i[1][0].message+"")&&v(a,n)},d(i){i&&H(s)}}}function Ac(l){let s,e,n,a=(l[4]>=0?l[8]("upstream.title",{values:{index:l[4]+1}}):l[8]("routeEditor.addUpstream"))+"",i,u,c,f,d,p,m,g,b=l[8]("common.cancel")+"",k,w,C,E=l[8]("common.save")+"",y,T,M,R,j;function P(q){l[21](q)}let I={index:l[4],showHeader:!1,onRemove:$h,onDuplicate:em};return l[5]!==void 0&&(I.upstream=l[5]),f=new Xh({props:I}),Sl.push(()=>Ml(f,"upstream",P)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("div"),Et(f.$$.fragment),p=h(),m=r("div"),g=r("button"),k=_(b),w=h(),C=r("button"),y=_(E),o(n,"class","font-bold text-lg mb-4"),o(c,"class","max-h-[70vh] overflow-y-auto"),o(g,"type","button"),o(g,"class","btn"),o(C,"type","button"),o(C,"class","btn btn-primary"),C.disabled=T=!l[6],o(m,"class","modal-action"),o(e,"class","modal-box w-11/12 max-w-3xl"),o(s,"class","modal modal-open")},m(q,D){L(q,s,D),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),Ct(f,c,null),t(e,p),t(e,m),t(m,g),t(g,k),t(m,w),t(m,C),t(C,y),M=!0,R||(j=[V(g,"click",l[10]),V(C,"click",l[11])],R=!0)},p(q,D){(!M||D&272)&&a!==(a=(q[4]>=0?q[8]("upstream.title",{values:{index:q[4]+1}}):q[8]("routeEditor.addUpstream"))+"")&&v(i,a);const A={};D&16&&(A.index=q[4]),!d&&D&32&&(d=!0,A.upstream=q[5],Rl(()=>d=!1)),f.$set(A),(!M||D&256)&&b!==(b=q[8]("common.cancel")+"")&&v(k,b),(!M||D&256)&&E!==(E=q[8]("common.save")+"")&&v(y,E),(!M||D&64&&T!==(T=!q[6]))&&(C.disabled=T)},i(q){M||(et(f.$$.fragment,q),M=!0)},o(q){st(f.$$.fragment,q),M=!1},d(q){q&&H(s),yt(f),R=!1,vt(j)}}}function xh(l){let s,e,n,a,i=l[8]("routeEditor.upstreams")+"",u,c,f,d,p,m=l[8]("routeEditor.upstreamsHelp")+"",g,b,k,w,C,E,y,T=l[8]("routeEditor.addUpstream")+"",M,R,j=l[0].some(Fc),P,I,q,D,A,N,Z=l[8]("upstream.priority")+"",Q,x,z,K=l[8]("upstream.target")+"",S,B,U,F=l[8]("upstream.weight")+"",J,ie,ue,ne=l[8]("routes.actions")+"",$,te,ae,ee=[],G=new Map,pe,oe,ge,he,ye,ze,Pe,we=j&&Pc(l),Fe=ut(l[7]);const Je=fe=>fe[22]._uid;for(let fe=0;fe<Fe.length;fe+=1){let _e=Lc(l,Fe,fe),Ie=Je(_e);G.set(Ie,ee[fe]=Dc(Ie,_e))}let je=l[7].length===0&&Bc(l),Le=l[1].length>0&&Ic(l),Se=l[3]&&l[5]&&Ac(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h3"),u=_(i),c=h(),f=r("span"),f.textContent="*",d=h(),p=r("p"),g=_(m),b=h(),k=r("div"),w=r("input"),E=h(),y=r("button"),M=_(T),R=h(),we&&we.c(),P=h(),I=r("div"),q=r("table"),D=r("thead"),A=r("tr"),N=r("th"),Q=_(Z),x=h(),z=r("th"),S=_(K),B=h(),U=r("th"),J=_(F),ie=h(),ue=r("th"),$=_(ne),te=h(),ae=r("tbody");for(let fe=0;fe<ee.length;fe+=1)ee[fe].c();pe=h(),je&&je.c(),oe=h(),Le&&Le.c(),ge=h(),Se&&Se.c(),he=Ul(),o(f,"class","text-error"),o(a,"class","text-lg font-semibold"),o(p,"class","text-sm text-gray-500 mt-1"),o(w,"type","text"),o(w,"placeholder",C=l[8]("common.search")),o(w,"class","input input-bordered input-sm"),o(y,"type","button"),o(y,"class","btn btn-sm btn-primary"),o(k,"class","flex gap-2"),o(e,"class","flex justify-between items-center"),o(N,"class","w-20"),o(U,"class","w-24"),o(ue,"class","w-32"),o(q,"class","table table-zebra w-full"),o(I,"class","overflow-x-auto"),o(s,"class","space-y-4")},m(fe,_e){L(fe,s,_e),t(s,e),t(e,n),t(n,a),t(a,u),t(a,c),t(a,f),t(n,d),t(n,p),t(p,g),t(e,b),t(e,k),t(k,w),Y(w,l[2]),t(k,E),t(k,y),t(y,M),t(s,R),we&&we.m(s,null),t(s,P),t(s,I),t(I,q),t(q,D),t(D,A),t(A,N),t(N,Q),t(A,x),t(A,z),t(z,S),t(A,B),t(A,U),t(U,J),t(A,ie),t(A,ue),t(ue,$),t(q,te),t(q,ae);for(let Ie=0;Ie<ee.length;Ie+=1)ee[Ie]&&ee[Ie].m(ae,null);t(ae,pe),je&&je.m(ae,null),t(s,oe),Le&&Le.m(s,null),L(fe,ge,_e),Se&&Se.m(fe,_e),L(fe,he,_e),ye=!0,ze||(Pe=[V(w,"input",l[16]),V(y,"click",l[17])],ze=!0)},p(fe,[_e]){(!ye||_e&256)&&i!==(i=fe[8]("routeEditor.upstreams")+"")&&v(u,i),(!ye||_e&256)&&m!==(m=fe[8]("routeEditor.upstreamsHelp")+"")&&v(g,m),(!ye||_e&256&&C!==(C=fe[8]("common.search")))&&o(w,"placeholder",C),_e&4&&w.value!==fe[2]&&Y(w,fe[2]),(!ye||_e&256)&&T!==(T=fe[8]("routeEditor.addUpstream")+"")&&v(M,T),_e&1&&(j=fe[0].some(Fc)),j?we?we.p(fe,_e):(we=Pc(fe),we.c(),we.m(s,P)):we&&(we.d(1),we=null),(!ye||_e&256)&&Z!==(Z=fe[8]("upstream.priority")+"")&&v(Q,Z),(!ye||_e&256)&&K!==(K=fe[8]("upstream.target")+"")&&v(S,K),(!ye||_e&256)&&F!==(F=fe[8]("upstream.weight")+"")&&v(J,F),(!ye||_e&256)&&ne!==(ne=fe[8]("routes.actions")+"")&&v($,ne),_e&13184&&(Fe=ut(fe[7]),ee=Ru(ee,_e,Je,1,fe,Fe,G,ae,Op,Dc,pe,Lc)),fe[7].length===0?je?je.p(fe,_e):(je=Bc(fe),je.c(),je.m(ae,null)):je&&(je.d(1),je=null),fe[1].length>0?Le?Le.p(fe,_e):(Le=Ic(fe),Le.c(),Le.m(s,null)):Le&&(Le.d(1),Le=null),fe[3]&&fe[5]?Se?(Se.p(fe,_e),_e&40&&et(Se,1)):(Se=Ac(fe),Se.c(),et(Se,1),Se.m(he.parentNode,he)):Se&&(Gl(),st(Se,1,1,()=>{Se=null}),Kl())},i(fe){ye||(et(Se),ye=!0)},o(fe){st(Se),ye=!1},d(fe){fe&&(H(s),H(ge),H(he)),we&&we.d();for(let _e=0;_e<ee.length;_e+=1)ee[_e].d();je&&je.d(),Le&&Le.d(),Se&&Se.d(fe),ze=!1,vt(Pe)}}}const Fc=l=>l.field==="upstreams",zc=l=>l.field==="upstreams",$h=()=>{},em=()=>{};function tm(l,s,e){let n,a,i;Dt(l,Rt,q=>e(8,i=q));let{route:u}=s,{errors:c=[]}=s,{weightErrors:f=[]}=s,d="",p=!1,m=-1,g=null,b=[];function k(q=-1){e(4,m=q),q>=0?e(5,g=JSON.parse(JSON.stringify(u.upstreams[q]))):e(5,g={_uid:ta(),target:"",weight:100,priority:u.upstreams.length+1,headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}}),e(3,p=!0)}function w(){e(3,p=!1),e(5,g=null)}function C(){a&&(m>=0?e(14,u.upstreams[m]=g,u):e(14,u.upstreams=[...u.upstreams,g],u),w())}function E(q){if(u.upstreams.length<=1){alert(i("routeEditor.upstreamRequired"));return}e(14,u.upstreams=u.upstreams.filter((D,A)=>A!==q),u)}function y(q){const D=u.upstreams[q],A=JSON.parse(JSON.stringify(D));if(A._uid=ta(),A.target){const N=A.target.match(/^(.+?)(-\\d+)?$/);if(N){const[,Z,Q]=N;if(Q){const x=parseInt(Q.slice(1))+1;A.target=\`\${Z}-\${x}\`}else A.target=\`\${Z}-copy\`}else A.target=\`\${A.target}-copy\`}A.priority!==void 0&&(A.priority=Math.max(...u.upstreams.map(N=>N.priority||1))+1),e(14,u.upstreams=[...u.upstreams.slice(0,q+1),A,...u.upstreams.slice(q+1)],u)}function T(){d=this.value,e(2,d)}const M=()=>k(-1),R=q=>k(q),j=q=>y(q),P=q=>E(q);function I(q){g=q,e(5,g)}return l.$$set=q=>{"route"in q&&e(14,u=q.route),"errors"in q&&e(0,c=q.errors),"weightErrors"in q&&e(1,f=q.weightErrors)},l.$$.update=()=>{l.$$.dirty&16388&&e(7,n=u.upstreams.map((q,D)=>({u:q,i:D})).filter(({u:q})=>!d||q.target.toLowerCase().includes(d.toLowerCase()))),l.$$.dirty&16440&&p&&g&&e(15,b=Du(g,m===-1?u.upstreams.length:m)),l.$$.dirty&32808&&e(6,a=p&&g&&b.length===0)},[c,f,d,p,m,g,a,n,i,k,w,C,E,y,u,b,T,M,R,j,P,I]}class lm extends Nt{constructor(s){super(),Ut(this,s,tm,xh,Vt,{route:14,errors:0,weightErrors:1})}}function sm(l){let s,e,n;function a(u){l[8](u)}let i={label:l[2]("query.title"),showLabel:!1};return l[0].query!==void 0&&(i.value=l[0].query),s=new n0({props:i}),Sl.push(()=>Ml(s,"value",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("query.title")),!e&&c&1&&(e=!0,f.value=u[0].query,Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function om(l){let s,e,n;function a(u){l[7](u)}let i={label:l[2]("body.title"),showLabel:!1};return l[0].body!==void 0&&(i.value=l[0].body),s=new o0({props:i}),Sl.push(()=>Ml(s,"value",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("body.title")),!e&&c&1&&(e=!0,f.value=u[0].body,Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function nm(l){let s,e,n;function a(u){l[6](u)}let i={label:l[2]("headers.title"),showLabel:!1};return l[0].headers!==void 0&&(i.value=l[0].headers),s=new s0({props:i}),Sl.push(()=>Ml(s,"value",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c&4&&(f.label=u[2]("headers.title")),!e&&c&1&&(e=!0,f.value=u[0].headers,Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function am(l){let s,e,n,a=l[2]("routeEditor.requestModification")+"",i,u,c,f=l[2]("routeEditor.requestModificationHelp")+"",d,p,m,g,b=l[2]("headers.title")+"",k,w,C,E=l[2]("body.title")+"",y,T,M,R=l[2]("query.title")+"",j,P,I,q,D,A,N,Z,Q,x,z,K=l[2]("routeEditor.routeLevelModificationNote")+"",S,B,U,F;const J=[nm,om,sm],ie=[];function ue(ne,$){return ne[1]==="headers"?0:ne[1]==="body"?1:ne[1]==="query"?2:-1}return~(q=ue(l))&&(D=ie[q]=J[q](l)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),m=r("div"),g=r("button"),k=_(b),w=h(),C=r("button"),y=_(E),T=h(),M=r("button"),j=_(R),P=h(),I=r("div"),D&&D.c(),A=h(),N=r("div"),Z=re("svg"),Q=re("path"),x=h(),z=r("span"),S=_(K),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(g,"role","tab"),o(g,"class","tab"),le(g,"tab-active",l[1]==="headers"),o(C,"role","tab"),o(C,"class","tab"),le(C,"tab-active",l[1]==="body"),o(M,"role","tab"),o(M,"class","tab"),le(M,"tab-active",l[1]==="query"),o(m,"role","tablist"),o(m,"class","tabs tabs-boxed"),o(I,"class","mt-4"),o(Q,"stroke-linecap","round"),o(Q,"stroke-linejoin","round"),o(Q,"stroke-width","2"),o(Q,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Z,"xmlns","http://www.w3.org/2000/svg"),o(Z,"fill","none"),o(Z,"viewBox","0 0 24 24"),o(Z,"class","stroke-current shrink-0 w-6 h-6"),o(z,"class","text-sm"),o(N,"class","alert alert-info mt-4"),o(s,"class","space-y-4")},m(ne,$){L(ne,s,$),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),t(s,m),t(m,g),t(g,k),t(m,w),t(m,C),t(C,y),t(m,T),t(m,M),t(M,j),t(s,P),t(s,I),~q&&ie[q].m(I,null),t(s,A),t(s,N),t(N,Z),t(Z,Q),t(N,x),t(N,z),t(z,S),B=!0,U||(F=[V(g,"click",l[3]),V(C,"click",l[4]),V(M,"click",l[5])],U=!0)},p(ne,[$]){(!B||$&4)&&a!==(a=ne[2]("routeEditor.requestModification")+"")&&v(i,a),(!B||$&4)&&f!==(f=ne[2]("routeEditor.requestModificationHelp")+"")&&v(d,f),(!B||$&4)&&b!==(b=ne[2]("headers.title")+"")&&v(k,b),(!B||$&2)&&le(g,"tab-active",ne[1]==="headers"),(!B||$&4)&&E!==(E=ne[2]("body.title")+"")&&v(y,E),(!B||$&2)&&le(C,"tab-active",ne[1]==="body"),(!B||$&4)&&R!==(R=ne[2]("query.title")+"")&&v(j,R),(!B||$&2)&&le(M,"tab-active",ne[1]==="query");let te=q;q=ue(ne),q===te?~q&&ie[q].p(ne,$):(D&&(Gl(),st(ie[te],1,1,()=>{ie[te]=null}),Kl()),~q?(D=ie[q],D?D.p(ne,$):(D=ie[q]=J[q](ne),D.c()),et(D,1),D.m(I,null)):D=null),(!B||$&4)&&K!==(K=ne[2]("routeEditor.routeLevelModificationNote")+"")&&v(S,K)},i(ne){B||(et(D),B=!0)},o(ne){st(D),B=!1},d(ne){ne&&H(s),~q&&ie[q].d(),U=!1,vt(F)}}}function rm(l,s,e){let n;Dt(l,Rt,g=>e(2,n=g));let{route:a}=s,i="headers";const u=()=>e(1,i="headers"),c=()=>e(1,i="body"),f=()=>e(1,i="query");function d(g){l.$$.not_equal(a.headers,g)&&(a.headers=g,e(0,a))}function p(g){l.$$.not_equal(a.body,g)&&(a.body=g,e(0,a))}function m(g){l.$$.not_equal(a.query,g)&&(a.query=g,e(0,a))}return l.$$set=g=>{"route"in g&&e(0,a=g.route)},[a,i,n,u,c,f,d,p,m]}class im extends Nt{constructor(s){super(),Ut(this,s,rm,am,Vt,{route:0})}}function um(l){let s,e,n,a=l[1]("auth.routeAuth")+"",i,u,c,f=l[1]("auth.routeAuthHelp")+"",d,p,m,g,b;function k(C){l[2](C)}let w={label:l[1]("auth.routeAuth"),showHelp:!0,showLabel:!1};return l[0].auth!==void 0&&(w.value=l[0].auth),m=new xp({props:w}),Sl.push(()=>Ml(m,"value",k)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(s,"class","space-y-4")},m(C,E){L(C,s,E),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),Ct(m,s,null),b=!0},p(C,[E]){(!b||E&2)&&a!==(a=C[1]("auth.routeAuth")+"")&&v(i,a),(!b||E&2)&&f!==(f=C[1]("auth.routeAuthHelp")+"")&&v(d,f);const y={};E&2&&(y.label=C[1]("auth.routeAuth")),!g&&E&1&&(g=!0,y.value=C[0].auth,Rl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&H(s),yt(m)}}}function fm(l,s,e){let n;Dt(l,Rt,u=>e(1,n=u));let{route:a}=s;function i(u){l.$$.not_equal(a.auth,u)&&(a.auth=u,e(0,a))}return l.$$set=u=>{"route"in u&&e(0,a=u.route)},[a,n,i]}class cm extends Nt{constructor(s){super(),Ut(this,s,fm,um,Vt,{route:0})}}function Oc(l){let s,e=l[22]("routeEditor.failoverHelp")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","label-text-alt text-xs")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&4194304&&e!==(e=a[22]("routeEditor.failoverHelp")+"")&&v(n,e)},d(a){a&&H(s)}}}function Nc(l){let s,e,n,a=l[22]("routeEditor.retryableStatusCodes")+"",i,u,c,f,d,p,m,g=l[22]("routeEditor.retryableStatusCodesHelp")+"",b,k,w,C,E,y,T=l[22]("routeEditor.passiveHealthCheck")+"",M,R,j,P,I,q,D,A,N=l[22]("routeEditor.passiveHealthCheckTooltip")+"",Z,Q,x,z,K,S,B=l[22]("routeEditor.consecutiveFailuresThreshold")+"",U,F,J,ie,ue,ne,$=l[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",te,ae,ee,G,pe,oe=l[22]("routeEditor.healthyThreshold")+"",ge,he,ye,ze,Pe,we,Fe=l[22]("routeEditor.healthyThresholdHelp")+"",Je,je,Le,Se,fe,_e=l[22]("routeEditor.requestTimeoutMs")+"",Ie,De,se,ke,me,Ee,Ve=l[22]("routeEditor.requestTimeoutMsHelp")+"",Be,nt,Ne,Qe,Ye,ve=l[22]("routeEditor.connectTimeoutMs")+"",de,Te,Ze,Me,Ue,Ce,mt=l[22]("routeEditor.connectTimeoutMsHelp")+"",Ge,ce,qe,Re,dt,We=l[22]("routeEditor.recoveryIntervalMs")+"",O,He,X,ft,Ht,Ke,_t=l[22]("routeEditor.recoveryIntervalHelp")+"",tt,it,Oe,Xe,It,rt=l[22]("routeEditor.recoveryTimeoutMs")+"",gt,wt,pt,bl,at,St,ht=l[22]("routeEditor.recoveryTimeoutHelp")+"",Tt,vl,At,hl,ml,ql,Jt=l[22]("routeEditor.activeHealthCheck")+"",Yl,Yt,Qt,Hl,Bl,gl,sl,Ql,Ft=l[22]("routeEditor.activeHealthCheckTooltip")+"",Ll,Vl,Jl,Cl,zt,Zl,Lt,Pl=l[22]("routeEditor.enableActiveHealthCheck")+"",jl,$l,xt,kl,es,zl,Il,Wl=l[22]("routeEditor.slowStart")+"",Ls,ol,wl,nl,Ol,al,_l,tl,Dl=l[22]("routeEditor.slowStartTooltip")+"",Nl,El,Wt,Bt,Pt,$t,el,Kt=l[22]("routeEditor.enableSlowStart")+"",Zt,rl,Xt,$e,Al,ts,Xl,xl,ls=l[22]("routeEditor.failoverInfoNotice")+"",Ds,ss,Os,il=l[11]&&Uc(l),Ot=l[19]&&Vc(l);return{c(){s=r("div"),e=r("label"),n=r("span"),i=_(a),u=h(),c=r("input"),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("div"),C=r("input"),E=h(),y=r("div"),M=_(T),R=h(),j=r("div"),P=r("div"),I=re("svg"),q=re("path"),D=h(),A=r("span"),Z=_(N),Q=h(),x=r("div"),z=r("div"),K=r("label"),S=r("span"),U=_(B),F=h(),J=r("input"),ie=h(),ue=r("div"),ne=r("span"),te=_($),ae=h(),ee=r("div"),G=r("label"),pe=r("span"),ge=_(oe),he=h(),ye=r("input"),ze=h(),Pe=r("div"),we=r("span"),Je=_(Fe),je=h(),Le=r("div"),Se=r("label"),fe=r("span"),Ie=_(_e),De=h(),se=r("input"),ke=h(),me=r("div"),Ee=r("span"),Be=_(Ve),nt=h(),Ne=r("div"),Qe=r("label"),Ye=r("span"),de=_(ve),Te=h(),Ze=r("input"),Me=h(),Ue=r("div"),Ce=r("span"),Ge=_(mt),ce=h(),qe=r("div"),Re=r("label"),dt=r("span"),O=_(We),He=h(),X=r("input"),ft=h(),Ht=r("div"),Ke=r("span"),tt=_(_t),it=h(),Oe=r("div"),Xe=r("label"),It=r("span"),gt=_(rt),wt=h(),pt=r("input"),bl=h(),at=r("div"),St=r("span"),Tt=_(ht),vl=h(),At=r("div"),hl=r("input"),ml=h(),ql=r("div"),Yl=_(Jt),Yt=h(),Qt=r("div"),Hl=r("div"),Bl=re("svg"),gl=re("path"),sl=h(),Ql=r("span"),Ll=_(Ft),Vl=h(),Jl=r("div"),Cl=r("label"),zt=r("input"),Zl=h(),Lt=r("span"),jl=_(Pl),$l=h(),il&&il.c(),xt=h(),kl=r("div"),es=r("input"),zl=h(),Il=r("div"),Ls=_(Wl),ol=h(),wl=r("div"),nl=r("div"),Ol=re("svg"),al=re("path"),_l=h(),tl=r("span"),Nl=_(Dl),El=h(),Wt=r("div"),Bt=r("label"),Pt=r("input"),$t=h(),el=r("span"),Zt=_(Kt),rl=h(),Ot&&Ot.c(),Xt=h(),$e=r("div"),Al=re("svg"),ts=re("path"),Xl=h(),xl=r("div"),Ds=_(ls),o(n,"class","label-text"),o(e,"class","label"),o(e,"for","failover-status-codes"),o(c,"id","failover-status-codes"),o(c,"type","text"),o(c,"placeholder",f=l[22]("routeEditor.retryableStatusCodesPlaceholder")),o(c,"class","input input-bordered input-sm"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(s,"class","form-control"),o(C,"type","checkbox"),o(y,"class","collapse-title text-sm font-medium"),o(q,"stroke-linecap","round"),o(q,"stroke-linejoin","round"),o(q,"stroke-width","2"),o(q,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(I,"xmlns","http://www.w3.org/2000/svg"),o(I,"fill","none"),o(I,"viewBox","0 0 24 24"),o(I,"class","stroke-current shrink-0 w-4 h-4"),o(P,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(S,"class","label-text"),o(K,"class","label"),o(K,"for","consecutive-failures-threshold"),o(J,"id","consecutive-failures-threshold"),o(J,"type","number"),o(J,"placeholder","3"),o(J,"class","input input-bordered input-sm"),o(J,"min","1"),o(ne,"class","label-text-alt text-xs"),o(ue,"class","label"),o(z,"class","form-control"),o(pe,"class","label-text"),o(G,"class","label"),o(G,"for","healthy-threshold"),o(ye,"id","healthy-threshold"),o(ye,"type","number"),o(ye,"placeholder","2"),o(ye,"class","input input-bordered input-sm"),o(ye,"min","1"),o(we,"class","label-text-alt text-xs"),o(Pe,"class","label"),o(ee,"class","form-control"),o(fe,"class","label-text"),o(Se,"class","label"),o(Se,"for","request-timeout-ms"),o(se,"id","request-timeout-ms"),o(se,"type","number"),o(se,"placeholder","30000"),o(se,"class","input input-bordered input-sm"),o(se,"min","100"),o(Ee,"class","label-text-alt text-xs"),o(me,"class","label"),o(Le,"class","form-control"),o(Ye,"class","label-text"),o(Qe,"class","label"),o(Qe,"for","connect-timeout-ms"),o(Ze,"id","connect-timeout-ms"),o(Ze,"type","number"),o(Ze,"placeholder","5000"),o(Ze,"class","input input-bordered input-sm"),o(Ze,"min","100"),o(Ce,"class","label-text-alt text-xs"),o(Ue,"class","label"),o(Ne,"class","form-control"),o(dt,"class","label-text"),o(Re,"class","label"),o(Re,"for","recovery-interval-ms"),o(X,"id","recovery-interval-ms"),o(X,"type","number"),o(X,"placeholder","5000"),o(X,"class","input input-bordered input-sm"),o(X,"min","1000"),o(Ke,"class","label-text-alt text-xs"),o(Ht,"class","label"),o(qe,"class","form-control"),o(It,"class","label-text"),o(Xe,"class","label"),o(Xe,"for","recovery-timeout-ms"),o(pt,"id","recovery-timeout-ms"),o(pt,"type","number"),o(pt,"placeholder","3000"),o(pt,"class","input input-bordered input-sm"),o(pt,"min","100"),o(St,"class","label-text-alt text-xs"),o(at,"class","label"),o(Oe,"class","form-control"),o(x,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(j,"class","collapse-content space-y-4"),o(w,"class","collapse collapse-arrow bg-base-200"),o(hl,"type","checkbox"),o(ql,"class","collapse-title text-sm font-medium"),o(gl,"stroke-linecap","round"),o(gl,"stroke-linejoin","round"),o(gl,"stroke-width","2"),o(gl,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Bl,"xmlns","http://www.w3.org/2000/svg"),o(Bl,"fill","none"),o(Bl,"viewBox","0 0 24 24"),o(Bl,"class","stroke-current shrink-0 w-4 h-4"),o(Hl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(zt,"type","checkbox"),o(zt,"class","checkbox checkbox-sm"),o(Lt,"class","label-text"),o(Cl,"class","label cursor-pointer justify-start gap-4"),o(Jl,"class","form-control"),o(Qt,"class","collapse-content space-y-4"),o(At,"class","collapse collapse-arrow bg-base-200"),o(es,"type","checkbox"),o(Il,"class","collapse-title text-sm font-medium"),o(al,"stroke-linecap","round"),o(al,"stroke-linejoin","round"),o(al,"stroke-width","2"),o(al,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Ol,"xmlns","http://www.w3.org/2000/svg"),o(Ol,"fill","none"),o(Ol,"viewBox","0 0 24 24"),o(Ol,"class","stroke-current shrink-0 w-4 h-4"),o(nl,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),o(Pt,"type","checkbox"),o(Pt,"class","checkbox checkbox-sm"),o(el,"class","label-text"),o(Bt,"class","label cursor-pointer justify-start gap-4"),o(Wt,"class","form-control"),o(wl,"class","collapse-content space-y-4"),o(kl,"class","collapse collapse-arrow bg-base-200"),o(ts,"stroke-linecap","round"),o(ts,"stroke-linejoin","round"),o(ts,"stroke-width","2"),o(ts,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(Al,"xmlns","http://www.w3.org/2000/svg"),o(Al,"fill","none"),o(Al,"viewBox","0 0 24 24"),o(Al,"class","stroke-current shrink-0 w-4 h-4"),o($e,"class","alert alert-info shadow-sm text-xs")},m(lt,ct){L(lt,s,ct),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[4]),t(s,d),t(s,p),t(p,m),t(m,b),L(lt,k,ct),L(lt,w,ct),t(w,C),t(w,E),t(w,y),t(y,M),t(w,R),t(w,j),t(j,P),t(P,I),t(I,q),t(P,D),t(P,A),t(A,Z),t(j,Q),t(j,x),t(x,z),t(z,K),t(K,S),t(S,U),t(z,F),t(z,J),Y(J,l[5]),t(z,ie),t(z,ue),t(ue,ne),t(ne,te),t(x,ae),t(x,ee),t(ee,G),t(G,pe),t(pe,ge),t(ee,he),t(ee,ye),Y(ye,l[6]),t(ee,ze),t(ee,Pe),t(Pe,we),t(we,Je),t(x,je),t(x,Le),t(Le,Se),t(Se,fe),t(fe,Ie),t(Le,De),t(Le,se),Y(se,l[7]),t(Le,ke),t(Le,me),t(me,Ee),t(Ee,Be),t(x,nt),t(x,Ne),t(Ne,Qe),t(Qe,Ye),t(Ye,de),t(Ne,Te),t(Ne,Ze),Y(Ze,l[8]),t(Ne,Me),t(Ne,Ue),t(Ue,Ce),t(Ce,Ge),t(x,ce),t(x,qe),t(qe,Re),t(Re,dt),t(dt,O),t(qe,He),t(qe,X),Y(X,l[9]),t(qe,ft),t(qe,Ht),t(Ht,Ke),t(Ke,tt),t(x,it),t(x,Oe),t(Oe,Xe),t(Xe,It),t(It,gt),t(Oe,wt),t(Oe,pt),Y(pt,l[10]),t(Oe,bl),t(Oe,at),t(at,St),t(St,Tt),L(lt,vl,ct),L(lt,At,ct),t(At,hl),t(At,ml),t(At,ql),t(ql,Yl),t(At,Yt),t(At,Qt),t(Qt,Hl),t(Hl,Bl),t(Bl,gl),t(Hl,sl),t(Hl,Ql),t(Ql,Ll),t(Qt,Vl),t(Qt,Jl),t(Jl,Cl),t(Cl,zt),zt.checked=l[11],t(Cl,Zl),t(Cl,Lt),t(Lt,jl),t(Qt,$l),il&&il.m(Qt,null),L(lt,xt,ct),L(lt,kl,ct),t(kl,es),t(kl,zl),t(kl,Il),t(Il,Ls),t(kl,ol),t(kl,wl),t(wl,nl),t(nl,Ol),t(Ol,al),t(nl,_l),t(nl,tl),t(tl,Nl),t(wl,El),t(wl,Wt),t(Wt,Bt),t(Bt,Pt),Pt.checked=l[19],t(Bt,$t),t(Bt,el),t(el,Zt),t(wl,rl),Ot&&Ot.m(wl,null),L(lt,Xt,ct),L(lt,$e,ct),t($e,Al),t(Al,ts),t($e,Xl),t($e,xl),t(xl,Ds),ss||(Os=[V(c,"input",l[28]),V(J,"input",l[29]),V(ye,"input",l[30]),V(se,"input",l[31]),V(Ze,"input",l[32]),V(X,"input",l[33]),V(pt,"input",l[34]),V(zt,"change",l[35]),V(Pt,"change",l[43])],ss=!0)},p(lt,ct){ct[0]&4194304&&a!==(a=lt[22]("routeEditor.retryableStatusCodes")+"")&&v(i,a),ct[0]&4194304&&f!==(f=lt[22]("routeEditor.retryableStatusCodesPlaceholder"))&&o(c,"placeholder",f),ct[0]&16&&c.value!==lt[4]&&Y(c,lt[4]),ct[0]&4194304&&g!==(g=lt[22]("routeEditor.retryableStatusCodesHelp")+"")&&v(b,g),ct[0]&4194304&&T!==(T=lt[22]("routeEditor.passiveHealthCheck")+"")&&v(M,T),ct[0]&4194304&&N!==(N=lt[22]("routeEditor.passiveHealthCheckTooltip")+"")&&v(Z,N),ct[0]&4194304&&B!==(B=lt[22]("routeEditor.consecutiveFailuresThreshold")+"")&&v(U,B),ct[0]&32&&Mt(J.value)!==lt[5]&&Y(J,lt[5]),ct[0]&4194304&&$!==($=lt[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&v(te,$),ct[0]&4194304&&oe!==(oe=lt[22]("routeEditor.healthyThreshold")+"")&&v(ge,oe),ct[0]&64&&Mt(ye.value)!==lt[6]&&Y(ye,lt[6]),ct[0]&4194304&&Fe!==(Fe=lt[22]("routeEditor.healthyThresholdHelp")+"")&&v(Je,Fe),ct[0]&4194304&&_e!==(_e=lt[22]("routeEditor.requestTimeoutMs")+"")&&v(Ie,_e),ct[0]&128&&Mt(se.value)!==lt[7]&&Y(se,lt[7]),ct[0]&4194304&&Ve!==(Ve=lt[22]("routeEditor.requestTimeoutMsHelp")+"")&&v(Be,Ve),ct[0]&4194304&&ve!==(ve=lt[22]("routeEditor.connectTimeoutMs")+"")&&v(de,ve),ct[0]&256&&Mt(Ze.value)!==lt[8]&&Y(Ze,lt[8]),ct[0]&4194304&&mt!==(mt=lt[22]("routeEditor.connectTimeoutMsHelp")+"")&&v(Ge,mt),ct[0]&4194304&&We!==(We=lt[22]("routeEditor.recoveryIntervalMs")+"")&&v(O,We),ct[0]&512&&Mt(X.value)!==lt[9]&&Y(X,lt[9]),ct[0]&4194304&&_t!==(_t=lt[22]("routeEditor.recoveryIntervalHelp")+"")&&v(tt,_t),ct[0]&4194304&&rt!==(rt=lt[22]("routeEditor.recoveryTimeoutMs")+"")&&v(gt,rt),ct[0]&1024&&Mt(pt.value)!==lt[10]&&Y(pt,lt[10]),ct[0]&4194304&&ht!==(ht=lt[22]("routeEditor.recoveryTimeoutHelp")+"")&&v(Tt,ht),ct[0]&4194304&&Jt!==(Jt=lt[22]("routeEditor.activeHealthCheck")+"")&&v(Yl,Jt),ct[0]&4194304&&Ft!==(Ft=lt[22]("routeEditor.activeHealthCheckTooltip")+"")&&v(Ll,Ft),ct[0]&2048&&(zt.checked=lt[11]),ct[0]&4194304&&Pl!==(Pl=lt[22]("routeEditor.enableActiveHealthCheck")+"")&&v(jl,Pl),lt[11]?il?il.p(lt,ct):(il=Uc(lt),il.c(),il.m(Qt,null)):il&&(il.d(1),il=null),ct[0]&4194304&&Wl!==(Wl=lt[22]("routeEditor.slowStart")+"")&&v(Ls,Wl),ct[0]&4194304&&Dl!==(Dl=lt[22]("routeEditor.slowStartTooltip")+"")&&v(Nl,Dl),ct[0]&524288&&(Pt.checked=lt[19]),ct[0]&4194304&&Kt!==(Kt=lt[22]("routeEditor.enableSlowStart")+"")&&v(Zt,Kt),lt[19]?Ot?Ot.p(lt,ct):(Ot=Vc(lt),Ot.c(),Ot.m(wl,null)):Ot&&(Ot.d(1),Ot=null),ct[0]&4194304&&ls!==(ls=lt[22]("routeEditor.failoverInfoNotice")+"")&&v(Ds,ls)},d(lt){lt&&(H(s),H(k),H(w),H(vl),H(At),H(xt),H(kl),H(Xt),H($e)),il&&il.d(),Ot&&Ot.d(),ss=!1,vt(Os)}}}function Uc(l){let s,e,n,a,i=l[22]("routeEditor.healthCheckIntervalMs")+"",u,c,f,d,p,m,g=l[22]("routeEditor.healthCheckIntervalMsHelp")+"",b,k,w,C,E,y=l[22]("routeEditor.healthCheckTimeoutMs")+"",T,M,R,j,P,I,q=l[22]("routeEditor.healthCheckTimeoutMsHelp")+"",D,A,N,Z,Q,x=l[22]("routeEditor.healthCheckPath")+"",z,K,S,B,U,F,J=l[22]("routeEditor.healthCheckPathHelp")+"",ie,ue,ne,$,te,ae=l[22]("routeEditor.healthCheckMethod")+"",ee,G,pe,oe,ge,he,ye,ze,Pe,we,Fe,Je=l[22]("routeEditor.healthCheckExpectedStatus")+"",je,Le,Se,fe,_e,Ie,De=l[22]("routeEditor.healthCheckExpectedStatusHelp")+"",se,ke,me,Ee,Ve,Be=l[22]("routeEditor.healthCheckUnhealthyThreshold")+"",nt,Ne,Qe,Ye,ve,de,Te=l[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Ze,Me,Ue,Ce,mt,Ge=l[22]("routeEditor.healthCheckHealthyThreshold")+"",ce,qe,Re,dt,We,O,He=l[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",X,ft,Ht;return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("input"),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("div"),C=r("label"),E=r("span"),T=_(y),M=h(),R=r("input"),j=h(),P=r("div"),I=r("span"),D=_(q),A=h(),N=r("div"),Z=r("label"),Q=r("span"),z=_(x),K=h(),S=r("input"),B=h(),U=r("div"),F=r("span"),ie=_(J),ue=h(),ne=r("div"),$=r("label"),te=r("span"),ee=_(ae),G=h(),pe=r("select"),oe=r("option"),oe.textContent="GET (default)",ge=r("option"),ge.textContent="GET",he=r("option"),he.textContent="POST",ye=r("option"),ye.textContent="HEAD",ze=h(),Pe=r("div"),we=r("label"),Fe=r("span"),je=_(Je),Le=h(),Se=r("input"),fe=h(),_e=r("div"),Ie=r("span"),se=_(De),ke=h(),me=r("div"),Ee=r("label"),Ve=r("span"),nt=_(Be),Ne=h(),Qe=r("input"),Ye=h(),ve=r("div"),de=r("span"),Ze=_(Te),Me=h(),Ue=r("div"),Ce=r("label"),mt=r("span"),ce=_(Ge),qe=h(),Re=r("input"),dt=h(),We=r("div"),O=r("span"),X=_(He),o(a,"class","label-text"),o(n,"class","label"),o(n,"for","health-check-interval-ms"),o(f,"id","health-check-interval-ms"),o(f,"type","number"),o(f,"placeholder","10000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","health-check-timeout-ms"),o(R,"id","health-check-timeout-ms"),o(R,"type","number"),o(R,"placeholder","3000"),o(R,"class","input input-bordered input-sm"),o(R,"min","100"),o(I,"class","label-text-alt text-xs"),o(P,"class","label"),o(w,"class","form-control"),o(Q,"class","label-text"),o(Z,"class","label"),o(Z,"for","health-check-path"),o(S,"id","health-check-path"),o(S,"type","text"),o(S,"placeholder","/health"),o(S,"class","input input-bordered input-sm"),o(F,"class","label-text-alt text-xs"),o(U,"class","label"),o(N,"class","form-control"),o(te,"class","label-text"),o($,"class","label"),o($,"for","health-check-method"),oe.__value="",Y(oe,oe.__value),ge.__value="GET",Y(ge,ge.__value),he.__value="POST",Y(he,he.__value),ye.__value="HEAD",Y(ye,ye.__value),o(pe,"id","health-check-method"),o(pe,"class","select select-bordered select-sm"),l[15]===void 0&&pl(()=>l[39].call(pe)),o(ne,"class","form-control"),o(Fe,"class","label-text"),o(we,"class","label"),o(we,"for","health-check-expected-status"),o(Se,"id","health-check-expected-status"),o(Se,"type","text"),o(Se,"placeholder","200"),o(Se,"class","input input-bordered input-sm"),o(Ie,"class","label-text-alt text-xs"),o(_e,"class","label"),o(Pe,"class","form-control"),o(Ve,"class","label-text"),o(Ee,"class","label"),o(Ee,"for","health-check-unhealthy-threshold"),o(Qe,"id","health-check-unhealthy-threshold"),o(Qe,"type","number"),o(Qe,"placeholder","3"),o(Qe,"class","input input-bordered input-sm"),o(Qe,"min","1"),o(de,"class","label-text-alt text-xs"),o(ve,"class","label"),o(me,"class","form-control"),o(mt,"class","label-text"),o(Ce,"class","label"),o(Ce,"for","health-check-healthy-threshold"),o(Re,"id","health-check-healthy-threshold"),o(Re,"type","number"),o(Re,"placeholder","2"),o(Re,"class","input input-bordered input-sm"),o(Re,"min","1"),o(O,"class","label-text-alt text-xs"),o(We,"class","label"),o(Ue,"class","form-control"),o(s,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Ke,_t){L(Ke,s,_t),t(s,e),t(e,n),t(n,a),t(a,u),t(e,c),t(e,f),Y(f,l[12]),t(e,d),t(e,p),t(p,m),t(m,b),t(s,k),t(s,w),t(w,C),t(C,E),t(E,T),t(w,M),t(w,R),Y(R,l[13]),t(w,j),t(w,P),t(P,I),t(I,D),t(s,A),t(s,N),t(N,Z),t(Z,Q),t(Q,z),t(N,K),t(N,S),Y(S,l[14]),t(N,B),t(N,U),t(U,F),t(F,ie),t(s,ue),t(s,ne),t(ne,$),t($,te),t(te,ee),t(ne,G),t(ne,pe),t(pe,oe),t(pe,ge),t(pe,he),t(pe,ye),kt(pe,l[15],!0),t(s,ze),t(s,Pe),t(Pe,we),t(we,Fe),t(Fe,je),t(Pe,Le),t(Pe,Se),Y(Se,l[16]),t(Pe,fe),t(Pe,_e),t(_e,Ie),t(Ie,se),t(s,ke),t(s,me),t(me,Ee),t(Ee,Ve),t(Ve,nt),t(me,Ne),t(me,Qe),Y(Qe,l[17]),t(me,Ye),t(me,ve),t(ve,de),t(de,Ze),t(s,Me),t(s,Ue),t(Ue,Ce),t(Ce,mt),t(mt,ce),t(Ue,qe),t(Ue,Re),Y(Re,l[18]),t(Ue,dt),t(Ue,We),t(We,O),t(O,X),ft||(Ht=[V(f,"input",l[36]),V(R,"input",l[37]),V(S,"input",l[38]),V(pe,"change",l[39]),V(Se,"input",l[40]),V(Qe,"input",l[41]),V(Re,"input",l[42])],ft=!0)},p(Ke,_t){_t[0]&4194304&&i!==(i=Ke[22]("routeEditor.healthCheckIntervalMs")+"")&&v(u,i),_t[0]&4096&&Mt(f.value)!==Ke[12]&&Y(f,Ke[12]),_t[0]&4194304&&g!==(g=Ke[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&v(b,g),_t[0]&4194304&&y!==(y=Ke[22]("routeEditor.healthCheckTimeoutMs")+"")&&v(T,y),_t[0]&8192&&Mt(R.value)!==Ke[13]&&Y(R,Ke[13]),_t[0]&4194304&&q!==(q=Ke[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&v(D,q),_t[0]&4194304&&x!==(x=Ke[22]("routeEditor.healthCheckPath")+"")&&v(z,x),_t[0]&16384&&S.value!==Ke[14]&&Y(S,Ke[14]),_t[0]&4194304&&J!==(J=Ke[22]("routeEditor.healthCheckPathHelp")+"")&&v(ie,J),_t[0]&4194304&&ae!==(ae=Ke[22]("routeEditor.healthCheckMethod")+"")&&v(ee,ae),_t[0]&32768&&kt(pe,Ke[15]),_t[0]&4194304&&Je!==(Je=Ke[22]("routeEditor.healthCheckExpectedStatus")+"")&&v(je,Je),_t[0]&65536&&Se.value!==Ke[16]&&Y(Se,Ke[16]),_t[0]&4194304&&De!==(De=Ke[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&v(se,De),_t[0]&4194304&&Be!==(Be=Ke[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&v(nt,Be),_t[0]&131072&&Mt(Qe.value)!==Ke[17]&&Y(Qe,Ke[17]),_t[0]&4194304&&Te!==(Te=Ke[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&v(Ze,Te),_t[0]&4194304&&Ge!==(Ge=Ke[22]("routeEditor.healthCheckHealthyThreshold")+"")&&v(ce,Ge),_t[0]&262144&&Mt(Re.value)!==Ke[18]&&Y(Re,Ke[18]),_t[0]&4194304&&He!==(He=Ke[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&v(X,He)},d(Ke){Ke&&H(s),ft=!1,vt(Ht)}}}function Vc(l){let s,e,n,a,i=l[22]("routeEditor.slowStartDurationMs")+"",u,c,f,d,p,m,g=l[22]("routeEditor.slowStartDurationMsHelp")+"",b,k,w,C,E,y=l[22]("routeEditor.slowStartInitialWeightFactor")+"",T,M,R,j,P,I,q=l[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",D,A,N;return{c(){s=r("div"),e=r("div"),n=r("label"),a=r("span"),u=_(i),c=h(),f=r("input"),d=h(),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("div"),C=r("label"),E=r("span"),T=_(y),M=h(),R=r("input"),j=h(),P=r("div"),I=r("span"),D=_(q),o(a,"class","label-text"),o(n,"class","label"),o(n,"for","slow-start-duration-ms"),o(f,"id","slow-start-duration-ms"),o(f,"type","number"),o(f,"placeholder","30000"),o(f,"class","input input-bordered input-sm"),o(f,"min","1000"),o(m,"class","label-text-alt text-xs"),o(p,"class","label"),o(e,"class","form-control"),o(E,"class","label-text"),o(C,"class","label"),o(C,"for","slow-start-initial-weight-factor"),o(R,"id","slow-start-initial-weight-factor"),o(R,"type","number"),o(R,"placeholder","0.1"),o(R,"class","input input-bordered input-sm"),o(R,"min","0.01"),o(R,"max","1"),o(R,"step","0.01"),o(I,"class","label-text-alt text-xs"),o(P,"class","label"),o(w,"class","form-control"),o(s,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Z,Q){L(Z,s,Q),t(s,e),t(e,n),t(n,a),t(a,u),t(e,c),t(e,f),Y(f,l[20]),t(e,d),t(e,p),t(p,m),t(m,b),t(s,k),t(s,w),t(w,C),t(C,E),t(E,T),t(w,M),t(w,R),Y(R,l[21]),t(w,j),t(w,P),t(P,I),t(I,D),A||(N=[V(f,"input",l[44]),V(R,"input",l[45])],A=!0)},p(Z,Q){Q[0]&4194304&&i!==(i=Z[22]("routeEditor.slowStartDurationMs")+"")&&v(u,i),Q[0]&1048576&&Mt(f.value)!==Z[20]&&Y(f,Z[20]),Q[0]&4194304&&g!==(g=Z[22]("routeEditor.slowStartDurationMsHelp")+"")&&v(b,g),Q[0]&4194304&&y!==(y=Z[22]("routeEditor.slowStartInitialWeightFactor")+"")&&v(T,y),Q[0]&2097152&&Mt(R.value)!==Z[21]&&Y(R,Z[21]),Q[0]&4194304&&q!==(q=Z[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&v(D,q)},d(Z){Z&&H(s),A=!1,vt(N)}}}function dm(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=l[22]("routeEditor.enableFailover")+"",k,w,C,E,y=l[1]&&Oc(l),T=l[2]&&Nc(l);return{c(){s=r("div"),e=r("div"),n=r("span"),a=_(l[0]),i=h(),y&&y.c(),u=h(),c=r("div"),f=r("div"),d=r("label"),p=r("input"),m=h(),g=r("span"),k=_(b),w=h(),T&&T.c(),o(n,"class","label-text font-semibold"),o(e,"class","label"),o(p,"type","checkbox"),o(p,"class","checkbox"),o(g,"class","label-text"),o(d,"class","label cursor-pointer justify-start gap-4"),o(f,"class","form-control"),o(c,"class","space-y-4"),o(s,"class","form-control w-full")},m(M,R){L(M,s,R),t(s,e),t(e,n),t(n,a),t(e,i),y&&y.m(e,null),t(s,u),t(s,c),t(c,f),t(f,d),t(d,p),p.checked=l[2],t(d,m),t(d,g),t(g,k),t(c,w),T&&T.m(c,null),C||(E=[V(p,"change",l[26]),V(p,"change",l[27])],C=!0)},p(M,R){R[0]&1&&v(a,M[0]),M[1]?y?y.p(M,R):(y=Oc(M),y.c(),y.m(e,null)):y&&(y.d(1),y=null),R[0]&4&&(p.checked=M[2]),R[0]&4194304&&b!==(b=M[22]("routeEditor.enableFailover")+"")&&v(k,b),M[2]?T?T.p(M,R):(T=Nc(M),T.c(),T.m(c,null)):T&&(T.d(1),T=null)},i:ot,o:ot,d(M){M&&H(s),y&&y.d(),T&&T.d(),C=!1,vt(E)}}}function Jc(l){return l.split(",").map(s=>parseInt(s.trim())).filter(s=>!isNaN(s)&&s>=100&&s<600)}function pm(l,s,e){let n;Dt(l,Rt,ge=>e(22,n=ge));let{value:a=void 0}=s,{label:i="Failover"}=s,{showHelp:u=!0}=s,c=!1,f=!1,d=[],p="",m,g,b,k,w,C,E=!1,y,T,M,R,j=[],P="",I,q,D=!1,A,N;function Z(){c=this.checked,e(2,c),e(3,f),e(23,a),e(24,d),e(25,j),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}const Q=()=>{e(3,f=!0)};function x(){p=this.value,e(4,p),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(16,P)}function z(){m=Mt(this.value),e(5,m),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function K(){g=Mt(this.value),e(6,g),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function S(){b=Mt(this.value),e(7,b),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function B(){k=Mt(this.value),e(8,k),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function U(){w=Mt(this.value),e(9,w),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function F(){C=Mt(this.value),e(10,C),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function J(){E=this.checked,e(11,E),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ie(){y=Mt(this.value),e(12,y),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ue(){T=Mt(this.value),e(13,T),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ne(){M=this.value,e(14,M),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function $(){R=dl(this),e(15,R),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function te(){P=this.value,e(16,P),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p)}function ae(){I=Mt(this.value),e(17,I),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(18,q),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function ee(){q=Mt(this.value),e(18,q),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(19,D),e(20,A),e(21,N),e(4,p),e(16,P)}function G(){D=this.checked,e(19,D),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(20,A),e(21,N),e(4,p),e(16,P)}function pe(){A=Mt(this.value),e(20,A),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(21,N),e(4,p),e(16,P)}function oe(){N=Mt(this.value),e(21,N),e(3,f),e(23,a),e(24,d),e(25,j),e(2,c),e(5,m),e(6,g),e(7,b),e(8,k),e(9,w),e(10,C),e(11,E),e(12,y),e(13,T),e(14,M),e(15,R),e(17,I),e(18,q),e(19,D),e(20,A),e(4,p),e(16,P)}return l.$$set=ge=>{"value"in ge&&e(23,a=ge.value),"label"in ge&&e(0,i=ge.label),"showHelp"in ge&&e(1,u=ge.showHelp)},l.$$.update=()=>{l.$$.dirty[0]&62849004&&(!f&&a&&(e(2,c=a.enabled||!1),e(24,d=a.retryableStatusCodes||[500,502,503,504]),e(4,p=d.join(", ")),e(5,m=a.consecutiveFailuresThreshold),e(6,g=a.healthyThreshold),e(7,b=a.requestTimeoutMs),e(8,k=a.connectTimeoutMs),e(9,w=a.recoveryIntervalMs),e(10,C=a.recoveryTimeoutMs),a.healthCheck&&(e(11,E=a.healthCheck.enabled||!1),e(12,y=a.healthCheck.intervalMs),e(13,T=a.healthCheck.timeoutMs),e(14,M=a.healthCheck.path),e(15,R=a.healthCheck.method),e(25,j=a.healthCheck.expectedStatus||[200]),e(16,P=j.join(", ")),e(17,I=a.healthCheck.unhealthyThreshold),e(18,q=a.healthCheck.healthyThreshold)),a.slowStart&&(e(19,D=a.slowStart.enabled||!1),e(20,A=a.slowStart.durationMs),e(21,N=a.slowStart.initialWeightFactor)),e(3,f=!0)),c?a?(e(23,a.enabled=!0,a),e(23,a.retryableStatusCodes=d.length>0?d:[500,502,503,504],a),m!==void 0&&e(23,a.consecutiveFailuresThreshold=m,a),g!==void 0&&e(23,a.healthyThreshold=g,a),b!==void 0&&e(23,a.requestTimeoutMs=b,a),k!==void 0&&e(23,a.connectTimeoutMs=k,a),w!==void 0&&e(23,a.recoveryIntervalMs=w,a),C!==void 0&&e(23,a.recoveryTimeoutMs=C,a),E?e(23,a.healthCheck={enabled:!0,intervalMs:y,timeoutMs:T,path:M,method:R,expectedStatus:j.length>0?j:[200],unhealthyThreshold:I,healthyThreshold:q},a):e(23,a.healthCheck=void 0,a),D?e(23,a.slowStart={enabled:!0,durationMs:A,initialWeightFactor:N},a):e(23,a.slowStart=void 0,a)):e(23,a={enabled:!0,retryableStatusCodes:d.length>0?d:[500,502,503,504]}):e(23,a=void 0)),l.$$.dirty[0]&16&&e(24,d=Jc(p)),l.$$.dirty[0]&65536&&e(25,j=Jc(P))},[i,u,c,f,p,m,g,b,k,w,C,E,y,T,M,R,P,I,q,D,A,N,n,a,d,j,Z,Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe]}class hm extends Nt{constructor(s){super(),Ut(this,s,pm,dm,Vt,{value:23,label:0,showHelp:1},null,[-1,-1])}}function mm(l){let s,e,n,a=l[1]("routeEditor.failoverTitle")+"",i,u,c,f=l[1]("routeEditor.failoverHelp")+"",d,p,m,g,b;function k(C){l[2](C)}let w={label:l[1]("routeEditor.failoverTitle"),showHelp:!0,showLabel:!1};return l[0].failover!==void 0&&(w.value=l[0].failover),m=new hm({props:w}),Sl.push(()=>Ml(m,"value",k)),{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),Et(m.$$.fragment),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(s,"class","space-y-4")},m(C,E){L(C,s,E),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),Ct(m,s,null),b=!0},p(C,[E]){(!b||E&2)&&a!==(a=C[1]("routeEditor.failoverTitle")+"")&&v(i,a),(!b||E&2)&&f!==(f=C[1]("routeEditor.failoverHelp")+"")&&v(d,f);const y={};E&2&&(y.label=C[1]("routeEditor.failoverTitle")),!g&&E&1&&(g=!0,y.value=C[0].failover,Rl(()=>g=!1)),m.$set(y)},i(C){b||(et(m.$$.fragment,C),b=!0)},o(C){st(m.$$.fragment,C),b=!1},d(C){C&&H(s),yt(m)}}}function gm(l,s,e){let n;Dt(l,Rt,u=>e(1,n=u));let{route:a}=s;function i(u){l.$$.not_equal(a.failover,u)&&(a.failover=u,e(0,a))}return l.$$set=u=>{"route"in u&&e(0,a=u.route)},[a,n,i]}class _m extends Nt{constructor(s){super(),Ut(this,s,gm,mm,Vt,{route:0})}}function Wc(l,s,e){const n=l.slice();return n[8]=s[e],n[10]=e,n}function Gc(l){let s;return{c(){s=r("span"),s.textContent="Transformer",o(s,"class","badge badge-xs badge-info ml-2")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Kc(l){let s,e,n=(l[8].priority||l[10]+1)+"",a,i,u,c,f=(l[8].target||l[4]("routeEditor.notSet"))+"",d,p,m,g,b=l[4]("upstream.weight")+"",k,w,C=(l[8].weight||100)+"",E,y,T,M=l[8].plugins&&l[8].plugins.length>0&&Gc();return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),c=r("div"),d=_(f),m=h(),g=r("div"),k=_(b),w=_(": "),E=_(C),y=h(),M&&M.c(),T=h(),o(e,"class","badge badge-primary"),o(c,"class","font-medium text-sm truncate"),o(c,"title",p=l[8].target),o(g,"class","text-xs text-gray-500"),o(u,"class","flex-1"),o(s,"class","flex items-center gap-3 p-3 bg-base-100 rounded-lg")},m(R,j){L(R,s,j),t(s,e),t(e,a),t(s,i),t(s,u),t(u,c),t(c,d),t(u,m),t(u,g),t(g,k),t(g,w),t(g,E),t(g,y),M&&M.m(g,null),t(s,T)},p(R,j){j&1&&n!==(n=(R[8].priority||R[10]+1)+"")&&v(a,n),j&17&&f!==(f=(R[8].target||R[4]("routeEditor.notSet"))+"")&&v(d,f),j&1&&p!==(p=R[8].target)&&o(c,"title",p),j&16&&b!==(b=R[4]("upstream.weight")+"")&&v(k,b),j&1&&C!==(C=(R[8].weight||100)+"")&&v(E,C),R[8].plugins&&R[8].plugins.length>0?M||(M=Gc(),M.c(),M.m(g,null)):M&&(M.d(1),M=null)},d(R){R&&H(s),M&&M.d()}}}function Yc(l){let s,e,n,a,i,u,c,f,d,p,m=l[4]("common.copy")+"",g,b,k;return{c(){s=r("div"),e=r("pre"),n=r("code"),a=_(l[3]),i=h(),u=r("div"),c=r("button"),f=re("svg"),d=re("path"),p=h(),g=_(m),o(s,"class","mockup-code mt-4"),o(d,"stroke-linecap","round"),o(d,"stroke-linejoin","round"),o(d,"stroke-width","2"),o(d,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(f,"xmlns","http://www.w3.org/2000/svg"),o(f,"class","h-4 w-4"),o(f,"fill","none"),o(f,"viewBox","0 0 24 24"),o(f,"stroke","currentColor"),o(c,"type","button"),o(c,"class","btn btn-sm btn-outline"),o(u,"class","card-actions justify-end mt-4")},m(w,C){L(w,s,C),t(s,e),t(e,n),t(n,a),L(w,i,C),L(w,u,C),t(u,c),t(c,f),t(f,d),t(c,p),t(c,g),b||(k=V(c,"click",l[7]),b=!0)},p(w,C){C&8&&v(a,w[3]),C&16&&m!==(m=w[4]("common.copy")+"")&&v(g,m)},d(w){w&&(H(s),H(i),H(u)),b=!1,k()}}}function Qc(l){let s,e,n,a,i=l[4]("auth.routeAuth")+"",u;return{c(){s=r("div"),e=r("div"),e.textContent="\u2713",n=h(),a=r("div"),u=_(i),o(e,"class","badge badge-sm badge-success"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-3")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&16&&i!==(i=c[4]("auth.routeAuth")+"")&&v(u,i)},d(c){c&&H(s)}}}function Zc(l){let s,e,n,a,i=l[4]("routeEditor.pathRewrite")+"",u;return{c(){s=r("div"),e=r("div"),e.textContent="\u2192",n=h(),a=r("div"),u=_(i),o(e,"class","badge badge-sm badge-info"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-3")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.pathRewrite")+"")&&v(u,i)},d(c){c&&H(s)}}}function Xc(l){let s,e,n,a,i=l[4]("routeEditor.transformer")+"",u;return{c(){s=r("div"),e=r("div"),e.textContent="\u26A1",n=h(),a=r("div"),u=_(i),o(e,"class","badge badge-sm badge-warning"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-3")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f&16&&i!==(i=c[4]("routeEditor.transformer")+"")&&v(u,i)},d(c){c&&H(s)}}}function xc(l){let s,e=l[4]("routeEditor.failoverEnabled")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-success ml-1")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i&16&&e!==(e=a[4]("routeEditor.failoverEnabled")+"")&&v(n,e)},d(a){a&&H(s)}}}function bm(l){let s,e,n,a=l[4]("routeEditor.preview")+"",i,u,c,f=l[4]("routeEditor.previewHelp")+"",d,p,m,g,b,k=l[4]("routeEditor.upstreams")+"",w,C,E,y=l[2].upstreamsCount+"",T,M,R,j=l[4]("routeEditor.totalWeight")+"",P,I,q=l[2].totalWeight+"",D,A,N,Z,Q=l[4]("routeEditor.features")+"",x,z,K,S=[l[2].hasAuth,l[2].hasFailover,l[2].hasTransformer,l[2].hasPathRewrite].filter(Boolean).length+"",B,U,F,J=l[4]("routeEditor.featuresEnabled")+"",ie,ue,ne,$,te=l[4]("routes.path")+"",ae,ee,G,pe=(l[0].path||l[4]("routeEditor.notSet"))+"",oe,ge,he,ye,ze=l[4]("routeEditor.routePath")+"",Pe,we,Fe,Je,je,Le=l[4]("routeEditor.enabledFeatures")+"",Se,fe,_e,Ie,De,se=l[2].hasAuth?"\u2713":"\u25CB",ke,me,Ee,Ve,Be=l[4]("auth.routeAuth")+"",nt,Ne,Qe,Ye,ve=l[2].hasFailover?"\u2713":"\u25CB",de,Te,Ze,Me,Ue=l[4]("routeEditor.failoverTitle")+"",Ce,mt,Ge,ce,qe=l[2].hasTransformer?"\u2713":"\u25CB",Re,dt,We,O,He=l[4]("routeEditor.transformer")+"",X,ft,Ht,Ke,_t=l[2].hasPathRewrite?"\u2713":"\u25CB",tt,it,Oe,Xe,It=l[4]("routeEditor.pathRewrite")+"",rt,gt,wt,pt,bl,at=l[4]("routeEditor.upstreams")+"",St,ht,Tt,vl,At,hl,ml,ql,Jt=l[4]("routeEditor.jsonConfig")+"",Yl,Yt,Qt,Hl=(l[1]?l[4]("common.hide"):l[4]("common.show"))+"",Bl,gl,sl,Ql,Ft,Ll,Vl=l[4]("routeEditor.requestFlow")+"",Jl,Cl,zt,Zl,Lt,Pl,jl,$l,xt=l[4]("routeEditor.clientRequest")+"",kl,es,zl,Il=(l[0].path||"/")+"",Wl,Ls,ol,wl,nl,Ol,al,_l,tl,Dl,Nl,El=l[4]("routeEditor.selectUpstream")+"",Wt,Bt,Pt,$t=l[2].upstreamsCount+"",el,Kt,Zt=l[4]("routeEditor.upstreams")+"",rl,Xt,$e,Al,ts,Xl,xl,ls=l[4]("routeEditor.returnResponse")+"",Ds,ss,Os,il=ut(l[0].upstreams),Ot=[];for(let xe=0;xe<il.length;xe+=1)Ot[xe]=Kc(Wc(l,il,xe));let lt=l[1]&&Yc(l),ct=l[2].hasAuth&&Qc(l),ll=l[2].hasPathRewrite&&Zc(l),Tl=l[2].hasTransformer&&Xc(l),ul=l[2].hasFailover&&xc(l);return{c(){s=r("div"),e=r("div"),n=r("h3"),i=_(a),u=h(),c=r("p"),d=_(f),p=h(),m=r("div"),g=r("div"),b=r("div"),w=_(k),C=h(),E=r("div"),T=_(y),M=h(),R=r("div"),P=_(j),I=_(": "),D=_(q),A=h(),N=r("div"),Z=r("div"),x=_(Q),z=h(),K=r("div"),B=_(S),U=h(),F=r("div"),ie=_(J),ue=h(),ne=r("div"),$=r("div"),ae=_(te),ee=h(),G=r("div"),oe=_(pe),he=h(),ye=r("div"),Pe=_(ze),we=h(),Fe=r("div"),Je=r("div"),je=r("h4"),Se=_(Le),fe=h(),_e=r("div"),Ie=r("div"),De=r("div"),ke=_(se),Ee=h(),Ve=r("span"),nt=_(Be),Ne=h(),Qe=r("div"),Ye=r("div"),de=_(ve),Ze=h(),Me=r("span"),Ce=_(Ue),mt=h(),Ge=r("div"),ce=r("div"),Re=_(qe),We=h(),O=r("span"),X=_(He),ft=h(),Ht=r("div"),Ke=r("div"),tt=_(_t),Oe=h(),Xe=r("span"),rt=_(It),gt=h(),wt=r("div"),pt=r("div"),bl=r("h4"),St=_(at),ht=h(),Tt=r("div");for(let xe=0;xe<Ot.length;xe+=1)Ot[xe].c();vl=h(),At=r("div"),hl=r("div"),ml=r("div"),ql=r("h4"),Yl=_(Jt),Yt=h(),Qt=r("button"),Bl=_(Hl),gl=h(),lt&&lt.c(),sl=h(),Ql=r("div"),Ft=r("div"),Ll=r("h4"),Jl=_(Vl),Cl=h(),zt=r("div"),Zl=r("div"),Lt=r("div"),Lt.textContent="1",Pl=h(),jl=r("div"),$l=r("div"),kl=_(xt),es=h(),zl=r("div"),Wl=_(Il),Ls=h(),ol=r("div"),ct&&ct.c(),wl=h(),ll&&ll.c(),nl=h(),Tl&&Tl.c(),Ol=h(),al=r("div"),_l=r("div"),_l.textContent="2",tl=h(),Dl=r("div"),Nl=r("div"),Wt=_(El),Bt=h(),Pt=r("div"),el=_($t),Kt=h(),rl=_(Zt),Xt=h(),ul&&ul.c(),$e=h(),Al=r("div"),ts=r("div"),ts.textContent="3",Xl=h(),xl=r("div"),Ds=_(ls),o(n,"class","text-lg font-semibold"),o(c,"class","text-sm text-gray-500 mt-1"),o(b,"class","stat-title"),o(E,"class","stat-value text-primary"),o(R,"class","stat-desc"),o(g,"class","stat bg-base-200 rounded-lg"),o(Z,"class","stat-title"),o(K,"class","stat-value text-2xl"),o(F,"class","stat-desc"),o(N,"class","stat bg-base-200 rounded-lg"),o($,"class","stat-title"),o(G,"class","stat-value text-sm truncate"),o(G,"title",ge=l[0].path),o(ye,"class","stat-desc"),o(ne,"class","stat bg-base-200 rounded-lg"),o(m,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"),o(je,"class","card-title text-base"),o(De,"class",me=\`badge \${l[2].hasAuth?"badge-success":"badge-ghost"}\`),o(Ve,"class","text-sm"),o(Ie,"class","flex items-center gap-2"),o(Ye,"class",Te=\`badge \${l[2].hasFailover?"badge-success":"badge-ghost"}\`),o(Me,"class","text-sm"),o(Qe,"class","flex items-center gap-2"),o(ce,"class",dt=\`badge \${l[2].hasTransformer?"badge-success":"badge-ghost"}\`),o(O,"class","text-sm"),o(Ge,"class","flex items-center gap-2"),o(Ke,"class",it=\`badge \${l[2].hasPathRewrite?"badge-success":"badge-ghost"}\`),o(Xe,"class","text-sm"),o(Ht,"class","flex items-center gap-2"),o(_e,"class","space-y-2"),o(Je,"class","card-body"),o(Fe,"class","card bg-base-200"),o(bl,"class","card-title text-base"),o(Tt,"class","space-y-2"),o(pt,"class","card-body"),o(wt,"class","card bg-base-200"),o(ql,"class","card-title text-base"),o(Qt,"type","button"),o(Qt,"class","btn btn-sm btn-ghost"),o(ml,"class","flex justify-between items-center"),o(hl,"class","card-body"),o(At,"class","card bg-base-200"),o(Ll,"class","card-title text-base"),o(Lt,"class","badge badge-lg badge-neutral"),o($l,"class","font-medium"),o(zl,"class","text-xs text-gray-500"),o(jl,"class","flex-1"),o(Zl,"class","flex items-center gap-3"),o(_l,"class","badge badge-lg badge-primary"),o(Nl,"class","font-medium"),o(Pt,"class","text-xs text-gray-500"),o(Dl,"class","flex-1"),o(al,"class","flex items-center gap-3"),o(ts,"class","badge badge-lg badge-accent"),o(xl,"class","font-medium"),o(Al,"class","flex items-center gap-3"),o(ol,"class","ml-6 border-l-2 border-base-300 pl-4 space-y-3"),o(zt,"class","flex flex-col gap-3 mt-4"),o(Ft,"class","card-body"),o(Ql,"class","card bg-base-200"),o(s,"class","space-y-6")},m(xe,bt){L(xe,s,bt),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(s,p),t(s,m),t(m,g),t(g,b),t(b,w),t(g,C),t(g,E),t(E,T),t(g,M),t(g,R),t(R,P),t(R,I),t(R,D),t(m,A),t(m,N),t(N,Z),t(Z,x),t(N,z),t(N,K),t(K,B),t(N,U),t(N,F),t(F,ie),t(m,ue),t(m,ne),t(ne,$),t($,ae),t(ne,ee),t(ne,G),t(G,oe),t(ne,he),t(ne,ye),t(ye,Pe),t(s,we),t(s,Fe),t(Fe,Je),t(Je,je),t(je,Se),t(Je,fe),t(Je,_e),t(_e,Ie),t(Ie,De),t(De,ke),t(Ie,Ee),t(Ie,Ve),t(Ve,nt),t(_e,Ne),t(_e,Qe),t(Qe,Ye),t(Ye,de),t(Qe,Ze),t(Qe,Me),t(Me,Ce),t(_e,mt),t(_e,Ge),t(Ge,ce),t(ce,Re),t(Ge,We),t(Ge,O),t(O,X),t(_e,ft),t(_e,Ht),t(Ht,Ke),t(Ke,tt),t(Ht,Oe),t(Ht,Xe),t(Xe,rt),t(s,gt),t(s,wt),t(wt,pt),t(pt,bl),t(bl,St),t(pt,ht),t(pt,Tt);for(let fl=0;fl<Ot.length;fl+=1)Ot[fl]&&Ot[fl].m(Tt,null);t(s,vl),t(s,At),t(At,hl),t(hl,ml),t(ml,ql),t(ql,Yl),t(ml,Yt),t(ml,Qt),t(Qt,Bl),t(hl,gl),lt&&lt.m(hl,null),t(s,sl),t(s,Ql),t(Ql,Ft),t(Ft,Ll),t(Ll,Jl),t(Ft,Cl),t(Ft,zt),t(zt,Zl),t(Zl,Lt),t(Zl,Pl),t(Zl,jl),t(jl,$l),t($l,kl),t(jl,es),t(jl,zl),t(zl,Wl),t(zt,Ls),t(zt,ol),ct&&ct.m(ol,null),t(ol,wl),ll&&ll.m(ol,null),t(ol,nl),Tl&&Tl.m(ol,null),t(ol,Ol),t(ol,al),t(al,_l),t(al,tl),t(al,Dl),t(Dl,Nl),t(Nl,Wt),t(Dl,Bt),t(Dl,Pt),t(Pt,el),t(Pt,Kt),t(Pt,rl),t(Pt,Xt),ul&&ul.m(Pt,null),t(ol,$e),t(ol,Al),t(Al,ts),t(Al,Xl),t(Al,xl),t(xl,Ds),ss||(Os=V(Qt,"click",l[6]),ss=!0)},p(xe,[bt]){if(bt&16&&a!==(a=xe[4]("routeEditor.preview")+"")&&v(i,a),bt&16&&f!==(f=xe[4]("routeEditor.previewHelp")+"")&&v(d,f),bt&16&&k!==(k=xe[4]("routeEditor.upstreams")+"")&&v(w,k),bt&4&&y!==(y=xe[2].upstreamsCount+"")&&v(T,y),bt&16&&j!==(j=xe[4]("routeEditor.totalWeight")+"")&&v(P,j),bt&4&&q!==(q=xe[2].totalWeight+"")&&v(D,q),bt&16&&Q!==(Q=xe[4]("routeEditor.features")+"")&&v(x,Q),bt&4&&S!==(S=[xe[2].hasAuth,xe[2].hasFailover,xe[2].hasTransformer,xe[2].hasPathRewrite].filter(Boolean).length+"")&&v(B,S),bt&16&&J!==(J=xe[4]("routeEditor.featuresEnabled")+"")&&v(ie,J),bt&16&&te!==(te=xe[4]("routes.path")+"")&&v(ae,te),bt&17&&pe!==(pe=(xe[0].path||xe[4]("routeEditor.notSet"))+"")&&v(oe,pe),bt&1&&ge!==(ge=xe[0].path)&&o(G,"title",ge),bt&16&&ze!==(ze=xe[4]("routeEditor.routePath")+"")&&v(Pe,ze),bt&16&&Le!==(Le=xe[4]("routeEditor.enabledFeatures")+"")&&v(Se,Le),bt&4&&se!==(se=xe[2].hasAuth?"\u2713":"\u25CB")&&v(ke,se),bt&4&&me!==(me=\`badge \${xe[2].hasAuth?"badge-success":"badge-ghost"}\`)&&o(De,"class",me),bt&16&&Be!==(Be=xe[4]("auth.routeAuth")+"")&&v(nt,Be),bt&4&&ve!==(ve=xe[2].hasFailover?"\u2713":"\u25CB")&&v(de,ve),bt&4&&Te!==(Te=\`badge \${xe[2].hasFailover?"badge-success":"badge-ghost"}\`)&&o(Ye,"class",Te),bt&16&&Ue!==(Ue=xe[4]("routeEditor.failoverTitle")+"")&&v(Ce,Ue),bt&4&&qe!==(qe=xe[2].hasTransformer?"\u2713":"\u25CB")&&v(Re,qe),bt&4&&dt!==(dt=\`badge \${xe[2].hasTransformer?"badge-success":"badge-ghost"}\`)&&o(ce,"class",dt),bt&16&&He!==(He=xe[4]("routeEditor.transformer")+"")&&v(X,He),bt&4&&_t!==(_t=xe[2].hasPathRewrite?"\u2713":"\u25CB")&&v(tt,_t),bt&4&&it!==(it=\`badge \${xe[2].hasPathRewrite?"badge-success":"badge-ghost"}\`)&&o(Ke,"class",it),bt&16&&It!==(It=xe[4]("routeEditor.pathRewrite")+"")&&v(rt,It),bt&16&&at!==(at=xe[4]("routeEditor.upstreams")+"")&&v(St,at),bt&17){il=ut(xe[0].upstreams);let fl;for(fl=0;fl<il.length;fl+=1){const xn=Wc(xe,il,fl);Ot[fl]?Ot[fl].p(xn,bt):(Ot[fl]=Kc(xn),Ot[fl].c(),Ot[fl].m(Tt,null))}for(;fl<Ot.length;fl+=1)Ot[fl].d(1);Ot.length=il.length}bt&16&&Jt!==(Jt=xe[4]("routeEditor.jsonConfig")+"")&&v(Yl,Jt),bt&18&&Hl!==(Hl=(xe[1]?xe[4]("common.hide"):xe[4]("common.show"))+"")&&v(Bl,Hl),xe[1]?lt?lt.p(xe,bt):(lt=Yc(xe),lt.c(),lt.m(hl,null)):lt&&(lt.d(1),lt=null),bt&16&&Vl!==(Vl=xe[4]("routeEditor.requestFlow")+"")&&v(Jl,Vl),bt&16&&xt!==(xt=xe[4]("routeEditor.clientRequest")+"")&&v(kl,xt),bt&1&&Il!==(Il=(xe[0].path||"/")+"")&&v(Wl,Il),xe[2].hasAuth?ct?ct.p(xe,bt):(ct=Qc(xe),ct.c(),ct.m(ol,wl)):ct&&(ct.d(1),ct=null),xe[2].hasPathRewrite?ll?ll.p(xe,bt):(ll=Zc(xe),ll.c(),ll.m(ol,nl)):ll&&(ll.d(1),ll=null),xe[2].hasTransformer?Tl?Tl.p(xe,bt):(Tl=Xc(xe),Tl.c(),Tl.m(ol,Ol)):Tl&&(Tl.d(1),Tl=null),bt&16&&El!==(El=xe[4]("routeEditor.selectUpstream")+"")&&v(Wt,El),bt&4&&$t!==($t=xe[2].upstreamsCount+"")&&v(el,$t),bt&16&&Zt!==(Zt=xe[4]("routeEditor.upstreams")+"")&&v(rl,Zt),xe[2].hasFailover?ul?ul.p(xe,bt):(ul=xc(xe),ul.c(),ul.m(Pt,null)):ul&&(ul.d(1),ul=null),bt&16&&ls!==(ls=xe[4]("routeEditor.returnResponse")+"")&&v(Ds,ls)},i:ot,o:ot,d(xe){xe&&H(s),Gt(Ot,xe),lt&&lt.d(),ct&&ct.d(),ll&&ll.d(),Tl&&Tl.d(),ul&&ul.d(),ss=!1,Os()}}}function vm(l,s,e){let n,a,i,u;Dt(l,Rt,m=>e(4,u=m));let{route:c}=s,f=!1;const d=()=>e(1,f=!f),p=()=>{navigator.clipboard.writeText(a),alert(u("common.copied"))};return l.$$set=m=>{"route"in m&&e(0,c=m.route)},l.$$.update=()=>{l.$$.dirty&1&&e(5,n={...c,upstreams:c.upstreams.map(({_uid:m,...g})=>g)}),l.$$.dirty&32&&e(3,a=JSON.stringify(n,null,2)),l.$$.dirty&1&&e(2,i={upstreamsCount:c.upstreams.length,hasAuth:c.auth?.enabled||!1,hasFailover:c.failover?.enabled||!1,hasTransformer:c.plugins&&c.plugins.length>0||!1,hasPathRewrite:c.pathRewrite&&Object.keys(c.pathRewrite).length>0,totalWeight:c.upstreams.reduce((m,g)=>m+(g.weight||100),0)})},[c,f,i,a,u,n,d,p]}class km extends Nt{constructor(s){super(),Ut(this,s,vm,bm,Vt,{route:0})}}function $c(l,s,e){const n=l.slice();return n[52]=s[e],n}function ed(l){let s,e;return{c(){s=r("code"),e=_(l[2]),o(s,"class","px-2 py-1 bg-base-200 rounded text-sm font-mono text-gray-600")},m(n,a){L(n,s,a),t(s,e)},p(n,a){a[0]&4&&v(e,n[2])},d(n){n&&H(s)}}}function wm(l){let s,e,n,a,i,u,c,f,d,p=l[16]("routeEditor.basicInfo")+"",m,g,b,k,w,C,E,y=l[16]("routeEditor.upstreams")+"",T,M,R,j=l[0].upstreams.length+"",P,I,q,D,A,N,Z,Q,x=l[16]("routeEditor.requestModification")+"",z,K,S,B,U,F,J,ie=l[16]("auth.routeAuth")+"",ue,ne,$,te,ae,ee,G,pe,oe=l[16]("routeEditor.failoverTitle")+"",ge,he,ye,ze,Pe,we,Fe,Je,je,Le=l[16]("routeEditor.preview")+"",Se,fe,_e,Ie,De=l[16]("shortcuts.title")+"",se,ke,me,Ee,Ve,Be,nt,Ne,Qe,Ye=l[16]("shortcuts.save")+"",ve,de,Te,Ze,Me,Ue,Ce,mt,Ge=l[16]("shortcuts.switchSection")+"",ce,qe,Re,dt,We,O,He=l[16]("shortcuts.cancel")+"",X,ft,Ht,Ke,_t,tt,it,Oe,Xe,It,rt,gt=l[0].auth?.enabled&&td(),wt=l[0].failover?.enabled&&ld(),pt=!l[1]&&sd(l);const bl=[Rm,Mm,Sm,Tm,Em,Cm],at=[];function St(ht,Tt){return ht[6]==="basic"?0:ht[6]==="upstreams"?1:ht[6]==="modification"?2:ht[6]==="auth"?3:ht[6]==="failover"?4:ht[6]==="preview"?5:-1}return~(it=St(l))&&(Oe=at[it]=bl[it](l)),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("ul"),i=r("li"),u=r("button"),c=re("svg"),f=re("path"),d=h(),m=_(p),g=h(),b=r("li"),k=r("button"),w=re("svg"),C=re("path"),E=h(),T=_(y),M=h(),R=r("span"),P=_(j),q=h(),D=r("li"),A=r("button"),N=re("svg"),Z=re("path"),Q=h(),z=_(x),K=h(),S=r("li"),B=r("button"),U=re("svg"),F=re("path"),J=h(),ue=_(ie),ne=h(),gt&&gt.c(),$=h(),te=r("li"),ae=r("button"),ee=re("svg"),G=re("path"),pe=h(),ge=_(oe),he=h(),wt&&wt.c(),ye=h(),ze=r("li"),Pe=r("button"),we=re("svg"),Fe=re("path"),Je=re("path"),je=h(),Se=_(Le),fe=h(),_e=r("div"),Ie=r("div"),se=_(De),ke=h(),me=r("div"),Ee=r("div"),Ve=r("kbd"),Ve.textContent="\u2318",Be=_(" + "),nt=r("kbd"),nt.textContent="S",Ne=h(),Qe=r("span"),ve=_(Ye),de=h(),Te=r("div"),Ze=r("kbd"),Ze.textContent="Ctrl",Me=_(" + "),Ue=r("kbd"),Ue.textContent="1-6",Ce=h(),mt=r("span"),ce=_(Ge),qe=h(),Re=r("div"),dt=r("kbd"),dt.textContent="Esc",We=h(),O=r("span"),X=_(He),ft=h(),pt&&pt.c(),Ht=h(),Ke=r("div"),_t=r("div"),tt=r("div"),Oe&&Oe.c(),o(f,"stroke-linecap","round"),o(f,"stroke-linejoin","round"),o(f,"stroke-width","2"),o(f,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(c,"xmlns","http://www.w3.org/2000/svg"),o(c,"class","h-5 w-5"),o(c,"fill","none"),o(c,"viewBox","0 0 24 24"),o(c,"stroke","currentColor"),le(u,"active",l[6]==="basic"),o(C,"stroke-linecap","round"),o(C,"stroke-linejoin","round"),o(C,"stroke-width","2"),o(C,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(w,"xmlns","http://www.w3.org/2000/svg"),o(w,"class","h-5 w-5"),o(w,"fill","none"),o(w,"viewBox","0 0 24 24"),o(w,"stroke","currentColor"),o(R,"class","badge badge-sm tooltip tooltip-right"),o(R,"data-tip",I=l[16]("routeEditor.upstreamCountTooltip",{values:{count:l[0].upstreams.length}})),le(k,"active",l[6]==="upstreams"),o(Z,"stroke-linecap","round"),o(Z,"stroke-linejoin","round"),o(Z,"stroke-width","2"),o(Z,"d","M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"),o(N,"xmlns","http://www.w3.org/2000/svg"),o(N,"class","h-5 w-5"),o(N,"fill","none"),o(N,"viewBox","0 0 24 24"),o(N,"stroke","currentColor"),le(A,"active",l[6]==="modification"),o(F,"stroke-linecap","round"),o(F,"stroke-linejoin","round"),o(F,"stroke-width","2"),o(F,"d","M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-5 w-5"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),le(B,"active",l[6]==="auth"),o(G,"stroke-linecap","round"),o(G,"stroke-linejoin","round"),o(G,"stroke-width","2"),o(G,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(ee,"xmlns","http://www.w3.org/2000/svg"),o(ee,"class","h-5 w-5"),o(ee,"fill","none"),o(ee,"viewBox","0 0 24 24"),o(ee,"stroke","currentColor"),le(ae,"active",l[6]==="failover"),o(Fe,"stroke-linecap","round"),o(Fe,"stroke-linejoin","round"),o(Fe,"stroke-width","2"),o(Fe,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(Je,"stroke-linecap","round"),o(Je,"stroke-linejoin","round"),o(Je,"stroke-width","2"),o(Je,"d","M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"),o(we,"xmlns","http://www.w3.org/2000/svg"),o(we,"class","h-5 w-5"),o(we,"fill","none"),o(we,"viewBox","0 0 24 24"),o(we,"stroke","currentColor"),le(Pe,"active",l[6]==="preview"),o(a,"class","menu bg-base-100 rounded-box shadow-lg gap-1"),o(Ie,"class","font-semibold mb-2"),o(Ve,"class","kbd kbd-xs"),o(nt,"class","kbd kbd-xs"),o(Qe,"class","ml-1"),o(Ze,"class","kbd kbd-xs"),o(Ue,"class","kbd kbd-xs"),o(mt,"class","ml-1"),o(dt,"class","kbd kbd-xs"),o(O,"class","ml-1"),o(me,"class","space-y-1 text-gray-500"),o(_e,"class","mt-4 p-3 bg-base-100 rounded-box shadow-lg text-xs"),o(n,"class","sticky top-24"),o(e,"class","w-56 flex-shrink-0 relative z-10"),o(tt,"class","card-body"),o(_t,"class","card bg-base-100 shadow-md"),o(Ke,"class","flex-1 ml-6 relative"),o(s,"class","max-w-7xl mx-auto flex gap-0 p-6 pb-32")},m(ht,Tt){L(ht,s,Tt),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,c),t(c,f),t(u,d),t(u,m),t(a,g),t(a,b),t(b,k),t(k,w),t(w,C),t(k,E),t(k,T),t(k,M),t(k,R),t(R,P),t(a,q),t(a,D),t(D,A),t(A,N),t(N,Z),t(A,Q),t(A,z),t(a,K),t(a,S),t(S,B),t(B,U),t(U,F),t(B,J),t(B,ue),t(B,ne),gt&&gt.m(B,null),t(a,$),t(a,te),t(te,ae),t(ae,ee),t(ee,G),t(ae,pe),t(ae,ge),t(ae,he),wt&&wt.m(ae,null),t(a,ye),t(a,ze),t(ze,Pe),t(Pe,we),t(we,Fe),t(we,Je),t(Pe,je),t(Pe,Se),t(n,fe),t(n,_e),t(_e,Ie),t(Ie,se),t(_e,ke),t(_e,me),t(me,Ee),t(Ee,Ve),t(Ee,Be),t(Ee,nt),t(Ee,Ne),t(Ee,Qe),t(Qe,ve),t(me,de),t(me,Te),t(Te,Ze),t(Te,Me),t(Te,Ue),t(Te,Ce),t(Te,mt),t(mt,ce),t(me,qe),t(me,Re),t(Re,dt),t(Re,We),t(Re,O),t(O,X),t(n,ft),pt&&pt.m(n,null),t(s,Ht),t(s,Ke),t(Ke,_t),t(_t,tt),~it&&at[it].m(tt,null),Xe=!0,It||(rt=[V(u,"click",l[27]),V(k,"click",l[28]),V(A,"click",l[29]),V(B,"click",l[30]),V(ae,"click",l[31]),V(Pe,"click",l[32])],It=!0)},p(ht,Tt){(!Xe||Tt[0]&65536)&&p!==(p=ht[16]("routeEditor.basicInfo")+"")&&v(m,p),(!Xe||Tt[0]&64)&&le(u,"active",ht[6]==="basic"),(!Xe||Tt[0]&65536)&&y!==(y=ht[16]("routeEditor.upstreams")+"")&&v(T,y),(!Xe||Tt[0]&1)&&j!==(j=ht[0].upstreams.length+"")&&v(P,j),(!Xe||Tt[0]&65537&&I!==(I=ht[16]("routeEditor.upstreamCountTooltip",{values:{count:ht[0].upstreams.length}})))&&o(R,"data-tip",I),(!Xe||Tt[0]&64)&&le(k,"active",ht[6]==="upstreams"),(!Xe||Tt[0]&65536)&&x!==(x=ht[16]("routeEditor.requestModification")+"")&&v(z,x),(!Xe||Tt[0]&64)&&le(A,"active",ht[6]==="modification"),(!Xe||Tt[0]&65536)&&ie!==(ie=ht[16]("auth.routeAuth")+"")&&v(ue,ie),ht[0].auth?.enabled?gt||(gt=td(),gt.c(),gt.m(B,null)):gt&&(gt.d(1),gt=null),(!Xe||Tt[0]&64)&&le(B,"active",ht[6]==="auth"),(!Xe||Tt[0]&65536)&&oe!==(oe=ht[16]("routeEditor.failoverTitle")+"")&&v(ge,oe),ht[0].failover?.enabled?wt||(wt=ld(),wt.c(),wt.m(ae,null)):wt&&(wt.d(1),wt=null),(!Xe||Tt[0]&64)&&le(ae,"active",ht[6]==="failover"),(!Xe||Tt[0]&65536)&&Le!==(Le=ht[16]("routeEditor.preview")+"")&&v(Se,Le),(!Xe||Tt[0]&64)&&le(Pe,"active",ht[6]==="preview"),(!Xe||Tt[0]&65536)&&De!==(De=ht[16]("shortcuts.title")+"")&&v(se,De),(!Xe||Tt[0]&65536)&&Ye!==(Ye=ht[16]("shortcuts.save")+"")&&v(ve,Ye),(!Xe||Tt[0]&65536)&&Ge!==(Ge=ht[16]("shortcuts.switchSection")+"")&&v(ce,Ge),(!Xe||Tt[0]&65536)&&He!==(He=ht[16]("shortcuts.cancel")+"")&&v(X,He),ht[1]?pt&&(pt.d(1),pt=null):pt?pt.p(ht,Tt):(pt=sd(ht),pt.c(),pt.m(n,null));let vl=it;it=St(ht),it===vl?~it&&at[it].p(ht,Tt):(Oe&&(Gl(),st(at[vl],1,1,()=>{at[vl]=null}),Kl()),~it?(Oe=at[it],Oe?Oe.p(ht,Tt):(Oe=at[it]=bl[it](ht),Oe.c()),et(Oe,1),Oe.m(tt,null)):Oe=null)},i(ht){Xe||(et(Oe),Xe=!0)},o(ht){st(Oe),Xe=!1},d(ht){ht&&H(s),gt&&gt.d(),wt&&wt.d(),pt&&pt.d(),~it&&at[it].d(),It=!1,vt(rt)}}}function ym(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function td(l){let s;return{c(){s=r("span"),s.textContent="\u2713",o(s,"class","badge badge-success badge-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function ld(l){let s;return{c(){s=r("span"),s.textContent="\u2713",o(s,"class","badge badge-success badge-xs")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function sd(l){let s,e,n,a,i,u=l[16]("routeEditor.useTemplate")+"",c,f,d;return{c(){s=r("div"),e=r("button"),n=re("svg"),a=re("path"),i=h(),c=_(u),o(a,"stroke-linecap","round"),o(a,"stroke-linejoin","round"),o(a,"stroke-width","2"),o(a,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(e,"type","button"),o(e,"class","btn btn-sm btn-outline w-full gap-2"),o(s,"class","mt-4")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,a),t(e,i),t(e,c),f||(d=V(e,"click",l[33]),f=!0)},p(p,m){m[0]&65536&&u!==(u=p[16]("routeEditor.useTemplate")+"")&&v(c,u)},d(p){p&&H(s),f=!1,d()}}}function Cm(l){let s,e;return s=new km({props:{route:l[0]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a[0]&1&&(i.route=n[0]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Em(l){let s,e,n;function a(u){l[38](u)}let i={};return l[0]!==void 0&&(i.route=l[0]),s=new _m({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Tm(l){let s,e,n;function a(u){l[37](u)}let i={};return l[0]!==void 0&&(i.route=l[0]),s=new cm({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Sm(l){let s,e,n;function a(u){l[36](u)}let i={};return l[0]!==void 0&&(i.route=l[0]),s=new im({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Mm(l){let s,e,n;function a(u){l[35](u)}let i={errors:l[8],weightErrors:l[9]};return l[0]!==void 0&&(i.route=l[0]),s=new lm({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),c[0]&512&&(f.weightErrors=u[9]),!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function Rm(l){let s,e,n;function a(u){l[34](u)}let i={errors:l[8]};return l[0]!==void 0&&(i.route=l[0]),s=new Ih({props:i}),Sl.push(()=>Ml(s,"route",a)),{c(){Et(s.$$.fragment)},m(u,c){Ct(s,u,c),n=!0},p(u,c){const f={};c[0]&256&&(f.errors=u[8]),!e&&c[0]&1&&(e=!0,f.route=u[0],Rl(()=>e=!1)),s.$set(f)},i(u){n||(et(s.$$.fragment,u),n=!0)},o(u){st(s.$$.fragment,u),n=!1},d(u){yt(s,u)}}}function od(l){let s,e=l[16]("autosave.lastSaved")+"",n,a,i=l[19](l[12])+"",u;return{c(){s=r("span"),n=_(e),a=_(": "),u=_(i),o(s,"class","text-xs text-gray-500")},m(c,f){L(c,s,f),t(s,n),t(s,a),t(s,u)},p(c,f){f[0]&65536&&e!==(e=c[16]("autosave.lastSaved")+"")&&v(n,e),f[0]&4096&&i!==(i=c[19](c[12])+"")&&v(u,i)},d(c){c&&H(s)}}}function qm(l){let s,e,n,a,i,u=l[16]("validation.allGood")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(s,"class","flex items-center gap-2 text-success")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d[0]&65536&&u!==(u=f[16]("validation.allGood")+"")&&v(c,u)},d(f){f&&H(s)}}}function Hm(l){let s,e,n,a,i,u=l[10].length+"",c,f,d=l[16]("validation.errors")+"",p,m,g,b=(l[7]?l[16]("common.hide"):l[16]("common.show"))+"",k,w,C;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=h(),p=_(d),m=h(),g=r("button"),k=_(b),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-5 w-5"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(i,"class","text-sm font-medium"),o(g,"class","btn btn-xs btn-ghost"),o(s,"class","flex items-center gap-2 text-error")},m(E,y){L(E,s,y),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,p),t(s,m),t(s,g),t(g,k),w||(C=V(g,"click",l[39]),w=!0)},p(E,y){y[0]&1024&&u!==(u=E[10].length+"")&&v(c,u),y[0]&65536&&d!==(d=E[16]("validation.errors")+"")&&v(p,d),y[0]&65664&&b!==(b=(E[7]?E[16]("common.hide"):E[16]("common.show"))+"")&&v(k,b)},d(E){E&&H(s),w=!1,C()}}}function Lm(l){let s,e;return{c(){s=re("svg"),e=re("path"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-5 w-5"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor")},m(n,a){L(n,s,a),t(s,e)},d(n){n&&H(s)}}}function Pm(l){let s;return{c(){s=r("span"),o(s,"class","loading loading-spinner loading-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function nd(l){let s,e,n=ut(l[10]),a=[];for(let i=0;i<n.length;i+=1)a[i]=ad($c(l,n,i));return{c(){s=r("div"),e=r("ul");for(let i=0;i<a.length;i+=1)a[i].c();o(e,"class","text-sm space-y-1"),o(s,"class","mt-3 p-3 bg-error/10 rounded-lg border border-error/20")},m(i,u){L(i,s,u),t(s,e);for(let c=0;c<a.length;c+=1)a[c]&&a[c].m(e,null)},p(i,u){if(u[0]&1024){n=ut(i[10]);let c;for(c=0;c<n.length;c+=1){const f=$c(i,n,c);a[c]?a[c].p(f,u):(a[c]=ad(f),a[c].c(),a[c].m(e,null))}for(;c<a.length;c+=1)a[c].d(1);a.length=n.length}},d(i){i&&H(s),Gt(a,i)}}}function ad(l){let s,e,n,a,i=l[52].field+"",u,c,f=l[52].message+"",d,p;return{c(){s=r("li"),e=r("span"),e.textContent="\u2022",n=h(),a=r("span"),u=_(i),c=_(": "),d=_(f),p=h(),o(e,"class","text-error"),o(s,"class","flex items-start gap-2")},m(m,g){L(m,s,g),t(s,e),t(s,n),t(s,a),t(a,u),t(a,c),t(a,d),t(s,p)},p(m,g){g[0]&1024&&i!==(i=m[52].field+"")&&v(u,i),g[0]&1024&&f!==(f=m[52].message+"")&&v(d,f)},d(m){m&&H(s)}}}function jm(l){let s,e,n,a,i,u,c,f=l[16]("breadcrumb.home")+"",d,p,m,g,b=l[16]("breadcrumb.routes")+"",k,w,C,E,y,T=(l[1]?l[16]("breadcrumb.editRoute"):l[16]("breadcrumb.newRoute"))+"",M,R,j,P,I,q,D,A,N,Z,Q,x,z,K,S,B=l[16]("common.cancel")+"",U,F,J,ie,ue=l[16]("common.save")+"",ne,$,te,ae,ee,G,pe,oe,ge,he,ye,ze,Pe,we,Fe,Je,je,Le=l[16]("confirmDialog.no")+"",Se,fe,_e,Ie=l[16]("confirmDialog.yes")+"",De,se,ke,me,Ee,Ve,Be=l[1]&&ed(l);const nt=[ym,wm],Ne=[];function Qe(ce,qe){return ce[3]?0:1}P=Qe(l),I=Ne[P]=nt[P](l);let Ye=l[12]&&!l[1]&&od(l);function ve(ce,qe){if(ce[10].length>0)return Hm;if(ce[11])return qm}let de=ve(l),Te=de&&de(l);function Ze(ce,qe){return ce[4]?Pm:Lm}let Me=Ze(l),Ue=Me(l),Ce=l[7]&&l[10].length>0&&nd(l);function mt(ce){l[40](ce)}let Ge={};return l[5]!==void 0&&(Ge.showTemplates=l[5]),ee=new Th({props:Ge}),Sl.push(()=>Ml(ee,"showTemplates",mt)),ee.$on("select",l[22]),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=r("ul"),u=r("li"),c=r("button"),d=_(f),p=h(),m=r("li"),g=r("button"),k=_(b),w=h(),C=r("li"),E=r("span"),y=r("span"),M=_(T),R=h(),Be&&Be.c(),j=h(),I.c(),q=h(),D=r("div"),A=r("div"),N=r("div"),Z=r("div"),Ye&&Ye.c(),Q=h(),x=r("div"),Te&&Te.c(),z=h(),K=r("div"),S=r("button"),U=_(B),F=h(),J=r("button"),Ue.c(),ie=h(),ne=_(ue),te=h(),Ce&&Ce.c(),ae=h(),Et(ee.$$.fragment),pe=h(),oe=r("dialog"),ge=r("div"),he=r("h3"),ye=_(l[14]),ze=h(),Pe=r("p"),we=_(l[15]),Fe=h(),Je=r("div"),je=r("button"),Se=_(Le),fe=h(),_e=r("button"),De=_(Ie),se=h(),ke=r("button"),o(c,"type","button"),o(c,"class","link link-hover"),o(g,"type","button"),o(g,"class","link link-hover"),o(E,"class","flex items-center gap-2"),o(a,"class","breadcrumbs text-sm"),o(n,"class","max-w-7xl mx-auto px-6 py-4"),o(e,"class","bg-base-100 border-b border-base-300"),o(Z,"class","flex items-center gap-4"),o(S,"class","btn btn-outline"),S.disabled=l[4],o(J,"class","btn btn-primary"),J.disabled=$=!l[11]||l[4],o(K,"class","flex gap-3"),o(x,"class","flex items-center gap-4"),o(N,"class","flex justify-between items-center"),o(A,"class","max-w-7xl mx-auto px-6 py-4"),o(D,"class","fixed bottom-0 left-0 right-0 bg-base-100 border-t border-base-300 shadow-2xl z-40"),o(he,"class","font-bold text-lg"),o(Pe,"class","py-4"),o(je,"class","btn btn-ghost"),o(_e,"class","btn btn-primary"),o(Je,"class","modal-action"),o(ge,"class","modal-box"),o(ke,"type","button"),o(ke,"class","modal-backdrop"),o(ke,"aria-label","Close dialog"),o(oe,"class","modal"),le(oe,"modal-open",l[13]),o(s,"class","min-h-screen bg-base-200")},m(ce,qe){L(ce,s,qe),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,c),t(c,d),t(i,p),t(i,m),t(m,g),t(g,k),t(i,w),t(i,C),t(C,E),t(E,y),t(y,M),t(E,R),Be&&Be.m(E,null),t(s,j),Ne[P].m(s,null),t(s,q),t(s,D),t(D,A),t(A,N),t(N,Z),Ye&&Ye.m(Z,null),t(N,Q),t(N,x),Te&&Te.m(x,null),t(x,z),t(x,K),t(K,S),t(S,U),t(K,F),t(K,J),Ue.m(J,null),t(J,ie),t(J,ne),t(A,te),Ce&&Ce.m(A,null),t(s,ae),Ct(ee,s,null),t(s,pe),t(s,oe),t(oe,ge),t(ge,he),t(he,ye),t(ge,ze),t(ge,Pe),t(Pe,we),t(ge,Fe),t(ge,Je),t(Je,je),t(je,Se),t(Je,fe),t(Je,_e),t(_e,De),t(oe,se),t(oe,ke),me=!0,Ee||(Ve=[V(c,"click",l[25]),V(g,"click",l[26]),V(S,"click",l[21]),V(J,"click",l[20]),V(je,"click",l[18]),V(_e,"click",l[17]),V(ke,"click",l[18])],Ee=!0)},p(ce,qe){(!me||qe[0]&65536)&&f!==(f=ce[16]("breadcrumb.home")+"")&&v(d,f),(!me||qe[0]&65536)&&b!==(b=ce[16]("breadcrumb.routes")+"")&&v(k,b),(!me||qe[0]&65538)&&T!==(T=(ce[1]?ce[16]("breadcrumb.editRoute"):ce[16]("breadcrumb.newRoute"))+"")&&v(M,T),ce[1]?Be?Be.p(ce,qe):(Be=ed(ce),Be.c(),Be.m(E,null)):Be&&(Be.d(1),Be=null);let Re=P;P=Qe(ce),P===Re?Ne[P].p(ce,qe):(Gl(),st(Ne[Re],1,1,()=>{Ne[Re]=null}),Kl(),I=Ne[P],I?I.p(ce,qe):(I=Ne[P]=nt[P](ce),I.c()),et(I,1),I.m(s,q)),ce[12]&&!ce[1]?Ye?Ye.p(ce,qe):(Ye=od(ce),Ye.c(),Ye.m(Z,null)):Ye&&(Ye.d(1),Ye=null),de===(de=ve(ce))&&Te?Te.p(ce,qe):(Te&&Te.d(1),Te=de&&de(ce),Te&&(Te.c(),Te.m(x,z))),(!me||qe[0]&65536)&&B!==(B=ce[16]("common.cancel")+"")&&v(U,B),(!me||qe[0]&16)&&(S.disabled=ce[4]),Me!==(Me=Ze(ce))&&(Ue.d(1),Ue=Me(ce),Ue&&(Ue.c(),Ue.m(J,ie))),(!me||qe[0]&65536)&&ue!==(ue=ce[16]("common.save")+"")&&v(ne,ue),(!me||qe[0]&2064&&$!==($=!ce[11]||ce[4]))&&(J.disabled=$),ce[7]&&ce[10].length>0?Ce?Ce.p(ce,qe):(Ce=nd(ce),Ce.c(),Ce.m(A,null)):Ce&&(Ce.d(1),Ce=null);const dt={};!G&&qe[0]&32&&(G=!0,dt.showTemplates=ce[5],Rl(()=>G=!1)),ee.$set(dt),(!me||qe[0]&16384)&&v(ye,ce[14]),(!me||qe[0]&32768)&&v(we,ce[15]),(!me||qe[0]&65536)&&Le!==(Le=ce[16]("confirmDialog.no")+"")&&v(Se,Le),(!me||qe[0]&65536)&&Ie!==(Ie=ce[16]("confirmDialog.yes")+"")&&v(De,Ie),(!me||qe[0]&8192)&&le(oe,"modal-open",ce[13])},i(ce){me||(et(I),et(ee.$$.fragment,ce),me=!0)},o(ce){st(I),st(ee.$$.fragment,ce),me=!1},d(ce){ce&&H(s),Be&&Be.d(),Ne[P].d(),Ye&&Ye.d(),Te&&Te.d(),Ue.d(),Ce&&Ce.d(),yt(ee),Ee=!1,vt(Ve)}}}function Dm(l,s,e){let n;Dt(l,Rt,he=>e(16,n=he));let{params:a={}}=s,i=!1,u="",c=!0,f=!1,d=!1,p="basic",m=!1,g={path:"",upstreams:[{_uid:ta(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}},query:{add:{},remove:[],replace:{},default:{}}},b=[],k=[],w=[],C=!1,E=null,y=null,T=null,M=!1,R="",j="",P=null;function I(he,ye,ze){e(14,R=he),e(15,j=ye),P=ze,e(13,M=!0)}function q(){e(13,M=!1),P&&(P(),P=null)}function D(){e(13,M=!1),P=null}function A(he){if((he.metaKey||he.ctrlKey)&&he.key==="s"&&(he.preventDefault(),C&&!f&&x()),he.key==="Escape"&&z(),he.key>="1"&&he.key<="6"&&he.ctrlKey&&!he.metaKey&&!he.altKey){const ze=["basic","upstreams","modification","auth","failover","preview"][parseInt(he.key)-1];ze&&(e(6,p=ze),he.preventDefault())}}function N(){if(!i)try{localStorage.setItem("bungee-route-draft",JSON.stringify(g)),e(12,y=Date.now())}catch(he){console.error("Failed to auto-save draft:",he)}}function Z(he){const ye=Math.floor((Date.now()-he)/1e3);return ye<60?n("autosave.justNow"):ye<3600?n("autosave.minutesAgo",{values:{minutes:Math.floor(ye/60)}}):n("autosave.hoursAgo",{values:{hours:Math.floor(ye/3600)}})}async function Q(){try{const he=await mh(g),ye=ph(g.upstreams);e(8,b=he),e(9,k=ye),e(10,w=[...he,...ye]),e(11,C=w.length===0&&g.upstreams.length>0)}catch(he){console.error("Validation failed:",he),e(11,C=!1)}}async function x(){if(!C){jt.show(n("routeEditor.saveFailed",{values:{error:n("common.error")}}),"error");return}try{e(4,f=!0);const he={...g,upstreams:k0(g.upstreams,[ye=>ye.priority??1]).map(({_uid:ye,...ze})=>ze)};i?(await wo.update(u,he),jt.show(n("routeEditor.routeUpdated"),"success")):(await wo.create(he),jt.show(n("routeEditor.routeSaved"),"success"),localStorage.removeItem("bungee-route-draft")),Yr()}catch(he){jt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error")}finally{e(4,f=!1)}}function z(){I(n("confirmDialog.cancelTitle"),n("confirmDialog.cancelMessage"),()=>Yr())}function K(he){const ye=he.detail;e(0,g={...g,...ye,headers:ye.headers||g.headers,body:ye.body||g.body,query:ye.query||g.query,upstreams:ye.upstreams?.map(ze=>({...ze,_uid:ta(),headers:ze.headers||{add:{},remove:[],default:{}},body:ze.body||{add:{},remove:[],replace:{},default:{}},query:ze.query||{add:{},remove:[],replace:{},default:{}}}))||g.upstreams}),jt.show(n("routeEditor.templateApplied"),"success")}Hs(async()=>{if(window.addEventListener("keydown",A),T=setInterval(()=>{N()},3e4),a.path){e(1,i=!0),e(2,u=decodeURIComponent(a.path));try{const he=await wo.get(u);he?(e(0,g=he),e(0,g.headers=g.headers||{add:{},remove:[],default:{}},g),e(0,g.body=g.body||{add:{},remove:[],replace:{},default:{}},g),e(0,g.query=g.query||{add:{},remove:[],replace:{},default:{}},g),e(0,g.upstreams=g.upstreams.map(ye=>({...ye,_uid:ta(),headers:ye.headers||{add:{},remove:[],default:{}},body:ye.body||{add:{},remove:[],replace:{},default:{}},query:ye.query||{add:{},remove:[],replace:{},default:{}}})),g)):(jt.show(n("routes.noRoutes"),"error"),Yr())}catch(he){jt.show(n("routeEditor.saveFailed",{values:{error:he.message}}),"error"),Yr()}}else try{const he=localStorage.getItem("bungee-route-draft");if(he){const ye=JSON.parse(he);I(n("confirmDialog.restoreDraftTitle"),n("confirmDialog.restoreDraftMessage"),()=>{e(0,g=ye)})}}catch(he){console.error("Failed to restore draft:",he)}e(3,c=!1)}),Xn(()=>{window.removeEventListener("keydown",A),T&&clearInterval(T)});const S=()=>window.location.hash="/",B=()=>window.location.hash="/routes",U=()=>e(6,p="basic"),F=()=>e(6,p="upstreams"),J=()=>e(6,p="modification"),ie=()=>e(6,p="auth"),ue=()=>e(6,p="failover"),ne=()=>e(6,p="preview"),$=()=>e(5,d=!0);function te(he){g=he,e(0,g)}function ae(he){g=he,e(0,g)}function ee(he){g=he,e(0,g)}function G(he){g=he,e(0,g)}function pe(he){g=he,e(0,g)}const oe=()=>e(7,m=!m);function ge(he){d=he,e(5,d)}return l.$$set=he=>{"params"in he&&e(23,a=he.params)},l.$$.update=()=>{l.$$.dirty[0]&16777217&&g&&(E&&clearTimeout(E),e(24,E=setTimeout(()=>{Q()},300)))},[g,i,u,c,f,d,p,m,b,k,w,C,y,M,R,j,n,q,D,Z,x,z,K,a,E,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge]}class a0 extends Nt{constructor(s){super(),Ut(this,s,Dm,jm,Vt,{params:23},null,[-1,-1])}}function rd(l,s,e){const n=l.slice();return n[43]=s[e][0],n[44]=s[e][1],n}function id(l,s,e){const n=l.slice();return n[43]=s[e][0],n[44]=s[e][1],n}function ud(l,s,e){const n=l.slice();return n[43]=s[e][0],n[44]=s[e][1],n}function fd(l,s,e){const n=l.slice();n[52]=s[e],n[61]=e;const a=n[51].durations[n[61]];n[53]=a;const i=n[51].relativeTime[n[61]];n[54]=i;const u=n[53]/n[51].totalDuration*100;n[55]=u;const c=n[54]/n[51].totalDuration*100;n[56]=c;const f=kg(n[52].step);n[57]=f;const d=vg(n[52].step);n[58]=d;const p=(n[53]/n[51].totalDuration*100).toFixed(1);return n[59]=p,n}function cd(l,s,e){const n=l.slice();return n[62]=s[e],n}function Su(l){const s=l.slice(),e=s[27]();return s[51]=e,s}function dd(l,s,e){const n=l.slice();return n[52]=s[e],n}function Bm(l){let s,e,n,a,i=l[24]("logs.detail.copyToClipboard")+"",u;return{c(){s=re("svg"),e=re("path"),n=h(),a=r("span"),u=_(i),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"stroke-width","2"),o(e,"d","M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"),o(s,"xmlns","http://www.w3.org/2000/svg"),o(s,"class","h-4 w-4"),o(s,"fill","none"),o(s,"viewBox","0 0 24 24"),o(s,"stroke","currentColor"),o(a,"class","hidden md:inline")},m(c,f){L(c,s,f),t(s,e),L(c,n,f),L(c,a,f),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("logs.detail.copyToClipboard")+"")&&v(u,i)},d(c){c&&(H(s),H(n),H(a))}}}function Im(l){let s,e=l[24]("logs.detail.copied")+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","text-success")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.copied")+"")&&v(n,e)},d(a){a&&H(s)}}}function Am(l){let s;return{c(){s=r("span"),s.textContent="No steps recorded",o(s,"class","text-sm opacity-40")},m(e,n){L(e,s,n)},p:ot,d(e){e&&H(s)}}}function Fm(l){let s,e,n=ut(l[0].processingSteps.slice(0,3)),a=[];for(let u=0;u<n.length;u+=1)a[u]=pd(dd(l,n,u));let i=l[0].processingSteps.length>3&&hd(l);return{c(){for(let u=0;u<a.length;u+=1)a[u].c();s=h(),i&&i.c(),e=Ul()},m(u,c){for(let f=0;f<a.length;f+=1)a[f]&&a[f].m(u,c);L(u,s,c),i&&i.m(u,c),L(u,e,c)},p(u,c){if(c[0]&67108865){n=ut(u[0].processingSteps.slice(0,3));let f;for(f=0;f<n.length;f+=1){const d=dd(u,n,f);a[f]?a[f].p(d,c):(a[f]=pd(d),a[f].c(),a[f].m(s.parentNode,s))}for(;f<a.length;f+=1)a[f].d(1);a.length=n.length}u[0].processingSteps.length>3?i?i.p(u,c):(i=hd(u),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null)},d(u){u&&(H(s),H(e)),Gt(a,u),i&&i.d(u)}}}function pd(l){let s,e=l[26](l[52].step)+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm badge-outline")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[26](a[52].step)+"")&&v(n,e)},d(a){a&&H(s)}}}function hd(l){let s,e,n=l[0].processingSteps.length-3+"",a,i;return{c(){s=r("span"),e=_("+"),a=_(n),i=_(" more"),o(s,"class","badge badge-sm badge-ghost")},m(u,c){L(u,s,c),t(s,e),t(s,a),t(s,i)},p(u,c){c[0]&1&&n!==(n=u[0].processingSteps.length-3+"")&&v(a,n)},d(u){u&&H(s)}}}function md(l){let s,e,n,a,i,u=l[24]("logs.detail.processingTimeline")+"",c,f,d,p=l[24]("logs.detail.totalSteps",{values:{count:l[0].processingSteps.length}})+"",m,g,b=l[24]("logs.detail.totalDuration",{values:{duration:go(l[51].totalDuration)}})+"",k,w,C,E=(l[22]?l[24]("logs.detail.hideTimeline"):l[24]("logs.detail.showTimeline"))+"",y,T,M,R,j=l[22]&&gd(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=r("h4"),c=_(u),f=h(),d=r("p"),m=_(p),g=_(\`\uFF0C
21260
+ \`),k=_(b),w=h(),C=r("button"),y=_(E),T=h(),j&&j.c(),o(i,"class","card-title text-base"),o(d,"class","text-xs opacity-60 mt-1"),o(C,"class","btn btn-sm btn-ghost"),o(n,"class","flex items-center justify-between mb-2"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(P,I){L(P,s,I),t(s,e),t(e,n),t(n,a),t(a,i),t(i,c),t(a,f),t(a,d),t(d,m),t(d,g),t(d,k),t(n,w),t(n,C),t(C,y),t(e,T),j&&j.m(e,null),M||(R=V(C,"click",l[31]),M=!0)},p(P,I){I[0]&16777216&&u!==(u=P[24]("logs.detail.processingTimeline")+"")&&v(c,u),I[0]&16777217&&p!==(p=P[24]("logs.detail.totalSteps",{values:{count:P[0].processingSteps.length}})+"")&&v(m,p),I[0]&16777216&&b!==(b=P[24]("logs.detail.totalDuration",{values:{duration:go(P[51].totalDuration)}})+"")&&v(k,b),I[0]&20971520&&E!==(E=(P[22]?P[24]("logs.detail.hideTimeline"):P[24]("logs.detail.showTimeline"))+"")&&v(y,E),P[22]?j?j.p(P,I):(j=gd(P),j.c(),j.m(e,null)):j&&(j.d(1),j=null)},d(P){P&&H(s),j&&j.d(),M=!1,R()}}}function gd(l){let s,e,n,a,i,u,c,f,d,p,m=ut(l[0].processingSteps),g=[];for(let b=0;b<m.length;b+=1)g[b]=Ed(fd(l,m,b));return{c(){s=r("div"),e=r("div"),n=r("span"),n.textContent="0ms",a=h(),i=r("div"),u=h(),c=r("span"),c.textContent=\`\${go(l[51].totalDuration)}\`,f=h();for(let b=0;b<g.length;b+=1)g[b].c();d=h(),p=r("div"),p.innerHTML='<div class="flex flex-wrap gap-4 text-xs"><div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-blue-500"></div> <span>Authentication</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-purple-500"></div> <span>Plugin</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-green-500"></div> <span>Upstream</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-orange-500"></div> <span>Transform</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-red-500"></div> <span>Error</span></div> <div class="flex items-center gap-2"><div class="w-3 h-3 rounded-full bg-yellow-500"></div> <span>Retry/Recovery</span></div></div>',o(i,"class","flex-1 border-t border-dashed border-base-content/20"),o(c,"class","mr-32"),o(e,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),o(s,"class","mt-4"),o(p,"class","mt-6 pt-4 border-t border-base-300")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(e,a),t(e,i),t(e,u),t(e,c),t(s,f);for(let w=0;w<g.length;w+=1)g[w]&&g[w].m(s,null);L(b,d,k),L(b,p,k)},p(b,k){if(k[0]&201326593){m=ut(b[0].processingSteps);let w;for(w=0;w<m.length;w+=1){const C=fd(b,m,w);g[w]?g[w].p(C,k):(g[w]=Ed(C),g[w].c(),g[w].m(s,null))}for(;w<g.length;w+=1)g[w].d(1);g.length=m.length}},d(b){b&&(H(s),H(d),H(p)),Gt(g,b)}}}function _d(l){let s;return{c(){s=r("div"),o(s,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function bd(l){let s=l[52].detail.plugins&&Array.isArray(l[52].detail.plugins),e,n,a,i,u=s&&vd(l),c=l[52].detail.target&&wd(l),f=l[52].detail.level&&yd(l),d=l[52].detail.error&&Cd(l);return{c(){u&&u.c(),e=h(),c&&c.c(),n=h(),f&&f.c(),a=h(),d&&d.c(),i=Ul()},m(p,m){u&&u.m(p,m),L(p,e,m),c&&c.m(p,m),L(p,n,m),f&&f.m(p,m),L(p,a,m),d&&d.m(p,m),L(p,i,m)},p(p,m){m[0]&1&&(s=p[52].detail.plugins&&Array.isArray(p[52].detail.plugins)),s?u?u.p(p,m):(u=vd(p),u.c(),u.m(e.parentNode,e)):u&&(u.d(1),u=null),p[52].detail.target?c?c.p(p,m):(c=wd(p),c.c(),c.m(n.parentNode,n)):c&&(c.d(1),c=null),p[52].detail.level?f?f.p(p,m):(f=yd(p),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null),p[52].detail.error?d?d.p(p,m):(d=Cd(p),d.c(),d.m(i.parentNode,i)):d&&(d.d(1),d=null)},d(p){p&&(H(e),H(n),H(a),H(i)),u&&u.d(p),c&&c.d(p),f&&f.d(p),d&&d.d(p)}}}function vd(l){let s,e=ut(l[52].detail.plugins),n=[];for(let a=0;a<e.length;a+=1)n[a]=kd(cd(l,e,a));return{c(){for(let a=0;a<n.length;a+=1)n[a].c();s=Ul()},m(a,i){for(let u=0;u<n.length;u+=1)n[u]&&n[u].m(a,i);L(a,s,i)},p(a,i){if(i[0]&1){e=ut(a[52].detail.plugins);let u;for(u=0;u<e.length;u+=1){const c=cd(a,e,u);n[u]?n[u].p(c,i):(n[u]=kd(c),n[u].c(),n[u].m(s.parentNode,s))}for(;u<n.length;u+=1)n[u].d(1);n.length=e.length}},d(a){a&&H(s),Gt(n,a)}}}function kd(l){let s,e=l[62]+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-primary badge-outline")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[62]+"")&&v(n,e)},d(a){a&&H(s)}}}function wd(l){let s,e=l[52].detail.target+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-info badge-outline"),o(s,"title","Target upstream")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[52].detail.target+"")&&v(n,e)},d(a){a&&H(s)}}}function yd(l){let s,e=l[52].detail.level+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-xs badge-warning badge-outline")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1&&e!==(e=a[52].detail.level+"")&&v(n,e)},d(a){a&&H(s)}}}function Cd(l){let s,e,n;return{c(){s=r("span"),e=_("Error"),o(s,"class","badge badge-xs badge-error badge-outline"),o(s,"title",n=l[52].detail.error)},m(a,i){L(a,s,i),t(s,e)},p(a,i){i[0]&1&&n!==(n=a[52].detail.error)&&o(s,"title",n)},d(a){a&&H(s)}}}function zm(l){let s;return{c(){s=r("span"),s.textContent=\`\${l[59]}%\`,o(s,"class","text-xs text-white px-2 leading-7")},m(e,n){L(e,s,n)},p:ot,d(e){e&&H(s)}}}function Ed(l){let s,e,n,a,i,u,c,f,d,p=l[26](l[52].step)+"",m,g,b,k,w=l[57]+"",C,E,y,T,M,R,j,P,I,q,D,A,N,Z,Q,x,z=l[61]<l[0].processingSteps.length-1&&_d(),K=l[52].detail&&bd(l),S=l[55]>5&&zm(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),u=h(),z&&z.c(),c=h(),f=r("div"),d=r("div"),m=_(p),g=h(),b=r("div"),k=r("span"),C=_(w),E=h(),K&&K.c(),y=h(),T=r("div"),M=r("div"),R=r("div"),S&&S.c(),I=h(),q=r("div"),D=r("div"),D.textContent=\`+\${l[54]}ms\`,A=h(),N=r("div"),N.textContent=\`\${go(l[53])}\`,Z=h(),Q=r("div"),Q.textContent=\`\${l[59]}%\`,x=h(),o(a,"class",i="w-3 h-3 rounded-full "+l[58]+" z-10"),o(n,"class","flex flex-col items-center"),o(d,"class","text-sm font-medium"),o(k,"class","badge badge-xs badge-ghost"),o(b,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),o(f,"class","flex-1 -mt-0.5"),o(e,"class","flex gap-3 shrink-0 w-64"),o(R,"class",j="absolute h-full "+l[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),e1(R,"left",l[56]+"%"),e1(R,"width",Math.max(l[55],1)+"%"),o(R,"title",P=l[52].step+": "+go(l[53])+" ("+l[59]+"%)"),o(M,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),o(T,"class","flex-1 flex items-center"),o(D,"class","opacity-60"),o(N,"class","font-semibold"),o(Q,"class","opacity-40"),o(q,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),o(s,"class","flex gap-4 group relative mb-3")},m(B,U){L(B,s,U),t(s,e),t(e,n),t(n,a),t(n,u),z&&z.m(n,null),t(e,c),t(e,f),t(f,d),t(d,m),t(f,g),t(f,b),t(b,k),t(k,C),t(b,E),K&&K.m(b,null),t(s,y),t(s,T),t(T,M),t(M,R),S&&S.m(R,null),t(s,I),t(s,q),t(q,D),t(q,A),t(q,N),t(q,Z),t(q,Q),t(s,x)},p(B,U){U[0]&1&&i!==(i="w-3 h-3 rounded-full "+B[58]+" z-10")&&o(a,"class",i),B[61]<B[0].processingSteps.length-1?z||(z=_d(),z.c(),z.m(n,null)):z&&(z.d(1),z=null),U[0]&1&&p!==(p=B[26](B[52].step)+"")&&v(m,p),U[0]&1&&w!==(w=B[57]+"")&&v(C,w),B[52].detail?K?K.p(B,U):(K=bd(B),K.c(),K.m(b,null)):K&&(K.d(1),K=null),B[55]>5&&S.p(B,U),U[0]&1&&j!==(j="absolute h-full "+B[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&o(R,"class",j),U[0]&1&&P!==(P=B[52].step+": "+go(B[53])+" ("+B[59]+"%)")&&o(R,"title",P)},d(B){B&&H(s),z&&z.d(),K&&K.d(),S&&S.d()}}}function Om(l){let s,e,n=l[24]("logs.detail.path")+"",a,i,u,c=l[0].path+"",f;return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.path")+"")&&v(a,n),p[0]&1&&c!==(c=d[0].path+"")&&v(f,c)},d(d){d&&H(s)}}}function Nm(l){let s,e,n=l[24]("logs.detail.originalPath")+"",a,i,u,c=l[0].path+"",f,d,p,m,g=l[24]("logs.detail.transformedPath")+"",b,k,w,C=l[0].transformedPath+"",E;return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),f=_(c),d=h(),p=r("div"),m=r("div"),b=_(g),k=h(),w=r("div"),E=_(C),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),o(m,"class","text-xs opacity-60 mb-1"),o(w,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(y,T){L(y,s,T),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),L(y,d,T),L(y,p,T),t(p,m),t(m,b),t(p,k),t(p,w),t(w,E)},p(y,T){T[0]&16777216&&n!==(n=y[24]("logs.detail.originalPath")+"")&&v(a,n),T[0]&1&&c!==(c=y[0].path+"")&&v(f,c),T[0]&16777216&&g!==(g=y[24]("logs.detail.transformedPath")+"")&&v(b,g),T[0]&1&&C!==(C=y[0].transformedPath+"")&&v(E,C)},d(y){y&&(H(s),H(d),H(p))}}}function Td(l){let s,e,n=l[24]("logs.detail.query")+"",a,i,u,c=l[0].query+"",f;return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),u=r("div"),f=_(c),o(e,"class","text-xs opacity-60 mb-1"),o(u,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.query")+"")&&v(a,n),p[0]&1&&c!==(c=d[0].query+"")&&v(f,c)},d(d){d&&H(s)}}}function Sd(l){let s,e,n,a=l[24]("logs.detail.routePath")+"",i,u,c,f=l[0].routePath+"",d;return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),d=_(f),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.detail.routePath")+"")&&v(i,a),m[0]&1&&f!==(f=p[0].routePath+"")&&v(d,f)},d(p){p&&H(s)}}}function Md(l){let s,e,n,a=l[24]("logs.detail.upstream")+"",i,u,c,f=l[0].upstream+"",d,p,m=l[0].transformer&&Rd(l);return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),d=_(f),p=h(),m&&m.c(),o(n,"class","card-title text-base mb-2"),o(c,"class","font-mono text-sm mb-2"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(g,b){L(g,s,b),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,d),t(e,p),m&&m.m(e,null)},p(g,b){b[0]&16777216&&a!==(a=g[24]("logs.detail.upstream")+"")&&v(i,a),b[0]&1&&f!==(f=g[0].upstream+"")&&v(d,f),g[0].transformer?m?m.p(g,b):(m=Rd(g),m.c(),m.m(e,null)):m&&(m.d(1),m=null)},d(g){g&&H(s),m&&m.d()}}}function Rd(l){let s,e=l[24]("logs.detail.transformer")+"",n,a,i=l[0].transformer+"",u;return{c(){s=r("div"),n=_(e),a=_(": "),u=_(i),o(s,"class","text-xs opacity-60")},m(c,f){L(c,s,f),t(s,n),t(s,a),t(s,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.detail.transformer")+"")&&v(n,e),f[0]&1&&i!==(i=c[0].transformer+"")&&v(u,i)},d(c){c&&H(s)}}}function qd(l){let s,e,n,a,i,u,c=l[24]("logs.detail.errorInfo")+"",f,d,p,m=l[0].errorMessage+"",g;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("div"),u=r("div"),f=_(c),d=h(),p=r("div"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(u,"class","font-bold"),o(p,"class","font-mono text-sm"),o(s,"class","alert alert-error")},m(b,k){L(b,s,k),t(s,e),t(e,n),t(s,a),t(s,i),t(i,u),t(u,f),t(i,d),t(i,p),t(p,g)},p(b,k){k[0]&16777216&&c!==(c=b[24]("logs.detail.errorInfo")+"")&&v(f,c),k[0]&1&&m!==(m=b[0].errorMessage+"")&&v(g,m)},d(b){b&&H(s)}}}function Hd(l){let s;function e(i,u){return i[0].originalReqHeaderId||i[0].originalReqBodyId?Vm:Um}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","space-y-4")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},d(i){i&&H(s),a.d()}}}function Um(l){let s,e=l[24]("logs.detail.noDataAvailable")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-center py-8 opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noDataAvailable")+"")&&v(n,e)},d(a){a&&H(s)}}}function Vm(l){let s,e,n=l[0].originalReqHeaderId&&Ld(l),a=l[8]&&l[0].originalReqBodyId&&jd(l);return{c(){n&&n.c(),s=h(),a&&a.c(),e=Ul()},m(i,u){n&&n.m(i,u),L(i,s,u),a&&a.m(i,u),L(i,e,u)},p(i,u){i[0].originalReqHeaderId?n?n.p(i,u):(n=Ld(i),n.c(),n.m(s.parentNode,s)):n&&(n.d(1),n=null),i[8]&&i[0].originalReqBodyId?a?a.p(i,u):(a=jd(i),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null)},d(i){i&&(H(s),H(e)),n&&n.d(i),a&&a.d(i)}}}function Ld(l){let s,e,n=l[24]("logs.detail.requestHeaders")+"",a,i;function u(d,p){return d[17]?Km:d[19]?Gm:d[15]!==null?Wm:Jm}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function Jm(l){let s,e=l[24]("logs.detail.noHeaders")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noHeaders")+"")&&v(n,e)},d(a){a&&H(s)}}}function Wm(l){let s,e,n,a,i,u=ut(Object.entries(l[15])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Pd(ud(l,u,f));return{c(){s=r("div"),e=r("table"),n=r("thead"),n.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',a=h(),i=r("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(s,"class","overflow-x-auto")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(e,a),t(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&32768){u=ut(Object.entries(f[15]));let p;for(p=0;p<u.length;p+=1){const m=ud(f,u,p);c[p]?c[p].p(m,d):(c[p]=Pd(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&H(s),Gt(c,f)}}}function Gm(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[19]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&524288&&v(n,a[19])},d(a){a&&H(s)}}}function Km(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Pd(l){let s,e,n=l[43]+"",a,i,u,c=l[44]+"",f,d;return{c(){s=r("tr"),e=r("td"),a=_(n),i=h(),u=r("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){L(p,s,m),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d)},p(p,m){m[0]&32768&&n!==(n=p[43]+"")&&v(a,n),m[0]&32768&&c!==(c=p[44]+"")&&v(f,c)},d(p){p&&H(s)}}}function jd(l){let s,e,n=l[24]("logs.detail.requestBody")+"",a,i;function u(d,p){return d[18]?Xm:d[20]?Zm:d[16]!==null?Qm:Ym}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function Ym(l){let s,e=l[24]("logs.detail.noBody")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noBody")+"")&&v(n,e)},d(a){a&&H(s)}}}function Qm(l){let s,e=Qn(l[16])+"",n;return{c(){s=r("pre"),n=_(e),o(s,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&65536&&e!==(e=Qn(a[16])+"")&&v(n,e)},d(a){a&&H(s)}}}function Zm(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[20]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&1048576&&v(n,a[20])},d(a){a&&H(s)}}}function Xm(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Dd(l){let s;function e(i,u){return i[0].reqHeaderId||i[0].reqBodyId?$m:xm}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","space-y-4")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},d(i){i&&H(s),a.d()}}}function xm(l){let s,e=l[24]("logs.detail.noDataAvailable")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-center py-8 opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noDataAvailable")+"")&&v(n,e)},d(a){a&&H(s)}}}function $m(l){let s,e,n=l[0].reqHeaderId&&Bd(l),a=l[8]&&l[0].reqBodyId&&Ad(l);return{c(){n&&n.c(),s=h(),a&&a.c(),e=Ul()},m(i,u){n&&n.m(i,u),L(i,s,u),a&&a.m(i,u),L(i,e,u)},p(i,u){i[0].reqHeaderId?n?n.p(i,u):(n=Bd(i),n.c(),n.m(s.parentNode,s)):n&&(n.d(1),n=null),i[8]&&i[0].reqBodyId?a?a.p(i,u):(a=Ad(i),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null)},d(i){i&&(H(s),H(e)),n&&n.d(i),a&&a.d(i)}}}function Bd(l){let s,e,n=l[24]("logs.detail.requestHeaders")+"",a,i;function u(d,p){return d[11]?sg:d[13]?lg:d[9]!==null?tg:eg}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestHeaders")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function eg(l){let s,e=l[24]("logs.detail.noHeaders")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noHeaders")+"")&&v(n,e)},d(a){a&&H(s)}}}function tg(l){let s,e,n,a,i,u=ut(Object.entries(l[9])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Id(id(l,u,f));return{c(){s=r("div"),e=r("table"),n=r("thead"),n.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',a=h(),i=r("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(s,"class","overflow-x-auto")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(e,a),t(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&512){u=ut(Object.entries(f[9]));let p;for(p=0;p<u.length;p+=1){const m=id(f,u,p);c[p]?c[p].p(m,d):(c[p]=Id(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&H(s),Gt(c,f)}}}function lg(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[13]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&8192&&v(n,a[13])},d(a){a&&H(s)}}}function sg(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Id(l){let s,e,n=l[43]+"",a,i,u,c=l[44]+"",f,d;return{c(){s=r("tr"),e=r("td"),a=_(n),i=h(),u=r("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){L(p,s,m),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d)},p(p,m){m[0]&512&&n!==(n=p[43]+"")&&v(a,n),m[0]&512&&c!==(c=p[44]+"")&&v(f,c)},d(p){p&&H(s)}}}function Ad(l){let s,e,n=l[24]("logs.detail.requestBody")+"",a,i;function u(d,p){return d[4]?rg:d[6]?ag:d[2]!==null?ng:og}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.requestBody")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function og(l){let s,e=l[24]("logs.detail.noBody")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noBody")+"")&&v(n,e)},d(a){a&&H(s)}}}function ng(l){let s,e=Qn(l[2])+"",n;return{c(){s=r("pre"),n=_(e),o(s,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&4&&e!==(e=Qn(a[2])+"")&&v(n,e)},d(a){a&&H(s)}}}function ag(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[6]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&64&&v(n,a[6])},d(a){a&&H(s)}}}function rg(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Fd(l){let s;function e(i,u){return i[0].respHeaderId||i[0].respBodyId?ug:ig}let n=e(l),a=n(l);return{c(){s=r("div"),a.c(),o(s,"class","space-y-4")},m(i,u){L(i,s,u),a.m(s,null)},p(i,u){n===(n=e(i))&&a?a.p(i,u):(a.d(1),a=n(i),a&&(a.c(),a.m(s,null)))},d(i){i&&H(s),a.d()}}}function ig(l){let s,e=l[24]("logs.detail.noDataAvailable")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-center py-8 opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noDataAvailable")+"")&&v(n,e)},d(a){a&&H(s)}}}function ug(l){let s,e,n=l[0].respHeaderId&&zd(l),a=l[8]&&l[0].respBodyId&&Nd(l);return{c(){n&&n.c(),s=h(),a&&a.c(),e=Ul()},m(i,u){n&&n.m(i,u),L(i,s,u),a&&a.m(i,u),L(i,e,u)},p(i,u){i[0].respHeaderId?n?n.p(i,u):(n=zd(i),n.c(),n.m(s.parentNode,s)):n&&(n.d(1),n=null),i[8]&&i[0].respBodyId?a?a.p(i,u):(a=Nd(i),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null)},d(i){i&&(H(s),H(e)),n&&n.d(i),a&&a.d(i)}}}function zd(l){let s,e,n=l[24]("logs.detail.responseHeaders")+"",a,i;function u(d,p){return d[12]?pg:d[14]?dg:d[10]!==null?cg:fg}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseHeaders")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function fg(l){let s,e=l[24]("logs.detail.noHeaders")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noHeaders")+"")&&v(n,e)},d(a){a&&H(s)}}}function cg(l){let s,e,n,a,i,u=ut(Object.entries(l[10])),c=[];for(let f=0;f<u.length;f+=1)c[f]=Od(rd(l,u,f));return{c(){s=r("div"),e=r("table"),n=r("thead"),n.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',a=h(),i=r("tbody");for(let f=0;f<c.length;f+=1)c[f].c();o(e,"class","table table-sm table-zebra"),o(s,"class","overflow-x-auto")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(e,a),t(e,i);for(let p=0;p<c.length;p+=1)c[p]&&c[p].m(i,null)},p(f,d){if(d[0]&1024){u=ut(Object.entries(f[10]));let p;for(p=0;p<u.length;p+=1){const m=rd(f,u,p);c[p]?c[p].p(m,d):(c[p]=Od(m),c[p].c(),c[p].m(i,null))}for(;p<c.length;p+=1)c[p].d(1);c.length=u.length}},d(f){f&&H(s),Gt(c,f)}}}function dg(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[14]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&16384&&v(n,a[14])},d(a){a&&H(s)}}}function pg(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Od(l){let s,e,n=l[43]+"",a,i,u,c=l[44]+"",f,d;return{c(){s=r("tr"),e=r("td"),a=_(n),i=h(),u=r("td"),f=_(c),d=h(),o(e,"class","font-mono text-xs"),o(u,"class","font-mono text-xs break-all")},m(p,m){L(p,s,m),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d)},p(p,m){m[0]&1024&&n!==(n=p[43]+"")&&v(a,n),m[0]&1024&&c!==(c=p[44]+"")&&v(f,c)},d(p){p&&H(s)}}}function Nd(l){let s,e,n=l[24]("logs.detail.responseBody")+"",a,i;function u(d,p){return d[5]?_g:d[7]?gg:d[3]!==null?mg:hg}let c=u(l),f=c(l);return{c(){s=r("div"),e=r("div"),a=_(n),i=h(),f.c(),o(e,"class","text-sm font-semibold mb-2")},m(d,p){L(d,s,p),t(s,e),t(e,a),t(s,i),f.m(s,null)},p(d,p){p[0]&16777216&&n!==(n=d[24]("logs.detail.responseBody")+"")&&v(a,n),c===(c=u(d))&&f?f.p(d,p):(f.d(1),f=c(d),f&&(f.c(),f.m(s,null)))},d(d){d&&H(s),f.d()}}}function hg(l){let s,e=l[24]("logs.detail.noBody")+"",n;return{c(){s=r("div"),n=_(e),o(s,"class","text-sm opacity-60")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&16777216&&e!==(e=a[24]("logs.detail.noBody")+"")&&v(n,e)},d(a){a&&H(s)}}}function mg(l){let s,e=Qn(l[3])+"",n;return{c(){s=r("pre"),n=_(e),o(s,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&8&&e!==(e=Qn(a[3])+"")&&v(n,e)},d(a){a&&H(s)}}}function gg(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[7]),o(e,"class","text-sm"),o(s,"class","alert alert-error")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i[0]&128&&v(n,a[7])},d(a){a&&H(s)}}}function _g(l){let s,e,n,a,i=l[24]("common.loading")+"",u;return{c(){s=r("div"),e=r("span"),n=h(),a=r("span"),u=_(i),o(e,"class","loading loading-spinner loading-sm"),o(a,"class","text-sm"),o(s,"class","flex items-center gap-2")},m(c,f){L(c,s,f),t(s,e),t(s,n),t(s,a),t(a,u)},p(c,f){f[0]&16777216&&i!==(i=c[24]("common.loading")+"")&&v(u,i)},d(c){c&&H(s)}}}function Ud(l){let s,e,n,a=l[24]("logs.detail.authInfo")+"",i,u,c,f,d,p=l[24]("logs.detail.authLevel")+"",m,g,b,k=l[0].authLevel+"",w,C,E,y,T=l[24]("logs.detail.authResult")+"",M,R,j,P=(l[0].authSuccess?l[24]("logs.detail.authSuccess"):l[24]("logs.detail.authFailed"))+"",I,q;return{c(){s=r("div"),e=r("div"),n=r("h4"),i=_(a),u=h(),c=r("div"),f=r("div"),d=r("div"),m=_(p),g=h(),b=r("div"),w=_(k),C=h(),E=r("div"),y=r("div"),M=_(T),R=h(),j=r("span"),I=_(P),o(n,"class","card-title text-base mb-2"),o(d,"class","text-xs opacity-60 mb-1"),o(b,"class","text-sm"),o(y,"class","text-xs opacity-60 mb-1"),o(j,"class",q="badge "+(l[0].authSuccess?"badge-success":"badge-error")),o(c,"class","grid grid-cols-2 gap-4"),o(e,"class","card-body p-4"),o(s,"class","card bg-base-200")},m(D,A){L(D,s,A),t(s,e),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,d),t(d,m),t(f,g),t(f,b),t(b,w),t(c,C),t(c,E),t(E,y),t(y,M),t(E,R),t(E,j),t(j,I)},p(D,A){A[0]&16777216&&a!==(a=D[24]("logs.detail.authInfo")+"")&&v(i,a),A[0]&16777216&&p!==(p=D[24]("logs.detail.authLevel")+"")&&v(m,p),A[0]&1&&k!==(k=D[0].authLevel+"")&&v(w,k),A[0]&16777216&&T!==(T=D[24]("logs.detail.authResult")+"")&&v(M,T),A[0]&16777217&&P!==(P=(D[0].authSuccess?D[24]("logs.detail.authSuccess"):D[24]("logs.detail.authFailed"))+"")&&v(I,P),A[0]&1&&q!==(q="badge "+(D[0].authSuccess?"badge-success":"badge-error"))&&o(j,"class",q)},d(D){D&&H(s)}}}function bg(l){let s,e,n,a,i=l[24]("logs.detail.title")+"",u,c,f,d,p,m,g,b,k,w,C,E=l[24]("logs.detail.downloadJson")+"",y,T,M,R,j,P,I,q,D,A=l[24]("logs.detail.overview")+"",N,Z,Q,x,z,K=l[24]("logs.detail.status")+"",S,B,U,F=l[0].status+"",J,ie,ue,ne,$,te=l[24]("logs.detail.method")+"",ae,ee,G,pe=l[0].method+"",oe,ge,he,ye,ze=l[24]("logs.requestType")+"",Pe,we,Fe,Je=l[25](l[0].requestType)+"",je,Le,Se,fe,_e,Ie,De=l[24]("logs.detail.duration")+"",se,ke,me,Ee=go(l[0].duration)+"",Ve,Be,nt,Ne,Qe=l[24]("logs.detail.timestamp")+"",Ye,ve,de,Te=Vd(l[0].timestamp)+"",Ze,Me,Ue,Ce,mt=l[24]("logs.detail.requestId")+"",Ge,ce,qe,Re=l[0].requestId+"",dt,We,O,He,X=l[24]("logs.detail.processingSteps")+"",ft,Ht,Ke,_t,tt,it,Oe,Xe,It=l[24]("logs.detail.requestInfo")+"",rt,gt,wt,pt,bl,at,St,ht,Tt,vl,At,hl,ml,ql,Jt,Yl,Yt,Qt=l[24]("logs.detail.tabOriginalRequest")+"",Hl,Bl,gl,sl,Ql,Ft,Ll=l[24]("logs.detail.tabFinalRequest")+"",Vl,Jl,Cl,zt,Zl,Lt,Pl=l[24]("logs.detail.tabResponse")+"",jl,$l,xt,kl,es,zl,Il,Wl,Ls;function ol(Xt,$e){return Xt[23]?Im:Bm}let wl=ol(l),nl=wl(l);function Ol(Xt,$e){return Xt[0].processingSteps&&Xt[0].processingSteps.length>0?Fm:Am}let al=Ol(l),_l=al(l),tl=l[0].processingSteps&&l[0].processingSteps.length>0&&md(Su(l));function Dl(Xt,$e){return Xt[0].transformedPath&&Xt[0].transformedPath!==Xt[0].path?Nm:Om}let Nl=Dl(l),El=Nl(l),Wt=l[0].query&&Td(l),Bt=l[0].routePath&&Sd(l),Pt=l[0].upstream&&Md(l),$t=l[0].errorMessage&&qd(l),el=l[21]==="original"&&Hd(l),Kt=l[21]==="transformed"&&Dd(l),Zt=l[21]==="response"&&Fd(l),rl=l[0].authLevel&&Ud(l);return Il=Mu(l[33][0]),{c(){s=r("div"),e=r("div"),n=r("div"),a=r("h3"),u=_(i),c=h(),f=r("div"),d=r("button"),nl.c(),m=h(),g=r("button"),b=re("svg"),k=re("path"),w=h(),C=r("span"),y=_(E),M=h(),R=r("button"),R.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',j=h(),P=r("div"),I=r("div"),q=r("div"),D=r("h4"),N=_(A),Z=h(),Q=r("div"),x=r("div"),z=r("div"),S=_(K),B=h(),U=r("span"),J=_(F),ue=h(),ne=r("div"),$=r("div"),ae=_(te),ee=h(),G=r("span"),oe=_(pe),ge=h(),he=r("div"),ye=r("div"),Pe=_(ze),we=h(),Fe=r("span"),je=_(Je),fe=h(),_e=r("div"),Ie=r("div"),se=_(De),ke=h(),me=r("div"),Ve=_(Ee),Be=h(),nt=r("div"),Ne=r("div"),Ye=_(Qe),ve=h(),de=r("div"),Ze=_(Te),Me=h(),Ue=r("div"),Ce=r("div"),Ge=_(mt),ce=h(),qe=r("div"),dt=_(Re),We=h(),O=r("div"),He=r("div"),ft=_(X),Ht=h(),Ke=r("div"),_l.c(),_t=h(),tl&&tl.c(),tt=h(),it=r("div"),Oe=r("div"),Xe=r("h4"),rt=_(It),gt=h(),wt=r("div"),El.c(),pt=h(),Wt&&Wt.c(),bl=h(),at=r("div"),Bt&&Bt.c(),St=h(),Pt&&Pt.c(),ht=h(),$t&&$t.c(),Tt=h(),vl=r("div"),At=r("div"),hl=r("div"),ml=r("div"),ql=r("label"),Jt=r("input"),Yl=h(),Yt=r("span"),Hl=_(Qt),Bl=h(),gl=r("label"),sl=r("input"),Ql=h(),Ft=r("span"),Vl=_(Ll),Jl=h(),Cl=r("label"),zt=r("input"),Zl=h(),Lt=r("span"),jl=_(Pl),$l=h(),xt=r("div"),el&&el.c(),kl=h(),Kt&&Kt.c(),es=h(),Zt&&Zt.c(),zl=h(),rl&&rl.c(),o(a,"id","modal-title"),o(a,"class","font-bold text-xl"),o(d,"class","btn btn-sm btn-ghost"),o(d,"title",p=l[24]("logs.detail.copyToClipboard")),o(k,"stroke-linecap","round"),o(k,"stroke-linejoin","round"),o(k,"stroke-width","2"),o(k,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(b,"xmlns","http://www.w3.org/2000/svg"),o(b,"class","h-4 w-4"),o(b,"fill","none"),o(b,"viewBox","0 0 24 24"),o(b,"stroke","currentColor"),o(C,"class","hidden md:inline"),o(g,"class","btn btn-sm btn-ghost"),o(g,"title",T=l[24]("logs.detail.downloadJson")),o(R,"class","btn btn-sm btn-circle btn-ghost"),o(f,"class","flex items-center gap-2"),o(n,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),o(D,"class","card-title text-base mb-3"),o(z,"class","text-xs opacity-60 mb-1"),o(U,"class",ie="badge "+Jd(l[0].status)+" badge-lg"),o($,"class","text-xs opacity-60 mb-1"),o(G,"class","badge badge-lg"),o(ye,"class","text-xs opacity-60 mb-1"),o(Fe,"class",Le="badge "+Wd(l[0].requestType)+" badge-lg"),o(Fe,"title",Se=l[24](\`logs.requestType_\${l[0].requestType}_desc\`)),o(Ie,"class","text-xs opacity-60 mb-1"),o(me,"class","font-semibold"),o(Ne,"class","text-xs opacity-60 mb-1"),o(de,"class","text-sm"),o(Ce,"class","text-xs opacity-60 mb-1"),o(qe,"class","font-mono text-xs break-all"),o(Ue,"class","col-span-2"),o(He,"class","text-xs opacity-60 mb-1"),o(Ke,"class","flex gap-2 flex-wrap"),o(O,"class","col-span-2 md:col-span-3 lg:col-span-6"),o(Q,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),o(q,"class","card-body p-4"),o(I,"class","card bg-base-200"),o(Xe,"class","card-title text-base mb-3"),o(wt,"class","space-y-2"),o(Oe,"class","card-body p-4"),o(it,"class","card bg-base-200"),o(at,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),o(Jt,"class","sr-only"),o(Jt,"type","radio"),o(Jt,"name","activeTab"),Jt.__value="original",Y(Jt,Jt.__value),o(Yt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Yt,"bg-primary",l[21]==="original"),le(Yt,"text-primary-content",l[21]==="original"),le(Yt,"shadow",l[21]==="original"),le(Yt,"text-gray-700",l[21]!=="original"),le(Yt,"dark:text-gray-300",l[21]!=="original"),le(Yt,"hover:text-gray-900",l[21]!=="original"),le(Yt,"dark:hover:text-gray-100",l[21]!=="original"),o(ql,"class","cursor-pointer"),o(sl,"class","sr-only"),o(sl,"type","radio"),o(sl,"name","activeTab"),sl.__value="transformed",Y(sl,sl.__value),o(Ft,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Ft,"bg-primary",l[21]==="transformed"),le(Ft,"text-primary-content",l[21]==="transformed"),le(Ft,"shadow",l[21]==="transformed"),le(Ft,"text-gray-700",l[21]!=="transformed"),le(Ft,"dark:text-gray-300",l[21]!=="transformed"),le(Ft,"hover:text-gray-900",l[21]!=="transformed"),le(Ft,"dark:hover:text-gray-100",l[21]!=="transformed"),o(gl,"class","cursor-pointer"),o(zt,"class","sr-only"),o(zt,"type","radio"),o(zt,"name","activeTab"),zt.__value="response",Y(zt,zt.__value),o(Lt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),le(Lt,"bg-primary",l[21]==="response"),le(Lt,"text-primary-content",l[21]==="response"),le(Lt,"shadow",l[21]==="response"),le(Lt,"text-gray-700",l[21]!=="response"),le(Lt,"dark:text-gray-300",l[21]!=="response"),le(Lt,"hover:text-gray-900",l[21]!=="response"),le(Lt,"dark:hover:text-gray-100",l[21]!=="response"),o(Cl,"class","cursor-pointer"),o(ml,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),o(hl,"class","p-2 border-b border-base-300 flex justify-center"),o(xt,"class","p-4"),o(At,"class","card-body p-0"),o(vl,"class","card bg-base-200"),o(P,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),o(e,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),o(e,"role","dialog"),o(e,"aria-labelledby","modal-title"),o(e,"aria-modal","true"),o(s,"class","modal modal-open"),o(s,"role","presentation"),Il.p(Jt,sl,zt)},m(Xt,$e){L(Xt,s,$e),t(s,e),t(e,n),t(n,a),t(a,u),t(n,c),t(n,f),t(f,d),nl.m(d,null),t(f,m),t(f,g),t(g,b),t(b,k),t(g,w),t(g,C),t(C,y),t(f,M),t(f,R),t(e,j),t(e,P),t(P,I),t(I,q),t(q,D),t(D,N),t(q,Z),t(q,Q),t(Q,x),t(x,z),t(z,S),t(x,B),t(x,U),t(U,J),t(Q,ue),t(Q,ne),t(ne,$),t($,ae),t(ne,ee),t(ne,G),t(G,oe),t(Q,ge),t(Q,he),t(he,ye),t(ye,Pe),t(he,we),t(he,Fe),t(Fe,je),t(Q,fe),t(Q,_e),t(_e,Ie),t(Ie,se),t(_e,ke),t(_e,me),t(me,Ve),t(Q,Be),t(Q,nt),t(nt,Ne),t(Ne,Ye),t(nt,ve),t(nt,de),t(de,Ze),t(Q,Me),t(Q,Ue),t(Ue,Ce),t(Ce,Ge),t(Ue,ce),t(Ue,qe),t(qe,dt),t(Q,We),t(Q,O),t(O,He),t(He,ft),t(O,Ht),t(O,Ke),_l.m(Ke,null),t(P,_t),tl&&tl.m(P,null),t(P,tt),t(P,it),t(it,Oe),t(Oe,Xe),t(Xe,rt),t(Oe,gt),t(Oe,wt),El.m(wt,null),t(wt,pt),Wt&&Wt.m(wt,null),t(P,bl),t(P,at),Bt&&Bt.m(at,null),t(at,St),Pt&&Pt.m(at,null),t(P,ht),$t&&$t.m(P,null),t(P,Tt),t(P,vl),t(vl,At),t(At,hl),t(hl,ml),t(ml,ql),t(ql,Jt),Jt.checked=Jt.__value===l[21],t(ql,Yl),t(ql,Yt),t(Yt,Hl),t(ml,Bl),t(ml,gl),t(gl,sl),sl.checked=sl.__value===l[21],t(gl,Ql),t(gl,Ft),t(Ft,Vl),t(ml,Jl),t(ml,Cl),t(Cl,zt),zt.checked=zt.__value===l[21],t(Cl,Zl),t(Cl,Lt),t(Lt,jl),t(At,$l),t(At,xt),el&&el.m(xt,null),t(xt,kl),Kt&&Kt.m(xt,null),t(xt,es),Zt&&Zt.m(xt,null),t(P,zl),rl&&rl.m(P,null),Wl||(Ls=[V(d,"click",l[29]),V(g,"click",l[30]),V(R,"click",function(){sa(l[1])&&l[1].apply(this,arguments)}),V(Jt,"change",l[32]),V(sl,"change",l[34]),V(zt,"change",l[35]),V(s,"click",l[28]),V(s,"keydown",l[36])],Wl=!0)},p(Xt,$e){l=Xt,$e[0]&16777216&&i!==(i=l[24]("logs.detail.title")+"")&&v(u,i),wl===(wl=ol(l))&&nl?nl.p(l,$e):(nl.d(1),nl=wl(l),nl&&(nl.c(),nl.m(d,null))),$e[0]&16777216&&p!==(p=l[24]("logs.detail.copyToClipboard"))&&o(d,"title",p),$e[0]&16777216&&E!==(E=l[24]("logs.detail.downloadJson")+"")&&v(y,E),$e[0]&16777216&&T!==(T=l[24]("logs.detail.downloadJson"))&&o(g,"title",T),$e[0]&16777216&&A!==(A=l[24]("logs.detail.overview")+"")&&v(N,A),$e[0]&16777216&&K!==(K=l[24]("logs.detail.status")+"")&&v(S,K),$e[0]&1&&F!==(F=l[0].status+"")&&v(J,F),$e[0]&1&&ie!==(ie="badge "+Jd(l[0].status)+" badge-lg")&&o(U,"class",ie),$e[0]&16777216&&te!==(te=l[24]("logs.detail.method")+"")&&v(ae,te),$e[0]&1&&pe!==(pe=l[0].method+"")&&v(oe,pe),$e[0]&16777216&&ze!==(ze=l[24]("logs.requestType")+"")&&v(Pe,ze),$e[0]&1&&Je!==(Je=l[25](l[0].requestType)+"")&&v(je,Je),$e[0]&1&&Le!==(Le="badge "+Wd(l[0].requestType)+" badge-lg")&&o(Fe,"class",Le),$e[0]&16777217&&Se!==(Se=l[24](\`logs.requestType_\${l[0].requestType}_desc\`))&&o(Fe,"title",Se),$e[0]&16777216&&De!==(De=l[24]("logs.detail.duration")+"")&&v(se,De),$e[0]&1&&Ee!==(Ee=go(l[0].duration)+"")&&v(Ve,Ee),$e[0]&16777216&&Qe!==(Qe=l[24]("logs.detail.timestamp")+"")&&v(Ye,Qe),$e[0]&1&&Te!==(Te=Vd(l[0].timestamp)+"")&&v(Ze,Te),$e[0]&16777216&&mt!==(mt=l[24]("logs.detail.requestId")+"")&&v(Ge,mt),$e[0]&1&&Re!==(Re=l[0].requestId+"")&&v(dt,Re),$e[0]&16777216&&X!==(X=l[24]("logs.detail.processingSteps")+"")&&v(ft,X),al===(al=Ol(l))&&_l?_l.p(l,$e):(_l.d(1),_l=al(l),_l&&(_l.c(),_l.m(Ke,null))),l[0].processingSteps&&l[0].processingSteps.length>0?tl?tl.p(Su(l),$e):(tl=md(Su(l)),tl.c(),tl.m(P,tt)):tl&&(tl.d(1),tl=null),$e[0]&16777216&&It!==(It=l[24]("logs.detail.requestInfo")+"")&&v(rt,It),Nl===(Nl=Dl(l))&&El?El.p(l,$e):(El.d(1),El=Nl(l),El&&(El.c(),El.m(wt,pt))),l[0].query?Wt?Wt.p(l,$e):(Wt=Td(l),Wt.c(),Wt.m(wt,null)):Wt&&(Wt.d(1),Wt=null),l[0].routePath?Bt?Bt.p(l,$e):(Bt=Sd(l),Bt.c(),Bt.m(at,St)):Bt&&(Bt.d(1),Bt=null),l[0].upstream?Pt?Pt.p(l,$e):(Pt=Md(l),Pt.c(),Pt.m(at,null)):Pt&&(Pt.d(1),Pt=null),l[0].errorMessage?$t?$t.p(l,$e):($t=qd(l),$t.c(),$t.m(P,Tt)):$t&&($t.d(1),$t=null),$e[0]&2097152&&(Jt.checked=Jt.__value===l[21]),$e[0]&16777216&&Qt!==(Qt=l[24]("logs.detail.tabOriginalRequest")+"")&&v(Hl,Qt),$e[0]&2097152&&le(Yt,"bg-primary",l[21]==="original"),$e[0]&2097152&&le(Yt,"text-primary-content",l[21]==="original"),$e[0]&2097152&&le(Yt,"shadow",l[21]==="original"),$e[0]&2097152&&le(Yt,"text-gray-700",l[21]!=="original"),$e[0]&2097152&&le(Yt,"dark:text-gray-300",l[21]!=="original"),$e[0]&2097152&&le(Yt,"hover:text-gray-900",l[21]!=="original"),$e[0]&2097152&&le(Yt,"dark:hover:text-gray-100",l[21]!=="original"),$e[0]&2097152&&(sl.checked=sl.__value===l[21]),$e[0]&16777216&&Ll!==(Ll=l[24]("logs.detail.tabFinalRequest")+"")&&v(Vl,Ll),$e[0]&2097152&&le(Ft,"bg-primary",l[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-primary-content",l[21]==="transformed"),$e[0]&2097152&&le(Ft,"shadow",l[21]==="transformed"),$e[0]&2097152&&le(Ft,"text-gray-700",l[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:text-gray-300",l[21]!=="transformed"),$e[0]&2097152&&le(Ft,"hover:text-gray-900",l[21]!=="transformed"),$e[0]&2097152&&le(Ft,"dark:hover:text-gray-100",l[21]!=="transformed"),$e[0]&2097152&&(zt.checked=zt.__value===l[21]),$e[0]&16777216&&Pl!==(Pl=l[24]("logs.detail.tabResponse")+"")&&v(jl,Pl),$e[0]&2097152&&le(Lt,"bg-primary",l[21]==="response"),$e[0]&2097152&&le(Lt,"text-primary-content",l[21]==="response"),$e[0]&2097152&&le(Lt,"shadow",l[21]==="response"),$e[0]&2097152&&le(Lt,"text-gray-700",l[21]!=="response"),$e[0]&2097152&&le(Lt,"dark:text-gray-300",l[21]!=="response"),$e[0]&2097152&&le(Lt,"hover:text-gray-900",l[21]!=="response"),$e[0]&2097152&&le(Lt,"dark:hover:text-gray-100",l[21]!=="response"),l[21]==="original"?el?el.p(l,$e):(el=Hd(l),el.c(),el.m(xt,kl)):el&&(el.d(1),el=null),l[21]==="transformed"?Kt?Kt.p(l,$e):(Kt=Dd(l),Kt.c(),Kt.m(xt,es)):Kt&&(Kt.d(1),Kt=null),l[21]==="response"?Zt?Zt.p(l,$e):(Zt=Fd(l),Zt.c(),Zt.m(xt,null)):Zt&&(Zt.d(1),Zt=null),l[0].authLevel?rl?rl.p(l,$e):(rl=Ud(l),rl.c(),rl.m(P,null)):rl&&(rl.d(1),rl=null)},i:ot,o:ot,d(Xt){Xt&&H(s),nl.d(),_l.d(),tl&&tl.d(),El.d(),Wt&&Wt.d(),Bt&&Bt.d(),Pt&&Pt.d(),$t&&$t.d(),el&&el.d(),Kt&&Kt.d(),Zt&&Zt.d(),rl&&rl.d(),Il.r(),Wl=!1,vt(Ls)}}}function Vd(l){return new Date(l).toLocaleString()}function go(l){return l<1e3?\`\${l}ms\`:\`\${(l/1e3).toFixed(2)}s\`}function Jd(l){return l<300?"badge-success":l<400?"badge-info":l<500?"badge-warning":"badge-error"}function Wd(l){return l==="final"?"badge-success":l==="retry"?"badge-warning":l==="recovery"?"badge-info":"badge-ghost"}function Qn(l){return JSON.stringify(l,null,2)}function vg(l){const s=l.toLowerCase();return s.includes("auth")?"bg-blue-500":s.includes("plugin")?"bg-purple-500":s.includes("upstream")||s.includes("proxy")||s.includes("selected")?"bg-green-500":s.includes("transform")||s.includes("rewrite")?"bg-orange-500":s.includes("error")||s.includes("failed")?"bg-red-500":s.includes("retry")||s.includes("recover")||s.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function kg(l){const s=l.toLowerCase();return s.includes("auth")?"Auth":s.includes("plugin")?"Plugin":s.includes("upstream")||s.includes("proxy")||s.includes("selected")?"Upstream":s.includes("transform")||s.includes("rewrite")?"Transform":s.includes("retry")||s.includes("recover")||s.includes("circuit")?"Retry":"Other"}function wg(l,s,e){let n;Dt(l,Rt,G=>e(24,n=G));let{log:a}=s,{onClose:i}=s,u=null,c=null,f=!1,d=!1,p=null,m=null,g=!1,b=null,k=null,w=!1,C=!1,E=null,y=null,T=null,M=null,R=!1,j=!1,P=null,I=null,q="original",D=!1,A=!1;function N(G){return G?n(\`logs.requestType_\${G}\`):"-"}function Z(G){const pe=\`logs.steps.\${G}\`,oe=n(pe);return oe===pe?G.split("_").map(ge=>ge.charAt(0).toUpperCase()+ge.slice(1)).join(" "):oe}function Q(){if(!a.processingSteps||a.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const G=a.processingSteps,pe=G[0].timestamp,oe=G.map((ye,ze)=>ze===G.length-1?a.duration-(ye.timestamp-pe):G[ze+1].timestamp-ye.timestamp),ge=G.map(ye=>ye.timestamp-pe),he=a.duration;return{durations:oe,relativeTime:ge,totalDuration:he}}function x(G){G.target===G.currentTarget&&i()}async function z(){const G={requestId:a.requestId,timestamp:a.timestamp,method:a.method,path:a.path,status:a.status,duration:a.duration,originalRequestHeaders:T,originalRequestBody:M,requestHeaders:b,requestBody:u,responseHeaders:k,responseBody:c,processingSteps:a.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(G,null,2)),e(23,A=!0),setTimeout(()=>{e(23,A=!1)},2e3)}catch(pe){console.error("Failed to copy:",pe)}}async function K(){const G={requestId:a.requestId,timestamp:a.timestamp,method:a.method,path:a.path,status:a.status,duration:a.duration,originalRequestHeaders:T,originalRequestBody:M,requestHeaders:b,requestBody:u,responseHeaders:k,responseBody:c,processingSteps:a.processingSteps},pe=new Blob([JSON.stringify(G,null,2)],{type:"application/json"}),oe=URL.createObjectURL(pe),ge=document.createElement("a");ge.href=oe,ge.download=\`log-\${a.requestId}.json\`,ge.click(),URL.revokeObjectURL(oe)}async function S(){if(!(!a.reqBodyId||u!==null)){e(4,f=!0),e(6,p=null);try{e(2,u=await Eu(a.reqBodyId))}catch(G){e(6,p=G instanceof Error?G.message:"Failed to load request body")}finally{e(4,f=!1)}}}async function B(){if(!(!a.respBodyId||c!==null)){e(5,d=!0),e(7,m=null);try{e(3,c=await Eu(a.respBodyId))}catch(G){e(7,m=G instanceof Error?G.message:"Failed to load response body")}finally{e(5,d=!1)}}}async function U(){if(!(!a.reqHeaderId||b!==null)){e(11,w=!0),e(13,E=null);try{e(9,b=await Tu(a.reqHeaderId))}catch(G){e(13,E=G instanceof Error?G.message:"Failed to load request headers")}finally{e(11,w=!1)}}}async function F(){if(!(!a.respHeaderId||k!==null)){e(12,C=!0),e(14,y=null);try{e(10,k=await Tu(a.respHeaderId))}catch(G){e(14,y=G instanceof Error?G.message:"Failed to load response headers")}finally{e(12,C=!1)}}}async function J(){if(!(!a.originalReqHeaderId||T!==null)){e(17,R=!0),e(19,P=null);try{e(15,T=await Tu(a.originalReqHeaderId))}catch(G){e(19,P=G instanceof Error?G.message:"Failed to load original request headers")}finally{e(17,R=!1)}}}async function ie(){if(!(!a.originalReqBodyId||M!==null)){e(18,j=!0),e(20,I=null);try{e(16,M=await Eu(a.originalReqBodyId))}catch(G){e(20,I=G instanceof Error?G.message:"Failed to load original request body")}finally{e(18,j=!1)}}}Hs(async()=>{try{const G=await Pu();e(8,g=G.logging?.body?.enabled||!1)}catch(G){console.error("Failed to load config:",G),e(8,g=!1)}a.originalReqHeaderId&&J(),a.originalReqBodyId&&ie(),a.reqHeaderId&&U(),a.respHeaderId&&F(),a.reqBodyId&&S(),a.respBodyId&&B()});const ue=[[]],ne=()=>e(22,D=!D);function $(){q=this.__value,e(21,q)}function te(){q=this.__value,e(21,q)}function ae(){q=this.__value,e(21,q)}const ee=G=>G.key==="Escape"&&i();return l.$$set=G=>{"log"in G&&e(0,a=G.log),"onClose"in G&&e(1,i=G.onClose)},[a,i,u,c,f,d,p,m,g,b,k,w,C,E,y,T,M,R,j,P,I,q,D,A,n,N,Z,Q,x,z,K,ne,$,ue,te,ae,ee]}class yg extends Nt{constructor(s){super(),Ut(this,s,wg,bg,Vt,{log:0,onClose:1},null,[-1,-1,-1])}}function Gd(l,s,e){const n=l.slice();return n[104]=s[e],n}function Kd(l){let s,e,n,a,i,u=l[24]("logs.newDataAvailable")+"",c,f,d,p,m=l[24]("common.refresh")+"",g,b,k;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=h(),d=r("div"),p=r("button"),g=_(m),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(p,"class","btn btn-sm"),o(d,"class","flex-none"),o(s,"class","alert alert-info shadow-lg mb-4")},m(w,C){L(w,s,C),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(s,f),t(s,d),t(d,p),t(p,g),b||(k=V(p,"click",l[29]),b=!0)},p(w,C){C[0]&16777216&&u!==(u=w[24]("logs.newDataAvailable")+"")&&v(c,u),C[0]&16777216&&m!==(m=w[24]("common.refresh")+"")&&v(g,m)},d(w){w&&H(s),b=!1,k()}}}function Yd(l){let s;return{c(){s=r("span"),s.textContent="1",o(s,"class","badge badge-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Qd(l){let s;return{c(){s=r("span"),s.textContent="1",o(s,"class","badge badge-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Zd(l){let s;return{c(){s=r("span"),s.textContent="1",o(s,"class","badge badge-sm")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function Xd(l){let s,e=[l[5],l[8]!=="recent"||l[9]!==1,l[6]!=="timestamp"||l[7]!=="desc"].filter(Boolean).length+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&992&&e!==(e=[a[5],a[8]!=="recent"||a[9]!==1,a[6]!=="timestamp"||a[7]!=="desc"].filter(Boolean).length+"")&&v(n,e)},d(a){a&&H(s)}}}function xd(l){let s,e,n,a=l[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[9]),f||(d=V(c,"input",l[45]),f=!0)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.recentHours")+"")&&v(i,a),m[0]&512&&Mt(c.value)!==p[9]&&Y(c,p[9])},d(p){p&&H(s),f=!1,d()}}}function $d(l){let s,e,n,a=l[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=l[24]("logs.endTime")+"",b,k,w,C,E;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),f=h(),d=r("div"),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[10]),L(y,f,T),L(y,d,T),t(d,p),t(p,m),t(m,b),t(d,k),t(d,w),Y(w,l[11]),C||(E=[V(c,"input",l[46]),V(w,"input",l[47])],C=!0)},p(y,T){T[0]&16777216&&a!==(a=y[24]("logs.startTime")+"")&&v(i,a),T[0]&1024&&Y(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&v(b,g),T[0]&2048&&Y(w,y[11])},d(y){y&&(H(s),H(f),H(d)),C=!1,vt(E)}}}function ep(l){let s,e;return{c(){s=r("span"),e=_(l[13]),o(s,"class","badge badge-sm badge-primary")},m(n,a){L(n,s,a),t(s,e)},p(n,a){a[0]&8192&&v(e,n[13])},d(n){n&&H(s)}}}function tp(l){let s,e,n,a=l[24]("logs.refreshInterval")+"",i,u,c,f,d=l[24]("logs.refreshEvery5s")+"",p,m,g=l[24]("logs.refreshEvery10s")+"",b,k,w=l[24]("logs.refreshEvery30s")+"",C,E,y=l[24]("logs.refreshEvery60s")+"",T,M,R;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("select"),f=r("option"),p=_(d),m=r("option"),b=_(g),k=r("option"),C=_(w),E=r("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Y(f,f.__value),m.__value="10s",Y(m,m.__value),k.__value="30s",Y(k,k.__value),E.__value="60s",Y(E,E.__value),o(c,"class","select select-bordered select-sm"),l[13]===void 0&&pl(()=>l[51].call(c)),o(s,"class","form-control")},m(j,P){L(j,s,P),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),t(c,f),t(f,p),t(c,m),t(m,b),t(c,k),t(k,C),t(c,E),t(E,T),kt(c,l[13],!0),M||(R=V(c,"change",l[51]),M=!0)},p(j,P){P[0]&16777216&&a!==(a=j[24]("logs.refreshInterval")+"")&&v(i,a),P[0]&16777216&&d!==(d=j[24]("logs.refreshEvery5s")+"")&&v(p,d),P[0]&16777216&&g!==(g=j[24]("logs.refreshEvery10s")+"")&&v(b,g),P[0]&16777216&&w!==(w=j[24]("logs.refreshEvery30s")+"")&&v(C,w),P[0]&16777216&&y!==(y=j[24]("logs.refreshEvery60s")+"")&&v(T,y),P[0]&8192&&kt(c,j[13])},d(j){j&&H(s),M=!1,R()}}}function lp(l){let s,e,n,a,i=l[24]("logs.clearFilters")+"",u,c,f;return{c(){s=r("button"),e=re("svg"),n=re("path"),a=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(s,"type","button"),o(s,"class","btn btn-sm btn-ghost gap-1")},m(d,p){L(d,s,p),t(s,e),t(e,n),t(s,a),t(s,u),c||(f=V(s,"click",l[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&v(u,i)},d(d){d&&H(s),c=!1,f()}}}function sp(l){let s,e=[l[2],l[3],l[4]!==void 0,l[5],l[8]!=="recent"||l[9]!==1,l[6]!=="timestamp"||l[7]!=="desc"].filter(Boolean).length+"",n;return{c(){s=r("span"),n=_(e),o(s,"class","badge badge-sm")},m(a,i){L(a,s,i),t(s,n)},p(a,i){i[0]&1020&&e!==(e=[a[2],a[3],a[4]!==void 0,a[5],a[8]!=="recent"||a[9]!==1,a[6]!=="timestamp"||a[7]!=="desc"].filter(Boolean).length+"")&&v(n,e)},d(a){a&&H(s)}}}function op(l){let s,e,n,a=l[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[9]),f||(d=V(c,"input",l[59]),f=!0)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.recentHours")+"")&&v(i,a),m[0]&512&&Mt(c.value)!==p[9]&&Y(c,p[9])},d(p){p&&H(s),f=!1,d()}}}function np(l){let s,e,n,a=l[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=l[24]("logs.endTime")+"",b,k,w,C,E;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),f=h(),d=r("div"),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[10]),L(y,f,T),L(y,d,T),t(d,p),t(p,m),t(m,b),t(d,k),t(d,w),Y(w,l[11]),C||(E=[V(c,"input",l[60]),V(w,"input",l[61])],C=!0)},p(y,T){T[0]&16777216&&a!==(a=y[24]("logs.startTime")+"")&&v(i,a),T[0]&1024&&Y(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&v(b,g),T[0]&2048&&Y(w,y[11])},d(y){y&&(H(s),H(f),H(d)),C=!1,vt(E)}}}function ap(l){let s,e,n,a=l[24]("logs.refreshInterval")+"",i,u,c,f,d=l[24]("logs.refreshEvery5s")+"",p,m,g=l[24]("logs.refreshEvery10s")+"",b,k,w=l[24]("logs.refreshEvery30s")+"",C,E,y=l[24]("logs.refreshEvery60s")+"",T,M,R;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("select"),f=r("option"),p=_(d),m=r("option"),b=_(g),k=r("option"),C=_(w),E=r("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Y(f,f.__value),m.__value="10s",Y(m,m.__value),k.__value="30s",Y(k,k.__value),E.__value="60s",Y(E,E.__value),o(c,"class","select select-bordered select-sm"),l[13]===void 0&&pl(()=>l[65].call(c)),o(s,"class","form-control")},m(j,P){L(j,s,P),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),t(c,f),t(f,p),t(c,m),t(m,b),t(c,k),t(k,C),t(c,E),t(E,T),kt(c,l[13],!0),M||(R=V(c,"change",l[65]),M=!0)},p(j,P){P[0]&16777216&&a!==(a=j[24]("logs.refreshInterval")+"")&&v(i,a),P[0]&16777216&&d!==(d=j[24]("logs.refreshEvery5s")+"")&&v(p,d),P[0]&16777216&&g!==(g=j[24]("logs.refreshEvery10s")+"")&&v(b,g),P[0]&16777216&&w!==(w=j[24]("logs.refreshEvery30s")+"")&&v(C,w),P[0]&16777216&&y!==(y=j[24]("logs.refreshEvery60s")+"")&&v(T,y),P[0]&8192&&kt(c,j[13])},d(j){j&&H(s),M=!1,R()}}}function rp(l){let s,e=l[24]("logs.lastRefreshed")+"",n,a,i=new Date(l[21]).toLocaleTimeString()+"",u;return{c(){s=r("div"),n=_(e),a=_(": "),u=_(i),o(s,"class","text-xs text-gray-500 text-center")},m(c,f){L(c,s,f),t(s,n),t(s,a),t(s,u)},p(c,f){f[0]&16777216&&e!==(e=c[24]("logs.lastRefreshed")+"")&&v(n,e),f[0]&2097152&&i!==(i=new Date(c[21]).toLocaleTimeString()+"")&&v(u,i)},d(c){c&&H(s)}}}function ip(l){let s,e,n,a,i=l[24]("logs.clearFilters")+"",u,c,f;return{c(){s=r("button"),e=re("svg"),n=re("path"),a=h(),u=_(i),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M6 18L18 6M6 6l12 12"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","h-4 w-4"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"stroke","currentColor"),o(s,"type","button"),o(s,"class","btn btn-sm btn-ghost gap-1")},m(d,p){L(d,s,p),t(s,e),t(e,n),t(s,a),t(s,u),c||(f=V(s,"click",l[28]),c=!0)},p(d,p){p[0]&16777216&&i!==(i=d[24]("logs.clearFilters")+"")&&v(u,i)},d(d){d&&H(s),c=!1,f()}}}function up(l){let s;return{c(){s=r("span"),o(s,"class","badge badge-sm badge-primary")},m(e,n){L(e,s,n)},d(e){e&&H(s)}}}function fp(l){let s,e,n,a=l[24]("logs.recentHours")+"",i,u,c,f,d;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","number"),o(c,"min","1"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[9]),f||(d=V(c,"input",l[73]),f=!0)},p(p,m){m[0]&16777216&&a!==(a=p[24]("logs.recentHours")+"")&&v(i,a),m[0]&512&&Mt(c.value)!==p[9]&&Y(c,p[9])},d(p){p&&H(s),f=!1,d()}}}function cp(l){let s,e,n,a=l[24]("logs.startTime")+"",i,u,c,f,d,p,m,g=l[24]("logs.endTime")+"",b,k,w,C,E;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("input"),f=h(),d=r("div"),p=r("div"),m=r("span"),b=_(g),k=h(),w=r("input"),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),o(c,"type","datetime-local"),o(c,"class","input input-bordered input-sm"),o(s,"class","form-control"),o(m,"class","label-text text-xs font-semibold"),o(p,"class","label py-1"),o(w,"type","datetime-local"),o(w,"class","input input-bordered input-sm"),o(d,"class","form-control")},m(y,T){L(y,s,T),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),Y(c,l[10]),L(y,f,T),L(y,d,T),t(d,p),t(p,m),t(m,b),t(d,k),t(d,w),Y(w,l[11]),C||(E=[V(c,"input",l[74]),V(w,"input",l[75])],C=!0)},p(y,T){T[0]&16777216&&a!==(a=y[24]("logs.startTime")+"")&&v(i,a),T[0]&1024&&Y(c,y[10]),T[0]&16777216&&g!==(g=y[24]("logs.endTime")+"")&&v(b,g),T[0]&2048&&Y(w,y[11])},d(y){y&&(H(s),H(f),H(d)),C=!1,vt(E)}}}function dp(l){let s,e,n,a=l[24]("logs.refreshInterval")+"",i,u,c,f,d=l[24]("logs.refreshEvery5s")+"",p,m,g=l[24]("logs.refreshEvery10s")+"",b,k,w=l[24]("logs.refreshEvery30s")+"",C,E,y=l[24]("logs.refreshEvery60s")+"",T,M,R;return{c(){s=r("div"),e=r("div"),n=r("span"),i=_(a),u=h(),c=r("select"),f=r("option"),p=_(d),m=r("option"),b=_(g),k=r("option"),C=_(w),E=r("option"),T=_(y),o(n,"class","label-text text-xs font-semibold"),o(e,"class","label py-1"),f.__value="5s",Y(f,f.__value),m.__value="10s",Y(m,m.__value),k.__value="30s",Y(k,k.__value),E.__value="60s",Y(E,E.__value),o(c,"class","select select-bordered select-sm"),l[13]===void 0&&pl(()=>l[79].call(c)),o(s,"class","form-control")},m(j,P){L(j,s,P),t(s,e),t(e,n),t(n,i),t(s,u),t(s,c),t(c,f),t(f,p),t(c,m),t(m,b),t(c,k),t(k,C),t(c,E),t(E,T),kt(c,l[13],!0),M||(R=V(c,"change",l[79]),M=!0)},p(j,P){P[0]&16777216&&a!==(a=j[24]("logs.refreshInterval")+"")&&v(i,a),P[0]&16777216&&d!==(d=j[24]("logs.refreshEvery5s")+"")&&v(p,d),P[0]&16777216&&g!==(g=j[24]("logs.refreshEvery10s")+"")&&v(b,g),P[0]&16777216&&w!==(w=j[24]("logs.refreshEvery30s")+"")&&v(C,w),P[0]&16777216&&y!==(y=j[24]("logs.refreshEvery60s")+"")&&v(T,y),P[0]&8192&&kt(c,j[13])},d(j){j&&H(s),M=!1,R()}}}function pp(l){let s,e,n,a,i,u,c=l[24]("logs.clearFilters")+"",f,d,p;return{c(){s=r("div"),e=h(),n=r("button"),a=re("svg"),i=re("path"),u=h(),f=_(c),o(s,"class","divider my-2"),o(i,"stroke-linecap","round"),o(i,"stroke-linejoin","round"),o(i,"stroke-width","2"),o(i,"d","M6 18L18 6M6 6l12 12"),o(a,"xmlns","http://www.w3.org/2000/svg"),o(a,"class","h-4 w-4"),o(a,"fill","none"),o(a,"viewBox","0 0 24 24"),o(a,"stroke","currentColor"),o(n,"type","button"),o(n,"class","btn btn-sm btn-ghost w-full gap-1")},m(m,g){L(m,s,g),L(m,e,g),L(m,n,g),t(n,a),t(a,i),t(n,u),t(n,f),d||(p=V(n,"click",l[28]),d=!0)},p(m,g){g[0]&16777216&&c!==(c=m[24]("logs.clearFilters")+"")&&v(f,c)},d(m){m&&(H(s),H(e),H(n)),d=!1,p()}}}function hp(l){let s,e=l[1].trim(),n,a,i,u,c,f,d,p,m=e&&mp(l),g=l[2]&&gp(l),b=l[3]&&_p(l),k=l[4]!==void 0&&bp(l),w=l[5]&&vp(l),C=l[8]==="recent"&&l[9]!==1&&kp(l),E=l[8]==="custom"&&wp(l),y=l[8]==="all"&&yp(l),T=(l[6]!=="timestamp"||l[7]!=="desc")&&Cp(l);return{c(){s=r("div"),m&&m.c(),n=h(),g&&g.c(),a=h(),b&&b.c(),i=h(),k&&k.c(),u=h(),w&&w.c(),c=h(),C&&C.c(),f=h(),E&&E.c(),d=h(),y&&y.c(),p=h(),T&&T.c(),o(s,"class","flex items-center gap-2 flex-wrap px-1")},m(M,R){L(M,s,R),m&&m.m(s,null),t(s,n),g&&g.m(s,null),t(s,a),b&&b.m(s,null),t(s,i),k&&k.m(s,null),t(s,u),w&&w.m(s,null),t(s,c),C&&C.m(s,null),t(s,f),E&&E.m(s,null),t(s,d),y&&y.m(s,null),t(s,p),T&&T.m(s,null)},p(M,R){R[0]&2&&(e=M[1].trim()),e?m?m.p(M,R):(m=mp(M),m.c(),m.m(s,n)):m&&(m.d(1),m=null),M[2]?g?g.p(M,R):(g=gp(M),g.c(),g.m(s,a)):g&&(g.d(1),g=null),M[3]?b?b.p(M,R):(b=_p(M),b.c(),b.m(s,i)):b&&(b.d(1),b=null),M[4]!==void 0?k?k.p(M,R):(k=bp(M),k.c(),k.m(s,u)):k&&(k.d(1),k=null),M[5]?w?w.p(M,R):(w=vp(M),w.c(),w.m(s,c)):w&&(w.d(1),w=null),M[8]==="recent"&&M[9]!==1?C?C.p(M,R):(C=kp(M),C.c(),C.m(s,f)):C&&(C.d(1),C=null),M[8]==="custom"?E?E.p(M,R):(E=wp(M),E.c(),E.m(s,d)):E&&(E.d(1),E=null),M[8]==="all"?y?y.p(M,R):(y=yp(M),y.c(),y.m(s,p)):y&&(y.d(1),y=null),M[6]!=="timestamp"||M[7]!=="desc"?T?T.p(M,R):(T=Cp(M),T.c(),T.m(s,null)):T&&(T.d(1),T=null)},d(M){M&&H(s),m&&m.d(),g&&g.d(),b&&b.d(),k&&k.d(),w&&w.d(),C&&C.d(),E&&E.d(),y&&y.d(),T&&T.d()}}}function mp(l){let s,e,n=l[24]("logs.searchTerm")+"",a,i,u,c,f,d,p,m,g;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),f=_(l[1]),d=h(),p=r("button"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-lg gap-2")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,f),t(s,d),t(s,p),m||(g=V(p,"click",l[82]),m=!0)},p(b,k){k[0]&16777216&&n!==(n=b[24]("logs.searchTerm")+"")&&v(a,n),k[0]&2&&v(f,b[1])},d(b){b&&H(s),m=!1,g()}}}function gp(l){let s,e,n=l[24]("logs.method")+"",a,i,u,c,f,d,p,m,g;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),f=_(l[2]),d=h(),p=r("button"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,f),t(s,d),t(s,p),m||(g=V(p,"click",l[83]),m=!0)},p(b,k){k[0]&16777216&&n!==(n=b[24]("logs.method")+"")&&v(a,n),k[0]&4&&v(f,b[2])},d(b){b&&H(s),m=!1,g()}}}function _p(l){let s,e,n=l[24]("logs.status")+"",a,i,u,c,f,d,p,m,g;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),f=_(l[3]),d=h(),p=r("button"),p.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(p,"type","button"),o(p,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,f),t(s,d),t(s,p),m||(g=V(p,"click",l[84]),m=!0)},p(b,k){k[0]&16777216&&n!==(n=b[24]("logs.status")+"")&&v(a,n),k[0]&8&&v(f,b[3])},d(b){b&&H(s),m=!1,g()}}}function bp(l){let s,e,n=l[24]("logs.result")+"",a,i,u,c,f=(l[4]?l[24]("logs.success"):l[24]("logs.failed"))+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[85]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.result")+"")&&v(a,n),w[0]&16777232&&f!==(f=(k[4]?k[24]("logs.success"):k[24]("logs.failed"))+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function vp(l){let s,e,n=l[24]("logs.requestType")+"",a,i,u,c,f=l[24](\`logs.requestType_\${l[5]}\`)+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[86]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.requestType")+"")&&v(a,n),w[0]&16777248&&f!==(f=k[24](\`logs.requestType_\${k[5]}\`)+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function kp(l){let s,e,n=l[24]("logs.timeRange")+"",a,i,u,c,f=l[24]("logs.recentTime")+"",d,p,m,g,b,k,w,C;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=_(l[9]),g=_("h"),b=h(),k=r("button"),k.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(k,"type","button"),o(k,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(E,y){L(E,s,y),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(c,p),t(c,m),t(c,g),t(s,b),t(s,k),w||(C=V(k,"click",l[87]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.timeRange")+"")&&v(a,n),y[0]&16777216&&f!==(f=E[24]("logs.recentTime")+"")&&v(d,f),y[0]&512&&v(m,E[9])},d(E){E&&H(s),w=!1,C()}}}function wp(l){let s,e,n=l[24]("logs.timeRange")+"",a,i,u,c,f=l[24]("logs.customTime")+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[88]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.timeRange")+"")&&v(a,n),w[0]&16777216&&f!==(f=k[24]("logs.customTime")+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function yp(l){let s,e,n=l[24]("logs.timeRange")+"",a,i,u,c,f=l[24]("logs.allTime")+"",d,p,m,g,b;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),m=r("button"),m.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(m,"type","button"),o(m,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(k,w){L(k,s,w),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(s,p),t(s,m),g||(b=V(m,"click",l[89]),g=!0)},p(k,w){w[0]&16777216&&n!==(n=k[24]("logs.timeRange")+"")&&v(a,n),w[0]&16777216&&f!==(f=k[24]("logs.allTime")+"")&&v(d,f)},d(k){k&&H(s),g=!1,b()}}}function Cp(l){let s,e,n=l[24]("logs.sortBy")+"",a,i,u,c,f=l[24](\`logs.sortBy\${l[6].charAt(0).toUpperCase()+l[6].slice(1)}\`)+"",d,p,m=l[7]==="asc"?"\u2191":"\u2193",g,b,k,w,C;return{c(){s=r("div"),e=r("span"),a=_(n),i=_(":"),u=h(),c=r("span"),d=_(f),p=h(),g=_(m),b=h(),k=r("button"),k.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>',o(e,"class","text-xs opacity-70"),o(c,"class","font-medium"),o(k,"type","button"),o(k,"class","btn btn-ghost btn-xs p-0 h-4 w-4 min-h-0"),o(s,"class","badge badge-primary badge-lg gap-2")},m(E,y){L(E,s,y),t(s,e),t(e,a),t(e,i),t(s,u),t(s,c),t(c,d),t(c,p),t(c,g),t(s,b),t(s,k),w||(C=V(k,"click",l[90]),w=!0)},p(E,y){y[0]&16777216&&n!==(n=E[24]("logs.sortBy")+"")&&v(a,n),y[0]&16777280&&f!==(f=E[24](\`logs.sortBy\${E[6].charAt(0).toUpperCase()+E[6].slice(1)}\`)+"")&&v(d,f),y[0]&128&&m!==(m=E[7]==="asc"?"\u2191":"\u2193")&&v(g,m)},d(E){E&&H(s),w=!1,C()}}}function Cg(l){let s,e,n,a,i,u,c,f=l[24]("logs.time")+"",d,p,m,g=l[24]("logs.method")+"",b,k,w,C=l[24]("logs.path")+"",E,y,T,M=l[24]("logs.status")+"",R,j,P,I=l[24]("logs.requestType")+"",q,D,A,N=l[24]("logs.duration")+"",Z,Q,x,z=l[24]("logs.upstream")+"",K,S,B,U=l[24]("logs.actions")+"",F,J,ie,ue=[],ne=new Map,$,te,ae,ee=l[24]("logs.showing",{values:{start:(l[0]-1)*Yn+1,end:Math.min(l[0]*Yn,l[15]),total:l[15]}})+"",G,pe,oe,ge,he,ye,ze,Pe,we=l[24]("logs.page",{values:{page:l[0],totalPages:l[16]}})+"",Fe,Je,je,Le,Se,fe,_e,Ie=ut(l[14]);const De=se=>se[104].requestId;for(let se=0;se<Ie.length;se+=1){let ke=Gd(l,Ie,se),me=De(ke);ne.set(me,ue[se]=Ep(me,ke))}return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("table"),i=r("thead"),u=r("tr"),c=r("th"),d=_(f),p=h(),m=r("th"),b=_(g),k=h(),w=r("th"),E=_(C),y=h(),T=r("th"),R=_(M),j=h(),P=r("th"),q=_(I),D=h(),A=r("th"),Z=_(N),Q=h(),x=r("th"),K=_(z),S=h(),B=r("th"),F=_(U),J=h(),ie=r("tbody");for(let se=0;se<ue.length;se+=1)ue[se].c();$=h(),te=r("div"),ae=r("div"),G=_(ee),pe=h(),oe=r("div"),ge=r("button"),he=_("\xAB"),ze=h(),Pe=r("button"),Fe=_(we),Je=h(),je=r("button"),Le=_("\xBB"),o(a,"class","table table-zebra table-sm"),o(n,"class","overflow-x-auto"),o(ae,"class","text-sm"),o(ge,"class","join-item btn btn-sm"),ge.disabled=ye=l[0]<=1,o(Pe,"class","join-item btn btn-sm"),o(je,"class","join-item btn btn-sm"),je.disabled=Se=l[0]>=l[16],o(oe,"class","join"),o(te,"class","flex justify-between items-center p-4"),o(e,"class","card-body p-0"),o(s,"class","card bg-base-100 shadow-xl")},m(se,ke){L(se,s,ke),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(u,c),t(c,d),t(u,p),t(u,m),t(m,b),t(u,k),t(u,w),t(w,E),t(u,y),t(u,T),t(T,R),t(u,j),t(u,P),t(P,q),t(u,D),t(u,A),t(A,Z),t(u,Q),t(u,x),t(x,K),t(u,S),t(u,B),t(B,F),t(a,J),t(a,ie);for(let me=0;me<ue.length;me+=1)ue[me]&&ue[me].m(ie,null);t(e,$),t(e,te),t(te,ae),t(ae,G),t(te,pe),t(te,oe),t(oe,ge),t(ge,he),t(oe,ze),t(oe,Pe),t(Pe,Fe),t(oe,Je),t(oe,je),t(je,Le),fe||(_e=[V(ge,"click",l[92]),V(je,"click",l[93])],fe=!0)},p(se,ke){ke[0]&16777216&&f!==(f=se[24]("logs.time")+"")&&v(d,f),ke[0]&16777216&&g!==(g=se[24]("logs.method")+"")&&v(b,g),ke[0]&16777216&&C!==(C=se[24]("logs.path")+"")&&v(E,C),ke[0]&16777216&&M!==(M=se[24]("logs.status")+"")&&v(R,M),ke[0]&16777216&&I!==(I=se[24]("logs.requestType")+"")&&v(q,I),ke[0]&16777216&&N!==(N=se[24]("logs.duration")+"")&&v(Z,N),ke[0]&16777216&&z!==(z=se[24]("logs.upstream")+"")&&v(K,z),ke[0]&16777216&&U!==(U=se[24]("logs.actions")+"")&&v(F,U),ke[0]&218120192&&(Ie=ut(se[14]),ue=Ru(ue,ke,De,1,se,Ie,ne,ie,Op,Ep,null,Gd)),ke[0]&16809985&&ee!==(ee=se[24]("logs.showing",{values:{start:(se[0]-1)*Yn+1,end:Math.min(se[0]*Yn,se[15]),total:se[15]}})+"")&&v(G,ee),ke[0]&1&&ye!==(ye=se[0]<=1)&&(ge.disabled=ye),ke[0]&16842753&&we!==(we=se[24]("logs.page",{values:{page:se[0],totalPages:se[16]}})+"")&&v(Fe,we),ke[0]&65537&&Se!==(Se=se[0]>=se[16])&&(je.disabled=Se)},d(se){se&&H(s);for(let ke=0;ke<ue.length;ke+=1)ue[ke].d();fe=!1,vt(_e)}}}function Eg(l){let s,e,n,a,i,u=l[24]("logs.noData")+"",c;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(e,"class","stroke-current shrink-0 w-6 h-6"),o(s,"class","alert alert-info")},m(f,d){L(f,s,d),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c)},p(f,d){d[0]&16777216&&u!==(u=f[24]("logs.noData")+"")&&v(c,u)},d(f){f&&H(s)}}}function Tg(l){let s,e,n,a,i,u=l[24]("common.error")+"",c,f,d;return{c(){s=r("div"),e=re("svg"),n=re("path"),a=h(),i=r("span"),c=_(u),f=_(": "),d=_(l[18]),o(n,"stroke-linecap","round"),o(n,"stroke-linejoin","round"),o(n,"stroke-width","2"),o(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),o(e,"xmlns","http://www.w3.org/2000/svg"),o(e,"class","stroke-current shrink-0 h-6 w-6"),o(e,"fill","none"),o(e,"viewBox","0 0 24 24"),o(s,"class","alert alert-error")},m(p,m){L(p,s,m),t(s,e),t(e,n),t(s,a),t(s,i),t(i,c),t(i,f),t(i,d)},p(p,m){m[0]&16777216&&u!==(u=p[24]("common.error")+"")&&v(c,u),m[0]&262144&&v(d,p[18])},d(p){p&&H(s)}}}function Sg(l){let s;return{c(){s=r("div"),s.innerHTML='<span class="loading loading-spinner loading-lg"></span>',o(s,"class","flex justify-center items-center h-64")},m(e,n){L(e,s,n)},p:ot,d(e){e&&H(s)}}}function Ep(l,s){let e,n,a=Sp(s[104].timestamp)+"",i,u,c,f,d=s[104].method+"",p,m,g,b=s[104].path+"",k,w,C,E,y,T=s[104].status+"",M,R,j,P,I,q=s[27](s[104].requestType)+"",D,A,N,Z,Q,x=Mp(s[104].duration)+"",z,K,S,B=(s[104].upstream||"-")+"",U,F,J,ie,ue,ne=s[24]("logs.viewDetail")+"",$,te,ae,ee;function G(){return s[91](s[104])}return{key:l,first:null,c(){e=r("tr"),n=r("td"),i=_(a),u=h(),c=r("td"),f=r("span"),p=_(d),m=h(),g=r("td"),k=_(b),C=h(),E=r("td"),y=r("span"),M=_(T),j=h(),P=r("td"),I=r("span"),D=_(q),Z=h(),Q=r("td"),z=_(x),K=h(),S=r("td"),U=_(B),J=h(),ie=r("td"),ue=r("button"),$=_(ne),te=h(),o(n,"class","text-xs"),o(f,"class","badge badge-sm"),o(g,"class","font-mono text-xs truncate max-w-xs"),o(g,"title",w=s[104].path),o(y,"class",R="badge badge-sm "+Rp(s[104].status)),o(I,"class",A="badge badge-sm "+qp(s[104].requestType)),o(I,"title",N=s[24](\`logs.requestType_\${s[104].requestType}_desc\`)),o(Q,"class","text-xs"),o(S,"class","text-xs truncate max-w-xs"),o(S,"title",F=s[104].upstream||"-"),o(ue,"class","btn btn-xs btn-ghost"),o(e,"class","hover"),this.first=e},m(pe,oe){L(pe,e,oe),t(e,n),t(n,i),t(e,u),t(e,c),t(c,f),t(f,p),t(e,m),t(e,g),t(g,k),t(e,C),t(e,E),t(E,y),t(y,M),t(e,j),t(e,P),t(P,I),t(I,D),t(e,Z),t(e,Q),t(Q,z),t(e,K),t(e,S),t(S,U),t(e,J),t(e,ie),t(ie,ue),t(ue,$),t(e,te),ae||(ee=V(ue,"click",G),ae=!0)},p(pe,oe){s=pe,oe[0]&16384&&a!==(a=Sp(s[104].timestamp)+"")&&v(i,a),oe[0]&16384&&d!==(d=s[104].method+"")&&v(p,d),oe[0]&16384&&b!==(b=s[104].path+"")&&v(k,b),oe[0]&16384&&w!==(w=s[104].path)&&o(g,"title",w),oe[0]&16384&&T!==(T=s[104].status+"")&&v(M,T),oe[0]&16384&&R!==(R="badge badge-sm "+Rp(s[104].status))&&o(y,"class",R),oe[0]&16384&&q!==(q=s[27](s[104].requestType)+"")&&v(D,q),oe[0]&16384&&A!==(A="badge badge-sm "+qp(s[104].requestType))&&o(I,"class",A),oe[0]&16793600&&N!==(N=s[24](\`logs.requestType_\${s[104].requestType}_desc\`))&&o(I,"title",N),oe[0]&16384&&x!==(x=Mp(s[104].duration)+"")&&v(z,x),oe[0]&16384&&B!==(B=(s[104].upstream||"-")+"")&&v(U,B),oe[0]&16384&&F!==(F=s[104].upstream||"-")&&o(S,"title",F),oe[0]&16777216&&ne!==(ne=s[24]("logs.viewDetail")+"")&&v($,ne)},d(pe){pe&&H(e),ae=!1,ee()}}}function Tp(l){let s,e;return s=new yg({props:{log:l[19],onClose:l[94]}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a[0]&524288&&(i.log=n[19]),a[0]&1572864&&(i.onClose=n[94]),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Mg(l){let s,e,n,a=l[24]("logs.title")+"",i,u,c,f,d,p,m,g,b,k,w,C,E,y=l[24]("logs.method")+"",T,M,R,j,P,I,q,D,A,N,Z=l[24]("logs.allMethods")+"",Q,x,z,K,S,B,U,F,J,ie,ue,ne,$,te,ae,ee,G,pe,oe,ge=l[24]("logs.status")+"",he,ye,ze,Pe,we,Fe,Je,je,Le,Se,fe,_e=l[24]("logs.statusPlaceholder")+"",Ie,De,se,ke,me,Ee,Ve=l[24]("logs.result")+"",Be,nt,Ne,Qe,Ye,ve,de,Te,Ze,Me,Ue=l[24]("logs.allResults")+"",Ce,mt,Ge,ce,qe=l[24]("logs.success")+"",Re,dt,We,O,He=l[24]("logs.failed")+"",X,ft,Ht,Ke,_t=l[24]("logs.moreFilters")+"",tt,it,Oe,Xe,It,rt,gt,wt,pt,bl,at,St,ht=l[24]("logs.requestTypeFilter")+"",Tt,vl,At,hl,ml=l[24]("logs.requestType_all")+"",ql,Jt,Yl=l[24]("logs.requestType_final")+"",Yt,Qt,Hl=l[24]("logs.requestType_retry")+"",Bl,gl,sl=l[24]("logs.requestType_recovery")+"",Ql,Ft,Ll,Vl,Jl,Cl=l[24]("logs.timeRange")+"",zt,Zl,Lt,Pl,jl=l[24]("logs.allTime")+"",$l,xt,kl=l[24]("logs.recentTime")+"",es,zl,Il=l[24]("logs.customTime")+"",Wl,Ls,ol,wl,nl,Ol,al,_l,tl,Dl=l[24]("logs.sortBy")+"",Nl,El,Wt,Bt,Pt,$t=l[24]("logs.sortByTimestamp")+"",el,Kt,Zt=l[24]("logs.sortByDuration")+"",rl,Xt,$e=l[24]("logs.sortByStatus")+"",Al,ts,Xl,xl,ls=l[24]("logs.desc")+"",Ds,ss,Os=l[24]("logs.asc")+"",il,Ot,lt,ct,ll,Tl,ul,xe,bt,fl,xn,Bu,yo,_o,aa,Co,ra,ia=l[24]("logs.autoRefresh")+"",li,Iu,bo,Au,Fu,Ns,Us,Eo,zu,si,ua=l[24]("common.refresh")+"",oi,Ou,To,ao,ro,So,Nu,ni,fa=l[24]("logs.export")+"",ai,Uu,io,ri,ca,Vu,ii,da,Ju,Wu,Bs,Mo,Ps,uo,Ro,Gu,pa=l[24]("logs.filters")+"",ui,Ku,ha,Yu,qo,cl,Ho,ma,ga,_a=l[24]("logs.method")+"",fi,Qu,Es,Lo,ba=l[24]("logs.allMethods")+"",ci,Po,jo,Do,Bo,Io,Zu,Ao,va,ka,wa=l[24]("logs.status")+"",di,Xu,lo,xu,Fo,ya,Ca,Ea=l[24]("logs.result")+"",pi,$u,Vs,zo,Ta=l[24]("logs.allResults")+"",hi,Oo,Sa=l[24]("logs.success")+"",mi,No,Ma=l[24]("logs.failed")+"",gi,ef,_i,tf,Uo,Ra,qa,Ha=l[24]("logs.requestTypeFilter")+"",bi,lf,Is,Vo,La=l[24]("logs.requestType_all")+"",vi,Jo,Pa=l[24]("logs.requestType_final")+"",ki,Wo,ja=l[24]("logs.requestType_retry")+"",wi,Go,Da=l[24]("logs.requestType_recovery")+"",yi,sf,Ko,Ba,Ia,Aa=l[24]("logs.timeRange")+"",Ci,of,Js,Yo,Fa=l[24]("logs.allTime")+"",Ei,Qo,za=l[24]("logs.recentTime")+"",Ti,Zo,Oa=l[24]("logs.customTime")+"",Si,nf,Mi,Ri,qi,af,Xo,Na,Ua,Va=l[24]("logs.sortBy")+"",Hi,rf,xo,Ws,$o,Ja=l[24]("logs.sortByTimestamp")+"",Li,en,Wa=l[24]("logs.sortByDuration")+"",Pi,tn,Ga=l[24]("logs.sortByStatus")+"",ji,uf,so,ln,Ka=l[24]("logs.desc")+"",Di,sn,Ya=l[24]("logs.asc")+"",Bi,ff,on,fo,Gs,nn,cf,Qa=l[24]("common.refresh")+"",Ii,df,an,os,Za,rn,Xa,xa=l[24]("logs.autoRefresh")+"",Ai,pf,vo,hf,Fi,zi,mf,Ks,Ys,un,gf,$a=l[24]("common.refresh")+"",Oi,_f,bf,fn,co,po,cn,vf,er=l[24]("logs.export")+"",Ni,kf,ho,Ui,tr,wf,Vi,lr,yf,Cf,sr,dn,As,mo,pn,Ef,or=l[24]("logs.actions")+"",Ji,Tf,Sf,hn,qt,nr,ar=l[24]("logs.filters")+"",Wi,Mf,mn,rr,ir,ur=l[24]("logs.method")+"",Gi,Rf,Ts,gn,fr=l[24]("logs.allMethods")+"",Ki,_n,bn,vn,kn,wn,qf,yn,cr,dr,pr=l[24]("logs.status")+"",Yi,Hf,oo,Lf,Cn,hr,mr,gr=l[24]("logs.result")+"",Qi,Pf,Qs,En,_r=l[24]("logs.allResults")+"",Zi,Tn,br=l[24]("logs.success")+"",Xi,Sn,vr=l[24]("logs.failed")+"",xi,jf,Mn,kr,wr,yr=l[24]("logs.requestTypeFilter")+"",$i,Df,Fs,Rn,Cr=l[24]("logs.requestType_all")+"",eu,qn,Er=l[24]("logs.requestType_final")+"",tu,Hn,Tr=l[24]("logs.requestType_retry")+"",lu,Ln,Sr=l[24]("logs.requestType_recovery")+"",su,Bf,Pn,Mr,Rr,qr=l[24]("logs.timeRange")+"",ou,If,Zs,jn,Hr=l[24]("logs.allTime")+"",nu,Dn,Lr=l[24]("logs.recentTime")+"",au,Bn,Pr=l[24]("logs.customTime")+"",ru,Af,iu,uu,In,jr,Dr,Br=l[24]("logs.sortBy")+"",fu,Ff,An,Xs,Fn,Ir=l[24]("logs.sortByTimestamp")+"",cu,zn,Ar=l[24]("logs.sortByDuration")+"",du,On,Fr=l[24]("logs.sortByStatus")+"",pu,zf,no,Nn,zr=l[24]("logs.desc")+"",hu,Un,Or=l[24]("logs.asc")+"",mu,Of,gu,Nf,Nr,Ur=l[24]("common.refresh")+"",_u,Uf,Vr,Vn,Jr,Wr=l[24]("logs.autoRefresh")+"",bu,Vf,ko,Jf,vu,xs,$s,Jn,Wf,Gr=l[24]("common.refresh")+"",ku,Gf,wu,Kf,Wn,Gn,Yf,Kn,Qf,Zf,Xf,yu,$n,Ae,Cu,xf,ns=l[22]&&Kd(l),Ss=l[2]&&Yd(),Ms=l[3]&&Qd(),Rs=l[4]!==void 0&&Zd(),as=(l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc")&&Xd(l),rs=l[8]==="recent"&&xd(l),is=l[8]==="custom"&&$d(l),us=l[12]&&ep(l),fs=l[12]&&tp(l),cs=l[23]>0&&lp(l),ds=(l[2]||l[3]||l[4]!==void 0||l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc")&&sp(l),ps=l[8]==="recent"&&op(l),hs=l[8]==="custom"&&np(l),ms=l[12]&&ap(l),gs=l[21]>0&&rp(l),_s=l[23]>0&&ip(l),qs=(l[2]||l[3]||l[4]!==void 0||l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc"||l[12])&&up(),bs=l[8]==="recent"&&fp(l),vs=l[8]==="custom"&&cp(l),ks=l[12]&&dp(l),ws=l[23]>0&&pp(l),ys=l[23]>0&&hp(l);function $f(W,be){return W[17]&&W[14].length===0?Sg:W[18]?Tg:W[14].length===0?Eg:Cg}let Kr=$f(l),eo=Kr(l),Fl=l[20]&&l[19]&&Tp(l);return{c(){s=r("div"),e=r("div"),n=r("h1"),i=_(a),u=h(),ns&&ns.c(),c=h(),f=r("div"),d=r("div"),p=r("div"),m=r("input"),b=h(),k=r("div"),w=r("div"),C=r("div"),E=r("div"),T=_(y),M=h(),Ss&&Ss.c(),R=h(),j=re("svg"),P=re("path"),q=h(),D=r("ul"),A=r("li"),N=r("button"),Q=_(Z),x=h(),z=r("li"),K=r("button"),K.textContent="GET",S=h(),B=r("li"),U=r("button"),U.textContent="POST",F=h(),J=r("li"),ie=r("button"),ie.textContent="PUT",ue=h(),ne=r("li"),$=r("button"),$.textContent="DELETE",te=h(),ae=r("li"),ee=r("button"),ee.textContent="PATCH",G=h(),pe=r("div"),oe=r("div"),he=_(ge),ye=h(),Ms&&Ms.c(),ze=h(),Pe=re("svg"),we=re("path"),Je=h(),je=r("div"),Le=r("div"),Se=r("div"),fe=r("span"),Ie=_(_e),De=h(),se=r("input"),ke=h(),me=r("div"),Ee=r("div"),Be=_(Ve),nt=h(),Rs&&Rs.c(),Ne=h(),Qe=re("svg"),Ye=re("path"),de=h(),Te=r("ul"),Ze=r("li"),Me=r("button"),Ce=_(Ue),mt=h(),Ge=r("li"),ce=r("button"),Re=_(qe),dt=h(),We=r("li"),O=r("button"),X=_(He),ft=h(),Ht=r("div"),Ke=r("div"),tt=_(_t),it=h(),as&&as.c(),Oe=h(),Xe=re("svg"),It=re("path"),gt=h(),wt=r("div"),pt=r("div"),bl=r("div"),at=r("div"),St=r("span"),Tt=_(ht),vl=h(),At=r("select"),hl=r("option"),ql=_(ml),Jt=r("option"),Yt=_(Yl),Qt=r("option"),Bl=_(Hl),gl=r("option"),Ql=_(sl),Ft=h(),Ll=r("div"),Vl=r("div"),Jl=r("span"),zt=_(Cl),Zl=h(),Lt=r("select"),Pl=r("option"),$l=_(jl),xt=r("option"),es=_(kl),zl=r("option"),Wl=_(Il),Ls=h(),rs&&rs.c(),ol=h(),is&&is.c(),wl=h(),nl=r("div"),Ol=h(),al=r("div"),_l=r("div"),tl=r("span"),Nl=_(Dl),El=h(),Wt=r("div"),Bt=r("select"),Pt=r("option"),el=_($t),Kt=r("option"),rl=_(Zt),Xt=r("option"),Al=_($e),ts=h(),Xl=r("select"),xl=r("option"),Ds=_(ls),ss=r("option"),il=_(Os),Ot=h(),lt=r("div"),ct=h(),ll=r("div"),Tl=r("div"),ul=r("div"),xe=re("svg"),bt=re("path"),fl=re("path"),xn=h(),us&&us.c(),Bu=h(),yo=r("div"),_o=r("div"),aa=r("div"),Co=r("label"),ra=r("span"),li=_(ia),Iu=h(),bo=r("input"),Au=h(),fs&&fs.c(),Fu=h(),Ns=r("button"),Us=re("svg"),Eo=re("path"),zu=h(),si=r("span"),oi=_(ua),Ou=h(),To=r("div"),ao=r("div"),ro=re("svg"),So=re("path"),Nu=h(),ni=r("span"),ai=_(fa),Uu=h(),io=r("ul"),ri=r("li"),ca=r("button"),ca.textContent="JSON",Vu=h(),ii=r("li"),da=r("button"),da.textContent="CSV",Ju=h(),cs&&cs.c(),Wu=h(),Bs=r("div"),Mo=r("div"),Ps=r("div"),uo=re("svg"),Ro=re("path"),Gu=h(),ui=_(pa),Ku=h(),ds&&ds.c(),Yu=h(),qo=r("div"),cl=r("div"),Ho=r("div"),ma=r("div"),ga=r("span"),fi=_(_a),Qu=h(),Es=r("select"),Lo=r("option"),ci=_(ba),Po=r("option"),Po.textContent="GET",jo=r("option"),jo.textContent="POST",Do=r("option"),Do.textContent="PUT",Bo=r("option"),Bo.textContent="DELETE",Io=r("option"),Io.textContent="PATCH",Zu=h(),Ao=r("div"),va=r("div"),ka=r("span"),di=_(wa),Xu=h(),lo=r("input"),xu=h(),Fo=r("div"),ya=r("div"),Ca=r("span"),pi=_(Ea),$u=h(),Vs=r("select"),zo=r("option"),hi=_(Ta),Oo=r("option"),mi=_(Sa),No=r("option"),gi=_(Ma),ef=h(),_i=r("div"),tf=h(),Uo=r("div"),Ra=r("div"),qa=r("span"),bi=_(Ha),lf=h(),Is=r("select"),Vo=r("option"),vi=_(La),Jo=r("option"),ki=_(Pa),Wo=r("option"),wi=_(ja),Go=r("option"),yi=_(Da),sf=h(),Ko=r("div"),Ba=r("div"),Ia=r("span"),Ci=_(Aa),of=h(),Js=r("select"),Yo=r("option"),Ei=_(Fa),Qo=r("option"),Ti=_(za),Zo=r("option"),Si=_(Oa),nf=h(),ps&&ps.c(),Mi=h(),hs&&hs.c(),Ri=h(),qi=r("div"),af=h(),Xo=r("div"),Na=r("div"),Ua=r("span"),Hi=_(Va),rf=h(),xo=r("div"),Ws=r("select"),$o=r("option"),Li=_(Ja),en=r("option"),Pi=_(Wa),tn=r("option"),ji=_(Ga),uf=h(),so=r("select"),ln=r("option"),Di=_(Ka),sn=r("option"),Bi=_(Ya),ff=h(),on=r("div"),fo=r("div"),Gs=re("svg"),nn=re("path"),cf=h(),Ii=_(Qa),df=h(),an=r("div"),os=r("div"),Za=r("div"),rn=r("label"),Xa=r("span"),Ai=_(xa),pf=h(),vo=r("input"),hf=h(),ms&&ms.c(),Fi=h(),zi=r("div"),mf=h(),Ks=r("button"),Ys=re("svg"),un=re("path"),gf=h(),Oi=_($a),_f=h(),gs&&gs.c(),bf=h(),fn=r("div"),co=r("div"),po=re("svg"),cn=re("path"),vf=h(),Ni=_(er),kf=h(),ho=r("ul"),Ui=r("li"),tr=r("button"),tr.textContent="JSON",wf=h(),Vi=r("li"),lr=r("button"),lr.textContent="CSV",yf=h(),_s&&_s.c(),Cf=h(),sr=r("div"),dn=r("div"),As=r("div"),mo=re("svg"),pn=re("path"),Ef=h(),Ji=_(or),Tf=h(),qs&&qs.c(),Sf=h(),hn=r("div"),qt=r("div"),nr=r("h3"),Wi=_(ar),Mf=h(),mn=r("div"),rr=r("div"),ir=r("span"),Gi=_(ur),Rf=h(),Ts=r("select"),gn=r("option"),Ki=_(fr),_n=r("option"),_n.textContent="GET",bn=r("option"),bn.textContent="POST",vn=r("option"),vn.textContent="PUT",kn=r("option"),kn.textContent="DELETE",wn=r("option"),wn.textContent="PATCH",qf=h(),yn=r("div"),cr=r("div"),dr=r("span"),Yi=_(pr),Hf=h(),oo=r("input"),Lf=h(),Cn=r("div"),hr=r("div"),mr=r("span"),Qi=_(gr),Pf=h(),Qs=r("select"),En=r("option"),Zi=_(_r),Tn=r("option"),Xi=_(br),Sn=r("option"),xi=_(vr),jf=h(),Mn=r("div"),kr=r("div"),wr=r("span"),$i=_(yr),Df=h(),Fs=r("select"),Rn=r("option"),eu=_(Cr),qn=r("option"),tu=_(Er),Hn=r("option"),lu=_(Tr),Ln=r("option"),su=_(Sr),Bf=h(),Pn=r("div"),Mr=r("div"),Rr=r("span"),ou=_(qr),If=h(),Zs=r("select"),jn=r("option"),nu=_(Hr),Dn=r("option"),au=_(Lr),Bn=r("option"),ru=_(Pr),Af=h(),bs&&bs.c(),iu=h(),vs&&vs.c(),uu=h(),In=r("div"),jr=r("div"),Dr=r("span"),fu=_(Br),Ff=h(),An=r("div"),Xs=r("select"),Fn=r("option"),cu=_(Ir),zn=r("option"),du=_(Ar),On=r("option"),pu=_(Fr),zf=h(),no=r("select"),Nn=r("option"),hu=_(zr),Un=r("option"),mu=_(Or),Of=h(),gu=r("div"),Nf=h(),Nr=r("h3"),_u=_(Ur),Uf=h(),Vr=r("div"),Vn=r("label"),Jr=r("span"),bu=_(Wr),Vf=h(),ko=r("input"),Jf=h(),ks&&ks.c(),vu=h(),xs=r("button"),$s=re("svg"),Jn=re("path"),Wf=h(),ku=_(Gr),Gf=h(),wu=r("div"),Kf=h(),Wn=r("div"),Gn=r("button"),Gn.textContent="JSON",Yf=h(),Kn=r("button"),Kn.textContent="CSV",Qf=h(),ws&&ws.c(),Zf=h(),ys&&ys.c(),Xf=h(),eo.c(),yu=h(),Fl&&Fl.c(),$n=Ul(),o(n,"class","text-2xl lg:text-3xl font-bold"),o(e,"class","mb-6"),o(m,"type","text"),o(m,"placeholder",g=l[24]("logs.searchPlaceholder")),o(m,"class","input input-bordered input-sm w-full"),o(p,"class","flex-1 min-w-[200px] xl:max-w-md"),o(P,"stroke-linecap","round"),o(P,"stroke-linejoin","round"),o(P,"stroke-width","2"),o(P,"d","M19 9l-7 7-7-7"),o(j,"xmlns","http://www.w3.org/2000/svg"),o(j,"class","h-3 w-3"),o(j,"fill","none"),o(j,"viewBox","0 0 24 24"),o(j,"stroke","currentColor"),o(E,"role","button"),o(E,"tabindex","0"),o(E,"class",I="btn btn-sm "+(l[2]?"btn-primary":"btn-ghost")+" gap-1"),le(K,"active",l[2]==="GET"),le(U,"active",l[2]==="POST"),le(ie,"active",l[2]==="PUT"),le($,"active",l[2]==="DELETE"),le(ee,"active",l[2]==="PATCH"),o(D,"role","menu"),o(D,"tabindex","0"),o(D,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(C,"class","dropdown dropdown-end"),o(we,"stroke-linecap","round"),o(we,"stroke-linejoin","round"),o(we,"stroke-width","2"),o(we,"d","M19 9l-7 7-7-7"),o(Pe,"xmlns","http://www.w3.org/2000/svg"),o(Pe,"class","h-3 w-3"),o(Pe,"fill","none"),o(Pe,"viewBox","0 0 24 24"),o(Pe,"stroke","currentColor"),o(oe,"role","button"),o(oe,"tabindex","0"),o(oe,"class",Fe="btn btn-sm "+(l[3]?"btn-primary":"btn-ghost")+" gap-1"),o(fe,"class","label-text text-xs"),o(Se,"class","label py-1"),o(se,"type","text"),o(se,"placeholder","200, 404, 500"),o(se,"class","input input-bordered input-sm"),o(Le,"class","form-control"),o(je,"role","menu"),o(je,"tabindex","0"),o(je,"class","dropdown-content bg-base-100 rounded-box p-3 shadow-lg w-48 z-[1]"),o(pe,"class","dropdown dropdown-end"),o(Ye,"stroke-linecap","round"),o(Ye,"stroke-linejoin","round"),o(Ye,"stroke-width","2"),o(Ye,"d","M19 9l-7 7-7-7"),o(Qe,"xmlns","http://www.w3.org/2000/svg"),o(Qe,"class","h-3 w-3"),o(Qe,"fill","none"),o(Qe,"viewBox","0 0 24 24"),o(Qe,"stroke","currentColor"),o(Ee,"role","button"),o(Ee,"tabindex","0"),o(Ee,"class",ve="btn btn-sm "+(l[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"),le(ce,"active",l[4]===!0),le(O,"active",l[4]===!1),o(Te,"role","menu"),o(Te,"tabindex","0"),o(Te,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-40 z-[1]"),o(me,"class","dropdown dropdown-end"),o(It,"stroke-linecap","round"),o(It,"stroke-linejoin","round"),o(It,"stroke-width","2"),o(It,"d","M19 9l-7 7-7-7"),o(Xe,"xmlns","http://www.w3.org/2000/svg"),o(Xe,"class","h-3 w-3"),o(Xe,"fill","none"),o(Xe,"viewBox","0 0 24 24"),o(Xe,"stroke","currentColor"),o(Ke,"role","button"),o(Ke,"tabindex","0"),o(Ke,"class",rt="btn btn-sm "+(l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(St,"class","label-text text-xs font-semibold"),o(at,"class","label py-1"),hl.__value="",Y(hl,hl.__value),Jt.__value="final",Y(Jt,Jt.__value),Qt.__value="retry",Y(Qt,Qt.__value),gl.__value="recovery",Y(gl,gl.__value),o(At,"class","select select-bordered select-sm"),l[5]===void 0&&pl(()=>l[43].call(At)),o(bl,"class","form-control"),o(Jl,"class","label-text text-xs font-semibold"),o(Vl,"class","label py-1"),Pl.__value="all",Y(Pl,Pl.__value),xt.__value="recent",Y(xt,xt.__value),zl.__value="custom",Y(zl,zl.__value),o(Lt,"class","select select-bordered select-sm"),l[8]===void 0&&pl(()=>l[44].call(Lt)),o(Ll,"class","form-control"),o(nl,"class","divider my-2"),o(tl,"class","label-text text-xs font-semibold"),o(_l,"class","label py-1"),Pt.__value="timestamp",Y(Pt,Pt.__value),Kt.__value="duration",Y(Kt,Kt.__value),Xt.__value="status",Y(Xt,Xt.__value),o(Bt,"class","select select-bordered select-sm flex-1"),l[6]===void 0&&pl(()=>l[48].call(Bt)),xl.__value="desc",Y(xl,xl.__value),ss.__value="asc",Y(ss,ss.__value),o(Xl,"class","select select-bordered select-sm w-24"),l[7]===void 0&&pl(()=>l[49].call(Xl)),o(Wt,"class","flex gap-2"),o(al,"class","form-control"),o(pt,"class","space-y-3"),o(wt,"role","menu"),o(wt,"tabindex","0"),o(wt,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Ht,"class","dropdown dropdown-end"),o(w,"class","flex items-center gap-2 flex-wrap"),o(lt,"class","flex-1"),o(bt,"stroke-linecap","round"),o(bt,"stroke-linejoin","round"),o(bt,"stroke-width","2"),o(bt,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(fl,"stroke-linecap","round"),o(fl,"stroke-linejoin","round"),o(fl,"stroke-width","2"),o(fl,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(xe,"xmlns","http://www.w3.org/2000/svg"),o(xe,"class","h-4 w-4"),o(xe,"fill","none"),o(xe,"viewBox","0 0 24 24"),o(xe,"stroke","currentColor"),o(ul,"role","button"),o(ul,"tabindex","0"),o(ul,"class","btn btn-sm btn-outline gap-1"),o(ra,"class","label-text"),o(bo,"type","checkbox"),o(bo,"class","toggle toggle-primary toggle-sm"),o(Co,"class","label cursor-pointer"),o(aa,"class","form-control"),o(_o,"class","space-y-3"),o(yo,"role","menu"),o(yo,"tabindex","0"),o(yo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-64 z-[1]"),o(Tl,"class","dropdown dropdown-end"),o(Eo,"stroke-linecap","round"),o(Eo,"stroke-linejoin","round"),o(Eo,"stroke-width","2"),o(Eo,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Us,"xmlns","http://www.w3.org/2000/svg"),o(Us,"class","h-4 w-4"),o(Us,"fill","none"),o(Us,"viewBox","0 0 24 24"),o(Us,"stroke","currentColor"),le(Us,"animate-spin",l[17]),o(Ns,"type","button"),o(Ns,"class","btn btn-sm btn-outline gap-2"),Ns.disabled=l[17],o(So,"stroke-linecap","round"),o(So,"stroke-linejoin","round"),o(So,"stroke-width","2"),o(So,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(ro,"xmlns","http://www.w3.org/2000/svg"),o(ro,"class","h-4 w-4"),o(ro,"fill","none"),o(ro,"viewBox","0 0 24 24"),o(ro,"stroke","currentColor"),o(ao,"role","button"),o(ao,"tabindex","0"),o(ao,"class","btn btn-sm btn-secondary gap-2"),o(io,"role","menu"),o(io,"tabindex","0"),o(io,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(To,"class","dropdown dropdown-end"),o(ll,"class","flex items-center gap-2 flex-wrap"),o(k,"class","hidden xl:flex items-center gap-2 flex-wrap flex-1"),o(Ro,"stroke-linecap","round"),o(Ro,"stroke-linejoin","round"),o(Ro,"stroke-width","2"),o(Ro,"d","M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"),o(uo,"xmlns","http://www.w3.org/2000/svg"),o(uo,"class","h-4 w-4"),o(uo,"fill","none"),o(uo,"viewBox","0 0 24 24"),o(uo,"stroke","currentColor"),o(Ps,"role","button"),o(Ps,"tabindex","0"),o(Ps,"class",ha="btn btn-sm "+(l[2]||l[3]||l[4]!==void 0||l[5]||l[8]!=="recent"||l[9]!==1||l[6]!=="timestamp"||l[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"),o(ga,"class","label-text text-xs font-semibold"),o(ma,"class","label py-1"),Lo.__value="",Y(Lo,Lo.__value),Po.__value="GET",Y(Po,Po.__value),jo.__value="POST",Y(jo,jo.__value),Do.__value="PUT",Y(Do,Do.__value),Bo.__value="DELETE",Y(Bo,Bo.__value),Io.__value="PATCH",Y(Io,Io.__value),o(Es,"class","select select-bordered select-sm"),l[2]===void 0&&pl(()=>l[54].call(Es)),o(Ho,"class","form-control"),o(ka,"class","label-text text-xs font-semibold"),o(va,"class","label py-1"),o(lo,"type","text"),o(lo,"placeholder","200, 404, 500"),o(lo,"class","input input-bordered input-sm"),o(Ao,"class","form-control"),o(Ca,"class","label-text text-xs font-semibold"),o(ya,"class","label py-1"),zo.__value=void 0,Y(zo,zo.__value),Oo.__value=!0,Y(Oo,Oo.__value),No.__value=!1,Y(No,No.__value),o(Vs,"class","select select-bordered select-sm"),l[4]===void 0&&pl(()=>l[56].call(Vs)),o(Fo,"class","form-control"),o(_i,"class","divider my-2"),o(qa,"class","label-text text-xs font-semibold"),o(Ra,"class","label py-1"),Vo.__value="",Y(Vo,Vo.__value),Jo.__value="final",Y(Jo,Jo.__value),Wo.__value="retry",Y(Wo,Wo.__value),Go.__value="recovery",Y(Go,Go.__value),o(Is,"class","select select-bordered select-sm"),l[5]===void 0&&pl(()=>l[57].call(Is)),o(Uo,"class","form-control"),o(Ia,"class","label-text text-xs font-semibold"),o(Ba,"class","label py-1"),Yo.__value="all",Y(Yo,Yo.__value),Qo.__value="recent",Y(Qo,Qo.__value),Zo.__value="custom",Y(Zo,Zo.__value),o(Js,"class","select select-bordered select-sm"),l[8]===void 0&&pl(()=>l[58].call(Js)),o(Ko,"class","form-control"),o(qi,"class","divider my-2"),o(Ua,"class","label-text text-xs font-semibold"),o(Na,"class","label py-1"),$o.__value="timestamp",Y($o,$o.__value),en.__value="duration",Y(en,en.__value),tn.__value="status",Y(tn,tn.__value),o(Ws,"class","select select-bordered select-sm flex-1"),l[6]===void 0&&pl(()=>l[62].call(Ws)),ln.__value="desc",Y(ln,ln.__value),sn.__value="asc",Y(sn,sn.__value),o(so,"class","select select-bordered select-sm w-24"),l[7]===void 0&&pl(()=>l[63].call(so)),o(xo,"class","flex gap-2"),o(Xo,"class","form-control"),o(cl,"class","space-y-3"),o(qo,"role","menu"),o(qo,"tabindex","0"),o(qo,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(Mo,"class","dropdown dropdown-end"),o(nn,"stroke-linecap","round"),o(nn,"stroke-linejoin","round"),o(nn,"stroke-width","2"),o(nn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Gs,"xmlns","http://www.w3.org/2000/svg"),o(Gs,"class","h-4 w-4"),o(Gs,"fill","none"),o(Gs,"viewBox","0 0 24 24"),o(Gs,"stroke","currentColor"),le(Gs,"animate-spin",l[17]),o(fo,"role","button"),o(fo,"tabindex","0"),o(fo,"class","btn btn-sm btn-ghost gap-2"),o(Xa,"class","label-text"),o(vo,"type","checkbox"),o(vo,"class","toggle toggle-primary toggle-sm"),o(rn,"class","label cursor-pointer"),o(Za,"class","form-control"),o(zi,"class","divider my-2"),o(un,"stroke-linecap","round"),o(un,"stroke-linejoin","round"),o(un,"stroke-width","2"),o(un,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o(Ys,"xmlns","http://www.w3.org/2000/svg"),o(Ys,"class","h-4 w-4"),o(Ys,"fill","none"),o(Ys,"viewBox","0 0 24 24"),o(Ys,"stroke","currentColor"),le(Ys,"animate-spin",l[17]),o(Ks,"type","button"),o(Ks,"class","btn btn-sm btn-primary w-full gap-2"),Ks.disabled=l[17],o(os,"class","space-y-3"),o(an,"role","menu"),o(an,"tabindex","0"),o(an,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-72 z-[1]"),o(on,"class","dropdown dropdown-end"),o(cn,"stroke-linecap","round"),o(cn,"stroke-linejoin","round"),o(cn,"stroke-width","2"),o(cn,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),o(po,"xmlns","http://www.w3.org/2000/svg"),o(po,"class","h-4 w-4"),o(po,"fill","none"),o(po,"viewBox","0 0 24 24"),o(po,"stroke","currentColor"),o(co,"role","button"),o(co,"tabindex","0"),o(co,"class","btn btn-sm btn-secondary gap-2"),o(ho,"role","menu"),o(ho,"tabindex","0"),o(ho,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 z-[1]"),o(fn,"class","dropdown dropdown-end"),o(Bs,"class","hidden md:flex xl:hidden items-center gap-2"),o(pn,"stroke-linecap","round"),o(pn,"stroke-linejoin","round"),o(pn,"stroke-width","2"),o(pn,"d","M4 6h16M4 12h16M4 18h16"),o(mo,"xmlns","http://www.w3.org/2000/svg"),o(mo,"class","h-4 w-4"),o(mo,"fill","none"),o(mo,"viewBox","0 0 24 24"),o(mo,"stroke","currentColor"),o(As,"role","button"),o(As,"tabindex","0"),o(As,"class","btn btn-sm btn-ghost gap-1"),o(nr,"class","font-semibold text-sm"),o(ir,"class","label-text text-xs font-semibold"),o(rr,"class","label py-1"),gn.__value="",Y(gn,gn.__value),_n.__value="GET",Y(_n,_n.__value),bn.__value="POST",Y(bn,bn.__value),vn.__value="PUT",Y(vn,vn.__value),kn.__value="DELETE",Y(kn,kn.__value),wn.__value="PATCH",Y(wn,wn.__value),o(Ts,"class","select select-bordered select-sm"),l[2]===void 0&&pl(()=>l[68].call(Ts)),o(mn,"class","form-control"),o(dr,"class","label-text text-xs font-semibold"),o(cr,"class","label py-1"),o(oo,"type","text"),o(oo,"placeholder","200, 404, 500"),o(oo,"class","input input-bordered input-sm"),o(yn,"class","form-control"),o(mr,"class","label-text text-xs font-semibold"),o(hr,"class","label py-1"),En.__value=void 0,Y(En,En.__value),Tn.__value=!0,Y(Tn,Tn.__value),Sn.__value=!1,Y(Sn,Sn.__value),o(Qs,"class","select select-bordered select-sm"),l[4]===void 0&&pl(()=>l[70].call(Qs)),o(Cn,"class","form-control"),o(wr,"class","label-text text-xs font-semibold"),o(kr,"class","label py-1"),Rn.__value="",Y(Rn,Rn.__value),qn.__value="final",Y(qn,qn.__value),Hn.__value="retry",Y(Hn,Hn.__value),Ln.__value="recovery",Y(Ln,Ln.__value),o(Fs,"class","select select-bordered select-sm"),l[5]===void 0&&pl(()=>l[71].call(Fs)),o(Mn,"class","form-control"),o(Rr,"class","label-text text-xs font-semibold"),o(Mr,"class","label py-1"),jn.__value="all",Y(jn,jn.__value),Dn.__value="recent",Y(Dn,Dn.__value),Bn.__value="custom",Y(Bn,Bn.__value),o(Zs,"class","select select-bordered select-sm"),l[8]===void 0&&pl(()=>l[72].call(Zs)),o(Pn,"class","form-control"),o(Dr,"class","label-text text-xs font-semibold"),o(jr,"class","label py-1"),Fn.__value="timestamp",Y(Fn,Fn.__value),zn.__value="duration",Y(zn,zn.__value),On.__value="status",Y(On,On.__value),o(Xs,"class","select select-bordered select-sm flex-1"),l[6]===void 0&&pl(()=>l[76].call(Xs)),Nn.__value="desc",Y(Nn,Nn.__value),Un.__value="asc",Y(Un,Un.__value),o(no,"class","select select-bordered select-sm w-24"),l[7]===void 0&&pl(()=>l[77].call(no)),o(An,"class","flex gap-2"),o(In,"class","form-control"),o(gu,"class","divider my-2"),o(Nr,"class","font-semibold text-sm"),o(Jr,"class","label-text"),o(ko,"type","checkbox"),o(ko,"class","toggle toggle-primary toggle-sm"),o(Vn,"class","label cursor-pointer"),o(Vr,"class","form-control"),o(Jn,"stroke-linecap","round"),o(Jn,"stroke-linejoin","round"),o(Jn,"stroke-width","2"),o(Jn,"d","M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"),o($s,"xmlns","http://www.w3.org/2000/svg"),o($s,"class","h-4 w-4"),o($s,"fill","none"),o($s,"viewBox","0 0 24 24"),o($s,"stroke","currentColor"),le($s,"animate-spin",l[17]),o(xs,"type","button"),o(xs,"class","btn btn-sm btn-primary w-full gap-2"),xs.disabled=l[17],o(wu,"class","divider my-2"),o(Gn,"type","button"),o(Gn,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(Kn,"type","button"),o(Kn,"class","btn btn-sm btn-secondary flex-1 gap-2"),o(Wn,"class","flex gap-2"),o(qt,"class","space-y-3"),o(hn,"role","menu"),o(hn,"tabindex","0"),o(hn,"class","dropdown-content bg-base-100 rounded-box p-4 shadow-lg w-80 z-[1]"),o(dn,"class","dropdown dropdown-end"),o(sr,"class","flex md:hidden items-center gap-2"),o(d,"class","flex items-center gap-2 mb-3"),o(f,"class","mb-6"),o(s,"class","p-6")},m(W,be){L(W,s,be),t(s,e),t(e,n),t(n,i),t(s,u),ns&&ns.m(s,null),t(s,c),t(s,f),t(f,d),t(d,p),t(p,m),Y(m,l[1]),t(d,b),t(d,k),t(k,w),t(w,C),t(C,E),t(E,T),t(E,M),Ss&&Ss.m(E,null),t(E,R),t(E,j),t(j,P),t(C,q),t(C,D),t(D,A),t(A,N),t(N,Q),t(D,x),t(D,z),t(z,K),t(D,S),t(D,B),t(B,U),t(D,F),t(D,J),t(J,ie),t(D,ue),t(D,ne),t(ne,$),t(D,te),t(D,ae),t(ae,ee),t(w,G),t(w,pe),t(pe,oe),t(oe,he),t(oe,ye),Ms&&Ms.m(oe,null),t(oe,ze),t(oe,Pe),t(Pe,we),t(pe,Je),t(pe,je),t(je,Le),t(Le,Se),t(Se,fe),t(fe,Ie),t(Le,De),t(Le,se),Y(se,l[3]),t(w,ke),t(w,me),t(me,Ee),t(Ee,Be),t(Ee,nt),Rs&&Rs.m(Ee,null),t(Ee,Ne),t(Ee,Qe),t(Qe,Ye),t(me,de),t(me,Te),t(Te,Ze),t(Ze,Me),t(Me,Ce),t(Te,mt),t(Te,Ge),t(Ge,ce),t(ce,Re),t(Te,dt),t(Te,We),t(We,O),t(O,X),t(w,ft),t(w,Ht),t(Ht,Ke),t(Ke,tt),t(Ke,it),as&&as.m(Ke,null),t(Ke,Oe),t(Ke,Xe),t(Xe,It),t(Ht,gt),t(Ht,wt),t(wt,pt),t(pt,bl),t(bl,at),t(at,St),t(St,Tt),t(bl,vl),t(bl,At),t(At,hl),t(hl,ql),t(At,Jt),t(Jt,Yt),t(At,Qt),t(Qt,Bl),t(At,gl),t(gl,Ql),kt(At,l[5],!0),t(pt,Ft),t(pt,Ll),t(Ll,Vl),t(Vl,Jl),t(Jl,zt),t(Ll,Zl),t(Ll,Lt),t(Lt,Pl),t(Pl,$l),t(Lt,xt),t(xt,es),t(Lt,zl),t(zl,Wl),kt(Lt,l[8],!0),t(pt,Ls),rs&&rs.m(pt,null),t(pt,ol),is&&is.m(pt,null),t(pt,wl),t(pt,nl),t(pt,Ol),t(pt,al),t(al,_l),t(_l,tl),t(tl,Nl),t(al,El),t(al,Wt),t(Wt,Bt),t(Bt,Pt),t(Pt,el),t(Bt,Kt),t(Kt,rl),t(Bt,Xt),t(Xt,Al),kt(Bt,l[6],!0),t(Wt,ts),t(Wt,Xl),t(Xl,xl),t(xl,Ds),t(Xl,ss),t(ss,il),kt(Xl,l[7],!0),t(k,Ot),t(k,lt),t(k,ct),t(k,ll),t(ll,Tl),t(Tl,ul),t(ul,xe),t(xe,bt),t(xe,fl),t(ul,xn),us&&us.m(ul,null),t(Tl,Bu),t(Tl,yo),t(yo,_o),t(_o,aa),t(aa,Co),t(Co,ra),t(ra,li),t(Co,Iu),t(Co,bo),bo.checked=l[12],t(_o,Au),fs&&fs.m(_o,null),t(ll,Fu),t(ll,Ns),t(Ns,Us),t(Us,Eo),t(Ns,zu),t(Ns,si),t(si,oi),t(ll,Ou),t(ll,To),t(To,ao),t(ao,ro),t(ro,So),t(ao,Nu),t(ao,ni),t(ni,ai),t(To,Uu),t(To,io),t(io,ri),t(ri,ca),t(io,Vu),t(io,ii),t(ii,da),t(ll,Ju),cs&&cs.m(ll,null),t(d,Wu),t(d,Bs),t(Bs,Mo),t(Mo,Ps),t(Ps,uo),t(uo,Ro),t(Ps,Gu),t(Ps,ui),t(Ps,Ku),ds&&ds.m(Ps,null),t(Mo,Yu),t(Mo,qo),t(qo,cl),t(cl,Ho),t(Ho,ma),t(ma,ga),t(ga,fi),t(Ho,Qu),t(Ho,Es),t(Es,Lo),t(Lo,ci),t(Es,Po),t(Es,jo),t(Es,Do),t(Es,Bo),t(Es,Io),kt(Es,l[2],!0),t(cl,Zu),t(cl,Ao),t(Ao,va),t(va,ka),t(ka,di),t(Ao,Xu),t(Ao,lo),Y(lo,l[3]),t(cl,xu),t(cl,Fo),t(Fo,ya),t(ya,Ca),t(Ca,pi),t(Fo,$u),t(Fo,Vs),t(Vs,zo),t(zo,hi),t(Vs,Oo),t(Oo,mi),t(Vs,No),t(No,gi),kt(Vs,l[4],!0),t(cl,ef),t(cl,_i),t(cl,tf),t(cl,Uo),t(Uo,Ra),t(Ra,qa),t(qa,bi),t(Uo,lf),t(Uo,Is),t(Is,Vo),t(Vo,vi),t(Is,Jo),t(Jo,ki),t(Is,Wo),t(Wo,wi),t(Is,Go),t(Go,yi),kt(Is,l[5],!0),t(cl,sf),t(cl,Ko),t(Ko,Ba),t(Ba,Ia),t(Ia,Ci),t(Ko,of),t(Ko,Js),t(Js,Yo),t(Yo,Ei),t(Js,Qo),t(Qo,Ti),t(Js,Zo),t(Zo,Si),kt(Js,l[8],!0),t(cl,nf),ps&&ps.m(cl,null),t(cl,Mi),hs&&hs.m(cl,null),t(cl,Ri),t(cl,qi),t(cl,af),t(cl,Xo),t(Xo,Na),t(Na,Ua),t(Ua,Hi),t(Xo,rf),t(Xo,xo),t(xo,Ws),t(Ws,$o),t($o,Li),t(Ws,en),t(en,Pi),t(Ws,tn),t(tn,ji),kt(Ws,l[6],!0),t(xo,uf),t(xo,so),t(so,ln),t(ln,Di),t(so,sn),t(sn,Bi),kt(so,l[7],!0),t(Bs,ff),t(Bs,on),t(on,fo),t(fo,Gs),t(Gs,nn),t(fo,cf),t(fo,Ii),t(on,df),t(on,an),t(an,os),t(os,Za),t(Za,rn),t(rn,Xa),t(Xa,Ai),t(rn,pf),t(rn,vo),vo.checked=l[12],t(os,hf),ms&&ms.m(os,null),t(os,Fi),t(os,zi),t(os,mf),t(os,Ks),t(Ks,Ys),t(Ys,un),t(Ks,gf),t(Ks,Oi),t(os,_f),gs&&gs.m(os,null),t(Bs,bf),t(Bs,fn),t(fn,co),t(co,po),t(po,cn),t(co,vf),t(co,Ni),t(fn,kf),t(fn,ho),t(ho,Ui),t(Ui,tr),t(ho,wf),t(ho,Vi),t(Vi,lr),t(Bs,yf),_s&&_s.m(Bs,null),t(d,Cf),t(d,sr),t(sr,dn),t(dn,As),t(As,mo),t(mo,pn),t(As,Ef),t(As,Ji),t(As,Tf),qs&&qs.m(As,null),t(dn,Sf),t(dn,hn),t(hn,qt),t(qt,nr),t(nr,Wi),t(qt,Mf),t(qt,mn),t(mn,rr),t(rr,ir),t(ir,Gi),t(mn,Rf),t(mn,Ts),t(Ts,gn),t(gn,Ki),t(Ts,_n),t(Ts,bn),t(Ts,vn),t(Ts,kn),t(Ts,wn),kt(Ts,l[2],!0),t(qt,qf),t(qt,yn),t(yn,cr),t(cr,dr),t(dr,Yi),t(yn,Hf),t(yn,oo),Y(oo,l[3]),t(qt,Lf),t(qt,Cn),t(Cn,hr),t(hr,mr),t(mr,Qi),t(Cn,Pf),t(Cn,Qs),t(Qs,En),t(En,Zi),t(Qs,Tn),t(Tn,Xi),t(Qs,Sn),t(Sn,xi),kt(Qs,l[4],!0),t(qt,jf),t(qt,Mn),t(Mn,kr),t(kr,wr),t(wr,$i),t(Mn,Df),t(Mn,Fs),t(Fs,Rn),t(Rn,eu),t(Fs,qn),t(qn,tu),t(Fs,Hn),t(Hn,lu),t(Fs,Ln),t(Ln,su),kt(Fs,l[5],!0),t(qt,Bf),t(qt,Pn),t(Pn,Mr),t(Mr,Rr),t(Rr,ou),t(Pn,If),t(Pn,Zs),t(Zs,jn),t(jn,nu),t(Zs,Dn),t(Dn,au),t(Zs,Bn),t(Bn,ru),kt(Zs,l[8],!0),t(qt,Af),bs&&bs.m(qt,null),t(qt,iu),vs&&vs.m(qt,null),t(qt,uu),t(qt,In),t(In,jr),t(jr,Dr),t(Dr,fu),t(In,Ff),t(In,An),t(An,Xs),t(Xs,Fn),t(Fn,cu),t(Xs,zn),t(zn,du),t(Xs,On),t(On,pu),kt(Xs,l[6],!0),t(An,zf),t(An,no),t(no,Nn),t(Nn,hu),t(no,Un),t(Un,mu),kt(no,l[7],!0),t(qt,Of),t(qt,gu),t(qt,Nf),t(qt,Nr),t(Nr,_u),t(qt,Uf),t(qt,Vr),t(Vr,Vn),t(Vn,Jr),t(Jr,bu),t(Vn,Vf),t(Vn,ko),ko.checked=l[12],t(qt,Jf),ks&&ks.m(qt,null),t(qt,vu),t(qt,xs),t(xs,$s),t($s,Jn),t(xs,Wf),t(xs,ku),t(qt,Gf),t(qt,wu),t(qt,Kf),t(qt,Wn),t(Wn,Gn),t(Wn,Yf),t(Wn,Kn),t(qt,Qf),ws&&ws.m(qt,null),t(f,Zf),ys&&ys.m(f,null),t(s,Xf),eo.m(s,null),L(W,yu,be),Fl&&Fl.m(W,be),L(W,$n,be),Ae=!0,Cu||(xf=[V(m,"input",l[32]),V(N,"click",l[33]),V(K,"click",l[34]),V(U,"click",l[35]),V(ie,"click",l[36]),V($,"click",l[37]),V(ee,"click",l[38]),V(se,"input",l[39]),V(Me,"click",l[40]),V(ce,"click",l[41]),V(O,"click",l[42]),V(At,"change",l[43]),V(Lt,"change",l[44]),V(Bt,"change",l[48]),V(Xl,"change",l[49]),V(bo,"change",l[50]),V(Ns,"click",l[29]),V(ca,"click",l[52]),V(da,"click",l[53]),V(Es,"change",l[54]),V(lo,"input",l[55]),V(Vs,"change",l[56]),V(Is,"change",l[57]),V(Js,"change",l[58]),V(Ws,"change",l[62]),V(so,"change",l[63]),V(vo,"change",l[64]),V(Ks,"click",l[29]),V(tr,"click",l[66]),V(lr,"click",l[67]),V(Ts,"change",l[68]),V(oo,"input",l[69]),V(Qs,"change",l[70]),V(Fs,"change",l[71]),V(Zs,"change",l[72]),V(Xs,"change",l[76]),V(no,"change",l[77]),V(ko,"change",l[78]),V(xs,"click",l[29]),V(Gn,"click",l[80]),V(Kn,"click",l[81])],Cu=!0)},p(W,be){(!Ae||be[0]&16777216)&&a!==(a=W[24]("logs.title")+"")&&v(i,a),W[22]?ns?ns.p(W,be):(ns=Kd(W),ns.c(),ns.m(s,c)):ns&&(ns.d(1),ns=null),(!Ae||be[0]&16777216&&g!==(g=W[24]("logs.searchPlaceholder")))&&o(m,"placeholder",g),be[0]&2&&m.value!==W[1]&&Y(m,W[1]),(!Ae||be[0]&16777216)&&y!==(y=W[24]("logs.method")+"")&&v(T,y),W[2]?Ss||(Ss=Yd(),Ss.c(),Ss.m(E,R)):Ss&&(Ss.d(1),Ss=null),(!Ae||be[0]&4&&I!==(I="btn btn-sm "+(W[2]?"btn-primary":"btn-ghost")+" gap-1"))&&o(E,"class",I),(!Ae||be[0]&16777216)&&Z!==(Z=W[24]("logs.allMethods")+"")&&v(Q,Z),(!Ae||be[0]&4)&&le(K,"active",W[2]==="GET"),(!Ae||be[0]&4)&&le(U,"active",W[2]==="POST"),(!Ae||be[0]&4)&&le(ie,"active",W[2]==="PUT"),(!Ae||be[0]&4)&&le($,"active",W[2]==="DELETE"),(!Ae||be[0]&4)&&le(ee,"active",W[2]==="PATCH"),(!Ae||be[0]&16777216)&&ge!==(ge=W[24]("logs.status")+"")&&v(he,ge),W[3]?Ms||(Ms=Qd(),Ms.c(),Ms.m(oe,ze)):Ms&&(Ms.d(1),Ms=null),(!Ae||be[0]&8&&Fe!==(Fe="btn btn-sm "+(W[3]?"btn-primary":"btn-ghost")+" gap-1"))&&o(oe,"class",Fe),(!Ae||be[0]&16777216)&&_e!==(_e=W[24]("logs.statusPlaceholder")+"")&&v(Ie,_e),be[0]&8&&se.value!==W[3]&&Y(se,W[3]),(!Ae||be[0]&16777216)&&Ve!==(Ve=W[24]("logs.result")+"")&&v(Be,Ve),W[4]!==void 0?Rs||(Rs=Zd(),Rs.c(),Rs.m(Ee,Ne)):Rs&&(Rs.d(1),Rs=null),(!Ae||be[0]&16&&ve!==(ve="btn btn-sm "+(W[4]!==void 0?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ee,"class",ve),(!Ae||be[0]&16777216)&&Ue!==(Ue=W[24]("logs.allResults")+"")&&v(Ce,Ue),(!Ae||be[0]&16777216)&&qe!==(qe=W[24]("logs.success")+"")&&v(Re,qe),(!Ae||be[0]&16)&&le(ce,"active",W[4]===!0),(!Ae||be[0]&16777216)&&He!==(He=W[24]("logs.failed")+"")&&v(X,He),(!Ae||be[0]&16)&&le(O,"active",W[4]===!1),(!Ae||be[0]&16777216)&&_t!==(_t=W[24]("logs.moreFilters")+"")&&v(tt,_t),W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?as?as.p(W,be):(as=Xd(W),as.c(),as.m(Ke,Oe)):as&&(as.d(1),as=null),(!Ae||be[0]&992&&rt!==(rt="btn btn-sm "+(W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ke,"class",rt),(!Ae||be[0]&16777216)&&ht!==(ht=W[24]("logs.requestTypeFilter")+"")&&v(Tt,ht),(!Ae||be[0]&16777216)&&ml!==(ml=W[24]("logs.requestType_all")+"")&&v(ql,ml),(!Ae||be[0]&16777216)&&Yl!==(Yl=W[24]("logs.requestType_final")+"")&&v(Yt,Yl),(!Ae||be[0]&16777216)&&Hl!==(Hl=W[24]("logs.requestType_retry")+"")&&v(Bl,Hl),(!Ae||be[0]&16777216)&&sl!==(sl=W[24]("logs.requestType_recovery")+"")&&v(Ql,sl),be[0]&32&&kt(At,W[5]),(!Ae||be[0]&16777216)&&Cl!==(Cl=W[24]("logs.timeRange")+"")&&v(zt,Cl),(!Ae||be[0]&16777216)&&jl!==(jl=W[24]("logs.allTime")+"")&&v($l,jl),(!Ae||be[0]&16777216)&&kl!==(kl=W[24]("logs.recentTime")+"")&&v(es,kl),(!Ae||be[0]&16777216)&&Il!==(Il=W[24]("logs.customTime")+"")&&v(Wl,Il),be[0]&256&&kt(Lt,W[8]),W[8]==="recent"?rs?rs.p(W,be):(rs=xd(W),rs.c(),rs.m(pt,ol)):rs&&(rs.d(1),rs=null),W[8]==="custom"?is?is.p(W,be):(is=$d(W),is.c(),is.m(pt,wl)):is&&(is.d(1),is=null),(!Ae||be[0]&16777216)&&Dl!==(Dl=W[24]("logs.sortBy")+"")&&v(Nl,Dl),(!Ae||be[0]&16777216)&&$t!==($t=W[24]("logs.sortByTimestamp")+"")&&v(el,$t),(!Ae||be[0]&16777216)&&Zt!==(Zt=W[24]("logs.sortByDuration")+"")&&v(rl,Zt),(!Ae||be[0]&16777216)&&$e!==($e=W[24]("logs.sortByStatus")+"")&&v(Al,$e),be[0]&64&&kt(Bt,W[6]),(!Ae||be[0]&16777216)&&ls!==(ls=W[24]("logs.desc")+"")&&v(Ds,ls),(!Ae||be[0]&16777216)&&Os!==(Os=W[24]("logs.asc")+"")&&v(il,Os),be[0]&128&&kt(Xl,W[7]),W[12]?us?us.p(W,be):(us=ep(W),us.c(),us.m(ul,null)):us&&(us.d(1),us=null),(!Ae||be[0]&16777216)&&ia!==(ia=W[24]("logs.autoRefresh")+"")&&v(li,ia),be[0]&4096&&(bo.checked=W[12]),W[12]?fs?fs.p(W,be):(fs=tp(W),fs.c(),fs.m(_o,null)):fs&&(fs.d(1),fs=null),(!Ae||be[0]&131072)&&le(Us,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&ua!==(ua=W[24]("common.refresh")+"")&&v(oi,ua),(!Ae||be[0]&131072)&&(Ns.disabled=W[17]),(!Ae||be[0]&16777216)&&fa!==(fa=W[24]("logs.export")+"")&&v(ai,fa),W[23]>0?cs?cs.p(W,be):(cs=lp(W),cs.c(),cs.m(ll,null)):cs&&(cs.d(1),cs=null),(!Ae||be[0]&16777216)&&pa!==(pa=W[24]("logs.filters")+"")&&v(ui,pa),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?ds?ds.p(W,be):(ds=sp(W),ds.c(),ds.m(Ps,null)):ds&&(ds.d(1),ds=null),(!Ae||be[0]&1020&&ha!==(ha="btn btn-sm "+(W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"?"btn-primary":"btn-ghost")+" gap-1"))&&o(Ps,"class",ha),(!Ae||be[0]&16777216)&&_a!==(_a=W[24]("logs.method")+"")&&v(fi,_a),(!Ae||be[0]&16777216)&&ba!==(ba=W[24]("logs.allMethods")+"")&&v(ci,ba),be[0]&4&&kt(Es,W[2]),(!Ae||be[0]&16777216)&&wa!==(wa=W[24]("logs.status")+"")&&v(di,wa),be[0]&8&&lo.value!==W[3]&&Y(lo,W[3]),(!Ae||be[0]&16777216)&&Ea!==(Ea=W[24]("logs.result")+"")&&v(pi,Ea),(!Ae||be[0]&16777216)&&Ta!==(Ta=W[24]("logs.allResults")+"")&&v(hi,Ta),(!Ae||be[0]&16777216)&&Sa!==(Sa=W[24]("logs.success")+"")&&v(mi,Sa),(!Ae||be[0]&16777216)&&Ma!==(Ma=W[24]("logs.failed")+"")&&v(gi,Ma),be[0]&16&&kt(Vs,W[4]),(!Ae||be[0]&16777216)&&Ha!==(Ha=W[24]("logs.requestTypeFilter")+"")&&v(bi,Ha),(!Ae||be[0]&16777216)&&La!==(La=W[24]("logs.requestType_all")+"")&&v(vi,La),(!Ae||be[0]&16777216)&&Pa!==(Pa=W[24]("logs.requestType_final")+"")&&v(ki,Pa),(!Ae||be[0]&16777216)&&ja!==(ja=W[24]("logs.requestType_retry")+"")&&v(wi,ja),(!Ae||be[0]&16777216)&&Da!==(Da=W[24]("logs.requestType_recovery")+"")&&v(yi,Da),be[0]&32&&kt(Is,W[5]),(!Ae||be[0]&16777216)&&Aa!==(Aa=W[24]("logs.timeRange")+"")&&v(Ci,Aa),(!Ae||be[0]&16777216)&&Fa!==(Fa=W[24]("logs.allTime")+"")&&v(Ei,Fa),(!Ae||be[0]&16777216)&&za!==(za=W[24]("logs.recentTime")+"")&&v(Ti,za),(!Ae||be[0]&16777216)&&Oa!==(Oa=W[24]("logs.customTime")+"")&&v(Si,Oa),be[0]&256&&kt(Js,W[8]),W[8]==="recent"?ps?ps.p(W,be):(ps=op(W),ps.c(),ps.m(cl,Mi)):ps&&(ps.d(1),ps=null),W[8]==="custom"?hs?hs.p(W,be):(hs=np(W),hs.c(),hs.m(cl,Ri)):hs&&(hs.d(1),hs=null),(!Ae||be[0]&16777216)&&Va!==(Va=W[24]("logs.sortBy")+"")&&v(Hi,Va),(!Ae||be[0]&16777216)&&Ja!==(Ja=W[24]("logs.sortByTimestamp")+"")&&v(Li,Ja),(!Ae||be[0]&16777216)&&Wa!==(Wa=W[24]("logs.sortByDuration")+"")&&v(Pi,Wa),(!Ae||be[0]&16777216)&&Ga!==(Ga=W[24]("logs.sortByStatus")+"")&&v(ji,Ga),be[0]&64&&kt(Ws,W[6]),(!Ae||be[0]&16777216)&&Ka!==(Ka=W[24]("logs.desc")+"")&&v(Di,Ka),(!Ae||be[0]&16777216)&&Ya!==(Ya=W[24]("logs.asc")+"")&&v(Bi,Ya),be[0]&128&&kt(so,W[7]),(!Ae||be[0]&131072)&&le(Gs,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&Qa!==(Qa=W[24]("common.refresh")+"")&&v(Ii,Qa),(!Ae||be[0]&16777216)&&xa!==(xa=W[24]("logs.autoRefresh")+"")&&v(Ai,xa),be[0]&4096&&(vo.checked=W[12]),W[12]?ms?ms.p(W,be):(ms=ap(W),ms.c(),ms.m(os,Fi)):ms&&(ms.d(1),ms=null),(!Ae||be[0]&131072)&&le(Ys,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&$a!==($a=W[24]("common.refresh")+"")&&v(Oi,$a),(!Ae||be[0]&131072)&&(Ks.disabled=W[17]),W[21]>0?gs?gs.p(W,be):(gs=rp(W),gs.c(),gs.m(os,null)):gs&&(gs.d(1),gs=null),(!Ae||be[0]&16777216)&&er!==(er=W[24]("logs.export")+"")&&v(Ni,er),W[23]>0?_s?_s.p(W,be):(_s=ip(W),_s.c(),_s.m(Bs,null)):_s&&(_s.d(1),_s=null),(!Ae||be[0]&16777216)&&or!==(or=W[24]("logs.actions")+"")&&v(Ji,or),W[2]||W[3]||W[4]!==void 0||W[5]||W[8]!=="recent"||W[9]!==1||W[6]!=="timestamp"||W[7]!=="desc"||W[12]?qs||(qs=up(),qs.c(),qs.m(As,null)):qs&&(qs.d(1),qs=null),(!Ae||be[0]&16777216)&&ar!==(ar=W[24]("logs.filters")+"")&&v(Wi,ar),(!Ae||be[0]&16777216)&&ur!==(ur=W[24]("logs.method")+"")&&v(Gi,ur),(!Ae||be[0]&16777216)&&fr!==(fr=W[24]("logs.allMethods")+"")&&v(Ki,fr),be[0]&4&&kt(Ts,W[2]),(!Ae||be[0]&16777216)&&pr!==(pr=W[24]("logs.status")+"")&&v(Yi,pr),be[0]&8&&oo.value!==W[3]&&Y(oo,W[3]),(!Ae||be[0]&16777216)&&gr!==(gr=W[24]("logs.result")+"")&&v(Qi,gr),(!Ae||be[0]&16777216)&&_r!==(_r=W[24]("logs.allResults")+"")&&v(Zi,_r),(!Ae||be[0]&16777216)&&br!==(br=W[24]("logs.success")+"")&&v(Xi,br),(!Ae||be[0]&16777216)&&vr!==(vr=W[24]("logs.failed")+"")&&v(xi,vr),be[0]&16&&kt(Qs,W[4]),(!Ae||be[0]&16777216)&&yr!==(yr=W[24]("logs.requestTypeFilter")+"")&&v($i,yr),(!Ae||be[0]&16777216)&&Cr!==(Cr=W[24]("logs.requestType_all")+"")&&v(eu,Cr),(!Ae||be[0]&16777216)&&Er!==(Er=W[24]("logs.requestType_final")+"")&&v(tu,Er),(!Ae||be[0]&16777216)&&Tr!==(Tr=W[24]("logs.requestType_retry")+"")&&v(lu,Tr),(!Ae||be[0]&16777216)&&Sr!==(Sr=W[24]("logs.requestType_recovery")+"")&&v(su,Sr),be[0]&32&&kt(Fs,W[5]),(!Ae||be[0]&16777216)&&qr!==(qr=W[24]("logs.timeRange")+"")&&v(ou,qr),(!Ae||be[0]&16777216)&&Hr!==(Hr=W[24]("logs.allTime")+"")&&v(nu,Hr),(!Ae||be[0]&16777216)&&Lr!==(Lr=W[24]("logs.recentTime")+"")&&v(au,Lr),(!Ae||be[0]&16777216)&&Pr!==(Pr=W[24]("logs.customTime")+"")&&v(ru,Pr),be[0]&256&&kt(Zs,W[8]),W[8]==="recent"?bs?bs.p(W,be):(bs=fp(W),bs.c(),bs.m(qt,iu)):bs&&(bs.d(1),bs=null),W[8]==="custom"?vs?vs.p(W,be):(vs=cp(W),vs.c(),vs.m(qt,uu)):vs&&(vs.d(1),vs=null),(!Ae||be[0]&16777216)&&Br!==(Br=W[24]("logs.sortBy")+"")&&v(fu,Br),(!Ae||be[0]&16777216)&&Ir!==(Ir=W[24]("logs.sortByTimestamp")+"")&&v(cu,Ir),(!Ae||be[0]&16777216)&&Ar!==(Ar=W[24]("logs.sortByDuration")+"")&&v(du,Ar),(!Ae||be[0]&16777216)&&Fr!==(Fr=W[24]("logs.sortByStatus")+"")&&v(pu,Fr),be[0]&64&&kt(Xs,W[6]),(!Ae||be[0]&16777216)&&zr!==(zr=W[24]("logs.desc")+"")&&v(hu,zr),(!Ae||be[0]&16777216)&&Or!==(Or=W[24]("logs.asc")+"")&&v(mu,Or),be[0]&128&&kt(no,W[7]),(!Ae||be[0]&16777216)&&Ur!==(Ur=W[24]("common.refresh")+"")&&v(_u,Ur),(!Ae||be[0]&16777216)&&Wr!==(Wr=W[24]("logs.autoRefresh")+"")&&v(bu,Wr),be[0]&4096&&(ko.checked=W[12]),W[12]?ks?ks.p(W,be):(ks=dp(W),ks.c(),ks.m(qt,vu)):ks&&(ks.d(1),ks=null),(!Ae||be[0]&131072)&&le($s,"animate-spin",W[17]),(!Ae||be[0]&16777216)&&Gr!==(Gr=W[24]("common.refresh")+"")&&v(ku,Gr),(!Ae||be[0]&131072)&&(xs.disabled=W[17]),W[23]>0?ws?ws.p(W,be):(ws=pp(W),ws.c(),ws.m(qt,null)):ws&&(ws.d(1),ws=null),W[23]>0?ys?ys.p(W,be):(ys=hp(W),ys.c(),ys.m(f,null)):ys&&(ys.d(1),ys=null),Kr===(Kr=$f(W))&&eo?eo.p(W,be):(eo.d(1),eo=Kr(W),eo&&(eo.c(),eo.m(s,null))),W[20]&&W[19]?Fl?(Fl.p(W,be),be[0]&1572864&&et(Fl,1)):(Fl=Tp(W),Fl.c(),et(Fl,1),Fl.m($n.parentNode,$n)):Fl&&(Gl(),st(Fl,1,1,()=>{Fl=null}),Kl())},i(W){Ae||(et(Fl),Ae=!0)},o(W){st(Fl),Ae=!1},d(W){W&&(H(s),H(yu),H($n)),ns&&ns.d(),Ss&&Ss.d(),Ms&&Ms.d(),Rs&&Rs.d(),as&&as.d(),rs&&rs.d(),is&&is.d(),us&&us.d(),fs&&fs.d(),cs&&cs.d(),ds&&ds.d(),ps&&ps.d(),hs&&hs.d(),ms&&ms.d(),gs&&gs.d(),_s&&_s.d(),qs&&qs.d(),bs&&bs.d(),vs&&vs.d(),ks&&ks.d(),ws&&ws.d(),ys&&ys.d(),eo.d(),Fl&&Fl.d(W),Cu=!1,vt(xf)}}}let Yn=50;function Sp(l){return new Date(l).toLocaleString()}function Mp(l){return l<1e3?\`\${l}ms\`:\`\${(l/1e3).toFixed(2)}s\`}function Rp(l){return l<300?"badge-success":l<400?"badge-info":l<500?"badge-warning":"badge-error"}function qp(l){return l==="final"?"badge-success":l==="retry"?"badge-warning":l==="recovery"?"badge-info":"badge-ghost"}function Rg(l,s,e){let n,a;Dt(l,Rt,at=>e(24,a=at));let i=1,u="",c="",f="",d,p="",m="timestamp",g="desc",b="recent",k=1,w="",C="",E=[],y=0,T=0,M=!0,R=null,j=null,P=!1,I=!0,q="30s",D=null,A=0,N=!1;const Z={"5s":5e3,"10s":1e4,"30s":3e4,"60s":6e4};let Q="",x="";async function z(){try{e(17,M=!0),e(18,R=null);const at={page:i,limit:Yn,sortBy:m,sortOrder:g};u.trim()&&(at.searchTerm=u.trim()),c&&(at.method=c),f&&(at.status=parseInt(f)),d!==void 0&&(at.success=d),p&&(at.requestType=p),b==="recent"?(at.endTime=Date.now(),at.startTime=Date.now()-k*60*60*1e3):b==="custom"&&(w&&(at.startTime=new Date(w).getTime()),C&&(at.endTime=new Date(C).getTime()));const St=await b2(at);e(14,E=St.data),e(15,y=St.total),e(16,T=St.totalPages)}catch(at){e(18,R=at.message)}finally{e(17,M=!1)}}async function K(at){try{const St={};u.trim()&&(St.searchTerm=u.trim()),c&&(St.method=c),f&&(St.status=parseInt(f)),d!==void 0&&(St.success=d),p&&(St.requestType=p),b==="recent"?(St.endTime=Date.now(),St.startTime=Date.now()-k*60*60*1e3):b==="custom"&&(w&&(St.startTime=new Date(w).getTime()),C&&(St.endTime=new Date(C).getTime()));const ht=await v2(St,at),Tt=URL.createObjectURL(ht),vl=document.createElement("a");vl.href=Tt,vl.download=\`access-logs-\${Date.now()}.\${at}\`,vl.click(),URL.revokeObjectURL(Tt)}catch(St){alert(\`Export failed: \${St.message}\`)}}function S(at){e(19,j=at),e(20,P=!0)}function B(at){return at?a(\`logs.requestType_\${at}\`):"-"}function U(){e(1,u=""),e(2,c=""),e(3,f=""),e(4,d=void 0),e(5,p=""),e(8,b="recent"),e(9,k=1),e(10,w=""),e(11,C=""),e(6,m="timestamp"),e(7,g="desc"),e(0,i=1)}function F(){return!!(u||c||f||d!==void 0||p)}function J(){if(D&&clearInterval(D),I){const at=Z[q];D=window.setInterval(()=>{document.visibilityState==="visible"&&(F()?e(22,N=!0):(z(),e(21,A=Date.now()),e(22,N=!1)))},at)}}function ie(){D&&(clearInterval(D),D=null)}async function ue(){await z(),e(21,A=Date.now()),e(22,N=!1)}function ne(){if(document.visibilityState==="visible"){const at=Date.now()-A,St=Z[q];at>=St&&z(),I&&J()}else ie()}Hs(()=>{localStorage.getItem("logsAdvancedFiltersExpanded");const at=localStorage.getItem("logsRefreshInterval");at&&e(13,q=at);const St=localStorage.getItem("logsAutoRefresh");St!==null&&e(12,I=St==="true"),z(),J(),document.addEventListener("visibilitychange",ne)}),Xn(()=>{ie(),document.removeEventListener("visibilitychange",ne)});function $(){u=this.value,e(1,u)}const te=()=>e(2,c=""),ae=()=>e(2,c="GET"),ee=()=>e(2,c="POST"),G=()=>e(2,c="PUT"),pe=()=>e(2,c="DELETE"),oe=()=>e(2,c="PATCH");function ge(){f=this.value,e(3,f)}const he=()=>e(4,d=void 0),ye=()=>e(4,d=!0),ze=()=>e(4,d=!1);function Pe(){p=dl(this),e(5,p)}function we(){b=dl(this),e(8,b)}function Fe(){k=Mt(this.value),e(9,k)}function Je(){w=this.value,e(10,w)}function je(){C=this.value,e(11,C)}function Le(){m=dl(this),e(6,m)}function Se(){g=dl(this),e(7,g)}function fe(){I=this.checked,e(12,I)}function _e(){q=dl(this),e(13,q)}const Ie=()=>K("json"),De=()=>K("csv");function se(){c=dl(this),e(2,c)}function ke(){f=this.value,e(3,f)}function me(){d=dl(this),e(4,d)}function Ee(){p=dl(this),e(5,p)}function Ve(){b=dl(this),e(8,b)}function Be(){k=Mt(this.value),e(9,k)}function nt(){w=this.value,e(10,w)}function Ne(){C=this.value,e(11,C)}function Qe(){m=dl(this),e(6,m)}function Ye(){g=dl(this),e(7,g)}function ve(){I=this.checked,e(12,I)}function de(){q=dl(this),e(13,q)}const Te=()=>K("json"),Ze=()=>K("csv");function Me(){c=dl(this),e(2,c)}function Ue(){f=this.value,e(3,f)}function Ce(){d=dl(this),e(4,d)}function mt(){p=dl(this),e(5,p)}function Ge(){b=dl(this),e(8,b)}function ce(){k=Mt(this.value),e(9,k)}function qe(){w=this.value,e(10,w)}function Re(){C=this.value,e(11,C)}function dt(){m=dl(this),e(6,m)}function We(){g=dl(this),e(7,g)}function O(){I=this.checked,e(12,I)}function He(){q=dl(this),e(13,q)}const X=()=>K("json"),ft=()=>K("csv"),Ht=()=>e(1,u=""),Ke=()=>e(2,c=""),_t=()=>e(3,f=""),tt=()=>e(4,d=void 0),it=()=>e(5,p=""),Oe=()=>e(9,k=1),Xe=()=>{e(8,b="recent"),e(10,w=""),e(11,C="")},It=()=>e(8,b="recent"),rt=()=>{e(6,m="timestamp"),e(7,g="desc")},gt=at=>S(at),wt=()=>e(0,i=i-1),pt=()=>e(0,i=i+1),bl=()=>{e(20,P=!1),e(19,j=null)};return l.$$.update=()=>{if(l.$$.dirty[0]&4096&&(I?J():ie()),l.$$.dirty[0]&12288&&(localStorage.setItem("logsRefreshInterval",q),localStorage.setItem("logsAutoRefresh",String(I))),l.$$.dirty[0]&1022&&e(23,n=[u.trim(),c,f,d!==void 0,p,b!=="all"&&b!=="recent"||k!==1,m!=="timestamp"||g!=="desc"].filter(Boolean).length),l.$$.dirty[0]&1073742846){const at=JSON.stringify({limit:Yn,searchTerm:u,method:c,statusFilter:f,successFilter:d,requestTypeFilter:p,sortBy:m,sortOrder:g,timeRangeType:b,recentHours:k});Q&&at!==Q&&e(0,i=1),e(30,Q=at)}if(l.$$.dirty[0]&3328|l.$$.dirty[1]&1){const at=JSON.stringify({customStartTime:w,customEndTime:C});b==="custom"&&x&&at!==x&&e(0,i=1),e(31,x=at)}l.$$.dirty[0]&4095&&z()},[i,u,c,f,d,p,m,g,b,k,w,C,I,q,E,y,T,M,R,j,P,A,N,n,a,K,S,B,U,ue,Q,x,$,te,ae,ee,G,pe,oe,ge,he,ye,ze,Pe,we,Fe,Je,je,Le,Se,fe,_e,Ie,De,se,ke,me,Ee,Ve,Be,nt,Ne,Qe,Ye,ve,de,Te,Ze,Me,Ue,Ce,mt,Ge,ce,qe,Re,dt,We,O,He,X,ft,Ht,Ke,_t,tt,it,Oe,Xe,It,rt,gt,wt,pt,bl]}class qg extends Nt{constructor(s){super(),Ut(this,s,Rg,Mg,Vt,{},null,[-1,-1,-1,-1])}}async function Hg(l){return yl.post("/auth/login",{token:l})}function Hp(l){let s,e,n;return{c(){s=r("div"),e=r("span"),n=_(l[2]),o(e,"class","label-text-alt text-error"),o(s,"class","label")},m(a,i){L(a,s,i),t(s,e),t(e,n)},p(a,i){i&4&&v(n,a[2])},d(a){a&&H(s)}}}function Lg(l){let s,e,n,a,i,u,c,f,d=l[3]("login.title")+"",p,m,g,b=l[3]("login.subtitle")+"",k,w,C,E,y,T=l[3]("login.token")+"",M,R,j,P,I,q,D,A,N=(l[1]?l[3]("login.loggingIn"):l[3]("login.submit"))+"",Z,Q,x,z,K,S=l[2]&&Hp(l);return{c(){s=r("div"),e=r("div"),n=r("div"),a=r("div"),i=re("svg"),u=re("path"),c=h(),f=r("h1"),p=_(d),m=h(),g=r("p"),k=_(b),w=h(),C=r("div"),E=r("label"),y=r("span"),M=_(T),R=h(),j=r("input"),I=h(),S&&S.c(),q=h(),D=r("div"),A=r("button"),Z=_(N),Q=h(),x=r("div"),x.textContent="Bungee Reverse Proxy",o(u,"stroke-linecap","round"),o(u,"stroke-linejoin","round"),o(u,"stroke-width","2"),o(u,"d","M13 10V3L4 14h7v7l9-11h-7z"),o(i,"xmlns","http://www.w3.org/2000/svg"),o(i,"class","h-16 w-16 text-primary mb-4"),o(i,"fill","none"),o(i,"viewBox","0 0 24 24"),o(i,"stroke","currentColor"),o(f,"class","text-3xl font-bold text-center"),o(g,"class","text-sm text-base-content/60 text-center mt-2"),o(a,"class","flex flex-col items-center mb-6"),o(y,"class","label-text"),o(E,"class","label"),o(E,"for","token-input"),o(j,"id","token-input"),o(j,"type","password"),o(j,"placeholder",P=l[3]("login.tokenPlaceholder")),o(j,"class","input input-bordered w-full"),j.disabled=l[1],o(j,"autocomplete","off"),le(j,"input-error",!!l[2]),o(C,"class","form-control w-full"),o(A,"class","btn btn-primary"),A.disabled=l[1],le(A,"loading",l[1]),o(D,"class","form-control mt-6"),o(x,"class","divider text-xs opacity-50 mt-6"),o(n,"class","card-body"),o(e,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),o(s,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(B,U){L(B,s,U),t(s,e),t(e,n),t(n,a),t(a,i),t(i,u),t(a,c),t(a,f),t(f,p),t(a,m),t(a,g),t(g,k),t(n,w),t(n,C),t(C,E),t(E,y),t(y,M),t(C,R),t(C,j),Y(j,l[0]),t(C,I),S&&S.m(C,null),t(n,q),t(n,D),t(D,A),t(A,Z),t(n,Q),t(n,x),z||(K=[V(j,"input",l[6]),V(j,"keypress",l[5]),V(A,"click",l[4])],z=!0)},p(B,[U]){U&8&&d!==(d=B[3]("login.title")+"")&&v(p,d),U&8&&b!==(b=B[3]("login.subtitle")+"")&&v(k,b),U&8&&T!==(T=B[3]("login.token")+"")&&v(M,T),U&8&&P!==(P=B[3]("login.tokenPlaceholder"))&&o(j,"placeholder",P),U&2&&(j.disabled=B[1]),U&1&&j.value!==B[0]&&Y(j,B[0]),U&4&&le(j,"input-error",!!B[2]),B[2]?S?S.p(B,U):(S=Hp(B),S.c(),S.m(C,null)):S&&(S.d(1),S=null),U&10&&N!==(N=(B[1]?B[3]("login.loggingIn"):B[3]("login.submit"))+"")&&v(Z,N),U&2&&(A.disabled=B[1]),U&2&&le(A,"loading",B[1])},i:ot,o:ot,d(B){B&&H(s),S&&S.d(),z=!1,vt(K)}}}function Pg(l,s,e){let n;Dt(l,Rt,p=>e(3,n=p));let a="",i=!1,u="";async function c(){if(!a.trim()){e(2,u=n("login.required"));return}e(1,i=!0),e(2,u="");try{const p=await Hg(a);p.success?(q0(a),jt.show(n("login.success"),"success"),window.location.hash="#/"):e(2,u=p.error||n("login.unauthorized"))}catch(p){e(2,u=n("login.failed",{values:{error:p.message}}))}finally{e(1,i=!1)}}function f(p){p.key==="Enter"&&!i&&c()}function d(){a=this.value,e(0,a)}return[a,i,u,n,c,f,d]}class jg extends Nt{constructor(s){super(),Ut(this,s,Pg,Lg,Vt,{})}}function Dg(l){let s,e,n=l[0]("notFound.title")+"",a,i,u,c=l[0]("notFound.message")+"",f,d,p,m=l[0]("notFound.goHome")+"",g;return{c(){s=r("div"),e=r("h1"),a=_(n),i=h(),u=r("p"),f=_(c),d=h(),p=r("a"),g=_(m),o(e,"class","text-6xl font-bold mb-4"),o(u,"class","text-2xl mb-8"),o(p,"href","/__ui/#/"),o(p,"class","btn btn-primary"),o(s,"class","flex flex-col items-center justify-center h-screen")},m(b,k){L(b,s,k),t(s,e),t(e,a),t(s,i),t(s,u),t(u,f),t(s,d),t(s,p),t(p,g)},p(b,[k]){k&1&&n!==(n=b[0]("notFound.title")+"")&&v(a,n),k&1&&c!==(c=b[0]("notFound.message")+"")&&v(f,c),k&1&&m!==(m=b[0]("notFound.goHome")+"")&&v(g,m)},i:ot,o:ot,d(b){b&&H(s)}}}function Bg(l,s,e){let n;return Dt(l,Rt,a=>e(0,n=a)),[n]}class Ig extends Nt{constructor(s){super(),Ut(this,s,Bg,Dg,Vt,{})}}function Lp(l,s,e){const n=l.slice();return n[3]=s[e],n}function Pp(l,s){let e,n,a;function i(){return s[2](s[3])}return n=new yh({props:{message:s[3].message,type:s[3].type,duration:s[3].duration}}),n.$on("close",i),{key:l,first:null,c(){e=Ul(),Et(n.$$.fragment),this.first=e},m(u,c){L(u,e,c),Ct(n,u,c),a=!0},p(u,c){s=u;const f={};c&1&&(f.message=s[3].message),c&1&&(f.type=s[3].type),c&1&&(f.duration=s[3].duration),n.$set(f)},i(u){a||(et(n.$$.fragment,u),a=!0)},o(u){st(n.$$.fragment,u),a=!1},d(u){u&&H(e),yt(n,u)}}}function Ag(l){let s=[],e=new Map,n,a,i=ut(l[0]);const u=c=>c[3].id;for(let c=0;c<i.length;c+=1){let f=Lp(l,i,c),d=u(f);e.set(d,s[c]=Pp(d,f))}return{c(){for(let c=0;c<s.length;c+=1)s[c].c();n=Ul()},m(c,f){for(let d=0;d<s.length;d+=1)s[d]&&s[d].m(c,f);L(c,n,f),a=!0},p(c,[f]){f&3&&(i=ut(c[0]),Gl(),s=Ru(s,f,u,1,c,i,e,n.parentNode,d0,Pp,n,Lp),Kl())},i(c){if(!a){for(let f=0;f<i.length;f+=1)et(s[f]);a=!0}},o(c){for(let f=0;f<s.length;f+=1)st(s[f]);a=!1},d(c){c&&H(n);for(let f=0;f<s.length;f+=1)s[f].d(c)}}}function Fg(l,s,e){let n;Dt(l,jt,u=>e(0,n=u));function a(u){jt.remove(u)}return[n,a,u=>a(u.id)]}class zg extends Nt{constructor(s){super(),Ut(this,s,Fg,Ag,Vt,{})}}function jp(l,s,e){const n=l.slice();return n[11]=s[e],n}function Og(l){let s,e,n,a,i,u,c,f,d,p,m,g,b=l[0]("nav.dashboard")+"",k,w,C,E,y,T,M,R,j=l[0]("nav.routes")+"",P,I,q,D,A,N,Z,Q,x=l[0]("nav.logs")+"",z,K,S,B,U,F,J,ie,ue,ne=l[0]("nav.configuration")+"",$,te,ae,ee,G,pe,oe,ge,he=Qr.find(l[8])?.name+"",ye,ze,Pe,we,Fe,Je,je,Le,Se,fe=ut(Qr),_e=[];for(let me=0;me<fe.length;me+=1)_e[me]=Dp(jp(l,fe,me));let Ie=l[4]&&l[5]&&Bp(l);const De=[Qg,Yg,Kg,Gg,Wg,Jg,Vg,Ug],se=[];function ke(me,Ee){return Ee&2&&(Je=null),me[1]==="/login"?0:me[1]==="/"?1:me[1]==="/routes"?2:(Je==null&&(Je=!!me[1].startsWith("/routes/edit/")),Je?3:me[1]==="/routes/new"?4:me[1]==="/logs"?5:me[1]==="/config"?6:7)}return je=ke(l,-1),Le=se[je]=De[je](l),{c(){s=r("div"),e=r("div"),n=r("div"),n.innerHTML='<a href="/__ui/#/" class="flex items-center gap-2 px-4 py-2 hover:bg-base-200 rounded-lg transition-colors"><svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> <div class="flex flex-col"><span class="text-xl font-bold">Bungee</span> <span class="text-xs text-base-content/60">Reverse Proxy</span></div></a>',a=h(),i=r("div"),u=r("ul"),c=r("li"),f=r("a"),d=re("svg"),p=re("path"),m=h(),g=r("span"),k=_(b),w=h(),C=r("li"),E=r("a"),y=re("svg"),T=re("path"),M=h(),R=r("span"),P=_(j),I=h(),q=r("li"),D=r("a"),A=re("svg"),N=re("path"),Z=h(),Q=r("span"),z=_(x),K=h(),S=r("li"),B=r("a"),U=re("svg"),F=re("path"),J=re("path"),ie=h(),ue=r("span"),$=_(ne),te=h(),ae=r("div"),ee=r("div"),G=re("svg"),pe=re("path"),oe=h(),ge=r("span"),ye=_(he),ze=h(),Pe=r("ul");for(let me=0;me<_e.length;me+=1)_e[me].c();we=h(),Ie&&Ie.c(),Fe=h(),Le.c(),o(n,"class","flex-1"),o(p,"stroke-linecap","round"),o(p,"stroke-linejoin","round"),o(p,"stroke-width","2"),o(p,"d","M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"),o(d,"xmlns","http://www.w3.org/2000/svg"),o(d,"class","h-4 w-4"),o(d,"fill","none"),o(d,"viewBox","0 0 24 24"),o(d,"stroke","currentColor"),o(f,"href","/__ui/#/"),o(f,"class","flex items-center gap-2 svelte-1fgps4v"),le(f,"active",l[1]==="/"),o(T,"stroke-linecap","round"),o(T,"stroke-linejoin","round"),o(T,"stroke-width","2"),o(T,"d","M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"),o(y,"xmlns","http://www.w3.org/2000/svg"),o(y,"class","h-4 w-4"),o(y,"fill","none"),o(y,"viewBox","0 0 24 24"),o(y,"stroke","currentColor"),o(E,"href","/__ui/#/routes"),o(E,"class","flex items-center gap-2 svelte-1fgps4v"),le(E,"active",l[1].startsWith("/routes")),o(N,"stroke-linecap","round"),o(N,"stroke-linejoin","round"),o(N,"stroke-width","2"),o(N,"d","M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"),o(A,"xmlns","http://www.w3.org/2000/svg"),o(A,"class","h-4 w-4"),o(A,"fill","none"),o(A,"viewBox","0 0 24 24"),o(A,"stroke","currentColor"),o(D,"href","/__ui/#/logs"),o(D,"class","flex items-center gap-2 svelte-1fgps4v"),le(D,"active",l[1]==="/logs"),o(F,"stroke-linecap","round"),o(F,"stroke-linejoin","round"),o(F,"stroke-width","2"),o(F,"d","M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"),o(J,"stroke-linecap","round"),o(J,"stroke-linejoin","round"),o(J,"stroke-width","2"),o(J,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),o(U,"xmlns","http://www.w3.org/2000/svg"),o(U,"class","h-4 w-4"),o(U,"fill","none"),o(U,"viewBox","0 0 24 24"),o(U,"stroke","currentColor"),o(B,"href","/__ui/#/config"),o(B,"class","flex items-center gap-2 svelte-1fgps4v"),le(B,"active",l[1]==="/config"),o(u,"class","menu menu-horizontal px-1 gap-1"),o(pe,"stroke-linecap","round"),o(pe,"stroke-linejoin","round"),o(pe,"stroke-width","2"),o(pe,"d","M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"),o(G,"xmlns","http://www.w3.org/2000/svg"),o(G,"class","h-4 w-4"),o(G,"fill","none"),o(G,"viewBox","0 0 24 24"),o(G,"stroke","currentColor"),o(ge,"class","text-xs"),o(ee,"role","button"),o(ee,"tabindex","0"),o(ee,"class","btn btn-ghost btn-sm gap-1"),o(Pe,"role","menu"),o(Pe,"tabindex","0"),o(Pe,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),o(ae,"class","dropdown dropdown-end mx-2"),o(i,"class","flex-none"),o(e,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),o(s,"class","min-h-screen bg-base-200")},m(me,Ee){L(me,s,Ee),t(s,e),t(e,n),t(e,a),t(e,i),t(i,u),t(u,c),t(c,f),t(f,d),t(d,p),t(f,m),t(f,g),t(g,k),t(u,w),t(u,C),t(C,E),t(E,y),t(y,T),t(E,M),t(E,R),t(R,P),t(u,I),t(u,q),t(q,D),t(D,A),t(A,N),t(D,Z),t(D,Q),t(Q,z),t(u,K),t(u,S),t(S,B),t(B,U),t(U,F),t(U,J),t(B,ie),t(B,ue),t(ue,$),t(i,te),t(i,ae),t(ae,ee),t(ee,G),t(G,pe),t(ee,oe),t(ee,ge),t(ge,ye),t(ae,ze),t(ae,Pe);for(let Ve=0;Ve<_e.length;Ve+=1)_e[Ve]&&_e[Ve].m(Pe,null);t(i,we),Ie&&Ie.m(i,null),t(s,Fe),se[je].m(s,null),Se=!0},p(me,Ee){if((!Se||Ee&1)&&b!==(b=me[0]("nav.dashboard")+"")&&v(k,b),(!Se||Ee&2)&&le(f,"active",me[1]==="/"),(!Se||Ee&1)&&j!==(j=me[0]("nav.routes")+"")&&v(P,j),(!Se||Ee&2)&&le(E,"active",me[1].startsWith("/routes")),(!Se||Ee&1)&&x!==(x=me[0]("nav.logs")+"")&&v(z,x),(!Se||Ee&2)&&le(D,"active",me[1]==="/logs"),(!Se||Ee&1)&&ne!==(ne=me[0]("nav.configuration")+"")&&v($,ne),(!Se||Ee&2)&&le(B,"active",me[1]==="/config"),(!Se||Ee&8)&&he!==(he=Qr.find(me[8])?.name+"")&&v(ye,he),Ee&72){fe=ut(Qr);let Be;for(Be=0;Be<fe.length;Be+=1){const nt=jp(me,fe,Be);_e[Be]?_e[Be].p(nt,Ee):(_e[Be]=Dp(nt),_e[Be].c(),_e[Be].m(Pe,null))}for(;Be<_e.length;Be+=1)_e[Be].d(1);_e.length=fe.length}me[4]&&me[5]?Ie?Ie.p(me,Ee):(Ie=Bp(me),Ie.c(),Ie.m(i,null)):Ie&&(Ie.d(1),Ie=null);let Ve=je;je=ke(me,Ee),je===Ve?se[je].p(me,Ee):(Gl(),st(se[Ve],1,1,()=>{se[Ve]=null}),Kl(),Le=se[je],Le?Le.p(me,Ee):(Le=se[je]=De[je](me),Le.c()),et(Le,1),Le.m(s,null))},i(me){Se||(et(Le),Se=!0)},o(me){st(Le),Se=!1},d(me){me&&H(s),Gt(_e,me),Ie&&Ie.d(),se[je].d()}}}function Ng(l){let s;return{c(){s=r("div"),s.innerHTML='<div class="flex flex-col items-center gap-4"><span class="loading loading-spinner loading-lg"></span> <p class="text-base-content/60">Loading...</p></div>',o(s,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(e,n){L(e,s,n)},p:ot,i:ot,o:ot,d(e){e&&H(s)}}}function Dp(l){let s,e,n,a,i;function u(){return l[9](l[11])}return{c(){s=r("li"),e=r("button"),e.textContent=\`\${l[11].name}\`,n=h(),o(e,"class","svelte-1fgps4v"),le(e,"active",l[3]===l[11].code)},m(c,f){L(c,s,f),t(s,e),t(s,n),a||(i=V(e,"click",u),a=!0)},p(c,f){l=c,f&8&&le(e,"active",l[3]===l[11].code)},d(c){c&&H(s),a=!1,i()}}}function Bp(l){let s,e,n,a,i,u,c=l[0]("login.logout")+"",f,d,p;return{c(){s=r("div"),e=r("button"),n=re("svg"),a=re("path"),i=h(),u=r("span"),f=_(c),o(a,"stroke-linecap","round"),o(a,"stroke-linejoin","round"),o(a,"stroke-width","2"),o(a,"d","M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"),o(n,"xmlns","http://www.w3.org/2000/svg"),o(n,"class","h-4 w-4"),o(n,"fill","none"),o(n,"viewBox","0 0 24 24"),o(n,"stroke","currentColor"),o(u,"class","text-xs hidden md:inline"),o(e,"class","btn btn-ghost btn-sm gap-1"),o(s,"class","mx-2")},m(m,g){L(m,s,g),t(s,e),t(e,n),t(n,a),t(e,i),t(e,u),t(u,f),d||(p=V(e,"click",l[7]),d=!0)},p(m,g){g&1&&c!==(c=m[0]("login.logout")+"")&&v(f,c)},d(m){m&&H(s),d=!1,p()}}}function Ug(l){let s,e;return s=new Ig({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Vg(l){let s,e;return s=new U2({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Jg(l){let s,e;return s=new qg({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Wg(l){let s,e;return s=new a0({props:{params:{}}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Gg(l){let s,e;return s=new a0({props:{params:{path:l[1].replace("/routes/edit/","")}}}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p(n,a){const i={};a&2&&(i.params={path:n[1].replace("/routes/edit/","")}),s.$set(i)},i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Kg(l){let s,e;return s=new ch({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Yg(l){let s,e;return s=new p2({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Qg(l){let s,e;return s=new jg({}),{c(){Et(s.$$.fragment)},m(n,a){Ct(s,n,a),e=!0},p:ot,i(n){e||(et(s.$$.fragment,n),e=!0)},o(n){st(s.$$.fragment,n),e=!1},d(n){yt(s,n)}}}function Zg(l){let s,e,n,a,i;const u=[Ng,Og],c=[];function f(d,p){return d[2]?0:1}return s=f(l),e=c[s]=u[s](l),a=new zg({}),{c(){e.c(),n=h(),Et(a.$$.fragment)},m(d,p){c[s].m(d,p),L(d,n,p),Ct(a,d,p),i=!0},p(d,[p]){let m=s;s=f(d),s===m?c[s].p(d,p):(Gl(),st(c[m],1,1,()=>{c[m]=null}),Kl(),e=c[s],e?e.p(d,p):(e=c[s]=u[s](d),e.c()),et(e,1),e.m(n.parentNode,n))},i(d){i||(et(e),et(a.$$.fragment,d),i=!0)},o(d){st(e),st(a.$$.fragment,d),i=!1},d(d){d&&H(n),c[s].d(d),yt(a,d)}}}function Xg(l,s,e){let n,a,i,u,c,f;Dt(l,Rt,b=>e(0,n=b)),Dt(l,p0,b=>e(1,a=b)),Dt(l,h0,b=>e(2,i=b)),Dt(l,Ap,b=>e(3,u=b)),Dt(l,l1,b=>e(4,c=b)),Dt(l,ei,b=>e(5,f=b));function d(b){T0(b)}Hs(async()=>{try{const k=(await Pu()).auth?.enabled||!1;if(l1.set(k),k){const w=Yp();ei.set(!!w),!w&&a!=="/login"&&(window.location.hash="#/login")}}catch(b){console.error("Failed to check auth status:",b)}});function p(){confirm(n("login.logoutConfirm"))&&(Kp(),window.location.hash="#/login")}return[n,a,i,u,c,f,d,p,b=>b.code===u,b=>d(b.code)]}class xg extends Nt{constructor(s){super(),Ut(this,s,Xg,Zg,Vt,{})}}new xg({target:document.getElementById("app")});
21261
+ `,
21262
+ "vendor-C5kRSwys.js": 'import{C as Te,L as Tn,D as Sn,B as wn}from"./vendor-charts-Bo4qyjB7.js";function P(){}function N(e,t){for(const n in t)e[n]=t[n];return e}function jt(e){return e()}function yt(){return Object.create(null)}function X(e){e.forEach(jt)}function at(e){return typeof e=="function"}function fe(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Bn(e){return Object.keys(e).length===0}function st(e,...t){if(e==null){for(const r of t)r(void 0);return P}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ra(e){let t;return st(e,n=>t=n)(),t}function ia(e,t,n){e.$$.on_destroy.push(st(t,n))}function G(e){const t={};for(const n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function aa(e,t){e.appendChild(t)}function An(e,t,n){e.insertBefore(t,n||null)}function kt(e){e.parentNode&&e.parentNode.removeChild(e)}function sa(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function On(e){return document.createElement(e)}function oa(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Vt(e){return document.createTextNode(e)}function ua(){return Vt(" ")}function ha(){return Vt("")}function Pn(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function Nn(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const In=["width","height"];function Mn(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&In.indexOf(r)===-1?e[r]=t[r]:Nn(e,r,t[r])}function fa(e){let t;return{p(...n){t=n,t.forEach(r=>e.push(r))},r(){t.forEach(n=>e.splice(e.indexOf(n),1))}}}function la(e){return e===""?null:+e}function Ln(e){return Array.from(e.childNodes)}function ca(e,t){t=""+t,e.data!==t&&(e.data=t)}function da(e,t){e.value=t??""}function ma(e,t,n,r){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,"")}function ga(e,t,n){for(let r=0;r<e.options.length;r+=1){const i=e.options[r];if(i.__value===t){i.selected=!0;return}}(!n||t!==void 0)&&(e.selectedIndex=-1)}function ba(e){const t=e.querySelector(":checked");return t&&t.__value}function pa(e,t,n){e.classList.toggle(t,!!n)}function Cn(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}let Q;function se(e){Q=e}function Se(){if(!Q)throw new Error("Function called outside component initialization");return Q}function Xt(e){Se().$$.on_mount.push(e)}function Rn(e){Se().$$.after_update.push(e)}function Yt(e){Se().$$.on_destroy.push(e)}function _a(){const e=Se();return(t,n,{cancelable:r=!1}={})=>{const i=e.$$.callbacks[t];if(i){const a=Cn(t,n,{cancelable:r});return i.slice().forEach(o=>{o.call(e,a)}),!a.defaultPrevented}return!0}}function Un(e,t){const n=e.$$.callbacks[t.type];n&&n.slice().forEach(r=>r.call(this,t))}const z=[],R=[];let q=[];const Ze=[],Zt=Promise.resolve();let We=!1;function Wt(){We||(We=!0,Zt.then(qt))}function zt(){return Wt(),Zt}function ze(e){q.push(e)}function ot(e){Ze.push(e)}const Re=new Set;let Y=0;function qt(){if(Y!==0)return;const e=Q;do{try{for(;Y<z.length;){const t=z[Y];Y++,se(t),Fn(t.$$)}}catch(t){throw z.length=0,Y=0,t}for(se(null),z.length=0,Y=0;R.length;)R.pop()();for(let t=0;t<q.length;t+=1){const n=q[t];Re.has(n)||(Re.add(n),n())}q.length=0}while(z.length);for(;Ze.length;)Ze.pop()();We=!1,Re.clear(),se(e)}function Fn(e){if(e.fragment!==null){e.update(),X(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ze)}}function Dn(e){const t=[],n=[];q.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),q=t}const ye=new Set;let V;function ya(){V={r:0,c:[],p:V}}function xa(){V.r||X(V.c),V=V.p}function le(e,t){e&&e.i&&(ye.delete(e),e.i(t))}function we(e,t,n,r){if(e&&e.o){if(ye.has(e))return;ye.add(e),V.c.push(()=>{ye.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function Ea(e){return e?.length!==void 0?e:Array.from(e)}function va(e,t){e.d(1),t.delete(e.key)}function Ha(e,t){we(e,1,1,()=>{t.delete(e.key)})}function Ta(e,t,n,r,i,a,o,s,u,h,f,c){let l=e.length,_=a.length,y=l;const v={};for(;y--;)v[e[y].key]=y;const B=[],d=new Map,m=new Map,g=[];for(y=_;y--;){const T=c(i,a,y),M=n(T);let L=o.get(M);L?g.push(()=>L.p(T,t)):(L=h(M,T),L.c()),d.set(M,B[y]=L),M in v&&m.set(M,Math.abs(y-v[M]))}const S=new Set,E=new Set;function I(T){le(T,1),T.m(s,f),o.set(T.key,T),f=T.first,_--}for(;l&&_;){const T=B[_-1],M=e[l-1],L=T.key,me=M.key;T===M?(f=T.first,l--,_--):d.has(me)?!o.has(L)||S.has(L)?I(T):E.has(me)?l--:m.get(L)>m.get(me)?(E.add(L),I(T)):(S.add(me),l--):(u(M,o),l--)}for(;l--;){const T=e[l];d.has(T.key)||u(T,o)}for(;_;)I(B[_-1]);return X(g),B}function ut(e,t){const n={},r={},i={$$scope:1};let a=e.length;for(;a--;){const o=e[a],s=t[a];if(s){for(const u in o)u in s||(r[u]=1);for(const u in s)i[u]||(n[u]=s[u],i[u]=1);e[a]=s}else for(const u in o)i[u]=1}for(const o in r)o in n||(n[o]=void 0);return n}function ht(e){return typeof e=="object"&&e!==null?e:{}}function ft(e,t,n){const r=e.$$.props[t];r!==void 0&&(e.$$.bound[r]=n,n(e.$$.ctx[r]))}function lt(e){e&&e.c()}function Be(e,t,n){const{fragment:r,after_update:i}=e.$$;r&&r.m(t,n),ze(()=>{const a=e.$$.on_mount.map(jt).filter(at);e.$$.on_destroy?e.$$.on_destroy.push(...a):X(a),e.$$.on_mount=[]}),i.forEach(ze)}function Ae(e,t){const n=e.$$;n.fragment!==null&&(Dn(n.after_update),X(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Gn(e,t){e.$$.dirty[0]===-1&&(z.push(e),Wt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Oe(e,t,n,r,i,a,o=null,s=[-1]){const u=Q;se(e);const h=e.$$={fragment:null,ctx:[],props:a,update:P,not_equal:i,bound:yt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:yt(),dirty:s,skip_bound:!1,root:t.target||u.$$.root};o&&o(h.root);let f=!1;if(h.ctx=n?n(e,t.props||{},(c,l,..._)=>{const y=_.length?_[0]:l;return h.ctx&&i(h.ctx[c],h.ctx[c]=y)&&(!h.skip_bound&&h.bound[c]&&h.bound[c](y),f&&Gn(e,c)),l}):[],h.update(),f=!0,X(h.before_update),h.fragment=r?r(h.ctx):!1,t.target){if(t.hydrate){const c=Ln(t.target);h.fragment&&h.fragment.l(c),c.forEach(kt)}else h.fragment&&h.fragment.c();t.intro&&le(e.$$.fragment),Be(e,t.target,t.anchor),qt()}se(u)}class Pe{$$=void 0;$$set=void 0;$destroy(){Ae(this,1),this.$destroy=P}$on(t,n){if(!at(n))return P;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(t){this.$$set&&!Bn(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const jn="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(jn);const Z=[];function Qt(e,t){return{subscribe:Ne(e,t).subscribe}}function Ne(e,t=P){let n;const r=new Set;function i(s){if(fe(e,s)&&(e=s,n)){const u=!Z.length;for(const h of r)h[1](),Z.push(h,e);if(u){for(let h=0;h<Z.length;h+=2)Z[h][0](Z[h+1]);Z.length=0}}}function a(s){i(s(e))}function o(s,u=P){const h=[s,u];return r.add(h),r.size===1&&(n=t(i,a)||P),s(e),()=>{r.delete(h),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}function j(e,t,n){const r=!Array.isArray(e),i=r?[e]:e;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=t.length<2;return Qt(n,(o,s)=>{let u=!1;const h=[];let f=0,c=P;const l=()=>{if(f)return;c();const y=t(r?h[0]:h,o,s);a?o(y):c=at(y)?y:P},_=i.map((y,v)=>st(y,B=>{h[v]=B,f&=~(1<<v),u&&l()},()=>{f|=1<<v}));return u=!0,l(),function(){X(_),c(),u=!1}})}function xt(){const e=window.location.href.indexOf("#/");let t=e>-1?window.location.href.substr(e+1):"/";const n=t.indexOf("?");let r="";return n>-1&&(r=t.substr(n+1),t=t.substr(0,n)),{location:t,querystring:r}}const Jt=Qt(null,function(t){t(xt());const n=()=>{t(xt())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}}),Sa=j(Jt,e=>e.location);j(Jt,e=>e.querystring);async function wa(e){if(!e||e.length<1||e.charAt(0)!="/"&&e.indexOf("#/")!==0)throw Error("Invalid parameter location");await zt(),history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=(e.charAt(0)=="#"?"":"#")+e}async function Ba(){await zt(),window.history.back()}function kn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ue,Et;function Vn(){if(Et)return Ue;Et=1;var e=function(m){return t(m)&&!n(m)};function t(d){return!!d&&typeof d=="object"}function n(d){var m=Object.prototype.toString.call(d);return m==="[object RegExp]"||m==="[object Date]"||a(d)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function a(d){return d.$$typeof===i}function o(d){return Array.isArray(d)?[]:{}}function s(d,m){return m.clone!==!1&&m.isMergeableObject(d)?v(o(d),d,m):d}function u(d,m,g){return d.concat(m).map(function(S){return s(S,g)})}function h(d,m){if(!m.customMerge)return v;var g=m.customMerge(d);return typeof g=="function"?g:v}function f(d){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(d).filter(function(m){return Object.propertyIsEnumerable.call(d,m)}):[]}function c(d){return Object.keys(d).concat(f(d))}function l(d,m){try{return m in d}catch{return!1}}function _(d,m){return l(d,m)&&!(Object.hasOwnProperty.call(d,m)&&Object.propertyIsEnumerable.call(d,m))}function y(d,m,g){var S={};return g.isMergeableObject(d)&&c(d).forEach(function(E){S[E]=s(d[E],g)}),c(m).forEach(function(E){_(d,E)||(l(d,E)&&g.isMergeableObject(m[E])?S[E]=h(E,g)(d[E],m[E],g):S[E]=s(m[E],g))}),S}function v(d,m,g){g=g||{},g.arrayMerge=g.arrayMerge||u,g.isMergeableObject=g.isMergeableObject||e,g.cloneUnlessOtherwiseSpecified=s;var S=Array.isArray(m),E=Array.isArray(d),I=S===E;return I?S?g.arrayMerge(d,m,g):y(d,m,g):s(m,g)}v.all=function(m,g){if(!Array.isArray(m))throw new Error("first argument should be an array");return m.reduce(function(S,E){return v(S,E,g)},{})};var B=v;return Ue=B,Ue}var Xn=Vn();const Yn=kn(Xn);var qe=function(e,t){return qe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},qe(e,t)};function Ie(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");qe(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var x=function(){return x=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},x.apply(this,arguments)};function Zn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Fe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function De(e,t){var n=t&&t.cache?t.cache:Kn,r=t&&t.serializer?t.serializer:Jn,i=t&&t.strategy?t.strategy:qn;return i(e,{cache:n,serializer:r})}function Wn(e){return e==null||typeof e=="number"||typeof e=="boolean"}function zn(e,t,n,r){var i=Wn(r)?r:n(r),a=t.get(i);return typeof a>"u"&&(a=e.call(this,r),t.set(i,a)),a}function $t(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>"u"&&(a=e.apply(this,r),t.set(i,a)),a}function Kt(e,t,n,r,i){return n.bind(t,e,r,i)}function qn(e,t){var n=e.length===1?zn:$t;return Kt(e,this,n,t.cache.create(),t.serializer)}function Qn(e,t){return Kt(e,this,$t,t.cache.create(),t.serializer)}var Jn=function(){return JSON.stringify(arguments)},$n=(function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e})(),Kn={create:function(){return new $n}},Ge={variadic:Qn},b;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(b||(b={}));var H;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(H||(H={}));var J;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(J||(J={}));function vt(e){return e.type===H.literal}function er(e){return e.type===H.argument}function en(e){return e.type===H.number}function tn(e){return e.type===H.date}function nn(e){return e.type===H.time}function rn(e){return e.type===H.select}function an(e){return e.type===H.plural}function tr(e){return e.type===H.pound}function sn(e){return e.type===H.tag}function on(e){return!!(e&&typeof e=="object"&&e.type===J.number)}function Qe(e){return!!(e&&typeof e=="object"&&e.type===J.dateTime)}var un=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,nr=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^\']*\'[^\']*\')*[^\']*$)/g;function rr(e){var t={};return e.replace(nr,function(n){var r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var ir=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function ar(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(ir).filter(function(l){return l.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r],o=a.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var s=o[0],u=o.slice(1),h=0,f=u;h<f.length;h++){var c=f[h];if(c.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:u})}return n}function sr(e){return e.replace(/^(.*?)-/,"")}var Ht=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,hn=/^(@+)?(\\+|#+)?[rs]?$/g,or=/(\\*)(0+)|(#+)(0+)|(0+)/g,fn=/^(0+)$/;function Tt(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(hn,function(n,r,i){return typeof i!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):i==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof i=="string"?i.length:0)),""}),t}function ln(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function ur(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!fn.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function St(e){var t={},n=ln(e);return n||t}function hr(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=sr(i.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=x(x(x({},t),{notation:"scientific"}),i.options.reduce(function(u,h){return x(x({},u),St(h))},{}));continue;case"engineering":t=x(x(x({},t),{notation:"engineering"}),i.options.reduce(function(u,h){return x(x({},u),St(h))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(or,function(u,h,f,c,l,_){if(h)t.minimumIntegerDigits=f.length;else{if(c&&l)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(fn.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Ht.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ht,function(u,h,f,c,l,_){return f==="*"?t.minimumFractionDigits=h.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:l&&_?(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length+_.length):(t.minimumFractionDigits=h.length,t.maximumFractionDigits=h.length),""});var a=i.options[0];a==="w"?t=x(x({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=x(x({},t),Tt(a)));continue}if(hn.test(i.stem)){t=x(x({},t),Tt(i.stem));continue}var o=ln(i.stem);o&&(t=x(x({},t),o));var s=ur(i.stem);s&&(t=x(x({},t),s))}return t}var ge={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function fr(e,t){for(var n="",r=0;r<e.length;r++){var i=e.charAt(r);if(i==="j"){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var o=1+(a&1),s=a<2?1:3+(a>>1),u="a",h=lr(t);for((h=="H"||h=="k")&&(s=0);s-- >0;)n+=u;for(;o-- >0;)n=h+n}else i==="J"?n+="H":n+=i}return n}function lr(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=e.language,r;n!=="root"&&(r=e.maximize().region);var i=ge[r||""]||ge[n||""]||ge["".concat(n,"-001")]||ge["001"];return i[0]}var je,cr=new RegExp("^".concat(un.source,"*")),dr=new RegExp("".concat(un.source,"*$"));function p(e,t){return{start:e,end:t}}var mr=!!String.prototype.startsWith&&"_a".startsWith("a",1),gr=!!String.fromCodePoint,br=!!Object.fromEntries,pr=!!String.prototype.codePointAt,_r=!!String.prototype.trimStart,yr=!!String.prototype.trimEnd,xr=!!Number.isSafeInteger,Er=xr?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Je=!0;try{var vr=dn("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");Je=((je=vr.exec("a"))===null||je===void 0?void 0:je[0])==="a"}catch{Je=!1}var wt=mr?function(t,n,r){return t.startsWith(n,r)}:function(t,n,r){return t.slice(r,r+n.length)===n},$e=gr?String.fromCodePoint:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r="",i=t.length,a=0,o;i>a;){if(o=t[a++],o>1114111)throw RangeError(o+" is not a valid code point");r+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return r},Bt=br?Object.fromEntries:function(t){for(var n={},r=0,i=t;r<i.length;r++){var a=i[r],o=a[0],s=a[1];n[o]=s}return n},cn=pr?function(t,n){return t.codePointAt(n)}:function(t,n){var r=t.length;if(!(n<0||n>=r)){var i=t.charCodeAt(n),a;return i<55296||i>56319||n+1===r||(a=t.charCodeAt(n+1))<56320||a>57343?i:(i-55296<<10)+(a-56320)+65536}},Hr=_r?function(t){return t.trimStart()}:function(t){return t.replace(cr,"")},Tr=yr?function(t){return t.trimEnd()}:function(t){return t.replace(dr,"")};function dn(e,t){return new RegExp(e,t)}var Ke;if(Je){var At=dn("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");Ke=function(t,n){var r;At.lastIndex=n;var i=At.exec(t);return(r=i[1])!==null&&r!==void 0?r:""}}else Ke=function(t,n){for(var r=[];;){var i=cn(t,n);if(i===void 0||mn(i)||Ar(i))break;r.push(i),n+=i>=65536?2:1}return $e.apply(void 0,r)};var Sr=(function(){function e(t,n){n===void 0&&(n={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,n,r){for(var i=[];!this.isEOF();){var a=this.char();if(a===123){var o=this.parseArgument(t,r);if(o.err)return o;i.push(o.val)}else{if(a===125&&t>0)break;if(a===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),i.push({type:H.pound,location:p(s,this.clonePosition())})}else if(a===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(b.UNMATCHED_CLOSING_TAG,p(this.clonePosition(),this.clonePosition()))}else if(a===60&&!this.ignoreTag&&et(this.peek()||0)){var o=this.parseTag(t,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(t,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},e.prototype.parseTag=function(t,n){var r=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:H.literal,value:"<".concat(i,"/>"),location:p(r,this.clonePosition())},err:null};if(this.bumpIf(">")){var a=this.parseMessage(t+1,n,!0);if(a.err)return a;var o=a.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!et(this.char()))return this.error(b.INVALID_TAG,p(s,this.clonePosition()));var u=this.clonePosition(),h=this.parseTagName();return i!==h?this.error(b.UNMATCHED_CLOSING_TAG,p(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:H.tag,value:i,children:o,location:p(r,this.clonePosition())},err:null}:this.error(b.INVALID_TAG,p(s,this.clonePosition())))}else return this.error(b.UNCLOSED_TAG,p(r,this.clonePosition()))}else return this.error(b.INVALID_TAG,p(r,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&Br(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,n){for(var r=this.clonePosition(),i="";;){var a=this.tryParseQuote(n);if(a){i+=a;continue}var o=this.tryParseUnquoted(t,n);if(o){i+=o;continue}var s=this.tryParseLeftAngleBracket();if(s){i+=s;continue}break}var u=p(r,this.clonePosition());return{val:{type:H.literal,value:i,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!wr(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"\'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return $e.apply(void 0,n)},e.prototype.tryParseUnquoted=function(t,n){if(this.isEOF())return null;var r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),$e(r))},e.prototype.parseArgument=function(t,n){var r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(b.EMPTY_ARGUMENT,p(r,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(b.MALFORMED_ARGUMENT,p(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:H.argument,value:i,location:p(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(r,this.clonePosition())):this.parseArgumentOptions(t,n,i,r);default:return this.error(b.MALFORMED_ARGUMENT,p(r,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),n=this.offset(),r=Ke(this.message,n),i=n+r.length;this.bumpTo(i);var a=this.clonePosition(),o=p(t,a);return{value:r,location:o}},e.prototype.parseArgumentOptions=function(t,n,r,i){var a,o=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(b.EXPECT_ARGUMENT_TYPE,p(o,u));case"number":case"date":case"time":{this.bumpSpace();var h=null;if(this.bumpIf(",")){this.bumpSpace();var f=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var l=Tr(c.val);if(l.length===0)return this.error(b.EXPECT_ARGUMENT_STYLE,p(this.clonePosition(),this.clonePosition()));var _=p(f,this.clonePosition());h={style:l,styleLocation:_}}var y=this.tryParseArgumentClose(i);if(y.err)return y;var v=p(i,this.clonePosition());if(h&&wt(h?.style,"::",0)){var B=Hr(h.style.slice(2));if(s==="number"){var c=this.parseNumberSkeletonFromString(B,h.styleLocation);return c.err?c:{val:{type:H.number,value:r,location:v,style:c.val},err:null}}else{if(B.length===0)return this.error(b.EXPECT_DATE_TIME_SKELETON,v);var d=B;this.locale&&(d=fr(B,this.locale));var l={type:J.dateTime,pattern:d,location:h.styleLocation,parsedOptions:this.shouldParseSkeletons?rr(d):{}},m=s==="date"?H.date:H.time;return{val:{type:m,value:r,location:v,style:l},err:null}}}return{val:{type:s==="number"?H.number:s==="date"?H.date:H.time,value:r,location:v,style:(a=h?.style)!==null&&a!==void 0?a:null},err:null}}case"plural":case"selectordinal":case"select":{var g=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(b.EXPECT_SELECT_ARGUMENT_OPTIONS,p(g,x({},g)));this.bumpSpace();var S=this.parseIdentifierIfPossible(),E=0;if(s!=="select"&&S.value==="offset"){if(!this.bumpIf(":"))return this.error(b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,p(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(b.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,b.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),S=this.parseIdentifierIfPossible(),E=c.val}var I=this.tryParsePluralOrSelectOptions(t,s,n,S);if(I.err)return I;var y=this.tryParseArgumentClose(i);if(y.err)return y;var T=p(i,this.clonePosition());return s==="select"?{val:{type:H.select,value:r,options:Bt(I.val),location:T},err:null}:{val:{type:H.plural,value:r,options:Bt(I.val),offset:E,pluralType:s==="plural"?"cardinal":"ordinal",location:T},err:null}}default:return this.error(b.INVALID_ARGUMENT_TYPE,p(o,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(b.EXPECT_ARGUMENT_CLOSING_BRACE,p(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,n=this.clonePosition();!this.isEOF();){var r=this.char();switch(r){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("\'"))return this.error(b.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,p(i,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,n){var r=[];try{r=ar(t)}catch{return this.error(b.INVALID_NUMBER_SKELETON,n)}return{val:{type:J.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?hr(r):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,n,r,i){for(var a,o=!1,s=[],u=new Set,h=i.value,f=i.location;;){if(h.length===0){var c=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var l=this.tryParseDecimalInteger(b.EXPECT_PLURAL_ARGUMENT_SELECTOR,b.INVALID_PLURAL_ARGUMENT_SELECTOR);if(l.err)return l;f=p(c,this.clonePosition()),h=this.message.slice(c.offset,this.offset())}else break}if(u.has(h))return this.error(n==="select"?b.DUPLICATE_SELECT_ARGUMENT_SELECTOR:b.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,f);h==="other"&&(o=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?b.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:b.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,p(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,n,r);if(y.err)return y;var v=this.tryParseArgumentClose(_);if(v.err)return v;s.push([h,{value:y.val,location:p(_,this.clonePosition())}]),u.add(h),this.bumpSpace(),a=this.parseIdentifierIfPossible(),h=a.value,f=a.location}return s.length===0?this.error(n==="select"?b.EXPECT_SELECT_ARGUMENT_SELECTOR:b.EXPECT_PLURAL_ARGUMENT_SELECTOR,p(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(b.MISSING_OTHER_CLAUSE,p(this.clonePosition(),this.clonePosition())):{val:s,err:null}},e.prototype.tryParseDecimalInteger=function(t,n){var r=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);for(var a=!1,o=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)a=!0,o=o*10+(s-48),this.bump();else break}var u=p(i,this.clonePosition());return a?(o*=r,Er(o)?{val:o,err:null}:this.error(n,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var n=cn(this.message,t);if(n===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return n},e.prototype.error=function(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(wt(this.message,t,this.offset())){for(var n=0;n<t.length;n++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var n=this.offset();if(n===t)break;if(n>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&mn(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),n=this.offset(),r=this.message.charCodeAt(n+(t>=65536?2:1));return r??null},e})();function et(e){return e>=97&&e<=122||e>=65&&e<=90}function wr(e){return et(e)||e===47}function Br(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function mn(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Ar(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function tt(e){e.forEach(function(t){if(delete t.location,rn(t)||an(t))for(var n in t.options)delete t.options[n].location,tt(t.options[n].value);else en(t)&&on(t.style)||(tn(t)||nn(t))&&Qe(t.style)?delete t.style.location:sn(t)&&tt(t.children)})}function Or(e,t){t===void 0&&(t={}),t=x({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Sr(e,t).parse();if(n.err){var r=SyntaxError(b[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||tt(n.val),n.val}var $;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})($||($={}));var Me=(function(e){Ie(t,e);function t(n,r,i){var a=e.call(this,n)||this;return a.code=r,a.originalMessage=i,a}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error),Ot=(function(e){Ie(t,e);function t(n,r,i,a){return e.call(this,\'Invalid values for "\'.concat(n,\'": "\').concat(r,\'". Options are "\').concat(Object.keys(i).join(\'", "\'),\'"\'),$.INVALID_VALUE,a)||this}return t})(Me),Pr=(function(e){Ie(t,e);function t(n,r,i){return e.call(this,\'Value for "\'.concat(n,\'" must be of type \').concat(r),$.INVALID_VALUE,i)||this}return t})(Me),Nr=(function(e){Ie(t,e);function t(n,r){return e.call(this,\'The intl string context variable "\'.concat(n,\'" was not provided to the string "\').concat(r,\'"\'),$.MISSING_VALUE,r)||this}return t})(Me),A;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(A||(A={}));function Ir(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==A.literal||n.type!==A.literal?t.push(n):r.value+=n.value,t},[])}function Mr(e){return typeof e=="function"}function xe(e,t,n,r,i,a,o){if(e.length===1&&vt(e[0]))return[{type:A.literal,value:e[0].value}];for(var s=[],u=0,h=e;u<h.length;u++){var f=h[u];if(vt(f)){s.push({type:A.literal,value:f.value});continue}if(tr(f)){typeof a=="number"&&s.push({type:A.literal,value:n.getNumberFormat(t).format(a)});continue}var c=f.value;if(!(i&&c in i))throw new Nr(c,o);var l=i[c];if(er(f)){(!l||typeof l=="string"||typeof l=="number")&&(l=typeof l=="string"||typeof l=="number"?String(l):""),s.push({type:typeof l=="string"?A.literal:A.object,value:l});continue}if(tn(f)){var _=typeof f.style=="string"?r.date[f.style]:Qe(f.style)?f.style.parsedOptions:void 0;s.push({type:A.literal,value:n.getDateTimeFormat(t,_).format(l)});continue}if(nn(f)){var _=typeof f.style=="string"?r.time[f.style]:Qe(f.style)?f.style.parsedOptions:r.time.medium;s.push({type:A.literal,value:n.getDateTimeFormat(t,_).format(l)});continue}if(en(f)){var _=typeof f.style=="string"?r.number[f.style]:on(f.style)?f.style.parsedOptions:void 0;_&&_.scale&&(l=l*(_.scale||1)),s.push({type:A.literal,value:n.getNumberFormat(t,_).format(l)});continue}if(sn(f)){var y=f.children,v=f.value,B=i[v];if(!Mr(B))throw new Pr(v,"function",o);var d=xe(y,t,n,r,i,a),m=B(d.map(function(E){return E.value}));Array.isArray(m)||(m=[m]),s.push.apply(s,m.map(function(E){return{type:typeof E=="string"?A.literal:A.object,value:E}}))}if(rn(f)){var g=f.options[l]||f.options.other;if(!g)throw new Ot(f.value,l,Object.keys(f.options),o);s.push.apply(s,xe(g.value,t,n,r,i));continue}if(an(f)){var g=f.options["=".concat(l)];if(!g){if(!Intl.PluralRules)throw new Me(`Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n`,$.MISSING_INTL_API,o);var S=n.getPluralRules(t,{type:f.pluralType}).select(l-(f.offset||0));g=f.options[S]||f.options.other}if(!g)throw new Ot(f.value,l,Object.keys(f.options),o);s.push.apply(s,xe(g.value,t,n,r,i,l-(f.offset||0)));continue}}return Ir(s)}function Lr(e,t){return t?x(x(x({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=x(x({},e[r]),t[r]||{}),n},{})):e}function Cr(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=Lr(e[r],t[r]),n},x({},e)):e}function ke(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function Rr(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:De(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Fe([void 0],n,!1)))},{cache:ke(e.number),strategy:Ge.variadic}),getDateTimeFormat:De(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Fe([void 0],n,!1)))},{cache:ke(e.dateTime),strategy:Ge.variadic}),getPluralRules:De(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Fe([void 0],n,!1)))},{cache:ke(e.pluralRules),strategy:Ge.variadic})}}var gn=(function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var h=a.formatToParts(u);if(h.length===1)return h[0].value;var f=h.reduce(function(c,l){return!c.length||l.type!==A.literal||typeof c[c.length-1]!="string"?c.push(l.value):c[c.length-1]+=l.value,c},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return xe(a.ast,a.locales,a.formatters,a.formats,u,void 0,a.message)},this.resolvedOptions=function(){var u;return{locale:((u=a.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=i||{};o.formatters;var s=Zn(o,["formatters"]);this.ast=e.__parse(t,x(x({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Cr(e.formats,r),this.formatters=i&&i.formatters||Rr(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Or,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})();function Ur(e,t){if(t==null)return;if(t in e)return e[t];const n=t.split(".");let r=e;for(let i=0;i<n.length;i++)if(typeof r=="object"){if(i>0){const a=n.slice(i,n.length).join(".");if(a in r){r=r[a];break}}r=r[n[i]]}else r=void 0;return r}const U={},Fr=(e,t,n)=>n&&(t in U||(U[t]={}),e in U[t]||(U[t][e]=n),n),bn=(e,t)=>{if(t==null)return;if(t in U&&e in U[t])return U[t][e];const n=ce(t);for(let r=0;r<n.length;r++){const i=n[r],a=Gr(i,e);if(a)return Fr(e,t,a)}};let ct;const ee=Ne({});function Dr(e){return ct[e]||null}function dt(e){return e in ct}function Gr(e,t){if(!dt(e))return null;const n=Dr(e);return Ur(n,t)}function jr(e){if(e==null)return;const t=ce(e);for(let n=0;n<t.length;n++){const r=t[n];if(dt(r))return r}}function kr(e,...t){delete U[e],ee.update(n=>(n[e]=Yn.all([n[e]||{},...t]),n))}j([ee],([e])=>Object.keys(e));ee.subscribe(e=>ct=e);const oe={};function Vr(e){oe[e]=new Set}function Xr(e,t){oe[e].delete(t),oe[e].size===0&&delete oe[e]}function ue(e){return oe[e]}function Yr(e){return ce(e).map(t=>{const n=ue(t);return[t,n?[...n]:[]]}).filter(([,t])=>t.length>0)}function Ee(e){return e==null?!1:ce(e).some(t=>{var n;return(n=ue(t))==null?void 0:n.size})}function Zr(e,t){return Promise.all(t.map(r=>(Xr(e,r),r().then(i=>i.default||i)))).then(r=>kr(e,...r))}const re={};function pn(e){if(!Ee(e))return e in re?re[e]:Promise.resolve();const t=Yr(e);return re[e]=Promise.all(t.map(([n,r])=>Zr(n,r))).then(()=>{if(Ee(e))return pn(e);delete re[e]}),re[e]}function Aa(e,t){ue(e)||Vr(e);const n=ue(e);ue(e).has(t)||(dt(e)||ee.update(r=>(r[e]={},r)),n.add(t))}var Pt=Object.getOwnPropertySymbols,Wr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,qr=(e,t)=>{var n={};for(var r in e)Wr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pt)for(var r of Pt(e))t.indexOf(r)<0&&zr.call(e,r)&&(n[r]=e[r]);return n};const Qr={number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}};function Jr({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${ce(e).join(\'", "\')}".${Ee(k())?`\n\nNote: there are at least one loader still registered to this locale that wasn\'t executed.`:""}`)}const $r={fallbackLocale:null,loadingDelay:200,formats:Qr,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},ie=$r;function K(){return ie}function Oa(e){const t=e,{formats:n}=t,r=qr(t,["formats"]);let i=e.fallbackLocale;if(e.initialLocale)try{gn.resolveLocale(e.initialLocale)&&(i=e.initialLocale)}catch{console.warn(`[svelte-i18n] The initial locale "${e.initialLocale}" is not a valid locale.`)}return r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,r.handleMissingMessage==null?r.handleMissingMessage=Jr:console.warn(\'[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.\')),Object.assign(ie,r,{initialLocale:i}),n&&("number"in n&&Object.assign(ie.formats.number,n.number),"date"in n&&Object.assign(ie.formats.date,n.date),"time"in n&&Object.assign(ie.formats.time,n.time)),te.set(i)}const Ve=Ne(!1);var Kr=Object.defineProperty,ei=Object.defineProperties,ti=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,ni=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,It=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ii=(e,t)=>{for(var n in t||(t={}))ni.call(t,n)&&It(e,n,t[n]);if(Nt)for(var n of Nt(t))ri.call(t,n)&&It(e,n,t[n]);return e},ai=(e,t)=>ei(e,ti(t));let nt;const ve=Ne(null);function Mt(e){return e.split("-").map((t,n,r)=>r.slice(0,n+1).join("-")).reverse()}function ce(e,t=K().fallbackLocale){const n=Mt(e);return t?[...new Set([...n,...Mt(t)])]:n}function k(){return nt??void 0}ve.subscribe(e=>{nt=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const si=e=>{if(e&&jr(e)&&Ee(e)){const{loadingDelay:t}=K();let n;return typeof window<"u"&&k()!=null&&t?n=window.setTimeout(()=>Ve.set(!0),t):Ve.set(!0),pn(e).then(()=>{ve.set(e)}).finally(()=>{clearTimeout(n),Ve.set(!1)})}return ve.set(e)},te=ai(ii({},ve),{set:si}),Pa=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Le=e=>{const t=Object.create(null);return r=>{const i=JSON.stringify(r);return i in t?t[i]:t[i]=e(r)}};var oi=Object.defineProperty,He=Object.getOwnPropertySymbols,_n=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,Lt=(e,t,n)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mt=(e,t)=>{for(var n in t||(t={}))_n.call(t,n)&&Lt(e,n,t[n]);if(He)for(var n of He(t))yn.call(t,n)&&Lt(e,n,t[n]);return e},ne=(e,t)=>{var n={};for(var r in e)_n.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&He)for(var r of He(e))t.indexOf(r)<0&&yn.call(e,r)&&(n[r]=e[r]);return n};const he=(e,t)=>{const{formats:n}=K();if(e in n&&t in n[e])return n[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},ui=Le(e=>{var t=e,{locale:n,format:r}=t,i=ne(t,["locale","format"]);if(n==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format numbers\');return r&&(i=he("number",r)),new Intl.NumberFormat(n,i)}),hi=Le(e=>{var t=e,{locale:n,format:r}=t,i=ne(t,["locale","format"]);if(n==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format dates\');return r?i=he("date",r):Object.keys(i).length===0&&(i=he("date","short")),new Intl.DateTimeFormat(n,i)}),fi=Le(e=>{var t=e,{locale:n,format:r}=t,i=ne(t,["locale","format"]);if(n==null)throw new Error(\'[svelte-i18n] A "locale" must be set to format time values\');return r?i=he("time",r):Object.keys(i).length===0&&(i=he("time","short")),new Intl.DateTimeFormat(n,i)}),li=(e={})=>{var t=e,{locale:n=k()}=t,r=ne(t,["locale"]);return ui(mt({locale:n},r))},ci=(e={})=>{var t=e,{locale:n=k()}=t,r=ne(t,["locale"]);return hi(mt({locale:n},r))},di=(e={})=>{var t=e,{locale:n=k()}=t,r=ne(t,["locale"]);return fi(mt({locale:n},r))},mi=Le((e,t=k())=>new gn(e,t,K().formats,{ignoreTag:K().ignoreTag})),gi=(e,t={})=>{var n,r,i,a;let o=t;typeof e=="object"&&(o=e,e=o.id);const{values:s,locale:u=k(),default:h}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let f=bn(e,u);if(!f)f=(a=(i=(r=(n=K()).handleMissingMessage)==null?void 0:r.call(n,{locale:u,id:e,defaultValue:h}))!=null?i:h)!=null?a:e;else if(typeof f!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof f}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),f;if(!s)return f;let c=f;try{c=mi(f,u).format(s)}catch(l){l instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,l.message)}return c},bi=(e,t)=>di(t).format(e),pi=(e,t)=>ci(t).format(e),_i=(e,t)=>li(t).format(e),yi=(e,t=k())=>bn(e,t),Na=j([te,ee],()=>gi);j([te],()=>bi);j([te],()=>pi);j([te],()=>_i);j([te,ee],()=>yi);/*!\n * @kurkle/color v0.3.4\n * https://github.com/kurkle/color#readme\n * (c) 2024 Jukka Kurkela\n * Released under the MIT License\n */function de(e){return e+.5|0}const F=(e,t,n)=>Math.max(Math.min(e,n),t);function ae(e){return F(de(e*2.55),0,255)}function D(e){return F(de(e*255),0,255)}function C(e){return F(de(e/2.55)/100,0,1)}function Ct(e){return F(de(e*100),0,100)}const O={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},rt=[..."0123456789ABCDEF"],xi=e=>rt[e&15],Ei=e=>rt[(e&240)>>4]+rt[e&15],be=e=>(e&240)>>4===(e&15),vi=e=>be(e.r)&&be(e.g)&&be(e.b)&&be(e.a);function Hi(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&O[e[1]]*17,g:255&O[e[2]]*17,b:255&O[e[3]]*17,a:t===5?O[e[4]]*17:255}:(t===7||t===9)&&(n={r:O[e[1]]<<4|O[e[2]],g:O[e[3]]<<4|O[e[4]],b:O[e[5]]<<4|O[e[6]],a:t===9?O[e[7]]<<4|O[e[8]]:255})),n}const Ti=(e,t)=>e<255?t(e):"";function Si(e){var t=vi(e)?xi:Ei;return e?"#"+t(e.r)+t(e.g)+t(e.b)+Ti(e.a,t):void 0}const wi=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function xn(e,t,n){const r=t*Math.min(n,1-n),i=(a,o=(a+e/30)%12)=>n-r*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function Bi(e,t,n){const r=(i,a=(i+e/60)%6)=>n-n*t*Math.max(Math.min(a,4-a,1),0);return[r(5),r(3),r(1)]}function Ai(e,t,n){const r=xn(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function Oi(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function gt(e){const n=e.r/255,r=e.g/255,i=e.b/255,a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;let u,h,f;return a!==o&&(f=a-o,h=s>.5?f/(2-a-o):f/(a+o),u=Oi(n,r,i,f,a),u=u*60+.5),[u|0,h||0,s]}function bt(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(D)}function pt(e,t,n){return bt(xn,e,t,n)}function Pi(e,t,n){return bt(Ai,e,t,n)}function Ni(e,t,n){return bt(Bi,e,t,n)}function En(e){return(e%360+360)%360}function Ii(e){const t=wi.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?ae(+t[5]):D(+t[5]));const i=En(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?r=Pi(i,a,o):t[1]==="hsv"?r=Ni(i,a,o):r=pt(i,a,o),{r:r[0],g:r[1],b:r[2],a:n}}function Mi(e,t){var n=gt(e);n[0]=En(n[0]+t),n=pt(n),e.r=n[0],e.g=n[1],e.b=n[2]}function Li(e){if(!e)return;const t=gt(e),n=t[0],r=Ct(t[1]),i=Ct(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${C(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const Rt={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Ut={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Ci(){const e={},t=Object.keys(Ut),n=Object.keys(Rt);let r,i,a,o,s;for(r=0;r<t.length;r++){for(o=s=t[r],i=0;i<n.length;i++)a=n[i],s=s.replace(a,Rt[a]);a=parseInt(Ut[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let pe;function Ri(e){pe||(pe=Ci(),pe.transparent=[0,0,0,0]);const t=pe[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Ui=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Fi(e){const t=Ui.exec(e);let n=255,r,i,a;if(t){if(t[7]!==r){const o=+t[7];n=t[8]?ae(o):F(o*255,0,255)}return r=+t[1],i=+t[3],a=+t[5],r=255&(t[2]?ae(r):F(r,0,255)),i=255&(t[4]?ae(i):F(i,0,255)),a=255&(t[6]?ae(a):F(a,0,255)),{r,g:i,b:a,a:n}}}function Di(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${C(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Xe=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,W=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Gi(e,t,n){const r=W(C(e.r)),i=W(C(e.g)),a=W(C(e.b));return{r:D(Xe(r+n*(W(C(t.r))-r))),g:D(Xe(i+n*(W(C(t.g))-i))),b:D(Xe(a+n*(W(C(t.b))-a))),a:e.a+n*(t.a-e.a)}}function _e(e,t,n){if(e){let r=gt(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=pt(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function vn(e,t){return e&&Object.assign(t||{},e)}function Ft(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=D(e[3]))):(t=vn(e,{r:0,g:0,b:0,a:1}),t.a=D(t.a)),t}function ji(e){return e.charAt(0)==="r"?Fi(e):Ii(e)}class it{constructor(t){if(t instanceof it)return t;const n=typeof t;let r;n==="object"?r=Ft(t):n==="string"&&(r=Hi(t)||Ri(t)||ji(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=vn(this._rgb);return t&&(t.a=C(t.a)),t}set rgb(t){this._rgb=Ft(t)}rgbString(){return this._valid?Di(this._rgb):void 0}hexString(){return this._valid?Si(this._rgb):void 0}hslString(){return this._valid?Li(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let a;const o=n===a?.5:n,s=2*o-1,u=r.a-i.a,h=((s*u===-1?s:(s+u)/(1+s*u))+1)/2;a=1-h,r.r=255&h*r.r+a*i.r+.5,r.g=255&h*r.g+a*i.g+.5,r.b=255&h*r.b+a*i.b+.5,r.a=o*r.a+(1-o)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Gi(this._rgb,t._rgb,n)),this}clone(){return new it(this.rgb)}alpha(t){return this._rgb.a=D(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=de(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return _e(this._rgb,2,t),this}darken(t){return _e(this._rgb,2,-t),this}saturate(t){return _e(this._rgb,1,t),this}desaturate(t){return _e(this._rgb,1,-t),this}rotate(t){return Mi(this._rgb,t),this}}const Dt=/^on/,Hn=[];Object.keys(globalThis).forEach(e=>{Dt.test(e)&&Hn.push(e.replace(Dt,""))});function Ce(e){const t=Q,n=[];function r(i){Un(t,i)}Xt(()=>{const i=e();Hn.forEach(i instanceof Element?a=>n.push(Pn(i,a,r)):a=>n.push(i.$on(a,r)))}),Yt(()=>{for(;n.length;)n.pop()()})}function ki(e){let t,n=[e[1]],r={};for(let i=0;i<n.length;i+=1)r=N(r,n[i]);return{c(){t=On("canvas"),Mn(t,r)},m(i,a){An(i,t,a),e[8](t)},p:P,i:P,o:P,d(i){i&&kt(t),e[8](null)}}}function Vi(e){let{data:t,type:n,options:r,plugins:i,children:a,$$scope:o,$$slots:s,...u}=e;return u}function Xi(e,t,n){let{type:r}=t,{data:i={datasets:[]}}=t,{options:a={}}=t,{plugins:o=[]}=t,{updateMode:s=void 0}=t,{chart:u=null}=t,h,f=Vi(t);Xt(()=>{n(2,u=new Te(h,{type:r,data:i,options:a,plugins:o}))}),Rn(()=>{u&&(n(2,u.data=i,u),Object.assign(u.options,a),u.update(s))}),Yt(()=>{u&&u.destroy(),n(2,u=null)}),Ce(()=>h);function c(l){R[l?"unshift":"push"](()=>{h=l,n(0,h)})}return e.$$set=l=>{n(9,t=N(N({},t),G(l))),"type"in l&&n(3,r=l.type),"data"in l&&n(4,i=l.data),"options"in l&&n(5,a=l.options),"plugins"in l&&n(6,o=l.plugins),"updateMode"in l&&n(7,s=l.updateMode),"chart"in l&&n(2,u=l.chart)},t=G(t),[h,f,u,r,i,a,o,s,c]}class _t extends Pe{constructor(t){super(),Oe(this,t,Xi,ki,fe,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function Yi(e){let t,n,r;const i=[{type:"line"},e[1]];function a(s){e[4](s)}let o={};for(let s=0;s<i.length;s+=1)o=N(o,i[s]);return e[0]!==void 0&&(o.chart=e[0]),t=new _t({props:o}),e[3](t),R.push(()=>ft(t,"chart",a)),{c(){lt(t.$$.fragment)},m(s,u){Be(t,s,u),r=!0},p(s,[u]){const h=u&2?ut(i,[i[0],ht(s[1])]):{};!n&&u&1&&(n=!0,h.chart=s[0],ot(()=>n=!1)),t.$set(h)},i(s){r||(le(t.$$.fragment,s),r=!0)},o(s){we(t.$$.fragment,s),r=!1},d(s){e[3](null),Ae(t,s)}}}function Zi(e,t,n){Te.register(Tn);let{chart:r=null}=t,i,a;Ce(()=>a);function o(u){R[u?"unshift":"push"](()=>{a=u,n(2,a)})}function s(u){r=u,n(0,r)}return e.$$set=u=>{n(5,t=N(N({},t),G(u))),"chart"in u&&n(0,r=u.chart)},e.$$.update=()=>{n(1,i=t)},t=G(t),[r,i,a,o,s]}class Ia extends Pe{constructor(t){super(),Oe(this,t,Zi,Yi,fe,{chart:0})}}function Wi(e){let t,n,r;const i=[{type:"doughnut"},e[1]];function a(s){e[4](s)}let o={};for(let s=0;s<i.length;s+=1)o=N(o,i[s]);return e[0]!==void 0&&(o.chart=e[0]),t=new _t({props:o}),e[3](t),R.push(()=>ft(t,"chart",a)),{c(){lt(t.$$.fragment)},m(s,u){Be(t,s,u),r=!0},p(s,[u]){const h=u&2?ut(i,[i[0],ht(s[1])]):{};!n&&u&1&&(n=!0,h.chart=s[0],ot(()=>n=!1)),t.$set(h)},i(s){r||(le(t.$$.fragment,s),r=!0)},o(s){we(t.$$.fragment,s),r=!1},d(s){e[3](null),Ae(t,s)}}}function zi(e,t,n){Te.register(Sn);let{chart:r=null}=t,i,a;Ce(()=>a);function o(u){R[u?"unshift":"push"](()=>{a=u,n(2,a)})}function s(u){r=u,n(0,r)}return e.$$set=u=>{n(5,t=N(N({},t),G(u))),"chart"in u&&n(0,r=u.chart)},e.$$.update=()=>{n(1,i=t)},t=G(t),[r,i,a,o,s]}class Ma extends Pe{constructor(t){super(),Oe(this,t,zi,Wi,fe,{chart:0})}}function qi(e){let t,n,r;const i=[{type:"bar"},e[1]];function a(s){e[4](s)}let o={};for(let s=0;s<i.length;s+=1)o=N(o,i[s]);return e[0]!==void 0&&(o.chart=e[0]),t=new _t({props:o}),e[3](t),R.push(()=>ft(t,"chart",a)),{c(){lt(t.$$.fragment)},m(s,u){Be(t,s,u),r=!0},p(s,[u]){const h=u&2?ut(i,[i[0],ht(s[1])]):{};!n&&u&1&&(n=!0,h.chart=s[0],ot(()=>n=!1)),t.$set(h)},i(s){r||(le(t.$$.fragment,s),r=!0)},o(s){we(t.$$.fragment,s),r=!1},d(s){e[3](null),Ae(t,s)}}}function Qi(e,t,n){Te.register(wn);let{chart:r=null}=t,i,a;Ce(()=>a);function o(u){R[u?"unshift":"push"](()=>{a=u,n(2,a)})}function s(u){r=u,n(0,r)}return e.$$set=u=>{n(5,t=N(N({},t),G(u))),"chart"in u&&n(0,r=u.chart)},e.$$.update=()=>{n(1,i=t)},t=G(t),[r,i,a,o,s]}class La extends Pe{constructor(t){super(),Oe(this,t,Qi,qi,fe,{chart:0})}}const w=[];for(let e=0;e<256;++e)w.push((e+256).toString(16).slice(1));function Ji(e,t=0){return(w[e[t+0]]+w[e[t+1]]+w[e[t+2]]+w[e[t+3]]+"-"+w[e[t+4]]+w[e[t+5]]+"-"+w[e[t+6]]+w[e[t+7]]+"-"+w[e[t+8]]+w[e[t+9]]+"-"+w[e[t+10]]+w[e[t+11]]+w[e[t+12]]+w[e[t+13]]+w[e[t+14]]+w[e[t+15]]).toLowerCase()}let Ye;const $i=new Uint8Array(16);function Ki(){if(!Ye){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ye=crypto.getRandomValues.bind(crypto)}return Ye($i)}const ea=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Gt={randomUUID:ea};function ta(e,t,n){e=e||{};const r=e.random??e.rng?.()??Ki();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ji(r)}function Ca(e,t,n){return Gt.randomUUID&&!e?Gt.randomUUID():ta(e)}export{te as $,P as A,La as B,it as C,Ma as D,oa as E,fa as F,X as G,pa as H,Pn as I,da as J,Ea as K,Ia as L,sa as M,_a as N,la as O,ha as P,ba as Q,R,Pe as S,ft as T,ga as U,ot as V,ze as W,at as X,wa as Y,ra as Z,Ta as _,Oe as a,va as a0,Ca as a1,Ba as a2,ma as a3,Ha as a4,Sa as a5,Ve as a6,kt as b,Ae as c,j as d,le as e,An as f,Pa as g,On as h,Oa as i,lt as j,Nn as k,ia as l,Be as m,Yt as n,Xt as o,ca as p,ya as q,Aa as r,fe as s,we as t,xa as u,aa as v,Ne as w,Vt as x,ua as y,Na as z};\n',
21255
21263
  "zh-CN-wPD53IzZ.js": 'const e={error:"\u9519\u8BEF",loading:"\u52A0\u8F7D\u4E2D...",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",edit:"\u7F16\u8F91",add:"\u6DFB\u52A0",confirm:"\u786E\u8BA4",reset:"\u91CD\u7F6E",refresh:"\u5237\u65B0",search:"\u641C\u7D22",filter:"\u7B5B\u9009",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",close:"\u5173\u95ED",show:"\u663E\u793A",hide:"\u9690\u85CF",copy:"\u590D\u5236",copied:"\u5DF2\u590D\u5236"},t={dashboard:"\u4EEA\u8868\u677F",home:"\u9996\u9875",routes:"\u8DEF\u7531\u7BA1\u7406",logs:"\u8BF7\u6C42\u65E5\u5FD7",configuration:"\u914D\u7F6E\u4E2D\u5FC3"},r={home:"\u9996\u9875",routes:"\u8DEF\u7531\u7BA1\u7406",newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531"},a={title:"\u4EEA\u8868\u677F",dataRange:"\u6570\u636E\u65F6\u95F4\u8303\u56F4",totalRequests:"\u603B\u8BF7\u6C42\u6570",requestsPerSec:"\u6BCF\u79D2\u8BF7\u6C42\u6570",requestsPerSecond:"\u6BCF\u79D2\u8BF7\u6C42\u6570",successRate:"\u6210\u529F\u7387",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4",upstreamAnalysis:"\u4E0A\u6E38\u5206\u6790",upstreamDistribution:"\u4E0A\u6E38\u8BF7\u6C42\u5206\u5E03",upstreamFailures:"\u4E0A\u6E38\u5931\u8D25\u7EDF\u8BA1",upstreamStatusCodes:"\u4E0A\u6E38\u72B6\u6001\u7801\u5206\u5E03",noUpstreamData:"\u6240\u9009\u65F6\u95F4\u8303\u56F4\u5185\u6682\u65E0\u4E0A\u6E38\u6570\u636E",noData:"\u6682\u65E0\u6570\u636E"},o={title:"\u76D1\u63A7\u56FE\u8868",range:{"1h":"1\u5C0F\u65F6","12h":"12\u5C0F\u65F6","24h":"24\u5C0F\u65F6",oneHour:"1\u5C0F\u65F6",twelveHours:"12\u5C0F\u65F6",twentyFourHours:"24\u5C0F\u65F6"},charts:{requestsTrend:"\u8BF7\u6C42\u6570\u8D8B\u52BF",periodRequests:"\u65F6\u6BB5\u8BF7\u6C42\u6570",requests:"\u8BF7\u6C42\u6570",responseTimeTrend:"\u54CD\u5E94\u65F6\u95F4\u8D8B\u52BF",avgResponseTime:"\u5E73\u5747\u54CD\u5E94\u65F6\u95F4 (ms)",milliseconds:"\u6BEB\u79D2 (ms)",successRateTrend:"\u6210\u529F\u7387\u8D8B\u52BF",successRate:"\u6210\u529F\u7387 (%)",percentage:"\u767E\u5206\u6BD4 (%)",errorsTrend:"\u9519\u8BEF\u6570\u8D8B\u52BF",periodErrors:"\u65F6\u6BB5\u9519\u8BEF\u6570",errors:"\u9519\u8BEF\u6570"},noData:"\u6682\u65E0\u5386\u53F2\u6570\u636E"},s={title:"\u8DEF\u7531\u7BA1\u7406",subtitle:"\u7BA1\u7406\u60A8\u7684\u53CD\u5411\u4EE3\u7406\u8DEF\u7531\u548C\u4E0A\u6E38\u670D\u52A1\u5668",addRoute:"\u6DFB\u52A0\u8DEF\u7531",newRoute:"+ \u65B0\u5EFA\u8DEF\u7531",createFirstRoute:"\u521B\u5EFA\u7B2C\u4E00\u4E2A\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",deleteRoute:"\u5220\u9664\u8DEF\u7531",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",path:"\u8DEF\u5F84",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",actions:"\u64CD\u4F5C",searchPlaceholder:"\u641C\u7D22\u8DEF\u7531\u6216\u4E0A\u6E38\u670D\u52A1\u5668...",allTransformers:"\u6240\u6709\u8F6C\u6362\u5668",noRoutes:"\u6682\u65E0\u8DEF\u7531\u914D\u7F6E",noRoutesMessage:"\u521B\u5EFA\u60A8\u7684\u7B2C\u4E00\u4E2A\u8DEF\u7531\u4EE5\u5F00\u59CB\u4EE3\u7406\u8BF7\u6C42",noMatchingRoutes:"\u6CA1\u6709\u5339\u914D\u7684\u8DEF\u7531",noMatchingMessage:"\u8BF7\u5C1D\u8BD5\u8C03\u6574\u641C\u7D22\u6216\u7B5B\u9009\u6761\u4EF6",showingRoutes:"\u663E\u793A {count} / {total} \u4E2A\u8DEF\u7531",confirmDelete:"\u786E\u8BA4\u5220\u9664\u8DEF\u7531",confirmDeleteMessage:\'\u786E\u5B9A\u8981\u5220\u9664\u8DEF\u7531 "{path}" \u5417\uFF1F\u6B64\u64CD\u4F5C\u65E0\u6CD5\u64A4\u9500\u3002\',deleted:\'\u8DEF\u7531 "{path}" \u5DF2\u5220\u9664\',deleteFailed:"\u5220\u9664\u5931\u8D25: {error}",duplicated:\'\u8DEF\u7531 "{path}" \u5DF2\u590D\u5236\',duplicateFailed:"\u590D\u5236\u5931\u8D25: {error}",noRoutesToExport:"\u6CA1\u6709\u53EF\u5BFC\u51FA\u7684\u8DEF\u7531",exported:"\u8DEF\u7531\u5DF2\u5BFC\u51FA",importMustBeArray:"\u5BFC\u5165\u6587\u4EF6\u5FC5\u987B\u662F\u8DEF\u7531\u6570\u7EC4",importSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531",importPartialSuccess:"\u6210\u529F\u5BFC\u5165 {success} \u4E2A\u8DEF\u7531\uFF0C\u5931\u8D25 {failed} \u4E2A",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",filterStatus:{all:"\u5168\u90E8\u72B6\u6001",healthy:"\u4EC5\u5065\u5EB7",unhealthy:"\u6709\u5F02\u5E38"}},l={title:"\u914D\u7F6E\u4E2D\u5FC3",subtitle:"\u7F16\u8F91\u548C\u7BA1\u7406\u7CFB\u7EDF\u914D\u7F6E",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",reload:"\u91CD\u65B0\u52A0\u8F7D",restart:"\u91CD\u542F\u670D\u52A1",formEditor:"\u8868\u5355\u7F16\u8F91",jsonEditor:"JSON \u7F16\u8F91",systemSettings:"\u7CFB\u7EDF\u8BBE\u7F6E",serverPort:"\u670D\u52A1\u5668\u7AEF\u53E3",workerProcesses:"\u5DE5\u4F5C\u8FDB\u7A0B\u6570",workerProcessesHelp:"\u8981\u542F\u52A8\u7684\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u91CF",logLevel:"\u65E5\u5FD7\u7EA7\u522B",bodyParserLimit:"\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236",bodyParserLimitHelp:\'\u6700\u5927\u8BF7\u6C42\u4F53\u5927\u5C0F\uFF08\u4F8B\u5982\uFF1A"50mb"\u3001"100kb"\uFF09\',requiresRestart:"\u6CE8\u610F\uFF1A\u7AEF\u53E3\u3001\u5DE5\u4F5C\u8FDB\u7A0B\u6570\u3001\u65E5\u5FD7\u7EA7\u522B\u548C\u8BF7\u6C42\u4F53\u5927\u5C0F\u9650\u5236\u7684\u66F4\u6539\u9700\u8981\u91CD\u542F\u670D\u52A1\u624D\u80FD\u751F\u6548\u3002",routesConfigured:"{count} \u4E2A\u8DEF\u7531\u5DF2\u914D\u7F6E\u3002",manageRoutes:"\u4F7F\u7528\u8DEF\u7531\u9875\u9762\u7BA1\u7406\u8DEF\u7531\u3002",jsonConfiguration:"JSON \u914D\u7F6E",jsonParseError:"JSON \u89E3\u6790\u9519\u8BEF: {error}",jsonPlaceholder:"\u8F93\u5165 JSON \u914D\u7F6E...",jsonHelp:"\u7F16\u8F91\u539F\u59CB JSON \u914D\u7F6E\u3002\u4FDD\u5B58\u524D\u5C06\u9A8C\u8BC1\u66F4\u6539\u3002",unsavedChanges:"\u60A8\u6709\u672A\u4FDD\u5B58\u7684\u66F4\u6539",reset:"\u91CD\u7F6E",save:"\u4FDD\u5B58\u914D\u7F6E",confirmRestart:"\u786E\u8BA4\u91CD\u542F\u670D\u52A1",restartMessage:"\u786E\u5B9A\u8981\u91CD\u542F\u670D\u52A1\u5417\uFF1F\u8FD9\u5C06\u5BFC\u81F4\u77ED\u6682\u4E2D\u65AD\uFF08\u901A\u5E38 2-3 \u79D2\uFF09\uFF0C\u56E0\u4E3A\u670D\u52A1\u4F1A\u4F18\u96C5\u5730\u91CD\u542F\u3002",restartWarning:"\u6D3B\u52A8\u8FDE\u63A5\u53EF\u80FD\u4F1A\u6682\u65F6\u4E2D\u65AD\u3002",validationFailed:"\u914D\u7F6E\u9A8C\u8BC1\u5931\u8D25: {error}",saved:"\u914D\u7F6E\u5DF2\u4FDD\u5B58",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",exported:"\u914D\u7F6E\u5DF2\u5BFC\u51FA",imported:"\u914D\u7F6E\u5DF2\u5BFC\u5165",importFailed:"\u5BFC\u5165\u5931\u8D25: {error}",reloaded:"\u914D\u7F6E\u5DF2\u6210\u529F\u91CD\u65B0\u52A0\u8F7D",reloadFailed:"\u91CD\u65B0\u52A0\u8F7D\u5931\u8D25: {error}",restartSent:"\u91CD\u542F\u4FE1\u53F7\u5DF2\u53D1\u9001\uFF0C\u670D\u52A1\u5C06\u5728\u51E0\u79D2\u540E\u91CD\u542F",restartDaemonOnly:\'\u91CD\u542F\u529F\u80FD\u4EC5\u5728 daemon \u6A21\u5F0F\u4E0B\u53EF\u7528\u3002\u8BF7\u4F7F\u7528 "bungee restart" \u547D\u4EE4\u6216\u624B\u52A8\u91CD\u542F\u5F00\u53D1\u670D\u52A1\u5668\u3002\',restartFailed:"\u91CD\u542F\u5931\u8D25: {error}"},i={title:"404",message:"\u9875\u9762\u672A\u627E\u5230",goHome:"\u8FD4\u56DE\u9996\u9875"},n={newRoute:"\u65B0\u5EFA\u8DEF\u7531",editRoute:"\u7F16\u8F91\u8DEF\u7531",backToList:"\u8FD4\u56DE\u5217\u8868",routePath:"\u8DEF\u7531\u8DEF\u5F84",pathPlaceholder:"\u4F8B\u5982: /api/*",pathHelp:"\u652F\u6301\u901A\u914D\u7B26 (*) \u548C\u53C2\u6570 (:param)",pathHelpLong:"\u8DEF\u5F84\u652F\u6301\u901A\u914D\u7B26 (*) \u5339\u914D\u4EFB\u610F\u5B57\u7B26\uFF0C\u4EE5\u53CA\u53C2\u6570\u5360\u4F4D\u7B26 (:param) \u6355\u83B7\u8DEF\u5F84\u7247\u6BB5",pathCannotBeChanged:"\u7F16\u8F91\u6A21\u5F0F\u4E0B\u8DEF\u5F84\u4E0D\u53EF\u4FEE\u6539",pathRewrite:"\u8DEF\u5F84\u91CD\u5199",pathRewriteHelp:"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F\u4FEE\u6539\u8BF7\u6C42\u8DEF\u5F84",pathRewriteTooltip:"\u8DEF\u5F84\u91CD\u5199\u5141\u8BB8\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\u548C\u66FF\u6362\u8BF7\u6C42\u8DEF\u5F84\u3002\u4F8B\u5982\uFF1A^/api/v1 \u2192 /api/v2 \u4F1A\u5C06\u6240\u6709 /api/v1 \u5F00\u5934\u7684\u8DEF\u5F84\u91CD\u5199\u4E3A /api/v2",addPathRewriteRule:"\u6DFB\u52A0\u8DEF\u5F84\u91CD\u5199\u89C4\u5219",patternPlaceholder:"\u5339\u914D\u6B63\u5219\u8868\u8FBE\u5F0F (\u5982 ^/test)",replacementPlaceholder:"\u91CD\u5199\u8DEF\u5F84 (\u5982 /v1)",confirmDeleteRule:"\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u6761\u89C4\u5219\u5417\uFF1F",upstreamCountTooltip:"\u5DF2\u914D\u7F6E {count} \u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",upstreams:"\u4E0A\u6E38\u670D\u52A1\u5668",upstreamsHelp:"\u914D\u7F6E\u4E00\u4E2A\u6216\u591A\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",addUpstream:"\u6DFB\u52A0\u4E0A\u6E38",transformer:"\u8DEF\u7531\u8F6C\u6362\u5668",transformerHelp:"\u5E94\u7528\u4E8E\u6574\u4E2A\u8DEF\u7531\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",noPluginsAvailable:"\u5F53\u524D\u65E0\u53EF\u7528\u8DEF\u7531\u8F6C\u6362\u5668\u63D2\u4EF6",optional:"\u53EF\u9009",basicInfo:"\u57FA\u672C\u4FE1\u606F",requestModification:"\u8BF7\u6C42\u4FEE\u6539",requestModificationHelp:"\u4FEE\u6539\u53D1\u9001\u5230\u4E0A\u6E38\u7684\u8BF7\u6C42\u5934\u3001\u8BF7\u6C42\u4F53\u548C\u67E5\u8BE2\u53C2\u6570",routeLevelModificationNote:"\u8FD9\u4E9B\u89C4\u5219\u5E94\u7528\u4E8E\u6240\u6709\u4E0A\u6E38\u670D\u52A1\u5668",preview:"\u914D\u7F6E\u9884\u89C8",previewHelp:"\u67E5\u770B\u8DEF\u7531\u914D\u7F6E\u7684\u53EF\u89C6\u5316\u9884\u89C8",features:"\u529F\u80FD",featuresEnabled:"\u5DF2\u542F\u7528",enabledFeatures:"\u5DF2\u542F\u7528\u529F\u80FD",notSet:"\u672A\u8BBE\u7F6E",totalWeight:"\u603B\u6743\u91CD",jsonConfig:"JSON \u914D\u7F6E",requestFlow:"\u8BF7\u6C42\u6D41\u7A0B",clientRequest:"\u5BA2\u6237\u7AEF\u8BF7\u6C42",selectUpstream:"\u9009\u62E9\u4E0A\u6E38",returnResponse:"\u8FD4\u56DE\u54CD\u5E94",failoverEnabled:"\u6545\u969C\u8F6C\u79FB\u5DF2\u542F\u7528",templateApplied:"\u6A21\u677F\u5DF2\u5E94\u7528",confirmCancel:"\u786E\u5B9A\u8981\u53D6\u6D88\u5417\uFF1F\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5C06\u4E22\u5931\u3002",failoverTitle:"\u6545\u969C\u8F6C\u79FB",failoverHelp:"\u914D\u7F6E\u81EA\u52A8\u6545\u969C\u8F6C\u79FB\u548C\u5065\u5EB7\u68C0\u67E5\u673A\u5236",enableFailover:"\u542F\u7528\u81EA\u52A8\u6545\u969C\u8F6C\u79FB",retryableStatusCodes:"\u53EF\u91CD\u8BD5\u7684\u72B6\u6001\u7801",retryableStatusCodesPlaceholder:"\u9ED8\u8BA4: 500, 502, 503, 504\uFF08\u670D\u52A1\u5668\u9519\u8BEF\uFF09",retryableStatusCodesHelp:"\u9047\u5230\u8FD9\u4E9B\u72B6\u6001\u7801\u65F6\u5C06\u81EA\u52A8\u91CD\u8BD5\u5176\u4ED6\u4E0A\u6E38",passiveHealthCheck:"\u88AB\u52A8\u5065\u5EB7\u68C0\u67E5",passiveHealthCheckTooltip:"\u901A\u8FC7\u76D1\u63A7\u5B9E\u9645\u8BF7\u6C42\u7684\u6210\u529F\u5931\u8D25\u6765\u5224\u65AD\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u65E0\u9700\u989D\u5916\u63A2\u6D4B\u8BF7\u6C42",consecutiveFailuresThreshold:"\u8FDE\u7EED\u5931\u8D25\u9608\u503C",consecutiveFailuresThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u540E\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthyThreshold:"\u5065\u5EB7\u9608\u503C",healthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u540E\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",requestTimeoutMs:"\u8BF7\u6C42\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",requestTimeoutMsHelp:"\u6B63\u5E38\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",connectTimeoutMs:"\u8FDE\u63A5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",connectTimeoutMsHelp:"\u5EFA\u7ACB\u8FDE\u63A5\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A5000ms\uFF09",activeHealthCheck:"\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",activeHealthCheckTooltip:"\u5B9A\u671F\u5411\u4E0A\u6E38\u53D1\u9001\u63A2\u6D4B\u8BF7\u6C42\u6765\u4E3B\u52A8\u68C0\u6D4B\u5065\u5EB7\u72B6\u6001\uFF0C\u72EC\u7ACB\u4E8E\u4E1A\u52A1\u6D41\u91CF",enableActiveHealthCheck:"\u542F\u7528\u4E3B\u52A8\u5065\u5EB7\u68C0\u67E5",healthCheckIntervalMs:"\u68C0\u67E5\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",healthCheckIntervalMsHelp:"\u6BCF\u9694\u591A\u4E45\u6267\u884C\u4E00\u6B21\u5065\u5EB7\u68C0\u67E5\uFF08\u9ED8\u8BA4\uFF1A10000ms\uFF09",healthCheckTimeoutMs:"\u68C0\u67E5\u8D85\u65F6\uFF08\u6BEB\u79D2\uFF09",healthCheckTimeoutMsHelp:"\u5065\u5EB7\u68C0\u67E5\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A3000ms\uFF09",healthCheckPath:"\u68C0\u67E5\u8DEF\u5F84",healthCheckPathHelp:"\u5065\u5EB7\u68C0\u67E5\u7684 HTTP \u8DEF\u5F84\uFF08\u9ED8\u8BA4\uFF1A/health\uFF09",healthCheckMethod:"HTTP \u65B9\u6CD5",healthCheckExpectedStatus:"\u671F\u671B\u72B6\u6001\u7801",healthCheckExpectedStatusHelp:"\u5065\u5EB7\u68C0\u67E5\u671F\u671B\u8FD4\u56DE\u7684\u72B6\u6001\u7801\uFF08\u9ED8\u8BA4\uFF1A200\uFF09",healthCheckUnhealthyThreshold:"\u4E0D\u5065\u5EB7\u9608\u503C",healthCheckUnhealthyThresholdHelp:"\u8FDE\u7EED\u5931\u8D25\u591A\u5C11\u6B21\u6807\u8BB0\u4E3A\u4E0D\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A3\uFF09",healthCheckHealthyThreshold:"\u5065\u5EB7\u9608\u503C",healthCheckHealthyThresholdHelp:"\u8FDE\u7EED\u6210\u529F\u591A\u5C11\u6B21\u6062\u590D\u4E3A\u5065\u5EB7\uFF08\u9ED8\u8BA4\uFF1A2\uFF09",slowStart:"\u6162\u542F\u52A8",slowStartTooltip:"\u6062\u590D\u7684\u4E0A\u6E38\u9010\u6B65\u589E\u52A0\u6D41\u91CF\uFF0C\u907F\u514D\u77AC\u95F4\u538B\u529B\u5BFC\u81F4\u518D\u6B21\u6545\u969C",enableSlowStart:"\u542F\u7528\u6162\u542F\u52A8\u673A\u5236",slowStartDurationMs:"\u6162\u542F\u52A8\u6301\u7EED\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",slowStartDurationMsHelp:"\u4ECE\u4E0D\u5065\u5EB7\u6062\u590D\u540E\u9010\u6B65\u589E\u52A0\u6743\u91CD\u7684\u65F6\u95F4\uFF08\u9ED8\u8BA4\uFF1A30000ms\uFF09",slowStartInitialWeightFactor:"\u521D\u59CB\u6743\u91CD\u56E0\u5B50",slowStartInitialWeightFactorHelp:"\u6062\u590D\u540E\u521D\u59CB\u6743\u91CD\u7684\u6BD4\u4F8B\uFF0C0.1 \u8868\u793A 10%\uFF08\u9ED8\u8BA4\uFF1A0.1\uFF09",failoverInfoNotice:"\u6545\u969C\u8F6C\u79FB\u529F\u80FD\u53EF\u4EE5\u81EA\u52A8\u68C0\u6D4B\u4E0A\u6E38\u5065\u5EB7\u72B6\u6001\uFF0C\u5728\u6545\u969C\u65F6\u5207\u6362\u5230\u5907\u7528\u4E0A\u6E38\uFF0C\u4FDD\u8BC1\u670D\u52A1\u53EF\u7528\u6027\u3002",recoveryIntervalMs:"\u6062\u590D\u68C0\u6D4B\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"\u4E0A\u6E38\u5931\u8D25\u540E\u7B49\u5F85\u591A\u4E45\u5C1D\u8BD5\u6062\u590D",recoveryTimeoutMs:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"\u6062\u590D\u8BF7\u6C42\u7684\u8D85\u65F6\u65F6\u95F4\uFF0C\u907F\u514D\u957F\u65F6\u95F4 pending",saveRoute:"\u4FDD\u5B58\u8DEF\u7531",cancel:"\u53D6\u6D88",saving:"\u4FDD\u5B58\u4E2D...",loadingTemplates:"\u52A0\u8F7D\u6A21\u677F\u4E2D...",useTemplate:"\u4F7F\u7528\u6A21\u677F",routeSaved:"\u8DEF\u7531\u5DF2\u4FDD\u5B58",routeUpdated:"\u8DEF\u7531\u5DF2\u66F4\u65B0",saveFailed:"\u4FDD\u5B58\u5931\u8D25: {error}",pathRequired:"\u8DEF\u7531\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668"},u={upstreams:"{count} \u4E2A\u4E0A\u6E38",hasTransformer:"\u5E26\u8F6C\u6362\u5668",failover:"\u6545\u969C\u8F6C\u79FB",edit:"\u7F16\u8F91",duplicate:"\u590D\u5236",delete:"\u5220\u9664",duplicating:"\u590D\u5236\u4E2D...",deleting:"\u5220\u9664\u4E2D...",viewAll:"\u67E5\u770B\u5168\u90E8 {count} \u4E2A",moreActions:"\u66F4\u591A\u64CD\u4F5C",tableHeaders:{status:"\u72B6\u6001",target:"\u4E3B\u673A\u5730\u5740",weight:"\u6743\u91CD",priority:"\u4F18\u5148\u7EA7"},pathRewrite:{original:"\u539F\u59CB",rewriteTo:"\u91CD\u5199\u4E3A"}},d={title:"\u4E0A\u6E38\u670D\u52A1\u5668\u5217\u8868",close:"\u5173\u95ED",statusHealthy:"\u5065\u5EB7",statusUnhealthy:"\u5F02\u5E38",statusUnknown:"\u672A\u77E5"},c={title:"\u4E0A\u6E38\u670D\u52A1\u5668 #{index}",priority:"\u4F18\u5148\u7EA7",target:"\u76EE\u6807\u5730\u5740",targetUrl:"\u76EE\u6807\u5730\u5740",targetPlaceholder:"https://api.example.com",targetHelp:"\u4E0A\u6E38\u670D\u52A1\u5668\u7684\u5B8C\u6574 URL",weight:"\u6743\u91CD",weightHelp:"\u8D1F\u8F7D\u5747\u8861\u6743\u91CD\uFF081-100\uFF09",transformer:"\u4E0A\u6E38\u8F6C\u6362\u5668",transformerHelp:"\u4EC5\u5E94\u7528\u4E8E\u6B64\u4E0A\u6E38\u7684\u8F6C\u6362\u5668\uFF08\u53EF\u9009\uFF09",remove:"\u79FB\u9664\u4E0A\u6E38",targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F"},p={selectPlugin:"\u9009\u62E9\u63D2\u4EF6",none:"\u65E0\u63D2\u4EF6",description:"\u63D2\u4EF6\u8BF4\u660E",testPlugin:"\u6D4B\u8BD5\u63D2\u4EF6",testing:"\u6D4B\u8BD5\u4E2D...",input:"\u8F93\u5165\uFF08\u539F\u59CB\u683C\u5F0F\uFF09",output:"\u8F93\u51FA\uFF08\u8F6C\u6362\u540E\u683C\u5F0F\uFF09",inputPlaceholder:"\u8F93\u5165\u6D4B\u8BD5\u6570\u636E...",testSuccess:"\u8F6C\u6362\u6210\u529F",testFailed:"\u8F6C\u6362\u5931\u8D25: {error}"},h={title:"\u8BF7\u6C42\u5934",add:"\u6DFB\u52A0",addHeader:"\u6DFB\u52A0\u8BF7\u6C42\u5934",name:"\u540D\u79F0",namePlaceholder:"Content-Type",value:"\u503C",valuePlaceholder:"application/json",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u8BF7\u6C42\u5934"},m={title:"\u8BF7\u6C42\u4F53",bodyType:"\u8BF7\u6C42\u4F53\u7C7B\u578B",json:"JSON",text:"\u7EAF\u6587\u672C",form:"\u8868\u5355\u6570\u636E",none:"\u65E0\u8BF7\u6C42\u4F53",placeholder:"\u8F93\u5165\u8BF7\u6C42\u4F53\u5185\u5BB9...",jsonInvalid:"\u65E0\u6548\u7684 JSON \u683C\u5F0F",add:"\u6DFB\u52A0",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u5B57\u6BB5"},g={title:"\u67E5\u8BE2\u53C2\u6570",name:"\u53C2\u6570\u540D",namePlaceholder:"\u53C2\u6570\u540D\u79F0",value:"\u53C2\u6570\u503C",valuePlaceholder:"\u53C2\u6570\u503C",add:"\u6DFB\u52A0",remove:"\u79FB\u9664",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4",empty:"\u6682\u65E0\u53C2\u6570"},v={title:"\u6761\u4EF6\u8868\u8FBE\u5F0F",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"\u4F7F\u7528 JavaScript \u8868\u8FBE\u5F0F\uFF0C\u8FD4\u56DE true \u6216 false",examples:"\u793A\u4F8B",example1:"\u68C0\u67E5\u8BF7\u6C42\u5934",example2:"\u68C0\u67E5\u67E5\u8BE2\u53C2\u6570",example3:"\u68C0\u67E5\u8BF7\u6C42\u65B9\u6CD5",test:"\u6D4B\u8BD5\u8868\u8FBE\u5F0F",testResult:"\u6D4B\u8BD5\u7ED3\u679C",resultTrue:"\u6761\u4EF6\u4E3A\u771F",resultFalse:"\u6761\u4EF6\u4E3A\u5047",resultError:"\u8868\u8FBE\u5F0F\u9519\u8BEF: {error}"},y={title:"\u8DEF\u7531\u6A21\u677F",subtitle:"\u5FEB\u901F\u521B\u5EFA\u5E38\u7528\u8DEF\u7531\u914D\u7F6E",useTemplate:"\u4F7F\u7528\u6B64\u6A21\u677F",categories:{api:"API \u4EE3\u7406",static:"\u9759\u6001\u8D44\u6E90",websocket:"WebSocket",auth:"\u8BA4\u8BC1\u4EE3\u7406"},restApi:{name:"REST API \u4EE3\u7406",description:"\u6807\u51C6\u7684 RESTful API \u4EE3\u7406\u914D\u7F6E"},graphql:{name:"GraphQL API",description:"GraphQL \u7AEF\u70B9\u4EE3\u7406"},static:{name:"\u9759\u6001\u6587\u4EF6\u670D\u52A1",description:"\u4EE3\u7406\u9759\u6001\u8D44\u6E90\u6587\u4EF6"},websocket:{name:"WebSocket \u4EE3\u7406",description:"\u5B9E\u65F6\u901A\u4FE1 WebSocket \u4EE3\u7406"},loadBalancing:{name:"\u8D1F\u8F7D\u5747\u8861",description:"\u591A\u4E0A\u6E38\u8D1F\u8F7D\u5747\u8861\u914D\u7F6E"}},T={yes:"\u786E\u5B9A",no:"\u53D6\u6D88",cancelTitle:"\u786E\u8BA4\u53D6\u6D88",cancelMessage:"\u786E\u5B9A\u8981\u53D6\u6D88\u7F16\u8F91\u5E76\u8FD4\u56DE\u5417\uFF1F\u672A\u4FDD\u5B58\u7684\u66F4\u6539\u5C06\u4E22\u5931\u3002",restoreDraftTitle:"\u6062\u590D\u8349\u7A3F",restoreDraftMessage:"\u68C0\u6D4B\u5230\u6709\u672A\u4FDD\u5B58\u7684\u8349\u7A3F\uFF0C\u662F\u5426\u6062\u590D\uFF1F"},f={targetRequired:"\u76EE\u6807\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",targetProtocol:"\u76EE\u6807\u5730\u5740\u5FC5\u987B\u4F7F\u7528 http \u6216 https \u534F\u8BAE",invalidUrl:"\u65E0\u6548\u7684 URL \u683C\u5F0F",weightPositive:"\u6743\u91CD\u5FC5\u987B\u662F\u6B63\u6570",priorityNonNegative:"\u4F18\u5148\u7EA7\u5FC5\u987B\u662F\u975E\u8D1F\u6570",totalWeightPositive:"\u603B\u6743\u91CD\u5FC5\u987B\u5927\u4E8E 0",unknownTransformer:"\u672A\u77E5\u7684\u8F6C\u6362\u5668: {transformer}\u3002\u53EF\u7528\u9009\u9879: {options}",pathRequired:"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A",pathStartSlash:"\u8DEF\u5F84\u5FC5\u987B\u4EE5 / \u5F00\u5934",upstreamRequired:"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u4E0A\u6E38\u670D\u52A1\u5668",invalidRegex:"\u65E0\u6548\u7684\u6B63\u5219\u8868\u8FBE\u5F0F: {pattern}",invalidStatusCode:"\u65E0\u6548\u7684\u72B6\u6001\u7801: {code}",recoveryIntervalPositive:"\u6062\u590D\u95F4\u9694\u5FC5\u987B\u5927\u4E8E 0",recoveryTimeoutPositive:"\u6062\u590D\u8D85\u65F6\u65F6\u95F4\u5FC5\u987B\u5927\u4E8E 0",expressionEmpty:"\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A",mismatchedBraces:"{{ }} \u62EC\u53F7\u4E0D\u5339\u914D",mismatchedParentheses:"\u62EC\u53F7\u4E0D\u5339\u914D",mismatchedQuotes:"\u5F15\u53F7\u4E0D\u5339\u914D",valid:"\u914D\u7F6E\u6709\u6548",errors:"\u4E2A\u9519\u8BEF",allGood:"\u914D\u7F6E\u6B63\u786E"},R={title:"\u5FEB\u6377\u952E",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",switchSection:"\u5207\u6362\u533A\u57DF"},S={lastSaved:"\u4E0A\u6B21\u4FDD\u5B58",justNow:"\u521A\u521A",minutesAgo:"{minutes} \u5206\u949F\u524D",hoursAgo:"{hours} \u5C0F\u65F6\u524D",restoreDraft:"\u68C0\u6D4B\u5230\u672A\u4FDD\u5B58\u7684\u8349\u7A3F\uFF0C\u662F\u5426\u6062\u590D\uFF1F"},b={globalAuth:"\u5168\u5C40\u8BA4\u8BC1",routeAuth:"\u8DEF\u7531\u8BA4\u8BC1",helpText:"\u4FDD\u62A4\u60A8\u7684 API \u7AEF\u70B9",enableAuth:"\u542F\u7528\u8BA4\u8BC1",enabled:"\u5DF2\u542F\u7528",disabled:"\u5DF2\u7981\u7528",tokens:"\u4EE4\u724C\u5217\u8868",tokenPlaceholder:"\u8F93\u5165 token \u6216\u4F7F\u7528 {{ env.TOKEN_NAME }}",addToken:"\u6DFB\u52A0\u4EE4\u724C",expressionSupport:"\u652F\u6301\u8868\u8FBE\u5F0F\u8BED\u6CD5\u6765\u5F15\u7528\u73AF\u5883\u53D8\u91CF\uFF1A",securityNotice:"\u542F\u7528\u8BA4\u8BC1\u540E\uFF0CAuthorization header \u4F1A\u81EA\u52A8\u79FB\u9664\uFF0C\u4E0D\u4F1A\u8F6C\u53D1\u7ED9\u4E0A\u6E38\u670D\u52A1\u5668\uFF08\u5B89\u5168\u63AA\u65BD\uFF09\u3002",routeAuthHelp:"\u8DEF\u7531\u7EA7\u8BA4\u8BC1\u5C06\u8986\u76D6\u5168\u5C40\u8BA4\u8BC1\u914D\u7F6E\u3002\u5982\u679C\u672A\u914D\u7F6E\uFF0C\u5219\u4F7F\u7528\u5168\u5C40\u8BA4\u8BC1\u8BBE\u7F6E\u3002"},H={title:"\u8BF7\u6C42\u65E5\u5FD7",filters:"\u7B5B\u9009\u5668",autoRefresh:"\u81EA\u52A8\u5237\u65B0",refreshInterval:"\u5237\u65B0\u95F4\u9694",refreshEvery5s:"\u6BCF 5 \u79D2",refreshEvery10s:"\u6BCF 10 \u79D2",refreshEvery30s:"\u6BCF 30 \u79D2",refreshEvery60s:"\u6BCF 60 \u79D2",lastRefreshed:"\u4E0A\u6B21\u5237\u65B0",newDataAvailable:"\u6709\u65B0\u6570\u636E\u53EF\u7528\uFF0C\u70B9\u51FB\u5237\u65B0\u67E5\u770B",searchTerm:"\u641C\u7D22",searchPlaceholder:"\u641C\u7D22\u8DEF\u5F84\u6216\u9519\u8BEF\u4FE1\u606F...",method:"HTTP \u65B9\u6CD5",allMethods:"\u6240\u6709\u65B9\u6CD5",status:"\u72B6\u6001\u7801",statusPlaceholder:"\u4F8B\u5982\uFF1A200\u3001404\u3001500",result:"\u7ED3\u679C",allResults:"\u5168\u90E8",success:"\u6210\u529F",failed:"\u5931\u8D25",timeRange:"\u65F6\u95F4\u8303\u56F4",allTime:"\u5168\u90E8\u65F6\u95F4",recentTime:"\u6700\u8FD1\u65F6\u95F4",customTime:"\u81EA\u5B9A\u4E49\u8303\u56F4",recentHours:"\u6700\u8FD1\u5C0F\u65F6\u6570",startTime:"\u5F00\u59CB\u65F6\u95F4",endTime:"\u7ED3\u675F\u65F6\u95F4",sortBy:"\u6392\u5E8F\u65B9\u5F0F",sortByTimestamp:"\u65F6\u95F4\u6233",sortByDuration:"\u6301\u7EED\u65F6\u95F4",sortByStatus:"\u72B6\u6001\u7801",sortOrder:"\u6392\u5E8F",asc:"\u5347\u5E8F",desc:"\u964D\u5E8F",time:"\u65F6\u95F4",path:"\u8DEF\u5F84",duration:"\u6301\u7EED\u65F6\u95F4",requestType:"\u7C7B\u578B",requestTypeFilter:"\u8BF7\u6C42\u7C7B\u578B",requestType_all:"\u5168\u90E8\u7C7B\u578B",requestType_final:"\u6700\u7EC8\u8BF7\u6C42",requestType_retry:"\u91CD\u8BD5\u8BF7\u6C42",requestType_recovery:"\u6062\u590D\u6D4B\u8BD5",requestType_final_desc:"\u8FD4\u56DE\u5BA2\u6237\u7AEF\u7684\u8BF7\u6C42",requestType_retry_desc:"\u91CD\u8BD5\u5C1D\u8BD5",requestType_recovery_desc:"\u6545\u969C\u6062\u590D\u6D4B\u8BD5",upstream:"\u4E0A\u6E38",actions:"\u64CD\u4F5C",viewDetail:"\u8BE6\u60C5",export:"\u5BFC\u51FA",startStream:"\u542F\u52A8\u6D41",stopStream:"\u505C\u6B62\u6D41",showing:"\u663E\u793A {start}-{end}\uFF0C\u5171 {total} \u6761",page:"\u7B2C {page} \u9875\uFF0C\u5171 {totalPages} \u9875",noData:"\u6682\u65E0\u65E5\u5FD7\u6570\u636E",advancedFilters:"\u9AD8\u7EA7\u7B5B\u9009",activeFilters:"\u4E2A\u7B5B\u9009\u6761\u4EF6",clearFilters:"\u6E05\u9664\u5168\u90E8",moreFilters:"\u66F4\u591A\u7B5B\u9009",detail:{title:"\u8BF7\u6C42\u65E5\u5FD7\u8BE6\u60C5",requestId:"\u8BF7\u6C42 ID",timestamp:"\u65F6\u95F4\u6233",method:"\u65B9\u6CD5",status:"\u72B6\u6001",duration:"\u6301\u7EED\u65F6\u95F4",success:"\u6210\u529F",requestInfo:"\u8BF7\u6C42\u4FE1\u606F",path:"\u8DEF\u5F84",originalPath:"\u539F\u59CB\u8DEF\u5F84",transformedPath:"\u8F6C\u6362\u540E",query:"\u67E5\u8BE2\u5B57\u7B26\u4E32",routePath:"\u5339\u914D\u8DEF\u7531",upstreamInfo:"\u4E0A\u6E38\u4FE1\u606F",upstream:"\u4E0A\u6E38",transformer:"\u8F6C\u6362\u5668",authInfo:"\u8BA4\u8BC1\u4FE1\u606F",authLevel:"\u8BA4\u8BC1\u7EA7\u522B",authResult:"\u7ED3\u679C",authSuccess:"\u5DF2\u8BA4\u8BC1",authFailed:"\u5931\u8D25",processingSteps:"\u5904\u7406\u6B65\u9AA4",errorInfo:"\u9519\u8BEF\u4FE1\u606F",requestBody:"\u8BF7\u6C42\u4F53",responseBody:"\u54CD\u5E94\u4F53",loadRequestBody:"\u52A0\u8F7D\u8BF7\u6C42\u4F53",loadResponseBody:"\u52A0\u8F7D\u54CD\u5E94\u4F53",bodyNotRecorded:"\u6B64\u8BF7\u6C42\u672A\u8BB0\u5F55 Body",bodyNotRecordedReason:"\u53EF\u80FD\u8D85\u8FC7\u5927\u5C0F\u9650\u5236\u6216\u4E3A\u7A7A",originalRequest:"\u539F\u59CB\u8BF7\u6C42\uFF08\u8F6C\u6362\u524D\uFF09",finalRequest:"\u6700\u7EC8\u8BF7\u6C42\uFF08\u53D1\u9001\u7ED9\u4E0A\u6E38\uFF09",responseData:"\u54CD\u5E94\u6570\u636E\uFF08\u4E0A\u6E38\u8FD4\u56DE\uFF09",originalHeaders:"\u539F\u59CB\u8BF7\u6C42\u5934",finalHeaders:"\u6700\u7EC8\u8BF7\u6C42\u5934",requestHeaders:"\u8BF7\u6C42\u5934",responseHeaders:"\u54CD\u5E94\u5934",bodyPreview:"Body \u9884\u89C8",bodyTooLarge:"Body \u8FC7\u5927 ({size})",clickToExpand:"\u70B9\u51FB\u5C55\u5F00",headers:"\u4E2A\u8BF7\u6C42\u5934",noHeaders:"\u6682\u65E0\u8BF7\u6C42\u5934",noBody:"\u6682\u65E0 Body \u6570\u636E",overview:"\u6982\u89C8",routeAndUpstream:"\u8DEF\u7531\u4E0E\u4E0A\u6E38",processingTimeline:"\u5904\u7406\u65F6\u95F4\u7EBF",totalSteps:"\u5171 {count} \u6B65",totalDuration:"\u603B\u8017\u65F6 {duration}",showTimeline:"\u663E\u793A\u65F6\u95F4\u7EBF",hideTimeline:"\u9690\u85CF\u65F6\u95F4\u7EBF",copyToClipboard:"\u590D\u5236",downloadJson:"\u4E0B\u8F7D JSON",copied:"\u5DF2\u590D\u5236\uFF01",tabOriginalRequest:"\u539F\u59CB\u8BF7\u6C42",tabFinalRequest:"\u8F6C\u6362\u540E",tabResponse:"\u54CD\u5E94\u6570\u636E",requestData:"\u8BF7\u6C42\u6570\u636E",noDataAvailable:"\u6682\u65E0\u6570\u636E",step:"\u6B65\u9AA4"},steps:{route_matched:"\u8DEF\u7531\u5339\u914D",request_snapshot_created:"\u8BF7\u6C42\u5FEB\u7167\u521B\u5EFA",auth_failed:"\u8BA4\u8BC1\u5931\u8D25",auth_success:"\u8BA4\u8BC1\u6210\u529F",upstream_selected:"\u4E0A\u6E38\u9009\u62E9",trying_upstream:"\u5C1D\u8BD5\u4E0A\u6E38",circuit_breaker_closed:"\u65AD\u8DEF\u5668\u5173\u95ED",circuit_breaker_opened:"\u65AD\u8DEF\u5668\u6253\u5F00",circuit_breaker_reopened:"\u65AD\u8DEF\u5668\u91CD\u65B0\u6253\u5F00",upstream_recovered:"\u4E0A\u6E38\u6062\u590D",upstream_retry:"\u4E0A\u6E38\u91CD\u8BD5",upstream_failed:"\u4E0A\u6E38\u5931\u8D25",plugin_request_init:"\u63D2\u4EF6\u8BF7\u6C42\u521D\u59CB\u5316",plugin_before_request:"\u63D2\u4EF6\u8BF7\u6C42\u524D\u5904\u7406",plugin_intercepted:"\u63D2\u4EF6\u62E6\u622A\u8BF7\u6C42",plugin_response:"\u63D2\u4EF6\u54CD\u5E94\u5904\u7406",plugin_error:"\u63D2\u4EF6\u9519\u8BEF\u5904\u7406"}},P={title:"\u65E5\u5FD7\u914D\u7F6E",bodyRecording:"\u542F\u7528\u8BF7\u6C42/\u54CD\u5E94\u4F53\u8BB0\u5F55",bodyRecordingHelp:"\u8BB0\u5F55\u8BF7\u6C42\u548C\u54CD\u5E94\u4F53\u7528\u4E8E\u95EE\u9898\u6392\u67E5\u548C\u5206\u6790",maxSize:"\u6700\u5927 Body \u5927\u5C0F",maxSizeHelp:"\u8D85\u8FC7\u6B64\u5927\u5C0F\u7684 Body \u5C06\u88AB\u8DF3\u8FC7\uFF081-100 KB\uFF09",retentionDays:"Body \u4FDD\u7559\u5929\u6570",retentionDaysHelp:"Body \u5C06\u5728\u8FD9\u4E9B\u5929\u6570\u540E\u81EA\u52A8\u5220\u9664",days:"\u5929",hours:"\u5C0F\u65F6",cleanupConfig:"\u6E05\u7406\u914D\u7F6E",cleanupStatus:"\u72B6\u6001",active:"\u6D3B\u8DC3",inactive:"\u672A\u6D3B\u8DC3",cleanupRetention:"\u4FDD\u7559\u65F6\u957F",cleanupInterval:"\u6E05\u7406\u95F4\u9694",manualCleanup:"\u624B\u52A8\u6E05\u7406",confirmCleanup:"\u786E\u5B9A\u8981\u624B\u52A8\u89E6\u53D1\u65E5\u5FD7\u6E05\u7406\u5417\uFF1F\u8FD9\u5C06\u5220\u9664\u6240\u6709\u8D85\u8FC7\u914D\u7F6E\u4FDD\u7559\u671F\u9650\u7684\u65E5\u5FD7\u548C Body\u3002",cleanupSuccess:"\u6E05\u7406\u6210\u529F\u5B8C\u6210",cleanupFailed:"\u6E05\u7406\u5931\u8D25: {error}",lastCleanup:"\u4E0A\u6B21\u6E05\u7406\u7ED3\u679C",deletedSqliteRecords:"\u5DF2\u5220\u9664 SQLite \u8BB0\u5F55",deletedFileLogFiles:"\u5DF2\u5220\u9664\u65E5\u5FD7\u6587\u4EF6",deletedBodyFiles:"\u5DF2\u5220\u9664 Body \u6587\u4EF6",dirs:"\u76EE\u5F55",files:"\u6587\u4EF6",duration:"\u8017\u65F6"},q={title:"\u767B\u5F55",subtitle:"\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C\u4EE5\u7EE7\u7EED",token:"\u8BBF\u95EE\u4EE4\u724C",tokenPlaceholder:"\u8BF7\u8F93\u5165\u8BBF\u95EE\u4EE4\u724C...",submit:"\u767B\u5F55",loggingIn:"\u767B\u5F55\u4E2D...",success:"\u767B\u5F55\u6210\u529F",failed:"\u767B\u5F55\u5931\u8D25\uFF1A{error}",required:"\u8BBF\u95EE\u4EE4\u724C\u4E0D\u80FD\u4E3A\u7A7A",unauthorized:"\u8BBF\u95EE\u4EE4\u724C\u65E0\u6548",logout:"\u9000\u51FA\u767B\u5F55",logoutConfirm:"\u786E\u5B9A\u8981\u9000\u51FA\u767B\u5F55\u5417\uFF1F"},w={common:e,nav:t,breadcrumb:r,dashboard:a,monitoring:o,routes:s,configuration:l,notFound:i,routeEditor:n,routeCard:u,upstreamsModal:d,upstream:c,plugin:p,headers:h,body:m,query:g,expression:v,templates:y,confirmDialog:T,validation:f,shortcuts:R,autosave:S,auth:b,logs:H,logging:P,login:q};export{b as auth,S as autosave,m as body,r as breadcrumb,e as common,l as configuration,T as confirmDialog,a as dashboard,w as default,v as expression,h as headers,P as logging,q as login,H as logs,o as monitoring,t as nav,i as notFound,p as plugin,g as query,u as routeCard,n as routeEditor,s as routes,R as shortcuts,y as templates,c as upstream,d as upstreamsModal,f as validation};\n',
21264
+ "index-D-TPeiTP.css": "*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}*{scrollbar-color:color-mix(in oklch,currentColor 35%,transparent) transparent}*:hover{scrollbar-color:color-mix(in oklch,currentColor 60%,transparent) transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box, 1rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width: 640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.breadcrumbs{max-width:100%;overflow-x:auto;padding-top:.5rem;padding-bottom:.5rem}.breadcrumbs>ul,.breadcrumbs>ol{display:flex;align-items:center;white-space:nowrap;min-height:-moz-min-content;min-height:min-content}.breadcrumbs>ul>li,.breadcrumbs>ol>li{display:flex;align-items:center}.breadcrumbs>ul>li>a,.breadcrumbs>ol>li>a{display:flex;cursor:pointer;align-items:center}@media (hover:hover){.breadcrumbs>ul>li>a:hover,.breadcrumbs>ol>li>a:hover{text-decoration-line:underline}.link-hover:hover{text-decoration-line:underline}.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.tab:hover{--tw-text-opacity: 1}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):hover,.tabs-boxed :is(input:checked):hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{height:3rem;width:3rem;border-radius:9999px;padding:0}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card-actions{display:flex;flex-wrap:wrap;align-items:flex-start;gap:.5rem}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:\"\";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.collapse:not(td):not(tr):not(colgroup){visibility:visible}.collapse{position:relative;display:grid;overflow:hidden;grid-template-rows:max-content 0fr;transition:grid-template-rows .2s;width:100%;border-radius:var(--rounded-box, 1rem)}.collapse-title,.collapse>input[type=checkbox],.collapse>input[type=radio],.collapse-content{grid-column-start:1;grid-row-start:1}.collapse>input[type=checkbox],.collapse>input[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){height:100%;width:100%;z-index:1}.collapse-content{visibility:hidden;grid-column-start:1;grid-row-start:2;min-height:0px;transition:visibility .2s;transition:padding .2s ease-out,background-color .2s ease-out;padding-left:1rem;padding-right:1rem;cursor:unset}.collapse[open],.collapse-open,.collapse:focus:not(.collapse-close){grid-template-rows:max-content 1fr}.collapse:not(.collapse-close):has(>input[type=checkbox]:checked),.collapse:not(.collapse-close):has(>input[type=radio]:checked){grid-template-rows:max-content 1fr}.collapse[open]>.collapse-content,.collapse-open>.collapse-content,.collapse:focus:not(.collapse-close)>.collapse-content,.collapse:not(.collapse-close)>input[type=checkbox]:checked~.collapse-content,.collapse:not(.collapse-close)>input[type=radio]:checked~.collapse-content{visibility:visible;min-height:-moz-fit-content;min-height:fit-content}.divider{display:flex;flex-direction:row;align-items:center;align-self:stretch;margin-top:1rem;margin-bottom:1rem;height:1rem;white-space:nowrap}.divider:before,.divider:after{height:.125rem;width:100%;flex-grow:1;--tw-content: \"\";content:var(--tw-content);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.dropdown{position:relative;display:inline-block}.dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown-end .dropdown-content{inset-inline-end:0px}.dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}.dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}.dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}.dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}.dropdown-end.dropdown-right .dropdown-content,.dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}.dropdown.dropdown-open .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content,.dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media (hover: hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>*.disabled:hover,.btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline:hover{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-outline.btn-secondary:hover{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-secondary:hover{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}}.btn-outline.btn-accent:hover{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-accent:hover{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}}.btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}.btn-outline.btn-info:hover{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-info:hover{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}}.btn-outline.btn-warning:hover{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-warning:hover{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}}.btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}.tab[disabled],.tab[disabled]:hover{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.indicator{position:relative;display:inline-flex;width:-moz-max-content;width:max-content}.indicator :where(.indicator-item){z-index:1;position:absolute;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));white-space:nowrap}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.input-sm[type=number]::-webkit-inner-spin-button{margin-top:0;margin-bottom:0;margin-inline-end:-0px}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.kbd{display:inline-flex;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:.5rem;padding-right:.5rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));border-bottom-width:2px;min-height:2.2em;min-width:2.2em}.link{cursor:pointer;text-decoration-line:underline}.link-hover{text-decoration-line:none}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.mockup-code{position:relative;overflow:hidden;overflow-x:auto;min-width:18rem;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));padding-top:1.25rem;padding-bottom:1.25rem;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));direction:ltr}.mockup-code pre[data-prefix]:before{content:attr(data-prefix);display:inline-block;text-align:right;width:2rem;opacity:.5}.modal{pointer-events:none;position:fixed;inset:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:32rem;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:1.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}.modal-action{display:flex;margin-top:1.5rem;justify-content:flex-end}.modal-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;width:100%}:where(.navbar>*:not(script,style)){display:inline-flex;align-items:center}.radio{flex-shrink:0;--chkbg: var(--bc);height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:9999px;border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.range{height:1.5rem;width:100%;cursor:pointer;-moz-appearance:none;appearance:none;-webkit-appearance:none;--range-shdw: var(--fallback-bc,oklch(var(--bc)/1));overflow:hidden;border-radius:var(--rounded-box, 1rem);background-color:transparent}.range:focus{outline:none}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-inline-start:1rem;padding-inline-end:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.stats{display:inline-grid;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}:where(.stats){grid-auto-flow:column;overflow-x:auto}.stat{display:inline-grid;width:100%;grid-template-columns:repeat(1,1fr);-moz-column-gap:1rem;column-gap:1rem;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .1;padding:1rem 1.5rem}.stat-title{grid-column-start:1;white-space:nowrap;color:var(--fallback-bc,oklch(var(--bc)/.6))}.stat-value{grid-column-start:1;white-space:nowrap;font-size:2.25rem;line-height:2.5rem;font-weight:800}.stat-desc{grid-column-start:1;white-space:nowrap;font-size:.75rem;line-height:1rem;color:var(--fallback-bc,oklch(var(--bc)/.6))}.steps{display:inline-grid;grid-auto-flow:column;overflow:hidden;overflow-x:auto;counter-reset:step;grid-auto-columns:1fr}.steps .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-columns:auto;grid-template-rows:repeat(2,minmax(0,1fr));grid-template-rows:40px 1fr;place-items:center;text-align:center;min-width:4rem}.tabs{display:grid;align-items:flex-end}.tabs-lifted:has(.tab-content[class^=rounded-]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])),.tabs-lifted:has(.tab-content[class*=\" rounded-\"]) .tab:first-child:not(:is(.tab-active,[aria-selected=true])){border-bottom-color:transparent}.tab{position:relative;grid-row-start:1;display:inline-flex;height:2rem;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem;--tw-text-opacity: .5;--tab-color: var(--fallback-bc,oklch(var(--bc)/1));--tab-bg: var(--fallback-b1,oklch(var(--b1)/1));--tab-border-color: var(--fallback-b3,oklch(var(--b3)/1));color:var(--tab-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem)}.tab:is(input[type=radio]){width:auto;border-bottom-right-radius:0;border-bottom-left-radius:0}.tab:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.tab:not(input):empty{cursor:default;grid-column-start:span 9999}:checked+.tab-content:nth-child(2),:is(.tab-active,[aria-selected=true])+.tab-content:nth-child(2){border-start-start-radius:0px}input.tab:checked+.tab-content,:is(.tab-active,[aria-selected=true])+.tab-content{display:block}.table{position:relative;width:100%;border-radius:var(--rounded-box, 1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table-zebra tbody tr:nth-child(2n) :where(.table-pin-cols tr th){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.toast{position:fixed;display:flex;min-width:-moz-fit-content;min-width:fit-content;flex-direction:column;white-space:nowrap;gap:.5rem;padding:1rem}.toggle{flex-shrink:0;--tglbg: var(--fallback-b1,oklch(var(--b1)/1));--handleoffset: 1.5rem;--handleoffsetcalculator: calc(var(--handleoffset) * -1);--togglehandleborder: 0 0;height:1.5rem;width:3rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input, .2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}.alert-info{border-color:var(--fallback-in,oklch(var(--in)/.2));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-in,oklch(var(--in)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-success{border-color:var(--fallback-su,oklch(var(--su)/.2));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-su,oklch(var(--su)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-warning{border-color:var(--fallback-wa,oklch(var(--wa)/.2));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));--alert-bg: var(--fallback-wa,oklch(var(--wa)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.badge-neutral{--tw-border-opacity: 1;border-color:var(--fallback-n,oklch(var(--n)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.badge-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.badge-accent{--tw-border-opacity: 1;border-color:var(--fallback-a,oklch(var(--a)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.badge-info{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.badge-success{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-warning{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-ghost{--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.badge-outline{border-color:currentColor;--tw-border-opacity: .5;background-color:transparent;color:currentColor}.badge-outline.badge-neutral{--tw-text-opacity: 1;color:var(--fallback-n,oklch(var(--n)/var(--tw-text-opacity)))}.badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.badge-outline.badge-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.badge-outline.badge-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>*.disabled,.btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}.breadcrumbs>ul>li>a:focus,.breadcrumbs>ol>li>a:focus{outline:2px solid transparent;outline-offset:2px}.breadcrumbs>ul>li>a:focus-visible,.breadcrumbs>ol>li>a:focus-visible{outline:2px solid currentColor;outline-offset:2px}.breadcrumbs>ul>li+*:before,.breadcrumbs>ol>li+*:before{content:\"\";margin-left:.5rem;margin-right:.75rem;display:block;height:.375rem;width:.375rem;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:.4;border-top:1px solid;border-right:1px solid;background-color:transparent}[dir=rtl] .breadcrumbs>ul>li+*:before,[dir=rtl] .breadcrumbs>ol>li+*:before{--tw-rotate: -135deg}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}.btn-secondary{--btn-color: var(--fallback-s)}.btn-success{--btn-color: var(--fallback-su)}.btn-warning{--btn-color: var(--fallback-wa)}.btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}.btn-outline.btn-secondary.btn-active{background-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-s,oklch(var(--s)/1)) 90%,black)}.btn-outline.btn-accent.btn-active{background-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-a,oklch(var(--a)/1)) 90%,black)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}.btn-outline.btn-info.btn-active{background-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-in,oklch(var(--in)/1)) 90%,black)}.btn-outline.btn-warning.btn-active{background-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-wa,oklch(var(--wa)/1)) 90%,black)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}.btn-secondary{--btn-color: var(--s)}.btn-success{--btn-color: var(--su)}.btn-warning{--btn-color: var(--wa)}.btn-error{--btn-color: var(--er)}}.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)));outline-color:var(--fallback-s,oklch(var(--s)/1))}.btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}.btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline{border-color:currentColor;background-color:transparent;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.btn-outline.btn-active{--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-b1,oklch(var(--b1)/var(--tw-text-opacity)))}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-secondary{--tw-text-opacity: 1;color:var(--fallback-s,oklch(var(--s)/var(--tw-text-opacity)))}.btn-outline.btn-secondary.btn-active{--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.btn-outline.btn-accent{--tw-text-opacity: 1;color:var(--fallback-a,oklch(var(--a)/var(--tw-text-opacity)))}.btn-outline.btn-accent.btn-active{--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.btn-outline.btn-info.btn-active{--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.btn-outline.btn-warning{--tw-text-opacity: 1;color:var(--fallback-wa,oklch(var(--wa)/var(--tw-text-opacity)))}.btn-outline.btn-warning.btn-active{--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-title{display:flex;align-items:center;gap:.5rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}details.collapse{width:100%}details.collapse summary{position:relative;display:block;outline:2px solid transparent;outline-offset:2px}details.collapse summary::-webkit-details-marker{display:none}.collapse:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse:has(.collapse-title:focus-visible),.collapse:has(>input[type=checkbox]:focus-visible),.collapse:has(>input[type=radio]:focus-visible){outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.collapse-arrow>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;--tw-translate-y: -100%;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.15s;transition-duration:.2s;top:1.9rem;inset-inline-end:1.4rem;content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.collapse-plus>.collapse-title:after{position:absolute;display:block;height:.5rem;width:.5rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.3s;top:.9rem;inset-inline-end:1.4rem;content:\"+\";pointer-events:none}.collapse:not(.collapse-open):not(.collapse-close)>input[type=checkbox],.collapse:not(.collapse-open):not(.collapse-close)>input[type=radio]:not(:checked),.collapse:not(.collapse-open):not(.collapse-close)>.collapse-title{cursor:pointer}.collapse:focus:not(.collapse-open):not(.collapse-close):not(.collapse[open])>.collapse-title{cursor:unset}.collapse-title{position:relative}.collapse-title,:where(.collapse>input[type=checkbox]),:where(.collapse>input[type=radio]){padding:1rem;padding-inline-end:3rem;min-height:3.75rem;transition:background-color .2s ease-out}.collapse[open]>:where(.collapse-content),.collapse-open>:where(.collapse-content),.collapse:focus:not(.collapse-close)>:where(.collapse-content),.collapse:not(.collapse-close)>:where(input[type=checkbox]:checked~.collapse-content),.collapse:not(.collapse-close)>:where(input[type=radio]:checked~.collapse-content){padding-bottom:1rem;transition:padding .2s ease-out,background-color .2s ease-out}.collapse[open].collapse-arrow>.collapse-title:after,.collapse-open.collapse-arrow>.collapse-title:after,.collapse-arrow:focus:not(.collapse-close)>.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-arrow:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{--tw-translate-y: -50%;--tw-rotate: 225deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.collapse[open].collapse-plus>.collapse-title:after,.collapse-open.collapse-plus>.collapse-title:after,.collapse-plus:focus:not(.collapse-close)>.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=checkbox]:checked~.collapse-title:after,.collapse-plus:not(.collapse-close)>input[type=radio]:checked~.collapse-title:after{content:\"\u2212\"}.divider:not(:empty){gap:1rem}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input-error{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)))}.input-error:focus,.input-error:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-er,oklch(var(--er)/var(--tw-border-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1)}.join-item:focus{isolation:isolate}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.\\!loading{pointer-events:none!important;display:inline-block!important;aspect-ratio:1 / 1!important;width:1.5rem!important;background-color:currentColor!important;-webkit-mask-size:100%!important;mask-size:100%!important;-webkit-mask-repeat:no-repeat!important;mask-repeat:no-repeat!important;-webkit-mask-position:center!important;mask-position:center!important;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important;mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")!important}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-spinner{-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E\")}.loading-xs{width:1rem}.loading-sm{width:1.25rem}.loading-lg{width:2.5rem}:where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0px;top:.75rem;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:\"\"}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, .5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>details>summary):after,.menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:\"\";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}.mockup-code:before{content:\"\";margin-bottom:1rem;display:block;height:.75rem;width:.75rem;border-radius:9999px;opacity:.3;box-shadow:1.4em 0,2.8em 0,4.2em 0}.mockup-code pre{padding-right:1.25rem}.mockup-code pre:before{content:\"\";margin-right:2ch}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:\"\";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:\"\";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal:not(dialog:not(.modal-open)),.modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}.modal-backdrop{z-index:-1;grid-column-start:1;grid-row-start:1;display:grid;align-self:stretch;justify-self:stretch;color:transparent}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.modal-action>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.modal-action:where([dir=rtl],[dir=rtl] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}@keyframes modal-pop{0%{opacity:0}}@keyframes progress-loading{50%{background-position-x:-115%}}.radio:focus{box-shadow:none}.radio:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.radio:checked,.radio[aria-checked=true]{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-image:none;animation:radiomark var(--animation-input, .2s) ease-out;box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}.radio:disabled{cursor:not-allowed;opacity:.2}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}.range:focus-visible::-webkit-slider-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range:focus-visible::-moz-range-thumb{--focus-shadow: 0 0 0 6px var(--fallback-b1,oklch(var(--b1)/1)) inset, 0 0 0 2rem var(--range-shdw) inset}.range::-webkit-slider-runnable-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-moz-range-track{height:.5rem;width:100%;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.1))}.range::-webkit-slider-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));appearance:none;-webkit-appearance:none;top:50%;color:var(--range-shdw);transform:translateY(-50%);--filler-size: 100rem;--filler-offset: .6rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}.range::-moz-range-thumb{position:relative;height:1.5rem;width:1.5rem;border-radius:var(--rounded-box, 1rem);border-style:none;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));top:50%;color:var(--range-shdw);--filler-size: 100rem;--filler-offset: .5rem;box-shadow:0 0 0 3px var(--range-shdw) inset,var(--focus-shadow, 0 0),calc(var(--filler-size) * -1 - var(--filler-offset)) 0 0 var(--filler-size)}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-multiple,.select[multiple],.select[size].select:not([size=\"1\"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:where(.stats)>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)));--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}[dir=rtl] .stats>*:not([hidden])~*:not([hidden]){--tw-divide-x-reverse: 1}.steps .step:before{top:0;grid-column-start:1;grid-row-start:1;height:.5rem;width:100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));content:\"\";margin-inline-start:-100%}.steps .step:after{content:counter(step);counter-increment:step;z-index:1;position:relative;grid-column-start:1;grid-row-start:1;display:grid;height:2rem;width:2rem;place-items:center;place-self:center;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.steps .step:first-child:before{content:none}.steps .step[data-content]:after{content:attr(data-content)}.steps .step-neutral+.step-neutral:before,.steps .step-neutral:after{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.steps .step-primary+.step-primary:before,.steps .step-primary:after{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.steps .step-secondary+.step-secondary:before,.steps .step-secondary:after{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-sc,oklch(var(--sc)/var(--tw-text-opacity)))}.steps .step-accent+.step-accent:before,.steps .step-accent:after{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-ac,oklch(var(--ac)/var(--tw-text-opacity)))}.steps .step-info+.step-info:before{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)))}.steps .step-info:after{--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.steps .step-success+.step-success:before{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)))}.steps .step-success:after{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.steps .step-warning+.step-warning:before{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)))}.steps .step-warning:after{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-wac,oklch(var(--wac)/var(--tw-text-opacity)))}.steps .step-error+.step-error:before{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)))}.steps .step-error:after{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.tabs-lifted>.tab:focus-visible{border-end-end-radius:0;border-end-start-radius:0}.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tab:is(input:checked){border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: 1;--tw-text-opacity: 1}.tab:focus{outline:2px solid transparent;outline-offset:2px}.tab:focus-visible{outline:2px solid currentColor;outline-offset:-5px}.tab-disabled,.tab[disabled]{cursor:not-allowed;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.tabs-bordered>.tab{border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2;border-style:solid;border-bottom-width:calc(var(--tab-border, 1px) + 1px)}.tabs-lifted>.tab{border:var(--tab-border, 1px) solid transparent;border-width:0 0 var(--tab-border, 1px) 0;border-start-start-radius:var(--tab-radius, .5rem);border-start-end-radius:var(--tab-radius, .5rem);border-bottom-color:var(--tab-border-color);padding-inline-start:var(--tab-padding, 1rem);padding-inline-end:var(--tab-padding, 1rem);padding-top:var(--tab-border, 1px)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-lifted>.tab:is(input:checked){background-color:var(--tab-bg);border-width:var(--tab-border, 1px) var(--tab-border, 1px) 0 var(--tab-border, 1px);border-inline-start-color:var(--tab-border-color);border-inline-end-color:var(--tab-border-color);border-top-color:var(--tab-border-color);padding-inline-start:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-inline-end:calc(var(--tab-padding, 1rem) - var(--tab-border, 1px));padding-bottom:var(--tab-border, 1px);padding-top:0}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked):before{z-index:1;content:\"\";display:block;position:absolute;width:calc(100% + var(--tab-radius, .5rem) * 2);height:var(--tab-radius, .5rem);bottom:0;background-size:var(--tab-radius, .5rem);background-position:top left,top right;background-repeat:no-repeat;--tab-grad: calc(69% - var(--tab-border, 1px));--radius-start: radial-gradient( circle at top left, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );--radius-end: radial-gradient( circle at top right, transparent var(--tab-grad), var(--tab-border-color) calc(var(--tab-grad) + .25px), var(--tab-border-color) calc(var(--tab-grad) + var(--tab-border, 1px)), var(--tab-bg) calc(var(--tab-grad) + var(--tab-border, 1px) + .25px) );background-image:var(--radius-start),var(--radius-end)}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,.tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-end);background-position:top right}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):first-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):first-child:before{background-image:var(--radius-start);background-position:top left}.tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,.tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-start);background-position:top left}[dir=rtl] .tabs-lifted>.tab:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):last-child:before,[dir=rtl] .tabs-lifted>.tab:is(input:checked):last-child:before{background-image:var(--radius-end);background-position:top right}.tabs-lifted>:is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled])+.tabs-lifted :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]):before,.tabs-lifted>.tab:is(input:checked)+.tabs-lifted .tab:is(input:checked):before{background-image:var(--radius-end);background-position:top right}.tabs-boxed{border-radius:var(--rounded-btn, .5rem);--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding:.25rem}.tabs-boxed .tab{border-radius:var(--rounded-btn, .5rem)}.tabs-boxed :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed :is(input:checked){--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.table:where([dir=rtl],[dir=rtl] *){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.toast>*{animation:toast-pop .25s ease-out}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}[dir=rtl] .toggle{--handleoffsetcalculator: calc(var(--handleoffset) * 1)}.toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.toggle:hover{background-color:currentColor}.toggle:checked,.toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator: var(--handleoffset);--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}[dir=rtl] .toggle:checked,[dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator: calc(var(--handleoffset) * -1)}.toggle:indeterminate{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}[dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}.toggle-primary:focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}.toggle-primary:checked,.toggle-primary[aria-checked=true]{border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.toggle:disabled{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset, var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}.badge-xs{height:.75rem;font-size:.75rem;line-height:.75rem;padding-left:.313rem;padding-right:.313rem}.badge-sm{height:1rem;font-size:.75rem;line-height:1rem;padding-left:.438rem;padding-right:.438rem}.badge-lg{height:1.5rem;font-size:1rem;line-height:1.5rem;padding-left:.688rem;padding-right:.688rem}.btm-nav-xs>*:where(.active){border-top-width:1px}.btm-nav-sm>*:where(.active){border-top-width:2px}.btm-nav-md>*:where(.active){border-top-width:2px}.btm-nav-lg>*:where(.active){border-top-width:4px}.btn-xs{height:1.5rem;min-height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem}.btn-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}[type=checkbox].checkbox-sm{height:1.25rem;width:1.25rem}.indicator :where(.indicator-item){bottom:auto;inset-inline-end:0px;inset-inline-start:auto;top:0;--tw-translate-y: -50%;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end):where([dir=rtl],[dir=rtl] *){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-bottom){bottom:0;top:auto;--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-middle){bottom:50%;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-top){bottom:auto;top:0;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.input-sm{height:2rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem;line-height:2rem}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}.kbd-xs{padding-left:.25rem;padding-right:.25rem;font-size:.75rem;line-height:1rem;min-height:1.2em;min-width:1.2em}.menu-horizontal{display:inline-flex;flex-direction:row}.menu-horizontal>li:not(.menu-title)>details>ul{position:absolute}.select-sm{height:2rem;min-height:2rem;padding-left:.75rem;padding-right:2rem;font-size:.875rem;line-height:2rem}[dir=rtl] .select-sm{padding-left:2rem;padding-right:.75rem}.steps-horizontal .step{display:grid;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));place-items:center;text-align:center}.steps-vertical .step{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr))}.tabs-md :where(.tab){height:2rem;font-size:.875rem;line-height:1.25rem;line-height:2;--tab-padding: 1rem}.tabs-lg :where(.tab){height:3rem;font-size:1.125rem;line-height:1.75rem;line-height:2;--tab-padding: 1.25rem}.tabs-sm :where(.tab){height:1.5rem;font-size:.875rem;line-height:.75rem;--tab-padding: .75rem}.tabs-xs :where(.tab){height:1.25rem;font-size:.75rem;line-height:.75rem;--tab-padding: .5rem}.textarea-sm{padding:.25rem .75rem;font-size:.875rem;line-height:2rem}:where(.toast){bottom:0;inset-inline-end:0px;inset-inline-start:auto;top:auto;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center):where([dir=rtl],[dir=rtl] *){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-bottom){bottom:0;top:auto;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-middle){bottom:auto;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-top){bottom:auto;top:0;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}[type=checkbox].toggle-sm{--handleoffset: .75rem;height:1.25rem;width:2rem}.tooltip{position:relative;display:inline-block;--tooltip-offset: calc(100% + 1px + var(--tooltip-tail, 0px))}.tooltip:before{position:absolute;pointer-events:none;z-index:1;content:var(--tw-content);--tw-content: attr(data-tip)}.tooltip:before,.tooltip-top:before{transform:translate(-50%);top:auto;left:50%;right:auto;bottom:var(--tooltip-offset)}.tooltip-right:before{transform:translateY(-50%);top:50%;left:var(--tooltip-offset);right:auto;bottom:auto}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-compact .card-title{margin-bottom:.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.card-normal .card-title{margin-bottom:.75rem}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-vertical>:where(*:not(:first-child)):is(.btn){margin-top:calc(var(--border-btn) * -1)}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.join.join-horizontal>:where(*:not(:first-child)):is(.btn){margin-inline-start:calc(var(--border-btn) * -1);margin-top:0}.menu-horizontal>li:not(.menu-title)>details>ul{margin-inline-start:0px;margin-top:1rem;padding-top:.5rem;padding-bottom:.5rem;padding-inline-end:.5rem}.menu-horizontal>li>details>ul:before{content:none}:where(.menu-horizontal>li:not(.menu-title)>details>ul){border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:0;border-top-right-radius:0}.modal-middle :where(.modal-box){width:91.666667%;max-width:32rem;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:0;border-bottom-left-radius:0}.steps-horizontal .step{grid-template-rows:40px 1fr;grid-template-columns:auto;min-width:4rem}.steps-horizontal .step:before{height:.5rem;width:100%;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));content:\"\";margin-inline-start:-100%}.steps-horizontal .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.steps-vertical .step{gap:.5rem;grid-template-columns:40px 1fr;grid-template-rows:auto;min-height:4rem;justify-items:start}.steps-vertical .step:before{height:100%;width:.5rem;--tw-translate-x: -50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));margin-inline-start:50%}.steps-vertical .step:where([dir=rtl],[dir=rtl] *):before{--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.table-xs :not(thead):not(tfoot) tr{font-size:.75rem;line-height:1rem}.table-xs :where(th,td){padding:.25rem .5rem}.table-sm :not(thead):not(tfoot) tr{font-size:.875rem;line-height:1.25rem}.table-sm :where(th,td){padding:.5rem .75rem}.tooltip{position:relative;display:inline-block;text-align:center;--tooltip-tail: .1875rem;--tooltip-color: var(--fallback-n,oklch(var(--n)/1));--tooltip-text-color: var(--fallback-nc,oklch(var(--nc)/1));--tooltip-tail-offset: calc(100% + .0625rem - var(--tooltip-tail))}.tooltip:before,.tooltip:after{opacity:0;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-delay:.1s;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.tooltip:after{position:absolute;content:\"\";border-style:solid;border-width:var(--tooltip-tail, 0);width:0;height:0;display:block}.tooltip:before{max-width:20rem;white-space:normal;border-radius:.25rem;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem;background-color:var(--tooltip-color);color:var(--tooltip-text-color);width:-moz-max-content;width:max-content}.tooltip.tooltip-open:before{opacity:1;transition-delay:75ms}.tooltip.tooltip-open:after{opacity:1;transition-delay:75ms}.tooltip:hover:before{opacity:1;transition-delay:75ms}.tooltip:hover:after{opacity:1;transition-delay:75ms}.tooltip:has(:focus-visible):after,.tooltip:has(:focus-visible):before{opacity:1;transition-delay:75ms}.tooltip:not([data-tip]):hover:before,.tooltip:not([data-tip]):hover:after{visibility:hidden;opacity:0}.tooltip:after,.tooltip-top:after{transform:translate(-50%);border-color:var(--tooltip-color) transparent transparent transparent;top:auto;left:50%;right:auto;bottom:var(--tooltip-tail-offset)}.tooltip-right:after{transform:translateY(-50%);border-color:transparent var(--tooltip-color) transparent transparent;top:50%;left:calc(var(--tooltip-tail-offset) + .0625rem);right:auto;bottom:auto}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-24{top:6rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mt-0\\.5{margin-top:-.125rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-6{margin-left:1.5rem}.ml-8{margin-left:2rem}.mr-1{margin-right:.25rem}.mr-32{margin-right:8rem}.mt-0\\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-12{height:3rem}.h-16{height:4rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-96{height:24rem}.h-\\[90vh\\]{height:90vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-60{max-height:15rem}.max-h-96{max-height:24rem}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[70vh\\]{max-height:70vh}.min-h-0{min-height:0px}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-11\\/12{width:91.666667%}.w-12{width:3rem}.w-16{width:4rem}.w-2\\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.w-px{width:1px}.min-w-\\[200px\\]{min-width:200px}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-md{max-width:28rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-\\[2\\]{flex:2}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-box{border-radius:var(--rounded-box, 1rem)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-base-300{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity, 1)))}.border-base-content\\/20{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.border-error\\/20{border-color:var(--fallback-er,oklch(var(--er)/.2))}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity, 1)))}.bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.bg-base-300\\/30{background-color:var(--fallback-b3,oklch(var(--b3)/.3))}.bg-base-content{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity, 1)))}.bg-base-content\\/30{background-color:var(--fallback-bc,oklch(var(--bc)/.3))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-error{--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity, 1)))}.bg-error\\/10{background-color:var(--fallback-er,oklch(var(--er)/.1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity, 1)))}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(168 85 247 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-success{--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity, 1)))}.bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-bg-opacity, 1)))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.stroke-current{stroke:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-64{padding-left:16rem;padding-right:16rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-32{padding-bottom:8rem}.pl-4{padding-left:1rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity, 1)))}.text-base-content\\/60{color:var(--fallback-bc,oklch(var(--bc)/.6))}.text-base-content\\/70{color:var(--fallback-bc,oklch(var(--bc)/.7))}.text-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity, 1)))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity, 1)))}.text-primary-content{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity, 1)))}.text-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity, 1)))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.hover\\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity, 1)))}.hover\\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity, 1)))}.hover\\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group:hover .group-hover\\:opacity-90{opacity:.9}@media (min-width: 768px){.md\\:col-span-3{grid-column:span 3 / span 3}.md\\:inline{display:inline}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:col-span-2{grid-column:span 2 / span 2}.lg\\:col-span-6{grid-column:span 6 / span 6}.lg\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media (min-width: 1280px){.xl\\:flex{display:flex}.xl\\:hidden{display:none}.xl\\:max-w-md{max-width:28rem}}@media (prefers-color-scheme: dark){.dark\\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\\:text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\\:hover\\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}}.card.svelte-1qok2wg{backdrop-filter:blur(10px)}.active.svelte-1fgps4v{background-color:hsl(var(--p) / .2)}\n",
21256
21265
  "en-D_EcykrR.js": 'const e={error:"Error",loading:"Loading...",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",confirm:"Confirm",reset:"Reset",refresh:"Refresh",search:"Search",filter:"Filter",export:"Export",import:"Import",close:"Close",show:"Show",hide:"Hide",copy:"Copy",copied:"Copied"},t={dashboard:"Dashboard",home:"Home",routes:"Routes",logs:"Request Logs",configuration:"Configuration"},r={home:"Home",routes:"Route Management",newRoute:"New Route",editRoute:"Edit Route"},a={title:"Dashboard",dataRange:"Data Time Range",totalRequests:"Total Requests",requestsPerSec:"Requests/sec",requestsPerSecond:"Requests/sec",successRate:"Success Rate",avgResponseTime:"Avg Response Time",upstreamAnalysis:"Upstream Analysis",upstreamDistribution:"Upstream Request Distribution",upstreamFailures:"Upstream Failure Statistics",upstreamStatusCodes:"Upstream Status Code Distribution",noUpstreamData:"No upstream data available for the selected time range",noData:"No data available"},o={title:"Monitoring Charts",range:{"1h":"1 Hour","12h":"12 Hours","24h":"24 Hours",oneHour:"1 Hour",twelveHours:"12 Hours",twentyFourHours:"24 Hours"},charts:{requestsTrend:"Requests Trend",periodRequests:"Period Requests",requests:"Requests",responseTimeTrend:"Response Time Trend",avgResponseTime:"Avg Response Time (ms)",milliseconds:"Milliseconds (ms)",successRateTrend:"Success Rate Trend",successRate:"Success Rate (%)",percentage:"Percentage (%)",errorsTrend:"Errors Trend",periodErrors:"Period Errors",errors:"Errors"},noData:"No historical data available"},s={title:"Routes",subtitle:"Manage your reverse proxy routes and upstreams",addRoute:"Add Route",newRoute:"+ New Route",createFirstRoute:"Create First Route",editRoute:"Edit Route",deleteRoute:"Delete Route",export:"Export",import:"Import",path:"Path",upstreams:"Upstreams",actions:"Actions",searchPlaceholder:"Search routes or upstreams...",allTransformers:"All Transformers",noRoutes:"No routes configured",noRoutesMessage:"Create your first route to start proxying requests",noMatchingRoutes:"No matching routes",noMatchingMessage:"Try adjusting your search or filter criteria",showingRoutes:"Showing {count} of {total} route(s)",confirmDelete:"Confirm Delete Route",confirmDeleteMessage:\'Are you sure you want to delete route "{path}"? This action cannot be undone.\',deleted:\'Route "{path}" has been deleted\',deleteFailed:"Delete failed: {error}",duplicated:\'Route "{path}" has been duplicated\',duplicateFailed:"Duplicate failed: {error}",noRoutesToExport:"No routes to export",exported:"Routes exported",importMustBeArray:"Import file must be an array of routes",importSuccess:"Successfully imported {success} route(s)",importPartialSuccess:"Successfully imported {success} route(s), failed {failed}",importFailed:"Import failed: {error}",filterStatus:{all:"All Status",healthy:"Healthy Only",unhealthy:"Has Issues"}},i={title:"Configuration",subtitle:"Edit and manage system configuration",export:"Export",import:"Import",reload:"Reload",restart:"Restart Service",formEditor:"Form Editor",jsonEditor:"JSON Editor",systemSettings:"System Settings",serverPort:"Server Port",workerProcesses:"Worker Processes",workerProcessesHelp:"Number of worker processes to spawn",logLevel:"Log Level",bodyParserLimit:"Body Parser Limit",bodyParserLimitHelp:\'Maximum request body size (e.g., "50mb", "100kb")\',requiresRestart:"Note: Changes to Port, Workers, Log Level, and Body Parser Limit require a service restart to take effect.",routesConfigured:"{count} routes configured.",manageRoutes:"Use the Routes page to manage routes.",jsonConfiguration:"JSON Configuration",jsonParseError:"JSON Parse Error: {error}",jsonPlaceholder:"Enter JSON configuration...",jsonHelp:"Edit the raw JSON configuration. Changes will be validated before saving.",unsavedChanges:"You have unsaved changes",reset:"Reset",save:"Save Configuration",confirmRestart:"Confirm Service Restart",restartMessage:"Are you sure you want to restart the service? This will cause a brief interruption (typically 2-3 seconds) as the service gracefully restarts.",restartWarning:"Active connections may be temporarily interrupted.",validationFailed:"Configuration validation failed: {error}",saved:"Configuration saved",saveFailed:"Save failed: {error}",exported:"Configuration exported",imported:"Configuration imported",importFailed:"Import failed: {error}",reloaded:"Configuration successfully reloaded",reloadFailed:"Reload failed: {error}",restartSent:"Restart signal sent, service will restart in a few seconds",restartDaemonOnly:\'Restart feature is only available in daemon mode. Please use "bungee restart" command or manually restart the development server.\',restartFailed:"Restart failed: {error}"},l={title:"404",message:"Page Not Found",goHome:"Go Home"},n={newRoute:"New Route",editRoute:"Edit Route",backToList:"Back to List",routePath:"Route Path",pathPlaceholder:"e.g.: /api/*",pathHelp:"Supports wildcards (*) and parameters (:param)",pathHelpLong:"Paths support wildcards (*) to match any characters and parameter placeholders (:param) to capture path segments",pathRewrite:"Path Rewrite",pathRewriteHelp:"Regex patterns to modify request paths",pathRewriteTooltip:"Path rewrite allows using regex patterns to match and replace request paths. Example: ^/api/v1 \u2192 /api/v2 will rewrite all paths starting with /api/v1 to /api/v2",addPathRewriteRule:"Add Path Rewrite Rule",patternPlaceholder:"Match regex pattern (e.g. ^/test)",replacementPlaceholder:"Rewrite path (e.g. /v1)",confirmDeleteRule:"Are you sure you want to delete this rule?",upstreamCountTooltip:"Configured {count} upstream server(s)",upstreams:"Upstreams",addUpstream:"Add Upstream",transformer:"Route Transformer",transformerHelp:"Transformer applied to the entire route (optional)",noPluginsAvailable:"No route transformer plugins available",optional:"Optional",failoverTitle:"Failover",failoverHelp:"Configure automatic failover and health check mechanisms",enableFailover:"Enable automatic failover",retryableStatusCodes:"Retryable Status Codes",retryableStatusCodesPlaceholder:"Default: 500, 502, 503, 504 (Server Errors)",retryableStatusCodesHelp:"Automatically retry other upstreams when these status codes occur",passiveHealthCheck:"Passive Health Check",passiveHealthCheckTooltip:"Monitors actual request success/failure to determine upstream health, no extra probe requests",consecutiveFailuresThreshold:"Consecutive Failures Threshold",consecutiveFailuresThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthyThreshold:"Healthy Threshold",healthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",requestTimeoutMs:"Request Timeout (ms)",requestTimeoutMsHelp:"Timeout for normal requests (default: 30000ms)",connectTimeoutMs:"Connect Timeout (ms)",connectTimeoutMsHelp:"Timeout for establishing connection (default: 5000ms)",activeHealthCheck:"Active Health Check",activeHealthCheckTooltip:"Periodically sends probe requests to actively detect upstream health, independent of business traffic",enableActiveHealthCheck:"Enable active health check",healthCheckIntervalMs:"Check Interval (ms)",healthCheckIntervalMsHelp:"How often to perform health checks (default: 10000ms)",healthCheckTimeoutMs:"Check Timeout (ms)",healthCheckTimeoutMsHelp:"Timeout for health check requests (default: 3000ms)",healthCheckPath:"Check Path",healthCheckPathHelp:"HTTP path for health checks (default: /health)",healthCheckMethod:"HTTP Method",healthCheckExpectedStatus:"Expected Status Codes",healthCheckExpectedStatusHelp:"Expected status codes for health checks (default: 200)",healthCheckUnhealthyThreshold:"Unhealthy Threshold",healthCheckUnhealthyThresholdHelp:"Mark as unhealthy after this many consecutive failures (default: 3)",healthCheckHealthyThreshold:"Healthy Threshold",healthCheckHealthyThresholdHelp:"Recover to healthy after this many consecutive successes (default: 2)",slowStart:"Slow Start",slowStartTooltip:"Gradually increases traffic to recovered upstreams to prevent immediate overload and re-failure",enableSlowStart:"Enable slow start mechanism",slowStartDurationMs:"Slow Start Duration (ms)",slowStartDurationMsHelp:"Duration to gradually increase weight after recovery (default: 30000ms)",slowStartInitialWeightFactor:"Initial Weight Factor",slowStartInitialWeightFactorHelp:"Initial weight ratio after recovery, 0.1 means 10% (default: 0.1)",failoverInfoNotice:"Failover automatically detects upstream health status and switches to backup upstreams on failure to ensure service availability.",recoveryIntervalMs:"Recovery Interval (ms)",recoveryIntervalPlaceholder:"5000",recoveryIntervalHelp:"Wait time before attempting to recover a failed upstream",recoveryTimeoutMs:"Recovery Timeout (ms)",recoveryTimeoutPlaceholder:"3000",recoveryTimeoutHelp:"Timeout for recovery attempts to avoid long pending requests",saveRoute:"Save Route",cancel:"Cancel",saving:"Saving...",loadingTemplates:"Loading templates...",useTemplate:"Use Template",routeSaved:"Route saved",routeUpdated:"Route updated",saveFailed:"Save failed: {error}",pathRequired:"Route path cannot be empty",upstreamRequired:"At least one upstream is required"},u={upstreams:"{count} upstream(s)",hasTransformer:"With transformer",failover:"Failover",edit:"Edit",duplicate:"Duplicate",delete:"Delete",duplicating:"Duplicating...",deleting:"Deleting...",viewAll:"View all {count}",moreActions:"More Actions",tableHeaders:{status:"Status",target:"Target",weight:"Weight",priority:"Priority"},pathRewrite:{original:"Original",rewriteTo:"Rewrite to"}},d={title:"Upstream Servers",close:"Close",statusHealthy:"Healthy",statusUnhealthy:"Unhealthy",statusUnknown:"Unknown"},c={title:"Upstream #{index}",priority:"Priority",target:"Target",targetUrl:"Target URL",targetPlaceholder:"https://api.example.com",targetHelp:"Full URL of the upstream server",weight:"Weight",weightHelp:"Load balancing weight (1-100)",transformer:"Upstream Transformer",transformerHelp:"Transformer applied only to this upstream (optional)",remove:"Remove Upstream",targetRequired:"Target URL cannot be empty",invalidUrl:"Invalid URL format"},p={selectPlugin:"Select Plugin",none:"No Plugin",description:"Plugin Description",testPlugin:"Test Plugin",testing:"Testing...",input:"Input (Original Format)",output:"Output (Transformed Format)",inputPlaceholder:"Enter test data...",testSuccess:"Transform successful",testFailed:"Transform failed: {error}"},h={title:"Request Headers",add:"Add",addHeader:"Add Header",name:"Name",namePlaceholder:"Content-Type",value:"Value",valuePlaceholder:"application/json",remove:"Remove",replace:"Replace",default:"Default",empty:"No headers"},m={title:"Request Body",bodyType:"Body Type",json:"JSON",text:"Plain Text",form:"Form Data",none:"No Body",placeholder:"Enter request body content...",jsonInvalid:"Invalid JSON format",add:"Add",remove:"Remove",replace:"Replace",default:"Default",empty:"No fields"},g={title:"Query Parameters",name:"Name",namePlaceholder:"param_name",value:"Value",valuePlaceholder:"param_value",add:"Add",remove:"Remove",replace:"Replace",default:"Default",empty:"No parameters"},y={title:"Conditional Expression",placeholder:"request.headers[\'User-Agent\'].includes(\'Mobile\')",help:"Use JavaScript expressions that return true or false",examples:"Examples",example1:"Check request headers",example2:"Check query parameters",example3:"Check request method",test:"Test Expression",testResult:"Test Result",resultTrue:"Condition is true",resultFalse:"Condition is false",resultError:"Expression error: {error}"},f={title:"Route Templates",subtitle:"Quickly create common route configurations",useTemplate:"Use This Template",categories:{api:"API Proxy",static:"Static Resources",websocket:"WebSocket",auth:"Auth Proxy"},restApi:{name:"REST API Proxy",description:"Standard RESTful API proxy configuration"},graphql:{name:"GraphQL API",description:"GraphQL endpoint proxy"},static:{name:"Static File Server",description:"Proxy static resource files"},websocket:{name:"WebSocket Proxy",description:"Real-time communication WebSocket proxy"},loadBalancing:{name:"Load Balancing",description:"Multi-upstream load balancing configuration"}},v={yes:"Yes",no:"No",cancelTitle:"Confirm Cancel",cancelMessage:"Are you sure you want to cancel and go back? Any unsaved changes will be lost.",restoreDraftTitle:"Restore Draft",restoreDraftMessage:"An unsaved draft was detected. Would you like to restore it?"},R={targetRequired:"Target URL cannot be empty",targetProtocol:"Target URL must use http or https protocol",invalidUrl:"Invalid URL format",weightPositive:"Weight must be positive",priorityNonNegative:"Priority must be non-negative",totalWeightPositive:"Total weight must be greater than 0",unknownTransformer:"Unknown transformer: {transformer}. Available options: {options}",pathRequired:"Path cannot be empty",pathStartSlash:"Path must start with /",upstreamRequired:"At least one upstream is required",invalidRegex:"Invalid regular expression: {pattern}",invalidStatusCode:"Invalid status code: {code}",recoveryIntervalPositive:"Recovery interval must be greater than 0",recoveryTimeoutPositive:"Recovery timeout must be greater than 0",expressionEmpty:"Expression cannot be empty",mismatchedBraces:"Mismatched {{ }} braces",mismatchedParentheses:"Mismatched parentheses",mismatchedQuotes:"Mismatched quotes"},T={globalAuth:"Global Authentication",routeAuth:"Route Authentication",helpText:"Protect your API endpoints",enableAuth:"Enable Authentication",enabled:"Enabled",disabled:"Disabled",tokens:"Token List",tokenPlaceholder:"Enter token or use {{ env.TOKEN_NAME }}",addToken:"Add Token",expressionSupport:"Expression syntax is supported for referencing environment variables:",securityNotice:"When authentication is enabled, the Authorization header is automatically removed and will not be forwarded to upstream servers (security measure).",routeAuthHelp:"Route-level authentication will override global authentication configuration. If not configured, the global authentication settings will be used."},b={title:"Request Logs",filters:"Filters",autoRefresh:"Auto Refresh",refreshInterval:"Refresh Interval",refreshEvery5s:"Every 5s",refreshEvery10s:"Every 10s",refreshEvery30s:"Every 30s",refreshEvery60s:"Every 60s",lastRefreshed:"Last refreshed",newDataAvailable:"New data available, click refresh to view",searchTerm:"Search",searchPlaceholder:"Search path or error message...",method:"HTTP Method",allMethods:"All Methods",status:"Status Code",statusPlaceholder:"e.g., 200, 404, 500",result:"Result",allResults:"All",success:"Success",failed:"Failed",timeRange:"Time Range",allTime:"All Time",recentTime:"Recent Time",customTime:"Custom Range",recentHours:"Recent Hours",startTime:"Start Time",endTime:"End Time",sortBy:"Sort By",sortByTimestamp:"Timestamp",sortByDuration:"Duration",sortByStatus:"Status Code",sortOrder:"Order",asc:"Ascending",desc:"Descending",time:"Time",path:"Path",duration:"Duration",requestType:"Type",requestTypeFilter:"Request Type",requestType_all:"All Types",requestType_final:"Final",requestType_retry:"Retry",requestType_recovery:"Recovery",requestType_final_desc:"Request returned to client",requestType_retry_desc:"Retry attempt",requestType_recovery_desc:"Failover recovery test",upstream:"Upstream",actions:"Actions",viewDetail:"Details",export:"Export",startStream:"Start Stream",stopStream:"Stop Stream",showing:"Showing {start}-{end} of {total}",page:"Page {page} of {totalPages}",noData:"No log data available",advancedFilters:"Advanced Filters",activeFilters:"active filter(s)",clearFilters:"Clear All",moreFilters:"More Filters",detail:{title:"Request Log Details",requestId:"Request ID",timestamp:"Timestamp",method:"Method",status:"Status",duration:"Duration",success:"Success",requestInfo:"Request Information",path:"Path",originalPath:"Original Path",transformedPath:"Transformed Path",query:"Query String",routePath:"Matched Route",upstreamInfo:"Upstream Information",upstream:"Upstream",transformer:"Transformer",authInfo:"Authentication Information",authLevel:"Auth Level",authResult:"Result",authSuccess:"Authenticated",authFailed:"Failed",processingSteps:"Processing Steps",errorInfo:"Error Information",requestBody:"Request Body",responseBody:"Response Body",loadRequestBody:"Load Request Body",loadResponseBody:"Load Response Body",bodyNotRecorded:"Body not recorded for this request",bodyNotRecordedReason:"May have exceeded size limit or was empty",originalRequest:"Original Request (Before Transform)",finalRequest:"Final Request (To Upstream)",responseData:"Response Data (From Upstream)",originalHeaders:"Original Headers",finalHeaders:"Final Headers",requestHeaders:"Request Headers",responseHeaders:"Response Headers",bodyPreview:"Body Preview",bodyTooLarge:"Body too large ({size})",clickToExpand:"Click to expand",headers:"headers",noHeaders:"No headers available",noBody:"No body data",overview:"Overview",routeAndUpstream:"Route & Upstream",processingTimeline:"Processing Timeline",totalSteps:"{count} steps",totalDuration:"took {duration}",showTimeline:"Show Timeline",hideTimeline:"Hide Timeline",copyToClipboard:"Copy",downloadJson:"Download JSON",copied:"Copied!",tabOriginalRequest:"Original",tabFinalRequest:"Transformed",tabResponse:"Response",requestData:"Request Data",noDataAvailable:"No data available",step:"Step"},steps:{route_matched:"Route Matched",request_snapshot_created:"Request Snapshot Created",auth_failed:"Authentication Failed",auth_success:"Authentication Success",upstream_selected:"Upstream Selected",trying_upstream:"Trying Upstream",circuit_breaker_closed:"Circuit Breaker Closed",circuit_breaker_opened:"Circuit Breaker Opened",circuit_breaker_reopened:"Circuit Breaker Reopened",upstream_recovered:"Upstream Recovered",upstream_retry:"Upstream Retry",upstream_failed:"Upstream Failed",plugin_request_init:"Plugin Request Init",plugin_before_request:"Plugin Before Request",plugin_intercepted:"Plugin Intercepted Request",plugin_response:"Plugin Response",plugin_error:"Plugin Error"}},S={title:"Logging Configuration",bodyRecording:"Enable Request/Response Body Recording",bodyRecordingHelp:"Record request and response bodies for troubleshooting and analysis",maxSize:"Maximum Body Size",maxSizeHelp:"Bodies larger than this will be skipped (1-100 KB)",retentionDays:"Body Retention Days",retentionDaysHelp:"Bodies will be automatically deleted after this many days",days:"days",hours:"hours",cleanupConfig:"Cleanup Configuration",cleanupStatus:"Status",active:"Active",inactive:"Inactive",cleanupRetention:"Retention",cleanupInterval:"Cleanup Interval",manualCleanup:"Manual Cleanup",confirmCleanup:"Are you sure you want to manually trigger log cleanup? This will delete all logs and bodies older than the configured retention period.",cleanupSuccess:"Cleanup completed successfully",cleanupFailed:"Cleanup failed: {error}",lastCleanup:"Last Cleanup Results",deletedSqliteRecords:"Deleted SQLite records",deletedFileLogFiles:"Deleted log files",deletedBodyFiles:"Deleted body files",dirs:"directories",files:"files",duration:"Duration"},P={title:"Login",subtitle:"Enter your access token to continue",token:"Access Token",tokenPlaceholder:"Enter your access token...",submit:"Login",loggingIn:"Logging in...",success:"Login successful",failed:"Login failed: {error}",required:"Access token is required",unauthorized:"Invalid access token",logout:"Logout",logoutConfirm:"Are you sure you want to logout?"},w={common:e,nav:t,breadcrumb:r,dashboard:a,monitoring:o,routes:s,configuration:i,notFound:l,routeEditor:n,routeCard:u,upstreamsModal:d,upstream:c,plugin:p,headers:h,body:m,query:g,expression:y,templates:f,confirmDialog:v,validation:R,auth:T,logs:b,logging:S,login:P};export{T as auth,m as body,r as breadcrumb,e as common,i as configuration,v as confirmDialog,a as dashboard,w as default,y as expression,h as headers,S as logging,P as login,b as logs,o as monitoring,t as nav,l as notFound,p as plugin,g as query,u as routeCard,n as routeEditor,s as routes,f as templates,c as upstream,d as upstreamsModal,R as validation};\n',
21257
- "vendor-svelte-DJA7stl0.css": `.card.svelte-1qok2wg{backdrop-filter:blur(10px)}.active.svelte-1fgps4v{background-color:hsl(var(--p) / .2)}
21258
- `,
21259
- "index-CoOjxcQP.js": `import{A as n}from"./vendor-svelte-CMCOGsuu.js";import"./vendor-7HrnnMjF.js";import"./vendor-charts-o8j72P7f.js";import"./vendor-lodash-CRdCilnf.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const o of t.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=s(e);fetch(e.href,t)}})();new n({target:document.getElementById("app")});
21260
- `,
21261
- "vendor-charts-o8j72P7f.js": `import{o as Ts,l as xn,a as Rs,b as yn,c as vn,S as Se,i as we,s as Ce,d as Q,n as Re,e as Mn,f as kn,g as Sn,h as wn,j as Cn,k as ft,m as Ct,p as Je,q as Qe,t as Ze,r as $e,u as ti,v as ei,w as ii,x as si,y as ni}from"./vendor-svelte-CMCOGsuu.js";import{C as Ls}from"./vendor-7HrnnMjF.js";/*!
21266
+ "vendor-charts-Bo4qyjB7.js": `import{C as ds}from"./vendor-C5kRSwys.js";/*!
21262
21267
  * Chart.js v4.5.0
21263
21268
  * https://www.chartjs.org
21264
21269
  * (c) 2025 Chart.js Contributors
21265
21270
  * Released under the MIT License
21266
- */function rt(){}const Pn=(()=>{let i=0;return()=>i++})();function T(i){return i==null}function H(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function Z(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function it(i,t){return Z(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const Dn=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,Is=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function E(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function R(i,t,e,s){let n,o,r;if(H(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(A(i))for(r=Object.keys(i),o=r.length,n=0;n<o;n++)t.call(e,i[r[n]],r[n])}function be(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function _e(i){if(H(i))return i.map(_e);if(A(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=_e(i[e[n]]);return t}return i}function Es(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function On(i,t,e,s){if(!Es(i))return;const n=t[i],o=e[i];A(n)&&A(o)?Gt(n,o,s):t[i]=_e(o)}function Gt(i,t,e){const s=H(t)?t:[t],n=s.length;if(!A(i))return i;e=e||{};const o=e.merger||On;let r;for(let a=0;a<n;++a){if(r=s[a],!A(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function Ut(i,t){return Gt(i,t,{merger:An})}function An(i,t,e){if(!Es(i))return;const s=t[i],n=e[i];A(s)&&A(n)?Ut(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=_e(n))}const yi={"":i=>i,x:i=>i.x,y:i=>i.y};function Tn(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function Rn(i){const t=Tn(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function St(i,t){return(yi[t]||(yi[t]=Rn(t)))(i)}function oi(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Jt=i=>typeof i<"u",gt=i=>typeof i=="function",vi=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function Ln(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const L=Math.PI,F=2*L,In=F+L,xe=Number.POSITIVE_INFINITY,En=L/180,N=L/2,bt=L/4,Mi=L*2/3,zs=Math.log10,ot=Math.sign;function Xt(i,t,e){return Math.abs(i-t)<e}function ki(i){const t=Math.round(i);i=Xt(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(zs(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function zn(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function Fn(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Qt(i){return!Fn(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function Bn(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function Wn(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ct(i){return i*(L/180)}function Hn(i){return i*(180/L)}function Si(i){if(!Z(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function Fs(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*L&&(o+=F),{angle:o,distance:n}}function Ye(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function Nn(i,t){return(i-t+In)%F-L}function et(i){return(i%F+F)%F}function Zt(i,t,e,s){const n=et(i),o=et(t),r=et(e),a=et(o-n),l=et(r-n),c=et(n-o),h=et(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function U(i,t,e){return Math.max(t,Math.min(e,i))}function Vn(i){return U(i,-32768,32767)}function dt(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function ri(i,t,e){e=e||(r=>i[r]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const Mt=(i,t,e,s)=>ri(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),jn=(i,t,e)=>ri(i,e,s=>i[s][t]>=e);function Yn(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const Bs=["push","pop","shift","splice","unshift"];function Un(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Bs.forEach(e=>{const s="_onData"+oi(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function wi(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(Bs.forEach(o=>{delete i[o]}),delete i._chartjs)}function Ws(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const Hs=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function Ns(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,Hs.call(window,()=>{s=!1,i.apply(t,e)}))}}function Xn(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const ai=i=>i==="start"?"left":i==="end"?"right":"center",Y=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,Kn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function qn(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=r.axis,{min:d,max:u,minDefined:f,maxDefined:p}=r.getUserBounds();if(f){if(n=Math.min(Mt(l,h,d).lo,e?s:Mt(t,h,r.getPixelForValue(d)).lo),c){const g=l.slice(0,n+1).reverse().findIndex(m=>!T(m[a.axis]));n-=Math.max(0,g)}n=U(n,0,s-1)}if(p){let g=Math.max(Mt(l,r.axis,u,!0).hi+1,e?0:Mt(t,h,r.getPixelForValue(u),!0).hi+1);if(c){const m=l.slice(g-1).findIndex(b=>!T(b[a.axis]));g+=Math.max(0,m)}o=U(g,n,s)-n}else o=s-n}return{start:n,count:o}}function Gn(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const ne=i=>i===0||i===1,Ci=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),Pi=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,Kt={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*N)+1,easeOutSine:i=>Math.sin(i*N),easeInOutSine:i=>-.5*(Math.cos(L*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>ne(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>ne(i)?i:Ci(i,.075,.3),easeOutElastic:i=>ne(i)?i:Pi(i,.075,.3),easeInOutElastic(i){return ne(i)?i:i<.5?.5*Ci(i*2,.1125,.45):.5+.5*Pi(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-Kt.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?Kt.easeInBounce(i*2)*.5:Kt.easeOutBounce(i*2-1)*.5+.5};function li(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function Di(i){return li(i)?i:new Ls(i)}function Le(i){return li(i)?i:new Ls(i).saturate(.5).darken(.1).hexString()}const Jn=["x","y","borderWidth","radius","tension"],Qn=["color","borderColor","backgroundColor"];function Zn(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:Qn},numbers:{type:"number",properties:Jn}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function $n(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Oi=new Map;function to(i,t){t=t||{};const e=i+JSON.stringify(t);let s=Oi.get(e);return s||(s=new Intl.NumberFormat(i,t),Oi.set(e,s)),s}function ci(i,t,e){return to(t,e).format(i)}const eo={values(i){return H(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=io(i,e)}const r=zs(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),ci(i,s,l)}};function io(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var Vs={formatters:eo};function so(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Vs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const wt=Object.create(null),Ue=Object.create(null);function qt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function Ie(i,t,e){return typeof t=="string"?Gt(qt(i,t),e):Gt(qt(i,""),t)}class no{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Le(n.backgroundColor),this.hoverBorderColor=(s,n)=>Le(n.borderColor),this.hoverColor=(s,n)=>Le(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Ie(this,t,e)}get(t){return qt(this,t)}describe(t,e){return Ie(Ue,t,e)}override(t,e){return Ie(wt,t,e)}route(t,e,s,n){const o=qt(this,t),r=qt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return A(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var W=new no({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Zn,$n,so]);function oo(i){return!i||T(i.size)||T(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function Ai(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function _t(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function Ti(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Xe(i,t,e,s){js(i,t,e,s,null)}function js(i,t,e,s,n){let o,r,a,l,c,h,d,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*En;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:n?i.ellipse(e,s,n/2,g,0,0,F):i.arc(e,s,g,0,F),i.closePath();break;case"triangle":h=n?n/2:g,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Mi,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=Mi,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+bt)*l,d=Math.cos(m+bt)*(n?n/2-c:l),a=Math.sin(m+bt)*l,u=Math.sin(m+bt)*(n?n/2-c:l),i.arc(e-d,s-a,c,m-L,m-N),i.arc(e+u,s-r,c,m-N,m),i.arc(e+d,s+a,c,m,m+N),i.arc(e-u,s+r,c,m+N,m+L),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=bt;case"rectRot":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+u,s-r),i.lineTo(e+d,s+a),i.lineTo(e-u,s+r),i.closePath();break;case"crossRot":m+=bt;case"cross":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"star":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r),m+=bt,d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"line":r=n?n/2:Math.cos(m)*g,a=Math.sin(m)*g,i.moveTo(e-r,s-a),i.lineTo(e+r,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function $t(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function hi(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function di(i){i.restore()}function ro(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function ao(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function lo(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),T(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function co(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function ho(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function te(i,t,e,s,n,o={}){const r=H(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,lo(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&ho(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),T(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),co(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function ye(i,t){const{x:e,y:s,w:n,h:o,radius:r}=t;i.arc(e+r.topLeft,s+r.topLeft,r.topLeft,1.5*L,L,!0),i.lineTo(e,s+o-r.bottomLeft),i.arc(e+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,L,N,!0),i.lineTo(e+n-r.bottomRight,s+o),i.arc(e+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,N,0,!0),i.lineTo(e+n,s+r.topRight),i.arc(e+n-r.topRight,s+r.topRight,r.topRight,0,-N,!0),i.lineTo(e+r.topLeft,s)}const uo=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,fo=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function go(i,t){const e=(""+i).match(uo);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const po=i=>+i||0;function ui(i,t){const e={},s=A(t),n=s?Object.keys(t):t,o=A(i)?s?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=po(o(r));return e}function Ys(i){return ui(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Tt(i){return ui(i,["topLeft","topRight","bottomLeft","bottomRight"])}function $(i){const t=Ys(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function X(i,t){i=i||{},t=t||W.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=P(i.style,t.style);s&&!(""+s).match(fo)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:P(i.family,t.family),lineHeight:go(P(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:P(i.weight,t.weight),string:""};return n.string=oo(n),n}function oe(i,t,e,s){let n,o,r;for(n=0,o=i.length;n<o;++n)if(r=i[n],r!==void 0&&r!==void 0)return r}function mo(i,t,e){const{min:s,max:n}=i,o=Is(t,(n-s)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function Pt(i,t){return Object.assign(Object.create(i),t)}function fi(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=qs("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>fi([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Xs(a,l,()=>So(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return Li(a).includes(l)},ownKeys(a){return Li(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function Lt(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:Us(i,s),setContext:o=>Lt(i,o,e,s),override:o=>Lt(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Xs(o,r,()=>_o(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function Us(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:gt(e)?e:()=>e,isIndexable:gt(s)?s:()=>s}}const bo=(i,t)=>i?i+oi(t):t,gi=(i,t)=>A(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Xs(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function _o(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return gt(a)&&r.isScriptable(t)&&(a=xo(t,a,i,e)),H(a)&&a.length&&(a=yo(t,a,i,r.isIndexable)),gi(t,a)&&(a=Lt(a,n,o&&o[t],r)),a}function xo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),gi(i,l)&&(l=pi(n._scopes,n,i,l)),l}function yo(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(A(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=pi(c,n,i,h);t.push(Lt(d,o,r&&r[i],a))}}return t}function Ks(i,t,e){return gt(i)?i(t,e):i}const vo=(i,t)=>i===!0?t:typeof i=="string"?St(t,i):void 0;function Mo(i,t,e,s,n){for(const o of t){const r=vo(e,o);if(r){i.add(r);const a=Ks(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function pi(i,t,e,s){const n=t._rootScopes,o=Ks(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=Ri(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=Ri(a,r,o,l,s),l===null)?!1:fi(Array.from(a),[""],n,o,()=>ko(t,e,s))}function Ri(i,t,e,s,n){for(;e;)e=Mo(i,t,e,s,n);return e}function ko(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return H(n)&&A(e)?e:n||{}}function So(i,t,e,s){let n;for(const o of t)if(n=qs(bo(o,i),e),typeof n<"u")return gi(i,n)?pi(e,s,i,n):n}function qs(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function Li(i){let t=i._keys;return t||(t=i._keys=wo(i._scopes)),t}function wo(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const Co=Number.EPSILON||1e-14,It=(i,t)=>t<i.length&&!i[t].skip&&i[t],Gs=i=>i==="x"?"y":"x";function Po(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Ye(o,n),l=Ye(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function Do(i,t,e){const s=i.length;let n,o,r,a,l,c=It(i,0);for(let h=0;h<s-1;++h)if(l=c,c=It(i,h+1),!(!l||!c)){if(Xt(t[h],0,Co)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],a=Math.pow(n,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[h]=n*r*t[h],e[h+1]=o*r*t[h])}}function Oo(i,t,e="x"){const s=Gs(e),n=i.length;let o,r,a,l=It(i,0);for(let c=0;c<n;++c){if(r=a,a=l,l=It(i,c+1),!a)continue;const h=a[e],d=a[s];r&&(o=(h-r[e])/3,a[\`cp1\${e}\`]=h-o,a[\`cp1\${s}\`]=d-o*t[c]),l&&(o=(l[e]-h)/3,a[\`cp2\${e}\`]=h+o,a[\`cp2\${s}\`]=d+o*t[c])}}function Ao(i,t="x"){const e=Gs(t),s=i.length,n=Array(s).fill(0),o=Array(s);let r,a,l,c=It(i,0);for(r=0;r<s;++r)if(a=l,l=c,c=It(i,r+1),!!l){if(c){const h=c[t]-l[t];n[r]=h!==0?(c[e]-l[e])/h:0}o[r]=a?c?ot(n[r-1])!==ot(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}Do(i,n,o),Oo(i,o,t)}function re(i,t,e){return Math.max(Math.min(i,e),t)}function To(i,t){let e,s,n,o,r,a=$t(i[0],t);for(e=0,s=i.length;e<s;++e)r=o,o=a,a=e<s-1&&$t(i[e+1],t),o&&(n=i[e],r&&(n.cp1x=re(n.cp1x,t.left,t.right),n.cp1y=re(n.cp1y,t.top,t.bottom)),a&&(n.cp2x=re(n.cp2x,t.left,t.right),n.cp2y=re(n.cp2y,t.top,t.bottom)))}function Ro(i,t,e,s,n){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Ao(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=Po(c,a,i[Math.min(o+1,r-(s?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&To(i,e)}function mi(){return typeof window<"u"&&typeof document<"u"}function bi(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ve(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const Pe=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function Lo(i,t){return Pe(i).getPropertyValue(t)}const Io=["top","right","bottom","left"];function kt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=Io[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const Eo=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function zo(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(Eo(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function yt(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=Pe(e),o=n.boxSizing==="border-box",r=kt(n,"padding"),a=kt(n,"border","width"),{x:l,y:c,box:h}=zo(i,e),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:p}=t;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/p*e.height/s)}}function Fo(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&bi(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=Pe(o),l=kt(a,"border","width"),c=kt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=ve(a.maxWidth,o,"clientWidth"),n=ve(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||xe,maxHeight:n||xe}}const ae=i=>Math.round(i*10)/10;function Bo(i,t,e,s){const n=Pe(i),o=kt(n,"margin"),r=ve(n.maxWidth,i,"clientWidth")||xe,a=ve(n.maxHeight,i,"clientHeight")||xe,l=Fo(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=kt(n,"border","width"),f=kt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=ae(Math.min(c,r,l.maxWidth)),h=ae(Math.min(h,a,l.maxHeight)),c&&!h&&(h=ae(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=ae(Math.floor(h*s))),{width:c,height:h}}function Ii(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=\`\${i.height}px\`,r.style.width=\`\${i.width}px\`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const Wo=(function(){let i=!1;try{const t={get passive(){return i=!0,!1}};mi()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function Ei(i,t){const e=Lo(i,t),s=e&&e.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function vt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function Ho(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function No(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=vt(i,n,e),a=vt(n,o,e),l=vt(o,t,e),c=vt(r,a,e),h=vt(a,l,e);return vt(c,h,e)}const Vo=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},jo=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Rt(i,t,e){return i?Vo(t,e):jo()}function Js(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Qs(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function Zs(i){return i==="angle"?{between:Zt,compare:Nn,normalize:et}:{between:dt,compare:(t,e)=>t-e,normalize:t=>t}}function zi({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function Yo(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=Zs(s),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(t[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function Uo(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=Zs(s),{start:h,end:d,loop:u,style:f}=Yo(i,t,e),p=[];let g=!1,m=null,b,_,y;const v=()=>l(n,y,b)&&a(n,y)!==0,x=()=>a(o,b)===0||l(o,y,b),k=()=>g||v(),S=()=>!g||x();for(let M=h,w=h;M<=d;++M)_=t[M%r],!_.skip&&(b=c(_[s]),b!==y&&(g=l(b,n,o),m===null&&k()&&(m=a(b,n)===0?M:w),m!==null&&S()&&(p.push(zi({start:m,end:M,loop:u,count:r,style:f})),m=null),w=M,y=b));return m!==null&&p.push(zi({start:m,end:d,loop:u,count:r,style:f})),p}function Xo(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=Uo(s[n],i.points,t);o.length&&e.push(...o)}return e}function Ko(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function qo(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function Go(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=Ko(e,n,o,s);if(s===!0)return Fi(i,[{start:r,end:a,loop:o}],e,t);const l=a<r?a+n:a,c=!!i._fullLoop&&r===0&&a===n-1;return Fi(i,qo(e,r,l,c),e,t)}function Fi(i,t,e,s){return!s||!s.setContext||!e?t:Jo(i,t,e,s)}function Jo(i,t,e,s){const n=i._chart.getContext(),o=Bi(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(p,g,m,b){const _=a?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=_;for(;e[g%l].skip;)g+=_;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:b}),h=b,d=g%l)}}for(const p of t){d=a?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const b=e[u%l];m=Bi(s.setContext(Pt(n,{type:"segment",p0:g,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),Qo(m,h)&&f(d,u-1,p.loop,h),g=b,h=m}d<u-1&&f(d,u-1,p.loop,h)}return c}function Bi(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function Qo(i,t){if(!t)return!1;const e=[],s=function(n,o){return li(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,s)!==JSON.stringify(t,s)}function le(i,t,e){return i.options.clip?i[e]:t[e]}function Zo(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:le(e,t,"left"),right:le(e,t,"right"),top:le(s,t,"top"),bottom:le(s,t,"bottom")}:t}function $o(i,t){const e=t._clip;if(e.disabled)return!1;const s=Zo(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}/*!
21271
+ */function ot(){}const Gs=(()=>{let i=0;return()=>i++})();function T(i){return i==null}function H(i){if(Array.isArray&&Array.isArray(i))return!0;const t=Object.prototype.toString.call(i);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function A(i){return i!==null&&Object.prototype.toString.call(i)==="[object Object]"}function J(i){return(typeof i=="number"||i instanceof Number)&&isFinite(+i)}function et(i,t){return J(i)?i:t}function P(i,t){return typeof i>"u"?t:i}const qs=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100:+i/t,us=(i,t)=>typeof i=="string"&&i.endsWith("%")?parseFloat(i)/100*t:+i;function E(i,t,e){if(i&&typeof i.call=="function")return i.apply(e,t)}function R(i,t,e,s){let n,o,r;if(H(i))for(o=i.length,n=0;n<o;n++)t.call(e,i[n],n);else if(A(i))for(r=Object.keys(i),o=r.length,n=0;n<o;n++)t.call(e,i[r[n]],r[n])}function fe(i,t){let e,s,n,o;if(!i||!t||i.length!==t.length)return!1;for(e=0,s=i.length;e<s;++e)if(n=i[e],o=t[e],n.datasetIndex!==o.datasetIndex||n.index!==o.index)return!1;return!0}function ge(i){if(H(i))return i.map(ge);if(A(i)){const t=Object.create(null),e=Object.keys(i),s=e.length;let n=0;for(;n<s;++n)t[e[n]]=ge(i[e[n]]);return t}return i}function fs(i){return["__proto__","prototype","constructor"].indexOf(i)===-1}function Js(i,t,e,s){if(!fs(i))return;const n=t[i],o=e[i];A(n)&&A(o)?Ut(n,o,s):t[i]=ge(o)}function Ut(i,t,e){const s=H(t)?t:[t],n=s.length;if(!A(i))return i;e=e||{};const o=e.merger||Js;let r;for(let a=0;a<n;++a){if(r=s[a],!A(r))continue;const l=Object.keys(r);for(let c=0,h=l.length;c<h;++c)o(l[c],i,r,e)}return i}function Vt(i,t){return Ut(i,t,{merger:Qs})}function Qs(i,t,e){if(!fs(i))return;const s=t[i],n=e[i];A(s)&&A(n)?Vt(s,n):Object.prototype.hasOwnProperty.call(t,i)||(t[i]=ge(n))}const ei={"":i=>i,x:i=>i.x,y:i=>i.y};function Zs(i){const t=i.split("."),e=[];let s="";for(const n of t)s+=n,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(e.push(s),s="");return e}function tn(i){const t=Zs(i);return e=>{for(const s of t){if(s==="")break;e=e&&e[s]}return e}}function Mt(i,t){return(ei[t]||(ei[t]=tn(t)))(i)}function Ne(i){return i.charAt(0).toUpperCase()+i.slice(1)}const Xt=i=>typeof i<"u",ut=i=>typeof i=="function",ii=(i,t)=>{if(i.size!==t.size)return!1;for(const e of i)if(!t.has(e))return!1;return!0};function en(i){return i.type==="mouseup"||i.type==="click"||i.type==="contextmenu"}const L=Math.PI,F=2*L,sn=F+L,pe=Number.POSITIVE_INFINITY,nn=L/180,N=L/2,pt=L/4,si=L*2/3,gs=Math.log10,nt=Math.sign;function jt(i,t,e){return Math.abs(i-t)<e}function ni(i){const t=Math.round(i);i=jt(i,t,i/1e3)?t:i;const e=Math.pow(10,Math.floor(gs(i))),s=i/e;return(s<=1?1:s<=2?2:s<=5?5:10)*e}function on(i){const t=[],e=Math.sqrt(i);let s;for(s=1;s<e;s++)i%s===0&&(t.push(s),t.push(i/s));return e===(e|0)&&t.push(e),t.sort((n,o)=>n-o).pop(),t}function rn(i){return typeof i=="symbol"||typeof i=="object"&&i!==null&&!(Symbol.toPrimitive in i||"toString"in i||"valueOf"in i)}function Kt(i){return!rn(i)&&!isNaN(parseFloat(i))&&isFinite(i)}function an(i,t){const e=Math.round(i);return e-t<=i&&e+t>=i}function ln(i,t,e){let s,n,o;for(s=0,n=i.length;s<n;s++)o=i[s][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function lt(i){return i*(L/180)}function cn(i){return i*(180/L)}function oi(i){if(!J(i))return;let t=1,e=0;for(;Math.round(i*t)/t!==i;)t*=10,e++;return e}function ps(i,t){const e=t.x-i.x,s=t.y-i.y,n=Math.sqrt(e*e+s*s);let o=Math.atan2(s,e);return o<-.5*L&&(o+=F),{angle:o,distance:n}}function Ee(i,t){return Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2))}function hn(i,t){return(i-t+sn)%F-L}function tt(i){return(i%F+F)%F}function Gt(i,t,e,s){const n=tt(i),o=tt(t),r=tt(e),a=tt(o-n),l=tt(r-n),c=tt(n-o),h=tt(n-r);return n===o||n===r||s&&o===r||a>l&&c<h}function Y(i,t,e){return Math.max(t,Math.min(e,i))}function dn(i){return Y(i,-32768,32767)}function ht(i,t,e,s=1e-6){return i>=Math.min(t,e)-s&&i<=Math.max(t,e)+s}function Ve(i,t,e){e=e||(r=>i[r]<t);let s=i.length-1,n=0,o;for(;s-n>1;)o=n+s>>1,e(o)?n=o:s=o;return{lo:n,hi:s}}const yt=(i,t,e,s)=>Ve(i,e,s?n=>{const o=i[n][t];return o<e||o===e&&i[n+1][t]===e}:n=>i[n][t]<e),un=(i,t,e)=>Ve(i,e,s=>i[s][t]>=e);function fn(i,t,e){let s=0,n=i.length;for(;s<n&&i[s]<t;)s++;for(;n>s&&i[n-1]>e;)n--;return s>0||n<i.length?i.slice(s,n):i}const ms=["push","pop","shift","splice","unshift"];function gn(i,t){if(i._chartjs){i._chartjs.listeners.push(t);return}Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ms.forEach(e=>{const s="_onData"+Ne(e),n=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value(...o){const r=n.apply(this,o);return i._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...o)}),r}})})}function ri(i,t){const e=i._chartjs;if(!e)return;const s=e.listeners,n=s.indexOf(t);n!==-1&&s.splice(n,1),!(s.length>0)&&(ms.forEach(o=>{delete i[o]}),delete i._chartjs)}function bs(i){const t=new Set(i);return t.size===i.length?i:Array.from(t)}const _s=(function(){return typeof window>"u"?function(i){return i()}:window.requestAnimationFrame})();function xs(i,t){let e=[],s=!1;return function(...n){e=n,s||(s=!0,_s.call(window,()=>{s=!1,i.apply(t,e)}))}}function pn(i,t){let e;return function(...s){return t?(clearTimeout(e),e=setTimeout(i,t,s)):i.apply(this,s),t}}const je=i=>i==="start"?"left":i==="end"?"right":"center",$=(i,t,e)=>i==="start"?t:i==="end"?e:(t+e)/2,mn=(i,t,e,s)=>i===(s?"left":"right")?e:i==="center"?(t+e)/2:t;function bn(i,t,e){const s=t.length;let n=0,o=s;if(i._sorted){const{iScale:r,vScale:a,_parsed:l}=i,c=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null,h=r.axis,{min:d,max:u,minDefined:f,maxDefined:p}=r.getUserBounds();if(f){if(n=Math.min(yt(l,h,d).lo,e?s:yt(t,h,r.getPixelForValue(d)).lo),c){const g=l.slice(0,n+1).reverse().findIndex(m=>!T(m[a.axis]));n-=Math.max(0,g)}n=Y(n,0,s-1)}if(p){let g=Math.max(yt(l,r.axis,u,!0).hi+1,e?0:yt(t,h,r.getPixelForValue(u),!0).hi+1);if(c){const m=l.slice(g-1).findIndex(b=>!T(b[a.axis]));g+=Math.max(0,m)}o=Y(g,n,s)-n}else o=s-n}return{start:n,count:o}}function _n(i){const{xScale:t,yScale:e,_scaleRanges:s}=i,n={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!s)return i._scaleRanges=n,!0;const o=s.xmin!==t.min||s.xmax!==t.max||s.ymin!==e.min||s.ymax!==e.max;return Object.assign(s,n),o}const te=i=>i===0||i===1,ai=(i,t,e)=>-(Math.pow(2,10*(i-=1))*Math.sin((i-t)*F/e)),li=(i,t,e)=>Math.pow(2,-10*i)*Math.sin((i-t)*F/e)+1,$t={linear:i=>i,easeInQuad:i=>i*i,easeOutQuad:i=>-i*(i-2),easeInOutQuad:i=>(i/=.5)<1?.5*i*i:-.5*(--i*(i-2)-1),easeInCubic:i=>i*i*i,easeOutCubic:i=>(i-=1)*i*i+1,easeInOutCubic:i=>(i/=.5)<1?.5*i*i*i:.5*((i-=2)*i*i+2),easeInQuart:i=>i*i*i*i,easeOutQuart:i=>-((i-=1)*i*i*i-1),easeInOutQuart:i=>(i/=.5)<1?.5*i*i*i*i:-.5*((i-=2)*i*i*i-2),easeInQuint:i=>i*i*i*i*i,easeOutQuint:i=>(i-=1)*i*i*i*i+1,easeInOutQuint:i=>(i/=.5)<1?.5*i*i*i*i*i:.5*((i-=2)*i*i*i*i+2),easeInSine:i=>-Math.cos(i*N)+1,easeOutSine:i=>Math.sin(i*N),easeInOutSine:i=>-.5*(Math.cos(L*i)-1),easeInExpo:i=>i===0?0:Math.pow(2,10*(i-1)),easeOutExpo:i=>i===1?1:-Math.pow(2,-10*i)+1,easeInOutExpo:i=>te(i)?i:i<.5?.5*Math.pow(2,10*(i*2-1)):.5*(-Math.pow(2,-10*(i*2-1))+2),easeInCirc:i=>i>=1?i:-(Math.sqrt(1-i*i)-1),easeOutCirc:i=>Math.sqrt(1-(i-=1)*i),easeInOutCirc:i=>(i/=.5)<1?-.5*(Math.sqrt(1-i*i)-1):.5*(Math.sqrt(1-(i-=2)*i)+1),easeInElastic:i=>te(i)?i:ai(i,.075,.3),easeOutElastic:i=>te(i)?i:li(i,.075,.3),easeInOutElastic(i){return te(i)?i:i<.5?.5*ai(i*2,.1125,.45):.5+.5*li(i*2-1,.1125,.45)},easeInBack(i){return i*i*((1.70158+1)*i-1.70158)},easeOutBack(i){return(i-=1)*i*((1.70158+1)*i+1.70158)+1},easeInOutBack(i){let t=1.70158;return(i/=.5)<1?.5*(i*i*(((t*=1.525)+1)*i-t)):.5*((i-=2)*i*(((t*=1.525)+1)*i+t)+2)},easeInBounce:i=>1-$t.easeOutBounce(1-i),easeOutBounce(i){return i<1/2.75?7.5625*i*i:i<2/2.75?7.5625*(i-=1.5/2.75)*i+.75:i<2.5/2.75?7.5625*(i-=2.25/2.75)*i+.9375:7.5625*(i-=2.625/2.75)*i+.984375},easeInOutBounce:i=>i<.5?$t.easeInBounce(i*2)*.5:$t.easeOutBounce(i*2-1)*.5+.5};function $e(i){if(i&&typeof i=="object"){const t=i.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function ci(i){return $e(i)?i:new ds(i)}function Se(i){return $e(i)?i:new ds(i).saturate(.5).darken(.1).hexString()}const xn=["x","y","borderWidth","radius","tension"],yn=["color","borderColor","backgroundColor"];function vn(i){i.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),i.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),i.set("animations",{colors:{type:"color",properties:yn},numbers:{type:"number",properties:xn}}),i.describe("animations",{_fallback:"animation"}),i.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Mn(i){i.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const hi=new Map;function kn(i,t){t=t||{};const e=i+JSON.stringify(t);let s=hi.get(e);return s||(s=new Intl.NumberFormat(i,t),hi.set(e,s)),s}function Ye(i,t,e){return kn(t,e).format(i)}const Sn={values(i){return H(i)?i:""+i},numeric(i,t,e){if(i===0)return"0";const s=this.chart.options.locale;let n,o=i;if(e.length>1){const c=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(c<1e-4||c>1e15)&&(n="scientific"),o=wn(i,e)}const r=gs(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:n,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Ye(i,s,l)}};function wn(i,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&i!==Math.floor(i)&&(e=i-Math.floor(i)),e}var ys={formatters:Sn};function Cn(i){i.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ys.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),i.route("scale.ticks","color","","color"),i.route("scale.grid","color","","borderColor"),i.route("scale.border","color","","borderColor"),i.route("scale.title","color","","color"),i.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),i.describe("scales",{_fallback:"scale"}),i.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const kt=Object.create(null),ze=Object.create(null);function Yt(i,t){if(!t)return i;const e=t.split(".");for(let s=0,n=e.length;s<n;++s){const o=e[s];i=i[o]||(i[o]=Object.create(null))}return i}function we(i,t,e){return typeof t=="string"?Ut(Yt(i,t),e):Ut(Yt(i,""),t)}class Pn{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=s=>s.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(s,n)=>Se(n.backgroundColor),this.hoverBorderColor=(s,n)=>Se(n.borderColor),this.hoverColor=(s,n)=>Se(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return we(this,t,e)}get(t){return Yt(this,t)}describe(t,e){return we(ze,t,e)}override(t,e){return we(kt,t,e)}route(t,e,s,n){const o=Yt(this,t),r=Yt(this,s),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const l=this[a],c=r[n];return A(l)?Object.assign({},c,l):P(l,c)},set(l){this[a]=l}}})}apply(t){t.forEach(e=>e(this))}}var W=new Pn({_scriptable:i=>!i.startsWith("on"),_indexable:i=>i!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[vn,Mn,Cn]);function Dn(i){return!i||T(i.size)||T(i.family)?null:(i.style?i.style+" ":"")+(i.weight?i.weight+" ":"")+i.size+"px "+i.family}function di(i,t,e,s,n){let o=t[n];return o||(o=t[n]=i.measureText(n).width,e.push(n)),o>s&&(s=o),s}function mt(i,t,e){const s=i.currentDevicePixelRatio,n=e!==0?Math.max(e/2,.5):0;return Math.round((t-n)*s)/s+n}function ui(i,t){!t&&!i||(t=t||i.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,i.width,i.height),t.restore())}function Fe(i,t,e,s){vs(i,t,e,s,null)}function vs(i,t,e,s,n){let o,r,a,l,c,h,d,u;const f=t.pointStyle,p=t.rotation,g=t.radius;let m=(p||0)*nn;if(f&&typeof f=="object"&&(o=f.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){i.save(),i.translate(e,s),i.rotate(m),i.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),i.restore();return}if(!(isNaN(g)||g<=0)){switch(i.beginPath(),f){default:n?i.ellipse(e,s,n/2,g,0,0,F):i.arc(e,s,g,0,F),i.closePath();break;case"triangle":h=n?n/2:g,i.moveTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=si,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),m+=si,i.lineTo(e+Math.sin(m)*h,s-Math.cos(m)*g),i.closePath();break;case"rectRounded":c=g*.516,l=g-c,r=Math.cos(m+pt)*l,d=Math.cos(m+pt)*(n?n/2-c:l),a=Math.sin(m+pt)*l,u=Math.sin(m+pt)*(n?n/2-c:l),i.arc(e-d,s-a,c,m-L,m-N),i.arc(e+u,s-r,c,m-N,m),i.arc(e+d,s+a,c,m,m+N),i.arc(e-u,s+r,c,m+N,m+L),i.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*g,h=n?n/2:l,i.rect(e-h,s-l,2*h,2*l);break}m+=pt;case"rectRot":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+u,s-r),i.lineTo(e+d,s+a),i.lineTo(e-u,s+r),i.closePath();break;case"crossRot":m+=pt;case"cross":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"star":d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r),m+=pt,d=Math.cos(m)*(n?n/2:g),r=Math.cos(m)*g,a=Math.sin(m)*g,u=Math.sin(m)*(n?n/2:g),i.moveTo(e-d,s-a),i.lineTo(e+d,s+a),i.moveTo(e+u,s-r),i.lineTo(e-u,s+r);break;case"line":r=n?n/2:Math.cos(m)*g,a=Math.sin(m)*g,i.moveTo(e-r,s-a),i.lineTo(e+r,s+a);break;case"dash":i.moveTo(e,s),i.lineTo(e+Math.cos(m)*(n?n/2:g),s+Math.sin(m)*g);break;case!1:i.closePath();break}i.fill(),t.borderWidth>0&&i.stroke()}}function qt(i,t,e){return e=e||.5,!t||i&&i.x>t.left-e&&i.x<t.right+e&&i.y>t.top-e&&i.y<t.bottom+e}function Ue(i,t){i.save(),i.beginPath(),i.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),i.clip()}function Xe(i){i.restore()}function On(i,t,e,s,n){if(!t)return i.lineTo(e.x,e.y);if(n==="middle"){const o=(t.x+e.x)/2;i.lineTo(o,t.y),i.lineTo(o,e.y)}else n==="after"!=!!s?i.lineTo(t.x,e.y):i.lineTo(e.x,t.y);i.lineTo(e.x,e.y)}function An(i,t,e,s){if(!t)return i.lineTo(e.x,e.y);i.bezierCurveTo(s?t.cp1x:t.cp2x,s?t.cp1y:t.cp2y,s?e.cp2x:e.cp1x,s?e.cp2y:e.cp1y,e.x,e.y)}function Tn(i,t){t.translation&&i.translate(t.translation[0],t.translation[1]),T(t.rotation)||i.rotate(t.rotation),t.color&&(i.fillStyle=t.color),t.textAlign&&(i.textAlign=t.textAlign),t.textBaseline&&(i.textBaseline=t.textBaseline)}function Rn(i,t,e,s,n){if(n.strikethrough||n.underline){const o=i.measureText(s),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,l=e-o.actualBoundingBoxAscent,c=e+o.actualBoundingBoxDescent,h=n.strikethrough?(l+c)/2:c;i.strokeStyle=i.fillStyle,i.beginPath(),i.lineWidth=n.decorationWidth||2,i.moveTo(r,h),i.lineTo(a,h),i.stroke()}}function Ln(i,t){const e=i.fillStyle;i.fillStyle=t.color,i.fillRect(t.left,t.top,t.width,t.height),i.fillStyle=e}function Jt(i,t,e,s,n,o={}){const r=H(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(i.save(),i.font=n.string,Tn(i,o),l=0;l<r.length;++l)c=r[l],o.backdrop&&Ln(i,o.backdrop),a&&(o.strokeColor&&(i.strokeStyle=o.strokeColor),T(o.strokeWidth)||(i.lineWidth=o.strokeWidth),i.strokeText(c,e,s,o.maxWidth)),i.fillText(c,e,s,o.maxWidth),Rn(i,e,s,c,o),s+=Number(n.lineHeight);i.restore()}function me(i,t){const{x:e,y:s,w:n,h:o,radius:r}=t;i.arc(e+r.topLeft,s+r.topLeft,r.topLeft,1.5*L,L,!0),i.lineTo(e,s+o-r.bottomLeft),i.arc(e+r.bottomLeft,s+o-r.bottomLeft,r.bottomLeft,L,N,!0),i.lineTo(e+n-r.bottomRight,s+o),i.arc(e+n-r.bottomRight,s+o-r.bottomRight,r.bottomRight,N,0,!0),i.lineTo(e+n,s+r.topRight),i.arc(e+n-r.topRight,s+r.topRight,r.topRight,0,-N,!0),i.lineTo(e+r.topLeft,s)}const In=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,En=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function zn(i,t){const e=(""+i).match(In);if(!e||e[1]==="normal")return t*1.2;switch(i=+e[2],e[3]){case"px":return i;case"%":i/=100;break}return t*i}const Fn=i=>+i||0;function Ke(i,t){const e={},s=A(t),n=s?Object.keys(t):t,o=A(i)?s?r=>P(i[r],i[t[r]]):r=>i[r]:()=>i;for(const r of n)e[r]=Fn(o(r));return e}function Ms(i){return Ke(i,{top:"y",right:"x",bottom:"y",left:"x"})}function Dt(i){return Ke(i,["topLeft","topRight","bottomLeft","bottomRight"])}function Q(i){const t=Ms(i);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function U(i,t){i=i||{},t=t||W.font;let e=P(i.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let s=P(i.style,t.style);s&&!(""+s).match(En)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:P(i.family,t.family),lineHeight:zn(P(i.lineHeight,t.lineHeight),e),size:e,style:s,weight:P(i.weight,t.weight),string:""};return n.string=Dn(n),n}function ee(i,t,e,s){let n,o,r;for(n=0,o=i.length;n<o;++n)if(r=i[n],r!==void 0&&r!==void 0)return r}function Bn(i,t,e){const{min:s,max:n}=i,o=us(t,(n-s)/2),r=(a,l)=>e&&a===0?0:a+l;return{min:r(s,-Math.abs(o)),max:r(n,o)}}function St(i,t){return Object.assign(Object.create(i),t)}function Ge(i,t=[""],e,s,n=()=>i[0]){const o=e||i;typeof s>"u"&&(s=Cs("_fallback",i));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:i,_rootScopes:o,_fallback:s,_getTarget:n,override:a=>Ge([a,...i],t,o,s)};return new Proxy(r,{deleteProperty(a,l){return delete a[l],delete a._keys,delete i[0][l],!0},get(a,l){return Ss(a,l,()=>Un(l,t,i,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(i[0])},has(a,l){return gi(a).includes(l)},ownKeys(a){return gi(a)},set(a,l,c){const h=a._storage||(a._storage=n());return a[l]=h[l]=c,delete a._keys,!0}})}function At(i,t,e,s){const n={_cacheable:!1,_proxy:i,_context:t,_subProxy:e,_stack:new Set,_descriptors:ks(i,s),setContext:o=>At(i,o,e,s),override:o=>At(i.override(o),t,e,s)};return new Proxy(n,{deleteProperty(o,r){return delete o[r],delete i[r],!0},get(o,r,a){return Ss(o,r,()=>Hn(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(i,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(i,r)},getPrototypeOf(){return Reflect.getPrototypeOf(i)},has(o,r){return Reflect.has(i,r)},ownKeys(){return Reflect.ownKeys(i)},set(o,r,a){return i[r]=a,delete o[r],!0}})}function ks(i,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:s=t.indexable,_allKeys:n=t.allKeys}=i;return{allKeys:n,scriptable:e,indexable:s,isScriptable:ut(e)?e:()=>e,isIndexable:ut(s)?s:()=>s}}const Wn=(i,t)=>i?i+Ne(t):t,qe=(i,t)=>A(t)&&i!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function Ss(i,t,e){if(Object.prototype.hasOwnProperty.call(i,t)||t==="constructor")return i[t];const s=e();return i[t]=s,s}function Hn(i,t,e){const{_proxy:s,_context:n,_subProxy:o,_descriptors:r}=i;let a=s[t];return ut(a)&&r.isScriptable(t)&&(a=Nn(t,a,i,e)),H(a)&&a.length&&(a=Vn(t,a,i,r.isIndexable)),qe(t,a)&&(a=At(a,n,o&&o[t],r)),a}function Nn(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_stack:a}=e;if(a.has(i))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+i);a.add(i);let l=t(o,r||s);return a.delete(i),qe(i,l)&&(l=Je(n._scopes,n,i,l)),l}function Vn(i,t,e,s){const{_proxy:n,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&s(i))return t[o.index%t.length];if(A(t[0])){const l=t,c=n._scopes.filter(h=>h!==l);t=[];for(const h of l){const d=Je(c,n,i,h);t.push(At(d,o,r&&r[i],a))}}return t}function ws(i,t,e){return ut(i)?i(t,e):i}const jn=(i,t)=>i===!0?t:typeof i=="string"?Mt(t,i):void 0;function $n(i,t,e,s,n){for(const o of t){const r=jn(e,o);if(r){i.add(r);const a=ws(r._fallback,e,n);if(typeof a<"u"&&a!==e&&a!==s)return a}else if(r===!1&&typeof s<"u"&&e!==s)return null}return!1}function Je(i,t,e,s){const n=t._rootScopes,o=ws(t._fallback,e,s),r=[...i,...n],a=new Set;a.add(s);let l=fi(a,r,e,o||e,s);return l===null||typeof o<"u"&&o!==e&&(l=fi(a,r,o,l,s),l===null)?!1:Ge(Array.from(a),[""],n,o,()=>Yn(t,e,s))}function fi(i,t,e,s,n){for(;e;)e=$n(i,t,e,s,n);return e}function Yn(i,t,e){const s=i._getTarget();t in s||(s[t]={});const n=s[t];return H(n)&&A(e)?e:n||{}}function Un(i,t,e,s){let n;for(const o of t)if(n=Cs(Wn(o,i),e),typeof n<"u")return qe(i,n)?Je(e,s,i,n):n}function Cs(i,t){for(const e of t){if(!e)continue;const s=e[i];if(typeof s<"u")return s}}function gi(i){let t=i._keys;return t||(t=i._keys=Xn(i._scopes)),t}function Xn(i){const t=new Set;for(const e of i)for(const s of Object.keys(e).filter(n=>!n.startsWith("_")))t.add(s);return Array.from(t)}const Kn=Number.EPSILON||1e-14,Tt=(i,t)=>t<i.length&&!i[t].skip&&i[t],Ps=i=>i==="x"?"y":"x";function Gn(i,t,e,s){const n=i.skip?t:i,o=t,r=e.skip?t:e,a=Ee(o,n),l=Ee(r,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const d=s*c,u=s*h;return{previous:{x:o.x-d*(r.x-n.x),y:o.y-d*(r.y-n.y)},next:{x:o.x+u*(r.x-n.x),y:o.y+u*(r.y-n.y)}}}function qn(i,t,e){const s=i.length;let n,o,r,a,l,c=Tt(i,0);for(let h=0;h<s-1;++h)if(l=c,c=Tt(i,h+1),!(!l||!c)){if(jt(t[h],0,Kn)){e[h]=e[h+1]=0;continue}n=e[h]/t[h],o=e[h+1]/t[h],a=Math.pow(n,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[h]=n*r*t[h],e[h+1]=o*r*t[h])}}function Jn(i,t,e="x"){const s=Ps(e),n=i.length;let o,r,a,l=Tt(i,0);for(let c=0;c<n;++c){if(r=a,a=l,l=Tt(i,c+1),!a)continue;const h=a[e],d=a[s];r&&(o=(h-r[e])/3,a[\`cp1\${e}\`]=h-o,a[\`cp1\${s}\`]=d-o*t[c]),l&&(o=(l[e]-h)/3,a[\`cp2\${e}\`]=h+o,a[\`cp2\${s}\`]=d+o*t[c])}}function Qn(i,t="x"){const e=Ps(t),s=i.length,n=Array(s).fill(0),o=Array(s);let r,a,l,c=Tt(i,0);for(r=0;r<s;++r)if(a=l,l=c,c=Tt(i,r+1),!!l){if(c){const h=c[t]-l[t];n[r]=h!==0?(c[e]-l[e])/h:0}o[r]=a?c?nt(n[r-1])!==nt(n[r])?0:(n[r-1]+n[r])/2:n[r-1]:n[r]}qn(i,n,o),Jn(i,o,t)}function ie(i,t,e){return Math.max(Math.min(i,e),t)}function Zn(i,t){let e,s,n,o,r,a=qt(i[0],t);for(e=0,s=i.length;e<s;++e)r=o,o=a,a=e<s-1&&qt(i[e+1],t),o&&(n=i[e],r&&(n.cp1x=ie(n.cp1x,t.left,t.right),n.cp1y=ie(n.cp1y,t.top,t.bottom)),a&&(n.cp2x=ie(n.cp2x,t.left,t.right),n.cp2y=ie(n.cp2y,t.top,t.bottom)))}function to(i,t,e,s,n){let o,r,a,l;if(t.spanGaps&&(i=i.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")Qn(i,n);else{let c=s?i[i.length-1]:i[0];for(o=0,r=i.length;o<r;++o)a=i[o],l=Gn(c,a,i[Math.min(o+1,r-(s?0:1))%r],t.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,c=a}t.capBezierPoints&&Zn(i,e)}function Qe(){return typeof window<"u"&&typeof document<"u"}function Ze(i){let t=i.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function be(i,t,e){let s;return typeof i=="string"?(s=parseInt(i,10),i.indexOf("%")!==-1&&(s=s/100*t.parentNode[e])):s=i,s}const ye=i=>i.ownerDocument.defaultView.getComputedStyle(i,null);function eo(i,t){return ye(i).getPropertyValue(t)}const io=["top","right","bottom","left"];function vt(i,t,e){const s={};e=e?"-"+e:"";for(let n=0;n<4;n++){const o=io[n];s[o]=parseFloat(i[t+"-"+o+e])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const so=(i,t,e)=>(i>0||t>0)&&(!e||!e.shadowRoot);function no(i,t){const e=i.touches,s=e&&e.length?e[0]:i,{offsetX:n,offsetY:o}=s;let r=!1,a,l;if(so(n,o,i.target))a=n,l=o;else{const c=t.getBoundingClientRect();a=s.clientX-c.left,l=s.clientY-c.top,r=!0}return{x:a,y:l,box:r}}function _t(i,t){if("native"in i)return i;const{canvas:e,currentDevicePixelRatio:s}=t,n=ye(e),o=n.boxSizing==="border-box",r=vt(n,"padding"),a=vt(n,"border","width"),{x:l,y:c,box:h}=no(i,e),d=r.left+(h&&a.left),u=r.top+(h&&a.top);let{width:f,height:p}=t;return o&&(f-=r.width+a.width,p-=r.height+a.height),{x:Math.round((l-d)/f*e.width/s),y:Math.round((c-u)/p*e.height/s)}}function oo(i,t,e){let s,n;if(t===void 0||e===void 0){const o=i&&Ze(i);if(!o)t=i.clientWidth,e=i.clientHeight;else{const r=o.getBoundingClientRect(),a=ye(o),l=vt(a,"border","width"),c=vt(a,"padding");t=r.width-c.width-l.width,e=r.height-c.height-l.height,s=be(a.maxWidth,o,"clientWidth"),n=be(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:s||pe,maxHeight:n||pe}}const se=i=>Math.round(i*10)/10;function ro(i,t,e,s){const n=ye(i),o=vt(n,"margin"),r=be(n.maxWidth,i,"clientWidth")||pe,a=be(n.maxHeight,i,"clientHeight")||pe,l=oo(i,t,e);let{width:c,height:h}=l;if(n.boxSizing==="content-box"){const u=vt(n,"border","width"),f=vt(n,"padding");c-=f.width+u.width,h-=f.height+u.height}return c=Math.max(0,c-o.width),h=Math.max(0,s?c/s:h-o.height),c=se(Math.min(c,r,l.maxWidth)),h=se(Math.min(h,a,l.maxHeight)),c&&!h&&(h=se(c/2)),(t!==void 0||e!==void 0)&&s&&l.height&&h>l.height&&(h=l.height,c=se(Math.floor(h*s))),{width:c,height:h}}function pi(i,t,e){const s=t||1,n=Math.floor(i.height*s),o=Math.floor(i.width*s);i.height=Math.floor(i.height),i.width=Math.floor(i.width);const r=i.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=\`\${i.height}px\`,r.style.width=\`\${i.width}px\`),i.currentDevicePixelRatio!==s||r.height!==n||r.width!==o?(i.currentDevicePixelRatio=s,r.height=n,r.width=o,i.ctx.setTransform(s,0,0,s,0,0),!0):!1}const ao=(function(){let i=!1;try{const t={get passive(){return i=!0,!1}};Qe()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return i})();function mi(i,t){const e=eo(i,t),s=e&&e.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function xt(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:i.y+e*(t.y-i.y)}}function lo(i,t,e,s){return{x:i.x+e*(t.x-i.x),y:s==="middle"?e<.5?i.y:t.y:s==="after"?e<1?i.y:t.y:e>0?t.y:i.y}}function co(i,t,e,s){const n={x:i.cp2x,y:i.cp2y},o={x:t.cp1x,y:t.cp1y},r=xt(i,n,e),a=xt(n,o,e),l=xt(o,t,e),c=xt(r,a,e),h=xt(a,l,e);return xt(c,h,e)}const ho=function(i,t){return{x(e){return i+i+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,s){return e-s},leftForLtr(e,s){return e-s}}},uo=function(){return{x(i){return i},setWidth(i){},textAlign(i){return i},xPlus(i,t){return i+t},leftForLtr(i,t){return i}}};function Ot(i,t,e){return i?ho(t,e):uo()}function Ds(i,t){let e,s;(t==="ltr"||t==="rtl")&&(e=i.canvas.style,s=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),i.prevTextDirection=s)}function Os(i,t){t!==void 0&&(delete i.prevTextDirection,i.canvas.style.setProperty("direction",t[0],t[1]))}function As(i){return i==="angle"?{between:Gt,compare:hn,normalize:tt}:{between:ht,compare:(t,e)=>t-e,normalize:t=>t}}function bi({start:i,end:t,count:e,loop:s,style:n}){return{start:i%e,end:t%e,loop:s&&(t-i+1)%e===0,style:n}}function fo(i,t,e){const{property:s,start:n,end:o}=e,{between:r,normalize:a}=As(s),l=t.length;let{start:c,end:h,loop:d}=i,u,f;if(d){for(c+=l,h+=l,u=0,f=l;u<f&&r(a(t[c%l][s]),n,o);++u)c--,h--;c%=l,h%=l}return h<c&&(h+=l),{start:c,end:h,loop:d,style:i.style}}function go(i,t,e){if(!e)return[i];const{property:s,start:n,end:o}=e,r=t.length,{compare:a,between:l,normalize:c}=As(s),{start:h,end:d,loop:u,style:f}=fo(i,t,e),p=[];let g=!1,m=null,b,_,y;const v=()=>l(n,y,b)&&a(n,y)!==0,x=()=>a(o,b)===0||l(o,y,b),k=()=>g||v(),S=()=>!g||x();for(let M=h,w=h;M<=d;++M)_=t[M%r],!_.skip&&(b=c(_[s]),b!==y&&(g=l(b,n,o),m===null&&k()&&(m=a(b,n)===0?M:w),m!==null&&S()&&(p.push(bi({start:m,end:M,loop:u,count:r,style:f})),m=null),w=M,y=b));return m!==null&&p.push(bi({start:m,end:d,loop:u,count:r,style:f})),p}function po(i,t){const e=[],s=i.segments;for(let n=0;n<s.length;n++){const o=go(s[n],i.points,t);o.length&&e.push(...o)}return e}function mo(i,t,e,s){let n=0,o=t-1;if(e&&!s)for(;n<t&&!i[n].skip;)n++;for(;n<t&&i[n].skip;)n++;for(n%=t,e&&(o+=n);o>n&&i[o%t].skip;)o--;return o%=t,{start:n,end:o}}function bo(i,t,e,s){const n=i.length,o=[];let r=t,a=i[t],l;for(l=t+1;l<=e;++l){const c=i[l%n];c.skip||c.stop?a.skip||(s=!1,o.push({start:t%n,end:(l-1)%n,loop:s}),t=r=c.stop?l:null):(r=l,a.skip&&(t=l)),a=c}return r!==null&&o.push({start:t%n,end:r%n,loop:s}),o}function _o(i,t){const e=i.points,s=i.options.spanGaps,n=e.length;if(!n)return[];const o=!!i._loop,{start:r,end:a}=mo(e,n,o,s);if(s===!0)return _i(i,[{start:r,end:a,loop:o}],e,t);const l=a<r?a+n:a,c=!!i._fullLoop&&r===0&&a===n-1;return _i(i,bo(e,r,l,c),e,t)}function _i(i,t,e,s){return!s||!s.setContext||!e?t:xo(i,t,e,s)}function xo(i,t,e,s){const n=i._chart.getContext(),o=xi(i.options),{_datasetIndex:r,options:{spanGaps:a}}=i,l=e.length,c=[];let h=o,d=t[0].start,u=d;function f(p,g,m,b){const _=a?-1:1;if(p!==g){for(p+=l;e[p%l].skip;)p-=_;for(;e[g%l].skip;)g+=_;p%l!==g%l&&(c.push({start:p%l,end:g%l,loop:m,style:b}),h=b,d=g%l)}}for(const p of t){d=a?d:p.start;let g=e[d%l],m;for(u=d+1;u<=p.end;u++){const b=e[u%l];m=xi(s.setContext(St(n,{type:"segment",p0:g,p1:b,p0DataIndex:(u-1)%l,p1DataIndex:u%l,datasetIndex:r}))),yo(m,h)&&f(d,u-1,p.loop,h),g=b,h=m}d<u-1&&f(d,u-1,p.loop,h)}return c}function xi(i){return{backgroundColor:i.backgroundColor,borderCapStyle:i.borderCapStyle,borderDash:i.borderDash,borderDashOffset:i.borderDashOffset,borderJoinStyle:i.borderJoinStyle,borderWidth:i.borderWidth,borderColor:i.borderColor}}function yo(i,t){if(!t)return!1;const e=[],s=function(n,o){return $e(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(i,s)!==JSON.stringify(t,s)}function ne(i,t,e){return i.options.clip?i[e]:t[e]}function vo(i,t){const{xScale:e,yScale:s}=i;return e&&s?{left:ne(e,t,"left"),right:ne(e,t,"right"),top:ne(s,t,"top"),bottom:ne(s,t,"bottom")}:t}function Mo(i,t){const e=t._clip;if(e.disabled)return!1;const s=vo(t,i.chartArea);return{left:e.left===!1?0:s.left-(e.left===!0?0:e.left),right:e.right===!1?i.width:s.right+(e.right===!0?0:e.right),top:e.top===!1?0:s.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?i.height:s.bottom+(e.bottom===!0?0:e.bottom)}}/*!
21267
21272
  * Chart.js v4.5.0
21268
21273
  * https://www.chartjs.org
21269
21274
  * (c) 2025 Chart.js Contributors
21270
21275
  * Released under the MIT License
21271
- */class tr{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Hs.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var at=new tr;const Wi="transparent",er={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=Di(i||Wi),n=s.valid&&Di(t||Wi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class ir{constructor(t,e,s,n){const o=e[s];n=oe([t.to,n,o,t.from]);const r=oe([t.from,o,n]);this._active=!0,this._fn=t.fn||er[t.type||typeof r],this._easing=Kt[t.easing]||Kt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=oe([t.to,e,n,t.from]),this._from=oe([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<s),!this._active){this._target[n]=a,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class $s{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;const e=Object.keys(W.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!A(o))return;const r={};for(const a of e)r[a]=o[a];(H(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=nr(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&sr(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,a);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new ir(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return at.add(this._chart,s),!0}}function sr(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function nr(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Hi(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function or(i,t,e){if(e===!1)return!1;const s=Hi(i,e),n=Hi(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function rr(i){let t,e,s,n;return A(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function tn(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Ni(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let r,a,l,c;if(t===null)return;let h=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===e){if(h=!0,s.all)continue;break}c=i.values[l],Z(c)&&(o||t===0||ot(t)===ot(c))&&(t+=c)}return!h&&!s.all?0:t}function ar(i,t){const{iScale:e,vScale:s}=t,n=e.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[n]:h,[o]:i[h]};return a}function Ee(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function lr(i,t,e){return\`\${i.id}.\${t.id}.\${e.stack||e.type}\`}function cr(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function hr(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function Vi(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function ji(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=lr(o,r,s),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[c]:m}=p,b=p._stacks||(p._stacks={});u=b[c]=hr(n,h,g),u[a]=m,u._top=Vi(u,r,!0,s.type),u._bottom=Vi(u,r,!1,s.type);const _=u._visualValues||(u._visualValues={});_[a]=m}}function ze(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function dr(i,t){return Pt(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function ur(i,t,e){return Pt(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Bt(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const Fe=i=>i==="reset"||i==="none",Yi=(i,t)=>t?i:Object.assign({},i),fr=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:tn(e,!0),values:null};class De{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ee(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Bt(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=P(s.xAxisID,ze(t,"x")),r=e.yAxisID=P(s.yAxisID,ze(t,"y")),a=e.rAxisID=P(s.rAxisID,ze(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&wi(this._data,this),t._stacked&&Bt(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(A(e)){const n=this._cachedMeta;this._data=ar(e,n)}else if(s!==e){if(s){wi(s,this);const n=this._cachedMeta;Bt(n),n._parsed=[]}e&&Object.isExtensible(e)&&Un(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Ee(e.vScale,e),e.stack!==s.stack&&(n=!0,Bt(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(ji(this,e._parsed),e._stacked=Ee(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{H(n[t])?u=this.parseArrayData(s,n,t,e):A(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[a]===null||c&&d[a]<c[a];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}r&&ji(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,d=new Array(n);let u,f,p;for(u=0,f=n;u<f;++u)p=u+s,d[u]={[a]:h||o.parse(c[p],p),[l]:r.parse(e[p],p)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:r}=t,a=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],a[l]={x:o.parse(d[0],h),y:r.parse(d[1],h)};return a}parseObjectData(t,e,s,n){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(St(f,a),u),y:r.parse(St(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:tn(n,!0),values:e._stacks[t.axis]._visualValues};return Ni(a,r,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let r=o===null?NaN:o;const a=n&&s._stacks[e.axis];n&&a&&(n.values=a,r=Ni(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,r=n.length,a=this._getOtherScale(t),l=fr(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=cr(a);let u,f;function p(){f=n[u];const g=f[a.axis];return!Z(f[t.axis])||h>g||d<g}for(u=0;u<r&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=r-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n][t.axis],Z(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=rr(P(this.options.clip,or(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||n.length-a,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const d=n[h];d.hidden||(d.active&&c?r.push(d):d.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=ur(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=dr(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const n=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&Jt(s);if(a)return Yi(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[\`\${t}Hover\`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(W.elements[t]),p=()=>this.getContext(s,n,e),g=c.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(Yi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=\`animation-\${e}\`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}const c=new $s(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Fe(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){Fe(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!Fe(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.data,r=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&Bt(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function gr(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=Ws(s.sort((n,o)=>n-o))}return i._cache.$bar}function pr(i){const t=i.iScale,e=gr(t,i.type);let s=t._length,n,o,r,a;const l=()=>{r===32767||r===-32768||(Jt(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(n=0,o=e.length;n<o;++n)r=t.getPixelForValue(e[n]),l();for(a=void 0,n=0,o=t.ticks.length;n<o;++n)r=t.getPixelForTick(n),l();return s}function mr(i,t,e,s){const n=e.barThickness;let o,r;return T(n)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=n*s,r=1),{chunk:o/s,ratio:r,start:t.pixels[i]-o/2}}function br(i,t,e,s){const n=t.pixels,o=n[i];let r=i>0?n[i-1]:null,a=i<n.length-1?n[i+1]:null;const l=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:e.barPercentage,start:c}}function _r(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),r=Math.min(n,o),a=Math.max(n,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}function en(i,t,e,s){return H(i)?_r(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Ui(i,t,e,s){const n=i.iScale,o=i.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=a||n.parse(r[c],c),l.push(en(u,d,o,c));return l}function Be(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function xr(i,t,e){return i!==0?ot(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function yr(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function vr(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:h}=yr(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[Xi(h,r,a,l)]=!0,n=c)),o[Xi(n,r,a,l)]=!0,i.borderSkipped=o}function Xi(i,t,e,s){return s?(i=Mr(i,t,e),i=Ki(i,e,t)):i=Ki(i,t,e),i}function Mr(i,t,e){return i===t?e:i===e?t:i}function Ki(i,t,e){return i==="start"?t:i==="end"?e:i}function kr(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class Sr extends De{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,s,n){return Ui(t,e,s,n)}parseArrayData(t,e,s,n){return Ui(t,e,s,n)}parseObjectData(t,e,s,n){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,h=r.axis==="x"?a:l,d=[];let u,f,p,g;for(u=s,f=s+n;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(St(g,c),u),d.push(en(St(g,h),p,r,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),r=o._custom,a=Be(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){const o=n==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const p=this.getParsed(f),g=o||T(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),b=(p._stacks||{})[a.axis],_={horizontal:c,base:g.base,enableBorderRadius:!b||Be(p._custom)||r===b._top||r===b._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const y=_.options||t[f].options;vr(_,y,b,r),kr(_,y,h.ratio),this.updateElement(t[f],f,_,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=s.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[s.axis],c=h=>{const d=h._parsed.find(f=>f[s.axis]===l),u=d&&d[h.vScale.axis];if(T(u)||isNaN(u))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||r.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,r;for(o=0,r=e.data.length;o<r;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const a=t.barThickness;return{min:a||pr(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:n},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,h=Be(c);let d=l[e.axis],u=0,f=s?this.applyStack(e,l,s):d,p,g;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&ot(d)!==ot(c.barEnd)&&(u=0),u+=d);const m=!T(o)&&!h?o:u;let b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+f):p=b,g=p-b,Math.abs(g)<r){g=xr(g,e,a)*r,d===a&&(b-=g/2);const _=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),v=Math.min(_,y),x=Math.max(_,y);b=Math.max(Math.min(b,x),v),p=b+g,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const _=ot(g)*e.getLineWidthForValue(a)/2;b+=_,g-=_}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,r=P(n.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(e.grouped){const h=o?this._getStackCount(t):e.stackCount,d=n.barThickness==="flex"?br(t,e,n,h*c):mr(t,e,n,h*c),u=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(P(u,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=d.start+d.chunk*p+d.chunk/2,l=Math.min(r,d.chunk*d.ratio)}else a=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(r,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&!s[o].hidden&&s[o].draw(this._ctx)}}function wr(i,t,e){let s=1,n=1,o=0,r=0;if(t<F){const a=i,l=a+t,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(y,v,x)=>Zt(y,a,l,!0)?1:Math.max(v,v*e,x,x*e),p=(y,v,x)=>Zt(y,a,l,!0)?-1:Math.min(v,v*e,x,x*e),g=f(0,c,d),m=f(N,h,u),b=p(L,c,d),_=p(L+N,h,u);s=(g-b)/2,n=(m-_)/2,o=-(g+b)/2,r=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:r}}class Cr extends De{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(A(s[t])){const{key:l="value"}=this._parsing;o=c=>+St(s[c],l)}let r,a;for(r=t,a=t+e;r<a;++r)n._parsed[r]=o(r)}}_getRotation(){return ct(this.options.rotation-90)}_getCircumference(){return ct(this.options.circumference)}_getRotationExtents(){let t=F,e=-F;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),r=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:s}=e,n=this._cachedMeta,o=n.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-r)/2,0),l=Math.min(Dn(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=wr(d,h,l),m=(s.width-r)/u,b=(s.height-r)/f,_=Math.max(Math.min(m,b)/2,0),y=Is(this.options.radius,_),v=Math.max(y*l,0),x=(y-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=g*y,n.total=this.calculateTotal(),this.outerRadius=y-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/F)}updateElements(t,e,s,n){const o=n==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,h=(a.left+a.right)/2,d=(a.top+a.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,n);let b=this._getRotation(),_;for(_=0;_<e;++_)b+=this._circumference(_,o);for(_=e;_<e+s;++_){const y=this._circumference(_,o),v=t[_],x={x:h+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+y,circumference:y,outerRadius:p,innerRadius:f};m&&(x.options=g||this.resolveDataElementOptions(_,v.active?"active":n)),b+=y,this.updateElement(v,_,x,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=ci(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,r,a,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){r=s.getDatasetMeta(n),t=r.data,a=r.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=a.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(P(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Pr extends De{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:l}=qn(e,n,r);this._drawStart=a,this._drawCount=l,Gn(e)&&(a=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=r.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=Qt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e+s,y=t.length;let v=e>0&&this.getParsed(e-1);for(let x=0;x<y;++x){const k=t[x],S=b?k:{};if(x<e||x>=_){S.skip=!0;continue}const M=this.getParsed(x),w=T(M[f]),D=S[u]=r.getPixelForValue(M[u],x),C=S[f]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[f],x);S.skip=isNaN(D)||isNaN(C)||w,S.stop=x>0&&Math.abs(M[u]-v[u])>m,g&&(S.parsed=M,S.raw=c.data[x]),d&&(S.options=h||this.resolveDataElementOptions(x,k.active?"active":n)),b||this.updateElement(k,x,S,n),v=M}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function xt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class _i{static override(t){Object.assign(_i.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return xt()}parse(){return xt()}format(){return xt()}add(){return xt()}diff(){return xt()}startOf(){return xt()}endOf(){return xt()}}var Dr={_date:_i};function Or(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?jn:Mt;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const u=c(o,t,e-d),f=c(o,t,e+d);return{lo:u.lo,hi:f.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:u}=i,f=u.slice(0,h.lo+1).reverse().findIndex(g=>!T(g[d.axis]));h.lo-=Math.max(0,f);const p=u.slice(h.hi).findIndex(g=>!T(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Oe(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:d,hi:u}=Or(o[a],t,r,n);for(let f=d;f<=u;++f){const p=h[f];p.skip||s(p,c,f)}}}function Ar(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,r=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function We(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||Oe(i,e,t,function(a,l,c){!n&&!$t(a,i.chartArea,0)||a.inRange(t.x,t.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Tr(i,t,e,s){let n=[];function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],s),{angle:d}=Fs(r,{x:t.x,y:t.y});Zt(d,c,h)&&n.push({element:r,datasetIndex:a,index:l})}return Oe(i,e,t,o),n}function Rr(i,t,e,s,n,o){let r=[];const a=Ar(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,n);if(s&&!f)return;const p=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=a(t,p);m<l?(r=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&r.push({element:h,datasetIndex:d,index:u})}return Oe(i,e,t,c),r}function He(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?Tr(i,t,e,n):Rr(i,t,e,s,n,o)}function qi(i,t,e,s,n){const o=[],r=e==="x"?"inXRange":"inYRange";let a=!1;return Oe(i,e,t,(l,c,h)=>{l[r]&&l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var Lr={modes:{index(i,t,e,s){const n=yt(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?We(i,n,o,s,r):He(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=yt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?We(i,n,o,s,r):He(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(i,t,e,s){const n=yt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return We(i,n,o,s,r)},nearest(i,t,e,s){const n=yt(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return He(i,n,o,e.intersect,s,r)},x(i,t,e,s){const n=yt(t,i);return qi(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=yt(t,i);return qi(i,n,"y",e.intersect,s)}}};const sn=["left","top","right","bottom"];function Wt(i,t){return i.filter(e=>e.pos===t)}function Gi(i,t){return i.filter(e=>sn.indexOf(e.pos)===-1&&e.box.axis===t)}function Ht(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function Ir(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:a});return t}function Er(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!sn.includes(n))continue;const r=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function zr(i,t){const e=Er(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*s:l&&t.availableWidth,a.height=n):(a.width=s,a.height=h?h*n:l&&t.availableHeight)}return e}function Fr(i){const t=Ir(i),e=Ht(t.filter(c=>c.box.fullSize),!0),s=Ht(Wt(t,"left"),!0),n=Ht(Wt(t,"right")),o=Ht(Wt(t,"top"),!0),r=Ht(Wt(t,"bottom")),a=Gi(t,"x"),l=Gi(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:Wt(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function Ji(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function nn(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function Br(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!A(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&nn(r,o.getPadding());const a=Math.max(0,t.outerWidth-Ji(r,i,"left","right")),l=Math.max(0,t.outerHeight-Ji(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function Wr(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function Hr(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function jt(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,Hr(a.horizontal,t));const{same:d,other:u}=Br(t,e,a,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(a)}return c&&jt(n,t,e,s)||h}function ce(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function Qi(i,t,e,s){const n=e.padding;let{x:o,y:r}=t;for(const a of i){const l=a.box,c=s[a.stack]||{placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*h,u=c.size||l.height;Jt(c.start)&&(r=c.start),l.fullSize?ce(l,n.left,r,e.outerWidth-n.right-n.left,u):ce(l,t.left+c.placed,r,d,u),c.start=r,c.placed+=d,r=l.bottom}else{const d=t.h*h,u=c.size||l.width;Jt(c.start)&&(o=c.start),l.fullSize?ce(l,o,n.top,u,e.outerHeight-n.bottom-n.top):ce(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=r}var J={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;const n=$(i.options.layout.padding),o=Math.max(t-n.width,0),r=Math.max(e-n.height,0),a=Fr(i.boxes),l=a.vertical,c=a.horizontal;R(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},n);nn(u,$(s));const f=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),p=zr(l.concat(c),d);jt(a.fullSize,f,d,p),jt(l,f,d,p),jt(c,f,d,p)&&jt(l,f,d,p),Wr(f),Qi(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Qi(a.rightAndBottom,f,d,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},R(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class on{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class Nr extends on{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const pe="$chartjs",Vr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Zi=i=>i===null||i==="";function jr(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[pe]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Zi(n)){const o=Ei(i,"width");o!==void 0&&(i.width=o)}if(Zi(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=Ei(i,"height");o!==void 0&&(i.height=o)}return i}const rn=Wo?{passive:!0}:!1;function Yr(i,t,e){i&&i.addEventListener(t,e,rn)}function Ur(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,rn)}function Xr(i,t){const e=Vr[i.type]||i.type,{x:s,y:n}=yt(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function Me(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function Kr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Me(a.addedNodes,s),r=r&&!Me(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function qr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||Me(a.removedNodes,s),r=r&&!Me(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const ee=new Map;let $i=0;function an(){const i=window.devicePixelRatio;i!==$i&&($i=i,ee.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function Gr(i,t){ee.size||window.addEventListener("resize",an),ee.set(i,t)}function Jr(i){ee.delete(i),ee.size||window.removeEventListener("resize",an)}function Qr(i,t,e){const s=i.canvas,n=s&&bi(s);if(!n)return;const o=Ns((a,l)=>{const c=n.clientWidth;e(a,l),c<n.clientWidth&&e()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),Gr(i,o),r}function Ne(i,t,e){e&&e.disconnect(),t==="resize"&&Jr(i)}function Zr(i,t,e){const s=i.canvas,n=Ns(o=>{i.ctx!==null&&e(Xr(o,i))},i);return Yr(s,t,n),n}class $r extends on{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(jr(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[pe])return!1;const s=e[pe].initial;["height","width"].forEach(o=>{const r=s[o];T(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[pe],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:Kr,detach:qr,resize:Qr}[e]||Zr;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Ne,detach:Ne,resize:Ne}[e]||Ur)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return Bo(t,e,s,n)}isAttached(t){const e=t&&bi(t);return!!(e&&e.isConnected)}}function ta(i){return!mi()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?Nr:$r}let ht=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Qt(this.x)&&Qt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}};function ea(i,t){const e=i.options.ticks,s=ia(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?na(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return oa(t,c,o,r/n),c;const h=sa(o,t,n);if(r>0){let d,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(he(t,c,h,T(f)?0:a-f,a),d=0,u=r-1;d<u;d++)he(t,c,h,o[d],o[d+1]);return he(t,c,h,l,T(f)?t.length:l+f),c}return he(t,c,h),c}function ia(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function sa(i,t,e){const s=ra(i),n=t.length/e;if(!s)return Math.max(n,1);const o=zn(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>n)return l}return Math.max(n,1)}function na(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function oa(i,t,e,s){let n=0,o=e[0],r;for(s=Math.ceil(s),r=0;r<i.length;r++)r===o&&(t.push(i[r]),n++,o=e[n*s])}function he(i,t,e,s,n){const o=P(s,0),r=Math.min(P(n,i.length),i.length);let a=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,e=l/Math.floor(l/e)),h=o;h<0;)a++,h=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===h&&(t.push(i[c]),a++,h=Math.round(o+a*e))}function ra(i){const t=i.length;let e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const aa=i=>i==="left"?"right":i==="right"?"left":i,ts=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,es=(i,t)=>Math.min(t||i,i);function is(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function la(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,r=i._endPixel,a=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-a||l>r+a)))return l}function ca(i,t){R(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Nt(i){return i.drawTicks?i.tickLength:0}function ss(i,t){if(!i.display)return 0;const e=X(i.font,t),s=$(i.padding);return(H(i.text)?i.text.length:1)*e.lineHeight+s.height}function ha(i,t){return Pt(i,{scale:t,type:"scale"})}function da(i,t,e){return Pt(i,{tick:e,index:t,type:"tick"})}function ua(i,t,e){let s=ai(i);return(e&&t!=="right"||!e&&t==="right")&&(s=aa(s)),s}function fa(i,t,e,s){const{top:n,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,p;const g=r-n,m=a-o;if(i.isHorizontal()){if(f=Y(s,o,a),A(e)){const b=Object.keys(e)[0],_=e[b];p=h[b].getPixelForValue(_)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=ts(i,e,t);u=a-o}else{if(A(e)){const b=Object.keys(e)[0],_=e[b];f=h[b].getPixelForValue(_)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=ts(i,e,t);p=Y(s,r,n),d=e==="left"?-N:N}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Et extends ht{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=it(t,Number.POSITIVE_INFINITY),e=it(e,Number.NEGATIVE_INFINITY),s=it(s,Number.POSITIVE_INFINITY),n=it(n,Number.NEGATIVE_INFINITY),{min:it(t,s),max:it(e,n),minDefined:Z(t),maxDefined:Z(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),r;if(n&&o)return{min:e,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),n||(e=Math.min(e,r.min)),o||(s=Math.max(s,r.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:it(e,it(s,e)),max:it(s,it(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){E(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=mo(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?is(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=ea(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){E(this.options.afterUpdate,[this])}beforeSetDimensions(){E(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){E(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),E(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){E(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=E(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){E(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){E(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=es(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let r=n,a,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=U(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),d+6>a&&(a=f/(s-(t.offset?.5:1)),l=this.maxHeight-Nt(t.grid)-e.padding-ss(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=Hn(Math.min(Math.asin(U((h.highest.height+6)/a,-1,1)),Math.asin(U(l/c,-1,1))-Math.asin(U(u/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){E(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){E(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=ss(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Nt(o)+l):(t.height=this.maxHeight,t.width=Nt(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,p=ct(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=s.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){E(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e<s;e++)T(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=is(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:n,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/es(e,s));let c=0,h=0,d,u,f,p,g,m,b,_,y,v,x;for(d=0;d<e;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),n.font=m=g.string,b=o[m]=o[m]||{data:{},gc:[]},_=g.lineHeight,y=v=0,!T(p)&&!H(p))y=Ai(n,b.data,b.gc,y,p),v=_;else if(H(p))for(u=0,f=p.length;u<f;++u)x=p[u],!T(x)&&!H(x)&&(y=Ai(n,b.data,b.gc,y,x),v+=_);r.push(y),a.push(v),c=Math.max(y,c),h=Math.max(v,h)}ca(o,e);const k=r.indexOf(c),S=a.indexOf(h),M=w=>({width:r[w]||0,height:a[w]||0});return{first:M(0),last:M(e-1),widest:M(k),highest:M(S),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Vn(this._alignToPixels?_t(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=da(this.getContext(),t,s))}return this.$context||(this.$context=ha(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ct(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*n?a/s:l/n:l*n<a*s?l/s:a/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Nt(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(z){return _t(s,z,g)};let _,y,v,x,k,S,M,w,D,C,O,V;if(r==="top")_=b(this.bottom),S=this.bottom-u,w=_-m,C=b(t.top)+m,V=t.bottom;else if(r==="bottom")_=b(this.top),C=t.top,V=b(t.bottom)-m,S=_+m,w=this.top+u;else if(r==="left")_=b(this.right),k=this.right-u,M=_-m,D=b(t.left)+m,O=t.right;else if(r==="right")_=b(this.left),D=t.left,O=b(t.right)-m,k=_+m,M=this.left+u;else if(e==="x"){if(r==="center")_=b((t.top+t.bottom)/2+.5);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}C=t.top,V=t.bottom,S=_+m,w=S+u}else if(e==="y"){if(r==="center")_=b((t.left+t.right)/2);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}k=_-m,M=k-u,D=t.left,O=t.right}const G=P(n.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/G));for(y=0;y<d;y+=I){const z=this.getContext(y),B=o.setContext(z),tt=a.setContext(z),j=B.lineWidth,Dt=B.color,se=tt.dash||[],Ot=tt.dashOffset,zt=B.tickWidth,pt=B.tickColor,Ft=B.tickBorderDash||[],mt=B.tickBorderDashOffset;v=la(this,y,l),v!==void 0&&(x=_t(s,v,j),c?k=M=D=O=x:S=w=C=V=x,f.push({tx1:k,ty1:S,tx2:M,ty2:w,x1:D,y1:C,x2:O,y2:V,width:j,color:Dt,borderDash:se,borderDashOffset:Ot,tickWidth:zt,tickColor:pt,tickBorderDash:Ft,tickBorderDashOffset:mt}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Nt(s.grid),f=u+h,p=d?-h:f,g=-ct(this.labelRotation),m=[];let b,_,y,v,x,k,S,M,w,D,C,O,V="middle";if(n==="top")k=this.bottom-p,S=this._getXAxisLabelAlignment();else if(n==="bottom")k=this.top+p,S=this._getXAxisLabelAlignment();else if(n==="left"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(n==="right"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(e==="x"){if(n==="center")k=(t.top+t.bottom)/2+f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];k=this.chart.scales[I].getPixelForValue(z)+f}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")x=(t.left+t.right)/2-f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];x=this.chart.scales[I].getPixelForValue(z)}S=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?V="top":l==="end"&&(V="bottom"));const G=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){y=a[b],v=y.label;const I=o.setContext(this.getContext(b));M=this.getPixelForTick(b)+o.labelOffset,w=this._resolveTickFontOptions(b),D=w.lineHeight,C=H(v)?v.length:1;const z=C/2,B=I.color,tt=I.textStrokeColor,j=I.textStrokeWidth;let Dt=S;r?(x=M,S==="inner"&&(b===_-1?Dt=this.options.reverse?"left":"right":b===0?Dt=this.options.reverse?"right":"left":Dt="center"),n==="top"?c==="near"||g!==0?O=-C*D+D/2:c==="center"?O=-G.highest.height/2-z*D+D:O=-G.highest.height+D/2:c==="near"||g!==0?O=D/2:c==="center"?O=G.highest.height/2-z*D:O=G.highest.height-C*D,d&&(O*=-1),g!==0&&!I.showLabelBackdrop&&(x+=D/2*Math.sin(g))):(k=M,O=(1-C)*D/2);let se;if(I.showLabelBackdrop){const Ot=$(I.backdropPadding),zt=G.heights[b],pt=G.widths[b];let Ft=O-Ot.top,mt=0-Ot.left;switch(V){case"middle":Ft-=zt/2;break;case"bottom":Ft-=zt;break}switch(S){case"center":mt-=pt/2;break;case"right":mt-=pt;break;case"inner":b===_-1?mt-=pt:b>0&&(mt-=pt/2);break}se={left:mt,top:Ft,width:pt+Ot.width,height:zt+Ot.height,color:I.backdropColor}}m.push({label:v,font:w,textOffset:O,options:{rotation:g,color:B,strokeColor:tt,strokeWidth:j,textAlign:Dt,textBaseline:V,translation:[x,k],backdrop:se}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ct(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o<r;++o){const l=n[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=_t(t,this.left,r)-r/2,h=_t(t,this.right,a)+a/2,d=u=l):(d=_t(t,this.top,r)-r/2,u=_t(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&hi(s,n);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,h=r.textOffset;te(s,c,0,h,l,a)}n&&di(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=X(s.font),r=$(s.padding),a=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||A(e)?(l+=r.bottom,H(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=fa(this,l,e,a);te(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:ua(a,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=P(t.grid&&t.grid.z,-1),n=P(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Et.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o<r;++o){const a=e[o];a[s]===this.id&&(!t||a.type===t)&&n.push(a)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return X(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class de{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;ma(e)&&(s=this.register(e));const n=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,ga(t,r,s),this.override&&W.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in W[n]&&(delete W[n][s],this.override&&delete wt[s])}}function ga(i,t,e){const s=Gt(Object.create(null),[e?W.get(e):{},W.get(t),i.defaults]);W.set(t,s),i.defaultRoutes&&pa(t,i.defaultRoutes),i.descriptors&&W.describe(t,i.descriptors)}function pa(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");W.route(o,n,l,a)})}function ma(i){return"id"in i&&"defaults"in i}class ba{constructor(){this.controllers=new de(De,"datasets",!0),this.elements=new de(ht,"elements"),this.plugins=new de(Object,"plugins"),this.scales=new de(Et,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):R(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=oi(t);E(s["before"+n],[],s),e[t](s),E(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var nt=new ba;class _a{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,s,n){n=n||{};for(const o of t){const r=o.plugin,a=r[s],l=[e,n,o.options];if(E(a,l,r)===!1&&n.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,n=P(s.options&&s.options.plugins,{}),o=xa(s);return n===!1&&!e?[]:va(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function xa(i){const t={},e=[],s=Object.keys(nt.plugins.items);for(let o=0;o<s.length;o++)e.push(nt.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const r=n[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function ya(i,t){return!t&&i===!1?null:i===!0?{}:i}function va(i,{plugins:t,localIds:e},s,n){const o=[],r=i.getContext();for(const a of t){const l=a.id,c=ya(s[l],n);c!==null&&o.push({plugin:a,options:Ma(i.config,{plugin:a,local:e[l]},c,r)})}return o}function Ma(i,{plugin:t,local:e},s,n){const o=i.pluginScopeKeys(t),r=i.getOptionScopes(s,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ke(i,t){const e=W.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function ka(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function Sa(i,t){return i===t?"_index_":"_value_"}function ns(i){if(i==="x"||i==="y"||i==="r")return i}function wa(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function qe(i,...t){if(ns(i))return i;for(const e of t){const s=e.axis||wa(e.position)||i.length>1&&ns(i[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${i}' axis. Please provide 'axis' or 'position' option.\`)}function os(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Ca(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return os(i,"x",e[0])||os(i,"y",e[0])}return{}}function Pa(i,t){const e=wt[i.type]||{scales:{}},s=t.scales||{},n=Ke(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!A(a))return console.error(\`Invalid scale configuration for scale: \${r}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${r}\`);const l=qe(r,a,Ca(r,i),W.scales[a.type]),c=Sa(l,n),h=e.scales||{};o[r]=Ut(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||Ke(a,t),h=(wt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=ka(d,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Ut(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Ut(a,[W.scales[a.type],W.scale])}),o}function ln(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=Pa(i,t)}function cn(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Da(i){return i=i||{},i.data=cn(i.data),ln(i),i}const rs=new Map,hn=new Set;function ue(i,t){let e=rs.get(i);return e||(e=t(),rs.set(i,e),hn.add(e)),e}const Vt=(i,t,e)=>{const s=St(t,e);s!==void 0&&i.add(s)};class Oa{constructor(t){this._config=Da(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=cn(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ln(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return ue(t,()=>[[\`datasets.\${t}\`,""]])}datasetAnimationScopeKeys(t,e){return ue(\`\${t}.transition.\${e}\`,()=>[[\`datasets.\${t}.transitions.\${e}\`,\`transitions.\${e}\`],[\`datasets.\${t}\`,""]])}datasetElementScopeKeys(t,e){return ue(\`\${t}-\${e}\`,()=>[[\`datasets.\${t}.elements.\${e}\`,\`datasets.\${t}\`,\`elements.\${e}\`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return ue(\`\${s}-plugin-\${e}\`,()=>[[\`plugins.\${e}\`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Vt(l,t,d))),h.forEach(d=>Vt(l,n,d)),h.forEach(d=>Vt(l,wt[o]||{},d)),h.forEach(d=>Vt(l,W,d)),h.forEach(d=>Vt(l,Ue,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),hn.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,wt[e]||{},W.datasets[e]||{},{type:e},W,Ue]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=as(this._resolverCache,t,n);let l=r;if(Ta(r,e)){o.$shared=!1,s=gt(s)?s():s;const c=this.createResolver(t,s,a);l=Lt(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=as(this._resolverCache,t,s);return A(e)?Lt(o,e,void 0,n):o}}function as(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:fi(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const Aa=i=>A(i)&&Object.getOwnPropertyNames(i).some(t=>gt(i[t]));function Ta(i,t){const{isScriptable:e,isIndexable:s}=Us(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(gt(a)||Aa(a))||r&&H(a))return!0}return!1}var Ra="4.5.0";const La=["top","bottom","left","right","chartArea"];function ls(i,t){return i==="top"||i==="bottom"||La.indexOf(i)===-1&&t==="x"}function cs(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function hs(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),E(e&&e.onComplete,[i],t)}function Ia(i){const t=i.chart,e=t.options.animation;E(e&&e.onProgress,[i],t)}function dn(i){return mi()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const me={},ds=i=>{const t=dn(i);return Object.values(me).filter(e=>e.canvas===t).pop()};function Ea(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function za(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}let ie=class{static defaults=W;static instances=me;static overrides=wt;static registry=nt;static version=Ra;static getChart=ds;static register(...t){nt.add(...t),us()}static unregister(...t){nt.remove(...t),us()}constructor(t,e){const s=this.config=new Oa(e),n=dn(t),o=ds(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||ta(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Pn(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new _a,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Xn(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],me[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}at.listen(this,"complete",hs),at.listen(this,"progress",Ia),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return nt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ii(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ti(this.canvas,this.ctx),this}stop(){return at.stop(this),this}resize(t,e){at.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,Ii(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),E(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};R(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=qe(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),R(o,r=>{const a=r.options,l=a.id,c=qe(l,a),h=P(a.type,r.dtype);(a.position===void 0||ls(a.position,c)!==ls(r.dposition))&&(a.position=r.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=nt.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,t)}),R(n,(r,a)=>{r||delete s[a]}),R(s,r=>{J.configure(this,r,r.options),J.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort(cs("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let r=this.getDatasetMeta(s);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=a,r.indexAxis=o.indexAxis||Ke(a,this.options),r.order=o.order||0,r.index=s,r.label=""+o.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const l=nt.getController(a),{datasetElementType:c,dataElementType:h}=W.datasets[a];Object.assign(l,{dataElementType:nt.getElement(h),datasetElementType:c&&nt.getElement(c)}),r.controller=new l(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){R(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),n||R(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(cs("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){R(this.scales,t=>{J.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!vi(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;Ea(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!vi(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;J.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],R(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,gt(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(at.has(this)?this.attached&&!at.running(this)&&at.start(this):(this.draw(),hs({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const r=e[n];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=$o(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&hi(e,n),t.controller.draw(),n&&di(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return $t(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=Lr.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=Pt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);Jt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),at.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ti(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete me[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};R(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){R(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},R(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!be(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=Ln(t),c=za(t,this._lastEvent,s,l);s&&(this._lastEvent=null,E(o.onHover,[t,a,this],this),l&&E(o.onClick,[t,a,this],this));const h=!be(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}};function us(){return R(ie.instances,i=>i._plugins.invalidate())}function Fa(i,t,e){const{startAngle:s,x:n,y:o,outerRadius:r,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/r,et(s-e));if(i.beginPath(),i.arc(n,o,r-c/2,s+d/2,e-d/2),a>0){const u=Math.min(c/a,et(s-e));i.arc(n,o,a+c/2,e-u/2,s+u/2,!0)}else{const u=Math.min(c/2,r*et(s-e));if(h==="round")i.arc(n,o,u,e-L/2,s+L/2,!0);else if(h==="bevel"){const f=2*u*u,p=-f*Math.cos(e+L/2)+n,g=-f*Math.sin(e+L/2)+o,m=f*Math.cos(s+L/2)+n,b=f*Math.sin(s+L/2)+o;i.lineTo(p,g),i.lineTo(m,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function Ba(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=n/a;i.beginPath(),i.arc(o,r,a,s-c,e+c),l>n?(c=n/l,i.arc(o,r,l,e+c,s-c,!0)):i.arc(o,r,n,e+N,s-N),i.closePath(),i.clip()}function Wa(i){return ui(i,["outerStart","outerEnd","innerStart","innerEnd"])}function Ha(i,t,e,s){const n=Wa(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,s*t/2),a=l=>{const c=(e-Math.min(o,l))*s/2;return U(l,0,Math.min(o,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:U(n.innerStart,0,r),innerEnd:U(n.innerEnd,0,r)}}function At(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function ke(i,t,e,s,n,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const p=n-l;if(s){const I=h>0?h-s:0,z=d>0?d-s:0,B=(I+z)/2,tt=B!==0?p*B/(B+s):p;f=(p-tt)/2}const g=Math.max(.001,p*d-e/L)/d,m=(p-g)/2,b=l+m+f,_=n-m-f,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:k}=Ha(t,u,d,_-b),S=d-y,M=d-v,w=b+y/S,D=_-v/M,C=u+x,O=u+k,V=b+x/C,G=_-k/O;if(i.beginPath(),o){const I=(w+D)/2;if(i.arc(r,a,d,w,I),i.arc(r,a,d,I,D),v>0){const j=At(M,D,r,a);i.arc(j.x,j.y,v,D,_+N)}const z=At(O,_,r,a);if(i.lineTo(z.x,z.y),k>0){const j=At(O,G,r,a);i.arc(j.x,j.y,k,_+N,G+Math.PI)}const B=(_-k/u+(b+x/u))/2;if(i.arc(r,a,u,_-k/u,B,!0),i.arc(r,a,u,B,b+x/u,!0),x>0){const j=At(C,V,r,a);i.arc(j.x,j.y,x,V+Math.PI,b-N)}const tt=At(S,b,r,a);if(i.lineTo(tt.x,tt.y),y>0){const j=At(S,w,r,a);i.arc(j.x,j.y,y,b-N,w)}}else{i.moveTo(r,a);const I=Math.cos(w)*d+r,z=Math.sin(w)*d+a;i.lineTo(I,z);const B=Math.cos(D)*d+r,tt=Math.sin(D)*d+a;i.lineTo(B,tt)}i.closePath()}function Na(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){ke(i,t,e,s,l,n);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%F||F))}return ke(i,t,e,s,l,n),i.fill(),l}function Va(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,p=l.borderAlign==="inner";if(!c)return;i.setLineDash(d||[]),i.lineDashOffset=u,p?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let g=t.endAngle;if(o){ke(i,t,e,s,g,n);for(let m=0;m<o;++m)i.stroke();isNaN(a)||(g=r+(a%F||F))}p&&Ba(i,t,g),l.selfJoin&&g-r>=L&&f===0&&h!=="miter"&&Fa(i,t,g),o||(ke(i,t,e,s,g,n),i.stroke())}class Fl extends ht{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.getProps(["x","y"],s),{angle:o,distance:r}=Fs(n,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,f=P(d,l-a),p=Zt(o,a,l)&&a!==l,g=f>=F||p,m=dt(r,c+u,h+u);return g&&m}getCenterPoint(t){const{x:e,y:s,startAngle:n,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(r+a+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:s}=this,n=(e.offset||0)/4,o=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*n,Math.sin(a)*n);const l=1-Math.sin(Math.min(L,s||0)),c=n*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,Na(t,this,c,o,r),Va(t,this,c,o,r),t.restore()}}function un(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function ja(i,t,e){i.lineTo(e.x,e.y)}function Ya(i){return i.stepped?ro:i.tension||i.cubicInterpolationMode==="monotone"?ao:ja}function fn(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=n<r&&o<r||n>a&&o>a;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function Ua(i,t,e,s){const{points:n,options:o}=t,{count:r,start:a,loop:l,ilen:c}=fn(n,e,s),h=Ya(o);let{move:d=!0,reverse:u}=s||{},f,p,g;for(f=0;f<=c;++f)p=n[(a+(u?c-f:f))%r],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,g,p,u,o.stepped),g=p);return l&&(p=n[(a+(u?c:0))%r],h(i,g,p,u,o.stepped)),!!l}function Xa(i,t,e,s){const n=t.points,{count:o,start:r,ilen:a}=fn(n,e,s),{move:l=!0,reverse:c}=s||{};let h=0,d=0,u,f,p,g,m,b;const _=v=>(r+(c?a-v:v))%o,y=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=n[_(u)],f.skip)continue;const v=f.x,x=f.y,k=v|0;k===p?(x<g?g=x:x>m&&(m=x),h=(d*h+v)/++d):(y(),i.lineTo(v,x),p=k,d=0,g=m=x),b=x}y()}function Ge(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?Xa:Ua}function Ka(i){return i.stepped?Ho:i.tension||i.cubicInterpolationMode==="monotone"?No:vt}function qa(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),un(i,t.options),i.stroke(n)}function Ga(i,t,e,s){const{segments:n,options:o}=t,r=Ge(t);for(const a of n)un(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const Ja=typeof Path2D=="function";function Qa(i,t,e,s){Ja&&!t.options.segment?qa(i,t,e,s):Ga(i,t,e,s)}class Bl extends ht{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;Ro(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Go(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=Xo(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=Ka(s);let c,h;for(c=0,h=r.length;c<h;++c){const{start:d,end:u}=r[c],f=o[d],p=o[u];if(f===p){a.push(f);continue}const g=Math.abs((n-f[e])/(p[e]-f[e])),m=l(f,p,g,s.stepped);m[e]=t[e],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,e,s){return Ge(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=Ge(this);let r=this._loop;e=e||0,s=s||this.points.length-e;for(const a of n)r&=o(t,this,a,{start:e,end:e+s-1});return!!r}draw(t,e,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),Qa(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function fs(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}class Wl extends ht{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.options,{x:o,y:r}=this.getProps(["x","y"],s);return Math.pow(t-o,2)+Math.pow(e-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return fs(this,t,"x",e)}inYRange(t,e){return fs(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const s=e&&t.borderWidth||0;return(e+s)*2}draw(t,e){const s=this.options;this.skip||s.radius<.1||!$t(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Xe(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function gn(i,t){const{x:e,y:s,base:n,width:o,height:r}=i.getProps(["x","y","base","width","height"],t);let a,l,c,h,d;return i.horizontal?(d=r/2,a=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,a=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:a,top:c,right:l,bottom:h}}function ut(i,t,e,s){return i?0:U(t,e,s)}function Za(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=Ys(s);return{t:ut(n.top,o.top,0,e),r:ut(n.right,o.right,0,t),b:ut(n.bottom,o.bottom,0,e),l:ut(n.left,o.left,0,t)}}function $a(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Tt(n),r=Math.min(t,e),a=i.borderSkipped,l=s||A(n);return{topLeft:ut(!l||a.top||a.left,o.topLeft,0,r),topRight:ut(!l||a.top||a.right,o.topRight,0,r),bottomLeft:ut(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:ut(!l||a.bottom||a.right,o.bottomRight,0,r)}}function tl(i){const t=gn(i),e=t.right-t.left,s=t.bottom-t.top,n=Za(i,e/2,s/2),o=$a(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Ve(i,t,e,s){const n=t===null,o=e===null,a=i&&!(n&&o)&&gn(i,s);return a&&(n||dt(t,a.left,a.right))&&(o||dt(e,a.top,a.bottom))}function el(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function il(i,t){i.rect(t.x,t.y,t.w,t.h)}function je(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,r=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+r,radius:i.radius}}class Hl extends ht{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:r}=tl(this),a=el(r.radius)?ye:il;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,je(r,e,o)),t.clip(),a(t,je(o,-e,r)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),a(t,je(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Ve(this,t,e,s)}inXRange(t,e){return Ve(this,t,null,e)}inYRange(t,e){return Ve(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const gs=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},sl=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class ps extends ht{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=E(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=X(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=gs(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+a}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:_,itemHeight:y}=nl(s,e,o,m,n);b>0&&f+y+2*a>h&&(d+=u+a,c.push({width:u,height:f}),p+=u+a,g++,u=f=0),l[b]={left:p,top:f,col:g,width:_,height:y},u=Math.max(u,_),f+=y+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=Rt(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=Y(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=Y(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=Y(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=Y(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;hi(t,this),this._draw(),di(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=W.color,l=Rt(t.rtl,this.left,this.width),c=X(r.font),{padding:h}=r,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=gs(r,d),b=function(k,S,M){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const w=P(M.lineWidth,1);if(n.fillStyle=P(M.fillStyle,a),n.lineCap=P(M.lineCap,"butt"),n.lineDashOffset=P(M.lineDashOffset,0),n.lineJoin=P(M.lineJoin,"miter"),n.lineWidth=w,n.strokeStyle=P(M.strokeStyle,a),n.setLineDash(P(M.lineDash,[])),r.usePointStyle){const D={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:w},C=l.xPlus(k,p/2),O=S+u;js(n,D,C,O,r.pointStyleWidth&&p)}else{const D=S+Math.max((d-g)/2,0),C=l.leftForLtr(k,p),O=Tt(M.borderRadius);n.beginPath(),Object.values(O).some(V=>V!==0)?ye(n,{x:C,y:D,w:p,h:g,radius:O}):n.rect(C,D,p,g),n.fill(),w!==0&&n.stroke()}n.restore()},_=function(k,S,M){te(n,M.text,k,S+m/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();y?f={x:Y(o,this.left+h,this.right-s[0]),y:this.top+h+v,line:0}:f={x:this.left+h,y:Y(o,this.top+v+h,this.bottom-e[0].height),line:0},Js(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach((k,S)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const M=n.measureText(k.text).width,w=l.textAlign(k.textAlign||(k.textAlign=r.textAlign)),D=p+u+M;let C=f.x,O=f.y;l.setWidth(this.width),y?S>0&&C+D+h>this.right&&(O=f.y+=x,f.line++,C=f.x=Y(o,this.left+h,this.right-s[f.line])):S>0&&O+x>this.bottom&&(C=f.x=C+e[f.line].width+h,f.line++,O=f.y=Y(o,this.top+v+h,this.bottom-e[f.line].height));const V=l.x(C);if(b(V,O,k),C=Kn(w,C+p+u,y?C+D:this.right,t.rtl),_(l.x(C),O,k),y)f.x+=D+h;else if(typeof k.text!="string"){const G=c.lineHeight;f.y+=pn(k,G)+h}else f.y+=x}),Qs(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=X(e.font),n=$(e.padding);if(!e.display)return;const o=Rt(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=Y(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+Y(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=Y(a,d,d+u);r.textAlign=o.textAlign(ai(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,te(r,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=X(t.font),s=$(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(dt(t,this.left,this.right)&&dt(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],dt(t,n.left,n.left+n.width)&&dt(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const e=this.options;if(!al(t.type,e))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=sl(n,s);n&&!o&&E(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&E(e.onHover,[t,s,this],this)}else s&&E(e.onClick,[t,s,this],this)}}function nl(i,t,e,s,n){const o=ol(s,i,t,e),r=rl(n,s,t.lineHeight);return{itemWidth:o,itemHeight:r}}function ol(i,t,e,s){let n=i.text;return n&&typeof n!="string"&&(n=n.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function rl(i,t,e){let s=i;return typeof t.text!="string"&&(s=pn(t,e)),s}function pn(i,t){const e=i.text?i.text.length:0;return t*e}function al(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Nl={id:"legend",_element:ps,start(i,t,e){const s=i.legend=new ps({ctx:i.ctx,options:e,chart:i});J.configure(i,s,e),J.addBox(i,s)},stop(i){J.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;J.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=$(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class mn extends ht{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=H(s.text)?s.text.length:1;this._padding=$(s.padding);const o=n*X(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=Y(a,s,o),d=e+t,c=o-s):(r.position==="left"?(h=s+t,d=Y(a,n,e),l=L*-.5):(h=o-t,d=Y(a,e,n),l=L*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=X(e.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);te(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:ai(e.align),textBaseline:"middle",translation:[r,a]})}}function ll(i,t){const e=new mn({ctx:i.ctx,options:t,chart:i});J.configure(i,e,t),J.addBox(i,e),i.titleBlock=e}var Vl={id:"title",_element:mn,start(i,t,e){ll(i,e)},stop(i){const t=i.titleBlock;J.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;J.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Yt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();s.add(l.x),n+=l.y,++o}}return o===0||s.size===0?!1:{x:[...s].reduce((a,l)=>a+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Ye(t,c);h<n&&(n=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function st(i,t){return t&&(H(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function lt(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(\`
21276
+ */class ko{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,s,n){const o=e.listeners[n],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(s-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=_s.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((s,n)=>{if(!s.running||!s.items.length)return;const o=s.items;let r=o.length-1,a=!1,l;for(;r>=0;--r)l=o[r],l._active?(l._total>s.duration&&(s.duration=l._total),l.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(n.draw(),this._notify(n,s,t,"progress")),o.length||(s.running=!1,this._notify(n,s,t,"complete"),s.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let s=e.get(t);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,s)),s}listen(t,e,s){this._getAnims(t).listeners[e].push(s)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((s,n)=>Math.max(s,n._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const s=e.items;let n=s.length-1;for(;n>=0;--n)s[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var rt=new ko;const yi="transparent",So={boolean(i,t,e){return e>.5?t:i},color(i,t,e){const s=ci(i||yi),n=s.valid&&ci(t||yi);return n&&n.valid?n.mix(s,e).hexString():t},number(i,t,e){return i+(t-i)*e}};class wo{constructor(t,e,s,n){const o=e[s];n=ee([t.to,n,o,t.from]);const r=ee([t.from,o,n]);this._active=!0,this._fn=t.fn||So[t.type||typeof r],this._easing=$t[t.easing]||$t.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=s,this._from=r,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,s){if(this._active){this._notify(!1);const n=this._target[this._prop],o=s-this._start,r=this._duration-o;this._start=s,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=ee([t.to,e,n,t.from]),this._from=ee([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,s=this._duration,n=this._prop,o=this._from,r=this._loop,a=this._to;let l;if(this._active=o!==a&&(r||e<s),!this._active){this._target[n]=a,this._notify(!0);return}if(e<0){this._target[n]=o;return}l=e/s%2,l=r&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[n]=this._fn(o,a,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,s)=>{t.push({res:e,rej:s})})}_notify(t){const e=t?"res":"rej",s=this._promises||[];for(let n=0;n<s.length;n++)s[n][e]()}}class Ts{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!A(t))return;const e=Object.keys(W.animation),s=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const o=t[n];if(!A(o))return;const r={};for(const a of e)r[a]=o[a];(H(o.properties)&&o.properties||[n]).forEach(a=>{(a===n||!s.has(a))&&s.set(a,r)})})}_animateOptions(t,e){const s=e.options,n=Po(t,s);if(!n)return[];const o=this._createAnimations(n,s);return s.$shared&&Co(t.options.$animations,s).then(()=>{t.options=s},()=>{}),o}_createAnimations(t,e){const s=this._properties,n=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let l;for(l=r.length-1;l>=0;--l){const c=r[l];if(c.charAt(0)==="$")continue;if(c==="options"){n.push(...this._animateOptions(t,e));continue}const h=e[c];let d=o[c];const u=s.get(c);if(d)if(u&&d.active()){d.update(u,h,a);continue}else d.cancel();if(!u||!u.duration){t[c]=h;continue}o[c]=d=new wo(u,t,c,h),n.push(d)}return n}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const s=this._createAnimations(t,e);if(s.length)return rt.add(this._chart,s),!0}}function Co(i,t){const e=[],s=Object.keys(t);for(let n=0;n<s.length;n++){const o=i[s[n]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function Po(i,t){if(!t)return;let e=i.options;if(!e){i.options=t;return}return e.$shared&&(i.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function vi(i,t){const e=i&&i.options||{},s=e.reverse,n=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:s?o:n,end:s?n:o}}function Do(i,t,e){if(e===!1)return!1;const s=vi(i,e),n=vi(t,e);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}function Oo(i){let t,e,s,n;return A(i)?(t=i.top,e=i.right,s=i.bottom,n=i.left):t=e=s=n=i,{top:t,right:e,bottom:s,left:n,disabled:i===!1}}function Rs(i,t){const e=[],s=i._getSortedDatasetMetas(t);let n,o;for(n=0,o=s.length;n<o;++n)e.push(s[n].index);return e}function Mi(i,t,e,s={}){const n=i.keys,o=s.mode==="single";let r,a,l,c;if(t===null)return;let h=!1;for(r=0,a=n.length;r<a;++r){if(l=+n[r],l===e){if(h=!0,s.all)continue;break}c=i.values[l],J(c)&&(o||t===0||nt(t)===nt(c))&&(t+=c)}return!h&&!s.all?0:t}function Ao(i,t){const{iScale:e,vScale:s}=t,n=e.axis==="x"?"x":"y",o=s.axis==="x"?"x":"y",r=Object.keys(i),a=new Array(r.length);let l,c,h;for(l=0,c=r.length;l<c;++l)h=r[l],a[l]={[n]:h,[o]:i[h]};return a}function Ce(i,t){const e=i&&i.options.stacked;return e||e===void 0&&t.stack!==void 0}function To(i,t,e){return\`\${i.id}.\${t.id}.\${e.stack||e.type}\`}function Ro(i){const{min:t,max:e,minDefined:s,maxDefined:n}=i.getUserBounds();return{min:s?t:Number.NEGATIVE_INFINITY,max:n?e:Number.POSITIVE_INFINITY}}function Lo(i,t,e){const s=i[t]||(i[t]={});return s[e]||(s[e]={})}function ki(i,t,e,s){for(const n of t.getMatchingVisibleMetas(s).reverse()){const o=i[n.index];if(e&&o>0||!e&&o<0)return n.index}return null}function Si(i,t){const{chart:e,_cachedMeta:s}=i,n=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=s,l=o.axis,c=r.axis,h=To(o,r,s),d=t.length;let u;for(let f=0;f<d;++f){const p=t[f],{[l]:g,[c]:m}=p,b=p._stacks||(p._stacks={});u=b[c]=Lo(n,h,g),u[a]=m,u._top=ki(u,r,!0,s.type),u._bottom=ki(u,r,!1,s.type);const _=u._visualValues||(u._visualValues={});_[a]=m}}function Pe(i,t){const e=i.scales;return Object.keys(e).filter(s=>e[s].axis===t).shift()}function Io(i,t){return St(i,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function Eo(i,t,e){return St(i,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function Et(i,t){const e=i.controller.index,s=i.vScale&&i.vScale.axis;if(s){t=t||i._parsed;for(const n of t){const o=n._stacks;if(!o||o[s]===void 0||o[s][e]===void 0)return;delete o[s][e],o[s]._visualValues!==void 0&&o[s]._visualValues[e]!==void 0&&delete o[s]._visualValues[e]}}}const De=i=>i==="reset"||i==="none",wi=(i,t)=>t?i:Object.assign({},i),zo=(i,t,e)=>i&&!t.hidden&&t._stacked&&{keys:Rs(e,!0),values:null};class ve{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Ce(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Et(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,s=this.getDataset(),n=(d,u,f,p)=>d==="x"?u:d==="r"?p:f,o=e.xAxisID=P(s.xAxisID,Pe(t,"x")),r=e.yAxisID=P(s.yAxisID,Pe(t,"y")),a=e.rAxisID=P(s.rAxisID,Pe(t,"r")),l=e.indexAxis,c=e.iAxisID=n(l,o,r,a),h=e.vAxisID=n(l,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(c),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&ri(this._data,this),t._stacked&&Et(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),s=this._data;if(A(e)){const n=this._cachedMeta;this._data=Ao(e,n)}else if(s!==e){if(s){ri(s,this);const n=this._cachedMeta;Et(n),n._parsed=[]}e&&Object.isExtensible(e)&&gn(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,s=this.getDataset();let n=!1;this._dataCheck();const o=e._stacked;e._stacked=Ce(e.vScale,e),e.stack!==s.stack&&(n=!0,Et(e),e.stack=s.stack),this._resyncElements(t),(n||o!==e._stacked)&&(Si(this,e._parsed),e._stacked=Ce(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),s=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:s,_data:n}=this,{iScale:o,_stacked:r}=s,a=o.axis;let l=t===0&&e===n.length?!0:s._sorted,c=t>0&&s._parsed[t-1],h,d,u;if(this._parsing===!1)s._parsed=n,s._sorted=!0,u=n;else{H(n[t])?u=this.parseArrayData(s,n,t,e):A(n[t])?u=this.parseObjectData(s,n,t,e):u=this.parsePrimitiveData(s,n,t,e);const f=()=>d[a]===null||c&&d[a]<c[a];for(h=0;h<e;++h)s._parsed[h+t]=d=u[h],l&&(f()&&(l=!1),c=d);s._sorted=l}r&&Si(this,u)}parsePrimitiveData(t,e,s,n){const{iScale:o,vScale:r}=t,a=o.axis,l=r.axis,c=o.getLabels(),h=o===r,d=new Array(n);let u,f,p;for(u=0,f=n;u<f;++u)p=u+s,d[u]={[a]:h||o.parse(c[p],p),[l]:r.parse(e[p],p)};return d}parseArrayData(t,e,s,n){const{xScale:o,yScale:r}=t,a=new Array(n);let l,c,h,d;for(l=0,c=n;l<c;++l)h=l+s,d=e[h],a[l]={x:o.parse(d[0],h),y:r.parse(d[1],h)};return a}parseObjectData(t,e,s,n){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=new Array(n);let h,d,u,f;for(h=0,d=n;h<d;++h)u=h+s,f=e[u],c[h]={x:o.parse(Mt(f,a),u),y:r.parse(Mt(f,l),u)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,s){const n=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:Rs(n,!0),values:e._stacks[t.axis]._visualValues};return Mi(a,r,o.index,{mode:s})}updateRangeFromParsed(t,e,s,n){const o=s[e.axis];let r=o===null?NaN:o;const a=n&&s._stacks[e.axis];n&&a&&(n.values=a,r=Mi(n,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const s=this._cachedMeta,n=s._parsed,o=s._sorted&&t===s.iScale,r=n.length,a=this._getOtherScale(t),l=zo(e,s,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:d}=Ro(a);let u,f;function p(){f=n[u];const g=f[a.axis];return!J(f[t.axis])||h>g||d<g}for(u=0;u<r&&!(!p()&&(this.updateRangeFromParsed(c,t,f,l),o));++u);if(o){for(u=r-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(c,t,f,l);break}}return c}getAllParsedValues(t){const e=this._cachedMeta._parsed,s=[];let n,o,r;for(n=0,o=e.length;n<o;++n)r=e[n][t.axis],J(r)&&s.push(r);return s}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,s=e.iScale,n=e.vScale,o=this.getParsed(t);return{label:s?""+s.getLabelForValue(o[s.axis]):"",value:n?""+n.getLabelForValue(o[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=Oo(P(this.options.clip,Do(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,s=this._cachedMeta,n=s.data||[],o=e.chartArea,r=[],a=this._drawStart||0,l=this._drawCount||n.length-a,c=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(t,o,a,l),h=a;h<a+l;++h){const d=n[h];d.hidden||(d.active&&c?r.push(d):d.draw(t,o))}for(h=0;h<r.length;++h)r[h].draw(t,o)}getStyle(t,e){const s=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(t||0,s)}getContext(t,e,s){const n=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=Eo(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=n.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Io(this.chart.getContext(),this.index)),o.dataset=n,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=s,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",s){const n=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],l=this.enableOptionSharing&&Xt(s);if(a)return wi(a,l);const c=this.chart.config,h=c.datasetElementScopeKeys(this._type,t),d=n?[\`\${t}Hover\`,"hover",t,""]:[t,""],u=c.getOptionScopes(this.getDataset(),h),f=Object.keys(W.elements[t]),p=()=>this.getContext(s,n,e),g=c.resolveNamedOptions(u,f,p,d);return g.$shared&&(g.$shared=l,o[r]=Object.freeze(wi(g,l))),g}_resolveAnimations(t,e,s){const n=this.chart,o=this._cachedDataOpts,r=\`animation-\${e}\`,a=o[r];if(a)return a;let l;if(n.options.animation!==!1){const h=this.chart.config,d=h.datasetAnimationScopeKeys(this._type,e),u=h.getOptionScopes(this.getDataset(),d);l=h.createResolver(u,this.getContext(t,s,e))}const c=new Ts(n,l&&l.animations);return l&&l._cacheable&&(o[r]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||De(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const s=this.resolveDataElementOptions(t,e),n=this._sharedOptions,o=this.getSharedOptions(s),r=this.includeOptions(e,o)||o!==n;return this.updateSharedOptions(o,e,s),{sharedOptions:o,includeOptions:r}}updateElement(t,e,s,n){De(n)?Object.assign(t,s):this._resolveAnimations(e,n).update(t,s)}updateSharedOptions(t,e,s){t&&!De(e)&&this._resolveAnimations(void 0,e).update(t,s)}_setStyle(t,e,s,n){t.active=n;const o=this.getStyle(e,n);this._resolveAnimations(e,s,n).update(t,{options:!n&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,s){this._setStyle(t,s,"active",!1)}setHoverStyle(t,e,s){this._setStyle(t,s,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,s=this._cachedMeta.data;for(const[a,l,c]of this._syncList)this[a](l,c);this._syncList=[];const n=s.length,o=e.length,r=Math.min(o,n);r&&this.parse(0,r),o>n?this._insertElements(n,o-n,t):o<n&&this._removeElements(o,n-o)}_insertElements(t,e,s=!0){const n=this._cachedMeta,o=n.data,r=t+e;let a;const l=c=>{for(c.length+=e,a=c.length-1;a>=r;a--)c[a]=c[a-e]};for(l(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&l(n._parsed),this.parse(t,e),s&&this.updateElements(o,t,e,"reset")}updateElements(t,e,s,n){}_removeElements(t,e){const s=this._cachedMeta;if(this._parsing){const n=s._parsed.splice(t,e);s._stacked&&Et(s,n)}s.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,s,n]=t;this[e](s,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const s=arguments.length-2;s&&this._sync(["_insertElements",t,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Fo(i,t){if(!i._cache.$bar){const e=i.getMatchingVisibleMetas(t);let s=[];for(let n=0,o=e.length;n<o;n++)s=s.concat(e[n].controller.getAllParsedValues(i));i._cache.$bar=bs(s.sort((n,o)=>n-o))}return i._cache.$bar}function Bo(i){const t=i.iScale,e=Fo(t,i.type);let s=t._length,n,o,r,a;const l=()=>{r===32767||r===-32768||(Xt(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(n=0,o=e.length;n<o;++n)r=t.getPixelForValue(e[n]),l();for(a=void 0,n=0,o=t.ticks.length;n<o;++n)r=t.getPixelForTick(n),l();return s}function Wo(i,t,e,s){const n=e.barThickness;let o,r;return T(n)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=n*s,r=1),{chunk:o/s,ratio:r,start:t.pixels[i]-o/2}}function Ho(i,t,e,s){const n=t.pixels,o=n[i];let r=i>0?n[i-1]:null,a=i<n.length-1?n[i+1]:null;const l=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const c=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/s,ratio:e.barPercentage,start:c}}function No(i,t,e,s){const n=e.parse(i[0],s),o=e.parse(i[1],s),r=Math.min(n,o),a=Math.max(n,o);let l=r,c=a;Math.abs(r)>Math.abs(a)&&(l=a,c=r),t[e.axis]=c,t._custom={barStart:l,barEnd:c,start:n,end:o,min:r,max:a}}function Ls(i,t,e,s){return H(i)?No(i,t,e,s):t[e.axis]=e.parse(i,s),t}function Ci(i,t,e,s){const n=i.iScale,o=i.vScale,r=n.getLabels(),a=n===o,l=[];let c,h,d,u;for(c=e,h=e+s;c<h;++c)u=t[c],d={},d[n.axis]=a||n.parse(r[c],c),l.push(Ls(u,d,o,c));return l}function Oe(i){return i&&i.barStart!==void 0&&i.barEnd!==void 0}function Vo(i,t,e){return i!==0?nt(i):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function jo(i){let t,e,s,n,o;return i.horizontal?(t=i.base>i.x,e="left",s="right"):(t=i.base<i.y,e="bottom",s="top"),t?(n="end",o="start"):(n="start",o="end"),{start:e,end:s,reverse:t,top:n,bottom:o}}function $o(i,t,e,s){let n=t.borderSkipped;const o={};if(!n){i.borderSkipped=o;return}if(n===!0){i.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:l,top:c,bottom:h}=jo(i);n==="middle"&&e&&(i.enableBorderRadius=!0,(e._top||0)===s?n=c:(e._bottom||0)===s?n=h:(o[Pi(h,r,a,l)]=!0,n=c)),o[Pi(n,r,a,l)]=!0,i.borderSkipped=o}function Pi(i,t,e,s){return s?(i=Yo(i,t,e),i=Di(i,e,t)):i=Di(i,t,e),i}function Yo(i,t,e){return i===t?e:i===e?t:i}function Di(i,t,e){return i==="start"?t:i==="end"?e:i}function Uo(i,{inflateAmount:t},e){i.inflateAmount=t==="auto"?e===1?.33:0:t}class Ua extends ve{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,s,n){return Ci(t,e,s,n)}parseArrayData(t,e,s,n){return Ci(t,e,s,n)}parseObjectData(t,e,s,n){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?a:l,h=r.axis==="x"?a:l,d=[];let u,f,p,g;for(u=s,f=s+n;u<f;++u)g=e[u],p={},p[o.axis]=o.parse(Mt(g,c),u),d.push(Ls(Mt(g,h),p,r,u));return d}updateRangeFromParsed(t,e,s,n){super.updateRangeFromParsed(t,e,s,n);const o=s._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:s,vScale:n}=e,o=this.getParsed(t),r=o._custom,a=Oe(r)?"["+r.start+", "+r.end+"]":""+n.getLabelForValue(o[n.axis]);return{label:""+s.getLabelForValue(o[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,s,n){const o=n==="reset",{index:r,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),c=a.isHorizontal(),h=this._getRuler(),{sharedOptions:d,includeOptions:u}=this._getSharedOptions(e,n);for(let f=e;f<e+s;f++){const p=this.getParsed(f),g=o||T(p[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,h),b=(p._stacks||{})[a.axis],_={horizontal:c,base:g.base,enableBorderRadius:!b||Oe(p._custom)||r===b._top||r===b._bottom,x:c?g.head:m.center,y:c?m.center:g.head,height:c?m.size:Math.abs(g.size),width:c?Math.abs(g.size):m.size};u&&(_.options=d||this.resolveDataElementOptions(f,t[f].active?"active":n));const y=_.options||t[f].options;$o(_,y,b,r),Uo(_,y,h.ratio),this.updateElement(t[f],f,_,n)}}_getStacks(t,e){const{iScale:s}=this._cachedMeta,n=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),o=s.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),l=a&&a[s.axis],c=h=>{const d=h._parsed.find(f=>f[s.axis]===l),u=d&&d[h.vScale.axis];if(T(u)||isNaN(u))return!0};for(const h of n)if(!(e!==void 0&&c(h))&&((o===!1||r.indexOf(h.stack)===-1||o===void 0&&h.stack===void 0)&&r.push(h.stack),h.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(s=>t[s].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)t[P(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,s){const n=this._getStacks(t,s),o=e!==void 0?n.indexOf(e):-1;return o===-1?n.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,s=e.iScale,n=[];let o,r;for(o=0,r=e.data.length;o<r;++o)n.push(s.getPixelForValue(this.getParsed(o)[s.axis],o));const a=t.barThickness;return{min:a||Bo(e),pixels:n,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:s,index:n},options:{base:o,minBarLength:r}}=this,a=o||0,l=this.getParsed(t),c=l._custom,h=Oe(c);let d=l[e.axis],u=0,f=s?this.applyStack(e,l,s):d,p,g;f!==d&&(u=f-d,f=d),h&&(d=c.barStart,f=c.barEnd-c.barStart,d!==0&&nt(d)!==nt(c.barEnd)&&(u=0),u+=d);const m=!T(o)&&!h?o:u;let b=e.getPixelForValue(m);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(u+f):p=b,g=p-b,Math.abs(g)<r){g=Vo(g,e,a)*r,d===a&&(b-=g/2);const _=e.getPixelForDecimal(0),y=e.getPixelForDecimal(1),v=Math.min(_,y),x=Math.max(_,y);b=Math.max(Math.min(b,x),v),p=b+g,s&&!h&&(l._stacks[e.axis]._visualValues[n]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const _=nt(g)*e.getLineWidthForValue(a)/2;b+=_,g-=_}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const s=e.scale,n=this.options,o=n.skipNull,r=P(n.maxBarThickness,1/0);let a,l;const c=this._getAxisCount();if(e.grouped){const h=o?this._getStackCount(t):e.stackCount,d=n.barThickness==="flex"?Ho(t,e,n,h*c):Wo(t,e,n,h*c),u=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(P(u,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+f;a=d.start+d.chunk*p+d.chunk/2,l=Math.min(r,d.chunk*d.ratio)}else a=s.getPixelForValue(this.getParsed(t)[s.axis],t),l=Math.min(r,e.min*e.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const t=this._cachedMeta,e=t.vScale,s=t.data,n=s.length;let o=0;for(;o<n;++o)this.getParsed(o)[e.axis]!==null&&!s[o].hidden&&s[o].draw(this._ctx)}}function Xo(i,t,e){let s=1,n=1,o=0,r=0;if(t<F){const a=i,l=a+t,c=Math.cos(a),h=Math.sin(a),d=Math.cos(l),u=Math.sin(l),f=(y,v,x)=>Gt(y,a,l,!0)?1:Math.max(v,v*e,x,x*e),p=(y,v,x)=>Gt(y,a,l,!0)?-1:Math.min(v,v*e,x,x*e),g=f(0,c,d),m=f(N,h,u),b=p(L,c,d),_=p(L+N,h,u);s=(g-b)/2,n=(m-_)/2,o=-(g+b)/2,r=-(m+_)/2}return{ratioX:s,ratioY:n,offsetX:o,offsetY:r}}class Xa extends ve{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:s,color:n}}=t.legend.options;return e.labels.map((o,r)=>{const l=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:n,lineWidth:l.borderWidth,pointStyle:s,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,s){s.chart.toggleDataVisibility(e.index),s.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const s=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=s;else{let o=l=>+s[l];if(A(s[t])){const{key:l="value"}=this._parsing;o=c=>+Mt(s[c],l)}let r,a;for(r=t,a=t+e;r<a;++r)n._parsed[r]=o(r)}}_getRotation(){return lt(this.options.rotation-90)}_getCircumference(){return lt(this.options.circumference)}_getRotationExtents(){let t=F,e=-F;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const n=this.chart.getDatasetMeta(s).controller,o=n._getRotation(),r=n._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:s}=e,n=this._cachedMeta,o=n.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-r)/2,0),l=Math.min(qs(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:h,rotation:d}=this._getRotationExtents(),{ratioX:u,ratioY:f,offsetX:p,offsetY:g}=Xo(d,h,l),m=(s.width-r)/u,b=(s.height-r)/f,_=Math.max(Math.min(m,b)/2,0),y=us(this.options.radius,_),v=Math.max(y*l,0),x=(y-v)/this._getVisibleDatasetWeightTotal();this.offsetX=p*y,this.offsetY=g*y,n.total=this.calculateTotal(),this.outerRadius=y-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const s=this.options,n=this._cachedMeta,o=this._getCircumference();return e&&s.animation.animateRotate||!this.chart.getDataVisibility(t)||n._parsed[t]===null||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*o/F)}updateElements(t,e,s,n){const o=n==="reset",r=this.chart,a=r.chartArea,c=r.options.animation,h=(a.left+a.right)/2,d=(a.top+a.bottom)/2,u=o&&c.animateScale,f=u?0:this.innerRadius,p=u?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(e,n);let b=this._getRotation(),_;for(_=0;_<e;++_)b+=this._circumference(_,o);for(_=e;_<e+s;++_){const y=this._circumference(_,o),v=t[_],x={x:h+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+y,circumference:y,outerRadius:p,innerRadius:f};m&&(x.options=g||this.resolveDataElementOptions(_,v.active?"active":n)),b+=y,this.updateElement(v,_,x,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let s=0,n;for(n=0;n<e.length;n++){const o=t._parsed[n];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(n)&&!e[n].hidden&&(s+=Math.abs(o))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?F*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,s=this.chart,n=s.data.labels||[],o=Ye(e._parsed[t],s.options.locale);return{label:n[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const s=this.chart;let n,o,r,a,l;if(!t){for(n=0,o=s.data.datasets.length;n<o;++n)if(s.isDatasetVisible(n)){r=s.getDatasetMeta(n),t=r.data,a=r.controller;break}}if(!t)return 0;for(n=0,o=t.length;n<o;++n)l=a.resolveDataElementOptions(n),l.borderAlign!=="inner"&&(e=Math.max(e,l.borderWidth||0,l.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let s=0,n=t.length;s<n;++s){const o=this.resolveDataElementOptions(s);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let s=0;s<t;++s)this.chart.isDatasetVisible(s)&&(e+=this._getRingWeight(s));return e}_getRingWeight(t){return Math.max(P(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Ka extends ve{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:s,data:n=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:l}=bn(e,n,r);this._drawStart=a,this._drawCount=l,_n(e)&&(a=0,l=n.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=n;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(s,void 0,{animated:!r,options:c},t),this.updateElements(n,a,l,t)}updateElements(t,e,s,n){const o=n==="reset",{iScale:r,vScale:a,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:h,includeOptions:d}=this._getSharedOptions(e,n),u=r.axis,f=a.axis,{spanGaps:p,segment:g}=this.options,m=Kt(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||n==="none",_=e+s,y=t.length;let v=e>0&&this.getParsed(e-1);for(let x=0;x<y;++x){const k=t[x],S=b?k:{};if(x<e||x>=_){S.skip=!0;continue}const M=this.getParsed(x),w=T(M[f]),D=S[u]=r.getPixelForValue(M[u],x),C=S[f]=o||w?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,M,l):M[f],x);S.skip=isNaN(D)||isNaN(C)||w,S.stop=x>0&&Math.abs(M[u]-v[u])>m,g&&(S.parsed=M,S.raw=c.data[x]),d&&(S.options=h||this.resolveDataElementOptions(x,k.active?"active":n)),b||this.updateElement(k,x,S,n),v=M}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,s=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),r=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function bt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ti{static override(t){Object.assign(ti.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return bt()}parse(){return bt()}format(){return bt()}add(){return bt()}diff(){return bt()}startOf(){return bt()}endOf(){return bt()}}var Ko={_date:ti};function Go(i,t,e,s){const{controller:n,data:o,_sorted:r}=i,a=n._cachedMeta.iScale,l=i.dataset&&i.dataset.options?i.dataset.options.spanGaps:null;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?un:yt;if(s){if(n._sharedOptions){const h=o[0],d=typeof h.getRange=="function"&&h.getRange(t);if(d){const u=c(o,t,e-d),f=c(o,t,e+d);return{lo:u.lo,hi:f.hi}}}}else{const h=c(o,t,e);if(l){const{vScale:d}=n._cachedMeta,{_parsed:u}=i,f=u.slice(0,h.lo+1).reverse().findIndex(g=>!T(g[d.axis]));h.lo-=Math.max(0,f);const p=u.slice(h.hi).findIndex(g=>!T(g[d.axis]));h.hi+=Math.max(0,p)}return h}}return{lo:0,hi:o.length-1}}function Me(i,t,e,s,n){const o=i.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,l=o.length;a<l;++a){const{index:c,data:h}=o[a],{lo:d,hi:u}=Go(o[a],t,r,n);for(let f=d;f<=u;++f){const p=h[f];p.skip||s(p,c,f)}}}function qo(i){const t=i.indexOf("x")!==-1,e=i.indexOf("y")!==-1;return function(s,n){const o=t?Math.abs(s.x-n.x):0,r=e?Math.abs(s.y-n.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function Ae(i,t,e,s,n){const o=[];return!n&&!i.isPointInArea(t)||Me(i,e,t,function(a,l,c){!n&&!qt(a,i.chartArea,0)||a.inRange(t.x,t.y,s)&&o.push({element:a,datasetIndex:l,index:c})},!0),o}function Jo(i,t,e,s){let n=[];function o(r,a,l){const{startAngle:c,endAngle:h}=r.getProps(["startAngle","endAngle"],s),{angle:d}=ps(r,{x:t.x,y:t.y});Gt(d,c,h)&&n.push({element:r,datasetIndex:a,index:l})}return Me(i,e,t,o),n}function Qo(i,t,e,s,n,o){let r=[];const a=qo(e);let l=Number.POSITIVE_INFINITY;function c(h,d,u){const f=h.inRange(t.x,t.y,n);if(s&&!f)return;const p=h.getCenterPoint(n);if(!(!!o||i.isPointInArea(p))&&!f)return;const m=a(t,p);m<l?(r=[{element:h,datasetIndex:d,index:u}],l=m):m===l&&r.push({element:h,datasetIndex:d,index:u})}return Me(i,e,t,c),r}function Te(i,t,e,s,n,o){return!o&&!i.isPointInArea(t)?[]:e==="r"&&!s?Jo(i,t,e,n):Qo(i,t,e,s,n,o)}function Oi(i,t,e,s,n){const o=[],r=e==="x"?"inXRange":"inYRange";let a=!1;return Me(i,e,t,(l,c,h)=>{l[r]&&l[r](t[e],n)&&(o.push({element:l,datasetIndex:c,index:h}),a=a||l.inRange(t.x,t.y,n))}),s&&!a?[]:o}var Zo={modes:{index(i,t,e,s){const n=_t(t,i),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?Ae(i,n,o,s,r):Te(i,n,o,!1,s,r),l=[];return a.length?(i.getSortedVisibleDatasetMetas().forEach(c=>{const h=a[0].index,d=c.data[h];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:h})}),l):[]},dataset(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?Ae(i,n,o,s,r):Te(i,n,o,!1,s,r);if(a.length>0){const l=a[0].datasetIndex,c=i.getDatasetMeta(l).data;a=[];for(let h=0;h<c.length;++h)a.push({element:c[h],datasetIndex:l,index:h})}return a},point(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Ae(i,n,o,s,r)},nearest(i,t,e,s){const n=_t(t,i),o=e.axis||"xy",r=e.includeInvisible||!1;return Te(i,n,o,e.intersect,s,r)},x(i,t,e,s){const n=_t(t,i);return Oi(i,n,"x",e.intersect,s)},y(i,t,e,s){const n=_t(t,i);return Oi(i,n,"y",e.intersect,s)}}};const Is=["left","top","right","bottom"];function zt(i,t){return i.filter(e=>e.pos===t)}function Ai(i,t){return i.filter(e=>Is.indexOf(e.pos)===-1&&e.box.axis===t)}function Ft(i,t){return i.sort((e,s)=>{const n=t?s:e,o=t?e:s;return n.weight===o.weight?n.index-o.index:n.weight-o.weight})}function tr(i){const t=[];let e,s,n,o,r,a;for(e=0,s=(i||[]).length;e<s;++e)n=i[e],{position:o,options:{stack:r,stackWeight:a=1}}=n,t.push({index:e,box:n,pos:o,horizontal:n.isHorizontal(),weight:n.weight,stack:r&&o+r,stackWeight:a});return t}function er(i){const t={};for(const e of i){const{stack:s,pos:n,stackWeight:o}=e;if(!s||!Is.includes(n))continue;const r=t[s]||(t[s]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function ir(i,t){const e=er(i),{vBoxMaxWidth:s,hBoxMaxHeight:n}=t;let o,r,a;for(o=0,r=i.length;o<r;++o){a=i[o];const{fullSize:l}=a.box,c=e[a.stack],h=c&&a.stackWeight/c.weight;a.horizontal?(a.width=h?h*s:l&&t.availableWidth,a.height=n):(a.width=s,a.height=h?h*n:l&&t.availableHeight)}return e}function sr(i){const t=tr(i),e=Ft(t.filter(c=>c.box.fullSize),!0),s=Ft(zt(t,"left"),!0),n=Ft(zt(t,"right")),o=Ft(zt(t,"top"),!0),r=Ft(zt(t,"bottom")),a=Ai(t,"x"),l=Ai(t,"y");return{fullSize:e,leftAndTop:s.concat(o),rightAndBottom:n.concat(l).concat(r).concat(a),chartArea:zt(t,"chartArea"),vertical:s.concat(n).concat(l),horizontal:o.concat(r).concat(a)}}function Ti(i,t,e,s){return Math.max(i[e],t[e])+Math.max(i[s],t[s])}function Es(i,t){i.top=Math.max(i.top,t.top),i.left=Math.max(i.left,t.left),i.bottom=Math.max(i.bottom,t.bottom),i.right=Math.max(i.right,t.right)}function nr(i,t,e,s){const{pos:n,box:o}=e,r=i.maxPadding;if(!A(n)){e.size&&(i[n]-=e.size);const d=s[e.stack]||{size:0,count:1};d.size=Math.max(d.size,e.horizontal?o.height:o.width),e.size=d.size/d.count,i[n]+=e.size}o.getPadding&&Es(r,o.getPadding());const a=Math.max(0,t.outerWidth-Ti(r,i,"left","right")),l=Math.max(0,t.outerHeight-Ti(r,i,"top","bottom")),c=a!==i.w,h=l!==i.h;return i.w=a,i.h=l,e.horizontal?{same:c,other:h}:{same:h,other:c}}function or(i){const t=i.maxPadding;function e(s){const n=Math.max(t[s]-i[s],0);return i[s]+=n,n}i.y+=e("top"),i.x+=e("left"),e("right"),e("bottom")}function rr(i,t){const e=t.maxPadding;function s(n){const o={left:0,top:0,right:0,bottom:0};return n.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return s(i?["left","right"]:["top","bottom"])}function Ht(i,t,e,s){const n=[];let o,r,a,l,c,h;for(o=0,r=i.length,c=0;o<r;++o){a=i[o],l=a.box,l.update(a.width||t.w,a.height||t.h,rr(a.horizontal,t));const{same:d,other:u}=nr(t,e,a,s);c|=d&&n.length,h=h||u,l.fullSize||n.push(a)}return c&&Ht(n,t,e,s)||h}function oe(i,t,e,s,n){i.top=e,i.left=t,i.right=t+s,i.bottom=e+n,i.width=s,i.height=n}function Ri(i,t,e,s){const n=e.padding;let{x:o,y:r}=t;for(const a of i){const l=a.box,c=s[a.stack]||{placed:0,weight:1},h=a.stackWeight/c.weight||1;if(a.horizontal){const d=t.w*h,u=c.size||l.height;Xt(c.start)&&(r=c.start),l.fullSize?oe(l,n.left,r,e.outerWidth-n.right-n.left,u):oe(l,t.left+c.placed,r,d,u),c.start=r,c.placed+=d,r=l.bottom}else{const d=t.h*h,u=c.size||l.width;Xt(c.start)&&(o=c.start),l.fullSize?oe(l,o,n.top,u,e.outerHeight-n.bottom-n.top):oe(l,o,t.top+c.placed,u,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=r}var q={addBox(i,t){i.boxes||(i.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},i.boxes.push(t)},removeBox(i,t){const e=i.boxes?i.boxes.indexOf(t):-1;e!==-1&&i.boxes.splice(e,1)},configure(i,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(i,t,e,s){if(!i)return;const n=Q(i.options.layout.padding),o=Math.max(t-n.width,0),r=Math.max(e-n.height,0),a=sr(i.boxes),l=a.vertical,c=a.horizontal;R(i.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const h=l.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:e,padding:n,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/h,hBoxMaxHeight:r/2}),u=Object.assign({},n);Es(u,Q(s));const f=Object.assign({maxPadding:u,w:o,h:r,x:n.left,y:n.top},n),p=ir(l.concat(c),d);Ht(a.fullSize,f,d,p),Ht(l,f,d,p),Ht(c,f,d,p)&&Ht(l,f,d,p),or(f),Ri(a.leftAndTop,f,d,p),f.x+=f.w,f.y+=f.h,Ri(a.rightAndBottom,f,d,p),i.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},R(a.chartArea,g=>{const m=g.box;Object.assign(m,i.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class zs{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,s){}removeEventListener(t,e,s){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,s,n){return e=Math.max(0,e||t.width),s=s||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):s)}}isAttached(t){return!0}updateConfig(t){}}class ar extends zs{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const de="$chartjs",lr={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Li=i=>i===null||i==="";function cr(i,t){const e=i.style,s=i.getAttribute("height"),n=i.getAttribute("width");if(i[de]={initial:{height:s,width:n,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Li(n)){const o=mi(i,"width");o!==void 0&&(i.width=o)}if(Li(s))if(i.style.height==="")i.height=i.width/(t||2);else{const o=mi(i,"height");o!==void 0&&(i.height=o)}return i}const Fs=ao?{passive:!0}:!1;function hr(i,t,e){i&&i.addEventListener(t,e,Fs)}function dr(i,t,e){i&&i.canvas&&i.canvas.removeEventListener(t,e,Fs)}function ur(i,t){const e=lr[i.type]||i.type,{x:s,y:n}=_t(i,t);return{type:e,chart:t,native:i,x:s!==void 0?s:null,y:n!==void 0?n:null}}function _e(i,t){for(const e of i)if(e===t||e.contains(t))return!0}function fr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||_e(a.addedNodes,s),r=r&&!_e(a.removedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}function gr(i,t,e){const s=i.canvas,n=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||_e(a.removedNodes,s),r=r&&!_e(a.addedNodes,s);r&&e()});return n.observe(document,{childList:!0,subtree:!0}),n}const Qt=new Map;let Ii=0;function Bs(){const i=window.devicePixelRatio;i!==Ii&&(Ii=i,Qt.forEach((t,e)=>{e.currentDevicePixelRatio!==i&&t()}))}function pr(i,t){Qt.size||window.addEventListener("resize",Bs),Qt.set(i,t)}function mr(i){Qt.delete(i),Qt.size||window.removeEventListener("resize",Bs)}function br(i,t,e){const s=i.canvas,n=s&&Ze(s);if(!n)return;const o=xs((a,l)=>{const c=n.clientWidth;e(a,l),c<n.clientWidth&&e()},window),r=new ResizeObserver(a=>{const l=a[0],c=l.contentRect.width,h=l.contentRect.height;c===0&&h===0||o(c,h)});return r.observe(n),pr(i,o),r}function Re(i,t,e){e&&e.disconnect(),t==="resize"&&mr(i)}function _r(i,t,e){const s=i.canvas,n=xs(o=>{i.ctx!==null&&e(ur(o,i))},i);return hr(s,t,n),n}class xr extends zs{acquireContext(t,e){const s=t&&t.getContext&&t.getContext("2d");return s&&s.canvas===t?(cr(t,e),s):null}releaseContext(t){const e=t.canvas;if(!e[de])return!1;const s=e[de].initial;["height","width"].forEach(o=>{const r=s[o];T(r)?e.removeAttribute(o):e.setAttribute(o,r)});const n=s.style||{};return Object.keys(n).forEach(o=>{e.style[o]=n[o]}),e.width=e.width,delete e[de],!0}addEventListener(t,e,s){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:fr,detach:gr,resize:br}[e]||_r;n[e]=r(t,e,s)}removeEventListener(t,e){const s=t.$proxies||(t.$proxies={}),n=s[e];if(!n)return;({attach:Re,detach:Re,resize:Re}[e]||dr)(t,e,n),s[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,s,n){return ro(t,e,s,n)}isAttached(t){const e=t&&Ze(t);return!!(e&&e.isConnected)}}function yr(i){return!Qe()||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas?ar:xr}class ct{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}hasValue(){return Kt(this.x)&&Kt(this.y)}getProps(t,e){const s=this.$animations;if(!e||!s)return this;const n={};return t.forEach(o=>{n[o]=s[o]&&s[o].active()?s[o]._to:this[o]}),n}}function vr(i,t){const e=i.options.ticks,s=Mr(i),n=Math.min(e.maxTicksLimit||s,s),o=e.major.enabled?Sr(t):[],r=o.length,a=o[0],l=o[r-1],c=[];if(r>n)return wr(t,c,o,r/n),c;const h=kr(o,t,n);if(r>0){let d,u;const f=r>1?Math.round((l-a)/(r-1)):null;for(re(t,c,h,T(f)?0:a-f,a),d=0,u=r-1;d<u;d++)re(t,c,h,o[d],o[d+1]);return re(t,c,h,l,T(f)?t.length:l+f),c}return re(t,c,h),c}function Mr(i){const t=i.options.offset,e=i._tickSize(),s=i._length/e+(t?0:1),n=i._maxLength/e;return Math.floor(Math.min(s,n))}function kr(i,t,e){const s=Cr(i),n=t.length/e;if(!s)return Math.max(n,1);const o=on(s);for(let r=0,a=o.length-1;r<a;r++){const l=o[r];if(l>n)return l}return Math.max(n,1)}function Sr(i){const t=[];let e,s;for(e=0,s=i.length;e<s;e++)i[e].major&&t.push(e);return t}function wr(i,t,e,s){let n=0,o=e[0],r;for(s=Math.ceil(s),r=0;r<i.length;r++)r===o&&(t.push(i[r]),n++,o=e[n*s])}function re(i,t,e,s,n){const o=P(s,0),r=Math.min(P(n,i.length),i.length);let a=0,l,c,h;for(e=Math.ceil(e),n&&(l=n-s,e=l/Math.floor(l/e)),h=o;h<0;)a++,h=Math.round(o+a*e);for(c=Math.max(o,0);c<r;c++)c===h&&(t.push(i[c]),a++,h=Math.round(o+a*e))}function Cr(i){const t=i.length;let e,s;if(t<2)return!1;for(s=i[0],e=1;e<t;++e)if(i[e]-i[e-1]!==s)return!1;return s}const Pr=i=>i==="left"?"right":i==="right"?"left":i,Ei=(i,t,e)=>t==="top"||t==="left"?i[t]+e:i[t]-e,zi=(i,t)=>Math.min(t||i,i);function Fi(i,t){const e=[],s=i.length/t,n=i.length;let o=0;for(;o<n;o+=s)e.push(i[Math.floor(o)]);return e}function Dr(i,t,e){const s=i.ticks.length,n=Math.min(t,s-1),o=i._startPixel,r=i._endPixel,a=1e-6;let l=i.getPixelForTick(n),c;if(!(e&&(s===1?c=Math.max(l-o,r-l):t===0?c=(i.getPixelForTick(1)-l)/2:c=(l-i.getPixelForTick(n-1))/2,l+=n<t?c:-c,l<o-a||l>r+a)))return l}function Or(i,t){R(i,e=>{const s=e.gc,n=s.length/2;let o;if(n>t){for(o=0;o<n;++o)delete e.data[s[o]];s.splice(0,n)}})}function Bt(i){return i.drawTicks?i.tickLength:0}function Bi(i,t){if(!i.display)return 0;const e=U(i.font,t),s=Q(i.padding);return(H(i.text)?i.text.length:1)*e.lineHeight+s.height}function Ar(i,t){return St(i,{scale:t,type:"scale"})}function Tr(i,t,e){return St(i,{tick:e,index:t,type:"tick"})}function Rr(i,t,e){let s=je(i);return(e&&t!=="right"||!e&&t==="right")&&(s=Pr(s)),s}function Lr(i,t,e,s){const{top:n,left:o,bottom:r,right:a,chart:l}=i,{chartArea:c,scales:h}=l;let d=0,u,f,p;const g=r-n,m=a-o;if(i.isHorizontal()){if(f=$(s,o,a),A(e)){const b=Object.keys(e)[0],_=e[b];p=h[b].getPixelForValue(_)+g-t}else e==="center"?p=(c.bottom+c.top)/2+g-t:p=Ei(i,e,t);u=a-o}else{if(A(e)){const b=Object.keys(e)[0],_=e[b];f=h[b].getPixelForValue(_)-m+t}else e==="center"?f=(c.left+c.right)/2-m+t:f=Ei(i,e,t);p=$(s,r,n),d=e==="left"?-N:N}return{titleX:f,titleY:p,maxWidth:u,rotation:d}}class Rt extends ct{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:s,_suggestedMax:n}=this;return t=et(t,Number.POSITIVE_INFINITY),e=et(e,Number.NEGATIVE_INFINITY),s=et(s,Number.POSITIVE_INFINITY),n=et(n,Number.NEGATIVE_INFINITY),{min:et(t,s),max:et(e,n),minDefined:J(t),maxDefined:J(e)}}getMinMax(t){let{min:e,max:s,minDefined:n,maxDefined:o}=this.getUserBounds(),r;if(n&&o)return{min:e,max:s};const a=this.getMatchingVisibleMetas();for(let l=0,c=a.length;l<c;++l)r=a[l].controller.getMinMax(this,t),n||(e=Math.min(e,r.min)),o||(s=Math.max(s,r.max));return e=o&&e>s?s:e,s=n&&e>s?e:s,{min:et(e,et(s,e)),max:et(s,et(e,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){E(this.options.beforeUpdate,[this])}update(t,e,s){const{beginAtZero:n,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=s=Object.assign({left:0,right:0,top:0,bottom:0},s),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+s.left+s.right:this.height+s.top+s.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Bn(this,o,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Fi(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=vr(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,s;this.isHorizontal()?(e=this.left,s=this.right):(e=this.top,s=this.bottom,t=!t),this._startPixel=e,this._endPixel=s,this._reversePixels=t,this._length=s-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){E(this.options.afterUpdate,[this])}beforeSetDimensions(){E(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){E(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),E(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){E(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let s,n,o;for(s=0,n=t.length;s<n;s++)o=t[s],o.label=E(e.callback,[o.value,s,t],this)}afterTickToLabelConversion(){E(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){E(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,s=zi(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,o=e.maxRotation;let r=n,a,l,c;if(!this._isVisible()||!e.display||n>=o||s<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),d=h.widest.width,u=h.highest.height,f=Y(this.chart.width-d,0,this.maxWidth);a=t.offset?this.maxWidth/s:f/(s-1),d+6>a&&(a=f/(s-(t.offset?.5:1)),l=this.maxHeight-Bt(t.grid)-e.padding-Bi(t.title,this.chart.options.font),c=Math.sqrt(d*d+u*u),r=cn(Math.min(Math.asin(Y((h.highest.height+6)/a,-1,1)),Math.asin(Y(l/c,-1,1))-Math.asin(Y(u/c,-1,1)))),r=Math.max(n,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){E(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){E(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:s,title:n,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const l=Bi(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=Bt(o)+l):(t.height=this.maxHeight,t.width=Bt(o)+l),s.display&&this.ticks.length){const{first:c,last:h,widest:d,highest:u}=this._getLabelSizes(),f=s.padding*2,p=lt(this.labelRotation),g=Math.cos(p),m=Math.sin(p);if(a){const b=s.mirror?0:m*d.width+g*u.height;t.height=Math.min(this.maxHeight,t.height+b+f)}else{const b=s.mirror?0:g*d.width+m*u.height;t.width=Math.min(this.maxWidth,t.width+b+f)}this._calculatePadding(c,h,m,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,s,n){const{ticks:{align:o,padding:r},position:a}=this.options,l=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let u=0,f=0;l?c?(u=n*t.width,f=s*e.height):(u=s*t.height,f=n*e.width):o==="start"?f=e.width:o==="end"?u=t.width:o!=="inner"&&(u=t.width/2,f=e.width/2),this.paddingLeft=Math.max((u-h+r)*this.width/(this.width-h),0),this.paddingRight=Math.max((f-d+r)*this.width/(this.width-d),0)}else{let h=e.height/2,d=t.height/2;o==="start"?(h=0,d=t.height):o==="end"&&(h=e.height,d=0),this.paddingTop=h+r,this.paddingBottom=d+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){E(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,s;for(e=0,s=t.length;e<s;e++)T(t[e].label)&&(t.splice(e,1),s--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let s=this.ticks;e<s.length&&(s=Fi(s,e)),this._labelSizes=t=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,s){const{ctx:n,_longestTextCache:o}=this,r=[],a=[],l=Math.floor(e/zi(e,s));let c=0,h=0,d,u,f,p,g,m,b,_,y,v,x;for(d=0;d<e;d+=l){if(p=t[d].label,g=this._resolveTickFontOptions(d),n.font=m=g.string,b=o[m]=o[m]||{data:{},gc:[]},_=g.lineHeight,y=v=0,!T(p)&&!H(p))y=di(n,b.data,b.gc,y,p),v=_;else if(H(p))for(u=0,f=p.length;u<f;++u)x=p[u],!T(x)&&!H(x)&&(y=di(n,b.data,b.gc,y,x),v+=_);r.push(y),a.push(v),c=Math.max(y,c),h=Math.max(v,h)}Or(o,e);const k=r.indexOf(c),S=a.indexOf(h),M=w=>({width:r[w]||0,height:a[w]||0});return{first:M(0),last:M(e-1),widest:M(k),highest:M(S),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return dn(this._alignToPixels?mt(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const s=e[t];return s.$context||(s.$context=Tr(this.getContext(),t,s))}return this.$context||(this.$context=Ar(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=lt(this.labelRotation),s=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,l=o?o.highest.height+r:0;return this.isHorizontal()?l*s>a*n?a/s:l/n:l*n<a*s?l/s:a/n}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,s=this.chart,n=this.options,{grid:o,position:r,border:a}=n,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),u=Bt(o),f=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,m=g/2,b=function(z){return mt(s,z,g)};let _,y,v,x,k,S,M,w,D,C,O,V;if(r==="top")_=b(this.bottom),S=this.bottom-u,w=_-m,C=b(t.top)+m,V=t.bottom;else if(r==="bottom")_=b(this.top),C=t.top,V=b(t.bottom)-m,S=_+m,w=this.top+u;else if(r==="left")_=b(this.right),k=this.right-u,M=_-m,D=b(t.left)+m,O=t.right;else if(r==="right")_=b(this.left),D=t.left,O=b(t.right)-m,k=_+m,M=this.left+u;else if(e==="x"){if(r==="center")_=b((t.top+t.bottom)/2+.5);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}C=t.top,V=t.bottom,S=_+m,w=S+u}else if(e==="y"){if(r==="center")_=b((t.left+t.right)/2);else if(A(r)){const z=Object.keys(r)[0],B=r[z];_=b(this.chart.scales[z].getPixelForValue(B))}k=_-m,M=k-u,D=t.left,O=t.right}const G=P(n.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/G));for(y=0;y<d;y+=I){const z=this.getContext(y),B=o.setContext(z),Z=a.setContext(z),j=B.lineWidth,wt=B.color,Zt=Z.dash||[],Ct=Z.dashOffset,Lt=B.tickWidth,ft=B.tickColor,It=B.tickBorderDash||[],gt=B.tickBorderDashOffset;v=Dr(this,y,l),v!==void 0&&(x=mt(s,v,j),c?k=M=D=O=x:S=w=C=V=x,f.push({tx1:k,ty1:S,tx2:M,ty2:w,x1:D,y1:C,x2:O,y2:V,width:j,color:wt,borderDash:Zt,borderDashOffset:Ct,tickWidth:Lt,tickColor:ft,tickBorderDash:It,tickBorderDashOffset:gt}))}return this._ticksLength=d,this._borderValue=_,f}_computeLabelItems(t){const e=this.axis,s=this.options,{position:n,ticks:o}=s,r=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:c,padding:h,mirror:d}=o,u=Bt(s.grid),f=u+h,p=d?-h:f,g=-lt(this.labelRotation),m=[];let b,_,y,v,x,k,S,M,w,D,C,O,V="middle";if(n==="top")k=this.bottom-p,S=this._getXAxisLabelAlignment();else if(n==="bottom")k=this.top+p,S=this._getXAxisLabelAlignment();else if(n==="left"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(n==="right"){const I=this._getYAxisLabelAlignment(u);S=I.textAlign,x=I.x}else if(e==="x"){if(n==="center")k=(t.top+t.bottom)/2+f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];k=this.chart.scales[I].getPixelForValue(z)+f}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(n==="center")x=(t.left+t.right)/2-f;else if(A(n)){const I=Object.keys(n)[0],z=n[I];x=this.chart.scales[I].getPixelForValue(z)}S=this._getYAxisLabelAlignment(u).textAlign}e==="y"&&(l==="start"?V="top":l==="end"&&(V="bottom"));const G=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){y=a[b],v=y.label;const I=o.setContext(this.getContext(b));M=this.getPixelForTick(b)+o.labelOffset,w=this._resolveTickFontOptions(b),D=w.lineHeight,C=H(v)?v.length:1;const z=C/2,B=I.color,Z=I.textStrokeColor,j=I.textStrokeWidth;let wt=S;r?(x=M,S==="inner"&&(b===_-1?wt=this.options.reverse?"left":"right":b===0?wt=this.options.reverse?"right":"left":wt="center"),n==="top"?c==="near"||g!==0?O=-C*D+D/2:c==="center"?O=-G.highest.height/2-z*D+D:O=-G.highest.height+D/2:c==="near"||g!==0?O=D/2:c==="center"?O=G.highest.height/2-z*D:O=G.highest.height-C*D,d&&(O*=-1),g!==0&&!I.showLabelBackdrop&&(x+=D/2*Math.sin(g))):(k=M,O=(1-C)*D/2);let Zt;if(I.showLabelBackdrop){const Ct=Q(I.backdropPadding),Lt=G.heights[b],ft=G.widths[b];let It=O-Ct.top,gt=0-Ct.left;switch(V){case"middle":It-=Lt/2;break;case"bottom":It-=Lt;break}switch(S){case"center":gt-=ft/2;break;case"right":gt-=ft;break;case"inner":b===_-1?gt-=ft:b>0&&(gt-=ft/2);break}Zt={left:gt,top:It,width:ft+Ct.width,height:Lt+Ct.height,color:I.backdropColor}}m.push({label:v,font:w,textOffset:O,options:{rotation:g,color:B,strokeColor:Z,strokeWidth:j,textAlign:wt,textBaseline:V,translation:[x,k],backdrop:Zt}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-lt(this.labelRotation))return t==="top"?"left":"right";let n="center";return e.align==="start"?n="left":e.align==="end"?n="right":e.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:s,mirror:n,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,l=r.widest.width;let c,h;return e==="left"?n?(h=this.right+o,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h+=l)):(h=this.right-a,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h=this.left)):e==="right"?n?(h=this.left+o,s==="near"?c="right":s==="center"?(c="center",h-=l/2):(c="left",h-=l)):(h=this.left+a,s==="near"?c="left":s==="center"?(c="center",h+=l/2):(c="right",h=this.right)):c="right",{textAlign:c,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:s,top:n,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(s,n,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const n=this.ticks.findIndex(o=>o.value===t);return n>=0?e.setContext(this.getContext(n)).lineWidth:0}drawGrid(t){const e=this.options.grid,s=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(l,c,h)=>{!h.width||!h.color||(s.save(),s.lineWidth=h.width,s.strokeStyle=h.color,s.setLineDash(h.borderDash||[]),s.lineDashOffset=h.borderDashOffset,s.beginPath(),s.moveTo(l.x,l.y),s.lineTo(c.x,c.y),s.stroke(),s.restore())};if(e.display)for(o=0,r=n.length;o<r;++o){const l=n[o];e.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),e.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:s,grid:n}}=this,o=s.setContext(this.getContext()),r=s.display?o.width:0;if(!r)return;const a=n.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,h,d,u;this.isHorizontal()?(c=mt(t,this.left,r)-r/2,h=mt(t,this.right,a)+a/2,d=u=l):(d=mt(t,this.top,r)-r/2,u=mt(t,this.bottom,a)+a/2,c=h=l),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(c,d),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const s=this.ctx,n=this._computeLabelArea();n&&Ue(s,n);const o=this.getLabelItems(t);for(const r of o){const a=r.options,l=r.font,c=r.label,h=r.textOffset;Jt(s,c,0,h,l,a)}n&&Xe(s)}drawTitle(){const{ctx:t,options:{position:e,title:s,reverse:n}}=this;if(!s.display)return;const o=U(s.font),r=Q(s.padding),a=s.align;let l=o.lineHeight/2;e==="bottom"||e==="center"||A(e)?(l+=r.bottom,H(s.text)&&(l+=o.lineHeight*(s.text.length-1))):l+=r.top;const{titleX:c,titleY:h,maxWidth:d,rotation:u}=Lr(this,l,e,a);Jt(t,s.text,0,0,o,{color:s.color,maxWidth:d,rotation:u,textAlign:Rr(a,e,n),textBaseline:"middle",translation:[c,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,s=P(t.grid&&t.grid.z,-1),n=P(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Rt.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:s,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",n=[];let o,r;for(o=0,r=e.length;o<r;++o){const a=e[o];a[s]===this.id&&(!t||a.type===t)&&n.push(a)}return n}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return U(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ae{constructor(t,e,s){this.type=t,this.scope=e,this.override=s,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let s;zr(e)&&(s=this.register(e));const n=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in n||(n[o]=t,Ir(t,r,s),this.override&&W.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,s=t.id,n=this.scope;s in e&&delete e[s],n&&s in W[n]&&(delete W[n][s],this.override&&delete kt[s])}}function Ir(i,t,e){const s=Ut(Object.create(null),[e?W.get(e):{},W.get(t),i.defaults]);W.set(t,s),i.defaultRoutes&&Er(t,i.defaultRoutes),i.descriptors&&W.describe(t,i.descriptors)}function Er(i,t){Object.keys(t).forEach(e=>{const s=e.split("."),n=s.pop(),o=[i].concat(s).join("."),r=t[e].split("."),a=r.pop(),l=r.join(".");W.route(o,n,l,a)})}function zr(i){return"id"in i&&"defaults"in i}class Fr{constructor(){this.controllers=new ae(ve,"datasets",!0),this.elements=new ae(ct,"elements"),this.plugins=new ae(Object,"plugins"),this.scales=new ae(Rt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,s){[...e].forEach(n=>{const o=s||this._getRegistryForType(n);s||o.isForType(n)||o===this.plugins&&n.id?this._exec(t,o,n):R(n,r=>{const a=s||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,s){const n=Ne(t);E(s["before"+n],[],s),e[t](s),E(s["after"+n],[],s)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const s=this._typedRegistries[e];if(s.isForType(t))return s}return this.plugins}_get(t,e,s){const n=e.get(t);if(n===void 0)throw new Error('"'+t+'" is not a registered '+s+".");return n}}var st=new Fr;class Br{constructor(){this._init=[]}notify(t,e,s,n){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=n?this._descriptors(t).filter(n):this._descriptors(t),r=this._notify(o,t,e,s);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,s,n){n=n||{};for(const o of t){const r=o.plugin,a=r[s],l=[e,n,o.options];if(E(a,l,r)===!1&&n.cancelable)return!1}return!0}invalidate(){T(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const s=t&&t.config,n=P(s.options&&s.options.plugins,{}),o=Wr(s);return n===!1&&!e?[]:Nr(t,o,n,e)}_notifyStateChanges(t){const e=this._oldCache||[],s=this._cache,n=(o,r)=>o.filter(a=>!r.some(l=>a.plugin.id===l.plugin.id));this._notify(n(e,s),t,"stop"),this._notify(n(s,e),t,"start")}}function Wr(i){const t={},e=[],s=Object.keys(st.plugins.items);for(let o=0;o<s.length;o++)e.push(st.getPlugin(s[o]));const n=i.plugins||[];for(let o=0;o<n.length;o++){const r=n[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function Hr(i,t){return!t&&i===!1?null:i===!0?{}:i}function Nr(i,{plugins:t,localIds:e},s,n){const o=[],r=i.getContext();for(const a of t){const l=a.id,c=Hr(s[l],n);c!==null&&o.push({plugin:a,options:Vr(i.config,{plugin:a,local:e[l]},c,r)})}return o}function Vr(i,{plugin:t,local:e},s,n){const o=i.pluginScopeKeys(t),r=i.getOptionScopes(s,o);return e&&t.defaults&&r.push(t.defaults),i.createResolver(r,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Be(i,t){const e=W.datasets[i]||{};return((t.datasets||{})[i]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function jr(i,t){let e=i;return i==="_index_"?e=t:i==="_value_"&&(e=t==="x"?"y":"x"),e}function $r(i,t){return i===t?"_index_":"_value_"}function Wi(i){if(i==="x"||i==="y"||i==="r")return i}function Yr(i){if(i==="top"||i==="bottom")return"x";if(i==="left"||i==="right")return"y"}function We(i,...t){if(Wi(i))return i;for(const e of t){const s=e.axis||Yr(e.position)||i.length>1&&Wi(i[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${i}' axis. Please provide 'axis' or 'position' option.\`)}function Hi(i,t,e){if(e[t+"AxisID"]===i)return{axis:t}}function Ur(i,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(s=>s.xAxisID===i||s.yAxisID===i);if(e.length)return Hi(i,"x",e[0])||Hi(i,"y",e[0])}return{}}function Xr(i,t){const e=kt[i.type]||{scales:{}},s=t.scales||{},n=Be(i.type,t),o=Object.create(null);return Object.keys(s).forEach(r=>{const a=s[r];if(!A(a))return console.error(\`Invalid scale configuration for scale: \${r}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${r}\`);const l=We(r,a,Ur(r,i),W.scales[a.type]),c=$r(l,n),h=e.scales||{};o[r]=Vt(Object.create(null),[{axis:l},a,h[l],h[c]])}),i.data.datasets.forEach(r=>{const a=r.type||i.type,l=r.indexAxis||Be(a,t),h=(kt[a]||{}).scales||{};Object.keys(h).forEach(d=>{const u=jr(d,l),f=r[u+"AxisID"]||u;o[f]=o[f]||Object.create(null),Vt(o[f],[{axis:u},s[f],h[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Vt(a,[W.scales[a.type],W.scale])}),o}function Ws(i){const t=i.options||(i.options={});t.plugins=P(t.plugins,{}),t.scales=Xr(i,t)}function Hs(i){return i=i||{},i.datasets=i.datasets||[],i.labels=i.labels||[],i}function Kr(i){return i=i||{},i.data=Hs(i.data),Ws(i),i}const Ni=new Map,Ns=new Set;function le(i,t){let e=Ni.get(i);return e||(e=t(),Ni.set(i,e),Ns.add(e)),e}const Wt=(i,t,e)=>{const s=Mt(t,e);s!==void 0&&i.add(s)};class Gr{constructor(t){this._config=Kr(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Hs(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Ws(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return le(t,()=>[[\`datasets.\${t}\`,""]])}datasetAnimationScopeKeys(t,e){return le(\`\${t}.transition.\${e}\`,()=>[[\`datasets.\${t}.transitions.\${e}\`,\`transitions.\${e}\`],[\`datasets.\${t}\`,""]])}datasetElementScopeKeys(t,e){return le(\`\${t}-\${e}\`,()=>[[\`datasets.\${t}.elements.\${e}\`,\`datasets.\${t}\`,\`elements.\${e}\`,""]])}pluginScopeKeys(t){const e=t.id,s=this.type;return le(\`\${s}-plugin-\${e}\`,()=>[[\`plugins.\${e}\`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const s=this._scopeCache;let n=s.get(t);return(!n||e)&&(n=new Map,s.set(t,n)),n}getOptionScopes(t,e,s){const{options:n,type:o}=this,r=this._cachedScopes(t,s),a=r.get(e);if(a)return a;const l=new Set;e.forEach(h=>{t&&(l.add(t),h.forEach(d=>Wt(l,t,d))),h.forEach(d=>Wt(l,n,d)),h.forEach(d=>Wt(l,kt[o]||{},d)),h.forEach(d=>Wt(l,W,d)),h.forEach(d=>Wt(l,ze,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),Ns.has(e)&&r.set(e,c),c}chartOptionScopes(){const{options:t,type:e}=this;return[t,kt[e]||{},W.datasets[e]||{},{type:e},W,ze]}resolveNamedOptions(t,e,s,n=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=Vi(this._resolverCache,t,n);let l=r;if(Jr(r,e)){o.$shared=!1,s=ut(s)?s():s;const c=this.createResolver(t,s,a);l=At(r,s,c)}for(const c of e)o[c]=l[c];return o}createResolver(t,e,s=[""],n){const{resolver:o}=Vi(this._resolverCache,t,s);return A(e)?At(o,e,void 0,n):o}}function Vi(i,t,e){let s=i.get(t);s||(s=new Map,i.set(t,s));const n=e.join();let o=s.get(n);return o||(o={resolver:Ge(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},s.set(n,o)),o}const qr=i=>A(i)&&Object.getOwnPropertyNames(i).some(t=>ut(i[t]));function Jr(i,t){const{isScriptable:e,isIndexable:s}=ks(i);for(const n of t){const o=e(n),r=s(n),a=(r||o)&&i[n];if(o&&(ut(a)||qr(a))||r&&H(a))return!0}return!1}var Qr="4.5.0";const Zr=["top","bottom","left","right","chartArea"];function ji(i,t){return i==="top"||i==="bottom"||Zr.indexOf(i)===-1&&t==="x"}function $i(i,t){return function(e,s){return e[i]===s[i]?e[t]-s[t]:e[i]-s[i]}}function Yi(i){const t=i.chart,e=t.options.animation;t.notifyPlugins("afterRender"),E(e&&e.onComplete,[i],t)}function ta(i){const t=i.chart,e=t.options.animation;E(e&&e.onProgress,[i],t)}function Vs(i){return Qe()&&typeof i=="string"?i=document.getElementById(i):i&&i.length&&(i=i[0]),i&&i.canvas&&(i=i.canvas),i}const ue={},Ui=i=>{const t=Vs(i);return Object.values(ue).filter(e=>e.canvas===t).pop()};function ea(i,t,e){const s=Object.keys(i);for(const n of s){const o=+n;if(o>=t){const r=i[n];delete i[n],(e>0||o>t)&&(i[o+e]=r)}}}function ia(i,t,e,s){return!e||i.type==="mouseout"?null:s?t:i}class sa{static defaults=W;static instances=ue;static overrides=kt;static registry=st;static version=Qr;static getChart=Ui;static register(...t){st.add(...t),Xi()}static unregister(...t){st.remove(...t),Xi()}constructor(t,e){const s=this.config=new Gr(e),n=Vs(t),o=Ui(n);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||yr(n)),this.platform.updateConfig(s);const a=this.platform.acquireContext(n,r.aspectRatio),l=a&&a.canvas,c=l&&l.height,h=l&&l.width;if(this.id=Gs(),this.ctx=a,this.canvas=l,this.width=h,this.height=c,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Br,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=pn(d=>this.update(d),r.resizeDelay||0),this._dataChanges=[],ue[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}rt.listen(this,"complete",Yi),rt.listen(this,"progress",ta),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:s,height:n,_aspectRatio:o}=this;return T(t)?e&&o?o:n?s/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return st}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():pi(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ui(this.canvas,this.ctx),this}stop(){return rt.stop(this),this}resize(t,e){rt.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const s=this.options,n=this.canvas,o=s.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(n,t,e,o),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,pi(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),E(s.onResize,[this,r],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};R(e,(s,n)=>{s.id=n})}buildOrUpdateScales(){const t=this.options,e=t.scales,s=this.scales,n=Object.keys(s).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],l=We(r,a),c=l==="r",h=l==="x";return{options:a,dposition:c?"chartArea":h?"bottom":"left",dtype:c?"radialLinear":h?"category":"linear"}}))),R(o,r=>{const a=r.options,l=a.id,c=We(l,a),h=P(a.type,r.dtype);(a.position===void 0||ji(a.position,c)!==ji(r.dposition))&&(a.position=r.dposition),n[l]=!0;let d=null;if(l in s&&s[l].type===h)d=s[l];else{const u=st.getScale(h);d=new u({id:l,type:h,ctx:this.ctx,chart:this}),s[d.id]=d}d.init(a,t)}),R(n,(r,a)=>{r||delete s[a]}),R(s,r=>{q.configure(this,r,r.options),q.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,s=t.length;if(t.sort((n,o)=>n.index-o.index),s>e){for(let n=e;n<s;++n)this._destroyDatasetMeta(n);t.splice(e,s-e)}this._sortedMetasets=t.slice(0).sort($i("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((s,n)=>{e.filter(o=>o===s._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let s,n;for(this._removeUnreferencedMetasets(),s=0,n=e.length;s<n;s++){const o=e[s];let r=this.getDatasetMeta(s);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(s),r=this.getDatasetMeta(s)),r.type=a,r.indexAxis=o.indexAxis||Be(a,this.options),r.order=o.order||0,r.index=s,r.label=""+o.label,r.visible=this.isDatasetVisible(s),r.controller)r.controller.updateIndex(s),r.controller.linkScales();else{const l=st.getController(a),{datasetElementType:c,dataElementType:h}=W.datasets[a];Object.assign(l,{dataElementType:st.getElement(h),datasetElementType:c&&st.getElement(c)}),r.controller=new l(this,s),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){R(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const s=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let c=0,h=this.data.datasets.length;c<h;c++){const{controller:d}=this.getDatasetMeta(c),u=!n&&o.indexOf(d)===-1;d.buildOrUpdateElements(u),r=Math.max(+d.getMaxOverflow(),r)}r=this._minPadding=s.layout.autoPadding?r:0,this._updateLayout(r),n||R(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort($i("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){R(this.scales,t=>{q.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),s=new Set(t.events);(!ii(e,s)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:s,start:n,count:o}of e){const r=s==="_removeElements"?-o:o;ea(t,n,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,s=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),n=s(0);for(let o=1;o<e;o++)if(!ii(n,s(o)))return;return Array.from(n).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;q.update(this,this.width,this.height,t);const e=this.chartArea,s=e.width<=0||e.height<=0;this._layers=[],R(this.boxes,n=>{s&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,o)=>{n._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,s=this.data.datasets.length;e<s;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,s=this.data.datasets.length;e<s;++e)this._updateDataset(e,ut(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const s=this.getDatasetMeta(t),n={meta:s,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(s.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(rt.has(this)?this.attached&&!rt.running(this)&&rt.start(this):(this.draw(),Yi({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:s,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,s=[];let n,o;for(n=0,o=e.length;n<o;++n){const r=e[n];(!t||r.visible)&&s.push(r)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,s={meta:t,index:t.index,cancelable:!0},n=Mo(this,t);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(n&&Ue(e,n),t.controller.draw(),n&&Xe(e),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(t){return qt(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,s,n){const o=Zo.modes[e];return typeof o=="function"?o(this,t,s,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],s=this._metasets;let n=s.filter(o=>o&&o._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},s.push(n)),n}getContext(){return this.$context||(this.$context=St(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const s=this.getDatasetMeta(t);return typeof s.hidden=="boolean"?!s.hidden:!e.hidden}setDatasetVisibility(t,e){const s=this.getDatasetMeta(t);s.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,s){const n=s?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,n);Xt(e)?(o.data[e].hidden=!s,this.update()):(this.setDatasetVisibility(t,s),r.update(o,{visible:s}),this.update(a=>a.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),rt.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ui(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete ue[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,s=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},n=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};R(this.options.events,o=>s(o,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,s=(l,c)=>{e.addEventListener(this,l,c),t[l]=c},n=(l,c)=>{t[l]&&(e.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let r;const a=()=>{n("attach",a),this.attached=!0,this.resize(),s("resize",o),s("detach",r)};r=()=>{this.attached=!1,n("resize",o),this._stop(),this._resize(0,0),s("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){R(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},R(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,s){const n=s?"set":"remove";let o,r,a,l;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+n+"DatasetHoverStyle"]()),a=0,l=t.length;a<l;++a){r=t[a];const c=r&&this.getDatasetMeta(r.datasetIndex).controller;c&&c[n+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],s=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!fe(s,e)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,e))}notifyPlugins(t,e,s){return this._plugins.notify(this,t,e,s)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,s){const n=this.options.hover,o=(l,c)=>l.filter(h=>!c.some(d=>h.datasetIndex===d.datasetIndex&&h.index===d.index)),r=o(e,t),a=s?t:o(t,e);r.length&&this.updateHoverStyle(r,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const s={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",s,n)===!1)return;const o=this._handleEvent(t,e,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,n),(o||s.changed)&&this.render(),this}_handleEvent(t,e,s){const{_active:n=[],options:o}=this,r=e,a=this._getActiveElements(t,n,s,r),l=en(t),c=ia(t,this._lastEvent,s,l);s&&(this._lastEvent=null,E(o.onHover,[t,a,this],this),l&&E(o.onClick,[t,a,this],this));const h=!fe(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=c,h}_getActiveElements(t,e,s,n){if(t.type==="mouseout")return[];if(!s)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,n)}}function Xi(){return R(sa.instances,i=>i._plugins.invalidate())}function na(i,t,e){const{startAngle:s,x:n,y:o,outerRadius:r,innerRadius:a,options:l}=t,{borderWidth:c,borderJoinStyle:h}=l,d=Math.min(c/r,tt(s-e));if(i.beginPath(),i.arc(n,o,r-c/2,s+d/2,e-d/2),a>0){const u=Math.min(c/a,tt(s-e));i.arc(n,o,a+c/2,e-u/2,s+u/2,!0)}else{const u=Math.min(c/2,r*tt(s-e));if(h==="round")i.arc(n,o,u,e-L/2,s+L/2,!0);else if(h==="bevel"){const f=2*u*u,p=-f*Math.cos(e+L/2)+n,g=-f*Math.sin(e+L/2)+o,m=f*Math.cos(s+L/2)+n,b=f*Math.sin(s+L/2)+o;i.lineTo(p,g),i.lineTo(m,b)}}i.closePath(),i.moveTo(0,0),i.rect(0,0,i.canvas.width,i.canvas.height),i.clip("evenodd")}function oa(i,t,e){const{startAngle:s,pixelMargin:n,x:o,y:r,outerRadius:a,innerRadius:l}=t;let c=n/a;i.beginPath(),i.arc(o,r,a,s-c,e+c),l>n?(c=n/l,i.arc(o,r,l,e+c,s-c,!0)):i.arc(o,r,n,e+N,s-N),i.closePath(),i.clip()}function ra(i){return Ke(i,["outerStart","outerEnd","innerStart","innerEnd"])}function aa(i,t,e,s){const n=ra(i.options.borderRadius),o=(e-t)/2,r=Math.min(o,s*t/2),a=l=>{const c=(e-Math.min(o,l))*s/2;return Y(l,0,Math.min(o,c))};return{outerStart:a(n.outerStart),outerEnd:a(n.outerEnd),innerStart:Y(n.innerStart,0,r),innerEnd:Y(n.innerEnd,0,r)}}function Pt(i,t,e,s){return{x:e+i*Math.cos(t),y:s+i*Math.sin(t)}}function xe(i,t,e,s,n,o){const{x:r,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=t,d=Math.max(t.outerRadius+s+e-c,0),u=h>0?h+s+e+c:0;let f=0;const p=n-l;if(s){const I=h>0?h-s:0,z=d>0?d-s:0,B=(I+z)/2,Z=B!==0?p*B/(B+s):p;f=(p-Z)/2}const g=Math.max(.001,p*d-e/L)/d,m=(p-g)/2,b=l+m+f,_=n-m-f,{outerStart:y,outerEnd:v,innerStart:x,innerEnd:k}=aa(t,u,d,_-b),S=d-y,M=d-v,w=b+y/S,D=_-v/M,C=u+x,O=u+k,V=b+x/C,G=_-k/O;if(i.beginPath(),o){const I=(w+D)/2;if(i.arc(r,a,d,w,I),i.arc(r,a,d,I,D),v>0){const j=Pt(M,D,r,a);i.arc(j.x,j.y,v,D,_+N)}const z=Pt(O,_,r,a);if(i.lineTo(z.x,z.y),k>0){const j=Pt(O,G,r,a);i.arc(j.x,j.y,k,_+N,G+Math.PI)}const B=(_-k/u+(b+x/u))/2;if(i.arc(r,a,u,_-k/u,B,!0),i.arc(r,a,u,B,b+x/u,!0),x>0){const j=Pt(C,V,r,a);i.arc(j.x,j.y,x,V+Math.PI,b-N)}const Z=Pt(S,b,r,a);if(i.lineTo(Z.x,Z.y),y>0){const j=Pt(S,w,r,a);i.arc(j.x,j.y,y,b-N,w)}}else{i.moveTo(r,a);const I=Math.cos(w)*d+r,z=Math.sin(w)*d+a;i.lineTo(I,z);const B=Math.cos(D)*d+r,Z=Math.sin(D)*d+a;i.lineTo(B,Z)}i.closePath()}function la(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a}=t;let l=t.endAngle;if(o){xe(i,t,e,s,l,n);for(let c=0;c<o;++c)i.fill();isNaN(a)||(l=r+(a%F||F))}return xe(i,t,e,s,l,n),i.fill(),l}function ca(i,t,e,s,n){const{fullCircles:o,startAngle:r,circumference:a,options:l}=t,{borderWidth:c,borderJoinStyle:h,borderDash:d,borderDashOffset:u,borderRadius:f}=l,p=l.borderAlign==="inner";if(!c)return;i.setLineDash(d||[]),i.lineDashOffset=u,p?(i.lineWidth=c*2,i.lineJoin=h||"round"):(i.lineWidth=c,i.lineJoin=h||"bevel");let g=t.endAngle;if(o){xe(i,t,e,s,g,n);for(let m=0;m<o;++m)i.stroke();isNaN(a)||(g=r+(a%F||F))}p&&oa(i,t,g),l.selfJoin&&g-r>=L&&f===0&&h!=="miter"&&na(i,t,g),o||(xe(i,t,e,s,g,n),i.stroke())}class Ga extends ct{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.getProps(["x","y"],s),{angle:o,distance:r}=ps(n,{x:t,y:e}),{startAngle:a,endAngle:l,innerRadius:c,outerRadius:h,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),u=(this.options.spacing+this.options.borderWidth)/2,f=P(d,l-a),p=Gt(o,a,l)&&a!==l,g=f>=F||p,m=ht(r,c+u,h+u);return g&&m}getCenterPoint(t){const{x:e,y:s,startAngle:n,endAngle:o,innerRadius:r,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,h=(n+o)/2,d=(r+a+c+l)/2;return{x:e+Math.cos(h)*d,y:s+Math.sin(h)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:s}=this,n=(e.offset||0)/4,o=(e.spacing||0)/2,r=e.circular;if(this.pixelMargin=e.borderAlign==="inner"?.33:0,this.fullCircles=s>F?Math.floor(s/F):0,s===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const a=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(a)*n,Math.sin(a)*n);const l=1-Math.sin(Math.min(L,s||0)),c=n*l;t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,la(t,this,c,o,r),ca(t,this,c,o,r),t.restore()}}function js(i,t,e=t){i.lineCap=P(e.borderCapStyle,t.borderCapStyle),i.setLineDash(P(e.borderDash,t.borderDash)),i.lineDashOffset=P(e.borderDashOffset,t.borderDashOffset),i.lineJoin=P(e.borderJoinStyle,t.borderJoinStyle),i.lineWidth=P(e.borderWidth,t.borderWidth),i.strokeStyle=P(e.borderColor,t.borderColor)}function ha(i,t,e){i.lineTo(e.x,e.y)}function da(i){return i.stepped?On:i.tension||i.cubicInterpolationMode==="monotone"?An:ha}function $s(i,t,e={}){const s=i.length,{start:n=0,end:o=s-1}=e,{start:r,end:a}=t,l=Math.max(n,r),c=Math.min(o,a),h=n<r&&o<r||n>a&&o>a;return{count:s,start:l,loop:t.loop,ilen:c<l&&!h?s+c-l:c-l}}function ua(i,t,e,s){const{points:n,options:o}=t,{count:r,start:a,loop:l,ilen:c}=$s(n,e,s),h=da(o);let{move:d=!0,reverse:u}=s||{},f,p,g;for(f=0;f<=c;++f)p=n[(a+(u?c-f:f))%r],!p.skip&&(d?(i.moveTo(p.x,p.y),d=!1):h(i,g,p,u,o.stepped),g=p);return l&&(p=n[(a+(u?c:0))%r],h(i,g,p,u,o.stepped)),!!l}function fa(i,t,e,s){const n=t.points,{count:o,start:r,ilen:a}=$s(n,e,s),{move:l=!0,reverse:c}=s||{};let h=0,d=0,u,f,p,g,m,b;const _=v=>(r+(c?a-v:v))%o,y=()=>{g!==m&&(i.lineTo(h,m),i.lineTo(h,g),i.lineTo(h,b))};for(l&&(f=n[_(0)],i.moveTo(f.x,f.y)),u=0;u<=a;++u){if(f=n[_(u)],f.skip)continue;const v=f.x,x=f.y,k=v|0;k===p?(x<g?g=x:x>m&&(m=x),h=(d*h+v)/++d):(y(),i.lineTo(v,x),p=k,d=0,g=m=x),b=x}y()}function He(i){const t=i.options,e=t.borderDash&&t.borderDash.length;return!i._decimated&&!i._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?fa:ua}function ga(i){return i.stepped?lo:i.tension||i.cubicInterpolationMode==="monotone"?co:xt}function pa(i,t,e,s){let n=t._path;n||(n=t._path=new Path2D,t.path(n,e,s)&&n.closePath()),js(i,t.options),i.stroke(n)}function ma(i,t,e,s){const{segments:n,options:o}=t,r=He(t);for(const a of n)js(i,o,a.style),i.beginPath(),r(i,t,a,{start:e,end:e+s-1})&&i.closePath(),i.stroke()}const ba=typeof Path2D=="function";function _a(i,t,e,s){ba&&!t.options.segment?pa(i,t,e,s):ma(i,t,e,s)}class qa extends ct{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const n=s.spanGaps?this._loop:this._fullLoop;to(this._points,s,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=_o(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,s=t.length;return s&&e[t[s-1].end]}interpolate(t,e){const s=this.options,n=t[e],o=this.points,r=po(this,{property:e,start:n,end:n});if(!r.length)return;const a=[],l=ga(s);let c,h;for(c=0,h=r.length;c<h;++c){const{start:d,end:u}=r[c],f=o[d],p=o[u];if(f===p){a.push(f);continue}const g=Math.abs((n-f[e])/(p[e]-f[e])),m=l(f,p,g,s.stepped);m[e]=t[e],a.push(m)}return a.length===1?a[0]:a}pathSegment(t,e,s){return He(this)(t,this,e,s)}path(t,e,s){const n=this.segments,o=He(this);let r=this._loop;e=e||0,s=s||this.points.length-e;for(const a of n)r&=o(t,this,a,{start:e,end:e+s-1});return!!r}draw(t,e,s,n){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),_a(t,this,s,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ki(i,t,e,s){const n=i.options,{[e]:o}=i.getProps([e],s);return Math.abs(t-o)<n.radius+n.hitRadius}class Ja extends ct{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,s){const n=this.options,{x:o,y:r}=this.getProps(["x","y"],s);return Math.pow(t-o,2)+Math.pow(e-r,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ki(this,t,"x",e)}inYRange(t,e){return Ki(this,t,"y",e)}getCenterPoint(t){const{x:e,y:s}=this.getProps(["x","y"],t);return{x:e,y:s}}size(t){t=t||this.options||{};let e=t.radius||0;e=Math.max(e,e&&t.hoverRadius||0);const s=e&&t.borderWidth||0;return(e+s)*2}draw(t,e){const s=this.options;this.skip||s.radius<.1||!qt(this,e,this.size(s)/2)||(t.strokeStyle=s.borderColor,t.lineWidth=s.borderWidth,t.fillStyle=s.backgroundColor,Fe(t,s,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ys(i,t){const{x:e,y:s,base:n,width:o,height:r}=i.getProps(["x","y","base","width","height"],t);let a,l,c,h,d;return i.horizontal?(d=r/2,a=Math.min(e,n),l=Math.max(e,n),c=s-d,h=s+d):(d=o/2,a=e-d,l=e+d,c=Math.min(s,n),h=Math.max(s,n)),{left:a,top:c,right:l,bottom:h}}function dt(i,t,e,s){return i?0:Y(t,e,s)}function xa(i,t,e){const s=i.options.borderWidth,n=i.borderSkipped,o=Ms(s);return{t:dt(n.top,o.top,0,e),r:dt(n.right,o.right,0,t),b:dt(n.bottom,o.bottom,0,e),l:dt(n.left,o.left,0,t)}}function ya(i,t,e){const{enableBorderRadius:s}=i.getProps(["enableBorderRadius"]),n=i.options.borderRadius,o=Dt(n),r=Math.min(t,e),a=i.borderSkipped,l=s||A(n);return{topLeft:dt(!l||a.top||a.left,o.topLeft,0,r),topRight:dt(!l||a.top||a.right,o.topRight,0,r),bottomLeft:dt(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:dt(!l||a.bottom||a.right,o.bottomRight,0,r)}}function va(i){const t=Ys(i),e=t.right-t.left,s=t.bottom-t.top,n=xa(i,e/2,s/2),o=ya(i,e/2,s/2);return{outer:{x:t.left,y:t.top,w:e,h:s,radius:o},inner:{x:t.left+n.l,y:t.top+n.t,w:e-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,o.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(n.b,n.r))}}}}function Le(i,t,e,s){const n=t===null,o=e===null,a=i&&!(n&&o)&&Ys(i,s);return a&&(n||ht(t,a.left,a.right))&&(o||ht(e,a.top,a.bottom))}function Ma(i){return i.topLeft||i.topRight||i.bottomLeft||i.bottomRight}function ka(i,t){i.rect(t.x,t.y,t.w,t.h)}function Ie(i,t,e={}){const s=i.x!==e.x?-t:0,n=i.y!==e.y?-t:0,o=(i.x+i.w!==e.x+e.w?t:0)-s,r=(i.y+i.h!==e.y+e.h?t:0)-n;return{x:i.x+s,y:i.y+n,w:i.w+o,h:i.h+r,radius:i.radius}}class Qa extends ct{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:s,backgroundColor:n}}=this,{inner:o,outer:r}=va(this),a=Ma(r.radius)?me:ka;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,Ie(r,e,o)),t.clip(),a(t,Ie(o,-e,r)),t.fillStyle=s,t.fill("evenodd")),t.beginPath(),a(t,Ie(o,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,s){return Le(this,t,e,s)}inXRange(t,e){return Le(this,t,null,e)}inYRange(t,e){return Le(this,null,t,e)}getCenterPoint(t){const{x:e,y:s,base:n,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+n)/2:e,y:o?s:(s+n)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const Gi=(i,t)=>{let{boxHeight:e=t,boxWidth:s=t}=i;return i.usePointStyle&&(e=Math.min(e,t),s=i.pointStyleWidth||Math.min(s,t)),{boxWidth:s,boxHeight:e,itemHeight:Math.max(t,e)}},Sa=(i,t)=>i!==null&&t!==null&&i.datasetIndex===t.datasetIndex&&i.index===t.index;class qi extends ct{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,s){this.maxWidth=t,this.maxHeight=e,this._margins=s,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=E(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(s=>t.filter(s,this.chart.data))),t.sort&&(e=e.sort((s,n)=>t.sort(s,n,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const s=t.labels,n=U(s.font),o=n.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Gi(s,o);let c,h;e.font=n.string,this.isHorizontal()?(c=this.maxWidth,h=this._fitRows(r,o,a,l)+10):(h=this.maxHeight,c=this._fitCols(r,n,a,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,s,n){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],h=n+a;let d=t;o.textAlign="left",o.textBaseline="middle";let u=-1,f=-h;return this.legendItems.forEach((p,g)=>{const m=s+e/2+o.measureText(p.text).width;(g===0||c[c.length-1]+m+2*a>r)&&(d+=h,c[c.length-(g>0?0:1)]=0,f+=h,u++),l[g]={left:0,top:f,row:u,width:m,height:n},c[c.length-1]+=m+a}),d}_fitCols(t,e,s,n){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],h=r-t;let d=a,u=0,f=0,p=0,g=0;return this.legendItems.forEach((m,b)=>{const{itemWidth:_,itemHeight:y}=wa(s,e,o,m,n);b>0&&f+y+2*a>h&&(d+=u+a,c.push({width:u,height:f}),p+=u+a,g++,u=f=0),l[b]={left:p,top:f,col:g,width:_,height:y},u=Math.max(u,_),f+=y+a}),d+=u,c.push({width:u,height:f}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:s,labels:{padding:n},rtl:o}}=this,r=Ot(o,this.left,this.width);if(this.isHorizontal()){let a=0,l=$(s,this.left+n,this.right-this.lineWidths[a]);for(const c of e)a!==c.row&&(a=c.row,l=$(s,this.left+n,this.right-this.lineWidths[a])),c.top+=this.top+t+n,c.left=r.leftForLtr(r.x(l),c.width),l+=c.width+n}else{let a=0,l=$(s,this.top+t+n,this.bottom-this.columnSizes[a].height);for(const c of e)c.col!==a&&(a=c.col,l=$(s,this.top+t+n,this.bottom-this.columnSizes[a].height)),c.top=l,c.left+=this.left+n,c.left=r.leftForLtr(r.x(c.left),c.width),l+=c.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Ue(t,this),this._draw(),Xe(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:s,ctx:n}=this,{align:o,labels:r}=t,a=W.color,l=Ot(t.rtl,this.left,this.width),c=U(r.font),{padding:h}=r,d=c.size,u=d/2;let f;this.drawTitle(),n.textAlign=l.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=c.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=Gi(r,d),b=function(k,S,M){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const w=P(M.lineWidth,1);if(n.fillStyle=P(M.fillStyle,a),n.lineCap=P(M.lineCap,"butt"),n.lineDashOffset=P(M.lineDashOffset,0),n.lineJoin=P(M.lineJoin,"miter"),n.lineWidth=w,n.strokeStyle=P(M.strokeStyle,a),n.setLineDash(P(M.lineDash,[])),r.usePointStyle){const D={radius:g*Math.SQRT2/2,pointStyle:M.pointStyle,rotation:M.rotation,borderWidth:w},C=l.xPlus(k,p/2),O=S+u;vs(n,D,C,O,r.pointStyleWidth&&p)}else{const D=S+Math.max((d-g)/2,0),C=l.leftForLtr(k,p),O=Dt(M.borderRadius);n.beginPath(),Object.values(O).some(V=>V!==0)?me(n,{x:C,y:D,w:p,h:g,radius:O}):n.rect(C,D,p,g),n.fill(),w!==0&&n.stroke()}n.restore()},_=function(k,S,M){Jt(n,M.text,k,S+m/2,c,{strikethrough:M.hidden,textAlign:l.textAlign(M.textAlign)})},y=this.isHorizontal(),v=this._computeTitleHeight();y?f={x:$(o,this.left+h,this.right-s[0]),y:this.top+h+v,line:0}:f={x:this.left+h,y:$(o,this.top+v+h,this.bottom-e[0].height),line:0},Ds(this.ctx,t.textDirection);const x=m+h;this.legendItems.forEach((k,S)=>{n.strokeStyle=k.fontColor,n.fillStyle=k.fontColor;const M=n.measureText(k.text).width,w=l.textAlign(k.textAlign||(k.textAlign=r.textAlign)),D=p+u+M;let C=f.x,O=f.y;l.setWidth(this.width),y?S>0&&C+D+h>this.right&&(O=f.y+=x,f.line++,C=f.x=$(o,this.left+h,this.right-s[f.line])):S>0&&O+x>this.bottom&&(C=f.x=C+e[f.line].width+h,f.line++,O=f.y=$(o,this.top+v+h,this.bottom-e[f.line].height));const V=l.x(C);if(b(V,O,k),C=mn(w,C+p+u,y?C+D:this.right,t.rtl),_(l.x(C),O,k),y)f.x+=D+h;else if(typeof k.text!="string"){const G=c.lineHeight;f.y+=Us(k,G)+h}else f.y+=x}),Os(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,s=U(e.font),n=Q(e.padding);if(!e.display)return;const o=Ot(t.rtl,this.left,this.width),r=this.ctx,a=e.position,l=s.size/2,c=n.top+l;let h,d=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+c,d=$(t.align,d,this.right-u);else{const p=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);h=c+$(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const f=$(a,d,d+u);r.textAlign=o.textAlign(je(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=s.string,Jt(r,e.text,f,h,s)}_computeTitleHeight(){const t=this.options.title,e=U(t.font),s=Q(t.padding);return t.display?e.lineHeight+s.height:0}_getLegendItemAt(t,e){let s,n,o;if(ht(t,this.left,this.right)&&ht(e,this.top,this.bottom)){for(o=this.legendHitBoxes,s=0;s<o.length;++s)if(n=o[s],ht(t,n.left,n.left+n.width)&&ht(e,n.top,n.top+n.height))return this.legendItems[s]}return null}handleEvent(t){const e=this.options;if(!Da(t.type,e))return;const s=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const n=this._hoveredItem,o=Sa(n,s);n&&!o&&E(e.onLeave,[t,n,this],this),this._hoveredItem=s,s&&!o&&E(e.onHover,[t,s,this],this)}else s&&E(e.onClick,[t,s,this],this)}}function wa(i,t,e,s,n){const o=Ca(s,i,t,e),r=Pa(n,s,t.lineHeight);return{itemWidth:o,itemHeight:r}}function Ca(i,t,e,s){let n=i.text;return n&&typeof n!="string"&&(n=n.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+s.measureText(n).width}function Pa(i,t,e){let s=i;return typeof t.text!="string"&&(s=Us(t,e)),s}function Us(i,t){const e=i.text?i.text.length:0;return t*e}function Da(i,t){return!!((i==="mousemove"||i==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(i==="click"||i==="mouseup"))}var Za={id:"legend",_element:qi,start(i,t,e){const s=i.legend=new qi({ctx:i.ctx,options:e,chart:i});q.configure(i,s,e),q.addBox(i,s)},stop(i){q.removeBox(i,i.legend),delete i.legend},beforeUpdate(i,t,e){const s=i.legend;q.configure(i,s,e),s.options=e},afterUpdate(i){const t=i.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(i,t){t.replay||i.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(i,t,e){const s=t.datasetIndex,n=e.chart;n.isDatasetVisible(s)?(n.hide(s),t.hidden=!0):(n.show(s),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:i=>i.chart.options.color,boxWidth:40,padding:10,generateLabels(i){const t=i.data.datasets,{labels:{usePointStyle:e,pointStyle:s,textAlign:n,color:o,useBorderRadius:r,borderRadius:a}}=i.legend.options;return i._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(e?0:void 0),h=Q(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:c.borderColor,pointStyle:s||c.pointStyle,rotation:c.rotation,textAlign:n||c.textAlign,borderRadius:r&&(a||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:i=>i.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:i=>!i.startsWith("on"),labels:{_scriptable:i=>!["generateLabels","filter","sort"].includes(i)}}};class Xs extends ct{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const s=this.options;if(this.left=0,this.top=0,!s.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const n=H(s.text)?s.text.length:1;this._padding=Q(s.padding);const o=n*U(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:s,bottom:n,right:o,options:r}=this,a=r.align;let l=0,c,h,d;return this.isHorizontal()?(h=$(a,s,o),d=e+t,c=o-s):(r.position==="left"?(h=s+t,d=$(a,n,e),l=L*-.5):(h=o-t,d=$(a,e,n),l=L*.5),c=n-e),{titleX:h,titleY:d,maxWidth:c,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const s=U(e.font),o=s.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:l,rotation:c}=this._drawArgs(o);Jt(t,e.text,0,0,s,{color:e.color,maxWidth:l,rotation:c,textAlign:je(e.align),textBaseline:"middle",translation:[r,a]})}}function Oa(i,t){const e=new Xs({ctx:i.ctx,options:t,chart:i});q.configure(i,e,t),q.addBox(i,e),i.titleBlock=e}var tl={id:"title",_element:Xs,start(i,t,e){Oa(i,e)},stop(i){const t=i.titleBlock;q.removeBox(i,t),delete i.titleBlock},beforeUpdate(i,t,e){const s=i.titleBlock;q.configure(i,s,e),s.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Nt={average(i){if(!i.length)return!1;let t,e,s=new Set,n=0,o=0;for(t=0,e=i.length;t<e;++t){const a=i[t].element;if(a&&a.hasValue()){const l=a.tooltipPosition();s.add(l.x),n+=l.y,++o}}return o===0||s.size===0?!1:{x:[...s].reduce((a,l)=>a+l)/s.size,y:n/o}},nearest(i,t){if(!i.length)return!1;let e=t.x,s=t.y,n=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=i.length;o<r;++o){const l=i[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),h=Ee(t,c);h<n&&(n=h,a=l)}}if(a){const l=a.tooltipPosition();e=l.x,s=l.y}return{x:e,y:s}}};function it(i,t){return t&&(H(t)?Array.prototype.push.apply(i,t):i.push(t)),i}function at(i){return(typeof i=="string"||i instanceof String)&&i.indexOf(\`
21272
21277
  \`)>-1?i.split(\`
21273
- \`):i}function cl(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:i,label:r,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function ms(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=X(t.bodyFont),c=X(t.titleFont),h=X(t.footerFont),d=o.length,u=n.length,f=s.length,p=$(t.padding);let g=p.height,m=0,b=s.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const y=function(v){m=Math.max(m,e.measureText(v).width+_)};return e.save(),e.font=c.string,R(i.title,y),e.font=l.string,R(i.beforeBody.concat(i.afterBody),y),_=t.displayColors?r+2+t.boxPadding:0,R(s,v=>{R(v.before,y),R(v.lines,y),R(v.after,y)}),_=0,e.font=h.string,R(i.footer,y),e.restore(),m+=p.width,{width:m,height:g}}function hl(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function dl(i,t,e,s){const{x:n,width:o}=s,r=e.caretSize+e.caretPadding;if(i==="left"&&n+o+r>t.width||i==="right"&&n-o-r<0)return!0}function ul(i,t,e,s){const{x:n,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),dl(c,i,t,e)&&(c="center"),c}function bs(i,t,e){const s=e.yAlign||t.yAlign||hl(i,e);return{xAlign:e.xAlign||t.xAlign||ul(i,t,e,s),yAlign:s}}function fl(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function gl(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function _s(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Tt(r);let p=fl(t,a);const g=gl(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,u)+n:a==="right"&&(p+=Math.max(d,f)+n),{x:U(p,0,s.width-t.width),y:U(g,0,s.height-t.height)}}function fe(i,t,e){const s=$(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function xs(i){return st([],lt(i))}function pl(i,t,e){return Pt(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function ys(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const bn={beforeTitle:rt,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:rt,beforeBody:rt,beforeLabel:rt,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return T(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:rt,afterBody:rt,beforeFooter:rt,footer:rt,afterFooter:rt};function K(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?bn[t].call(e,s):n}class vs extends ht{static positioners=Yt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new $s(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=pl(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=K(s,"beforeTitle",this,t),o=K(s,"title",this,t),r=K(s,"afterTitle",this,t);let a=[];return a=st(a,lt(n)),a=st(a,lt(o)),a=st(a,lt(r)),a}getBeforeBody(t,e){return xs(K(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return R(t,o=>{const r={before:[],lines:[],after:[]},a=ys(s,o);st(r.before,lt(K(a,"beforeLabel",this,o))),st(r.lines,K(a,"label",this,o)),st(r.after,lt(K(a,"afterLabel",this,o))),n.push(r)}),n}getAfterBody(t,e){return xs(K(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=K(s,"beforeFooter",this,t),o=K(s,"footer",this,t),r=K(s,"afterFooter",this,t);let a=[];return a=st(a,lt(n)),a=st(a,lt(o)),a=st(a,lt(r)),a}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(cl(this.chart,e[l]));return t.filter&&(a=a.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,s))),R(a,h=>{const d=ys(t.callbacks,h);n.push(K(d,"labelColor",this,h)),o.push(K(d,"labelPointStyle",this,h)),r.push(K(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,r=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const a=Yt[s.position].call(this,n,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=ms(this,s),c=Object.assign({},a,l),h=bs(this.chart,s,c),d=_s(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Tt(a),{x:u,y:f}=t,{width:p,height:g}=e;let m,b,_,y,v,x;return o==="center"?(v=f+g/2,n==="left"?(m=u,b=m-r,y=v+r,x=v-r):(m=u+p,b=m+r,y=v-r,x=v+r),_=m):(n==="left"?b=u+Math.max(l,h)+r:n==="right"?b=u+p-Math.max(c,d)-r:b=this.caretX,o==="top"?(y=f,v=y-r,m=b-r,_=b+r):(y=f+g,v=y+r,m=b+r,_=b-r),x=y),{x1:m,x2:b,x3:_,y1:y,y2:v,y3:x}}drawTitle(t,e,s){const n=this.title,o=n.length;let r,a,l;if(o){const c=Rt(s.rtl,this.x,this.width);for(t.x=fe(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",r=X(s.titleFont),a=s.titleSpacing,e.fillStyle=s.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=s.titleMarginBottom-a)}}_drawColorBox(t,e,s,n,o){const r=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=X(o.bodyFont),d=fe(this,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=n.leftForLtr(u,c)+c/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Xe(t,g,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Xe(t,g,m,b)}else{t.lineWidth=A(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=n.leftForLtr(u,c),m=n.leftForLtr(n.xPlus(u,1),c-2),b=Tt(r.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ye(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ye(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=X(s.bodyFont);let u=d.lineHeight,f=0;const p=Rt(s.rtl,this.x,this.width),g=function(M){e.fillText(M,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(r);let b,_,y,v,x,k,S;for(e.textAlign=r,e.textBaseline="middle",e.font=d.string,t.x=fe(this,m,s),e.fillStyle=s.bodyColor,R(this.beforeBody,g),f=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,v=0,k=n.length;v<k;++v){for(b=n[v],_=this.labelTextColors[v],e.fillStyle=_,R(b.before,g),y=b.lines,a&&y.length&&(this._drawColorBox(e,t,v,p,s),u=Math.max(d.lineHeight,l)),x=0,S=y.length;x<S;++x)g(y[x]),u=d.lineHeight;R(b.after,g)}f=0,u=d.lineHeight,R(this.afterBody,g),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let r,a;if(o){const l=Rt(s.rtl,this.x,this.width);for(t.x=fe(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",r=X(s.footerFont),e.fillStyle=s.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(n[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Tt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+d,l),r==="top"&&this.drawCaret(t,e,s,n),e.lineTo(a+c-u,l),e.quadraticCurveTo(a+c,l,a+c,l+u),r==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(a+c,l+h-p),e.quadraticCurveTo(a+c,l+h,a+c-p,l+h),r==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(a+f,l+h),e.quadraticCurveTo(a,l+h,a,l+h-f),r==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(a,l+d),e.quadraticCurveTo(a,l,a+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const r=Yt[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=ms(this,t),l=Object.assign({},r,this._size),c=bs(e,t,l),h=_s(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=$(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),Js(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Qs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!be(s,n),r=this._positionChanged(n,e);(o||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,s),a=this._positionChanged(r,t),l=e||!be(r,o)||a;return l&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,r=Yt[o.position].call(this,t,e);return r!==!1&&(s!==r.x||n!==r.y)}}var jl={id:"tooltip",_element:vs,positioners:Yt,afterInit(i,t,e){e&&(i.tooltip=new vs({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:bn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const ml=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function bl(i,t,e,s){const n=i.indexOf(t);if(n===-1)return ml(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const _l=(i,t)=>i===null?null:U(Math.round(i),0,t);function Ms(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class Yl extends Et{static id="category";static defaults={ticks:{callback:Ms}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:bl(s,t,P(e,t),this._addedLabels),_l(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=e;r++)n.push({value:r});return n}getLabelForValue(t){return Ms.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function xl(i,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,p=h-1,{min:g,max:m}=t,b=!T(r),_=!T(a),y=!T(c),v=(m-g)/(d+1);let x=ki((m-g)/p/f)*f,k,S,M,w;if(x<1e-14&&!b&&!_)return[{value:g},{value:m}];w=Math.ceil(m/x)-Math.floor(g/x),w>p&&(x=ki(w*x/p/f)*f),T(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),n==="ticks"?(S=Math.floor(g/x)*x,M=Math.ceil(m/x)*x):(S=g,M=m),b&&_&&o&&Bn((a-r)/o,x/1e3)?(w=Math.round(Math.min((a-r)/x,h)),x=(a-r)/w,S=r,M=a):y?(S=b?r:S,M=_?a:M,w=c-1,x=(M-S)/w):(w=(M-S)/x,Xt(w,Math.round(w),x/1e3)?w=Math.round(w):w=Math.ceil(w));const D=Math.max(Si(x),Si(S));k=Math.pow(10,T(l)?D:l),S=Math.round(S*k)/k,M=Math.round(M*k)/k;let C=0;for(b&&(u&&S!==r?(e.push({value:r}),S<r&&C++,Xt(Math.round((S+C*x)*k)/k,r,ks(r,v,i))&&C++):S<r&&C++);C<w;++C){const O=Math.round((S+C*x)*k)/k;if(_&&O>a)break;e.push({value:O})}return _&&u&&M!==a?e.length&&Xt(e[e.length-1].value,a,ks(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!_||M===a)&&e.push({value:M}),e}function ks(i,t,{horizontal:e,minRotation:s}){const n=ct(s),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class yl extends Et{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return T(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=s?o:l;if(t){const l=ot(n),c=ot(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${n} ticks. Limiting to 1000.\`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=xl(n,o);return t.bounds==="ticks"&&Wn(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return ci(t,this.chart.options.locale,this.options.ticks.format)}}class Ul extends yl{static id="linear";static defaults={ticks:{callback:Vs.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Z(t)?t:0,this.max=Z(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=ct(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const Ae={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},q=Object.keys(Ae);function Ss(i,t){return i-t}function ws(i,t){if(T(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),Z(r)||(r=typeof s=="string"?e.parse(r,s):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Qt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function Cs(i,t,e,s){const n=q.length;for(let o=q.indexOf(i);o<n-1;++o){const r=Ae[q[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=s)return q[o]}return q[n-1]}function vl(i,t,e,s,n){for(let o=q.length-1;o>=q.indexOf(e);o--){const r=q[o];if(Ae[r].common&&i._adapter.diff(n,s,r)>=t-1)return r}return q[e?q.indexOf(e):0]}function Ml(i){for(let t=q.indexOf(i)+1,e=q.length;t<e;++t)if(Ae[q[t]].common)return q[t]}function Ps(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=ri(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function kl(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function Ds(i,t,e){const s=[],n={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],n[a]=r,s.push({value:a,major:!1});return o===0||!e?s:kl(i,s,n,e)}class Os extends Et{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const s=t.time||(t.time={}),n=this._adapter=new Dr._date(t.adapters.date);n.init(e),Ut(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:ws(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=Z(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=Z(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,r=this.max,a=Yn(n,o,r);return this._unit=e.unit||(s.autoSkip?Cs(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):vl(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:Ml(this._unit),this.initOffsets(n),t.reverse&&a.reverse(),Ds(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=U(e,0,r),s=U(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||Cs(o.minUnit,e,s,this._getLabelCapacity(e)),a=P(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Qt(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(s,e,r)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+r);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,a,r),f++)Ps(h,u,p);return(u===s||n.bounds==="ticks"||f===1)&&Ps(h,u,p),Object.keys(h).sort(Ss).map(g=>+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,n){const o=this.options,r=o.ticks.callback;if(r)return E(r,[t,e,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],d=c&&a[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=ct(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),r=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:s*o+a*r,h:s*r+a*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,Ds(this,[t],this._majorUnit),n),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(ws(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ws(t.sort(Ss))}}function ge(i,t,e){let s=0,n=i.length-1,o,r,a,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=Mt(i,"pos",t)),{pos:o,time:a}=i[s],{pos:r,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=Mt(i,"time",t)),{time:o,pos:a}=i[s],{time:r,pos:l}=i[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class Xl extends Os{static id="timeseries";static defaults=Os.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=ge(e,this.min),this._tableRange=ge(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,a=n.length;r<a;++r)h=n[r+1],l=n[r-1],c=n[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,e=this.max;let s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(ge(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return ge(this._table,s*this._tableRange+this._minPos,!0)}}const As=/^on/,_n=[];Object.keys(globalThis).forEach(i=>{As.test(i)&&_n.push(i.replace(As,""))});function Te(i){const t=vn,e=[];function s(n){yn(t,n)}Ts(()=>{const n=i();_n.forEach(n instanceof Element?o=>e.push(xn(n,o,s)):o=>e.push(n.$on(o,s)))}),Rs(()=>{for(;e.length;)e.pop()()})}function Sl(i){let t,e=[i[1]],s={};for(let n=0;n<e.length;n+=1)s=Q(s,e[n]);return{c(){t=Sn("canvas"),wn(t,s)},m(n,o){kn(n,t,o),i[8](t)},p:Re,i:Re,o:Re,d(n){n&&Mn(t),i[8](null)}}}function wl(i){let{data:t,type:e,options:s,plugins:n,children:o,$$scope:r,$$slots:a,...l}=i;return l}function Cl(i,t,e){let{type:s}=t,{data:n={datasets:[]}}=t,{options:o={}}=t,{plugins:r=[]}=t,{updateMode:a=void 0}=t,{chart:l=null}=t,c,h=wl(t);Ts(()=>{e(2,l=new ie(c,{type:s,data:n,options:o,plugins:r}))}),Cn(()=>{l&&(e(2,l.data=n,l),Object.assign(l.options,o),l.update(a))}),Rs(()=>{l&&l.destroy(),e(2,l=null)}),Te(()=>c);function d(u){Ct[u?"unshift":"push"](()=>{c=u,e(0,c)})}return i.$$set=u=>{e(9,t=Q(Q({},t),ft(u))),"type"in u&&e(3,s=u.type),"data"in u&&e(4,n=u.data),"options"in u&&e(5,o=u.options),"plugins"in u&&e(6,r=u.plugins),"updateMode"in u&&e(7,a=u.updateMode),"chart"in u&&e(2,l=u.chart)},t=ft(t),[c,h,l,s,n,o,r,a,d]}class xi extends Se{constructor(t){super(),we(this,t,Cl,Sl,Ce,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function Pl(i){let t,e,s;const n=[{type:"line"},i[1]];function o(a){i[4](a)}let r={};for(let a=0;a<n.length;a+=1)r=Q(r,n[a]);return i[0]!==void 0&&(r.chart=i[0]),t=new xi({props:r}),i[3](t),Ct.push(()=>Je(t,"chart",o)),{c(){ni(t.$$.fragment)},m(a,l){si(t,a,l),s=!0},p(a,[l]){const c=l&2?ti(n,[n[0],ei(a[1])]):{};!e&&l&1&&(e=!0,c.chart=a[0],ii(()=>e=!1)),t.$set(c)},i(a){s||($e(t.$$.fragment,a),s=!0)},o(a){Ze(t.$$.fragment,a),s=!1},d(a){i[3](null),Qe(t,a)}}}function Dl(i,t,e){ie.register(Pr);let{chart:s=null}=t,n,o;Te(()=>o);function r(l){Ct[l?"unshift":"push"](()=>{o=l,e(2,o)})}function a(l){s=l,e(0,s)}return i.$$set=l=>{e(5,t=Q(Q({},t),ft(l))),"chart"in l&&e(0,s=l.chart)},i.$$.update=()=>{e(1,n=t)},t=ft(t),[s,n,o,r,a]}class Kl extends Se{constructor(t){super(),we(this,t,Dl,Pl,Ce,{chart:0})}}function Ol(i){let t,e,s;const n=[{type:"doughnut"},i[1]];function o(a){i[4](a)}let r={};for(let a=0;a<n.length;a+=1)r=Q(r,n[a]);return i[0]!==void 0&&(r.chart=i[0]),t=new xi({props:r}),i[3](t),Ct.push(()=>Je(t,"chart",o)),{c(){ni(t.$$.fragment)},m(a,l){si(t,a,l),s=!0},p(a,[l]){const c=l&2?ti(n,[n[0],ei(a[1])]):{};!e&&l&1&&(e=!0,c.chart=a[0],ii(()=>e=!1)),t.$set(c)},i(a){s||($e(t.$$.fragment,a),s=!0)},o(a){Ze(t.$$.fragment,a),s=!1},d(a){i[3](null),Qe(t,a)}}}function Al(i,t,e){ie.register(Cr);let{chart:s=null}=t,n,o;Te(()=>o);function r(l){Ct[l?"unshift":"push"](()=>{o=l,e(2,o)})}function a(l){s=l,e(0,s)}return i.$$set=l=>{e(5,t=Q(Q({},t),ft(l))),"chart"in l&&e(0,s=l.chart)},i.$$.update=()=>{e(1,n=t)},t=ft(t),[s,n,o,r,a]}class ql extends Se{constructor(t){super(),we(this,t,Al,Ol,Ce,{chart:0})}}function Tl(i){let t,e,s;const n=[{type:"bar"},i[1]];function o(a){i[4](a)}let r={};for(let a=0;a<n.length;a+=1)r=Q(r,n[a]);return i[0]!==void 0&&(r.chart=i[0]),t=new xi({props:r}),i[3](t),Ct.push(()=>Je(t,"chart",o)),{c(){ni(t.$$.fragment)},m(a,l){si(t,a,l),s=!0},p(a,[l]){const c=l&2?ti(n,[n[0],ei(a[1])]):{};!e&&l&1&&(e=!0,c.chart=a[0],ii(()=>e=!1)),t.$set(c)},i(a){s||($e(t.$$.fragment,a),s=!0)},o(a){Ze(t.$$.fragment,a),s=!1},d(a){i[3](null),Qe(t,a)}}}function Rl(i,t,e){ie.register(Sr);let{chart:s=null}=t,n,o;Te(()=>o);function r(l){Ct[l?"unshift":"push"](()=>{o=l,e(2,o)})}function a(l){s=l,e(0,s)}return i.$$set=l=>{e(5,t=Q(Q({},t),ft(l))),"chart"in l&&e(0,s=l.chart)},i.$$.update=()=>{e(1,n=t)},t=ft(t),[s,n,o,r,a]}class Gl extends Se{constructor(t){super(),we(this,t,Rl,Tl,Ce,{chart:0})}}export{Fl as A,Gl as B,ie as C,ql as D,Kl as L,Wl as P,Yl as a,Ul as b,Bl as c,jl as d,Nl as e,Hl as f,Vl as p};
21278
+ \`):i}function Aa(i,t){const{element:e,datasetIndex:s,index:n}=t,o=i.getDatasetMeta(s).controller,{label:r,value:a}=o.getLabelAndValue(n);return{chart:i,label:r,parsed:o.getParsed(n),raw:i.data.datasets[s].data[n],formattedValue:a,dataset:o.getDataset(),dataIndex:n,datasetIndex:s,element:e}}function Ji(i,t){const e=i.chart.ctx,{body:s,footer:n,title:o}=i,{boxWidth:r,boxHeight:a}=t,l=U(t.bodyFont),c=U(t.titleFont),h=U(t.footerFont),d=o.length,u=n.length,f=s.length,p=Q(t.padding);let g=p.height,m=0,b=s.reduce((v,x)=>v+x.before.length+x.lines.length+x.after.length,0);if(b+=i.beforeBody.length+i.afterBody.length,d&&(g+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const v=t.displayColors?Math.max(a,l.lineHeight):l.lineHeight;g+=f*v+(b-f)*l.lineHeight+(b-1)*t.bodySpacing}u&&(g+=t.footerMarginTop+u*h.lineHeight+(u-1)*t.footerSpacing);let _=0;const y=function(v){m=Math.max(m,e.measureText(v).width+_)};return e.save(),e.font=c.string,R(i.title,y),e.font=l.string,R(i.beforeBody.concat(i.afterBody),y),_=t.displayColors?r+2+t.boxPadding:0,R(s,v=>{R(v.before,y),R(v.lines,y),R(v.after,y)}),_=0,e.font=h.string,R(i.footer,y),e.restore(),m+=p.width,{width:m,height:g}}function Ta(i,t){const{y:e,height:s}=t;return e<s/2?"top":e>i.height-s/2?"bottom":"center"}function Ra(i,t,e,s){const{x:n,width:o}=s,r=e.caretSize+e.caretPadding;if(i==="left"&&n+o+r>t.width||i==="right"&&n-o-r<0)return!0}function La(i,t,e,s){const{x:n,width:o}=e,{width:r,chartArea:{left:a,right:l}}=i;let c="center";return s==="center"?c=n<=(a+l)/2?"left":"right":n<=o/2?c="left":n>=r-o/2&&(c="right"),Ra(c,i,t,e)&&(c="center"),c}function Qi(i,t,e){const s=e.yAlign||t.yAlign||Ta(i,e);return{xAlign:e.xAlign||t.xAlign||La(i,t,e,s),yAlign:s}}function Ia(i,t){let{x:e,width:s}=i;return t==="right"?e-=s:t==="center"&&(e-=s/2),e}function Ea(i,t,e){let{y:s,height:n}=i;return t==="top"?s+=e:t==="bottom"?s-=n+e:s-=n/2,s}function Zi(i,t,e,s){const{caretSize:n,caretPadding:o,cornerRadius:r}=i,{xAlign:a,yAlign:l}=e,c=n+o,{topLeft:h,topRight:d,bottomLeft:u,bottomRight:f}=Dt(r);let p=Ia(t,a);const g=Ea(t,l,c);return l==="center"?a==="left"?p+=c:a==="right"&&(p-=c):a==="left"?p-=Math.max(h,u)+n:a==="right"&&(p+=Math.max(d,f)+n),{x:Y(p,0,s.width-t.width),y:Y(g,0,s.height-t.height)}}function ce(i,t,e){const s=Q(e.padding);return t==="center"?i.x+i.width/2:t==="right"?i.x+i.width-s.right:i.x+s.left}function ts(i){return it([],at(i))}function za(i,t,e){return St(i,{tooltip:t,tooltipItems:e,type:"tooltip"})}function es(i,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?i.override(e):i}const Ks={beforeTitle:ot,title(i){if(i.length>0){const t=i[0],e=t.chart.data.labels,s=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(s>0&&t.dataIndex<s)return e[t.dataIndex]}return""},afterTitle:ot,beforeBody:ot,beforeLabel:ot,label(i){if(this&&this.options&&this.options.mode==="dataset")return i.label+": "+i.formattedValue||i.formattedValue;let t=i.dataset.label||"";t&&(t+=": ");const e=i.formattedValue;return T(e)||(t+=e),t},labelColor(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(i){const e=i.chart.getDatasetMeta(i.datasetIndex).controller.getStyle(i.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:ot,afterBody:ot,beforeFooter:ot,footer:ot,afterFooter:ot};function X(i,t,e,s){const n=i[t].call(e,s);return typeof n>"u"?Ks[t].call(e,s):n}class is extends ct{static positioners=Nt;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,s=this.options.setContext(this.getContext()),n=s.enabled&&e.options.animation&&s.animations,o=new Ts(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=za(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:s}=e,n=X(s,"beforeTitle",this,t),o=X(s,"title",this,t),r=X(s,"afterTitle",this,t);let a=[];return a=it(a,at(n)),a=it(a,at(o)),a=it(a,at(r)),a}getBeforeBody(t,e){return ts(X(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:s}=e,n=[];return R(t,o=>{const r={before:[],lines:[],after:[]},a=es(s,o);it(r.before,at(X(a,"beforeLabel",this,o))),it(r.lines,X(a,"label",this,o)),it(r.after,at(X(a,"afterLabel",this,o))),n.push(r)}),n}getAfterBody(t,e){return ts(X(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:s}=e,n=X(s,"beforeFooter",this,t),o=X(s,"footer",this,t),r=X(s,"afterFooter",this,t);let a=[];return a=it(a,at(n)),a=it(a,at(o)),a=it(a,at(r)),a}_createItems(t){const e=this._active,s=this.chart.data,n=[],o=[],r=[];let a=[],l,c;for(l=0,c=e.length;l<c;++l)a.push(Aa(this.chart,e[l]));return t.filter&&(a=a.filter((h,d,u)=>t.filter(h,d,u,s))),t.itemSort&&(a=a.sort((h,d)=>t.itemSort(h,d,s))),R(a,h=>{const d=es(t.callbacks,h);n.push(X(d,"labelColor",this,h)),o.push(X(d,"labelPointStyle",this,h)),r.push(X(d,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const s=this.options.setContext(this.getContext()),n=this._active;let o,r=[];if(!n.length)this.opacity!==0&&(o={opacity:0});else{const a=Nt[s.position].call(this,n,this._eventPosition);r=this._createItems(s),this.title=this.getTitle(r,s),this.beforeBody=this.getBeforeBody(r,s),this.body=this.getBody(r,s),this.afterBody=this.getAfterBody(r,s),this.footer=this.getFooter(r,s);const l=this._size=Ji(this,s),c=Object.assign({},a,l),h=Qi(this.chart,s,c),d=Zi(s,c,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,s,n){const o=this.getCaretPosition(t,s,n);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,s){const{xAlign:n,yAlign:o}=this,{caretSize:r,cornerRadius:a}=s,{topLeft:l,topRight:c,bottomLeft:h,bottomRight:d}=Dt(a),{x:u,y:f}=t,{width:p,height:g}=e;let m,b,_,y,v,x;return o==="center"?(v=f+g/2,n==="left"?(m=u,b=m-r,y=v+r,x=v-r):(m=u+p,b=m+r,y=v-r,x=v+r),_=m):(n==="left"?b=u+Math.max(l,h)+r:n==="right"?b=u+p-Math.max(c,d)-r:b=this.caretX,o==="top"?(y=f,v=y-r,m=b-r,_=b+r):(y=f+g,v=y+r,m=b+r,_=b-r),x=y),{x1:m,x2:b,x3:_,y1:y,y2:v,y3:x}}drawTitle(t,e,s){const n=this.title,o=n.length;let r,a,l;if(o){const c=Ot(s.rtl,this.x,this.width);for(t.x=ce(this,s.titleAlign,s),e.textAlign=c.textAlign(s.titleAlign),e.textBaseline="middle",r=U(s.titleFont),a=s.titleSpacing,e.fillStyle=s.titleColor,e.font=r.string,l=0;l<o;++l)e.fillText(n[l],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,l+1===o&&(t.y+=s.titleMarginBottom-a)}}_drawColorBox(t,e,s,n,o){const r=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:l,boxWidth:c}=o,h=U(o.bodyFont),d=ce(this,"left",o),u=n.x(d),f=l<h.lineHeight?(h.lineHeight-l)/2:0,p=e.y+f;if(o.usePointStyle){const g={radius:Math.min(c,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},m=n.leftForLtr(u,c)+c/2,b=p+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,Fe(t,g,m,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,Fe(t,g,m,b)}else{t.lineWidth=A(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=n.leftForLtr(u,c),m=n.leftForLtr(n.xPlus(u,1),c-2),b=Dt(r.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,me(t,{x:g,y:p,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),me(t,{x:m,y:p+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,c,l),t.strokeRect(g,p,c,l),t.fillStyle=r.backgroundColor,t.fillRect(m,p+1,c-2,l-2))}t.fillStyle=this.labelTextColors[s]}drawBody(t,e,s){const{body:n}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:l,boxWidth:c,boxPadding:h}=s,d=U(s.bodyFont);let u=d.lineHeight,f=0;const p=Ot(s.rtl,this.x,this.width),g=function(M){e.fillText(M,p.x(t.x+f),t.y+u/2),t.y+=u+o},m=p.textAlign(r);let b,_,y,v,x,k,S;for(e.textAlign=r,e.textBaseline="middle",e.font=d.string,t.x=ce(this,m,s),e.fillStyle=s.bodyColor,R(this.beforeBody,g),f=a&&m!=="right"?r==="center"?c/2+h:c+2+h:0,v=0,k=n.length;v<k;++v){for(b=n[v],_=this.labelTextColors[v],e.fillStyle=_,R(b.before,g),y=b.lines,a&&y.length&&(this._drawColorBox(e,t,v,p,s),u=Math.max(d.lineHeight,l)),x=0,S=y.length;x<S;++x)g(y[x]),u=d.lineHeight;R(b.after,g)}f=0,u=d.lineHeight,R(this.afterBody,g),t.y-=o}drawFooter(t,e,s){const n=this.footer,o=n.length;let r,a;if(o){const l=Ot(s.rtl,this.x,this.width);for(t.x=ce(this,s.footerAlign,s),t.y+=s.footerMarginTop,e.textAlign=l.textAlign(s.footerAlign),e.textBaseline="middle",r=U(s.footerFont),e.fillStyle=s.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(n[a],l.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+s.footerSpacing}}drawBackground(t,e,s,n){const{xAlign:o,yAlign:r}=this,{x:a,y:l}=t,{width:c,height:h}=s,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:p}=Dt(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+d,l),r==="top"&&this.drawCaret(t,e,s,n),e.lineTo(a+c-u,l),e.quadraticCurveTo(a+c,l,a+c,l+u),r==="center"&&o==="right"&&this.drawCaret(t,e,s,n),e.lineTo(a+c,l+h-p),e.quadraticCurveTo(a+c,l+h,a+c-p,l+h),r==="bottom"&&this.drawCaret(t,e,s,n),e.lineTo(a+f,l+h),e.quadraticCurveTo(a,l+h,a,l+h-f),r==="center"&&o==="left"&&this.drawCaret(t,e,s,n),e.lineTo(a,l+d),e.quadraticCurveTo(a,l,a+d,l),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,s=this.$animations,n=s&&s.x,o=s&&s.y;if(n||o){const r=Nt[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Ji(this,t),l=Object.assign({},r,this._size),c=Qi(e,t,l),h=Zi(t,l,c,e);(n._to!==h.x||o._to!==h.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},o={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const r=Q(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=s,this.drawBackground(o,t,n,e),Ds(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),Os(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const s=this._active,n=t.map(({datasetIndex:a,index:l})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[l],index:l}}),o=!fe(s,n),r=this._positionChanged(n,e);(o||r)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,s=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,s),a=this._positionChanged(r,t),l=e||!fe(r,o)||a;return l&&(this._active=r,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),l}_getActiveElements(t,e,s,n){const o=this.options;if(t.type==="mouseout")return[];if(!n)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,s);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:s,caretY:n,options:o}=this,r=Nt[o.position].call(this,t,e);return r!==!1&&(s!==r.x||n!==r.y)}}var el={id:"tooltip",_element:is,positioners:Nt,afterInit(i,t,e){e&&(i.tooltip=new is({chart:i,options:e}))},beforeUpdate(i,t,e){i.tooltip&&i.tooltip.initialize(e)},reset(i,t,e){i.tooltip&&i.tooltip.initialize(e)},afterDraw(i){const t=i.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(i.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(i.ctx),i.notifyPlugins("afterTooltipDraw",e)}},afterEvent(i,t){if(i.tooltip){const e=t.replay;i.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(i,t)=>t.bodyFont.size,boxWidth:(i,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Ks},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:i=>i!=="filter"&&i!=="itemSort"&&i!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Fa=(i,t,e,s)=>(typeof t=="string"?(e=i.push(t)-1,s.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Ba(i,t,e,s){const n=i.indexOf(t);if(n===-1)return Fa(i,t,e,s);const o=i.lastIndexOf(t);return n!==o?e:n}const Wa=(i,t)=>i===null?null:Y(Math.round(i),0,t);function ss(i){const t=this.getLabels();return i>=0&&i<t.length?t[i]:i}class il extends Rt{static id="category";static defaults={ticks:{callback:ss}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const s=this.getLabels();for(const{index:n,label:o}of e)s[n]===o&&s.splice(n,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(T(t))return null;const s=this.getLabels();return e=isFinite(e)&&s[e]===t?e:Ba(s,t,P(e,t),this._addedLabels),Wa(e,s.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:s,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(s=0),e||(n=this.getLabels().length-1)),this.min=s,this.max=n}buildTicks(){const t=this.min,e=this.max,s=this.options.offset,n=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let r=t;r<=e;r++)n.push({value:r});return n}getLabelForValue(t){return ss.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Ha(i,t){const e=[],{bounds:n,step:o,min:r,max:a,precision:l,count:c,maxTicks:h,maxDigits:d,includeBounds:u}=i,f=o||1,p=h-1,{min:g,max:m}=t,b=!T(r),_=!T(a),y=!T(c),v=(m-g)/(d+1);let x=ni((m-g)/p/f)*f,k,S,M,w;if(x<1e-14&&!b&&!_)return[{value:g},{value:m}];w=Math.ceil(m/x)-Math.floor(g/x),w>p&&(x=ni(w*x/p/f)*f),T(l)||(k=Math.pow(10,l),x=Math.ceil(x*k)/k),n==="ticks"?(S=Math.floor(g/x)*x,M=Math.ceil(m/x)*x):(S=g,M=m),b&&_&&o&&an((a-r)/o,x/1e3)?(w=Math.round(Math.min((a-r)/x,h)),x=(a-r)/w,S=r,M=a):y?(S=b?r:S,M=_?a:M,w=c-1,x=(M-S)/w):(w=(M-S)/x,jt(w,Math.round(w),x/1e3)?w=Math.round(w):w=Math.ceil(w));const D=Math.max(oi(x),oi(S));k=Math.pow(10,T(l)?D:l),S=Math.round(S*k)/k,M=Math.round(M*k)/k;let C=0;for(b&&(u&&S!==r?(e.push({value:r}),S<r&&C++,jt(Math.round((S+C*x)*k)/k,r,ns(r,v,i))&&C++):S<r&&C++);C<w;++C){const O=Math.round((S+C*x)*k)/k;if(_&&O>a)break;e.push({value:O})}return _&&u&&M!==a?e.length&&jt(e[e.length-1].value,a,ns(a,v,i))?e[e.length-1].value=a:e.push({value:a}):(!_||M===a)&&e.push({value:M}),e}function ns(i,t,{horizontal:e,minRotation:s}){const n=lt(s),o=(e?Math.sin(n):Math.cos(n))||.001,r=.75*t*(""+i).length;return Math.min(t/o,r)}class Na extends Rt{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return T(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:s}=this.getUserBounds();let{min:n,max:o}=this;const r=l=>n=e?n:l,a=l=>o=s?o:l;if(t){const l=nt(n),c=nt(o);l<0&&c<0?a(0):l>0&&c>0&&r(0)}if(n===o){let l=o===0?1:Math.abs(o*.05);a(o+l),t||r(n-l)}this.min=n,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:s}=t,n;return s?(n=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,n>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${n} ticks. Limiting to 1000.\`),n=1e3)):(n=this.computeTickLimit(),e=e||11),e&&(n=Math.min(e,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let s=this.getTickLimit();s=Math.max(2,s);const n={maxTicks:s,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Ha(n,o);return t.bounds==="ticks"&&ln(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,s=this.max;if(super.configure(),this.options.offset&&t.length){const n=(s-e)/Math.max(t.length-1,1)/2;e-=n,s+=n}this._startValue=e,this._endValue=s,this._valueRange=s-e}getLabelForValue(t){return Ye(t,this.chart.options.locale,this.options.ticks.format)}}class sl extends Na{static id="linear";static defaults={ticks:{callback:ys.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=J(t)?t:0,this.max=J(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,s=lt(this.options.ticks.minRotation),n=(t?Math.sin(s):Math.cos(s))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/n))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const ke={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},K=Object.keys(ke);function os(i,t){return i-t}function rs(i,t){if(T(t))return null;const e=i._adapter,{parser:s,round:n,isoWeekday:o}=i._parseOpts;let r=t;return typeof s=="function"&&(r=s(r)),J(r)||(r=typeof s=="string"?e.parse(r,s):e.parse(r)),r===null?null:(n&&(r=n==="week"&&(Kt(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,n)),+r)}function as(i,t,e,s){const n=K.length;for(let o=K.indexOf(i);o<n-1;++o){const r=ke[K[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=s)return K[o]}return K[n-1]}function Va(i,t,e,s,n){for(let o=K.length-1;o>=K.indexOf(e);o--){const r=K[o];if(ke[r].common&&i._adapter.diff(n,s,r)>=t-1)return r}return K[e?K.indexOf(e):0]}function ja(i){for(let t=K.indexOf(i)+1,e=K.length;t<e;++t)if(ke[K[t]].common)return K[t]}function ls(i,t,e){if(!e)i[t]=!0;else if(e.length){const{lo:s,hi:n}=Ve(e,t),o=e[s]>=t?e[s]:e[n];i[o]=!0}}function $a(i,t,e,s){const n=i._adapter,o=+n.startOf(t[0].value,s),r=t[t.length-1].value;let a,l;for(a=o;a<=r;a=+n.add(a,1,s))l=e[a],l>=0&&(t[l].major=!0);return t}function cs(i,t,e){const s=[],n={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],n[a]=r,s.push({value:a,major:!1});return o===0||!e?s:$a(i,s,n,e)}class hs extends Rt{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const s=t.time||(t.time={}),n=this._adapter=new Ko._date(t.adapters.date);n.init(e),Vt(s.displayFormats,n.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:rs(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,s=t.time.unit||"day";let{min:n,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function l(c){!r&&!isNaN(c.min)&&(n=Math.min(n,c.min)),!a&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!r||!a)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),n=J(n)&&!isNaN(n)?n:+e.startOf(Date.now(),s),o=J(o)&&!isNaN(o)?o:+e.endOf(Date.now(),s)+1,this.min=Math.min(n,o-1),this.max=Math.max(n+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],s=t[t.length-1]),{min:e,max:s}}buildTicks(){const t=this.options,e=t.time,s=t.ticks,n=s.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const o=this.min,r=this.max,a=fn(n,o,r);return this._unit=e.unit||(s.autoSkip?as(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Va(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:ja(this._unit),this.initOffsets(n),t.reverse&&a.reverse(),cs(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,s=0,n,o;this.options.offset&&t.length&&(n=this.getDecimalForValue(t[0]),t.length===1?e=1-n:e=(this.getDecimalForValue(t[1])-n)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?s=o:s=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=Y(e,0,r),s=Y(s,0,r),this._offsets={start:e,end:s,factor:1/(e+1+s)}}_generate(){const t=this._adapter,e=this.min,s=this.max,n=this.options,o=n.time,r=o.unit||as(o.minUnit,e,s,this._getLabelCapacity(e)),a=P(n.ticks.stepSize,1),l=r==="week"?o.isoWeekday:!1,c=Kt(l)||l===!0,h={};let d=e,u,f;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":r),t.diff(s,e,r)>1e5*a)throw new Error(e+" and "+s+" are too far apart with stepSize of "+a+" "+r);const p=n.ticks.source==="data"&&this.getDataTimestamps();for(u=d,f=0;u<s;u=+t.add(u,a,r),f++)ls(h,u,p);return(u===s||n.bounds==="ticks"||f===1)&&ls(h,u,p),Object.keys(h).sort(os).map(g=>+g)}getLabelForValue(t){const e=this._adapter,s=this.options.time;return s.tooltipFormat?e.format(t,s.tooltipFormat):e.format(t,s.displayFormats.datetime)}format(t,e){const n=this.options.time.displayFormats,o=this._unit,r=e||n[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,s,n){const o=this.options,r=o.ticks.callback;if(r)return E(r,[t,e,s],this);const a=o.time.displayFormats,l=this._unit,c=this._majorUnit,h=l&&a[l],d=c&&a[c],u=s[e],f=c&&d&&u&&u.major;return this._adapter.format(t,n||(f?d:h))}generateTickLabels(t){let e,s,n;for(e=0,s=t.length;e<s;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,s=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+s)*e.factor)}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+s*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,s=this.ctx.measureText(t).width,n=lt(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(n),r=Math.sin(n),a=this._resolveTickFontOptions(0).size;return{w:s*o+a*r,h:s*r+a*o}}_getLabelCapacity(t){const e=this.options.time,s=e.displayFormats,n=s[e.unit]||s.millisecond,o=this._tickFormatFunction(t,0,cs(this,[t],this._majorUnit),n),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,s;if(t.length)return t;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(e=0,s=n.length;e<s;++e)t=t.concat(n[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,s;if(t.length)return t;const n=this.getLabels();for(e=0,s=n.length;e<s;++e)t.push(rs(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return bs(t.sort(os))}}function he(i,t,e){let s=0,n=i.length-1,o,r,a,l;e?(t>=i[s].pos&&t<=i[n].pos&&({lo:s,hi:n}=yt(i,"pos",t)),{pos:o,time:a}=i[s],{pos:r,time:l}=i[n]):(t>=i[s].time&&t<=i[n].time&&({lo:s,hi:n}=yt(i,"time",t)),{time:o,pos:a}=i[s],{time:r,pos:l}=i[n]);const c=r-o;return c?a+(l-a)*(t-o)/c:a}class nl extends hs{static id="timeseries";static defaults=hs.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=he(e,this.min),this._tableRange=he(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:s}=this,n=[],o=[];let r,a,l,c,h;for(r=0,a=t.length;r<a;++r)c=t[r],c>=e&&c<=s&&n.push(c);if(n.length<2)return[{time:e,pos:0},{time:s,pos:1}];for(r=0,a=n.length;r<a;++r)h=n[r+1],l=n[r-1],c=n[r],Math.round((h+l)/2)!==c&&o.push({time:c,pos:r/(a-1)});return o}_generate(){const t=this.min,e=this.max;let s=super.getDataTimestamps();return(!s.includes(t)||!s.length)&&s.splice(0,0,t),(!s.includes(e)||s.length===1)&&s.push(e),s.sort((n,o)=>n-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),s=this.getLabelTimestamps();return e.length&&s.length?t=this.normalize(e.concat(s)):t=e.length?e:s,t=this._cache.all=t,t}getDecimalForValue(t){return(he(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,s=this.getDecimalForPixel(t)/e.factor-e.end;return he(this._table,s*this._tableRange+this._minPos,!0)}}export{Ga as A,Ua as B,sa as C,Xa as D,Ka as L,Ja as P,il as a,sl as b,qa as c,el as d,Za as e,Qa as f,tl as p};
21274
21279
  `,
21275
21280
  "vendor-lodash-CRdCilnf.js": 'var Ir=typeof global=="object"&&global&&global.Object===Object&&global,Qr=typeof self=="object"&&self&&self.Object===Object&&self,T=Ir||Qr||Function("return this")(),y=T.Symbol,Gr=Object.prototype,Vr=Gr.hasOwnProperty,kr=Gr.toString,j=y?y.toStringTag:void 0;function rn(r){var n=Vr.call(r,j),t=r[j];try{r[j]=void 0;var e=!0}catch{}var i=kr.call(r);return e&&(n?r[j]=t:delete r[j]),i}var nn=Object.prototype,tn=nn.toString;function en(r){return tn.call(r)}var an="[object Null]",un="[object Undefined]",pr=y?y.toStringTag:void 0;function M(r){return r==null?r===void 0?un:an:pr&&pr in Object(r)?rn(r):en(r)}function C(r){return r!=null&&typeof r=="object"}var on="[object Symbol]";function L(r){return typeof r=="symbol"||C(r)&&M(r)==on}function B(r,n){for(var t=-1,e=r==null?0:r.length,i=Array(e);++t<e;)i[t]=n(r[t],t,r);return i}var _=Array.isArray,gr=y?y.prototype:void 0,dr=gr?gr.toString:void 0;function zr(r){if(typeof r=="string")return r;if(_(r))return B(r,zr)+"";if(L(r))return dr?dr.call(r):"";var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}function U(r){var n=typeof r;return r!=null&&(n=="object"||n=="function")}function H(r){return r}var fn="[object AsyncFunction]",sn="[object Function]",cn="[object GeneratorFunction]",ln="[object Proxy]";function Br(r){if(!U(r))return!1;var n=M(r);return n==sn||n==cn||n==fn||n==ln}var W=T["__core-js_shared__"],hr=(function(){var r=/[^.]+$/.exec(W&&W.keys&&W.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function pn(r){return!!hr&&hr in r}var gn=Function.prototype,dn=gn.toString;function E(r){if(r!=null){try{return dn.call(r)}catch{}try{return r+""}catch{}}return""}var hn=/[\\\\^$.*+?()[\\]{}|]/g,_n=/^\\[object .+?Constructor\\]$/,yn=Function.prototype,vn=Object.prototype,bn=yn.toString,Tn=vn.hasOwnProperty,An=RegExp("^"+bn.call(Tn).replace(hn,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function wn(r){if(!U(r)||pn(r))return!1;var n=Br(r)?An:_n;return n.test(E(r))}function On(r,n){return r?.[n]}function x(r,n){var t=On(r,n);return wn(t)?t:void 0}var Q=x(T,"WeakMap");function Pn(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var $n=800,mn=16,Sn=Date.now;function En(r){var n=0,t=0;return function(){var e=Sn(),i=mn-(e-t);if(t=e,i>0){if(++n>=$n)return arguments[0]}else n=0;return r.apply(void 0,arguments)}}function xn(r){return function(){return r}}var _r=(function(){try{var r=x(Object,"defineProperty");return r({},"",{}),r}catch{}})(),Cn=_r?function(r,n){return _r(r,"toString",{configurable:!0,enumerable:!1,value:xn(n),writable:!0})}:H,Mn=En(Cn),jn=9007199254740991,Rn=/^(?:0|[1-9]\\d*)$/;function tr(r,n){var t=typeof r;return n=n??jn,!!n&&(t=="number"||t!="symbol"&&Rn.test(r))&&r>-1&&r%1==0&&r<n}function er(r,n){return r===n||r!==r&&n!==n}var yr=Math.max;function Ln(r,n,t){return n=yr(n===void 0?r.length-1:n,0),function(){for(var e=arguments,i=-1,a=yr(e.length-n,0),u=Array(a);++i<a;)u[i]=e[n+i];i=-1;for(var o=Array(n+1);++i<n;)o[i]=e[i];return o[n]=t(u),Pn(r,this,o)}}function Fn(r,n){return Mn(Ln(r,n,H),r+"")}var Dn=9007199254740991;function ar(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Dn}function K(r){return r!=null&&ar(r.length)&&!Br(r)}function vr(r,n,t){if(!U(t))return!1;var e=typeof n;return(e=="number"?K(t)&&tr(n,t.length):e=="string"&&n in t)?er(t[n],r):!1}var In=Object.prototype;function Gn(r){var n=r&&r.constructor,t=typeof n=="function"&&n.prototype||In;return r===t}function zn(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}var Bn="[object Arguments]";function br(r){return C(r)&&M(r)==Bn}var Nr=Object.prototype,Nn=Nr.hasOwnProperty,Un=Nr.propertyIsEnumerable,ir=br((function(){return arguments})())?br:function(r){return C(r)&&Nn.call(r,"callee")&&!Un.call(r,"callee")};function Hn(){return!1}var Ur=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tr=Ur&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Tr&&Tr.exports===Ur,Ar=Kn?T.Buffer:void 0,Xn=Ar?Ar.isBuffer:void 0,V=Xn||Hn,qn="[object Arguments]",Zn="[object Array]",Wn="[object Boolean]",Jn="[object Date]",Yn="[object Error]",Qn="[object Function]",Vn="[object Map]",kn="[object Number]",rt="[object Object]",nt="[object RegExp]",tt="[object Set]",et="[object String]",at="[object WeakMap]",it="[object ArrayBuffer]",ut="[object DataView]",ot="[object Float32Array]",ft="[object Float64Array]",st="[object Int8Array]",ct="[object Int16Array]",lt="[object Int32Array]",pt="[object Uint8Array]",gt="[object Uint8ClampedArray]",dt="[object Uint16Array]",ht="[object Uint32Array]",c={};c[ot]=c[ft]=c[st]=c[ct]=c[lt]=c[pt]=c[gt]=c[dt]=c[ht]=!0;c[qn]=c[Zn]=c[it]=c[Wn]=c[ut]=c[Jn]=c[Yn]=c[Qn]=c[Vn]=c[kn]=c[rt]=c[nt]=c[tt]=c[et]=c[at]=!1;function _t(r){return C(r)&&ar(r.length)&&!!c[M(r)]}function Hr(r){return function(n){return r(n)}}var Kr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,R=Kr&&typeof module=="object"&&module&&!module.nodeType&&module,yt=R&&R.exports===Kr,J=yt&&Ir.process,wr=(function(){try{var r=R&&R.require&&R.require("util").types;return r||J&&J.binding&&J.binding("util")}catch{}})(),Or=wr&&wr.isTypedArray,Xr=Or?Hr(Or):_t,vt=Object.prototype,bt=vt.hasOwnProperty;function Tt(r,n){var t=_(r),e=!t&&ir(r),i=!t&&!e&&V(r),a=!t&&!e&&!i&&Xr(r),u=t||e||i||a,o=u?zn(r.length,String):[],f=o.length;for(var s in r)bt.call(r,s)&&!(u&&(s=="length"||i&&(s=="offset"||s=="parent")||a&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||tr(s,f)))&&o.push(s);return o}function At(r,n){return function(t){return r(n(t))}}var wt=At(Object.keys,Object),Ot=Object.prototype,Pt=Ot.hasOwnProperty;function $t(r){if(!Gn(r))return wt(r);var n=[];for(var t in Object(r))Pt.call(r,t)&&t!="constructor"&&n.push(t);return n}function ur(r){return K(r)?Tt(r):$t(r)}var mt=/\\.|\\[(?:[^[\\]]*|(["\'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,St=/^\\w*$/;function or(r,n){if(_(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||L(r)?!0:St.test(r)||!mt.test(r)||n!=null&&r in Object(n)}var F=x(Object,"create");function Et(){this.__data__=F?F(null):{},this.size=0}function xt(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n}var Ct="__lodash_hash_undefined__",Mt=Object.prototype,jt=Mt.hasOwnProperty;function Rt(r){var n=this.__data__;if(F){var t=n[r];return t===Ct?void 0:t}return jt.call(n,r)?n[r]:void 0}var Lt=Object.prototype,Ft=Lt.hasOwnProperty;function Dt(r){var n=this.__data__;return F?n[r]!==void 0:Ft.call(n,r)}var It="__lodash_hash_undefined__";function Gt(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=F&&n===void 0?It:n,this}function S(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}S.prototype.clear=Et;S.prototype.delete=xt;S.prototype.get=Rt;S.prototype.has=Dt;S.prototype.set=Gt;function zt(){this.__data__=[],this.size=0}function X(r,n){for(var t=r.length;t--;)if(er(r[t][0],n))return t;return-1}var Bt=Array.prototype,Nt=Bt.splice;function Ut(r){var n=this.__data__,t=X(n,r);if(t<0)return!1;var e=n.length-1;return t==e?n.pop():Nt.call(n,t,1),--this.size,!0}function Ht(r){var n=this.__data__,t=X(n,r);return t<0?void 0:n[t][1]}function Kt(r){return X(this.__data__,r)>-1}function Xt(r,n){var t=this.__data__,e=X(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this}function A(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}A.prototype.clear=zt;A.prototype.delete=Ut;A.prototype.get=Ht;A.prototype.has=Kt;A.prototype.set=Xt;var D=x(T,"Map");function qt(){this.size=0,this.__data__={hash:new S,map:new(D||A),string:new S}}function Zt(r){var n=typeof r;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?r!=="__proto__":r===null}function q(r,n){var t=r.__data__;return Zt(n)?t[typeof n=="string"?"string":"hash"]:t.map}function Wt(r){var n=q(this,r).delete(r);return this.size-=n?1:0,n}function Jt(r){return q(this,r).get(r)}function Yt(r){return q(this,r).has(r)}function Qt(r,n){var t=q(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this}function w(r){var n=-1,t=r==null?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}w.prototype.clear=qt;w.prototype.delete=Wt;w.prototype.get=Jt;w.prototype.has=Yt;w.prototype.set=Qt;var Vt="Expected a function";function fr(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError(Vt);var t=function(){var e=arguments,i=n?n.apply(this,e):e[0],a=t.cache;if(a.has(i))return a.get(i);var u=r.apply(this,e);return t.cache=a.set(i,u)||a,u};return t.cache=new(fr.Cache||w),t}fr.Cache=w;var kt=500;function re(r){var n=fr(r,function(e){return t.size===kt&&t.clear(),e}),t=n.cache;return n}var ne=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["\'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,te=/\\\\(\\\\)?/g,ee=re(function(r){var n=[];return r.charCodeAt(0)===46&&n.push(""),r.replace(ne,function(t,e,i,a){n.push(i?a.replace(te,"$1"):e||t)}),n});function ae(r){return r==null?"":zr(r)}function qr(r,n){return _(r)?r:or(r,n)?[r]:ee(ae(r))}function Z(r){if(typeof r=="string"||L(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}function sr(r,n){n=qr(n,r);for(var t=0,e=n.length;r!=null&&t<e;)r=r[Z(n[t++])];return t&&t==e?r:void 0}function ie(r,n,t){var e=r==null?void 0:sr(r,n);return e===void 0?t:e}function Zr(r,n){for(var t=-1,e=n.length,i=r.length;++t<e;)r[i+t]=n[t];return r}var Pr=y?y.isConcatSpreadable:void 0;function ue(r){return _(r)||ir(r)||!!(Pr&&r&&r[Pr])}function oe(r,n,t,e,i){var a=-1,u=r.length;for(t||(t=ue),i||(i=[]);++a<u;){var o=r[a];t(o)?Zr(i,o):i[i.length]=o}return i}function fe(){this.__data__=new A,this.size=0}function se(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t}function ce(r){return this.__data__.get(r)}function le(r){return this.__data__.has(r)}var pe=200;function ge(r,n){var t=this.__data__;if(t instanceof A){var e=t.__data__;if(!D||e.length<pe-1)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new w(e)}return t.set(r,n),this.size=t.size,this}function b(r){var n=this.__data__=new A(r);this.size=n.size}b.prototype.clear=fe;b.prototype.delete=se;b.prototype.get=ce;b.prototype.has=le;b.prototype.set=ge;function de(r,n){for(var t=-1,e=r==null?0:r.length,i=0,a=[];++t<e;){var u=r[t];n(u,t,r)&&(a[i++]=u)}return a}function he(){return[]}var _e=Object.prototype,ye=_e.propertyIsEnumerable,$r=Object.getOwnPropertySymbols,ve=$r?function(r){return r==null?[]:(r=Object(r),de($r(r),function(n){return ye.call(r,n)}))}:he;function be(r,n,t){var e=n(r);return _(r)?e:Zr(e,t(r))}function mr(r){return be(r,ur,ve)}var k=x(T,"DataView"),rr=x(T,"Promise"),nr=x(T,"Set"),Sr="[object Map]",Te="[object Object]",Er="[object Promise]",xr="[object Set]",Cr="[object WeakMap]",Mr="[object DataView]",Ae=E(k),we=E(D),Oe=E(rr),Pe=E(nr),$e=E(Q),P=M;(k&&P(new k(new ArrayBuffer(1)))!=Mr||D&&P(new D)!=Sr||rr&&P(rr.resolve())!=Er||nr&&P(new nr)!=xr||Q&&P(new Q)!=Cr)&&(P=function(r){var n=M(r),t=n==Te?r.constructor:void 0,e=t?E(t):"";if(e)switch(e){case Ae:return Mr;case we:return Sr;case Oe:return Er;case Pe:return xr;case $e:return Cr}return n});var jr=T.Uint8Array,me="__lodash_hash_undefined__";function Se(r){return this.__data__.set(r,me),this}function Ee(r){return this.__data__.has(r)}function N(r){var n=-1,t=r==null?0:r.length;for(this.__data__=new w;++n<t;)this.add(r[n])}N.prototype.add=N.prototype.push=Se;N.prototype.has=Ee;function xe(r,n){for(var t=-1,e=r==null?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function Ce(r,n){return r.has(n)}var Me=1,je=2;function Wr(r,n,t,e,i,a){var u=t&Me,o=r.length,f=n.length;if(o!=f&&!(u&&f>o))return!1;var s=a.get(r),g=a.get(n);if(s&&g)return s==n&&g==r;var p=-1,l=!0,v=t&je?new N:void 0;for(a.set(r,n),a.set(n,r);++p<o;){var d=r[p],h=n[p];if(e)var O=u?e(h,d,p,n,r,a):e(d,h,p,r,n,a);if(O!==void 0){if(O)continue;l=!1;break}if(v){if(!xe(n,function($,m){if(!Ce(v,m)&&(d===$||i(d,$,t,e,a)))return v.push(m)})){l=!1;break}}else if(!(d===h||i(d,h,t,e,a))){l=!1;break}}return a.delete(r),a.delete(n),l}function Re(r){var n=-1,t=Array(r.size);return r.forEach(function(e,i){t[++n]=[i,e]}),t}function Le(r){var n=-1,t=Array(r.size);return r.forEach(function(e){t[++n]=e}),t}var Fe=1,De=2,Ie="[object Boolean]",Ge="[object Date]",ze="[object Error]",Be="[object Map]",Ne="[object Number]",Ue="[object RegExp]",He="[object Set]",Ke="[object String]",Xe="[object Symbol]",qe="[object ArrayBuffer]",Ze="[object DataView]",Rr=y?y.prototype:void 0,Y=Rr?Rr.valueOf:void 0;function We(r,n,t,e,i,a,u){switch(t){case Ze:if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case qe:return!(r.byteLength!=n.byteLength||!a(new jr(r),new jr(n)));case Ie:case Ge:case Ne:return er(+r,+n);case ze:return r.name==n.name&&r.message==n.message;case Ue:case Ke:return r==n+"";case Be:var o=Re;case He:var f=e&Fe;if(o||(o=Le),r.size!=n.size&&!f)return!1;var s=u.get(r);if(s)return s==n;e|=De,u.set(r,n);var g=Wr(o(r),o(n),e,i,a,u);return u.delete(r),g;case Xe:if(Y)return Y.call(r)==Y.call(n)}return!1}var Je=1,Ye=Object.prototype,Qe=Ye.hasOwnProperty;function Ve(r,n,t,e,i,a){var u=t&Je,o=mr(r),f=o.length,s=mr(n),g=s.length;if(f!=g&&!u)return!1;for(var p=f;p--;){var l=o[p];if(!(u?l in n:Qe.call(n,l)))return!1}var v=a.get(r),d=a.get(n);if(v&&d)return v==n&&d==r;var h=!0;a.set(r,n),a.set(n,r);for(var O=u;++p<f;){l=o[p];var $=r[l],m=n[l];if(e)var lr=u?e(m,$,l,n,r,a):e($,m,l,r,n,a);if(!(lr===void 0?$===m||i($,m,t,e,a):lr)){h=!1;break}O||(O=l=="constructor")}if(h&&!O){var I=r.constructor,G=n.constructor;I!=G&&"constructor"in r&&"constructor"in n&&!(typeof I=="function"&&I instanceof I&&typeof G=="function"&&G instanceof G)&&(h=!1)}return a.delete(r),a.delete(n),h}var ke=1,Lr="[object Arguments]",Fr="[object Array]",z="[object Object]",ra=Object.prototype,Dr=ra.hasOwnProperty;function na(r,n,t,e,i,a){var u=_(r),o=_(n),f=u?Fr:P(r),s=o?Fr:P(n);f=f==Lr?z:f,s=s==Lr?z:s;var g=f==z,p=s==z,l=f==s;if(l&&V(r)){if(!V(n))return!1;u=!0,g=!1}if(l&&!g)return a||(a=new b),u||Xr(r)?Wr(r,n,t,e,i,a):We(r,n,f,t,e,i,a);if(!(t&ke)){var v=g&&Dr.call(r,"__wrapped__"),d=p&&Dr.call(n,"__wrapped__");if(v||d){var h=v?r.value():r,O=d?n.value():n;return a||(a=new b),i(h,O,t,e,a)}}return l?(a||(a=new b),Ve(r,n,t,e,i,a)):!1}function cr(r,n,t,e,i){return r===n?!0:r==null||n==null||!C(r)&&!C(n)?r!==r&&n!==n:na(r,n,t,e,cr,i)}var ta=1,ea=2;function aa(r,n,t,e){var i=t.length,a=i;if(r==null)return!a;for(r=Object(r);i--;){var u=t[i];if(u[2]?u[1]!==r[u[0]]:!(u[0]in r))return!1}for(;++i<a;){u=t[i];var o=u[0],f=r[o],s=u[1];if(u[2]){if(f===void 0&&!(o in r))return!1}else{var g=new b,p;if(!(p===void 0?cr(s,f,ta|ea,e,g):p))return!1}}return!0}function Jr(r){return r===r&&!U(r)}function ia(r){for(var n=ur(r),t=n.length;t--;){var e=n[t],i=r[e];n[t]=[e,i,Jr(i)]}return n}function Yr(r,n){return function(t){return t==null?!1:t[r]===n&&(n!==void 0||r in Object(t))}}function ua(r){var n=ia(r);return n.length==1&&n[0][2]?Yr(n[0][0],n[0][1]):function(t){return t===r||aa(t,r,n)}}function oa(r,n){return r!=null&&n in Object(r)}function fa(r,n,t){n=qr(n,r);for(var e=-1,i=n.length,a=!1;++e<i;){var u=Z(n[e]);if(!(a=r!=null&&t(r,u)))break;r=r[u]}return a||++e!=i?a:(i=r==null?0:r.length,!!i&&ar(i)&&tr(u,i)&&(_(r)||ir(r)))}function sa(r,n){return r!=null&&fa(r,n,oa)}var ca=1,la=2;function pa(r,n){return or(r)&&Jr(n)?Yr(Z(r),n):function(t){var e=ie(t,r);return e===void 0&&e===n?sa(t,r):cr(n,e,ca|la)}}function ga(r){return function(n){return n?.[r]}}function da(r){return function(n){return sr(n,r)}}function ha(r){return or(r)?ga(Z(r)):da(r)}function _a(r){return typeof r=="function"?r:r==null?H:typeof r=="object"?_(r)?pa(r[0],r[1]):ua(r):ha(r)}function ya(r){return function(n,t,e){for(var i=-1,a=Object(n),u=e(n),o=u.length;o--;){var f=u[++i];if(t(a[f],f,a)===!1)break}return n}}var va=ya();function ba(r,n){return r&&va(r,n,ur)}function Ta(r,n){return function(t,e){if(t==null)return t;if(!K(t))return r(t,e);for(var i=t.length,a=-1,u=Object(t);++a<i&&e(u[a],a,u)!==!1;);return t}}var Aa=Ta(ba);function wa(r,n){var t=-1,e=K(r)?Array(r.length):[];return Aa(r,function(i,a,u){e[++t]=n(i,a,u)}),e}function Oa(r,n){var t=r.length;for(r.sort(n);t--;)r[t]=r[t].value;return r}function Pa(r,n){if(r!==n){var t=r!==void 0,e=r===null,i=r===r,a=L(r),u=n!==void 0,o=n===null,f=n===n,s=L(n);if(!o&&!s&&!a&&r>n||a&&u&&f&&!o&&!s||e&&u&&f||!t&&f||!i)return 1;if(!e&&!a&&!s&&r<n||s&&t&&i&&!e&&!a||o&&t&&i||!u&&i||!f)return-1}return 0}function $a(r,n,t){for(var e=-1,i=r.criteria,a=n.criteria,u=i.length,o=t.length;++e<u;){var f=Pa(i[e],a[e]);if(f){if(e>=o)return f;var s=t[e];return f*(s=="desc"?-1:1)}}return r.index-n.index}function ma(r,n,t){n.length?n=B(n,function(a){return _(a)?function(u){return sr(u,a.length===1?a[0]:a)}:a}):n=[H];var e=-1;n=B(n,Hr(_a));var i=wa(r,function(a,u,o){var f=B(n,function(s){return s(a)});return{criteria:f,index:++e,value:a}});return Oa(i,function(a,u){return $a(a,u,t)})}var Sa=Fn(function(r,n){if(r==null)return[];var t=n.length;return t>1&&vr(r,n[0],n[1])?n=[]:t>2&&vr(n[0],n[1],n[2])&&(n=[n[0]]),ma(r,oe(n),[])});export{Sa as s};\n'
21276
21281
  }