@jeffusion/bungee-core 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/worker.js +65 -13
  2. package/package.json +2 -2
package/dist/worker.js CHANGED
@@ -21180,8 +21180,8 @@ var init_assets = __esm(() => {
21180
21180
  <meta charset="UTF-8" />
21181
21181
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
21182
21182
  <title>Bungee Dashboard</title>
21183
- <script type="module" crossorigin src="/__ui/assets/index-Dbvz-VVG.js"></script>
21184
- <link rel="stylesheet" crossorigin href="/__ui/assets/index-DTHFbwVv.css">
21183
+ <script type="module" crossorigin src="/__ui/assets/index-DdThT9d-.js"></script>
21184
+ <link rel="stylesheet" crossorigin href="/__ui/assets/index-Chy1BWYs.css">
21185
21185
  </head>
21186
21186
  <body>
21187
21187
  <div id="app"></div>
@@ -21189,28 +21189,29 @@ var init_assets = __esm(() => {
21189
21189
  </html>
21190
21190
  `,
21191
21191
  assets: {
21192
- "index-Dbvz-VVG.js": `var Gp=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var W5=Gp((Gs,Xs)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Ee(){}function Ss(t,e){for(const n in e)t[n]=e[n];return t}function Kh(t){return t()}function ka(){return Object.create(null)}function at(t){t.forEach(Kh)}function ui(t){return typeof t=="function"}function Lt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function Xp(t){return Object.keys(t).length===0}function Hr(t,...e){if(t==null){for(const s of e)s(void 0);return Ee}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ds(t){let e;return Hr(t,n=>e=n)(),e}function Gt(t,e,n){t.$$.on_destroy.push(Hr(e,n))}function ci(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function a(t,e){t.appendChild(e)}function H(t,e,n){t.insertBefore(e,n||null)}function L(t){t.parentNode&&t.parentNode.removeChild(t)}function En(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function d(t){return document.createElement(t)}function de(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function E(t){return document.createTextNode(t)}function w(){return E(" ")}function $n(){return E("")}function te(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function Yp(t){return function(e){return e.preventDefault(),t.call(this,e)}}function c(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Jp=["width","height"];function Kp(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const s in e)e[s]==null?t.removeAttribute(s):s==="style"?t.style.cssText=e[s]:s==="__value"?t.value=t[s]=e[s]:n[s]&&n[s].set&&Jp.indexOf(s)===-1?t[s]=e[s]:c(t,s,e[s])}function Zp(t){let e;return{p(...n){e=n,e.forEach(s=>t.push(s))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function gt(t){return t===""?null:+t}function Qp(t){return Array.from(t.childNodes)}function M(t,e){e=""+e,t.data!==e&&(t.data=e)}function ie(t,e){t.value=e??""}function Sa(t,e,n,s){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Cn(t,e,n){for(let s=0;s<t.options.length;s+=1){const i=t.options[s];if(i.__value===e){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Is(t){const e=t.querySelector(":checked");return e&&e.__value}function Rt(t,e,n){t.classList.toggle(e,!!n)}function $p(t,e,{bubbles:n=!1,cancelable:s=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:s})}let zi;function hl(t){zi=t}function To(){if(!zi)throw new Error("Function called outside component initialization");return zi}function is(t){To().$$.on_mount.push(t)}function eg(t){To().$$.after_update.push(t)}function Ai(t){To().$$.on_destroy.push(t)}function Rl(){const t=To();return(e,n,{cancelable:s=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=$p(e,n,{cancelable:s});return i.slice().forEach(o=>{o.call(t,l)}),!l.defaultPrevented}return!0}}function tg(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(s=>s.call(this,e))}const Bi=[],vn=[];let Fi=[];const dr=[],Zh=Promise.resolve();let pr=!1;function Qh(){pr||(pr=!0,Zh.then(ed))}function $h(){return Qh(),Zh}function bs(t){Fi.push(t)}function Jn(t){dr.push(t)}const zo=new Set;let Di=0;function ed(){if(Di!==0)return;const t=zi;do{try{for(;Di<Bi.length;){const e=Bi[Di];Di++,hl(e),ng(e.$$)}}catch(e){throw Bi.length=0,Di=0,e}for(hl(null),Bi.length=0,Di=0;vn.length;)vn.pop()();for(let e=0;e<Fi.length;e+=1){const n=Fi[e];zo.has(n)||(zo.add(n),n())}Fi.length=0}while(Bi.length);for(;dr.length;)dr.pop()();pr=!1,zo.clear(),hl(t)}function ng(t){if(t.fragment!==null){t.update(),at(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(bs)}}function sg(t){const e=[],n=[];Fi.forEach(s=>t.indexOf(s)===-1?e.push(s):n.push(s)),n.forEach(s=>s()),Fi=e}const lo=new Set;let ki;function gs(){ki={r:0,c:[],p:ki}}function ms(){ki.r||at(ki.c),ki=ki.p}function Be(t,e){t&&t.i&&(lo.delete(t),t.i(e))}function Fe(t,e,n,s){if(t&&t.o){if(lo.has(t))return;lo.add(t),ki.c.push(()=>{lo.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}function et(t){return t?.length!==void 0?t:Array.from(t)}function ig(t,e){t.d(1),e.delete(t.key)}function td(t,e){Fe(t,1,1,()=>{e.delete(t.key)})}function Ir(t,e,n,s,i,l,o,r,u,f,h,p){let g=t.length,m=l.length,_=g;const b={};for(;_--;)b[t[_].key]=_;const k=[],v=new Map,y=new Map,S=[];for(_=m;_--;){const A=p(i,l,_),x=n(A);let P=o.get(x);P?S.push(()=>P.p(A,e)):(P=f(x,A),P.c()),v.set(x,k[_]=P),x in b&&y.set(x,Math.abs(_-b[x]))}const C=new Set,T=new Set;function O(A){Be(A,1),A.m(r,h),o.set(A.key,A),h=A.first,m--}for(;g&&m;){const A=k[m-1],x=t[g-1],P=A.key,D=x.key;A===x?(h=A.first,g--,m--):v.has(D)?!o.has(P)||C.has(P)?O(A):T.has(D)?g--:y.get(P)>y.get(D)?(T.add(P),O(A)):(C.add(D),g--):(u(x,o),g--)}for(;g--;){const A=t[g];v.has(A.key)||u(A,o)}for(;m;)O(k[m-1]);return at(S),k}function Br(t,e){const n={},s={},i={$$scope:1};let l=t.length;for(;l--;){const o=t[l],r=e[l];if(r){for(const u in o)u in r||(s[u]=1);for(const u in r)i[u]||(n[u]=r[u],i[u]=1);t[l]=r}else for(const u in o)i[u]=1}for(const o in s)o in n||(n[o]=void 0);return n}function Fr(t){return typeof t=="object"&&t!==null?t:{}}function Kn(t,e,n){const s=t.$$.props[e];s!==void 0&&(t.$$.bound[s]=n,n(t.$$.ctx[s]))}function pt(t){t&&t.c()}function ut(t,e,n){const{fragment:s,after_update:i}=t.$$;s&&s.m(e,n),bs(()=>{const l=t.$$.on_mount.map(Kh).filter(ui);t.$$.on_destroy?t.$$.on_destroy.push(...l):at(l),t.$$.on_mount=[]}),i.forEach(bs)}function ct(t,e){const n=t.$$;n.fragment!==null&&(sg(n.after_update),at(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function lg(t,e){t.$$.dirty[0]===-1&&(Bi.push(t),Qh(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function jt(t,e,n,s,i,l,o=null,r=[-1]){const u=zi;hl(t);const f=t.$$={fragment:null,ctx:[],props:l,update:Ee,not_equal:i,bound:ka(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:ka(),dirty:r,skip_bound:!1,root:e.target||u.$$.root};o&&o(f.root);let h=!1;if(f.ctx=n?n(t,e.props||{},(p,g,...m)=>{const _=m.length?m[0]:g;return f.ctx&&i(f.ctx[p],f.ctx[p]=_)&&(!f.skip_bound&&f.bound[p]&&f.bound[p](_),h&&lg(t,p)),g}):[],f.update(),h=!0,at(f.before_update),f.fragment=s?s(f.ctx):!1,e.target){if(e.hydrate){const p=Qp(e.target);f.fragment&&f.fragment.l(p),p.forEach(L)}else f.fragment&&f.fragment.c();e.intro&&Be(t.$$.fragment),ut(t,e.target,e.anchor),ed()}hl(u)}class zt{$$=void 0;$$set=void 0;$destroy(){ct(this,1),this.$destroy=Ee}$on(e,n){if(!ui(n))return Ee;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(e){this.$$set&&!Xp(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const og="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(og);const Li=[];function nd(t,e){return{subscribe:Js(t,e).subscribe}}function Js(t,e=Ee){let n;const s=new Set;function i(r){if(Lt(t,r)&&(t=r,n)){const u=!Li.length;for(const f of s)f[1](),Li.push(f,t);if(u){for(let f=0;f<Li.length;f+=2)Li[f][0](Li[f+1]);Li.length=0}}}function l(r){i(r(t))}function o(r,u=Ee){const f=[r,u];return s.add(f),s.size===1&&(n=e(i,l)||Ee),r(t),()=>{s.delete(f),s.size===0&&n&&(n(),n=null)}}return{set:i,update:l,subscribe:o}}function Ns(t,e,n){const s=!Array.isArray(t),i=s?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=e.length<2;return nd(n,(o,r)=>{let u=!1;const f=[];let h=0,p=Ee;const g=()=>{if(h)return;p();const _=e(s?f[0]:f,o,r);l?o(_):p=ui(_)?_:Ee},m=i.map((_,b)=>Hr(_,k=>{f[b]=k,h&=~(1<<b),u&&g()},()=>{h|=1<<b}));return u=!0,g(),function(){at(m),p(),u=!1}})}function Ea(){const t=window.location.href.indexOf("#/");let e=t>-1?window.location.href.substr(t+1):"/";const n=e.indexOf("?");let s="";return n>-1&&(s=e.substr(n+1),e=e.substr(0,n)),{location:e,querystring:s}}const sd=nd(null,function(e){e(Ea());const n=()=>{e(Ea())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}}),rg=Ns(sd,t=>t.location);Ns(sd,t=>t.querystring);async function id(t){if(!t||t.length<1||t.charAt(0)!="/"&&t.indexOf("#/")!==0)throw Error("Invalid parameter location");await $h(),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 Fl(){await $h(),window.history.back()}function ag(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Uo,Ta;function ug(){if(Ta)return Uo;Ta=1;var t=function(y){return e(y)&&!n(y)};function e(v){return!!v&&typeof v=="object"}function n(v){var y=Object.prototype.toString.call(v);return y==="[object RegExp]"||y==="[object Date]"||l(v)}var s=typeof Symbol=="function"&&Symbol.for,i=s?Symbol.for("react.element"):60103;function l(v){return v.$$typeof===i}function o(v){return Array.isArray(v)?[]:{}}function r(v,y){return y.clone!==!1&&y.isMergeableObject(v)?b(o(v),v,y):v}function u(v,y,S){return v.concat(y).map(function(C){return r(C,S)})}function f(v,y){if(!y.customMerge)return b;var S=y.customMerge(v);return typeof S=="function"?S:b}function h(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(y){return Object.propertyIsEnumerable.call(v,y)}):[]}function p(v){return Object.keys(v).concat(h(v))}function g(v,y){try{return y in v}catch{return!1}}function m(v,y){return g(v,y)&&!(Object.hasOwnProperty.call(v,y)&&Object.propertyIsEnumerable.call(v,y))}function _(v,y,S){var C={};return S.isMergeableObject(v)&&p(v).forEach(function(T){C[T]=r(v[T],S)}),p(y).forEach(function(T){m(v,T)||(g(v,T)&&S.isMergeableObject(y[T])?C[T]=f(T,S)(v[T],y[T],S):C[T]=r(y[T],S))}),C}function b(v,y,S){S=S||{},S.arrayMerge=S.arrayMerge||u,S.isMergeableObject=S.isMergeableObject||t,S.cloneUnlessOtherwiseSpecified=r;var C=Array.isArray(y),T=Array.isArray(v),O=C===T;return O?C?S.arrayMerge(v,y,S):_(v,y,S):r(y,S)}b.all=function(y,S){if(!Array.isArray(y))throw new Error("first argument should be an array");return y.reduce(function(C,T){return b(C,T,S)},{})};var k=b;return Uo=k,Uo}var cg=ug();const fg=ag(cg);var gr=function(t,e){return gr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},gr(t,e)};function Mo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");gr(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var At=function(){return At=Object.assign||function(e){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},At.apply(this,arguments)};function hg(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}function Vo(t,e,n){if(n||arguments.length===2)for(var s=0,i=e.length,l;s<i;s++)(l||!(s in e))&&(l||(l=Array.prototype.slice.call(e,0,s)),l[s]=e[s]);return t.concat(l||Array.prototype.slice.call(e))}function Wo(t,e){var n=e&&e.cache?e.cache:vg,s=e&&e.serializer?e.serializer:bg,i=e&&e.strategy?e.strategy:gg;return i(t,{cache:n,serializer:s})}function dg(t){return t==null||typeof t=="number"||typeof t=="boolean"}function pg(t,e,n,s){var i=dg(s)?s:n(s),l=e.get(i);return typeof l>"u"&&(l=t.call(this,s),e.set(i,l)),l}function ld(t,e,n){var s=Array.prototype.slice.call(arguments,3),i=n(s),l=e.get(i);return typeof l>"u"&&(l=t.apply(this,s),e.set(i,l)),l}function od(t,e,n,s,i){return n.bind(e,t,s,i)}function gg(t,e){var n=t.length===1?pg:ld;return od(t,this,n,e.cache.create(),e.serializer)}function mg(t,e){return od(t,this,ld,e.cache.create(),e.serializer)}var bg=function(){return JSON.stringify(arguments)},_g=(function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(e){return this.cache[e]},t.prototype.set=function(e,n){this.cache[e]=n},t})(),vg={create:function(){return new _g}},qo={variadic:mg},_t;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(_t||(_t={}));var fn;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(fn||(fn={}));var Ui;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Ui||(Ui={}));function Ma(t){return t.type===fn.literal}function yg(t){return t.type===fn.argument}function rd(t){return t.type===fn.number}function ad(t){return t.type===fn.date}function ud(t){return t.type===fn.time}function cd(t){return t.type===fn.select}function fd(t){return t.type===fn.plural}function wg(t){return t.type===fn.pound}function hd(t){return t.type===fn.tag}function dd(t){return!!(t&&typeof t=="object"&&t.type===Ui.number)}function mr(t){return!!(t&&typeof t=="object"&&t.type===Ui.dateTime)}var pd=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,kg=/(?:[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 Sg(t){var e={};return t.replace(kg,function(n){var s=n.length;switch(n[0]){case"G":e.era=s===4?"long":s===5?"narrow":"short";break;case"y":e.year=s===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":e.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("\`w/W\` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("\`D/F/g\` (day) patterns are not supported, use \`d\` instead");case"E":e.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("\`e..eee\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"c":if(s<4)throw new RangeError("\`c..ccc\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("\`b/B\` (period) patterns are not supported, use \`a\` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][s-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][s-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][s-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][s-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":e.minute=["numeric","2-digit"][s-1];break;case"s":e.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("\`S/A\` (second) patterns are not supported, use \`s\` instead");case"z":e.timeZoneName=s<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""}),e}var Eg=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function Tg(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(Eg).filter(function(g){return g.length>0}),n=[],s=0,i=e;s<i.length;s++){var l=i[s],o=l.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var r=o[0],u=o.slice(1),f=0,h=u;f<h.length;f++){var p=h[f];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:r,options:u})}return n}function Mg(t){return t.replace(/^(.*?)-/,"")}var Ca=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,gd=/^(@+)?(\\+|#+)?[rs]?$/g,Cg=/(\\*)(0+)|(#+)(0+)|(0+)/g,md=/^(0+)$/;function Pa(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(gd,function(n,s,i){return typeof i!="string"?(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length):i==="+"?e.minimumSignificantDigits=s.length:s[0]==="#"?e.maximumSignificantDigits=s.length:(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length+(typeof i=="string"?i.length:0)),""}),e}function bd(t){switch(t){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 Pg(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!md.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Aa(t){var e={},n=bd(t);return n||e}function Ag(t){for(var e={},n=0,s=t;n<s.length;n++){var i=s[n];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=Mg(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=At(At(At({},e),{notation:"scientific"}),i.options.reduce(function(u,f){return At(At({},u),Aa(f))},{}));continue;case"engineering":e=At(At(At({},e),{notation:"engineering"}),i.options.reduce(function(u,f){return At(At({},u),Aa(f))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.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(Cg,function(u,f,h,p,g,m){if(f)e.minimumIntegerDigits=h.length;else{if(p&&g)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(md.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(Ca.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Ca,function(u,f,h,p,g,m){return h==="*"?e.minimumFractionDigits=f.length:p&&p[0]==="#"?e.maximumFractionDigits=p.length:g&&m?(e.minimumFractionDigits=g.length,e.maximumFractionDigits=g.length+m.length):(e.minimumFractionDigits=f.length,e.maximumFractionDigits=f.length),""});var l=i.options[0];l==="w"?e=At(At({},e),{trailingZeroDisplay:"stripIfInteger"}):l&&(e=At(At({},e),Pa(l)));continue}if(gd.test(i.stem)){e=At(At({},e),Pa(i.stem));continue}var o=bd(i.stem);o&&(e=At(At({},e),o));var r=Pg(i.stem);r&&(e=At(At({},e),r))}return e}var Nl={"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 Og(t,e){for(var n="",s=0;s<t.length;s++){var i=t.charAt(s);if(i==="j"){for(var l=0;s+1<t.length&&t.charAt(s+1)===i;)l++,s++;var o=1+(l&1),r=l<2?1:3+(l>>1),u="a",f=xg(e);for((f=="H"||f=="k")&&(r=0);r-- >0;)n+=u;for(;o-- >0;)n=f+n}else i==="J"?n+="H":n+=i}return n}function xg(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,s;n!=="root"&&(s=t.maximize().region);var i=Nl[s||""]||Nl[n||""]||Nl["".concat(n,"-001")]||Nl["001"];return i[0]}var Go,Rg=new RegExp("^".concat(pd.source,"*")),Dg=new RegExp("".concat(pd.source,"*$"));function wt(t,e){return{start:t,end:e}}var Lg=!!String.prototype.startsWith&&"_a".startsWith("a",1),Hg=!!String.fromCodePoint,Ig=!!Object.fromEntries,Bg=!!String.prototype.codePointAt,Fg=!!String.prototype.trimStart,Ng=!!String.prototype.trimEnd,jg=!!Number.isSafeInteger,zg=jg?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},br=!0;try{var Ug=vd("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");br=((Go=Ug.exec("a"))===null||Go===void 0?void 0:Go[0])==="a"}catch{br=!1}var Oa=Lg?function(e,n,s){return e.startsWith(n,s)}:function(e,n,s){return e.slice(s,s+n.length)===n},_r=Hg?String.fromCodePoint:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var s="",i=e.length,l=0,o;i>l;){if(o=e[l++],o>1114111)throw RangeError(o+" is not a valid code point");s+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return s},xa=Ig?Object.fromEntries:function(e){for(var n={},s=0,i=e;s<i.length;s++){var l=i[s],o=l[0],r=l[1];n[o]=r}return n},_d=Bg?function(e,n){return e.codePointAt(n)}:function(e,n){var s=e.length;if(!(n<0||n>=s)){var i=e.charCodeAt(n),l;return i<55296||i>56319||n+1===s||(l=e.charCodeAt(n+1))<56320||l>57343?i:(i-55296<<10)+(l-56320)+65536}},Vg=Fg?function(e){return e.trimStart()}:function(e){return e.replace(Rg,"")},Wg=Ng?function(e){return e.trimEnd()}:function(e){return e.replace(Dg,"")};function vd(t,e){return new RegExp(t,e)}var vr;if(br){var Ra=vd("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");vr=function(e,n){var s;Ra.lastIndex=n;var i=Ra.exec(e);return(s=i[1])!==null&&s!==void 0?s:""}}else vr=function(e,n){for(var s=[];;){var i=_d(e,n);if(i===void 0||yd(i)||Yg(i))break;s.push(i),n+=i>=65536?2:1}return _r.apply(void 0,s)};var qg=(function(){function t(e,n){n===void 0&&(n={}),this.message=e,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 t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,s){for(var i=[];!this.isEOF();){var l=this.char();if(l===123){var o=this.parseArgument(e,s);if(o.err)return o;i.push(o.val)}else{if(l===125&&e>0)break;if(l===35&&(n==="plural"||n==="selectordinal")){var r=this.clonePosition();this.bump(),i.push({type:fn.pound,location:wt(r,this.clonePosition())})}else if(l===60&&!this.ignoreTag&&this.peek()===47){if(s)break;return this.error(_t.UNMATCHED_CLOSING_TAG,wt(this.clonePosition(),this.clonePosition()))}else if(l===60&&!this.ignoreTag&&yr(this.peek()||0)){var o=this.parseTag(e,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(e,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(e,n){var s=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:fn.literal,value:"<".concat(i,"/>"),location:wt(s,this.clonePosition())},err:null};if(this.bumpIf(">")){var l=this.parseMessage(e+1,n,!0);if(l.err)return l;var o=l.val,r=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!yr(this.char()))return this.error(_t.INVALID_TAG,wt(r,this.clonePosition()));var u=this.clonePosition(),f=this.parseTagName();return i!==f?this.error(_t.UNMATCHED_CLOSING_TAG,wt(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:fn.tag,value:i,children:o,location:wt(s,this.clonePosition())},err:null}:this.error(_t.INVALID_TAG,wt(r,this.clonePosition())))}else return this.error(_t.UNCLOSED_TAG,wt(s,this.clonePosition()))}else return this.error(_t.INVALID_TAG,wt(s,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Xg(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var s=this.clonePosition(),i="";;){var l=this.tryParseQuote(n);if(l){i+=l;continue}var o=this.tryParseUnquoted(e,n);if(o){i+=o;continue}var r=this.tryParseLeftAngleBracket();if(r){i+=r;continue}break}var u=wt(s,this.clonePosition());return{val:{type:fn.literal,value:i,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Gg(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){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(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var s=this.char();if(s===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(s);this.bump()}return _r.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var s=this.char();return s===60||s===123||s===35&&(n==="plural"||n==="selectordinal")||s===125&&e>0?null:(this.bump(),_r(s))},t.prototype.parseArgument=function(e,n){var s=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(s,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(_t.EMPTY_ARGUMENT,wt(s,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(_t.MALFORMED_ARGUMENT,wt(s,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(s,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:fn.argument,value:i,location:wt(s,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(s,this.clonePosition())):this.parseArgumentOptions(e,n,i,s);default:return this.error(_t.MALFORMED_ARGUMENT,wt(s,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),s=vr(this.message,n),i=n+s.length;this.bumpTo(i);var l=this.clonePosition(),o=wt(e,l);return{value:s,location:o}},t.prototype.parseArgumentOptions=function(e,n,s,i){var l,o=this.clonePosition(),r=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(r){case"":return this.error(_t.EXPECT_ARGUMENT_TYPE,wt(o,u));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var g=Wg(p.val);if(g.length===0)return this.error(_t.EXPECT_ARGUMENT_STYLE,wt(this.clonePosition(),this.clonePosition()));var m=wt(h,this.clonePosition());f={style:g,styleLocation:m}}var _=this.tryParseArgumentClose(i);if(_.err)return _;var b=wt(i,this.clonePosition());if(f&&Oa(f?.style,"::",0)){var k=Vg(f.style.slice(2));if(r==="number"){var p=this.parseNumberSkeletonFromString(k,f.styleLocation);return p.err?p:{val:{type:fn.number,value:s,location:b,style:p.val},err:null}}else{if(k.length===0)return this.error(_t.EXPECT_DATE_TIME_SKELETON,b);var v=k;this.locale&&(v=Og(k,this.locale));var g={type:Ui.dateTime,pattern:v,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?Sg(v):{}},y=r==="date"?fn.date:fn.time;return{val:{type:y,value:s,location:b,style:g},err:null}}}return{val:{type:r==="number"?fn.number:r==="date"?fn.date:fn.time,value:s,location:b,style:(l=f?.style)!==null&&l!==void 0?l:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(_t.EXPECT_SELECT_ARGUMENT_OPTIONS,wt(S,At({},S)));this.bumpSpace();var C=this.parseIdentifierIfPossible(),T=0;if(r!=="select"&&C.value==="offset"){if(!this.bumpIf(":"))return this.error(_t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,wt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(_t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,_t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),C=this.parseIdentifierIfPossible(),T=p.val}var O=this.tryParsePluralOrSelectOptions(e,r,n,C);if(O.err)return O;var _=this.tryParseArgumentClose(i);if(_.err)return _;var A=wt(i,this.clonePosition());return r==="select"?{val:{type:fn.select,value:s,options:xa(O.val),location:A},err:null}:{val:{type:fn.plural,value:s,options:xa(O.val),offset:T,pluralType:r==="plural"?"cardinal":"ordinal",location:A},err:null}}default:return this.error(_t.INVALID_ARGUMENT_TYPE,wt(o,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(_t.EXPECT_ARGUMENT_CLOSING_BRACE,wt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var s=this.char();switch(s){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(_t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,wt(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=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}},t.prototype.parseNumberSkeletonFromString=function(e,n){var s=[];try{s=Tg(e)}catch{return this.error(_t.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ui.number,tokens:s,location:n,parsedOptions:this.shouldParseSkeletons?Ag(s):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,s,i){for(var l,o=!1,r=[],u=new Set,f=i.value,h=i.location;;){if(f.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var g=this.tryParseDecimalInteger(_t.EXPECT_PLURAL_ARGUMENT_SELECTOR,_t.INVALID_PLURAL_ARGUMENT_SELECTOR);if(g.err)return g;h=wt(p,this.clonePosition()),f=this.message.slice(p.offset,this.offset())}else break}if(u.has(f))return this.error(n==="select"?_t.DUPLICATE_SELECT_ARGUMENT_SELECTOR:_t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);f==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?_t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:_t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,wt(this.clonePosition(),this.clonePosition()));var _=this.parseMessage(e+1,n,s);if(_.err)return _;var b=this.tryParseArgumentClose(m);if(b.err)return b;r.push([f,{value:_.val,location:wt(m,this.clonePosition())}]),u.add(f),this.bumpSpace(),l=this.parseIdentifierIfPossible(),f=l.value,h=l.location}return r.length===0?this.error(n==="select"?_t.EXPECT_SELECT_ARGUMENT_SELECTOR:_t.EXPECT_PLURAL_ARGUMENT_SELECTOR,wt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(_t.MISSING_OTHER_CLAUSE,wt(this.clonePosition(),this.clonePosition())):{val:r,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var s=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(s=-1);for(var l=!1,o=0;!this.isEOF();){var r=this.char();if(r>=48&&r<=57)l=!0,o=o*10+(r-48),this.bump();else break}var u=wt(i,this.clonePosition());return l?(o*=s,zg(o)?{val:o,err:null}:this.error(n,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=_d(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(Oa(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),s=this.message.indexOf(e,n);return s>=0?(this.bumpTo(s),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&yd(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),s=this.message.charCodeAt(n+(e>=65536?2:1));return s??null},t})();function yr(t){return t>=97&&t<=122||t>=65&&t<=90}function Gg(t){return yr(t)||t===47}function Xg(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function yd(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function Yg(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function wr(t){t.forEach(function(e){if(delete e.location,cd(e)||fd(e))for(var n in e.options)delete e.options[n].location,wr(e.options[n].value);else rd(e)&&dd(e.style)||(ad(e)||ud(e))&&mr(e.style)?delete e.style.location:hd(e)&&wr(e.children)})}function Jg(t,e){e===void 0&&(e={}),e=At({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new qg(t,e).parse();if(n.err){var s=SyntaxError(_t[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return e?.captureLocation||wr(n.val),n.val}var Vi;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Vi||(Vi={}));var Co=(function(t){Mo(e,t);function e(n,s,i){var l=t.call(this,n)||this;return l.code=s,l.originalMessage=i,l}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e})(Error),Da=(function(t){Mo(e,t);function e(n,s,i,l){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(s,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Vi.INVALID_VALUE,l)||this}return e})(Co),Kg=(function(t){Mo(e,t);function e(n,s,i){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(s),Vi.INVALID_VALUE,i)||this}return e})(Co),Zg=(function(t){Mo(e,t);function e(n,s){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(s,'"'),Vi.MISSING_VALUE,s)||this}return e})(Co),ss;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(ss||(ss={}));function Qg(t){return t.length<2?t:t.reduce(function(e,n){var s=e[e.length-1];return!s||s.type!==ss.literal||n.type!==ss.literal?e.push(n):s.value+=n.value,e},[])}function $g(t){return typeof t=="function"}function oo(t,e,n,s,i,l,o){if(t.length===1&&Ma(t[0]))return[{type:ss.literal,value:t[0].value}];for(var r=[],u=0,f=t;u<f.length;u++){var h=f[u];if(Ma(h)){r.push({type:ss.literal,value:h.value});continue}if(wg(h)){typeof l=="number"&&r.push({type:ss.literal,value:n.getNumberFormat(e).format(l)});continue}var p=h.value;if(!(i&&p in i))throw new Zg(p,o);var g=i[p];if(yg(h)){(!g||typeof g=="string"||typeof g=="number")&&(g=typeof g=="string"||typeof g=="number"?String(g):""),r.push({type:typeof g=="string"?ss.literal:ss.object,value:g});continue}if(ad(h)){var m=typeof h.style=="string"?s.date[h.style]:mr(h.style)?h.style.parsedOptions:void 0;r.push({type:ss.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(ud(h)){var m=typeof h.style=="string"?s.time[h.style]:mr(h.style)?h.style.parsedOptions:s.time.medium;r.push({type:ss.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(rd(h)){var m=typeof h.style=="string"?s.number[h.style]:dd(h.style)?h.style.parsedOptions:void 0;m&&m.scale&&(g=g*(m.scale||1)),r.push({type:ss.literal,value:n.getNumberFormat(e,m).format(g)});continue}if(hd(h)){var _=h.children,b=h.value,k=i[b];if(!$g(k))throw new Kg(b,"function",o);var v=oo(_,e,n,s,i,l),y=k(v.map(function(T){return T.value}));Array.isArray(y)||(y=[y]),r.push.apply(r,y.map(function(T){return{type:typeof T=="string"?ss.literal:ss.object,value:T}}))}if(cd(h)){var S=h.options[g]||h.options.other;if(!S)throw new Da(h.value,g,Object.keys(h.options),o);r.push.apply(r,oo(S.value,e,n,s,i));continue}if(fd(h)){var S=h.options["=".concat(g)];if(!S){if(!Intl.PluralRules)throw new Co(\`Intl.PluralRules is not available in this environment.
21192
+ "en-Woa_MXgq.js": 'const e={error:"Error",loading:"Loading...",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",confirm:"Confirm",reset:"Reset",search:"Search",filter:"Filter",export:"Export",import:"Import",close:"Close"},t={dashboard:"Dashboard",routes:"Routes",logs:"Request Logs",configuration:"Configuration"},r={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"},a={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"},o={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}"},s={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}"},i={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)",pathRewrite:"Path Rewrite",pathRewriteHelp:"Regex patterns to modify request paths",addPathRewriteRule:"Add Path Rewrite Rule",patternPlaceholder:"^/api",replacementPlaceholder:"/v1",upstreams:"Upstreams",addUpstream:"Add Upstream",transformer:"Route Transformer",transformerHelp:"Transformer applied to the entire route (optional)",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"},l={upstreams:"{count} upstream(s)",hasTransformer:"With transformer",failover:"Failover",edit:"Edit",duplicate:"Duplicate",delete:"Delete",duplicating:"Duplicating...",deleting:"Deleting..."},u={title:"Upstream #{index}",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"},d={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}"},c={title:"Request Headers",addHeader:"Add Header",name:"Name",namePlaceholder:"Content-Type",value:"Value",valuePlaceholder:"application/json",remove:"Remove",empty:"No headers",default:"Default Headers"},p={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",replace:"Replace",default:"Default"},h={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}"},m={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"}},g={title:"Confirm Action",confirm:"Confirm",cancel:"Cancel"},f={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"},y={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."},v={title:"Request Logs",filters:"Filters",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",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"}},R={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"},T={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?"},b={common:e,nav:t,dashboard:r,monitoring:a,routes:o,configuration:s,notFound:i,routeEditor:n,routeCard:l,upstream:u,plugin:d,headers:c,body:p,expression:h,templates:m,confirmDialog:g,validation:f,auth:y,logs:v,logging:R,login:T};export{y as auth,p as body,e as common,s as configuration,g as confirmDialog,r as dashboard,b as default,h as expression,c as headers,R as logging,T as login,v as logs,a as monitoring,t as nav,i as notFound,d as plugin,l as routeCard,n as routeEditor,o as routes,m as templates,u as upstream,f as validation};\n',
21193
+ "index-DdThT9d-.js": `var Qp=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Q5=Qp((Xs,Ys)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Ae(){}function Ss(t,e){for(const n in e)t[n]=e[n];return t}function td(t){return t()}function Ta(){return Object.create(null)}function ht(t){t.forEach(td)}function ui(t){return typeof t=="function"}function Nt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function $p(t){return Object.keys(t).length===0}function Br(t,...e){if(t==null){for(const s of e)s(void 0);return Ae}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ps(t){let e;return Br(t,n=>e=n)(),e}function Zt(t,e,n){t.$$.on_destroy.push(Br(e,n))}function ci(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function r(t,e){t.appendChild(e)}function I(t,e,n){t.insertBefore(e,n||null)}function H(t){t.parentNode&&t.parentNode.removeChild(t)}function Tn(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function d(t){return document.createElement(t)}function pe(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function E(t){return document.createTextNode(t)}function v(){return E(" ")}function Zn(){return E("")}function ee(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function eg(t){return function(e){return e.preventDefault(),t.call(this,e)}}function c(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const tg=["width","height"];function ng(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const s in e)e[s]==null?t.removeAttribute(s):s==="style"?t.style.cssText=e[s]:s==="__value"?t.value=t[s]=e[s]:n[s]&&n[s].set&&tg.indexOf(s)===-1?t[s]=e[s]:c(t,s,e[s])}function Fr(t){let e;return{p(...n){e=n,e.forEach(s=>t.push(s))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function yt(t){return t===""?null:+t}function sg(t){return Array.from(t.childNodes)}function T(t,e){e=""+e,t.data!==e&&(t.data=e)}function ne(t,e){t.value=e??""}function Ma(t,e,n,s){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Cn(t,e,n){for(let s=0;s<t.options.length;s+=1){const i=t.options[s];if(i.__value===e){i.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function Is(t){const e=t.querySelector(":checked");return e&&e.__value}function ie(t,e,n){t.classList.toggle(e,!!n)}function ig(t,e,{bubbles:n=!1,cancelable:s=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:s})}let zi;function hl(t){zi=t}function Co(){if(!zi)throw new Error("Function called outside component initialization");return zi}function ls(t){Co().$$.on_mount.push(t)}function lg(t){Co().$$.after_update.push(t)}function Ai(t){Co().$$.on_destroy.push(t)}function Dl(){const t=Co();return(e,n,{cancelable:s=!1}={})=>{const i=t.$$.callbacks[e];if(i){const l=ig(e,n,{cancelable:s});return i.slice().forEach(o=>{o.call(t,l)}),!l.defaultPrevented}return!0}}function og(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(s=>s.call(this,e))}const Bi=[],wn=[];let Fi=[];const gr=[],nd=Promise.resolve();let mr=!1;function sd(){mr||(mr=!0,nd.then(ld))}function id(){return sd(),nd}function vs(t){Fi.push(t)}function Xn(t){gr.push(t)}const Vo=new Set;let Di=0;function ld(){if(Di!==0)return;const t=zi;do{try{for(;Di<Bi.length;){const e=Bi[Di];Di++,hl(e),rg(e.$$)}}catch(e){throw Bi.length=0,Di=0,e}for(hl(null),Bi.length=0,Di=0;wn.length;)wn.pop()();for(let e=0;e<Fi.length;e+=1){const n=Fi[e];Vo.has(n)||(Vo.add(n),n())}Fi.length=0}while(Bi.length);for(;gr.length;)gr.pop()();mr=!1,Vo.clear(),hl(t)}function rg(t){if(t.fragment!==null){t.update(),ht(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(vs)}}function ag(t){const e=[],n=[];Fi.forEach(s=>t.indexOf(s)===-1?e.push(s):n.push(s)),n.forEach(s=>s()),Fi=e}const oo=new Set;let ki;function ms(){ki={r:0,c:[],p:ki}}function bs(){ki.r||ht(ki.c),ki=ki.p}function ze(t,e){t&&t.i&&(oo.delete(t),t.i(e))}function Ue(t,e,n,s){if(t&&t.o){if(oo.has(t))return;oo.add(t),ki.c.push(()=>{oo.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}function tt(t){return t?.length!==void 0?t:Array.from(t)}function ug(t,e){t.d(1),e.delete(t.key)}function od(t,e){Ue(t,1,1,()=>{e.delete(t.key)})}function Nr(t,e,n,s,i,l,o,a,u,f,h,p){let g=t.length,m=l.length,b=g;const _={};for(;b--;)_[t[b].key]=b;const y=[],k=new Map,w=new Map,S=[];for(b=m;b--;){const A=p(i,l,b),O=n(A);let C=o.get(O);C?S.push(()=>C.p(A,e)):(C=f(O,A),C.c()),k.set(O,y[b]=C),O in _&&w.set(O,Math.abs(b-_[O]))}const P=new Set,M=new Set;function x(A){ze(A,1),A.m(a,h),o.set(A.key,A),h=A.first,m--}for(;g&&m;){const A=y[m-1],O=t[g-1],C=A.key,R=O.key;A===O?(h=A.first,g--,m--):k.has(R)?!o.has(C)||P.has(C)?x(A):M.has(R)?g--:w.get(C)>w.get(R)?(M.add(C),x(A)):(P.add(R),g--):(u(O,o),g--)}for(;g--;){const A=t[g];k.has(A.key)||u(A,o)}for(;m;)x(y[m-1]);return ht(S),y}function jr(t,e){const n={},s={},i={$$scope:1};let l=t.length;for(;l--;){const o=t[l],a=e[l];if(a){for(const u in o)u in a||(s[u]=1);for(const u in a)i[u]||(n[u]=a[u],i[u]=1);t[l]=a}else for(const u in o)i[u]=1}for(const o in s)o in n||(n[o]=void 0);return n}function zr(t){return typeof t=="object"&&t!==null?t:{}}function Yn(t,e,n){const s=t.$$.props[e];s!==void 0&&(t.$$.bound[s]=n,n(t.$$.ctx[s]))}function _t(t){t&&t.c()}function pt(t,e,n){const{fragment:s,after_update:i}=t.$$;s&&s.m(e,n),vs(()=>{const l=t.$$.on_mount.map(td).filter(ui);t.$$.on_destroy?t.$$.on_destroy.push(...l):ht(l),t.$$.on_mount=[]}),i.forEach(vs)}function gt(t,e){const n=t.$$;n.fragment!==null&&(ag(n.after_update),ht(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function cg(t,e){t.$$.dirty[0]===-1&&(Bi.push(t),sd(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function qt(t,e,n,s,i,l,o=null,a=[-1]){const u=zi;hl(t);const f=t.$$={fragment:null,ctx:[],props:l,update:Ae,not_equal:i,bound:Ta(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:Ta(),dirty:a,skip_bound:!1,root:e.target||u.$$.root};o&&o(f.root);let h=!1;if(f.ctx=n?n(t,e.props||{},(p,g,...m)=>{const b=m.length?m[0]:g;return f.ctx&&i(f.ctx[p],f.ctx[p]=b)&&(!f.skip_bound&&f.bound[p]&&f.bound[p](b),h&&cg(t,p)),g}):[],f.update(),h=!0,ht(f.before_update),f.fragment=s?s(f.ctx):!1,e.target){if(e.hydrate){const p=sg(e.target);f.fragment&&f.fragment.l(p),p.forEach(H)}else f.fragment&&f.fragment.c();e.intro&&ze(t.$$.fragment),pt(t,e.target,e.anchor),ld()}hl(u)}class Gt{$$=void 0;$$set=void 0;$destroy(){gt(this,1),this.$destroy=Ae}$on(e,n){if(!ui(n))return Ae;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(e){this.$$set&&!$p(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const fg="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(fg);const Li=[];function rd(t,e){return{subscribe:Ns(t,e).subscribe}}function Ns(t,e=Ae){let n;const s=new Set;function i(a){if(Nt(t,a)&&(t=a,n)){const u=!Li.length;for(const f of s)f[1](),Li.push(f,t);if(u){for(let f=0;f<Li.length;f+=2)Li[f][0](Li[f+1]);Li.length=0}}}function l(a){i(a(t))}function o(a,u=Ae){const f=[a,u];return s.add(f),s.size===1&&(n=e(i,l)||Ae),a(t),()=>{s.delete(f),s.size===0&&n&&(n(),n=null)}}return{set:i,update:l,subscribe:o}}function js(t,e,n){const s=!Array.isArray(t),i=s?[t]:t;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=e.length<2;return rd(n,(o,a)=>{let u=!1;const f=[];let h=0,p=Ae;const g=()=>{if(h)return;p();const b=e(s?f[0]:f,o,a);l?o(b):p=ui(b)?b:Ae},m=i.map((b,_)=>Br(b,y=>{f[_]=y,h&=~(1<<_),u&&g()},()=>{h|=1<<_}));return u=!0,g(),function(){ht(m),p(),u=!1}})}function Ca(){const t=window.location.href.indexOf("#/");let e=t>-1?window.location.href.substr(t+1):"/";const n=e.indexOf("?");let s="";return n>-1&&(s=e.substr(n+1),e=e.substr(0,n)),{location:e,querystring:s}}const ad=rd(null,function(e){e(Ca());const n=()=>{e(Ca())};return window.addEventListener("hashchange",n,!1),function(){window.removeEventListener("hashchange",n,!1)}}),hg=js(ad,t=>t.location);js(ad,t=>t.querystring);async function ud(t){if(!t||t.length<1||t.charAt(0)!="/"&&t.indexOf("#/")!==0)throw Error("Invalid parameter location");await id(),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 Nl(){await id(),window.history.back()}function dg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Wo,Pa;function pg(){if(Pa)return Wo;Pa=1;var t=function(w){return e(w)&&!n(w)};function e(k){return!!k&&typeof k=="object"}function n(k){var w=Object.prototype.toString.call(k);return w==="[object RegExp]"||w==="[object Date]"||l(k)}var s=typeof Symbol=="function"&&Symbol.for,i=s?Symbol.for("react.element"):60103;function l(k){return k.$$typeof===i}function o(k){return Array.isArray(k)?[]:{}}function a(k,w){return w.clone!==!1&&w.isMergeableObject(k)?_(o(k),k,w):k}function u(k,w,S){return k.concat(w).map(function(P){return a(P,S)})}function f(k,w){if(!w.customMerge)return _;var S=w.customMerge(k);return typeof S=="function"?S:_}function h(k){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(k).filter(function(w){return Object.propertyIsEnumerable.call(k,w)}):[]}function p(k){return Object.keys(k).concat(h(k))}function g(k,w){try{return w in k}catch{return!1}}function m(k,w){return g(k,w)&&!(Object.hasOwnProperty.call(k,w)&&Object.propertyIsEnumerable.call(k,w))}function b(k,w,S){var P={};return S.isMergeableObject(k)&&p(k).forEach(function(M){P[M]=a(k[M],S)}),p(w).forEach(function(M){m(k,M)||(g(k,M)&&S.isMergeableObject(w[M])?P[M]=f(M,S)(k[M],w[M],S):P[M]=a(w[M],S))}),P}function _(k,w,S){S=S||{},S.arrayMerge=S.arrayMerge||u,S.isMergeableObject=S.isMergeableObject||t,S.cloneUnlessOtherwiseSpecified=a;var P=Array.isArray(w),M=Array.isArray(k),x=P===M;return x?P?S.arrayMerge(k,w,S):b(k,w,S):a(w,S)}_.all=function(w,S){if(!Array.isArray(w))throw new Error("first argument should be an array");return w.reduce(function(P,M){return _(P,M,S)},{})};var y=_;return Wo=y,Wo}var gg=pg();const mg=dg(gg);var br=function(t,e){return br=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[i]=s[i])},br(t,e)};function Po(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");br(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Dt=function(){return Dt=Object.assign||function(e){for(var n,s=1,i=arguments.length;s<i;s++){n=arguments[s];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},Dt.apply(this,arguments)};function bg(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(t);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(t,s[i])&&(n[s[i]]=t[s[i]]);return n}function qo(t,e,n){if(n||arguments.length===2)for(var s=0,i=e.length,l;s<i;s++)(l||!(s in e))&&(l||(l=Array.prototype.slice.call(e,0,s)),l[s]=e[s]);return t.concat(l||Array.prototype.slice.call(e))}function Go(t,e){var n=e&&e.cache?e.cache:Eg,s=e&&e.serializer?e.serializer:kg,i=e&&e.strategy?e.strategy:yg;return i(t,{cache:n,serializer:s})}function _g(t){return t==null||typeof t=="number"||typeof t=="boolean"}function vg(t,e,n,s){var i=_g(s)?s:n(s),l=e.get(i);return typeof l>"u"&&(l=t.call(this,s),e.set(i,l)),l}function cd(t,e,n){var s=Array.prototype.slice.call(arguments,3),i=n(s),l=e.get(i);return typeof l>"u"&&(l=t.apply(this,s),e.set(i,l)),l}function fd(t,e,n,s,i){return n.bind(e,t,s,i)}function yg(t,e){var n=t.length===1?vg:cd;return fd(t,this,n,e.cache.create(),e.serializer)}function wg(t,e){return fd(t,this,cd,e.cache.create(),e.serializer)}var kg=function(){return JSON.stringify(arguments)},Sg=(function(){function t(){this.cache=Object.create(null)}return t.prototype.get=function(e){return this.cache[e]},t.prototype.set=function(e,n){this.cache[e]=n},t})(),Eg={create:function(){return new Sg}},Xo={variadic:wg},Mt;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Mt||(Mt={}));var hn;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(hn||(hn={}));var Ui;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Ui||(Ui={}));function Aa(t){return t.type===hn.literal}function Tg(t){return t.type===hn.argument}function hd(t){return t.type===hn.number}function dd(t){return t.type===hn.date}function pd(t){return t.type===hn.time}function gd(t){return t.type===hn.select}function md(t){return t.type===hn.plural}function Mg(t){return t.type===hn.pound}function bd(t){return t.type===hn.tag}function _d(t){return!!(t&&typeof t=="object"&&t.type===Ui.number)}function _r(t){return!!(t&&typeof t=="object"&&t.type===Ui.dateTime)}var vd=/[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/,Cg=/(?:[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 Pg(t){var e={};return t.replace(Cg,function(n){var s=n.length;switch(n[0]){case"G":e.era=s===4?"long":s===5?"narrow":"short";break;case"y":e.year=s===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":e.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("\`w/W\` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("\`D/F/g\` (day) patterns are not supported, use \`d\` instead");case"E":e.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("\`e..eee\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"c":if(s<4)throw new RangeError("\`c..ccc\` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][s-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("\`b/B\` (period) patterns are not supported, use \`a\` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][s-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][s-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][s-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][s-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":e.minute=["numeric","2-digit"][s-1];break;case"s":e.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("\`S/A\` (second) patterns are not supported, use \`s\` instead");case"z":e.timeZoneName=s<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""}),e}var Ag=/[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;function xg(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(Ag).filter(function(g){return g.length>0}),n=[],s=0,i=e;s<i.length;s++){var l=i[s],o=l.split("/");if(o.length===0)throw new Error("Invalid number skeleton");for(var a=o[0],u=o.slice(1),f=0,h=u;f<h.length;f++){var p=h[f];if(p.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:u})}return n}function Og(t){return t.replace(/^(.*?)-/,"")}var xa=/^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g,yd=/^(@+)?(\\+|#+)?[rs]?$/g,Rg=/(\\*)(0+)|(#+)(0+)|(0+)/g,wd=/^(0+)$/;function Oa(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(yd,function(n,s,i){return typeof i!="string"?(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length):i==="+"?e.minimumSignificantDigits=s.length:s[0]==="#"?e.maximumSignificantDigits=s.length:(e.minimumSignificantDigits=s.length,e.maximumSignificantDigits=s.length+(typeof i=="string"?i.length:0)),""}),e}function kd(t){switch(t){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 Dg(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!wd.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function Ra(t){var e={},n=kd(t);return n||e}function Lg(t){for(var e={},n=0,s=t;n<s.length;n++){var i=s[n];switch(i.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=i.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=Og(i.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=Dt(Dt(Dt({},e),{notation:"scientific"}),i.options.reduce(function(u,f){return Dt(Dt({},u),Ra(f))},{}));continue;case"engineering":e=Dt(Dt(Dt({},e),{notation:"engineering"}),i.options.reduce(function(u,f){return Dt(Dt({},u),Ra(f))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":e.roundingMode="floor";continue;case"rounding-mode-ceiling":e.roundingMode="ceil";continue;case"rounding-mode-down":e.roundingMode="trunc";continue;case"rounding-mode-up":e.roundingMode="expand";continue;case"rounding-mode-half-even":e.roundingMode="halfEven";continue;case"rounding-mode-half-down":e.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":e.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(Rg,function(u,f,h,p,g,m){if(f)e.minimumIntegerDigits=h.length;else{if(p&&g)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(wd.test(i.stem)){e.minimumIntegerDigits=i.stem.length;continue}if(xa.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(xa,function(u,f,h,p,g,m){return h==="*"?e.minimumFractionDigits=f.length:p&&p[0]==="#"?e.maximumFractionDigits=p.length:g&&m?(e.minimumFractionDigits=g.length,e.maximumFractionDigits=g.length+m.length):(e.minimumFractionDigits=f.length,e.maximumFractionDigits=f.length),""});var l=i.options[0];l==="w"?e=Dt(Dt({},e),{trailingZeroDisplay:"stripIfInteger"}):l&&(e=Dt(Dt({},e),Oa(l)));continue}if(yd.test(i.stem)){e=Dt(Dt({},e),Oa(i.stem));continue}var o=kd(i.stem);o&&(e=Dt(Dt({},e),o));var a=Dg(i.stem);a&&(e=Dt(Dt({},e),a))}return e}var jl={"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 Hg(t,e){for(var n="",s=0;s<t.length;s++){var i=t.charAt(s);if(i==="j"){for(var l=0;s+1<t.length&&t.charAt(s+1)===i;)l++,s++;var o=1+(l&1),a=l<2?1:3+(l>>1),u="a",f=Ig(e);for((f=="H"||f=="k")&&(a=0);a-- >0;)n+=u;for(;o-- >0;)n=f+n}else i==="J"?n+="H":n+=i}return n}function Ig(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,s;n!=="root"&&(s=t.maximize().region);var i=jl[s||""]||jl[n||""]||jl["".concat(n,"-001")]||jl["001"];return i[0]}var Yo,Bg=new RegExp("^".concat(vd.source,"*")),Fg=new RegExp("".concat(vd.source,"*$"));function Pt(t,e){return{start:t,end:e}}var Ng=!!String.prototype.startsWith&&"_a".startsWith("a",1),jg=!!String.fromCodePoint,zg=!!Object.fromEntries,Ug=!!String.prototype.codePointAt,Vg=!!String.prototype.trimStart,Wg=!!String.prototype.trimEnd,qg=!!Number.isSafeInteger,Gg=qg?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},vr=!0;try{var Xg=Ed("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");vr=((Yo=Xg.exec("a"))===null||Yo===void 0?void 0:Yo[0])==="a"}catch{vr=!1}var Da=Ng?function(e,n,s){return e.startsWith(n,s)}:function(e,n,s){return e.slice(s,s+n.length)===n},yr=jg?String.fromCodePoint:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var s="",i=e.length,l=0,o;i>l;){if(o=e[l++],o>1114111)throw RangeError(o+" is not a valid code point");s+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return s},La=zg?Object.fromEntries:function(e){for(var n={},s=0,i=e;s<i.length;s++){var l=i[s],o=l[0],a=l[1];n[o]=a}return n},Sd=Ug?function(e,n){return e.codePointAt(n)}:function(e,n){var s=e.length;if(!(n<0||n>=s)){var i=e.charCodeAt(n),l;return i<55296||i>56319||n+1===s||(l=e.charCodeAt(n+1))<56320||l>57343?i:(i-55296<<10)+(l-56320)+65536}},Yg=Vg?function(e){return e.trimStart()}:function(e){return e.replace(Bg,"")},Jg=Wg?function(e){return e.trimEnd()}:function(e){return e.replace(Fg,"")};function Ed(t,e){return new RegExp(t,e)}var wr;if(vr){var Ha=Ed("([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)","yu");wr=function(e,n){var s;Ha.lastIndex=n;var i=Ha.exec(e);return(s=i[1])!==null&&s!==void 0?s:""}}else wr=function(e,n){for(var s=[];;){var i=Sd(e,n);if(i===void 0||Td(i)||$g(i))break;s.push(i),n+=i>=65536?2:1}return yr.apply(void 0,s)};var Kg=(function(){function t(e,n){n===void 0&&(n={}),this.message=e,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 t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,s){for(var i=[];!this.isEOF();){var l=this.char();if(l===123){var o=this.parseArgument(e,s);if(o.err)return o;i.push(o.val)}else{if(l===125&&e>0)break;if(l===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),i.push({type:hn.pound,location:Pt(a,this.clonePosition())})}else if(l===60&&!this.ignoreTag&&this.peek()===47){if(s)break;return this.error(Mt.UNMATCHED_CLOSING_TAG,Pt(this.clonePosition(),this.clonePosition()))}else if(l===60&&!this.ignoreTag&&kr(this.peek()||0)){var o=this.parseTag(e,n);if(o.err)return o;i.push(o.val)}else{var o=this.parseLiteral(e,n);if(o.err)return o;i.push(o.val)}}}return{val:i,err:null}},t.prototype.parseTag=function(e,n){var s=this.clonePosition();this.bump();var i=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:hn.literal,value:"<".concat(i,"/>"),location:Pt(s,this.clonePosition())},err:null};if(this.bumpIf(">")){var l=this.parseMessage(e+1,n,!0);if(l.err)return l;var o=l.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!kr(this.char()))return this.error(Mt.INVALID_TAG,Pt(a,this.clonePosition()));var u=this.clonePosition(),f=this.parseTagName();return i!==f?this.error(Mt.UNMATCHED_CLOSING_TAG,Pt(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:hn.tag,value:i,children:o,location:Pt(s,this.clonePosition())},err:null}:this.error(Mt.INVALID_TAG,Pt(a,this.clonePosition())))}else return this.error(Mt.UNCLOSED_TAG,Pt(s,this.clonePosition()))}else return this.error(Mt.INVALID_TAG,Pt(s,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&Qg(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var s=this.clonePosition(),i="";;){var l=this.tryParseQuote(n);if(l){i+=l;continue}var o=this.tryParseUnquoted(e,n);if(o){i+=o;continue}var a=this.tryParseLeftAngleBracket();if(a){i+=a;continue}break}var u=Pt(s,this.clonePosition());return{val:{type:hn.literal,value:i,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Zg(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){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(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var s=this.char();if(s===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(s);this.bump()}return yr.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var s=this.char();return s===60||s===123||s===35&&(n==="plural"||n==="selectordinal")||s===125&&e>0?null:(this.bump(),yr(s))},t.prototype.parseArgument=function(e,n){var s=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(s,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Mt.EMPTY_ARGUMENT,Pt(s,this.clonePosition()));var i=this.parseIdentifierIfPossible().value;if(!i)return this.error(Mt.MALFORMED_ARGUMENT,Pt(s,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(s,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:hn.argument,value:i,location:Pt(s,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(s,this.clonePosition())):this.parseArgumentOptions(e,n,i,s);default:return this.error(Mt.MALFORMED_ARGUMENT,Pt(s,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),s=wr(this.message,n),i=n+s.length;this.bumpTo(i);var l=this.clonePosition(),o=Pt(e,l);return{value:s,location:o}},t.prototype.parseArgumentOptions=function(e,n,s,i){var l,o=this.clonePosition(),a=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(a){case"":return this.error(Mt.EXPECT_ARGUMENT_TYPE,Pt(o,u));case"number":case"date":case"time":{this.bumpSpace();var f=null;if(this.bumpIf(",")){this.bumpSpace();var h=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;var g=Jg(p.val);if(g.length===0)return this.error(Mt.EXPECT_ARGUMENT_STYLE,Pt(this.clonePosition(),this.clonePosition()));var m=Pt(h,this.clonePosition());f={style:g,styleLocation:m}}var b=this.tryParseArgumentClose(i);if(b.err)return b;var _=Pt(i,this.clonePosition());if(f&&Da(f?.style,"::",0)){var y=Yg(f.style.slice(2));if(a==="number"){var p=this.parseNumberSkeletonFromString(y,f.styleLocation);return p.err?p:{val:{type:hn.number,value:s,location:_,style:p.val},err:null}}else{if(y.length===0)return this.error(Mt.EXPECT_DATE_TIME_SKELETON,_);var k=y;this.locale&&(k=Hg(y,this.locale));var g={type:Ui.dateTime,pattern:k,location:f.styleLocation,parsedOptions:this.shouldParseSkeletons?Pg(k):{}},w=a==="date"?hn.date:hn.time;return{val:{type:w,value:s,location:_,style:g},err:null}}}return{val:{type:a==="number"?hn.number:a==="date"?hn.date:hn.time,value:s,location:_,style:(l=f?.style)!==null&&l!==void 0?l:null},err:null}}case"plural":case"selectordinal":case"select":{var S=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(Mt.EXPECT_SELECT_ARGUMENT_OPTIONS,Pt(S,Dt({},S)));this.bumpSpace();var P=this.parseIdentifierIfPossible(),M=0;if(a!=="select"&&P.value==="offset"){if(!this.bumpIf(":"))return this.error(Mt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Pt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var p=this.tryParseDecimalInteger(Mt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Mt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(p.err)return p;this.bumpSpace(),P=this.parseIdentifierIfPossible(),M=p.val}var x=this.tryParsePluralOrSelectOptions(e,a,n,P);if(x.err)return x;var b=this.tryParseArgumentClose(i);if(b.err)return b;var A=Pt(i,this.clonePosition());return a==="select"?{val:{type:hn.select,value:s,options:La(x.val),location:A},err:null}:{val:{type:hn.plural,value:s,options:La(x.val),offset:M,pluralType:a==="plural"?"cardinal":"ordinal",location:A},err:null}}default:return this.error(Mt.INVALID_ARGUMENT_TYPE,Pt(o,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(Mt.EXPECT_ARGUMENT_CLOSING_BRACE,Pt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var s=this.char();switch(s){case 39:{this.bump();var i=this.clonePosition();if(!this.bumpUntil("'"))return this.error(Mt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Pt(i,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=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}},t.prototype.parseNumberSkeletonFromString=function(e,n){var s=[];try{s=xg(e)}catch{return this.error(Mt.INVALID_NUMBER_SKELETON,n)}return{val:{type:Ui.number,tokens:s,location:n,parsedOptions:this.shouldParseSkeletons?Lg(s):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,s,i){for(var l,o=!1,a=[],u=new Set,f=i.value,h=i.location;;){if(f.length===0){var p=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var g=this.tryParseDecimalInteger(Mt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Mt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(g.err)return g;h=Pt(p,this.clonePosition()),f=this.message.slice(p.offset,this.offset())}else break}if(u.has(f))return this.error(n==="select"?Mt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Mt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,h);f==="other"&&(o=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?Mt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Mt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Pt(this.clonePosition(),this.clonePosition()));var b=this.parseMessage(e+1,n,s);if(b.err)return b;var _=this.tryParseArgumentClose(m);if(_.err)return _;a.push([f,{value:b.val,location:Pt(m,this.clonePosition())}]),u.add(f),this.bumpSpace(),l=this.parseIdentifierIfPossible(),f=l.value,h=l.location}return a.length===0?this.error(n==="select"?Mt.EXPECT_SELECT_ARGUMENT_SELECTOR:Mt.EXPECT_PLURAL_ARGUMENT_SELECTOR,Pt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!o?this.error(Mt.MISSING_OTHER_CLAUSE,Pt(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var s=1,i=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(s=-1);for(var l=!1,o=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)l=!0,o=o*10+(a-48),this.bump();else break}var u=Pt(i,this.clonePosition());return l?(o*=s,Gg(o)?{val:o,err:null}:this.error(n,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=Sd(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(Da(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),s=this.message.indexOf(e,n);return s>=0?(this.bumpTo(s),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Td(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),s=this.message.charCodeAt(n+(e>=65536?2:1));return s??null},t})();function kr(t){return t>=97&&t<=122||t>=65&&t<=90}function Zg(t){return kr(t)||t===47}function Qg(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Td(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function $g(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function Sr(t){t.forEach(function(e){if(delete e.location,gd(e)||md(e))for(var n in e.options)delete e.options[n].location,Sr(e.options[n].value);else hd(e)&&_d(e.style)||(dd(e)||pd(e))&&_r(e.style)?delete e.style.location:bd(e)&&Sr(e.children)})}function e0(t,e){e===void 0&&(e={}),e=Dt({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new Kg(t,e).parse();if(n.err){var s=SyntaxError(Mt[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return e?.captureLocation||Sr(n.val),n.val}var Vi;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Vi||(Vi={}));var Ao=(function(t){Po(e,t);function e(n,s,i){var l=t.call(this,n)||this;return l.code=s,l.originalMessage=i,l}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e})(Error),Ia=(function(t){Po(e,t);function e(n,s,i,l){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(s,'". Options are "').concat(Object.keys(i).join('", "'),'"'),Vi.INVALID_VALUE,l)||this}return e})(Ao),t0=(function(t){Po(e,t);function e(n,s,i){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(s),Vi.INVALID_VALUE,i)||this}return e})(Ao),n0=(function(t){Po(e,t);function e(n,s){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(s,'"'),Vi.MISSING_VALUE,s)||this}return e})(Ao),is;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(is||(is={}));function s0(t){return t.length<2?t:t.reduce(function(e,n){var s=e[e.length-1];return!s||s.type!==is.literal||n.type!==is.literal?e.push(n):s.value+=n.value,e},[])}function i0(t){return typeof t=="function"}function ro(t,e,n,s,i,l,o){if(t.length===1&&Aa(t[0]))return[{type:is.literal,value:t[0].value}];for(var a=[],u=0,f=t;u<f.length;u++){var h=f[u];if(Aa(h)){a.push({type:is.literal,value:h.value});continue}if(Mg(h)){typeof l=="number"&&a.push({type:is.literal,value:n.getNumberFormat(e).format(l)});continue}var p=h.value;if(!(i&&p in i))throw new n0(p,o);var g=i[p];if(Tg(h)){(!g||typeof g=="string"||typeof g=="number")&&(g=typeof g=="string"||typeof g=="number"?String(g):""),a.push({type:typeof g=="string"?is.literal:is.object,value:g});continue}if(dd(h)){var m=typeof h.style=="string"?s.date[h.style]:_r(h.style)?h.style.parsedOptions:void 0;a.push({type:is.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(pd(h)){var m=typeof h.style=="string"?s.time[h.style]:_r(h.style)?h.style.parsedOptions:s.time.medium;a.push({type:is.literal,value:n.getDateTimeFormat(e,m).format(g)});continue}if(hd(h)){var m=typeof h.style=="string"?s.number[h.style]:_d(h.style)?h.style.parsedOptions:void 0;m&&m.scale&&(g=g*(m.scale||1)),a.push({type:is.literal,value:n.getNumberFormat(e,m).format(g)});continue}if(bd(h)){var b=h.children,_=h.value,y=i[_];if(!i0(y))throw new t0(_,"function",o);var k=ro(b,e,n,s,i,l),w=y(k.map(function(M){return M.value}));Array.isArray(w)||(w=[w]),a.push.apply(a,w.map(function(M){return{type:typeof M=="string"?is.literal:is.object,value:M}}))}if(gd(h)){var S=h.options[g]||h.options.other;if(!S)throw new Ia(h.value,g,Object.keys(h.options),o);a.push.apply(a,ro(S.value,e,n,s,i));continue}if(md(h)){var S=h.options["=".concat(g)];if(!S){if(!Intl.PluralRules)throw new Ao(\`Intl.PluralRules is not available in this environment.
21193
21194
  Try polyfilling it using "@formatjs/intl-pluralrules"
21194
- \`,Vi.MISSING_INTL_API,o);var C=n.getPluralRules(e,{type:h.pluralType}).select(g-(h.offset||0));S=h.options[C]||h.options.other}if(!S)throw new Da(h.value,g,Object.keys(h.options),o);r.push.apply(r,oo(S.value,e,n,s,i,g-(h.offset||0)));continue}}return Qg(r)}function e0(t,e){return e?At(At(At({},t||{}),e||{}),Object.keys(t).reduce(function(n,s){return n[s]=At(At({},t[s]),e[s]||{}),n},{})):t}function t0(t,e){return e?Object.keys(t).reduce(function(n,s){return n[s]=e0(t[s],e[s]),n},At({},t)):t}function Xo(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function n0(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Wo(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.NumberFormat).bind.apply(e,Vo([void 0],n,!1)))},{cache:Xo(t.number),strategy:qo.variadic}),getDateTimeFormat:Wo(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.DateTimeFormat).bind.apply(e,Vo([void 0],n,!1)))},{cache:Xo(t.dateTime),strategy:qo.variadic}),getPluralRules:Wo(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.PluralRules).bind.apply(e,Vo([void 0],n,!1)))},{cache:Xo(t.pluralRules),strategy:qo.variadic})}}var wd=(function(){function t(e,n,s,i){n===void 0&&(n=t.defaultLocale);var l=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var f=l.formatToParts(u);if(f.length===1)return f[0].value;var h=f.reduce(function(p,g){return!p.length||g.type!==ss.literal||typeof p[p.length-1]!="string"?p.push(g.value):p[p.length-1]+=g.value,p},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return oo(l.ast,l.locales,l.formatters,l.formats,u,void 0,l.message)},this.resolvedOptions=function(){var u;return{locale:((u=l.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(l.locales)[0]}},this.getAst=function(){return l.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process \`message\` of type \`string\`");var o=i||{};o.formatters;var r=hg(o,["formatters"]);this.ast=t.__parse(e,At(At({},r),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=t0(t.formats,s),this.formatters=i&&i.formatters||n0(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=Jg,t.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"}}},t})();function s0(t,e){if(e==null)return;if(e in t)return t[e];const n=e.split(".");let s=t;for(let i=0;i<n.length;i++)if(typeof s=="object"){if(i>0){const l=n.slice(i,n.length).join(".");if(l in s){s=s[l];break}}s=s[n[i]]}else s=void 0;return s}const ni={},i0=(t,e,n)=>n&&(e in ni||(ni[e]={}),t in ni[e]||(ni[e][t]=n),n),kd=(t,e)=>{if(e==null)return;if(e in ni&&t in ni[e])return ni[e][t];const n=Dl(e);for(let s=0;s<n.length;s++){const i=n[s],l=o0(i,t);if(l)return i0(t,e,l)}};let Nr;const Ji=Js({});function l0(t){return Nr[t]||null}function jr(t){return t in Nr}function o0(t,e){if(!jr(t))return null;const n=l0(t);return s0(n,e)}function r0(t){if(t==null)return;const e=Dl(t);for(let n=0;n<e.length;n++){const s=e[n];if(jr(s))return s}}function a0(t,...e){delete ni[t],Ji.update(n=>(n[t]=fg.all([n[t]||{},...e]),n))}Ns([Ji],([t])=>Object.keys(t));Ji.subscribe(t=>Nr=t);const dl={};function u0(t){dl[t]=new Set}function c0(t,e){dl[t].delete(e),dl[t].size===0&&delete dl[t]}function pl(t){return dl[t]}function f0(t){return Dl(t).map(e=>{const n=pl(e);return[e,n?[...n]:[]]}).filter(([,e])=>e.length>0)}function fo(t){return t==null?!1:Dl(t).some(e=>{var n;return(n=pl(e))==null?void 0:n.size})}function h0(t,e){return Promise.all(e.map(s=>(c0(t,s),s().then(i=>i.default||i)))).then(s=>a0(t,...s))}const $i={};function Sd(t){if(!fo(t))return t in $i?$i[t]:Promise.resolve();const e=f0(t);return $i[t]=Promise.all(e.map(([n,s])=>h0(n,s))).then(()=>{if(fo(t))return Sd(t);delete $i[t]}),$i[t]}function Ed(t,e){pl(t)||u0(t);const n=pl(t);pl(t).has(e)||(jr(t)||Ji.update(s=>(s[t]={},s)),n.add(e))}var La=Object.getOwnPropertySymbols,d0=Object.prototype.hasOwnProperty,p0=Object.prototype.propertyIsEnumerable,g0=(t,e)=>{var n={};for(var s in t)d0.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&La)for(var s of La(t))e.indexOf(s)<0&&p0.call(t,s)&&(n[s]=t[s]);return n};const m0={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 b0({locale:t,id:e}){console.warn(\`[svelte-i18n] The message "\${e}" was not found in "\${Dl(t).join('", "')}".\${fo(hi())?\`
21195
+ \`,Vi.MISSING_INTL_API,o);var P=n.getPluralRules(e,{type:h.pluralType}).select(g-(h.offset||0));S=h.options[P]||h.options.other}if(!S)throw new Ia(h.value,g,Object.keys(h.options),o);a.push.apply(a,ro(S.value,e,n,s,i,g-(h.offset||0)));continue}}return s0(a)}function l0(t,e){return e?Dt(Dt(Dt({},t||{}),e||{}),Object.keys(t).reduce(function(n,s){return n[s]=Dt(Dt({},t[s]),e[s]||{}),n},{})):t}function o0(t,e){return e?Object.keys(t).reduce(function(n,s){return n[s]=l0(t[s],e[s]),n},Dt({},t)):t}function Jo(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function r0(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Go(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.NumberFormat).bind.apply(e,qo([void 0],n,!1)))},{cache:Jo(t.number),strategy:Xo.variadic}),getDateTimeFormat:Go(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.DateTimeFormat).bind.apply(e,qo([void 0],n,!1)))},{cache:Jo(t.dateTime),strategy:Xo.variadic}),getPluralRules:Go(function(){for(var e,n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return new((e=Intl.PluralRules).bind.apply(e,qo([void 0],n,!1)))},{cache:Jo(t.pluralRules),strategy:Xo.variadic})}}var Md=(function(){function t(e,n,s,i){n===void 0&&(n=t.defaultLocale);var l=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var f=l.formatToParts(u);if(f.length===1)return f[0].value;var h=f.reduce(function(p,g){return!p.length||g.type!==is.literal||typeof p[p.length-1]!="string"?p.push(g.value):p[p.length-1]+=g.value,p},[]);return h.length<=1?h[0]||"":h},this.formatToParts=function(u){return ro(l.ast,l.locales,l.formatters,l.formats,u,void 0,l.message)},this.resolvedOptions=function(){var u;return{locale:((u=l.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(l.locales)[0]}},this.getAst=function(){return l.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process \`message\` of type \`string\`");var o=i||{};o.formatters;var a=bg(o,["formatters"]);this.ast=t.__parse(e,Dt(Dt({},a),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=o0(t.formats,s),this.formatters=i&&i.formatters||r0(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=e0,t.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"}}},t})();function a0(t,e){if(e==null)return;if(e in t)return t[e];const n=e.split(".");let s=t;for(let i=0;i<n.length;i++)if(typeof s=="object"){if(i>0){const l=n.slice(i,n.length).join(".");if(l in s){s=s[l];break}}s=s[n[i]]}else s=void 0;return s}const ni={},u0=(t,e,n)=>n&&(e in ni||(ni[e]={}),t in ni[e]||(ni[e][t]=n),n),Cd=(t,e)=>{if(e==null)return;if(e in ni&&t in ni[e])return ni[e][t];const n=Ll(e);for(let s=0;s<n.length;s++){const i=n[s],l=f0(i,t);if(l)return u0(t,e,l)}};let Ur;const Ji=Ns({});function c0(t){return Ur[t]||null}function Vr(t){return t in Ur}function f0(t,e){if(!Vr(t))return null;const n=c0(t);return a0(n,e)}function h0(t){if(t==null)return;const e=Ll(t);for(let n=0;n<e.length;n++){const s=e[n];if(Vr(s))return s}}function d0(t,...e){delete ni[t],Ji.update(n=>(n[t]=mg.all([n[t]||{},...e]),n))}js([Ji],([t])=>Object.keys(t));Ji.subscribe(t=>Ur=t);const dl={};function p0(t){dl[t]=new Set}function g0(t,e){dl[t].delete(e),dl[t].size===0&&delete dl[t]}function pl(t){return dl[t]}function m0(t){return Ll(t).map(e=>{const n=pl(e);return[e,n?[...n]:[]]}).filter(([,e])=>e.length>0)}function po(t){return t==null?!1:Ll(t).some(e=>{var n;return(n=pl(e))==null?void 0:n.size})}function b0(t,e){return Promise.all(e.map(s=>(g0(t,s),s().then(i=>i.default||i)))).then(s=>d0(t,...s))}const $i={};function Pd(t){if(!po(t))return t in $i?$i[t]:Promise.resolve();const e=m0(t);return $i[t]=Promise.all(e.map(([n,s])=>b0(n,s))).then(()=>{if(po(t))return Pd(t);delete $i[t]}),$i[t]}function Ad(t,e){pl(t)||p0(t);const n=pl(t);pl(t).has(e)||(Vr(t)||Ji.update(s=>(s[t]={},s)),n.add(e))}var Ba=Object.getOwnPropertySymbols,_0=Object.prototype.hasOwnProperty,v0=Object.prototype.propertyIsEnumerable,y0=(t,e)=>{var n={};for(var s in t)_0.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&Ba)for(var s of Ba(t))e.indexOf(s)<0&&v0.call(t,s)&&(n[s]=t[s]);return n};const w0={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 k0({locale:t,id:e}){console.warn(\`[svelte-i18n] The message "\${e}" was not found in "\${Ll(t).join('", "')}".\${po(hi())?\`
21195
21196
 
21196
- Note: there are at least one loader still registered to this locale that wasn't executed.\`:""}\`)}const _0={fallbackLocale:null,loadingDelay:200,formats:m0,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},rl=_0;function Wi(){return rl}function v0(t){const e=t,{formats:n}=e,s=g0(e,["formats"]);let i=t.fallbackLocale;if(t.initialLocale)try{wd.resolveLocale(t.initialLocale)&&(i=t.initialLocale)}catch{console.warn(\`[svelte-i18n] The initial locale "\${t.initialLocale}" is not a valid locale.\`)}return s.warnOnMissingMessages&&(delete s.warnOnMissingMessages,s.handleMissingMessage==null?s.handleMissingMessage=b0:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(rl,s,{initialLocale:i}),n&&("number"in n&&Object.assign(rl.formats.number,n.number),"date"in n&&Object.assign(rl.formats.date,n.date),"time"in n&&Object.assign(rl.formats.time,n.time)),di.set(i)}const ro=Js(!1);var y0=Object.defineProperty,w0=Object.defineProperties,k0=Object.getOwnPropertyDescriptors,Ha=Object.getOwnPropertySymbols,S0=Object.prototype.hasOwnProperty,E0=Object.prototype.propertyIsEnumerable,Ia=(t,e,n)=>e in t?y0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T0=(t,e)=>{for(var n in e||(e={}))S0.call(e,n)&&Ia(t,n,e[n]);if(Ha)for(var n of Ha(e))E0.call(e,n)&&Ia(t,n,e[n]);return t},M0=(t,e)=>w0(t,k0(e));let kr;const ho=Js(null);function Ba(t){return t.split("-").map((e,n,s)=>s.slice(0,n+1).join("-")).reverse()}function Dl(t,e=Wi().fallbackLocale){const n=Ba(t);return e?[...new Set([...n,...Ba(e)])]:n}function hi(){return kr??void 0}ho.subscribe(t=>{kr=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const C0=t=>{if(t&&r0(t)&&fo(t)){const{loadingDelay:e}=Wi();let n;return typeof window<"u"&&hi()!=null&&e?n=window.setTimeout(()=>ro.set(!0),e):ro.set(!0),Sd(t).then(()=>{ho.set(t)}).finally(()=>{clearTimeout(n),ro.set(!1)})}return ho.set(t)},di=M0(T0({},ho),{set:C0}),P0=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Po=t=>{const e=Object.create(null);return s=>{const i=JSON.stringify(s);return i in e?e[i]:e[i]=t(s)}};var A0=Object.defineProperty,po=Object.getOwnPropertySymbols,Td=Object.prototype.hasOwnProperty,Md=Object.prototype.propertyIsEnumerable,Fa=(t,e,n)=>e in t?A0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zr=(t,e)=>{for(var n in e||(e={}))Td.call(e,n)&&Fa(t,n,e[n]);if(po)for(var n of po(e))Md.call(e,n)&&Fa(t,n,e[n]);return t},Ki=(t,e)=>{var n={};for(var s in t)Td.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&po)for(var s of po(t))e.indexOf(s)<0&&Md.call(t,s)&&(n[s]=t[s]);return n};const yl=(t,e)=>{const{formats:n}=Wi();if(t in n&&e in n[t])return n[t][e];throw new Error(\`[svelte-i18n] Unknown "\${e}" \${t} format.\`)},O0=Po(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return s&&(i=yl("number",s)),new Intl.NumberFormat(n,i)}),x0=Po(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return s?i=yl("date",s):Object.keys(i).length===0&&(i=yl("date","short")),new Intl.DateTimeFormat(n,i)}),R0=Po(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return s?i=yl("time",s):Object.keys(i).length===0&&(i=yl("time","short")),new Intl.DateTimeFormat(n,i)}),D0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return O0(zr({locale:n},s))},L0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return x0(zr({locale:n},s))},H0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return R0(zr({locale:n},s))},I0=Po((t,e=hi())=>new wd(t,e,Wi().formats,{ignoreTag:Wi().ignoreTag})),B0=(t,e={})=>{var n,s,i,l;let o=e;typeof t=="object"&&(o=t,t=o.id);const{values:r,locale:u=hi(),default:f}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=kd(t,u);if(!h)h=(l=(i=(s=(n=Wi()).handleMissingMessage)==null?void 0:s.call(n,{locale:u,id:t,defaultValue:f}))!=null?i:f)!=null?l:t;else if(typeof h!="string")return console.warn(\`[svelte-i18n] Message with id "\${t}" must be of type "string", found: "\${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.\`),h;if(!r)return h;let p=h;try{p=I0(h,u).format(r)}catch(g){g instanceof Error&&console.warn(\`[svelte-i18n] Message "\${t}" has syntax error:\`,g.message)}return p},F0=(t,e)=>H0(e).format(t),N0=(t,e)=>L0(e).format(t),j0=(t,e)=>D0(e).format(t),z0=(t,e=hi())=>kd(t,e),Et=Ns([di,Ji],()=>B0);Ns([di],()=>F0);Ns([di],()=>N0);Ns([di],()=>j0);Ns([di,Ji],()=>z0);const U0="modulepreload",V0=function(t){return"/__ui/"+t},Na={},Cd=function(e,n,s){let i=Promise.resolve();if(n&&n.length>0){let o=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),u=r?.nonce||r?.getAttribute("nonce");i=o(n.map(f=>{if(f=V0(f),f in Na)return;Na[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(\`link[href="\${f}"]\${p}\`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":U0,h||(g.as="script"),g.crossOrigin="",g.href=f,u&&g.setAttribute("nonce",u),document.head.appendChild(g),h)return new Promise((m,_)=>{g.addEventListener("load",m),g.addEventListener("error",()=>_(new Error(\`Unable to preload CSS for \${f}\`)))})}))}function l(o){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=o,window.dispatchEvent(r),!r.defaultPrevented)throw o}return i.then(o=>{for(const r of o||[])r.status==="rejected"&&l(r.reason);return e().catch(l)})},Pd="zh-CN",Ad="locale",jl=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];Ed("zh-CN",()=>Cd(()=>import("./zh-CN-bARHc6B8.js"),[]));Ed("en",()=>Cd(()=>import("./en-Woa_MXgq.js"),[]));function W0(){return typeof localStorage<"u"?localStorage.getItem(Ad):null}function q0(t){typeof localStorage<"u"&&localStorage.setItem(Ad,t)}function G0(t){di.set(t),q0(t)}const X0=W0(),Y0=P0(),J0=X0||Y0||Pd;v0({fallbackLocale:Pd,initialLocale:J0});const Ll="bungee_auth_token",Od=Js(typeof window<"u"?localStorage.getItem(Ll):null),go=Js(typeof window<"u"?!!localStorage.getItem(Ll):!1),ja=Js(!1);function K0(t){typeof window>"u"||(localStorage.setItem(Ll,t),Od.set(t),go.set(!0))}function xd(){typeof window>"u"||(localStorage.removeItem(Ll),Od.set(null),go.set(!1))}function Rd(){return typeof window>"u"?null:localStorage.getItem(Ll)}const Z0="/__ui/api";async function zl(t,e){const n=\`\${Z0}\${t}\`,s=Rd(),i={"Content-Type":"application/json",...e?.headers};s&&(i.Authorization=\`Bearer \${s}\`);const l=await fetch(n,{...e,headers:i});if(l.status===401)throw xd(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!l.ok){const r=await l.json().catch(()=>({error:"Unknown error"}));throw new Error(r.error||\`Request failed with status \${l.status}\`)}return await l.json()}const dn={get:t=>zl(t),post:(t,e)=>zl(t,{method:"POST",body:JSON.stringify(e)}),put:(t,e)=>zl(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>zl(t,{method:"DELETE"})};async function Ur(){return dn.get("/config")}async function Q0(t){return dn.put("/config",t)}async function $0(t){return dn.post("/config/validate",t)}async function em(t="1h"){return dn.get(\`/stats/history/v2?range=\${t}\`)}async function tm(t="1h"){return dn.get(\`/stats/upstream-distribution?range=\${t}\`)}async function nm(t="1h"){return dn.get(\`/stats/upstream-failures?range=\${t}\`)}async function sm(t="1h"){return dn.get(\`/stats/upstream-status-codes?range=\${t}\`)}/*!
21197
+ Note: there are at least one loader still registered to this locale that wasn't executed.\`:""}\`)}const S0={fallbackLocale:null,loadingDelay:200,formats:w0,warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0},rl=S0;function Wi(){return rl}function E0(t){const e=t,{formats:n}=e,s=y0(e,["formats"]);let i=t.fallbackLocale;if(t.initialLocale)try{Md.resolveLocale(t.initialLocale)&&(i=t.initialLocale)}catch{console.warn(\`[svelte-i18n] The initial locale "\${t.initialLocale}" is not a valid locale.\`)}return s.warnOnMissingMessages&&(delete s.warnOnMissingMessages,s.handleMissingMessage==null?s.handleMissingMessage=k0:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(rl,s,{initialLocale:i}),n&&("number"in n&&Object.assign(rl.formats.number,n.number),"date"in n&&Object.assign(rl.formats.date,n.date),"time"in n&&Object.assign(rl.formats.time,n.time)),di.set(i)}const ao=Ns(!1);var T0=Object.defineProperty,M0=Object.defineProperties,C0=Object.getOwnPropertyDescriptors,Fa=Object.getOwnPropertySymbols,P0=Object.prototype.hasOwnProperty,A0=Object.prototype.propertyIsEnumerable,Na=(t,e,n)=>e in t?T0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x0=(t,e)=>{for(var n in e||(e={}))P0.call(e,n)&&Na(t,n,e[n]);if(Fa)for(var n of Fa(e))A0.call(e,n)&&Na(t,n,e[n]);return t},O0=(t,e)=>M0(t,C0(e));let Er;const go=Ns(null);function ja(t){return t.split("-").map((e,n,s)=>s.slice(0,n+1).join("-")).reverse()}function Ll(t,e=Wi().fallbackLocale){const n=ja(t);return e?[...new Set([...n,...ja(e)])]:n}function hi(){return Er??void 0}go.subscribe(t=>{Er=t??void 0,typeof window<"u"&&t!=null&&document.documentElement.setAttribute("lang",t)});const R0=t=>{if(t&&h0(t)&&po(t)){const{loadingDelay:e}=Wi();let n;return typeof window<"u"&&hi()!=null&&e?n=window.setTimeout(()=>ao.set(!0),e):ao.set(!0),Pd(t).then(()=>{go.set(t)}).finally(()=>{clearTimeout(n),ao.set(!1)})}return go.set(t)},di=O0(x0({},go),{set:R0}),D0=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],xo=t=>{const e=Object.create(null);return s=>{const i=JSON.stringify(s);return i in e?e[i]:e[i]=t(s)}};var L0=Object.defineProperty,mo=Object.getOwnPropertySymbols,xd=Object.prototype.hasOwnProperty,Od=Object.prototype.propertyIsEnumerable,za=(t,e,n)=>e in t?L0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wr=(t,e)=>{for(var n in e||(e={}))xd.call(e,n)&&za(t,n,e[n]);if(mo)for(var n of mo(e))Od.call(e,n)&&za(t,n,e[n]);return t},Ki=(t,e)=>{var n={};for(var s in t)xd.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&mo)for(var s of mo(t))e.indexOf(s)<0&&Od.call(t,s)&&(n[s]=t[s]);return n};const wl=(t,e)=>{const{formats:n}=Wi();if(t in n&&e in n[t])return n[t][e];throw new Error(\`[svelte-i18n] Unknown "\${e}" \${t} format.\`)},H0=xo(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return s&&(i=wl("number",s)),new Intl.NumberFormat(n,i)}),I0=xo(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return s?i=wl("date",s):Object.keys(i).length===0&&(i=wl("date","short")),new Intl.DateTimeFormat(n,i)}),B0=xo(t=>{var e=t,{locale:n,format:s}=e,i=Ki(e,["locale","format"]);if(n==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return s?i=wl("time",s):Object.keys(i).length===0&&(i=wl("time","short")),new Intl.DateTimeFormat(n,i)}),F0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return H0(Wr({locale:n},s))},N0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return I0(Wr({locale:n},s))},j0=(t={})=>{var e=t,{locale:n=hi()}=e,s=Ki(e,["locale"]);return B0(Wr({locale:n},s))},z0=xo((t,e=hi())=>new Md(t,e,Wi().formats,{ignoreTag:Wi().ignoreTag})),U0=(t,e={})=>{var n,s,i,l;let o=e;typeof t=="object"&&(o=t,t=o.id);const{values:a,locale:u=hi(),default:f}=o;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let h=Cd(t,u);if(!h)h=(l=(i=(s=(n=Wi()).handleMissingMessage)==null?void 0:s.call(n,{locale:u,id:t,defaultValue:f}))!=null?i:f)!=null?l:t;else if(typeof h!="string")return console.warn(\`[svelte-i18n] Message with id "\${t}" must be of type "string", found: "\${typeof h}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.\`),h;if(!a)return h;let p=h;try{p=z0(h,u).format(a)}catch(g){g instanceof Error&&console.warn(\`[svelte-i18n] Message "\${t}" has syntax error:\`,g.message)}return p},V0=(t,e)=>j0(e).format(t),W0=(t,e)=>N0(e).format(t),q0=(t,e)=>F0(e).format(t),G0=(t,e=hi())=>Cd(t,e),xt=js([di,Ji],()=>U0);js([di],()=>V0);js([di],()=>W0);js([di],()=>q0);js([di,Ji],()=>G0);const X0="modulepreload",Y0=function(t){return"/__ui/"+t},Ua={},Rd=function(e,n,s){let i=Promise.resolve();if(n&&n.length>0){let o=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=a?.nonce||a?.getAttribute("nonce");i=o(n.map(f=>{if(f=Y0(f),f in Ua)return;Ua[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(\`link[href="\${f}"]\${p}\`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":X0,h||(g.as="script"),g.crossOrigin="",g.href=f,u&&g.setAttribute("nonce",u),document.head.appendChild(g),h)return new Promise((m,b)=>{g.addEventListener("load",m),g.addEventListener("error",()=>b(new Error(\`Unable to preload CSS for \${f}\`)))})}))}function l(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&l(a.reason);return e().catch(l)})},Dd="zh-CN",Ld="locale",zl=[{code:"zh-CN",name:"\u4E2D\u6587"},{code:"en",name:"English"}];Ad("zh-CN",()=>Rd(()=>import("./zh-CN-bARHc6B8.js"),[]));Ad("en",()=>Rd(()=>import("./en-Woa_MXgq.js"),[]));function J0(){return typeof localStorage<"u"?localStorage.getItem(Ld):null}function K0(t){typeof localStorage<"u"&&localStorage.setItem(Ld,t)}function Z0(t){di.set(t),K0(t)}const Q0=J0(),$0=D0(),em=Q0||$0||Dd;E0({fallbackLocale:Dd,initialLocale:em});const Hl="bungee_auth_token",Hd=Ns(typeof window<"u"?localStorage.getItem(Hl):null),bo=Ns(typeof window<"u"?!!localStorage.getItem(Hl):!1),Va=Ns(!1);function tm(t){typeof window>"u"||(localStorage.setItem(Hl,t),Hd.set(t),bo.set(!0))}function Id(){typeof window>"u"||(localStorage.removeItem(Hl),Hd.set(null),bo.set(!1))}function Bd(){return typeof window>"u"?null:localStorage.getItem(Hl)}const nm="/__ui/api";async function Ul(t,e){const n=\`\${nm}\${t}\`,s=Bd(),i={"Content-Type":"application/json",...e?.headers};s&&(i.Authorization=\`Bearer \${s}\`);const l=await fetch(n,{...e,headers:i});if(l.status===401)throw Id(),window.location.hash="#/login",new Error("Unauthorized: Please login");if(!l.ok){const a=await l.json().catch(()=>({error:"Unknown error"}));throw new Error(a.error||\`Request failed with status \${l.status}\`)}return await l.json()}const yn={get:t=>Ul(t),post:(t,e)=>Ul(t,{method:"POST",body:JSON.stringify(e)}),put:(t,e)=>Ul(t,{method:"PUT",body:JSON.stringify(e)}),delete:t=>Ul(t,{method:"DELETE"})};async function qr(){return yn.get("/config")}async function sm(t){return yn.put("/config",t)}async function im(t){return yn.post("/config/validate",t)}async function lm(t="1h"){return yn.get(\`/stats/history/v2?range=\${t}\`)}async function om(t="1h"){return yn.get(\`/stats/upstream-status-codes?range=\${t}\`)}async function Wa(t="1h",e="all"){return yn.get(\`/stats/upstream-stats?range=\${t}&type=\${e}\`)}/*!
21197
21198
  * @kurkle/color v0.3.4
21198
21199
  * https://github.com/kurkle/color#readme
21199
21200
  * (c) 2024 Jukka Kurkela
21200
21201
  * Released under the MIT License
21201
- */function Hl(t){return t+.5|0}const si=(t,e,n)=>Math.max(Math.min(t,n),e);function al(t){return si(Hl(t*2.55),0,255)}function ri(t){return si(Hl(t*255),0,255)}function Ws(t){return si(Hl(t/2.55)/100,0,1)}function za(t){return si(Hl(t*100),0,100)}const ws={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},Sr=[..."0123456789ABCDEF"],im=t=>Sr[t&15],lm=t=>Sr[(t&240)>>4]+Sr[t&15],Ul=t=>(t&240)>>4===(t&15),om=t=>Ul(t.r)&&Ul(t.g)&&Ul(t.b)&&Ul(t.a);function rm(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&ws[t[1]]*17,g:255&ws[t[2]]*17,b:255&ws[t[3]]*17,a:e===5?ws[t[4]]*17:255}:(e===7||e===9)&&(n={r:ws[t[1]]<<4|ws[t[2]],g:ws[t[3]]<<4|ws[t[4]],b:ws[t[5]]<<4|ws[t[6]],a:e===9?ws[t[7]]<<4|ws[t[8]]:255})),n}const am=(t,e)=>t<255?e(t):"";function um(t){var e=om(t)?im:lm;return t?"#"+e(t.r)+e(t.g)+e(t.b)+am(t.a,e):void 0}const cm=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Dd(t,e,n){const s=e*Math.min(n,1-n),i=(l,o=(l+t/30)%12)=>n-s*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function fm(t,e,n){const s=(i,l=(i+t/60)%6)=>n-n*e*Math.max(Math.min(l,4-l,1),0);return[s(5),s(3),s(1)]}function hm(t,e,n){const s=Dd(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function dm(t,e,n,s,i){return t===i?(e-n)/s+(e<n?6:0):e===i?(n-t)/s+2:(t-e)/s+4}function Vr(t){const n=t.r/255,s=t.g/255,i=t.b/255,l=Math.max(n,s,i),o=Math.min(n,s,i),r=(l+o)/2;let u,f,h;return l!==o&&(h=l-o,f=r>.5?h/(2-l-o):h/(l+o),u=dm(n,s,i,h,l),u=u*60+.5),[u|0,f||0,r]}function Wr(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(ri)}function qr(t,e,n){return Wr(Dd,t,e,n)}function pm(t,e,n){return Wr(hm,t,e,n)}function gm(t,e,n){return Wr(fm,t,e,n)}function Ld(t){return(t%360+360)%360}function mm(t){const e=cm.exec(t);let n=255,s;if(!e)return;e[5]!==s&&(n=e[6]?al(+e[5]):ri(+e[5]));const i=Ld(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?s=pm(i,l,o):e[1]==="hsv"?s=gm(i,l,o):s=qr(i,l,o),{r:s[0],g:s[1],b:s[2],a:n}}function bm(t,e){var n=Vr(t);n[0]=Ld(n[0]+e),n=qr(n),t.r=n[0],t.g=n[1],t.b=n[2]}function _m(t){if(!t)return;const e=Vr(t),n=e[0],s=za(e[1]),i=za(e[2]);return t.a<255?\`hsla(\${n}, \${s}%, \${i}%, \${Ws(t.a)})\`:\`hsl(\${n}, \${s}%, \${i}%)\`}const Ua={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"},Va={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 vm(){const t={},e=Object.keys(Va),n=Object.keys(Ua);let s,i,l,o,r;for(s=0;s<e.length;s++){for(o=r=e[s],i=0;i<n.length;i++)l=n[i],r=r.replace(l,Ua[l]);l=parseInt(Va[o],16),t[r]=[l>>16&255,l>>8&255,l&255]}return t}let Vl;function ym(t){Vl||(Vl=vm(),Vl.transparent=[0,0,0,0]);const e=Vl[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const wm=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function km(t){const e=wm.exec(t);let n=255,s,i,l;if(e){if(e[7]!==s){const o=+e[7];n=e[8]?al(o):si(o*255,0,255)}return s=+e[1],i=+e[3],l=+e[5],s=255&(e[2]?al(s):si(s,0,255)),i=255&(e[4]?al(i):si(i,0,255)),l=255&(e[6]?al(l):si(l,0,255)),{r:s,g:i,b:l,a:n}}}function Sm(t){return t&&(t.a<255?\`rgba(\${t.r}, \${t.g}, \${t.b}, \${Ws(t.a)})\`:\`rgb(\${t.r}, \${t.g}, \${t.b})\`)}const Yo=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Hi=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Em(t,e,n){const s=Hi(Ws(t.r)),i=Hi(Ws(t.g)),l=Hi(Ws(t.b));return{r:ri(Yo(s+n*(Hi(Ws(e.r))-s))),g:ri(Yo(i+n*(Hi(Ws(e.g))-i))),b:ri(Yo(l+n*(Hi(Ws(e.b))-l))),a:t.a+n*(e.a-t.a)}}function Wl(t,e,n){if(t){let s=Vr(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*n,e===0?360:1)),s=qr(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function Hd(t,e){return t&&Object.assign(e||{},t)}function Wa(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ri(t[3]))):(e=Hd(t,{r:0,g:0,b:0,a:1}),e.a=ri(e.a)),e}function Tm(t){return t.charAt(0)==="r"?km(t):mm(t)}class wl{constructor(e){if(e instanceof wl)return e;const n=typeof e;let s;n==="object"?s=Wa(e):n==="string"&&(s=rm(e)||ym(e)||Tm(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=Hd(this._rgb);return e&&(e.a=Ws(e.a)),e}set rgb(e){this._rgb=Wa(e)}rgbString(){return this._valid?Sm(this._rgb):void 0}hexString(){return this._valid?um(this._rgb):void 0}hslString(){return this._valid?_m(this._rgb):void 0}mix(e,n){if(e){const s=this.rgb,i=e.rgb;let l;const o=n===l?.5:n,r=2*o-1,u=s.a-i.a,f=((r*u===-1?r:(r+u)/(1+r*u))+1)/2;l=1-f,s.r=255&f*s.r+l*i.r+.5,s.g=255&f*s.g+l*i.g+.5,s.b=255&f*s.b+l*i.b+.5,s.a=o*s.a+(1-o)*i.a,this.rgb=s}return this}interpolate(e,n){return e&&(this._rgb=Em(this._rgb,e._rgb,n)),this}clone(){return new wl(this.rgb)}alpha(e){return this._rgb.a=ri(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Hl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Wl(this._rgb,2,e),this}darken(e){return Wl(this._rgb,2,-e),this}saturate(e){return Wl(this._rgb,1,e),this}desaturate(e){return Wl(this._rgb,1,-e),this}rotate(e){return bm(this._rgb,e),this}}/*!
21202
+ */function Il(t){return t+.5|0}const si=(t,e,n)=>Math.max(Math.min(t,n),e);function al(t){return si(Il(t*2.55),0,255)}function ri(t){return si(Il(t*255),0,255)}function qs(t){return si(Il(t/2.55)/100,0,1)}function qa(t){return si(Il(t*100),0,100)}const ws={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},Tr=[..."0123456789ABCDEF"],rm=t=>Tr[t&15],am=t=>Tr[(t&240)>>4]+Tr[t&15],Vl=t=>(t&240)>>4===(t&15),um=t=>Vl(t.r)&&Vl(t.g)&&Vl(t.b)&&Vl(t.a);function cm(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&ws[t[1]]*17,g:255&ws[t[2]]*17,b:255&ws[t[3]]*17,a:e===5?ws[t[4]]*17:255}:(e===7||e===9)&&(n={r:ws[t[1]]<<4|ws[t[2]],g:ws[t[3]]<<4|ws[t[4]],b:ws[t[5]]<<4|ws[t[6]],a:e===9?ws[t[7]]<<4|ws[t[8]]:255})),n}const fm=(t,e)=>t<255?e(t):"";function hm(t){var e=um(t)?rm:am;return t?"#"+e(t.r)+e(t.g)+e(t.b)+fm(t.a,e):void 0}const dm=/^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Fd(t,e,n){const s=e*Math.min(n,1-n),i=(l,o=(l+t/30)%12)=>n-s*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function pm(t,e,n){const s=(i,l=(i+t/60)%6)=>n-n*e*Math.max(Math.min(l,4-l,1),0);return[s(5),s(3),s(1)]}function gm(t,e,n){const s=Fd(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)s[i]*=1-e-n,s[i]+=e;return s}function mm(t,e,n,s,i){return t===i?(e-n)/s+(e<n?6:0):e===i?(n-t)/s+2:(t-e)/s+4}function Gr(t){const n=t.r/255,s=t.g/255,i=t.b/255,l=Math.max(n,s,i),o=Math.min(n,s,i),a=(l+o)/2;let u,f,h;return l!==o&&(h=l-o,f=a>.5?h/(2-l-o):h/(l+o),u=mm(n,s,i,h,l),u=u*60+.5),[u|0,f||0,a]}function Xr(t,e,n,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,s)).map(ri)}function Yr(t,e,n){return Xr(Fd,t,e,n)}function bm(t,e,n){return Xr(gm,t,e,n)}function _m(t,e,n){return Xr(pm,t,e,n)}function Nd(t){return(t%360+360)%360}function vm(t){const e=dm.exec(t);let n=255,s;if(!e)return;e[5]!==s&&(n=e[6]?al(+e[5]):ri(+e[5]));const i=Nd(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?s=bm(i,l,o):e[1]==="hsv"?s=_m(i,l,o):s=Yr(i,l,o),{r:s[0],g:s[1],b:s[2],a:n}}function ym(t,e){var n=Gr(t);n[0]=Nd(n[0]+e),n=Yr(n),t.r=n[0],t.g=n[1],t.b=n[2]}function wm(t){if(!t)return;const e=Gr(t),n=e[0],s=qa(e[1]),i=qa(e[2]);return t.a<255?\`hsla(\${n}, \${s}%, \${i}%, \${qs(t.a)})\`:\`hsl(\${n}, \${s}%, \${i}%)\`}const Ga={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"},Xa={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 km(){const t={},e=Object.keys(Xa),n=Object.keys(Ga);let s,i,l,o,a;for(s=0;s<e.length;s++){for(o=a=e[s],i=0;i<n.length;i++)l=n[i],a=a.replace(l,Ga[l]);l=parseInt(Xa[o],16),t[a]=[l>>16&255,l>>8&255,l&255]}return t}let Wl;function Sm(t){Wl||(Wl=km(),Wl.transparent=[0,0,0,0]);const e=Wl[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Em=/^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;function Tm(t){const e=Em.exec(t);let n=255,s,i,l;if(e){if(e[7]!==s){const o=+e[7];n=e[8]?al(o):si(o*255,0,255)}return s=+e[1],i=+e[3],l=+e[5],s=255&(e[2]?al(s):si(s,0,255)),i=255&(e[4]?al(i):si(i,0,255)),l=255&(e[6]?al(l):si(l,0,255)),{r:s,g:i,b:l,a:n}}}function Mm(t){return t&&(t.a<255?\`rgba(\${t.r}, \${t.g}, \${t.b}, \${qs(t.a)})\`:\`rgb(\${t.r}, \${t.g}, \${t.b})\`)}const Ko=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Hi=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Cm(t,e,n){const s=Hi(qs(t.r)),i=Hi(qs(t.g)),l=Hi(qs(t.b));return{r:ri(Ko(s+n*(Hi(qs(e.r))-s))),g:ri(Ko(i+n*(Hi(qs(e.g))-i))),b:ri(Ko(l+n*(Hi(qs(e.b))-l))),a:t.a+n*(e.a-t.a)}}function ql(t,e,n){if(t){let s=Gr(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*n,e===0?360:1)),s=Yr(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function jd(t,e){return t&&Object.assign(e||{},t)}function Ya(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=ri(t[3]))):(e=jd(t,{r:0,g:0,b:0,a:1}),e.a=ri(e.a)),e}function Pm(t){return t.charAt(0)==="r"?Tm(t):vm(t)}class kl{constructor(e){if(e instanceof kl)return e;const n=typeof e;let s;n==="object"?s=Ya(e):n==="string"&&(s=cm(e)||Sm(e)||Pm(e)),this._rgb=s,this._valid=!!s}get valid(){return this._valid}get rgb(){var e=jd(this._rgb);return e&&(e.a=qs(e.a)),e}set rgb(e){this._rgb=Ya(e)}rgbString(){return this._valid?Mm(this._rgb):void 0}hexString(){return this._valid?hm(this._rgb):void 0}hslString(){return this._valid?wm(this._rgb):void 0}mix(e,n){if(e){const s=this.rgb,i=e.rgb;let l;const o=n===l?.5:n,a=2*o-1,u=s.a-i.a,f=((a*u===-1?a:(a+u)/(1+a*u))+1)/2;l=1-f,s.r=255&f*s.r+l*i.r+.5,s.g=255&f*s.g+l*i.g+.5,s.b=255&f*s.b+l*i.b+.5,s.a=o*s.a+(1-o)*i.a,this.rgb=s}return this}interpolate(e,n){return e&&(this._rgb=Cm(this._rgb,e._rgb,n)),this}clone(){return new kl(this.rgb)}alpha(e){return this._rgb.a=ri(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=Il(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return ql(this._rgb,2,e),this}darken(e){return ql(this._rgb,2,-e),this}saturate(e){return ql(this._rgb,1,e),this}desaturate(e){return ql(this._rgb,1,-e),this}rotate(e){return ym(this._rgb,e),this}}/*!
21202
21203
  * Chart.js v4.5.0
21203
21204
  * https://www.chartjs.org
21204
21205
  * (c) 2025 Chart.js Contributors
21205
21206
  * Released under the MIT License
21206
- */function zs(){}const Mm=(()=>{let t=0;return()=>t++})();function Dt(t){return t==null}function On(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Tt(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Es(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ds(t,e){return Es(t)?t:e}function dt(t,e){return typeof t>"u"?e:t}const Cm=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Id=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function rn(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Ft(t,e,n,s){let i,l,o;if(On(t))for(l=t.length,i=0;i<l;i++)e.call(n,t[i],i);else if(Tt(t))for(o=Object.keys(t),l=o.length,i=0;i<l;i++)e.call(n,t[o[i]],o[i])}function mo(t,e){let n,s,i,l;if(!t||!e||t.length!==e.length)return!1;for(n=0,s=t.length;n<s;++n)if(i=t[n],l=e[n],i.datasetIndex!==l.datasetIndex||i.index!==l.index)return!1;return!0}function bo(t){if(On(t))return t.map(bo);if(Tt(t)){const e=Object.create(null),n=Object.keys(t),s=n.length;let i=0;for(;i<s;++i)e[n[i]]=bo(t[n[i]]);return e}return t}function Bd(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Pm(t,e,n,s){if(!Bd(t))return;const i=e[t],l=n[t];Tt(i)&&Tt(l)?kl(i,l,s):e[t]=bo(l)}function kl(t,e,n){const s=On(e)?e:[e],i=s.length;if(!Tt(t))return t;n=n||{};const l=n.merger||Pm;let o;for(let r=0;r<i;++r){if(o=s[r],!Tt(o))continue;const u=Object.keys(o);for(let f=0,h=u.length;f<h;++f)l(u[f],t,o,n)}return t}function gl(t,e){return kl(t,e,{merger:Am})}function Am(t,e,n){if(!Bd(t))return;const s=e[t],i=n[t];Tt(s)&&Tt(i)?gl(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=bo(i))}const qa={"":t=>t,x:t=>t.x,y:t=>t.y};function Om(t){const e=t.split("."),n=[];let s="";for(const i of e)s+=i,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function xm(t){const e=Om(t);return n=>{for(const s of e){if(s==="")break;n=n&&n[s]}return n}}function Mi(t,e){return(qa[e]||(qa[e]=xm(e)))(t)}function Gr(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Sl=t=>typeof t<"u",fi=t=>typeof t=="function",Ga=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Rm(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Nt=Math.PI,yn=2*Nt,Dm=yn+Nt,_o=Number.POSITIVE_INFINITY,Lm=Nt/180,xn=Nt/2,bi=Nt/4,Xa=Nt*2/3,Fd=Math.log10,Bs=Math.sign;function ml(t,e,n){return Math.abs(t-e)<n}function Ya(t){const e=Math.round(t);t=ml(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Fd(t))),s=t/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function Hm(t){const e=[],n=Math.sqrt(t);let s;for(s=1;s<n;s++)t%s===0&&(e.push(s),e.push(t/s));return n===(n|0)&&e.push(n),e.sort((i,l)=>i-l).pop(),e}function Im(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function El(t){return!Im(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function Bm(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Fm(t,e,n){let s,i,l;for(s=0,i=t.length;s<i;s++)l=t[s][n],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function qs(t){return t*(Nt/180)}function Nm(t){return t*(180/Nt)}function Ja(t){if(!Es(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Nd(t,e){const n=e.x-t.x,s=e.y-t.y,i=Math.sqrt(n*n+s*s);let l=Math.atan2(s,n);return l<-.5*Nt&&(l+=yn),{angle:l,distance:i}}function Er(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function jm(t,e){return(t-e+Dm)%yn-Nt}function Ms(t){return(t%yn+yn)%yn}function Tl(t,e,n,s){const i=Ms(t),l=Ms(e),o=Ms(n),r=Ms(l-i),u=Ms(o-i),f=Ms(i-l),h=Ms(i-o);return i===l||i===o||s&&l===o||r>u&&f<h}function Zn(t,e,n){return Math.max(e,Math.min(n,t))}function zm(t){return Zn(t,-32768,32767)}function ii(t,e,n,s=1e-6){return t>=Math.min(e,n)-s&&t<=Math.max(e,n)+s}function Xr(t,e,n){n=n||(o=>t[o]<e);let s=t.length-1,i=0,l;for(;s-i>1;)l=i+s>>1,n(l)?i=l:s=l;return{lo:i,hi:s}}const Si=(t,e,n,s)=>Xr(t,n,s?i=>{const l=t[i][e];return l<n||l===n&&t[i+1][e]===n}:i=>t[i][e]<n),Um=(t,e,n)=>Xr(t,n,s=>t[s][e]>=n);function Vm(t,e,n){let s=0,i=t.length;for(;s<i&&t[s]<e;)s++;for(;i>s&&t[i-1]>n;)i--;return s>0||i<t.length?t.slice(s,i):t}const jd=["push","pop","shift","splice","unshift"];function Wm(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),jd.forEach(n=>{const s="_onData"+Gr(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...l){const o=i.apply(this,l);return t._chartjs.listeners.forEach(r=>{typeof r[s]=="function"&&r[s](...l)}),o}})})}function Ka(t,e){const n=t._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(e);i!==-1&&s.splice(i,1),!(s.length>0)&&(jd.forEach(l=>{delete t[l]}),delete t._chartjs)}function zd(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Ud=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function Vd(t,e){let n=[],s=!1;return function(...i){n=i,s||(s=!0,Ud.call(window,()=>{s=!1,t.apply(e,n)}))}}function qm(t,e){let n;return function(...s){return e?(clearTimeout(n),n=setTimeout(t,e,s)):t.apply(this,s),e}}const Yr=t=>t==="start"?"left":t==="end"?"right":"center",Yn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Gm=(t,e,n,s)=>t===(s?"left":"right")?n:t==="center"?(e+n)/2:e;function Xm(t,e,n){const s=e.length;let i=0,l=s;if(t._sorted){const{iScale:o,vScale:r,_parsed:u}=t,f=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,h=o.axis,{min:p,max:g,minDefined:m,maxDefined:_}=o.getUserBounds();if(m){if(i=Math.min(Si(u,h,p).lo,n?s:Si(e,h,o.getPixelForValue(p)).lo),f){const b=u.slice(0,i+1).reverse().findIndex(k=>!Dt(k[r.axis]));i-=Math.max(0,b)}i=Zn(i,0,s-1)}if(_){let b=Math.max(Si(u,o.axis,g,!0).hi+1,n?0:Si(e,h,o.getPixelForValue(g),!0).hi+1);if(f){const k=u.slice(b-1).findIndex(v=>!Dt(v[r.axis]));b+=Math.max(0,k)}l=Zn(b,i,s)-i}else l=s-i}return{start:i,count:l}}function Ym(t){const{xScale:e,yScale:n,_scaleRanges:s}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!s)return t._scaleRanges=i,!0;const l=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),l}const ql=t=>t===0||t===1,Za=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*yn/n)),Qa=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*yn/n)+1,bl={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*xn)+1,easeOutSine:t=>Math.sin(t*xn),easeInOutSine:t=>-.5*(Math.cos(Nt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ql(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>ql(t)?t:Za(t,.075,.3),easeOutElastic:t=>ql(t)?t:Qa(t,.075,.3),easeInOutElastic(t){return ql(t)?t:t<.5?.5*Za(t*2,.1125,.45):.5+.5*Qa(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-bl.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?bl.easeInBounce(t*2)*.5:bl.easeOutBounce(t*2-1)*.5+.5};function Jr(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function $a(t){return Jr(t)?t:new wl(t)}function Jo(t){return Jr(t)?t:new wl(t).saturate(.5).darken(.1).hexString()}const Jm=["x","y","borderWidth","radius","tension"],Km=["color","borderColor","backgroundColor"];function Zm(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Km},numbers:{type:"number",properties:Jm}}),t.describe("animations",{_fallback:"animation"}),t.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:e=>e|0}}}})}function Qm(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const eu=new Map;function $m(t,e){e=e||{};const n=t+JSON.stringify(e);let s=eu.get(n);return s||(s=new Intl.NumberFormat(t,e),eu.set(n,s)),s}function Kr(t,e,n){return $m(e,n).format(t)}const e1={values(t){return On(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const s=this.chart.options.locale;let i,l=t;if(n.length>1){const f=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(f<1e-4||f>1e15)&&(i="scientific"),l=t1(t,n)}const o=Fd(Math.abs(l)),r=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),u={notation:i,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(u,this.options.ticks.format),Kr(t,s,u)}};function t1(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Wd={formatters:e1};function n1(t){t.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:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:Wd.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ci=Object.create(null),Tr=Object.create(null);function _l(t,e){if(!e)return t;const n=e.split(".");for(let s=0,i=n.length;s<i;++s){const l=n[s];t=t[l]||(t[l]=Object.create(null))}return t}function Ko(t,e,n){return typeof e=="string"?kl(_l(t,e),n):kl(_l(t,""),e)}class s1{constructor(e,n){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,i)=>Jo(i.backgroundColor),this.hoverBorderColor=(s,i)=>Jo(i.borderColor),this.hoverColor=(s,i)=>Jo(i.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(e),this.apply(n)}set(e,n){return Ko(this,e,n)}get(e){return _l(this,e)}describe(e,n){return Ko(Tr,e,n)}override(e,n){return Ko(Ci,e,n)}route(e,n,s,i){const l=_l(this,e),o=_l(this,s),r="_"+n;Object.defineProperties(l,{[r]:{value:l[n],writable:!0},[n]:{enumerable:!0,get(){const u=this[r],f=o[i];return Tt(u)?Object.assign({},f,u):dt(u,f)},set(u){this[r]=u}}})}apply(e){e.forEach(n=>n(this))}}var Sn=new s1({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Zm,Qm,n1]);function i1(t){return!t||Dt(t.size)||Dt(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function tu(t,e,n,s,i){let l=e[i];return l||(l=e[i]=t.measureText(i).width,n.push(i)),l>s&&(s=l),s}function _i(t,e,n){const s=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*s)/s+i}function nu(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Mr(t,e,n,s){qd(t,e,n,s,null)}function qd(t,e,n,s,i){let l,o,r,u,f,h,p,g;const m=e.pointStyle,_=e.rotation,b=e.radius;let k=(_||0)*Lm;if(m&&typeof m=="object"&&(l=m.toString(),l==="[object HTMLImageElement]"||l==="[object HTMLCanvasElement]")){t.save(),t.translate(n,s),t.rotate(k),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(b)||b<=0)){switch(t.beginPath(),m){default:i?t.ellipse(n,s,i/2,b,0,0,yn):t.arc(n,s,b,0,yn),t.closePath();break;case"triangle":h=i?i/2:b,t.moveTo(n+Math.sin(k)*h,s-Math.cos(k)*b),k+=Xa,t.lineTo(n+Math.sin(k)*h,s-Math.cos(k)*b),k+=Xa,t.lineTo(n+Math.sin(k)*h,s-Math.cos(k)*b),t.closePath();break;case"rectRounded":f=b*.516,u=b-f,o=Math.cos(k+bi)*u,p=Math.cos(k+bi)*(i?i/2-f:u),r=Math.sin(k+bi)*u,g=Math.sin(k+bi)*(i?i/2-f:u),t.arc(n-p,s-r,f,k-Nt,k-xn),t.arc(n+g,s-o,f,k-xn,k),t.arc(n+p,s+r,f,k,k+xn),t.arc(n-g,s+o,f,k+xn,k+Nt),t.closePath();break;case"rect":if(!_){u=Math.SQRT1_2*b,h=i?i/2:u,t.rect(n-h,s-u,2*h,2*u);break}k+=bi;case"rectRot":p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+g,s-o),t.lineTo(n+p,s+r),t.lineTo(n-g,s+o),t.closePath();break;case"crossRot":k+=bi;case"cross":p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+p,s+r),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"star":p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+p,s+r),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o),k+=bi,p=Math.cos(k)*(i?i/2:b),o=Math.cos(k)*b,r=Math.sin(k)*b,g=Math.sin(k)*(i?i/2:b),t.moveTo(n-p,s-r),t.lineTo(n+p,s+r),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"line":o=i?i/2:Math.cos(k)*b,r=Math.sin(k)*b,t.moveTo(n-o,s-r),t.lineTo(n+o,s+r);break;case"dash":t.moveTo(n,s),t.lineTo(n+Math.cos(k)*(i?i/2:b),s+Math.sin(k)*b);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Ml(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function Zr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Qr(t){t.restore()}function l1(t,e,n,s,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const l=(e.x+n.x)/2;t.lineTo(l,e.y),t.lineTo(l,n.y)}else i==="after"!=!!s?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function o1(t,e,n,s){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function r1(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Dt(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function a1(t,e,n,s,i){if(i.strikethrough||i.underline){const l=t.measureText(s),o=e-l.actualBoundingBoxLeft,r=e+l.actualBoundingBoxRight,u=n-l.actualBoundingBoxAscent,f=n+l.actualBoundingBoxDescent,h=i.strikethrough?(u+f)/2:f;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,h),t.lineTo(r,h),t.stroke()}}function u1(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Cl(t,e,n,s,i,l={}){const o=On(e)?e:[e],r=l.strokeWidth>0&&l.strokeColor!=="";let u,f;for(t.save(),t.font=i.string,r1(t,l),u=0;u<o.length;++u)f=o[u],l.backdrop&&u1(t,l.backdrop),r&&(l.strokeColor&&(t.strokeStyle=l.strokeColor),Dt(l.strokeWidth)||(t.lineWidth=l.strokeWidth),t.strokeText(f,n,s,l.maxWidth)),t.fillText(f,n,s,l.maxWidth),a1(t,n,s,f,l),s+=Number(i.lineHeight);t.restore()}function vo(t,e){const{x:n,y:s,w:i,h:l,radius:o}=e;t.arc(n+o.topLeft,s+o.topLeft,o.topLeft,1.5*Nt,Nt,!0),t.lineTo(n,s+l-o.bottomLeft),t.arc(n+o.bottomLeft,s+l-o.bottomLeft,o.bottomLeft,Nt,xn,!0),t.lineTo(n+i-o.bottomRight,s+l),t.arc(n+i-o.bottomRight,s+l-o.bottomRight,o.bottomRight,xn,0,!0),t.lineTo(n+i,s+o.topRight),t.arc(n+i-o.topRight,s+o.topRight,o.topRight,0,-xn,!0),t.lineTo(n+o.topLeft,s)}const c1=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,f1=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function h1(t,e){const n=(""+t).match(c1);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const d1=t=>+t||0;function $r(t,e){const n={},s=Tt(e),i=s?Object.keys(e):e,l=Tt(t)?s?o=>dt(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)n[o]=d1(l(o));return n}function Gd(t){return $r(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ni(t){return $r(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ts(t){const e=Gd(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Qn(t,e){t=t||{},e=e||Sn.font;let n=dt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let s=dt(t.style,e.style);s&&!(""+s).match(f1)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:dt(t.family,e.family),lineHeight:h1(dt(t.lineHeight,e.lineHeight),n),size:n,style:s,weight:dt(t.weight,e.weight),string:""};return i.string=i1(i),i}function Gl(t,e,n,s){let i,l,o;for(i=0,l=t.length;i<l;++i)if(o=t[i],o!==void 0&&o!==void 0)return o}function p1(t,e,n){const{min:s,max:i}=t,l=Id(e,(i-s)/2),o=(r,u)=>n&&r===0?0:r+u;return{min:o(s,-Math.abs(l)),max:o(i,l)}}function Oi(t,e){return Object.assign(Object.create(t),e)}function ea(t,e=[""],n,s,i=()=>t[0]){const l=n||t;typeof s>"u"&&(s=Kd("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:l,_fallback:s,_getTarget:i,override:r=>ea([r,...t],e,l,s)};return new Proxy(o,{deleteProperty(r,u){return delete r[u],delete r._keys,delete t[0][u],!0},get(r,u){return Yd(r,u,()=>k1(u,e,t,r))},getOwnPropertyDescriptor(r,u){return Reflect.getOwnPropertyDescriptor(r._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(r,u){return iu(r).includes(u)},ownKeys(r){return iu(r)},set(r,u,f){const h=r._storage||(r._storage=i());return r[u]=h[u]=f,delete r._keys,!0}})}function qi(t,e,n,s){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Xd(t,s),setContext:l=>qi(t,l,n,s),override:l=>qi(t.override(l),e,n,s)};return new Proxy(i,{deleteProperty(l,o){return delete l[o],delete t[o],!0},get(l,o,r){return Yd(l,o,()=>m1(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(l,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(l,o,r){return t[o]=r,delete l[o],!0}})}function Xd(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:s=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:s,isScriptable:fi(n)?n:()=>n,isIndexable:fi(s)?s:()=>s}}const g1=(t,e)=>t?t+Gr(e):e,ta=(t,e)=>Tt(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Yd(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const s=n();return t[e]=s,s}function m1(t,e,n){const{_proxy:s,_context:i,_subProxy:l,_descriptors:o}=t;let r=s[e];return fi(r)&&o.isScriptable(e)&&(r=b1(e,r,t,n)),On(r)&&r.length&&(r=_1(e,r,t,o.isIndexable)),ta(e,r)&&(r=qi(r,i,l&&l[e],o)),r}function b1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_stack:r}=n;if(r.has(t))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+t);r.add(t);let u=e(l,o||s);return r.delete(t),ta(t,u)&&(u=na(i._scopes,i,t,u)),u}function _1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_descriptors:r}=n;if(typeof l.index<"u"&&s(t))return e[l.index%e.length];if(Tt(e[0])){const u=e,f=i._scopes.filter(h=>h!==u);e=[];for(const h of u){const p=na(f,i,t,h);e.push(qi(p,l,o&&o[t],r))}}return e}function Jd(t,e,n){return fi(t)?t(e,n):t}const v1=(t,e)=>t===!0?e:typeof t=="string"?Mi(e,t):void 0;function y1(t,e,n,s,i){for(const l of e){const o=v1(n,l);if(o){t.add(o);const r=Jd(o._fallback,n,i);if(typeof r<"u"&&r!==n&&r!==s)return r}else if(o===!1&&typeof s<"u"&&n!==s)return null}return!1}function na(t,e,n,s){const i=e._rootScopes,l=Jd(e._fallback,n,s),o=[...t,...i],r=new Set;r.add(s);let u=su(r,o,n,l||n,s);return u===null||typeof l<"u"&&l!==n&&(u=su(r,o,l,u,s),u===null)?!1:ea(Array.from(r),[""],i,l,()=>w1(e,n,s))}function su(t,e,n,s,i){for(;n;)n=y1(t,e,n,s,i);return n}function w1(t,e,n){const s=t._getTarget();e in s||(s[e]={});const i=s[e];return On(i)&&Tt(n)?n:i||{}}function k1(t,e,n,s){let i;for(const l of e)if(i=Kd(g1(l,t),n),typeof i<"u")return ta(t,i)?na(n,s,t,i):i}function Kd(t,e){for(const n of e){if(!n)continue;const s=n[t];if(typeof s<"u")return s}}function iu(t){let e=t._keys;return e||(e=t._keys=S1(t._scopes)),e}function S1(t){const e=new Set;for(const n of t)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(s);return Array.from(e)}const E1=Number.EPSILON||1e-14,Gi=(t,e)=>e<t.length&&!t[e].skip&&t[e],Zd=t=>t==="x"?"y":"x";function T1(t,e,n,s){const i=t.skip?e:t,l=e,o=n.skip?e:n,r=Er(l,i),u=Er(o,l);let f=r/(r+u),h=u/(r+u);f=isNaN(f)?0:f,h=isNaN(h)?0:h;const p=s*f,g=s*h;return{previous:{x:l.x-p*(o.x-i.x),y:l.y-p*(o.y-i.y)},next:{x:l.x+g*(o.x-i.x),y:l.y+g*(o.y-i.y)}}}function M1(t,e,n){const s=t.length;let i,l,o,r,u,f=Gi(t,0);for(let h=0;h<s-1;++h)if(u=f,f=Gi(t,h+1),!(!u||!f)){if(ml(e[h],0,E1)){n[h]=n[h+1]=0;continue}i=n[h]/e[h],l=n[h+1]/e[h],r=Math.pow(i,2)+Math.pow(l,2),!(r<=9)&&(o=3/Math.sqrt(r),n[h]=i*o*e[h],n[h+1]=l*o*e[h])}}function C1(t,e,n="x"){const s=Zd(n),i=t.length;let l,o,r,u=Gi(t,0);for(let f=0;f<i;++f){if(o=r,r=u,u=Gi(t,f+1),!r)continue;const h=r[n],p=r[s];o&&(l=(h-o[n])/3,r[\`cp1\${n}\`]=h-l,r[\`cp1\${s}\`]=p-l*e[f]),u&&(l=(u[n]-h)/3,r[\`cp2\${n}\`]=h+l,r[\`cp2\${s}\`]=p+l*e[f])}}function P1(t,e="x"){const n=Zd(e),s=t.length,i=Array(s).fill(0),l=Array(s);let o,r,u,f=Gi(t,0);for(o=0;o<s;++o)if(r=u,u=f,f=Gi(t,o+1),!!u){if(f){const h=f[e]-u[e];i[o]=h!==0?(f[n]-u[n])/h:0}l[o]=r?f?Bs(i[o-1])!==Bs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}M1(t,i,l),C1(t,l,e)}function Xl(t,e,n){return Math.max(Math.min(t,n),e)}function A1(t,e){let n,s,i,l,o,r=Ml(t[0],e);for(n=0,s=t.length;n<s;++n)o=l,l=r,r=n<s-1&&Ml(t[n+1],e),l&&(i=t[n],o&&(i.cp1x=Xl(i.cp1x,e.left,e.right),i.cp1y=Xl(i.cp1y,e.top,e.bottom)),r&&(i.cp2x=Xl(i.cp2x,e.left,e.right),i.cp2y=Xl(i.cp2y,e.top,e.bottom)))}function O1(t,e,n,s,i){let l,o,r,u;if(e.spanGaps&&(t=t.filter(f=>!f.skip)),e.cubicInterpolationMode==="monotone")P1(t,i);else{let f=s?t[t.length-1]:t[0];for(l=0,o=t.length;l<o;++l)r=t[l],u=T1(f,r,t[Math.min(l+1,o-(s?0:1))%o],e.tension),r.cp1x=u.previous.x,r.cp1y=u.previous.y,r.cp2x=u.next.x,r.cp2y=u.next.y,f=r}e.capBezierPoints&&A1(t,n)}function sa(){return typeof window<"u"&&typeof document<"u"}function ia(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function yo(t,e,n){let s;return typeof t=="string"?(s=parseInt(t,10),t.indexOf("%")!==-1&&(s=s/100*e.parentNode[n])):s=t,s}const Ao=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function x1(t,e){return Ao(t).getPropertyValue(e)}const R1=["top","right","bottom","left"];function Ti(t,e,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const l=R1[i];s[l]=parseFloat(t[e+"-"+l+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const D1=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function L1(t,e){const n=t.touches,s=n&&n.length?n[0]:t,{offsetX:i,offsetY:l}=s;let o=!1,r,u;if(D1(i,l,t.target))r=i,u=l;else{const f=e.getBoundingClientRect();r=s.clientX-f.left,u=s.clientY-f.top,o=!0}return{x:r,y:u,box:o}}function yi(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:s}=e,i=Ao(n),l=i.boxSizing==="border-box",o=Ti(i,"padding"),r=Ti(i,"border","width"),{x:u,y:f,box:h}=L1(t,n),p=o.left+(h&&r.left),g=o.top+(h&&r.top);let{width:m,height:_}=e;return l&&(m-=o.width+r.width,_-=o.height+r.height),{x:Math.round((u-p)/m*n.width/s),y:Math.round((f-g)/_*n.height/s)}}function H1(t,e,n){let s,i;if(e===void 0||n===void 0){const l=t&&ia(t);if(!l)e=t.clientWidth,n=t.clientHeight;else{const o=l.getBoundingClientRect(),r=Ao(l),u=Ti(r,"border","width"),f=Ti(r,"padding");e=o.width-f.width-u.width,n=o.height-f.height-u.height,s=yo(r.maxWidth,l,"clientWidth"),i=yo(r.maxHeight,l,"clientHeight")}}return{width:e,height:n,maxWidth:s||_o,maxHeight:i||_o}}const Yl=t=>Math.round(t*10)/10;function I1(t,e,n,s){const i=Ao(t),l=Ti(i,"margin"),o=yo(i.maxWidth,t,"clientWidth")||_o,r=yo(i.maxHeight,t,"clientHeight")||_o,u=H1(t,e,n);let{width:f,height:h}=u;if(i.boxSizing==="content-box"){const g=Ti(i,"border","width"),m=Ti(i,"padding");f-=m.width+g.width,h-=m.height+g.height}return f=Math.max(0,f-l.width),h=Math.max(0,s?f/s:h-l.height),f=Yl(Math.min(f,o,u.maxWidth)),h=Yl(Math.min(h,r,u.maxHeight)),f&&!h&&(h=Yl(f/2)),(e!==void 0||n!==void 0)&&s&&u.height&&h>u.height&&(h=u.height,f=Yl(Math.floor(h*s))),{width:f,height:h}}function lu(t,e,n){const s=e||1,i=Math.floor(t.height*s),l=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=\`\${t.height}px\`,o.style.width=\`\${t.width}px\`),t.currentDevicePixelRatio!==s||o.height!==i||o.width!==l?(t.currentDevicePixelRatio=s,o.height=i,o.width=l,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}const B1=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};sa()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function ou(t,e){const n=x1(t,e),s=n&&n.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function wi(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function F1(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:s==="middle"?n<.5?t.y:e.y:s==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function N1(t,e,n,s){const i={x:t.cp2x,y:t.cp2y},l={x:e.cp1x,y:e.cp1y},o=wi(t,i,n),r=wi(i,l,n),u=wi(l,e,n),f=wi(o,r,n),h=wi(r,u,n);return wi(f,h,n)}const j1=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},z1=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ji(t,e,n){return t?j1(e,n):z1()}function Qd(t,e){let n,s;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=s)}function $d(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function ep(t){return t==="angle"?{between:Tl,compare:jm,normalize:Ms}:{between:ii,compare:(e,n)=>e-n,normalize:e=>e}}function ru({start:t,end:e,count:n,loop:s,style:i}){return{start:t%n,end:e%n,loop:s&&(e-t+1)%n===0,style:i}}function U1(t,e,n){const{property:s,start:i,end:l}=n,{between:o,normalize:r}=ep(s),u=e.length;let{start:f,end:h,loop:p}=t,g,m;if(p){for(f+=u,h+=u,g=0,m=u;g<m&&o(r(e[f%u][s]),i,l);++g)f--,h--;f%=u,h%=u}return h<f&&(h+=u),{start:f,end:h,loop:p,style:t.style}}function V1(t,e,n){if(!n)return[t];const{property:s,start:i,end:l}=n,o=e.length,{compare:r,between:u,normalize:f}=ep(s),{start:h,end:p,loop:g,style:m}=U1(t,e,n),_=[];let b=!1,k=null,v,y,S;const C=()=>u(i,S,v)&&r(i,S)!==0,T=()=>r(l,v)===0||u(l,S,v),O=()=>b||C(),A=()=>!b||T();for(let x=h,P=h;x<=p;++x)y=e[x%o],!y.skip&&(v=f(y[s]),v!==S&&(b=u(v,i,l),k===null&&O()&&(k=r(v,i)===0?x:P),k!==null&&A()&&(_.push(ru({start:k,end:x,loop:g,count:o,style:m})),k=null),P=x,S=v));return k!==null&&_.push(ru({start:k,end:p,loop:g,count:o,style:m})),_}function W1(t,e){const n=[],s=t.segments;for(let i=0;i<s.length;i++){const l=V1(s[i],t.points,e);l.length&&n.push(...l)}return n}function q1(t,e,n,s){let i=0,l=e-1;if(n&&!s)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(l+=i);l>i&&t[l%e].skip;)l--;return l%=e,{start:i,end:l}}function G1(t,e,n,s){const i=t.length,l=[];let o=e,r=t[e],u;for(u=e+1;u<=n;++u){const f=t[u%i];f.skip||f.stop?r.skip||(s=!1,l.push({start:e%i,end:(u-1)%i,loop:s}),e=o=f.stop?u:null):(o=u,r.skip&&(e=u)),r=f}return o!==null&&l.push({start:e%i,end:o%i,loop:s}),l}function X1(t,e){const n=t.points,s=t.options.spanGaps,i=n.length;if(!i)return[];const l=!!t._loop,{start:o,end:r}=q1(n,i,l,s);if(s===!0)return au(t,[{start:o,end:r,loop:l}],n,e);const u=r<o?r+i:r,f=!!t._fullLoop&&o===0&&r===i-1;return au(t,G1(n,o,u,f),n,e)}function au(t,e,n,s){return!s||!s.setContext||!n?e:Y1(t,e,n,s)}function Y1(t,e,n,s){const i=t._chart.getContext(),l=uu(t.options),{_datasetIndex:o,options:{spanGaps:r}}=t,u=n.length,f=[];let h=l,p=e[0].start,g=p;function m(_,b,k,v){const y=r?-1:1;if(_!==b){for(_+=u;n[_%u].skip;)_-=y;for(;n[b%u].skip;)b+=y;_%u!==b%u&&(f.push({start:_%u,end:b%u,loop:k,style:v}),h=v,p=b%u)}}for(const _ of e){p=r?p:_.start;let b=n[p%u],k;for(g=p+1;g<=_.end;g++){const v=n[g%u];k=uu(s.setContext(Oi(i,{type:"segment",p0:b,p1:v,p0DataIndex:(g-1)%u,p1DataIndex:g%u,datasetIndex:o}))),J1(k,h)&&m(p,g-1,_.loop,h),b=v,h=k}p<g-1&&m(p,g-1,_.loop,h)}return f}function uu(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function J1(t,e){if(!e)return!1;const n=[],s=function(i,l){return Jr(l)?(n.includes(l)||n.push(l),n.indexOf(l)):l};return JSON.stringify(t,s)!==JSON.stringify(e,s)}function Jl(t,e,n){return t.options.clip?t[n]:e[n]}function K1(t,e){const{xScale:n,yScale:s}=t;return n&&s?{left:Jl(n,e,"left"),right:Jl(n,e,"right"),top:Jl(s,e,"top"),bottom:Jl(s,e,"bottom")}:e}function Z1(t,e){const n=e._clip;if(n.disabled)return!1;const s=K1(e,t.chartArea);return{left:n.left===!1?0:s.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:s.right+(n.right===!0?0:n.right),top:n.top===!1?0:s.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:s.bottom+(n.bottom===!0?0:n.bottom)}}/*!
21207
+ */function Us(){}const Am=(()=>{let t=0;return()=>t++})();function Ft(t){return t==null}function xn(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ot(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function Es(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ds(t,e){return Es(t)?t:e}function bt(t,e){return typeof t>"u"?e:t}const xm=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,zd=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function an(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function Vt(t,e,n,s){let i,l,o;if(xn(t))for(l=t.length,i=0;i<l;i++)e.call(n,t[i],i);else if(Ot(t))for(o=Object.keys(t),l=o.length,i=0;i<l;i++)e.call(n,t[o[i]],o[i])}function _o(t,e){let n,s,i,l;if(!t||!e||t.length!==e.length)return!1;for(n=0,s=t.length;n<s;++n)if(i=t[n],l=e[n],i.datasetIndex!==l.datasetIndex||i.index!==l.index)return!1;return!0}function vo(t){if(xn(t))return t.map(vo);if(Ot(t)){const e=Object.create(null),n=Object.keys(t),s=n.length;let i=0;for(;i<s;++i)e[n[i]]=vo(t[n[i]]);return e}return t}function Ud(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Om(t,e,n,s){if(!Ud(t))return;const i=e[t],l=n[t];Ot(i)&&Ot(l)?Sl(i,l,s):e[t]=vo(l)}function Sl(t,e,n){const s=xn(e)?e:[e],i=s.length;if(!Ot(t))return t;n=n||{};const l=n.merger||Om;let o;for(let a=0;a<i;++a){if(o=s[a],!Ot(o))continue;const u=Object.keys(o);for(let f=0,h=u.length;f<h;++f)l(u[f],t,o,n)}return t}function gl(t,e){return Sl(t,e,{merger:Rm})}function Rm(t,e,n){if(!Ud(t))return;const s=e[t],i=n[t];Ot(s)&&Ot(i)?gl(s,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=vo(i))}const Ja={"":t=>t,x:t=>t.x,y:t=>t.y};function Dm(t){const e=t.split("."),n=[];let s="";for(const i of e)s+=i,s.endsWith("\\\\")?s=s.slice(0,-1)+".":(n.push(s),s="");return n}function Lm(t){const e=Dm(t);return n=>{for(const s of e){if(s==="")break;n=n&&n[s]}return n}}function Mi(t,e){return(Ja[e]||(Ja[e]=Lm(e)))(t)}function Jr(t){return t.charAt(0).toUpperCase()+t.slice(1)}const El=t=>typeof t<"u",fi=t=>typeof t=="function",Ka=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Hm(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Wt=Math.PI,kn=2*Wt,Im=kn+Wt,yo=Number.POSITIVE_INFINITY,Bm=Wt/180,On=Wt/2,bi=Wt/4,Za=Wt*2/3,Vd=Math.log10,Bs=Math.sign;function ml(t,e,n){return Math.abs(t-e)<n}function Qa(t){const e=Math.round(t);t=ml(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(Vd(t))),s=t/n;return(s<=1?1:s<=2?2:s<=5?5:10)*n}function Fm(t){const e=[],n=Math.sqrt(t);let s;for(s=1;s<n;s++)t%s===0&&(e.push(s),e.push(t/s));return n===(n|0)&&e.push(n),e.sort((i,l)=>i-l).pop(),e}function Nm(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Tl(t){return!Nm(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function jm(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function zm(t,e,n){let s,i,l;for(s=0,i=t.length;s<i;s++)l=t[s][n],isNaN(l)||(e.min=Math.min(e.min,l),e.max=Math.max(e.max,l))}function Gs(t){return t*(Wt/180)}function Um(t){return t*(180/Wt)}function $a(t){if(!Es(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Wd(t,e){const n=e.x-t.x,s=e.y-t.y,i=Math.sqrt(n*n+s*s);let l=Math.atan2(s,n);return l<-.5*Wt&&(l+=kn),{angle:l,distance:i}}function Mr(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Vm(t,e){return(t-e+Im)%kn-Wt}function Ms(t){return(t%kn+kn)%kn}function Ml(t,e,n,s){const i=Ms(t),l=Ms(e),o=Ms(n),a=Ms(l-i),u=Ms(o-i),f=Ms(i-l),h=Ms(i-o);return i===l||i===o||s&&l===o||a>u&&f<h}function Jn(t,e,n){return Math.max(e,Math.min(n,t))}function Wm(t){return Jn(t,-32768,32767)}function ii(t,e,n,s=1e-6){return t>=Math.min(e,n)-s&&t<=Math.max(e,n)+s}function Kr(t,e,n){n=n||(o=>t[o]<e);let s=t.length-1,i=0,l;for(;s-i>1;)l=i+s>>1,n(l)?i=l:s=l;return{lo:i,hi:s}}const Si=(t,e,n,s)=>Kr(t,n,s?i=>{const l=t[i][e];return l<n||l===n&&t[i+1][e]===n}:i=>t[i][e]<n),qm=(t,e,n)=>Kr(t,n,s=>t[s][e]>=n);function Gm(t,e,n){let s=0,i=t.length;for(;s<i&&t[s]<e;)s++;for(;i>s&&t[i-1]>n;)i--;return s>0||i<t.length?t.slice(s,i):t}const qd=["push","pop","shift","splice","unshift"];function Xm(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),qd.forEach(n=>{const s="_onData"+Jr(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...l){const o=i.apply(this,l);return t._chartjs.listeners.forEach(a=>{typeof a[s]=="function"&&a[s](...l)}),o}})})}function eu(t,e){const n=t._chartjs;if(!n)return;const s=n.listeners,i=s.indexOf(e);i!==-1&&s.splice(i,1),!(s.length>0)&&(qd.forEach(l=>{delete t[l]}),delete t._chartjs)}function Gd(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Xd=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function Yd(t,e){let n=[],s=!1;return function(...i){n=i,s||(s=!0,Xd.call(window,()=>{s=!1,t.apply(e,n)}))}}function Ym(t,e){let n;return function(...s){return e?(clearTimeout(n),n=setTimeout(t,e,s)):t.apply(this,s),e}}const Zr=t=>t==="start"?"left":t==="end"?"right":"center",Gn=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Jm=(t,e,n,s)=>t===(s?"left":"right")?n:t==="center"?(e+n)/2:e;function Km(t,e,n){const s=e.length;let i=0,l=s;if(t._sorted){const{iScale:o,vScale:a,_parsed:u}=t,f=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,h=o.axis,{min:p,max:g,minDefined:m,maxDefined:b}=o.getUserBounds();if(m){if(i=Math.min(Si(u,h,p).lo,n?s:Si(e,h,o.getPixelForValue(p)).lo),f){const _=u.slice(0,i+1).reverse().findIndex(y=>!Ft(y[a.axis]));i-=Math.max(0,_)}i=Jn(i,0,s-1)}if(b){let _=Math.max(Si(u,o.axis,g,!0).hi+1,n?0:Si(e,h,o.getPixelForValue(g),!0).hi+1);if(f){const y=u.slice(_-1).findIndex(k=>!Ft(k[a.axis]));_+=Math.max(0,y)}l=Jn(_,i,s)-i}else l=s-i}return{start:i,count:l}}function Zm(t){const{xScale:e,yScale:n,_scaleRanges:s}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!s)return t._scaleRanges=i,!0;const l=s.xmin!==e.min||s.xmax!==e.max||s.ymin!==n.min||s.ymax!==n.max;return Object.assign(s,i),l}const Gl=t=>t===0||t===1,tu=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*kn/n)),nu=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*kn/n)+1,bl={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*On)+1,easeOutSine:t=>Math.sin(t*On),easeInOutSine:t=>-.5*(Math.cos(Wt*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Gl(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Gl(t)?t:tu(t,.075,.3),easeOutElastic:t=>Gl(t)?t:nu(t,.075,.3),easeInOutElastic(t){return Gl(t)?t:t<.5?.5*tu(t*2,.1125,.45):.5+.5*nu(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-bl.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?bl.easeInBounce(t*2)*.5:bl.easeOutBounce(t*2-1)*.5+.5};function Qr(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function su(t){return Qr(t)?t:new kl(t)}function Zo(t){return Qr(t)?t:new kl(t).saturate(.5).darken(.1).hexString()}const Qm=["x","y","borderWidth","radius","tension"],$m=["color","borderColor","backgroundColor"];function e1(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:$m},numbers:{type:"number",properties:Qm}}),t.describe("animations",{_fallback:"animation"}),t.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:e=>e|0}}}})}function t1(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const iu=new Map;function n1(t,e){e=e||{};const n=t+JSON.stringify(e);let s=iu.get(n);return s||(s=new Intl.NumberFormat(t,e),iu.set(n,s)),s}function $r(t,e,n){return n1(e,n).format(t)}const s1={values(t){return xn(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const s=this.chart.options.locale;let i,l=t;if(n.length>1){const f=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(f<1e-4||f>1e15)&&(i="scientific"),l=i1(t,n)}const o=Vd(Math.abs(l)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),u={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(u,this.options.ticks.format),$r(t,s,u)}};function i1(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var Jd={formatters:s1};function l1(t){t.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:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:Jd.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Ci=Object.create(null),Cr=Object.create(null);function _l(t,e){if(!e)return t;const n=e.split(".");for(let s=0,i=n.length;s<i;++s){const l=n[s];t=t[l]||(t[l]=Object.create(null))}return t}function Qo(t,e,n){return typeof e=="string"?Sl(_l(t,e),n):Sl(_l(t,""),e)}class o1{constructor(e,n){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,i)=>Zo(i.backgroundColor),this.hoverBorderColor=(s,i)=>Zo(i.borderColor),this.hoverColor=(s,i)=>Zo(i.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(e),this.apply(n)}set(e,n){return Qo(this,e,n)}get(e){return _l(this,e)}describe(e,n){return Qo(Cr,e,n)}override(e,n){return Qo(Ci,e,n)}route(e,n,s,i){const l=_l(this,e),o=_l(this,s),a="_"+n;Object.defineProperties(l,{[a]:{value:l[n],writable:!0},[n]:{enumerable:!0,get(){const u=this[a],f=o[i];return Ot(u)?Object.assign({},f,u):bt(u,f)},set(u){this[a]=u}}})}apply(e){e.forEach(n=>n(this))}}var En=new o1({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[e1,t1,l1]);function r1(t){return!t||Ft(t.size)||Ft(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function lu(t,e,n,s,i){let l=e[i];return l||(l=e[i]=t.measureText(i).width,n.push(i)),l>s&&(s=l),s}function _i(t,e,n){const s=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*s)/s+i}function ou(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Pr(t,e,n,s){Kd(t,e,n,s,null)}function Kd(t,e,n,s,i){let l,o,a,u,f,h,p,g;const m=e.pointStyle,b=e.rotation,_=e.radius;let y=(b||0)*Bm;if(m&&typeof m=="object"&&(l=m.toString(),l==="[object HTMLImageElement]"||l==="[object HTMLCanvasElement]")){t.save(),t.translate(n,s),t.rotate(y),t.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),t.restore();return}if(!(isNaN(_)||_<=0)){switch(t.beginPath(),m){default:i?t.ellipse(n,s,i/2,_,0,0,kn):t.arc(n,s,_,0,kn),t.closePath();break;case"triangle":h=i?i/2:_,t.moveTo(n+Math.sin(y)*h,s-Math.cos(y)*_),y+=Za,t.lineTo(n+Math.sin(y)*h,s-Math.cos(y)*_),y+=Za,t.lineTo(n+Math.sin(y)*h,s-Math.cos(y)*_),t.closePath();break;case"rectRounded":f=_*.516,u=_-f,o=Math.cos(y+bi)*u,p=Math.cos(y+bi)*(i?i/2-f:u),a=Math.sin(y+bi)*u,g=Math.sin(y+bi)*(i?i/2-f:u),t.arc(n-p,s-a,f,y-Wt,y-On),t.arc(n+g,s-o,f,y-On,y),t.arc(n+p,s+a,f,y,y+On),t.arc(n-g,s+o,f,y+On,y+Wt),t.closePath();break;case"rect":if(!b){u=Math.SQRT1_2*_,h=i?i/2:u,t.rect(n-h,s-u,2*h,2*u);break}y+=bi;case"rectRot":p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+g,s-o),t.lineTo(n+p,s+a),t.lineTo(n-g,s+o),t.closePath();break;case"crossRot":y+=bi;case"cross":p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+p,s+a),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"star":p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+p,s+a),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o),y+=bi,p=Math.cos(y)*(i?i/2:_),o=Math.cos(y)*_,a=Math.sin(y)*_,g=Math.sin(y)*(i?i/2:_),t.moveTo(n-p,s-a),t.lineTo(n+p,s+a),t.moveTo(n+g,s-o),t.lineTo(n-g,s+o);break;case"line":o=i?i/2:Math.cos(y)*_,a=Math.sin(y)*_,t.moveTo(n-o,s-a),t.lineTo(n+o,s+a);break;case"dash":t.moveTo(n,s),t.lineTo(n+Math.cos(y)*(i?i/2:_),s+Math.sin(y)*_);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Cl(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function ea(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ta(t){t.restore()}function a1(t,e,n,s,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const l=(e.x+n.x)/2;t.lineTo(l,e.y),t.lineTo(l,n.y)}else i==="after"!=!!s?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function u1(t,e,n,s){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(s?e.cp1x:e.cp2x,s?e.cp1y:e.cp2y,s?n.cp2x:n.cp1x,s?n.cp2y:n.cp1y,n.x,n.y)}function c1(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Ft(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function f1(t,e,n,s,i){if(i.strikethrough||i.underline){const l=t.measureText(s),o=e-l.actualBoundingBoxLeft,a=e+l.actualBoundingBoxRight,u=n-l.actualBoundingBoxAscent,f=n+l.actualBoundingBoxDescent,h=i.strikethrough?(u+f)/2:f;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,h),t.lineTo(a,h),t.stroke()}}function h1(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Pl(t,e,n,s,i,l={}){const o=xn(e)?e:[e],a=l.strokeWidth>0&&l.strokeColor!=="";let u,f;for(t.save(),t.font=i.string,c1(t,l),u=0;u<o.length;++u)f=o[u],l.backdrop&&h1(t,l.backdrop),a&&(l.strokeColor&&(t.strokeStyle=l.strokeColor),Ft(l.strokeWidth)||(t.lineWidth=l.strokeWidth),t.strokeText(f,n,s,l.maxWidth)),t.fillText(f,n,s,l.maxWidth),f1(t,n,s,f,l),s+=Number(i.lineHeight);t.restore()}function wo(t,e){const{x:n,y:s,w:i,h:l,radius:o}=e;t.arc(n+o.topLeft,s+o.topLeft,o.topLeft,1.5*Wt,Wt,!0),t.lineTo(n,s+l-o.bottomLeft),t.arc(n+o.bottomLeft,s+l-o.bottomLeft,o.bottomLeft,Wt,On,!0),t.lineTo(n+i-o.bottomRight,s+l),t.arc(n+i-o.bottomRight,s+l-o.bottomRight,o.bottomRight,On,0,!0),t.lineTo(n+i,s+o.topRight),t.arc(n+i-o.topRight,s+o.topRight,o.topRight,0,-On,!0),t.lineTo(n+o.topLeft,s)}const d1=/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/,p1=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function g1(t,e){const n=(""+t).match(d1);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const m1=t=>+t||0;function na(t,e){const n={},s=Ot(e),i=s?Object.keys(e):e,l=Ot(t)?s?o=>bt(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)n[o]=m1(l(o));return n}function Zd(t){return na(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Ni(t){return na(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ts(t){const e=Zd(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Kn(t,e){t=t||{},e=e||En.font;let n=bt(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let s=bt(t.style,e.style);s&&!(""+s).match(p1)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const i={family:bt(t.family,e.family),lineHeight:g1(bt(t.lineHeight,e.lineHeight),n),size:n,style:s,weight:bt(t.weight,e.weight),string:""};return i.string=r1(i),i}function Xl(t,e,n,s){let i,l,o;for(i=0,l=t.length;i<l;++i)if(o=t[i],o!==void 0&&o!==void 0)return o}function b1(t,e,n){const{min:s,max:i}=t,l=zd(e,(i-s)/2),o=(a,u)=>n&&a===0?0:a+u;return{min:o(s,-Math.abs(l)),max:o(i,l)}}function xi(t,e){return Object.assign(Object.create(t),e)}function sa(t,e=[""],n,s,i=()=>t[0]){const l=n||t;typeof s>"u"&&(s=tp("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:l,_fallback:s,_getTarget:i,override:a=>sa([a,...t],e,l,s)};return new Proxy(o,{deleteProperty(a,u){return delete a[u],delete a._keys,delete t[0][u],!0},get(a,u){return $d(a,u,()=>T1(u,e,t,a))},getOwnPropertyDescriptor(a,u){return Reflect.getOwnPropertyDescriptor(a._scopes[0],u)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,u){return au(a).includes(u)},ownKeys(a){return au(a)},set(a,u,f){const h=a._storage||(a._storage=i());return a[u]=h[u]=f,delete a._keys,!0}})}function qi(t,e,n,s){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:Qd(t,s),setContext:l=>qi(t,l,n,s),override:l=>qi(t.override(l),e,n,s)};return new Proxy(i,{deleteProperty(l,o){return delete l[o],delete t[o],!0},get(l,o,a){return $d(l,o,()=>v1(l,o,a))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(l,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(l,o,a){return t[o]=a,delete l[o],!0}})}function Qd(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:s=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:s,isScriptable:fi(n)?n:()=>n,isIndexable:fi(s)?s:()=>s}}const _1=(t,e)=>t?t+Jr(e):e,ia=(t,e)=>Ot(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function $d(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const s=n();return t[e]=s,s}function v1(t,e,n){const{_proxy:s,_context:i,_subProxy:l,_descriptors:o}=t;let a=s[e];return fi(a)&&o.isScriptable(e)&&(a=y1(e,a,t,n)),xn(a)&&a.length&&(a=w1(e,a,t,o.isIndexable)),ia(e,a)&&(a=qi(a,i,l&&l[e],o)),a}function y1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let u=e(l,o||s);return a.delete(t),ia(t,u)&&(u=la(i._scopes,i,t,u)),u}function w1(t,e,n,s){const{_proxy:i,_context:l,_subProxy:o,_descriptors:a}=n;if(typeof l.index<"u"&&s(t))return e[l.index%e.length];if(Ot(e[0])){const u=e,f=i._scopes.filter(h=>h!==u);e=[];for(const h of u){const p=la(f,i,t,h);e.push(qi(p,l,o&&o[t],a))}}return e}function ep(t,e,n){return fi(t)?t(e,n):t}const k1=(t,e)=>t===!0?e:typeof t=="string"?Mi(e,t):void 0;function S1(t,e,n,s,i){for(const l of e){const o=k1(n,l);if(o){t.add(o);const a=ep(o._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==s)return a}else if(o===!1&&typeof s<"u"&&n!==s)return null}return!1}function la(t,e,n,s){const i=e._rootScopes,l=ep(e._fallback,n,s),o=[...t,...i],a=new Set;a.add(s);let u=ru(a,o,n,l||n,s);return u===null||typeof l<"u"&&l!==n&&(u=ru(a,o,l,u,s),u===null)?!1:sa(Array.from(a),[""],i,l,()=>E1(e,n,s))}function ru(t,e,n,s,i){for(;n;)n=S1(t,e,n,s,i);return n}function E1(t,e,n){const s=t._getTarget();e in s||(s[e]={});const i=s[e];return xn(i)&&Ot(n)?n:i||{}}function T1(t,e,n,s){let i;for(const l of e)if(i=tp(_1(l,t),n),typeof i<"u")return ia(t,i)?la(n,s,t,i):i}function tp(t,e){for(const n of e){if(!n)continue;const s=n[t];if(typeof s<"u")return s}}function au(t){let e=t._keys;return e||(e=t._keys=M1(t._scopes)),e}function M1(t){const e=new Set;for(const n of t)for(const s of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(s);return Array.from(e)}const C1=Number.EPSILON||1e-14,Gi=(t,e)=>e<t.length&&!t[e].skip&&t[e],np=t=>t==="x"?"y":"x";function P1(t,e,n,s){const i=t.skip?e:t,l=e,o=n.skip?e:n,a=Mr(l,i),u=Mr(o,l);let f=a/(a+u),h=u/(a+u);f=isNaN(f)?0:f,h=isNaN(h)?0:h;const p=s*f,g=s*h;return{previous:{x:l.x-p*(o.x-i.x),y:l.y-p*(o.y-i.y)},next:{x:l.x+g*(o.x-i.x),y:l.y+g*(o.y-i.y)}}}function A1(t,e,n){const s=t.length;let i,l,o,a,u,f=Gi(t,0);for(let h=0;h<s-1;++h)if(u=f,f=Gi(t,h+1),!(!u||!f)){if(ml(e[h],0,C1)){n[h]=n[h+1]=0;continue}i=n[h]/e[h],l=n[h+1]/e[h],a=Math.pow(i,2)+Math.pow(l,2),!(a<=9)&&(o=3/Math.sqrt(a),n[h]=i*o*e[h],n[h+1]=l*o*e[h])}}function x1(t,e,n="x"){const s=np(n),i=t.length;let l,o,a,u=Gi(t,0);for(let f=0;f<i;++f){if(o=a,a=u,u=Gi(t,f+1),!a)continue;const h=a[n],p=a[s];o&&(l=(h-o[n])/3,a[\`cp1\${n}\`]=h-l,a[\`cp1\${s}\`]=p-l*e[f]),u&&(l=(u[n]-h)/3,a[\`cp2\${n}\`]=h+l,a[\`cp2\${s}\`]=p+l*e[f])}}function O1(t,e="x"){const n=np(e),s=t.length,i=Array(s).fill(0),l=Array(s);let o,a,u,f=Gi(t,0);for(o=0;o<s;++o)if(a=u,u=f,f=Gi(t,o+1),!!u){if(f){const h=f[e]-u[e];i[o]=h!==0?(f[n]-u[n])/h:0}l[o]=a?f?Bs(i[o-1])!==Bs(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}A1(t,i,l),x1(t,l,e)}function Yl(t,e,n){return Math.max(Math.min(t,n),e)}function R1(t,e){let n,s,i,l,o,a=Cl(t[0],e);for(n=0,s=t.length;n<s;++n)o=l,l=a,a=n<s-1&&Cl(t[n+1],e),l&&(i=t[n],o&&(i.cp1x=Yl(i.cp1x,e.left,e.right),i.cp1y=Yl(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=Yl(i.cp2x,e.left,e.right),i.cp2y=Yl(i.cp2y,e.top,e.bottom)))}function D1(t,e,n,s,i){let l,o,a,u;if(e.spanGaps&&(t=t.filter(f=>!f.skip)),e.cubicInterpolationMode==="monotone")O1(t,i);else{let f=s?t[t.length-1]:t[0];for(l=0,o=t.length;l<o;++l)a=t[l],u=P1(f,a,t[Math.min(l+1,o-(s?0:1))%o],e.tension),a.cp1x=u.previous.x,a.cp1y=u.previous.y,a.cp2x=u.next.x,a.cp2y=u.next.y,f=a}e.capBezierPoints&&R1(t,n)}function oa(){return typeof window<"u"&&typeof document<"u"}function ra(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function ko(t,e,n){let s;return typeof t=="string"?(s=parseInt(t,10),t.indexOf("%")!==-1&&(s=s/100*e.parentNode[n])):s=t,s}const Oo=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function L1(t,e){return Oo(t).getPropertyValue(e)}const H1=["top","right","bottom","left"];function Ti(t,e,n){const s={};n=n?"-"+n:"";for(let i=0;i<4;i++){const l=H1[i];s[l]=parseFloat(t[e+"-"+l+n])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}const I1=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function B1(t,e){const n=t.touches,s=n&&n.length?n[0]:t,{offsetX:i,offsetY:l}=s;let o=!1,a,u;if(I1(i,l,t.target))a=i,u=l;else{const f=e.getBoundingClientRect();a=s.clientX-f.left,u=s.clientY-f.top,o=!0}return{x:a,y:u,box:o}}function yi(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:s}=e,i=Oo(n),l=i.boxSizing==="border-box",o=Ti(i,"padding"),a=Ti(i,"border","width"),{x:u,y:f,box:h}=B1(t,n),p=o.left+(h&&a.left),g=o.top+(h&&a.top);let{width:m,height:b}=e;return l&&(m-=o.width+a.width,b-=o.height+a.height),{x:Math.round((u-p)/m*n.width/s),y:Math.round((f-g)/b*n.height/s)}}function F1(t,e,n){let s,i;if(e===void 0||n===void 0){const l=t&&ra(t);if(!l)e=t.clientWidth,n=t.clientHeight;else{const o=l.getBoundingClientRect(),a=Oo(l),u=Ti(a,"border","width"),f=Ti(a,"padding");e=o.width-f.width-u.width,n=o.height-f.height-u.height,s=ko(a.maxWidth,l,"clientWidth"),i=ko(a.maxHeight,l,"clientHeight")}}return{width:e,height:n,maxWidth:s||yo,maxHeight:i||yo}}const Jl=t=>Math.round(t*10)/10;function N1(t,e,n,s){const i=Oo(t),l=Ti(i,"margin"),o=ko(i.maxWidth,t,"clientWidth")||yo,a=ko(i.maxHeight,t,"clientHeight")||yo,u=F1(t,e,n);let{width:f,height:h}=u;if(i.boxSizing==="content-box"){const g=Ti(i,"border","width"),m=Ti(i,"padding");f-=m.width+g.width,h-=m.height+g.height}return f=Math.max(0,f-l.width),h=Math.max(0,s?f/s:h-l.height),f=Jl(Math.min(f,o,u.maxWidth)),h=Jl(Math.min(h,a,u.maxHeight)),f&&!h&&(h=Jl(f/2)),(e!==void 0||n!==void 0)&&s&&u.height&&h>u.height&&(h=u.height,f=Jl(Math.floor(h*s))),{width:f,height:h}}function uu(t,e,n){const s=e||1,i=Math.floor(t.height*s),l=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=\`\${t.height}px\`,o.style.width=\`\${t.width}px\`),t.currentDevicePixelRatio!==s||o.height!==i||o.width!==l?(t.currentDevicePixelRatio=s,o.height=i,o.width=l,t.ctx.setTransform(s,0,0,s,0,0),!0):!1}const j1=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};oa()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function cu(t,e){const n=L1(t,e),s=n&&n.match(/^(\\d+)(\\.\\d+)?px$/);return s?+s[1]:void 0}function wi(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function z1(t,e,n,s){return{x:t.x+n*(e.x-t.x),y:s==="middle"?n<.5?t.y:e.y:s==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function U1(t,e,n,s){const i={x:t.cp2x,y:t.cp2y},l={x:e.cp1x,y:e.cp1y},o=wi(t,i,n),a=wi(i,l,n),u=wi(l,e,n),f=wi(o,a,n),h=wi(a,u,n);return wi(f,h,n)}const V1=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,s){return n-s},leftForLtr(n,s){return n-s}}},W1=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ji(t,e,n){return t?V1(e,n):W1()}function sp(t,e){let n,s;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,s=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=s)}function ip(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function lp(t){return t==="angle"?{between:Ml,compare:Vm,normalize:Ms}:{between:ii,compare:(e,n)=>e-n,normalize:e=>e}}function fu({start:t,end:e,count:n,loop:s,style:i}){return{start:t%n,end:e%n,loop:s&&(e-t+1)%n===0,style:i}}function q1(t,e,n){const{property:s,start:i,end:l}=n,{between:o,normalize:a}=lp(s),u=e.length;let{start:f,end:h,loop:p}=t,g,m;if(p){for(f+=u,h+=u,g=0,m=u;g<m&&o(a(e[f%u][s]),i,l);++g)f--,h--;f%=u,h%=u}return h<f&&(h+=u),{start:f,end:h,loop:p,style:t.style}}function G1(t,e,n){if(!n)return[t];const{property:s,start:i,end:l}=n,o=e.length,{compare:a,between:u,normalize:f}=lp(s),{start:h,end:p,loop:g,style:m}=q1(t,e,n),b=[];let _=!1,y=null,k,w,S;const P=()=>u(i,S,k)&&a(i,S)!==0,M=()=>a(l,k)===0||u(l,S,k),x=()=>_||P(),A=()=>!_||M();for(let O=h,C=h;O<=p;++O)w=e[O%o],!w.skip&&(k=f(w[s]),k!==S&&(_=u(k,i,l),y===null&&x()&&(y=a(k,i)===0?O:C),y!==null&&A()&&(b.push(fu({start:y,end:O,loop:g,count:o,style:m})),y=null),C=O,S=k));return y!==null&&b.push(fu({start:y,end:p,loop:g,count:o,style:m})),b}function X1(t,e){const n=[],s=t.segments;for(let i=0;i<s.length;i++){const l=G1(s[i],t.points,e);l.length&&n.push(...l)}return n}function Y1(t,e,n,s){let i=0,l=e-1;if(n&&!s)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(l+=i);l>i&&t[l%e].skip;)l--;return l%=e,{start:i,end:l}}function J1(t,e,n,s){const i=t.length,l=[];let o=e,a=t[e],u;for(u=e+1;u<=n;++u){const f=t[u%i];f.skip||f.stop?a.skip||(s=!1,l.push({start:e%i,end:(u-1)%i,loop:s}),e=o=f.stop?u:null):(o=u,a.skip&&(e=u)),a=f}return o!==null&&l.push({start:e%i,end:o%i,loop:s}),l}function K1(t,e){const n=t.points,s=t.options.spanGaps,i=n.length;if(!i)return[];const l=!!t._loop,{start:o,end:a}=Y1(n,i,l,s);if(s===!0)return hu(t,[{start:o,end:a,loop:l}],n,e);const u=a<o?a+i:a,f=!!t._fullLoop&&o===0&&a===i-1;return hu(t,J1(n,o,u,f),n,e)}function hu(t,e,n,s){return!s||!s.setContext||!n?e:Z1(t,e,n,s)}function Z1(t,e,n,s){const i=t._chart.getContext(),l=du(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,u=n.length,f=[];let h=l,p=e[0].start,g=p;function m(b,_,y,k){const w=a?-1:1;if(b!==_){for(b+=u;n[b%u].skip;)b-=w;for(;n[_%u].skip;)_+=w;b%u!==_%u&&(f.push({start:b%u,end:_%u,loop:y,style:k}),h=k,p=_%u)}}for(const b of e){p=a?p:b.start;let _=n[p%u],y;for(g=p+1;g<=b.end;g++){const k=n[g%u];y=du(s.setContext(xi(i,{type:"segment",p0:_,p1:k,p0DataIndex:(g-1)%u,p1DataIndex:g%u,datasetIndex:o}))),Q1(y,h)&&m(p,g-1,b.loop,h),_=k,h=y}p<g-1&&m(p,g-1,b.loop,h)}return f}function du(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Q1(t,e){if(!e)return!1;const n=[],s=function(i,l){return Qr(l)?(n.includes(l)||n.push(l),n.indexOf(l)):l};return JSON.stringify(t,s)!==JSON.stringify(e,s)}function Kl(t,e,n){return t.options.clip?t[n]:e[n]}function $1(t,e){const{xScale:n,yScale:s}=t;return n&&s?{left:Kl(n,e,"left"),right:Kl(n,e,"right"),top:Kl(s,e,"top"),bottom:Kl(s,e,"bottom")}:e}function eb(t,e){const n=e._clip;if(n.disabled)return!1;const s=$1(e,t.chartArea);return{left:n.left===!1?0:s.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:s.right+(n.right===!0?0:n.right),top:n.top===!1?0:s.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:s.bottom+(n.bottom===!0?0:n.bottom)}}/*!
21207
21208
  * Chart.js v4.5.0
21208
21209
  * https://www.chartjs.org
21209
21210
  * (c) 2025 Chart.js Contributors
21210
21211
  * Released under the MIT License
21211
- */class Q1{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,s,i){const l=n.listeners[i],o=n.duration;l.forEach(r=>r({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(s-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Ud.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const l=s.items;let o=l.length-1,r=!1,u;for(;o>=0;--o)u=l[o],u._active?(u._total>s.duration&&(s.duration=u._total),u.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(i.draw(),this._notify(i,s,e,"progress")),l.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),n+=l.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let s=n.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,s)),s}listen(e,n,s){this._getAnims(e).listeners[n].push(s)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Us=new Q1;const cu="transparent",$1={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const s=$a(t||cu),i=s.valid&&$a(e||cu);return i&&i.valid?i.mix(s,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class eb{constructor(e,n,s,i){const l=n[s];i=Gl([e.to,i,l,e.from]);const o=Gl([e.from,l,i]);this._active=!0,this._fn=e.fn||$1[e.type||typeof o],this._easing=bl[e.easing]||bl.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=s,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],l=s-this._start,o=this._duration-l;this._start=s,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Gl([e.to,n,i,e.from]),this._from=Gl([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,s=this._duration,i=this._prop,l=this._from,o=this._loop,r=this._to;let u;if(this._active=l!==r&&(o||n<s),!this._active){this._target[i]=r,this._notify(!0);return}if(n<0){this._target[i]=l;return}u=n/s%2,u=o&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(l,r,u)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,s)=>{e.push({res:n,rej:s})})}_notify(e){const n=e?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class tp{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Tt(e))return;const n=Object.keys(Sn.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const l=e[i];if(!Tt(l))return;const o={};for(const r of n)o[r]=l[r];(On(l.properties)&&l.properties||[i]).forEach(r=>{(r===i||!s.has(r))&&s.set(r,o)})})}_animateOptions(e,n){const s=n.options,i=nb(e,s);if(!i)return[];const l=this._createAnimations(i,s);return s.$shared&&tb(e.options.$animations,s).then(()=>{e.options=s},()=>{}),l}_createAnimations(e,n){const s=this._properties,i=[],l=e.$animations||(e.$animations={}),o=Object.keys(n),r=Date.now();let u;for(u=o.length-1;u>=0;--u){const f=o[u];if(f.charAt(0)==="$")continue;if(f==="options"){i.push(...this._animateOptions(e,n));continue}const h=n[f];let p=l[f];const g=s.get(f);if(p)if(g&&p.active()){p.update(g,h,r);continue}else p.cancel();if(!g||!g.duration){e[f]=h;continue}l[f]=p=new eb(g,e,f,h),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const s=this._createAnimations(e,n);if(s.length)return Us.add(this._chart,s),!0}}function tb(t,e){const n=[],s=Object.keys(e);for(let i=0;i<s.length;i++){const l=t[s[i]];l&&l.active()&&n.push(l.wait())}return Promise.all(n)}function nb(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function fu(t,e){const n=t&&t.options||{},s=n.reverse,i=n.min===void 0?e:0,l=n.max===void 0?e:0;return{start:s?l:i,end:s?i:l}}function sb(t,e,n){if(n===!1)return!1;const s=fu(t,n),i=fu(e,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}function ib(t){let e,n,s,i;return Tt(t)?(e=t.top,n=t.right,s=t.bottom,i=t.left):e=n=s=i=t,{top:e,right:n,bottom:s,left:i,disabled:t===!1}}function np(t,e){const n=[],s=t._getSortedDatasetMetas(e);let i,l;for(i=0,l=s.length;i<l;++i)n.push(s[i].index);return n}function hu(t,e,n,s={}){const i=t.keys,l=s.mode==="single";let o,r,u,f;if(e===null)return;let h=!1;for(o=0,r=i.length;o<r;++o){if(u=+i[o],u===n){if(h=!0,s.all)continue;break}f=t.values[u],Es(f)&&(l||e===0||Bs(e)===Bs(f))&&(e+=f)}return!h&&!s.all?0:e}function lb(t,e){const{iScale:n,vScale:s}=e,i=n.axis==="x"?"x":"y",l=s.axis==="x"?"x":"y",o=Object.keys(t),r=new Array(o.length);let u,f,h;for(u=0,f=o.length;u<f;++u)h=o[u],r[u]={[i]:h,[l]:t[h]};return r}function Zo(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function ob(t,e,n){return\`\${t.id}.\${e.id}.\${n.stack||n.type}\`}function rb(t){const{min:e,max:n,minDefined:s,maxDefined:i}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function ab(t,e,n){const s=t[e]||(t[e]={});return s[n]||(s[n]={})}function du(t,e,n,s){for(const i of e.getMatchingVisibleMetas(s).reverse()){const l=t[i.index];if(n&&l>0||!n&&l<0)return i.index}return null}function pu(t,e){const{chart:n,_cachedMeta:s}=t,i=n._stacks||(n._stacks={}),{iScale:l,vScale:o,index:r}=s,u=l.axis,f=o.axis,h=ob(l,o,s),p=e.length;let g;for(let m=0;m<p;++m){const _=e[m],{[u]:b,[f]:k}=_,v=_._stacks||(_._stacks={});g=v[f]=ab(i,h,b),g[r]=k,g._top=du(g,o,!0,s.type),g._bottom=du(g,o,!1,s.type);const y=g._visualValues||(g._visualValues={});y[r]=k}}function Qo(t,e){const n=t.scales;return Object.keys(n).filter(s=>n[s].axis===e).shift()}function ub(t,e){return Oi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function cb(t,e,n){return Oi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function el(t,e){const n=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const i of e){const l=i._stacks;if(!l||l[s]===void 0||l[s][n]===void 0)return;delete l[s][n],l[s]._visualValues!==void 0&&l[s]._visualValues[n]!==void 0&&delete l[s]._visualValues[n]}}}const $o=t=>t==="reset"||t==="none",gu=(t,e)=>e?t:Object.assign({},t),fb=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:np(n,!0),values:null};class Oo{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Zo(e.vScale,e),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(e){this.index!==e&&el(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(p,g,m,_)=>p==="x"?g:p==="r"?_:m,l=n.xAxisID=dt(s.xAxisID,Qo(e,"x")),o=n.yAxisID=dt(s.yAxisID,Qo(e,"y")),r=n.rAxisID=dt(s.rAxisID,Qo(e,"r")),u=n.indexAxis,f=n.iAxisID=i(u,l,o,r),h=n.vAxisID=i(u,o,l,r);n.xScale=this.getScaleForId(l),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(r),n.iScale=this.getScaleForId(f),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ka(this._data,this),e._stacked&&el(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),s=this._data;if(Tt(n)){const i=this._cachedMeta;this._data=lb(n,i)}else if(s!==n){if(s){Ka(s,this);const i=this._cachedMeta;el(i),i._parsed=[]}n&&Object.isExtensible(n)&&Wm(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const l=n._stacked;n._stacked=Zo(n.vScale,n),n.stack!==s.stack&&(i=!0,el(n),n.stack=s.stack),this._resyncElements(e),(i||l!==n._stacked)&&(pu(this,n._parsed),n._stacked=Zo(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:s,_data:i}=this,{iScale:l,_stacked:o}=s,r=l.axis;let u=e===0&&n===i.length?!0:s._sorted,f=e>0&&s._parsed[e-1],h,p,g;if(this._parsing===!1)s._parsed=i,s._sorted=!0,g=i;else{On(i[e])?g=this.parseArrayData(s,i,e,n):Tt(i[e])?g=this.parseObjectData(s,i,e,n):g=this.parsePrimitiveData(s,i,e,n);const m=()=>p[r]===null||f&&p[r]<f[r];for(h=0;h<n;++h)s._parsed[h+e]=p=g[h],u&&(m()&&(u=!1),f=p);s._sorted=u}o&&pu(this,g)}parsePrimitiveData(e,n,s,i){const{iScale:l,vScale:o}=e,r=l.axis,u=o.axis,f=l.getLabels(),h=l===o,p=new Array(i);let g,m,_;for(g=0,m=i;g<m;++g)_=g+s,p[g]={[r]:h||l.parse(f[_],_),[u]:o.parse(n[_],_)};return p}parseArrayData(e,n,s,i){const{xScale:l,yScale:o}=e,r=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+s,p=n[h],r[u]={x:l.parse(p[0],h),y:o.parse(p[1],h)};return r}parseObjectData(e,n,s,i){const{xScale:l,yScale:o}=e,{xAxisKey:r="x",yAxisKey:u="y"}=this._parsing,f=new Array(i);let h,p,g,m;for(h=0,p=i;h<p;++h)g=h+s,m=n[g],f[h]={x:l.parse(Mi(m,r),g),y:o.parse(Mi(m,u),g)};return f}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,s){const i=this.chart,l=this._cachedMeta,o=n[e.axis],r={keys:np(i,!0),values:n._stacks[e.axis]._visualValues};return hu(r,o,l.index,{mode:s})}updateRangeFromParsed(e,n,s,i){const l=s[n.axis];let o=l===null?NaN:l;const r=i&&s._stacks[n.axis];i&&r&&(i.values=r,o=hu(i,l,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const s=this._cachedMeta,i=s._parsed,l=s._sorted&&e===s.iScale,o=i.length,r=this._getOtherScale(e),u=fb(n,s,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=rb(r);let g,m;function _(){m=i[g];const b=m[r.axis];return!Es(m[e.axis])||h>b||p<b}for(g=0;g<o&&!(!_()&&(this.updateRangeFromParsed(f,e,m,u),l));++g);if(l){for(g=o-1;g>=0;--g)if(!_()){this.updateRangeFromParsed(f,e,m,u);break}}return f}getAllParsedValues(e){const n=this._cachedMeta._parsed,s=[];let i,l,o;for(i=0,l=n.length;i<l;++i)o=n[i][e.axis],Es(o)&&s.push(o);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,s=n.iScale,i=n.vScale,l=this.getParsed(e);return{label:s?""+s.getLabelForValue(l[s.axis]):"",value:i?""+i.getLabelForValue(l[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=ib(dt(this.options.clip,sb(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,s=this._cachedMeta,i=s.data||[],l=n.chartArea,o=[],r=this._drawStart||0,u=this._drawCount||i.length-r,f=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(e,l,r,u),h=r;h<r+u;++h){const p=i[h];p.hidden||(p.active&&f?o.push(p):p.draw(e,l))}for(h=0;h<o.length;++h)o[h].draw(e,l)}getStyle(e,n){const s=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,n,s){const i=this.getDataset();let l;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];l=o.$context||(o.$context=cb(this.getContext(),e,o)),l.parsed=this.getParsed(e),l.raw=i.data[e],l.index=l.dataIndex=e}else l=this.$context||(this.$context=ub(this.chart.getContext(),this.index)),l.dataset=i,l.index=l.datasetIndex=this.index;return l.active=!!n,l.mode=s,l}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",s){const i=n==="active",l=this._cachedDataOpts,o=e+"-"+n,r=l[o],u=this.enableOptionSharing&&Sl(s);if(r)return gu(r,u);const f=this.chart.config,h=f.datasetElementScopeKeys(this._type,e),p=i?[\`\${e}Hover\`,"hover",e,""]:[e,""],g=f.getOptionScopes(this.getDataset(),h),m=Object.keys(Sn.elements[e]),_=()=>this.getContext(s,i,n),b=f.resolveNamedOptions(g,m,_,p);return b.$shared&&(b.$shared=u,l[o]=Object.freeze(gu(b,u))),b}_resolveAnimations(e,n,s){const i=this.chart,l=this._cachedDataOpts,o=\`animation-\${n}\`,r=l[o];if(r)return r;let u;if(i.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,n),g=h.getOptionScopes(this.getDataset(),p);u=h.createResolver(g,this.getContext(e,s,n))}const f=new tp(i,u&&u.animations);return u&&u._cacheable&&(l[o]=Object.freeze(f)),f}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||$o(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const s=this.resolveDataElementOptions(e,n),i=this._sharedOptions,l=this.getSharedOptions(s),o=this.includeOptions(n,l)||l!==i;return this.updateSharedOptions(l,n,s),{sharedOptions:l,includeOptions:o}}updateElement(e,n,s,i){$o(i)?Object.assign(e,s):this._resolveAnimations(n,i).update(e,s)}updateSharedOptions(e,n,s){e&&!$o(n)&&this._resolveAnimations(void 0,n).update(e,s)}_setStyle(e,n,s,i){e.active=i;const l=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(e,{options:!i&&this.getSharedOptions(l)||l})}removeHoverStyle(e,n,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,n,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,s=this._cachedMeta.data;for(const[r,u,f]of this._syncList)this[r](u,f);this._syncList=[];const i=s.length,l=n.length,o=Math.min(l,i);o&&this.parse(0,o),l>i?this._insertElements(i,l-i,e):l<i&&this._removeElements(l,i-l)}_insertElements(e,n,s=!0){const i=this._cachedMeta,l=i.data,o=e+n;let r;const u=f=>{for(f.length+=n,r=f.length-1;r>=o;r--)f[r]=f[r-n]};for(u(l),r=e;r<o;++r)l[r]=new this.dataElementType;this._parsing&&u(i._parsed),this.parse(e,n),s&&this.updateElements(l,e,n,"reset")}updateElements(e,n,s,i){}_removeElements(e,n){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(e,n);s._stacked&&el(s,i)}s.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,s,i]=e;this[n](s,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function hb(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let s=[];for(let i=0,l=n.length;i<l;i++)s=s.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=zd(s.sort((i,l)=>i-l))}return t._cache.$bar}function db(t){const e=t.iScale,n=hb(e,t.type);let s=e._length,i,l,o,r;const u=()=>{o===32767||o===-32768||(Sl(r)&&(s=Math.min(s,Math.abs(o-r)||s)),r=o)};for(i=0,l=n.length;i<l;++i)o=e.getPixelForValue(n[i]),u();for(r=void 0,i=0,l=e.ticks.length;i<l;++i)o=e.getPixelForTick(i),u();return s}function pb(t,e,n,s){const i=n.barThickness;let l,o;return Dt(i)?(l=e.min*n.categoryPercentage,o=n.barPercentage):(l=i*s,o=1),{chunk:l/s,ratio:o,start:e.pixels[t]-l/2}}function gb(t,e,n,s){const i=e.pixels,l=i[t];let o=t>0?i[t-1]:null,r=t<i.length-1?i[t+1]:null;const u=n.categoryPercentage;o===null&&(o=l-(r===null?e.end-e.start:r-l)),r===null&&(r=l+l-o);const f=l-(l-Math.min(o,r))/2*u;return{chunk:Math.abs(r-o)/2*u/s,ratio:n.barPercentage,start:f}}function mb(t,e,n,s){const i=n.parse(t[0],s),l=n.parse(t[1],s),o=Math.min(i,l),r=Math.max(i,l);let u=o,f=r;Math.abs(o)>Math.abs(r)&&(u=r,f=o),e[n.axis]=f,e._custom={barStart:u,barEnd:f,start:i,end:l,min:o,max:r}}function sp(t,e,n,s){return On(t)?mb(t,e,n,s):e[n.axis]=n.parse(t,s),e}function mu(t,e,n,s){const i=t.iScale,l=t.vScale,o=i.getLabels(),r=i===l,u=[];let f,h,p,g;for(f=n,h=n+s;f<h;++f)g=e[f],p={},p[i.axis]=r||i.parse(o[f],f),u.push(sp(g,p,l,f));return u}function er(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function bb(t,e,n){return t!==0?Bs(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function _b(t){let e,n,s,i,l;return t.horizontal?(e=t.base>t.x,n="left",s="right"):(e=t.base<t.y,n="bottom",s="top"),e?(i="end",l="start"):(i="start",l="end"),{start:n,end:s,reverse:e,top:i,bottom:l}}function vb(t,e,n,s){let i=e.borderSkipped;const l={};if(!i){t.borderSkipped=l;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:r,reverse:u,top:f,bottom:h}=_b(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===s?i=f:(n._bottom||0)===s?i=h:(l[bu(h,o,r,u)]=!0,i=f)),l[bu(i,o,r,u)]=!0,t.borderSkipped=l}function bu(t,e,n,s){return s?(t=yb(t,e,n),t=_u(t,n,e)):t=_u(t,e,n),t}function yb(t,e,n){return t===e?n:t===n?e:t}function _u(t,e,n){return t==="start"?e:t==="end"?n:t}function wb(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class kb extends Oo{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(e,n,s,i){return mu(e,n,s,i)}parseArrayData(e,n,s,i){return mu(e,n,s,i)}parseObjectData(e,n,s,i){const{iScale:l,vScale:o}=e,{xAxisKey:r="x",yAxisKey:u="y"}=this._parsing,f=l.axis==="x"?r:u,h=o.axis==="x"?r:u,p=[];let g,m,_,b;for(g=s,m=s+i;g<m;++g)b=n[g],_={},_[l.axis]=l.parse(Mi(b,f),g),p.push(sp(Mi(b,h),_,o,g));return p}updateRangeFromParsed(e,n,s,i){super.updateRangeFromParsed(e,n,s,i);const l=s._custom;l&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,l.min),e.max=Math.max(e.max,l.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:s,vScale:i}=n,l=this.getParsed(e),o=l._custom,r=er(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(l[i.axis]);return{label:""+s.getLabelForValue(l[s.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,s,i){const l=i==="reset",{index:o,_cachedMeta:{vScale:r}}=this,u=r.getBasePixel(),f=r.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);for(let m=n;m<n+s;m++){const _=this.getParsed(m),b=l||Dt(_[r.axis])?{base:u,head:u}:this._calculateBarValuePixels(m),k=this._calculateBarIndexPixels(m,h),v=(_._stacks||{})[r.axis],y={horizontal:f,base:b.base,enableBorderRadius:!v||er(_._custom)||o===v._top||o===v._bottom,x:f?b.head:k.center,y:f?k.center:b.head,height:f?k.size:Math.abs(b.size),width:f?Math.abs(b.size):k.size};g&&(y.options=p||this.resolveDataElementOptions(m,e[m].active?"active":i));const S=y.options||e[m].options;vb(y,S,v,o),wb(y,S,h.ratio),this.updateElement(e[m],m,y,i)}}_getStacks(e,n){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),l=s.options.stacked,o=[],r=this._cachedMeta.controller.getParsed(n),u=r&&r[s.axis],f=h=>{const p=h._parsed.find(m=>m[s.axis]===u),g=p&&p[h.vScale.axis];if(Dt(g)||isNaN(g))return!0};for(const h of i)if(!(n!==void 0&&f(h))&&((l===!1||o.indexOf(h.stack)===-1||l===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(s=>e[s].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)e[dt(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,s){const i=this._getStacks(e,s),l=n!==void 0?i.indexOf(n):-1;return l===-1?i.length-1:l}_getRuler(){const e=this.options,n=this._cachedMeta,s=n.iScale,i=[];let l,o;for(l=0,o=n.data.length;l<o;++l)i.push(s.getPixelForValue(this.getParsed(l)[s.axis],l));const r=e.barThickness;return{min:r||db(n),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:r?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:s,index:i},options:{base:l,minBarLength:o}}=this,r=l||0,u=this.getParsed(e),f=u._custom,h=er(f);let p=u[n.axis],g=0,m=s?this.applyStack(n,u,s):p,_,b;m!==p&&(g=m-p,m=p),h&&(p=f.barStart,m=f.barEnd-f.barStart,p!==0&&Bs(p)!==Bs(f.barEnd)&&(g=0),g+=p);const k=!Dt(l)&&!h?l:g;let v=n.getPixelForValue(k);if(this.chart.getDataVisibility(e)?_=n.getPixelForValue(g+m):_=v,b=_-v,Math.abs(b)<o){b=bb(b,n,r)*o,p===r&&(v-=b/2);const y=n.getPixelForDecimal(0),S=n.getPixelForDecimal(1),C=Math.min(y,S),T=Math.max(y,S);v=Math.max(Math.min(v,T),C),_=v+b,s&&!h&&(u._stacks[n.axis]._visualValues[i]=n.getValueForPixel(_)-n.getValueForPixel(v))}if(v===n.getPixelForValue(r)){const y=Bs(b)*n.getLineWidthForValue(r)/2;v+=y,b-=y}return{size:b,base:v,head:_,center:_+b/2}}_calculateBarIndexPixels(e,n){const s=n.scale,i=this.options,l=i.skipNull,o=dt(i.maxBarThickness,1/0);let r,u;const f=this._getAxisCount();if(n.grouped){const h=l?this._getStackCount(e):n.stackCount,p=i.barThickness==="flex"?gb(e,n,i,h*f):pb(e,n,i,h*f),g=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(dt(g,this.getFirstScaleIdForIndexAxis())),_=this._getStackIndex(this.index,this._cachedMeta.stack,l?e:void 0)+m;r=p.start+p.chunk*_+p.chunk/2,u=Math.min(o,p.chunk*p.ratio)}else r=s.getPixelForValue(this.getParsed(e)[s.axis],e),u=Math.min(o,n.min*n.ratio);return{base:r-u/2,head:r+u/2,center:r,size:u}}draw(){const e=this._cachedMeta,n=e.vScale,s=e.data,i=s.length;let l=0;for(;l<i;++l)this.getParsed(l)[n.axis]!==null&&!s[l].hidden&&s[l].draw(this._ctx)}}function Sb(t,e,n){let s=1,i=1,l=0,o=0;if(e<yn){const r=t,u=r+e,f=Math.cos(r),h=Math.sin(r),p=Math.cos(u),g=Math.sin(u),m=(S,C,T)=>Tl(S,r,u,!0)?1:Math.max(C,C*n,T,T*n),_=(S,C,T)=>Tl(S,r,u,!0)?-1:Math.min(C,C*n,T,T*n),b=m(0,f,p),k=m(xn,h,g),v=_(Nt,f,p),y=_(Nt+xn,h,g);s=(b-v)/2,i=(k-y)/2,l=-(b+v)/2,o=-(k+y)/2}return{ratioX:s,ratioY:i,offsetX:l,offsetY:o}}class Eb extends Oo{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:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((l,o)=>{const u=e.getDatasetMeta(0).controller.getStyle(o);return{text:l,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:i,lineWidth:u.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let l=u=>+s[u];if(Tt(s[e])){const{key:u="value"}=this._parsing;l=f=>+Mi(s[f],u)}let o,r;for(o=e,r=e+n;o<r;++o)i._parsed[o]=l(o)}}_getRotation(){return qs(this.options.rotation-90)}_getCircumference(){return qs(this.options.circumference)}_getRotationExtents(){let e=yn,n=-yn;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,l=i._getRotation(),o=i._getCircumference();e=Math.min(e,l),n=Math.max(n,l+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:s}=n,i=this._cachedMeta,l=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(l)+this.options.spacing,r=Math.max((Math.min(s.width,s.height)-o)/2,0),u=Math.min(Cm(this.options.cutout,r),1),f=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:g,ratioY:m,offsetX:_,offsetY:b}=Sb(p,h,u),k=(s.width-o)/g,v=(s.height-o)/m,y=Math.max(Math.min(k,v)/2,0),S=Id(this.options.radius,y),C=Math.max(S*u,0),T=(S-C)/this._getVisibleDatasetWeightTotal();this.offsetX=_*S,this.offsetY=b*S,i.total=this.calculateTotal(),this.outerRadius=S-T*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-T*f,0),this.updateElements(l,0,l.length,e)}_circumference(e,n){const s=this.options,i=this._cachedMeta,l=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*l/yn)}updateElements(e,n,s,i){const l=i==="reset",o=this.chart,r=o.chartArea,f=o.options.animation,h=(r.left+r.right)/2,p=(r.top+r.bottom)/2,g=l&&f.animateScale,m=g?0:this.innerRadius,_=g?0:this.outerRadius,{sharedOptions:b,includeOptions:k}=this._getSharedOptions(n,i);let v=this._getRotation(),y;for(y=0;y<n;++y)v+=this._circumference(y,l);for(y=n;y<n+s;++y){const S=this._circumference(y,l),C=e[y],T={x:h+this.offsetX,y:p+this.offsetY,startAngle:v,endAngle:v+S,circumference:S,outerRadius:_,innerRadius:m};k&&(T.options=b||this.resolveDataElementOptions(y,C.active?"active":i)),v+=S,this.updateElement(C,y,T,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let s=0,i;for(i=0;i<n.length;i++){const l=e._parsed[i];l!==null&&!isNaN(l)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(s+=Math.abs(l))}return s}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?yn*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],l=Kr(n._parsed[e],s.options.locale);return{label:i[e]||"",value:l}}getMaxBorderWidth(e){let n=0;const s=this.chart;let i,l,o,r,u;if(!e){for(i=0,l=s.data.datasets.length;i<l;++i)if(s.isDatasetVisible(i)){o=s.getDatasetMeta(i),e=o.data,r=o.controller;break}}if(!e)return 0;for(i=0,l=e.length;i<l;++i)u=r.resolveDataElementOptions(i),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let s=0,i=e.length;s<i;++s){const l=this.resolveDataElementOptions(s);n=Math.max(n,l.offset||0,l.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(e){return Math.max(dt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Tb extends Oo{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(e){const n=this._cachedMeta,{dataset:s,data:i=[],_dataset:l}=n,o=this.chart._animationsDisabled;let{start:r,count:u}=Xm(n,i,o);this._drawStart=r,this._drawCount=u,Ym(n)&&(r=0,u=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=i;const f=this.resolveDatasetElementOptions(e);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:f},e),this.updateElements(i,r,u,e)}updateElements(e,n,s,i){const l=i==="reset",{iScale:o,vScale:r,_stacked:u,_dataset:f}=this._cachedMeta,{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i),g=o.axis,m=r.axis,{spanGaps:_,segment:b}=this.options,k=El(_)?_:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||l||i==="none",y=n+s,S=e.length;let C=n>0&&this.getParsed(n-1);for(let T=0;T<S;++T){const O=e[T],A=v?O:{};if(T<n||T>=y){A.skip=!0;continue}const x=this.getParsed(T),P=Dt(x[m]),D=A[g]=o.getPixelForValue(x[g],T),I=A[m]=l||P?r.getBasePixel():r.getPixelForValue(u?this.applyStack(r,x,u):x[m],T);A.skip=isNaN(D)||isNaN(I)||P,A.stop=T>0&&Math.abs(x[g]-C[g])>k,b&&(A.parsed=x,A.raw=f.data[T]),p&&(A.options=h||this.resolveDataElementOptions(T,O.active?"active":i)),v||this.updateElement(O,T,A,i),C=x}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,s=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const l=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function vi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class la{static override(e){Object.assign(la.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return vi()}parse(){return vi()}format(){return vi()}add(){return vi()}diff(){return vi()}startOf(){return vi()}endOf(){return vi()}}var Mb={_date:la};function Cb(t,e,n,s){const{controller:i,data:l,_sorted:o}=t,r=i._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const f=r._reversePixels?Um:Si;if(s){if(i._sharedOptions){const h=l[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const g=f(l,e,n-p),m=f(l,e,n+p);return{lo:g.lo,hi:m.hi}}}}else{const h=f(l,e,n);if(u){const{vScale:p}=i._cachedMeta,{_parsed:g}=t,m=g.slice(0,h.lo+1).reverse().findIndex(b=>!Dt(b[p.axis]));h.lo-=Math.max(0,m);const _=g.slice(h.hi).findIndex(b=>!Dt(b[p.axis]));h.hi+=Math.max(0,_)}return h}}return{lo:0,hi:l.length-1}}function xo(t,e,n,s,i){const l=t.getSortedVisibleDatasetMetas(),o=n[e];for(let r=0,u=l.length;r<u;++r){const{index:f,data:h}=l[r],{lo:p,hi:g}=Cb(l[r],e,o,i);for(let m=p;m<=g;++m){const _=h[m];_.skip||s(_,f,m)}}}function Pb(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(s,i){const l=e?Math.abs(s.x-i.x):0,o=n?Math.abs(s.y-i.y):0;return Math.sqrt(Math.pow(l,2)+Math.pow(o,2))}}function tr(t,e,n,s,i){const l=[];return!i&&!t.isPointInArea(e)||xo(t,n,e,function(r,u,f){!i&&!Ml(r,t.chartArea,0)||r.inRange(e.x,e.y,s)&&l.push({element:r,datasetIndex:u,index:f})},!0),l}function Ab(t,e,n,s){let i=[];function l(o,r,u){const{startAngle:f,endAngle:h}=o.getProps(["startAngle","endAngle"],s),{angle:p}=Nd(o,{x:e.x,y:e.y});Tl(p,f,h)&&i.push({element:o,datasetIndex:r,index:u})}return xo(t,n,e,l),i}function Ob(t,e,n,s,i,l){let o=[];const r=Pb(n);let u=Number.POSITIVE_INFINITY;function f(h,p,g){const m=h.inRange(e.x,e.y,i);if(s&&!m)return;const _=h.getCenterPoint(i);if(!(!!l||t.isPointInArea(_))&&!m)return;const k=r(e,_);k<u?(o=[{element:h,datasetIndex:p,index:g}],u=k):k===u&&o.push({element:h,datasetIndex:p,index:g})}return xo(t,n,e,f),o}function nr(t,e,n,s,i,l){return!l&&!t.isPointInArea(e)?[]:n==="r"&&!s?Ab(t,e,n,i):Ob(t,e,n,s,i,l)}function vu(t,e,n,s,i){const l=[],o=n==="x"?"inXRange":"inYRange";let r=!1;return xo(t,n,e,(u,f,h)=>{u[o]&&u[o](e[n],i)&&(l.push({element:u,datasetIndex:f,index:h}),r=r||u.inRange(e.x,e.y,i))}),s&&!r?[]:l}var xb={modes:{index(t,e,n,s){const i=yi(e,t),l=n.axis||"x",o=n.includeInvisible||!1,r=n.intersect?tr(t,i,l,s,o):nr(t,i,l,!1,s,o),u=[];return r.length?(t.getSortedVisibleDatasetMetas().forEach(f=>{const h=r[0].index,p=f.data[h];p&&!p.skip&&u.push({element:p,datasetIndex:f.index,index:h})}),u):[]},dataset(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;let r=n.intersect?tr(t,i,l,s,o):nr(t,i,l,!1,s,o);if(r.length>0){const u=r[0].datasetIndex,f=t.getDatasetMeta(u).data;r=[];for(let h=0;h<f.length;++h)r.push({element:f[h],datasetIndex:u,index:h})}return r},point(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return tr(t,i,l,s,o)},nearest(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return nr(t,i,l,n.intersect,s,o)},x(t,e,n,s){const i=yi(e,t);return vu(t,i,"x",n.intersect,s)},y(t,e,n,s){const i=yi(e,t);return vu(t,i,"y",n.intersect,s)}}};const ip=["left","top","right","bottom"];function tl(t,e){return t.filter(n=>n.pos===e)}function yu(t,e){return t.filter(n=>ip.indexOf(n.pos)===-1&&n.box.axis===e)}function nl(t,e){return t.sort((n,s)=>{const i=e?s:n,l=e?n:s;return i.weight===l.weight?i.index-l.index:i.weight-l.weight})}function Rb(t){const e=[];let n,s,i,l,o,r;for(n=0,s=(t||[]).length;n<s;++n)i=t[n],{position:l,options:{stack:o,stackWeight:r=1}}=i,e.push({index:n,box:i,pos:l,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&l+o,stackWeight:r});return e}function Db(t){const e={};for(const n of t){const{stack:s,pos:i,stackWeight:l}=n;if(!s||!ip.includes(i))continue;const o=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=l}return e}function Lb(t,e){const n=Db(t),{vBoxMaxWidth:s,hBoxMaxHeight:i}=e;let l,o,r;for(l=0,o=t.length;l<o;++l){r=t[l];const{fullSize:u}=r.box,f=n[r.stack],h=f&&r.stackWeight/f.weight;r.horizontal?(r.width=h?h*s:u&&e.availableWidth,r.height=i):(r.width=s,r.height=h?h*i:u&&e.availableHeight)}return n}function Hb(t){const e=Rb(t),n=nl(e.filter(f=>f.box.fullSize),!0),s=nl(tl(e,"left"),!0),i=nl(tl(e,"right")),l=nl(tl(e,"top"),!0),o=nl(tl(e,"bottom")),r=yu(e,"x"),u=yu(e,"y");return{fullSize:n,leftAndTop:s.concat(l),rightAndBottom:i.concat(u).concat(o).concat(r),chartArea:tl(e,"chartArea"),vertical:s.concat(i).concat(u),horizontal:l.concat(o).concat(r)}}function wu(t,e,n,s){return Math.max(t[n],e[n])+Math.max(t[s],e[s])}function lp(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ib(t,e,n,s){const{pos:i,box:l}=n,o=t.maxPadding;if(!Tt(i)){n.size&&(t[i]-=n.size);const p=s[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?l.height:l.width),n.size=p.size/p.count,t[i]+=n.size}l.getPadding&&lp(o,l.getPadding());const r=Math.max(0,e.outerWidth-wu(o,t,"left","right")),u=Math.max(0,e.outerHeight-wu(o,t,"top","bottom")),f=r!==t.w,h=u!==t.h;return t.w=r,t.h=u,n.horizontal?{same:f,other:h}:{same:h,other:f}}function Bb(t){const e=t.maxPadding;function n(s){const i=Math.max(e[s]-t[s],0);return t[s]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Fb(t,e){const n=e.maxPadding;function s(i){const l={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{l[o]=Math.max(e[o],n[o])}),l}return s(t?["left","right"]:["top","bottom"])}function ul(t,e,n,s){const i=[];let l,o,r,u,f,h;for(l=0,o=t.length,f=0;l<o;++l){r=t[l],u=r.box,u.update(r.width||e.w,r.height||e.h,Fb(r.horizontal,e));const{same:p,other:g}=Ib(e,n,r,s);f|=p&&i.length,h=h||g,u.fullSize||i.push(r)}return f&&ul(i,e,n,s)||h}function Kl(t,e,n,s,i){t.top=n,t.left=e,t.right=e+s,t.bottom=n+i,t.width=s,t.height=i}function ku(t,e,n,s){const i=n.padding;let{x:l,y:o}=e;for(const r of t){const u=r.box,f=s[r.stack]||{placed:0,weight:1},h=r.stackWeight/f.weight||1;if(r.horizontal){const p=e.w*h,g=f.size||u.height;Sl(f.start)&&(o=f.start),u.fullSize?Kl(u,i.left,o,n.outerWidth-i.right-i.left,g):Kl(u,e.left+f.placed,o,p,g),f.start=o,f.placed+=p,o=u.bottom}else{const p=e.h*h,g=f.size||u.width;Sl(f.start)&&(l=f.start),u.fullSize?Kl(u,l,i.top,g,n.outerHeight-i.bottom-i.top):Kl(u,l,e.top+f.placed,g,p),f.start=l,f.placed+=p,l=u.right}}e.x=l,e.y=o}var ks={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,s){if(!t)return;const i=Ts(t.options.layout.padding),l=Math.max(e-i.width,0),o=Math.max(n-i.height,0),r=Hb(t.boxes),u=r.vertical,f=r.horizontal;Ft(t.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});const h=u.reduce((b,k)=>k.box.options&&k.box.options.display===!1?b:b+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/h,hBoxMaxHeight:o/2}),g=Object.assign({},i);lp(g,Ts(s));const m=Object.assign({maxPadding:g,w:l,h:o,x:i.left,y:i.top},i),_=Lb(u.concat(f),p);ul(r.fullSize,m,p,_),ul(u,m,p,_),ul(f,m,p,_)&&ul(u,m,p,_),Bb(m),ku(r.leftAndTop,m,p,_),m.x+=m.w,m.y+=m.h,ku(r.rightAndBottom,m,p,_),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},Ft(r.chartArea,b=>{const k=b.box;Object.assign(k,t.chartArea),k.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class op{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,s){}removeEventListener(e,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,s,i){return n=Math.max(0,n||e.width),s=s||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(e){return!0}updateConfig(e){}}class Nb extends op{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ao="$chartjs",jb={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Su=t=>t===null||t==="";function zb(t,e){const n=t.style,s=t.getAttribute("height"),i=t.getAttribute("width");if(t[ao]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Su(i)){const l=ou(t,"width");l!==void 0&&(t.width=l)}if(Su(s))if(t.style.height==="")t.height=t.width/(e||2);else{const l=ou(t,"height");l!==void 0&&(t.height=l)}return t}const rp=B1?{passive:!0}:!1;function Ub(t,e,n){t&&t.addEventListener(e,n,rp)}function Vb(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,rp)}function Wb(t,e){const n=jb[t.type]||t.type,{x:s,y:i}=yi(t,e);return{type:n,chart:e,native:t,x:s!==void 0?s:null,y:i!==void 0?i:null}}function wo(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function qb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||wo(r.addedNodes,s),o=o&&!wo(r.removedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Gb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||wo(r.removedNodes,s),o=o&&!wo(r.addedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Pl=new Map;let Eu=0;function ap(){const t=window.devicePixelRatio;t!==Eu&&(Eu=t,Pl.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Xb(t,e){Pl.size||window.addEventListener("resize",ap),Pl.set(t,e)}function Yb(t){Pl.delete(t),Pl.size||window.removeEventListener("resize",ap)}function Jb(t,e,n){const s=t.canvas,i=s&&ia(s);if(!i)return;const l=Vd((r,u)=>{const f=i.clientWidth;n(r,u),f<i.clientWidth&&n()},window),o=new ResizeObserver(r=>{const u=r[0],f=u.contentRect.width,h=u.contentRect.height;f===0&&h===0||l(f,h)});return o.observe(i),Xb(t,l),o}function sr(t,e,n){n&&n.disconnect(),e==="resize"&&Yb(t)}function Kb(t,e,n){const s=t.canvas,i=Vd(l=>{t.ctx!==null&&n(Wb(l,t))},t);return Ub(s,e,i),i}class Zb extends op{acquireContext(e,n){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(zb(e,n),s):null}releaseContext(e){const n=e.canvas;if(!n[ao])return!1;const s=n[ao].initial;["height","width"].forEach(l=>{const o=s[l];Dt(o)?n.removeAttribute(l):n.setAttribute(l,o)});const i=s.style||{};return Object.keys(i).forEach(l=>{n.style[l]=i[l]}),n.width=n.width,delete n[ao],!0}addEventListener(e,n,s){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:qb,detach:Gb,resize:Jb}[n]||Kb;i[n]=o(e,n,s)}removeEventListener(e,n){const s=e.$proxies||(e.$proxies={}),i=s[n];if(!i)return;({attach:sr,detach:sr,resize:sr}[n]||Vb)(e,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,s,i){return I1(e,n,s,i)}isAttached(e){const n=e&&ia(e);return!!(n&&n.isConnected)}}function Qb(t){return!sa()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Nb:Zb}let Ks=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}hasValue(){return El(this.x)&&El(this.y)}getProps(e,n){const s=this.$animations;if(!n||!s)return this;const i={};return e.forEach(l=>{i[l]=s[l]&&s[l].active()?s[l]._to:this[l]}),i}};function $b(t,e){const n=t.options.ticks,s=e_(t),i=Math.min(n.maxTicksLimit||s,s),l=n.major.enabled?n_(e):[],o=l.length,r=l[0],u=l[o-1],f=[];if(o>i)return s_(e,f,l,o/i),f;const h=t_(l,e,i);if(o>0){let p,g;const m=o>1?Math.round((u-r)/(o-1)):null;for(Zl(e,f,h,Dt(m)?0:r-m,r),p=0,g=o-1;p<g;p++)Zl(e,f,h,l[p],l[p+1]);return Zl(e,f,h,u,Dt(m)?e.length:u+m),f}return Zl(e,f,h),f}function e_(t){const e=t.options.offset,n=t._tickSize(),s=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(s,i))}function t_(t,e,n){const s=i_(t),i=e.length/n;if(!s)return Math.max(i,1);const l=Hm(s);for(let o=0,r=l.length-1;o<r;o++){const u=l[o];if(u>i)return u}return Math.max(i,1)}function n_(t){const e=[];let n,s;for(n=0,s=t.length;n<s;n++)t[n].major&&e.push(n);return e}function s_(t,e,n,s){let i=0,l=n[0],o;for(s=Math.ceil(s),o=0;o<t.length;o++)o===l&&(e.push(t[o]),i++,l=n[i*s])}function Zl(t,e,n,s,i){const l=dt(s,0),o=Math.min(dt(i,t.length),t.length);let r=0,u,f,h;for(n=Math.ceil(n),i&&(u=i-s,n=u/Math.floor(u/n)),h=l;h<0;)r++,h=Math.round(l+r*n);for(f=Math.max(l,0);f<o;f++)f===h&&(e.push(t[f]),r++,h=Math.round(l+r*n))}function i_(t){const e=t.length;let n,s;if(e<2)return!1;for(s=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==s)return!1;return s}const l_=t=>t==="left"?"right":t==="right"?"left":t,Tu=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Mu=(t,e)=>Math.min(e||t,t);function Cu(t,e){const n=[],s=t.length/e,i=t.length;let l=0;for(;l<i;l+=s)n.push(t[Math.floor(l)]);return n}function o_(t,e,n){const s=t.ticks.length,i=Math.min(e,s-1),l=t._startPixel,o=t._endPixel,r=1e-6;let u=t.getPixelForTick(i),f;if(!(n&&(s===1?f=Math.max(u-l,o-u):e===0?f=(t.getPixelForTick(1)-u)/2:f=(u-t.getPixelForTick(i-1))/2,u+=i<e?f:-f,u<l-r||u>o+r)))return u}function r_(t,e){Ft(t,n=>{const s=n.gc,i=s.length/2;let l;if(i>e){for(l=0;l<i;++l)delete n.data[s[l]];s.splice(0,i)}})}function sl(t){return t.drawTicks?t.tickLength:0}function Pu(t,e){if(!t.display)return 0;const n=Qn(t.font,e),s=Ts(t.padding);return(On(t.text)?t.text.length:1)*n.lineHeight+s.height}function a_(t,e){return Oi(t,{scale:e,type:"scale"})}function u_(t,e,n){return Oi(t,{tick:n,index:e,type:"tick"})}function c_(t,e,n){let s=Yr(t);return(n&&e!=="right"||!n&&e==="right")&&(s=l_(s)),s}function f_(t,e,n,s){const{top:i,left:l,bottom:o,right:r,chart:u}=t,{chartArea:f,scales:h}=u;let p=0,g,m,_;const b=o-i,k=r-l;if(t.isHorizontal()){if(m=Yn(s,l,r),Tt(n)){const v=Object.keys(n)[0],y=n[v];_=h[v].getPixelForValue(y)+b-e}else n==="center"?_=(f.bottom+f.top)/2+b-e:_=Tu(t,n,e);g=r-l}else{if(Tt(n)){const v=Object.keys(n)[0],y=n[v];m=h[v].getPixelForValue(y)-k+e}else n==="center"?m=(f.left+f.right)/2-k+e:m=Tu(t,n,e);_=Yn(s,o,i),p=n==="left"?-xn:xn}return{titleX:m,titleY:_,maxWidth:g,rotation:p}}class Zi extends Ks{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:s,_suggestedMax:i}=this;return e=Ds(e,Number.POSITIVE_INFINITY),n=Ds(n,Number.NEGATIVE_INFINITY),s=Ds(s,Number.POSITIVE_INFINITY),i=Ds(i,Number.NEGATIVE_INFINITY),{min:Ds(e,s),max:Ds(n,i),minDefined:Es(e),maxDefined:Es(n)}}getMinMax(e){let{min:n,max:s,minDefined:i,maxDefined:l}=this.getUserBounds(),o;if(i&&l)return{min:n,max:s};const r=this.getMatchingVisibleMetas();for(let u=0,f=r.length;u<f;++u)o=r[u].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),l||(s=Math.max(s,o.max));return n=l&&n>s?s:n,s=i&&n>s?n:s,{min:Ds(n,Ds(s,n)),max:Ds(s,Ds(n,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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){rn(this.options.beforeUpdate,[this])}update(e,n,s){const{beginAtZero:i,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,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=p1(this,l,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=r<this.ticks.length;this._convertTicksToLabels(u?Cu(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=$b(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,s;this.isHorizontal()?(n=this.left,s=this.right):(n=this.top,s=this.bottom,e=!e),this._startPixel=n,this._endPixel=s,this._reversePixels=e,this._length=s-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){rn(this.options.afterUpdate,[this])}beforeSetDimensions(){rn(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(){rn(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),rn(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){rn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let s,i,l;for(s=0,i=e.length;s<i;s++)l=e[s],l.label=rn(n.callback,[l.value,s,e],this)}afterTickToLabelConversion(){rn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){rn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,s=Mu(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,l=n.maxRotation;let o=i,r,u,f;if(!this._isVisible()||!n.display||i>=l||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes(),p=h.widest.width,g=h.highest.height,m=Zn(this.chart.width-p,0,this.maxWidth);r=e.offset?this.maxWidth/s:m/(s-1),p+6>r&&(r=m/(s-(e.offset?.5:1)),u=this.maxHeight-sl(e.grid)-n.padding-Pu(e.title,this.chart.options.font),f=Math.sqrt(p*p+g*g),o=Nm(Math.min(Math.asin(Zn((h.highest.height+6)/r,-1,1)),Math.asin(Zn(u/f,-1,1))-Math.asin(Zn(g/f,-1,1)))),o=Math.max(i,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){rn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){rn(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const u=Pu(i,n.options.font);if(r?(e.width=this.maxWidth,e.height=sl(l)+u):(e.height=this.maxHeight,e.width=sl(l)+u),s.display&&this.ticks.length){const{first:f,last:h,widest:p,highest:g}=this._getLabelSizes(),m=s.padding*2,_=qs(this.labelRotation),b=Math.cos(_),k=Math.sin(_);if(r){const v=s.mirror?0:k*p.width+b*g.height;e.height=Math.min(this.maxHeight,e.height+v+m)}else{const v=s.mirror?0:b*p.width+k*g.height;e.width=Math.min(this.maxWidth,e.width+v+m)}this._calculatePadding(f,h,k,b)}}this._handleMargins(),r?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,s,i){const{ticks:{align:l,padding:o},position:r}=this.options,u=this.labelRotation!==0,f=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,m=0;u?f?(g=i*e.width,m=s*n.height):(g=s*e.height,m=i*n.width):l==="start"?m=n.width:l==="end"?g=e.width:l!=="inner"&&(g=e.width/2,m=n.width/2),this.paddingLeft=Math.max((g-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((m-p+o)*this.width/(this.width-p),0)}else{let h=n.height/2,p=e.height/2;l==="start"?(h=0,p=e.height):l==="end"&&(h=n.height,p=0),this.paddingTop=h+o,this.paddingBottom=p+o}}_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(){rn(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,s;for(n=0,s=e.length;n<s;n++)Dt(e[n].label)&&(e.splice(n,1),s--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let s=this.ticks;n<s.length&&(s=Cu(s,n)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,s){const{ctx:i,_longestTextCache:l}=this,o=[],r=[],u=Math.floor(n/Mu(n,s));let f=0,h=0,p,g,m,_,b,k,v,y,S,C,T;for(p=0;p<n;p+=u){if(_=e[p].label,b=this._resolveTickFontOptions(p),i.font=k=b.string,v=l[k]=l[k]||{data:{},gc:[]},y=b.lineHeight,S=C=0,!Dt(_)&&!On(_))S=tu(i,v.data,v.gc,S,_),C=y;else if(On(_))for(g=0,m=_.length;g<m;++g)T=_[g],!Dt(T)&&!On(T)&&(S=tu(i,v.data,v.gc,S,T),C+=y);o.push(S),r.push(C),f=Math.max(S,f),h=Math.max(C,h)}r_(l,n);const O=o.indexOf(f),A=r.indexOf(h),x=P=>({width:o[P]||0,height:r[P]||0});return{first:x(0),last:x(n-1),widest:x(O),highest:x(A),widths:o,heights:r}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return zm(this._alignToPixels?_i(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const s=n[e];return s.$context||(s.$context=u_(this.getContext(),e,s))}return this.$context||(this.$context=a_(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=qs(this.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),l=this._getLabelSizes(),o=e.autoSkipPadding||0,r=l?l.widest.width+o:0,u=l?l.highest.height+o:0;return this.isHorizontal()?u*s>r*i?r/s:u/i:u*i<r*s?u/s:r/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,s=this.chart,i=this.options,{grid:l,position:o,border:r}=i,u=l.offset,f=this.isHorizontal(),p=this.ticks.length+(u?1:0),g=sl(l),m=[],_=r.setContext(this.getContext()),b=_.display?_.width:0,k=b/2,v=function(B){return _i(s,B,b)};let y,S,C,T,O,A,x,P,D,I,R,U;if(o==="top")y=v(this.bottom),A=this.bottom-g,P=y-k,I=v(e.top)+k,U=e.bottom;else if(o==="bottom")y=v(this.top),I=e.top,U=v(e.bottom)-k,A=y+k,P=this.top+g;else if(o==="left")y=v(this.right),O=this.right-g,x=y-k,D=v(e.left)+k,R=e.right;else if(o==="right")y=v(this.left),D=e.left,R=v(e.right)-k,O=y+k,x=this.left+g;else if(n==="x"){if(o==="center")y=v((e.top+e.bottom)/2+.5);else if(Tt(o)){const B=Object.keys(o)[0],j=o[B];y=v(this.chart.scales[B].getPixelForValue(j))}I=e.top,U=e.bottom,A=y+k,P=A+g}else if(n==="y"){if(o==="center")y=v((e.left+e.right)/2);else if(Tt(o)){const B=Object.keys(o)[0],j=o[B];y=v(this.chart.scales[B].getPixelForValue(j))}O=y-k,x=O-g,D=e.left,R=e.right}const N=dt(i.ticks.maxTicksLimit,p),z=Math.max(1,Math.ceil(p/N));for(S=0;S<p;S+=z){const B=this.getContext(S),j=l.setContext(B),F=r.setContext(B),W=j.lineWidth,G=j.color,Y=F.dash||[],Q=F.dashOffset,le=j.tickWidth,Z=j.tickColor,V=j.tickBorderDash||[],X=j.tickBorderDashOffset;C=o_(this,S,u),C!==void 0&&(T=_i(s,C,W),f?O=x=D=R=T:A=P=I=U=T,m.push({tx1:O,ty1:A,tx2:x,ty2:P,x1:D,y1:I,x2:R,y2:U,width:W,color:G,borderDash:Y,borderDashOffset:Q,tickWidth:le,tickColor:Z,tickBorderDash:V,tickBorderDashOffset:X}))}return this._ticksLength=p,this._borderValue=y,m}_computeLabelItems(e){const n=this.axis,s=this.options,{position:i,ticks:l}=s,o=this.isHorizontal(),r=this.ticks,{align:u,crossAlign:f,padding:h,mirror:p}=l,g=sl(s.grid),m=g+h,_=p?-h:m,b=-qs(this.labelRotation),k=[];let v,y,S,C,T,O,A,x,P,D,I,R,U="middle";if(i==="top")O=this.bottom-_,A=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+_,A=this._getXAxisLabelAlignment();else if(i==="left"){const z=this._getYAxisLabelAlignment(g);A=z.textAlign,T=z.x}else if(i==="right"){const z=this._getYAxisLabelAlignment(g);A=z.textAlign,T=z.x}else if(n==="x"){if(i==="center")O=(e.top+e.bottom)/2+m;else if(Tt(i)){const z=Object.keys(i)[0],B=i[z];O=this.chart.scales[z].getPixelForValue(B)+m}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")T=(e.left+e.right)/2-m;else if(Tt(i)){const z=Object.keys(i)[0],B=i[z];T=this.chart.scales[z].getPixelForValue(B)}A=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(u==="start"?U="top":u==="end"&&(U="bottom"));const N=this._getLabelSizes();for(v=0,y=r.length;v<y;++v){S=r[v],C=S.label;const z=l.setContext(this.getContext(v));x=this.getPixelForTick(v)+l.labelOffset,P=this._resolveTickFontOptions(v),D=P.lineHeight,I=On(C)?C.length:1;const B=I/2,j=z.color,F=z.textStrokeColor,W=z.textStrokeWidth;let G=A;o?(T=x,A==="inner"&&(v===y-1?G=this.options.reverse?"left":"right":v===0?G=this.options.reverse?"right":"left":G="center"),i==="top"?f==="near"||b!==0?R=-I*D+D/2:f==="center"?R=-N.highest.height/2-B*D+D:R=-N.highest.height+D/2:f==="near"||b!==0?R=D/2:f==="center"?R=N.highest.height/2-B*D:R=N.highest.height-I*D,p&&(R*=-1),b!==0&&!z.showLabelBackdrop&&(T+=D/2*Math.sin(b))):(O=x,R=(1-I)*D/2);let Y;if(z.showLabelBackdrop){const Q=Ts(z.backdropPadding),le=N.heights[v],Z=N.widths[v];let V=R-Q.top,X=0-Q.left;switch(U){case"middle":V-=le/2;break;case"bottom":V-=le;break}switch(A){case"center":X-=Z/2;break;case"right":X-=Z;break;case"inner":v===y-1?X-=Z:v>0&&(X-=Z/2);break}Y={left:X,top:V,width:Z+Q.width,height:le+Q.height,color:z.backdropColor}}k.push({label:C,font:P,textOffset:R,options:{rotation:b,color:j,strokeColor:F,strokeWidth:W,textAlign:G,textBaseline:U,translation:[T,O],backdrop:Y}})}return k}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-qs(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:s,mirror:i,padding:l}}=this.options,o=this._getLabelSizes(),r=e+l,u=o.widest.width;let f,h;return n==="left"?i?(h=this.right+l,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h+=u)):(h=this.right-r,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h=this.left)):n==="right"?i?(h=this.left+l,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h-=u)):(h=this.left+r,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h=this.right)):f="right",{textAlign:f,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:s,top:i,width:l,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(s,i,l,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(l=>l.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(u,f,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(u.x,u.y),s.lineTo(f.x,f.y),s.stroke(),s.restore())};if(n.display)for(l=0,o=i.length;l<o;++l){const u=i[l];n.drawOnChartArea&&r({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&r({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:s,grid:i}}=this,l=s.setContext(this.getContext()),o=s.display?l.width:0;if(!o)return;const r=i.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let f,h,p,g;this.isHorizontal()?(f=_i(e,this.left,o)-o/2,h=_i(e,this.right,r)+r/2,p=g=u):(p=_i(e,this.top,o)-o/2,g=_i(e,this.bottom,r)+r/2,f=h=u),n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.beginPath(),n.moveTo(f,p),n.lineTo(h,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,i=this._computeLabelArea();i&&Zr(s,i);const l=this.getLabelItems(e);for(const o of l){const r=o.options,u=o.font,f=o.label,h=o.textOffset;Cl(s,f,0,h,u,r)}i&&Qr(s)}drawTitle(){const{ctx:e,options:{position:n,title:s,reverse:i}}=this;if(!s.display)return;const l=Qn(s.font),o=Ts(s.padding),r=s.align;let u=l.lineHeight/2;n==="bottom"||n==="center"||Tt(n)?(u+=o.bottom,On(s.text)&&(u+=l.lineHeight*(s.text.length-1))):u+=o.top;const{titleX:f,titleY:h,maxWidth:p,rotation:g}=f_(this,u,n,r);Cl(e,s.text,0,0,l,{color:s.color,maxWidth:p,rotation:g,textAlign:c_(r,n,i),textBaseline:"middle",translation:[f,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,s=dt(e.grid&&e.grid.z,-1),i=dt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Zi.prototype.draw?[{z:n,draw:l=>{this.draw(l)}}]:[{z:s,draw:l=>{this.drawBackground(),this.drawGrid(l),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:l=>{this.drawLabels(l)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let l,o;for(l=0,o=n.length;l<o;++l){const r=n[l];r[s]===this.id&&(!e||r.type===e)&&i.push(r)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Qn(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Ql{constructor(e,n,s){this.type=e,this.scope=n,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let s;p_(n)&&(s=this.register(n));const i=this.items,l=e.id,o=this.scope+"."+l;if(!l)throw new Error("class does not have id: "+e);return l in i||(i[l]=e,h_(e,o,s),this.override&&Sn.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,s=e.id,i=this.scope;s in n&&delete n[s],i&&s in Sn[i]&&(delete Sn[i][s],this.override&&delete Ci[s])}}function h_(t,e,n){const s=kl(Object.create(null),[n?Sn.get(n):{},Sn.get(e),t.defaults]);Sn.set(e,s),t.defaultRoutes&&d_(e,t.defaultRoutes),t.descriptors&&Sn.describe(e,t.descriptors)}function d_(t,e){Object.keys(e).forEach(n=>{const s=n.split("."),i=s.pop(),l=[t].concat(s).join("."),o=e[n].split("."),r=o.pop(),u=o.join(".");Sn.route(l,i,u,r)})}function p_(t){return"id"in t&&"defaults"in t}class g_{constructor(){this.controllers=new Ql(Oo,"datasets",!0),this.elements=new Ql(Ks,"elements"),this.plugins=new Ql(Object,"plugins"),this.scales=new Ql(Zi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,s){[...n].forEach(i=>{const l=s||this._getRegistryForType(i);s||l.isForType(i)||l===this.plugins&&i.id?this._exec(e,l,i):Ft(i,o=>{const r=s||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,n,s){const i=Gr(e);rn(s["before"+i],[],s),n[e](s),rn(s["after"+i],[],s)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const s=this._typedRegistries[n];if(s.isForType(e))return s}return this.plugins}_get(e,n,s){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return i}}var Hs=new g_;class m_{constructor(){this._init=[]}notify(e,n,s,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(l,e,n,s);return n==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,s,i){i=i||{};for(const l of e){const o=l.plugin,r=o[s],u=[n,i,l.options];if(rn(r,u,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Dt(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const s=e&&e.config,i=dt(s.options&&s.options.plugins,{}),l=b_(s);return i===!1&&!n?[]:v_(e,l,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],s=this._cache,i=(l,o)=>l.filter(r=>!o.some(u=>r.plugin.id===u.plugin.id));this._notify(i(n,s),e,"stop"),this._notify(i(s,n),e,"start")}}function b_(t){const e={},n=[],s=Object.keys(Hs.plugins.items);for(let l=0;l<s.length;l++)n.push(Hs.getPlugin(s[l]));const i=t.plugins||[];for(let l=0;l<i.length;l++){const o=i[l];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function __(t,e){return!e&&t===!1?null:t===!0?{}:t}function v_(t,{plugins:e,localIds:n},s,i){const l=[],o=t.getContext();for(const r of e){const u=r.id,f=__(s[u],i);f!==null&&l.push({plugin:r,options:y_(t.config,{plugin:r,local:n[u]},f,o)})}return l}function y_(t,{plugin:e,local:n},s,i){const l=t.pluginScopeKeys(e),o=t.getOptionScopes(s,l);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Cr(t,e){const n=Sn.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function w_(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function k_(t,e){return t===e?"_index_":"_value_"}function Au(t){if(t==="x"||t==="y"||t==="r")return t}function S_(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Pr(t,...e){if(Au(t))return t;for(const n of e){const s=n.axis||S_(n.position)||t.length>1&&Au(t[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${t}' axis. Please provide 'axis' or 'position' option.\`)}function Ou(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function E_(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(s=>s.xAxisID===t||s.yAxisID===t);if(n.length)return Ou(t,"x",n[0])||Ou(t,"y",n[0])}return{}}function T_(t,e){const n=Ci[t.type]||{scales:{}},s=e.scales||{},i=Cr(t.type,e),l=Object.create(null);return Object.keys(s).forEach(o=>{const r=s[o];if(!Tt(r))return console.error(\`Invalid scale configuration for scale: \${o}\`);if(r._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${o}\`);const u=Pr(o,r,E_(o,t),Sn.scales[r.type]),f=k_(u,i),h=n.scales||{};l[o]=gl(Object.create(null),[{axis:u},r,h[u],h[f]])}),t.data.datasets.forEach(o=>{const r=o.type||t.type,u=o.indexAxis||Cr(r,e),h=(Ci[r]||{}).scales||{};Object.keys(h).forEach(p=>{const g=w_(p,u),m=o[g+"AxisID"]||g;l[m]=l[m]||Object.create(null),gl(l[m],[{axis:g},s[m],h[p]])})}),Object.keys(l).forEach(o=>{const r=l[o];gl(r,[Sn.scales[r.type],Sn.scale])}),l}function up(t){const e=t.options||(t.options={});e.plugins=dt(e.plugins,{}),e.scales=T_(t,e)}function cp(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function M_(t){return t=t||{},t.data=cp(t.data),up(t),t}const xu=new Map,fp=new Set;function $l(t,e){let n=xu.get(t);return n||(n=e(),xu.set(t,n),fp.add(n)),n}const il=(t,e,n)=>{const s=Mi(e,n);s!==void 0&&t.add(s)};class C_{constructor(e){this._config=M_(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=cp(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),up(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return $l(e,()=>[[\`datasets.\${e}\`,""]])}datasetAnimationScopeKeys(e,n){return $l(\`\${e}.transition.\${n}\`,()=>[[\`datasets.\${e}.transitions.\${n}\`,\`transitions.\${n}\`],[\`datasets.\${e}\`,""]])}datasetElementScopeKeys(e,n){return $l(\`\${e}-\${n}\`,()=>[[\`datasets.\${e}.elements.\${n}\`,\`datasets.\${e}\`,\`elements.\${n}\`,""]])}pluginScopeKeys(e){const n=e.id,s=this.type;return $l(\`\${s}-plugin-\${n}\`,()=>[[\`plugins.\${n}\`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const s=this._scopeCache;let i=s.get(e);return(!i||n)&&(i=new Map,s.set(e,i)),i}getOptionScopes(e,n,s){const{options:i,type:l}=this,o=this._cachedScopes(e,s),r=o.get(n);if(r)return r;const u=new Set;n.forEach(h=>{e&&(u.add(e),h.forEach(p=>il(u,e,p))),h.forEach(p=>il(u,i,p)),h.forEach(p=>il(u,Ci[l]||{},p)),h.forEach(p=>il(u,Sn,p)),h.forEach(p=>il(u,Tr,p))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),fp.has(n)&&o.set(n,f),f}chartOptionScopes(){const{options:e,type:n}=this;return[e,Ci[n]||{},Sn.datasets[n]||{},{type:n},Sn,Tr]}resolveNamedOptions(e,n,s,i=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=Ru(this._resolverCache,e,i);let u=o;if(A_(o,n)){l.$shared=!1,s=fi(s)?s():s;const f=this.createResolver(e,s,r);u=qi(o,s,f)}for(const f of n)l[f]=u[f];return l}createResolver(e,n,s=[""],i){const{resolver:l}=Ru(this._resolverCache,e,s);return Tt(n)?qi(l,n,void 0,i):l}}function Ru(t,e,n){let s=t.get(e);s||(s=new Map,t.set(e,s));const i=n.join();let l=s.get(i);return l||(l={resolver:ea(e,n),subPrefixes:n.filter(r=>!r.toLowerCase().includes("hover"))},s.set(i,l)),l}const P_=t=>Tt(t)&&Object.getOwnPropertyNames(t).some(e=>fi(t[e]));function A_(t,e){const{isScriptable:n,isIndexable:s}=Xd(t);for(const i of e){const l=n(i),o=s(i),r=(o||l)&&t[i];if(l&&(fi(r)||P_(r))||o&&On(r))return!0}return!1}var O_="4.5.0";const x_=["top","bottom","left","right","chartArea"];function Du(t,e){return t==="top"||t==="bottom"||x_.indexOf(t)===-1&&e==="x"}function Lu(t,e){return function(n,s){return n[t]===s[t]?n[e]-s[e]:n[t]-s[t]}}function Hu(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),rn(n&&n.onComplete,[t],e)}function R_(t){const e=t.chart,n=e.options.animation;rn(n&&n.onProgress,[t],e)}function hp(t){return sa()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const uo={},Iu=t=>{const e=hp(t);return Object.values(uo).filter(n=>n.canvas===e).pop()};function D_(t,e,n){const s=Object.keys(t);for(const i of s){const l=+i;if(l>=e){const o=t[i];delete t[i],(n>0||l>e)&&(t[l+n]=o)}}}function L_(t,e,n,s){return!n||t.type==="mouseout"?null:s?e:t}let pi=class{static defaults=Sn;static instances=uo;static overrides=Ci;static registry=Hs;static version=O_;static getChart=Iu;static register(...e){Hs.add(...e),Bu()}static unregister(...e){Hs.remove(...e),Bu()}constructor(e,n){const s=this.config=new C_(n),i=hp(e),l=Iu(i);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||Qb(i)),this.platform.updateConfig(s);const r=this.platform.acquireContext(i,o.aspectRatio),u=r&&r.canvas,f=u&&u.height,h=u&&u.width;if(this.id=Mm(),this.ctx=r,this.canvas=u,this.width=h,this.height=f,this._options=o,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 m_,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=qm(p=>this.update(p),o.resizeDelay||0),this._dataChanges=[],uo[this.id]=this,!r||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Us.listen(this,"complete",Hu),Us.listen(this,"progress",R_),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:s,height:i,_aspectRatio:l}=this;return Dt(e)?n&&l?l:i?s/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Hs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():lu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return nu(this.canvas,this.ctx),this}stop(){return Us.stop(this),this}resize(e,n){Us.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const s=this.options,i=this.canvas,l=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,l),r=s.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,lu(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),rn(s.onResize,[this,o],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ft(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,s=this.scales,i=Object.keys(s).reduce((o,r)=>(o[r]=!1,o),{});let l=[];n&&(l=l.concat(Object.keys(n).map(o=>{const r=n[o],u=Pr(o,r),f=u==="r",h=u==="x";return{options:r,dposition:f?"chartArea":h?"bottom":"left",dtype:f?"radialLinear":h?"category":"linear"}}))),Ft(l,o=>{const r=o.options,u=r.id,f=Pr(u,r),h=dt(r.type,o.dtype);(r.position===void 0||Du(r.position,f)!==Du(o.dposition))&&(r.position=o.dposition),i[u]=!0;let p=null;if(u in s&&s[u].type===h)p=s[u];else{const g=Hs.getScale(h);p=new g({id:u,type:h,ctx:this.ctx,chart:this}),s[p.id]=p}p.init(r,e)}),Ft(i,(o,r)=>{o||delete s[r]}),Ft(s,o=>{ks.configure(this,o,o.options),ks.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,s=e.length;if(e.sort((i,l)=>i.index-l.index),s>n){for(let i=n;i<s;++i)this._destroyDatasetMeta(i);e.splice(n,s-n)}this._sortedMetasets=e.slice(0).sort(Lu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((s,i)=>{n.filter(l=>l===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const l=n[s];let o=this.getDatasetMeta(s);const r=l.type||this.config.type;if(o.type&&o.type!==r&&(this._destroyDatasetMeta(s),o=this.getDatasetMeta(s)),o.type=r,o.indexAxis=l.indexAxis||Cr(r,this.options),o.order=l.order||0,o.index=s,o.label=""+l.label,o.visible=this.isDatasetVisible(s),o.controller)o.controller.updateIndex(s),o.controller.linkScales();else{const u=Hs.getController(r),{datasetElementType:f,dataElementType:h}=Sn.datasets[r];Object.assign(u,{dataElementType:Hs.getElement(h),datasetElementType:f&&Hs.getElement(f)}),o.controller=new u(this,s),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Ft(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let f=0,h=this.data.datasets.length;f<h;f++){const{controller:p}=this.getDatasetMeta(f),g=!i&&l.indexOf(p)===-1;p.buildOrUpdateElements(g),o=Math.max(+p.getMaxOverflow(),o)}o=this._minPadding=s.layout.autoPadding?o:0,this._updateLayout(o),i||Ft(l,f=>{f.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Lu("z","_idx"));const{_active:r,_lastEvent:u}=this;u?this._eventHandler(u,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){Ft(this.scales,e=>{ks.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!Ga(n,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:l}of n){const o=s==="_removeElements"?-l:l;D_(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),i=s(0);for(let l=1;l<n;l++)if(!Ga(i,s(l)))return;return Array.from(i).map(l=>l.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ks.update(this,this.width,this.height,e);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],Ft(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,l)=>{i._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,fi(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const s=this.getDatasetMeta(e),i={meta:s,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(s.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Us.has(this)?this.attached&&!Us.running(this)&&Us.start(this):(this.draw(),Hu({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,s=[];let i,l;for(i=0,l=n.length;i<l;++i){const o=n[i];(!e||o.visible)&&s.push(o)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,s={meta:e,index:e.index,cancelable:!0},i=Z1(this,e);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&Zr(n,i),e.controller.draw(),i&&Qr(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Ml(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,s,i){const l=xb.modes[n];return typeof l=="function"?l(this,e,s,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],s=this._metasets;let i=s.filter(l=>l&&l._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=Oi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(e,n){const s=this.getDatasetMeta(e);s.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,s){const i=s?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,i);Sl(n)?(l.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),o.update(l,{visible:s}),this.update(r=>r.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Us.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),nu(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete uo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,s=(l,o)=>{n.addEventListener(this,l,o),e[l]=o},i=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};Ft(this.options.events,l=>s(l,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,s=(u,f)=>{n.addEventListener(this,u,f),e[u]=f},i=(u,f)=>{e[u]&&(n.removeEventListener(this,u,f),delete e[u])},l=(u,f)=>{this.canvas&&this.resize(u,f)};let o;const r=()=>{i("attach",r),this.attached=!0,this.resize(),s("resize",l),s("detach",o)};o=()=>{this.attached=!1,i("resize",l),this._stop(),this._resize(0,0),s("attach",r)},n.isAttached(this.canvas)?r():o()}unbindEvents(){Ft(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Ft(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,s){const i=s?"set":"remove";let l,o,r,u;for(n==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+i+"DatasetHoverStyle"]()),r=0,u=e.length;r<u;++r){o=e[r];const f=o&&this.getDatasetMeta(o.datasetIndex).controller;f&&f[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],s=e.map(({datasetIndex:l,index:o})=>{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!mo(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(e,n,s){return this._plugins.notify(this,e,n,s)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,s){const i=this.options.hover,l=(u,f)=>u.filter(h=>!f.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),o=l(n,e),r=s?e:l(e,n);o.length&&this.updateHoverStyle(o,i.mode,!1),r.length&&i.mode&&this.updateHoverStyle(r,i.mode,!0)}_eventHandler(e,n){const s={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const l=this._handleEvent(e,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(l||s.changed)&&this.render(),this}_handleEvent(e,n,s){const{_active:i=[],options:l}=this,o=n,r=this._getActiveElements(e,i,s,o),u=Rm(e),f=L_(e,this._lastEvent,s,u);s&&(this._lastEvent=null,rn(l.onHover,[e,r,this],this),u&&rn(l.onClick,[e,r,this],this));const h=!mo(r,i);return(h||n)&&(this._active=r,this._updateHoverStyles(r,i,n)),this._lastEvent=f,h}_getActiveElements(e,n,s,i){if(e.type==="mouseout")return[];if(!s)return n;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,i)}};function Bu(){return Ft(pi.instances,t=>t._plugins.invalidate())}function H_(t,e,n){const{startAngle:s,x:i,y:l,outerRadius:o,innerRadius:r,options:u}=e,{borderWidth:f,borderJoinStyle:h}=u,p=Math.min(f/o,Ms(s-n));if(t.beginPath(),t.arc(i,l,o-f/2,s+p/2,n-p/2),r>0){const g=Math.min(f/r,Ms(s-n));t.arc(i,l,r+f/2,n-g/2,s+g/2,!0)}else{const g=Math.min(f/2,o*Ms(s-n));if(h==="round")t.arc(i,l,g,n-Nt/2,s+Nt/2,!0);else if(h==="bevel"){const m=2*g*g,_=-m*Math.cos(n+Nt/2)+i,b=-m*Math.sin(n+Nt/2)+l,k=m*Math.cos(s+Nt/2)+i,v=m*Math.sin(s+Nt/2)+l;t.lineTo(_,b),t.lineTo(k,v)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function I_(t,e,n){const{startAngle:s,pixelMargin:i,x:l,y:o,outerRadius:r,innerRadius:u}=e;let f=i/r;t.beginPath(),t.arc(l,o,r,s-f,n+f),u>i?(f=i/u,t.arc(l,o,u,n+f,s-f,!0)):t.arc(l,o,i,n+xn,s-xn),t.closePath(),t.clip()}function B_(t){return $r(t,["outerStart","outerEnd","innerStart","innerEnd"])}function F_(t,e,n,s){const i=B_(t.options.borderRadius),l=(n-e)/2,o=Math.min(l,s*e/2),r=u=>{const f=(n-Math.min(l,u))*s/2;return Zn(u,0,Math.min(l,f))};return{outerStart:r(i.outerStart),outerEnd:r(i.outerEnd),innerStart:Zn(i.innerStart,0,o),innerEnd:Zn(i.innerEnd,0,o)}}function Ii(t,e,n,s){return{x:n+t*Math.cos(e),y:s+t*Math.sin(e)}}function ko(t,e,n,s,i,l){const{x:o,y:r,startAngle:u,pixelMargin:f,innerRadius:h}=e,p=Math.max(e.outerRadius+s+n-f,0),g=h>0?h+s+n+f:0;let m=0;const _=i-u;if(s){const z=h>0?h-s:0,B=p>0?p-s:0,j=(z+B)/2,F=j!==0?_*j/(j+s):_;m=(_-F)/2}const b=Math.max(.001,_*p-n/Nt)/p,k=(_-b)/2,v=u+k+m,y=i-k-m,{outerStart:S,outerEnd:C,innerStart:T,innerEnd:O}=F_(e,g,p,y-v),A=p-S,x=p-C,P=v+S/A,D=y-C/x,I=g+T,R=g+O,U=v+T/I,N=y-O/R;if(t.beginPath(),l){const z=(P+D)/2;if(t.arc(o,r,p,P,z),t.arc(o,r,p,z,D),C>0){const W=Ii(x,D,o,r);t.arc(W.x,W.y,C,D,y+xn)}const B=Ii(R,y,o,r);if(t.lineTo(B.x,B.y),O>0){const W=Ii(R,N,o,r);t.arc(W.x,W.y,O,y+xn,N+Math.PI)}const j=(y-O/g+(v+T/g))/2;if(t.arc(o,r,g,y-O/g,j,!0),t.arc(o,r,g,j,v+T/g,!0),T>0){const W=Ii(I,U,o,r);t.arc(W.x,W.y,T,U+Math.PI,v-xn)}const F=Ii(A,v,o,r);if(t.lineTo(F.x,F.y),S>0){const W=Ii(A,P,o,r);t.arc(W.x,W.y,S,v-xn,P)}}else{t.moveTo(o,r);const z=Math.cos(P)*p+o,B=Math.sin(P)*p+r;t.lineTo(z,B);const j=Math.cos(D)*p+o,F=Math.sin(D)*p+r;t.lineTo(j,F)}t.closePath()}function N_(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:r}=e;let u=e.endAngle;if(l){ko(t,e,n,s,u,i);for(let f=0;f<l;++f)t.fill();isNaN(r)||(u=o+(r%yn||yn))}return ko(t,e,n,s,u,i),t.fill(),u}function j_(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:r,options:u}=e,{borderWidth:f,borderJoinStyle:h,borderDash:p,borderDashOffset:g,borderRadius:m}=u,_=u.borderAlign==="inner";if(!f)return;t.setLineDash(p||[]),t.lineDashOffset=g,_?(t.lineWidth=f*2,t.lineJoin=h||"round"):(t.lineWidth=f,t.lineJoin=h||"bevel");let b=e.endAngle;if(l){ko(t,e,n,s,b,i);for(let k=0;k<l;++k)t.stroke();isNaN(r)||(b=o+(r%yn||yn))}_&&I_(t,e,b),u.selfJoin&&b-o>=Nt&&m===0&&h!=="miter"&&H_(t,e,b),l||(ko(t,e,n,s,b,i),t.stroke())}class z_ extends Ks{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:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){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,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.getProps(["x","y"],s),{angle:l,distance:o}=Nd(i,{x:e,y:n}),{startAngle:r,endAngle:u,innerRadius:f,outerRadius:h,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),g=(this.options.spacing+this.options.borderWidth)/2,m=dt(p,u-r),_=Tl(l,r,u)&&r!==u,b=m>=yn||_,k=ii(o,f+g,h+g);return b&&k}getCenterPoint(e){const{x:n,y:s,startAngle:i,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:f}=this.options,h=(i+l)/2,p=(o+r+f+u)/2;return{x:n+Math.cos(h)*p,y:s+Math.sin(h)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,i=(n.offset||0)/4,l=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>yn?Math.floor(s/yn):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const r=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(r)*i,Math.sin(r)*i);const u=1-Math.sin(Math.min(Nt,s||0)),f=i*u;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,N_(e,this,f,l,o),j_(e,this,f,l,o),e.restore()}}function dp(t,e,n=e){t.lineCap=dt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(dt(n.borderDash,e.borderDash)),t.lineDashOffset=dt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=dt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=dt(n.borderWidth,e.borderWidth),t.strokeStyle=dt(n.borderColor,e.borderColor)}function U_(t,e,n){t.lineTo(n.x,n.y)}function V_(t){return t.stepped?l1:t.tension||t.cubicInterpolationMode==="monotone"?o1:U_}function pp(t,e,n={}){const s=t.length,{start:i=0,end:l=s-1}=n,{start:o,end:r}=e,u=Math.max(i,o),f=Math.min(l,r),h=i<o&&l<o||i>r&&l>r;return{count:s,start:u,loop:e.loop,ilen:f<u&&!h?s+f-u:f-u}}function W_(t,e,n,s){const{points:i,options:l}=e,{count:o,start:r,loop:u,ilen:f}=pp(i,n,s),h=V_(l);let{move:p=!0,reverse:g}=s||{},m,_,b;for(m=0;m<=f;++m)_=i[(r+(g?f-m:m))%o],!_.skip&&(p?(t.moveTo(_.x,_.y),p=!1):h(t,b,_,g,l.stepped),b=_);return u&&(_=i[(r+(g?f:0))%o],h(t,b,_,g,l.stepped)),!!u}function q_(t,e,n,s){const i=e.points,{count:l,start:o,ilen:r}=pp(i,n,s),{move:u=!0,reverse:f}=s||{};let h=0,p=0,g,m,_,b,k,v;const y=C=>(o+(f?r-C:C))%l,S=()=>{b!==k&&(t.lineTo(h,k),t.lineTo(h,b),t.lineTo(h,v))};for(u&&(m=i[y(0)],t.moveTo(m.x,m.y)),g=0;g<=r;++g){if(m=i[y(g)],m.skip)continue;const C=m.x,T=m.y,O=C|0;O===_?(T<b?b=T:T>k&&(k=T),h=(p*h+C)/++p):(S(),t.lineTo(C,T),_=O,p=0,b=k=T),v=T}S()}function Ar(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?q_:W_}function G_(t){return t.stepped?F1:t.tension||t.cubicInterpolationMode==="monotone"?N1:wi}function X_(t,e,n,s){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,s)&&i.closePath()),dp(t,e.options),t.stroke(i)}function Y_(t,e,n,s){const{segments:i,options:l}=e,o=Ar(e);for(const r of i)dp(t,l,r.style),t.beginPath(),o(t,e,r,{start:n,end:n+s-1})&&t.closePath(),t.stroke()}const J_=typeof Path2D=="function";function K_(t,e,n,s){J_&&!e.options.segment?X_(t,e,n,s):Y_(t,e,n,s)}class Z_ extends Ks{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:e=>e!=="borderDash"&&e!=="fill"};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;O1(this._points,s,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=X1(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,s=e.length;return s&&n[e[s-1].end]}interpolate(e,n){const s=this.options,i=e[n],l=this.points,o=W1(this,{property:n,start:i,end:i});if(!o.length)return;const r=[],u=G_(s);let f,h;for(f=0,h=o.length;f<h;++f){const{start:p,end:g}=o[f],m=l[p],_=l[g];if(m===_){r.push(m);continue}const b=Math.abs((i-m[n])/(_[n]-m[n])),k=u(m,_,b,s.stepped);k[n]=e[n],r.push(k)}return r.length===1?r[0]:r}pathSegment(e,n,s){return Ar(this)(e,this,n,s)}path(e,n,s){const i=this.segments,l=Ar(this);let o=this._loop;n=n||0,s=s||this.points.length-n;for(const r of i)o&=l(e,this,r,{start:n,end:n+s-1});return!!o}draw(e,n,s,i){const l=this.options||{};(this.points||[]).length&&l.borderWidth&&(e.save(),K_(e,this,s,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Fu(t,e,n,s){const i=t.options,{[n]:l}=t.getProps([n],s);return Math.abs(e-l)<i.radius+i.hitRadius}class Q_ extends Ks{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(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.options,{x:l,y:o}=this.getProps(["x","y"],s);return Math.pow(e-l,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,n){return Fu(this,e,"x",n)}inYRange(e,n){return Fu(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!Ml(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Mr(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function gp(t,e){const{x:n,y:s,base:i,width:l,height:o}=t.getProps(["x","y","base","width","height"],e);let r,u,f,h,p;return t.horizontal?(p=o/2,r=Math.min(n,i),u=Math.max(n,i),f=s-p,h=s+p):(p=l/2,r=n-p,u=n+p,f=Math.min(s,i),h=Math.max(s,i)),{left:r,top:f,right:u,bottom:h}}function li(t,e,n,s){return t?0:Zn(e,n,s)}function $_(t,e,n){const s=t.options.borderWidth,i=t.borderSkipped,l=Gd(s);return{t:li(i.top,l.top,0,n),r:li(i.right,l.right,0,e),b:li(i.bottom,l.bottom,0,n),l:li(i.left,l.left,0,e)}}function e2(t,e,n){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,l=Ni(i),o=Math.min(e,n),r=t.borderSkipped,u=s||Tt(i);return{topLeft:li(!u||r.top||r.left,l.topLeft,0,o),topRight:li(!u||r.top||r.right,l.topRight,0,o),bottomLeft:li(!u||r.bottom||r.left,l.bottomLeft,0,o),bottomRight:li(!u||r.bottom||r.right,l.bottomRight,0,o)}}function t2(t){const e=gp(t),n=e.right-e.left,s=e.bottom-e.top,i=$_(t,n/2,s/2),l=e2(t,n/2,s/2);return{outer:{x:e.left,y:e.top,w:n,h:s,radius:l},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,l.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,l.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,l.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,l.bottomRight-Math.max(i.b,i.r))}}}}function ir(t,e,n,s){const i=e===null,l=n===null,r=t&&!(i&&l)&&gp(t,s);return r&&(i||ii(e,r.left,r.right))&&(l||ii(n,r.top,r.bottom))}function n2(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function s2(t,e){t.rect(e.x,e.y,e.w,e.h)}function lr(t,e,n={}){const s=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,l=(t.x+t.w!==n.x+n.w?e:0)-s,o=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+s,y:t.y+i,w:t.w+l,h:t.h+o,radius:t.radius}}class i2 extends Ks{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:s,backgroundColor:i}}=this,{inner:l,outer:o}=t2(this),r=n2(o.radius)?vo:s2;e.save(),(o.w!==l.w||o.h!==l.h)&&(e.beginPath(),r(e,lr(o,n,l)),e.clip(),r(e,lr(l,-n,o)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),r(e,lr(l,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,s){return ir(this,e,n,s)}inXRange(e,n){return ir(this,e,null,n)}inYRange(e,n){return ir(this,null,e,n)}getCenterPoint(e){const{x:n,y:s,base:i,horizontal:l}=this.getProps(["x","y","base","horizontal"],e);return{x:l?(n+i)/2:n,y:l?s:(s+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const Nu=(t,e)=>{let{boxHeight:n=e,boxWidth:s=e}=t;return t.usePointStyle&&(n=Math.min(n,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(e,n)}},l2=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class ju extends Ks{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,s){this.maxWidth=e,this.maxHeight=n,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 e=this.options.labels||{};let n=rn(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(s=>e.filter(s,this.chart.data))),e.sort&&(n=n.sort((s,i)=>e.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,i=Qn(s.font),l=i.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:u}=Nu(s,l);let f,h;n.font=i.string,this.isHorizontal()?(f=this.maxWidth,h=this._fitRows(o,l,r,u)+10):(h=this.maxHeight,f=this._fitCols(o,i,r,u)+10),this.width=Math.min(f,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,n,s,i){const{ctx:l,maxWidth:o,options:{labels:{padding:r}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],h=i+r;let p=e;l.textAlign="left",l.textBaseline="middle";let g=-1,m=-h;return this.legendItems.forEach((_,b)=>{const k=s+n/2+l.measureText(_.text).width;(b===0||f[f.length-1]+k+2*r>o)&&(p+=h,f[f.length-(b>0?0:1)]=0,m+=h,g++),u[b]={left:0,top:m,row:g,width:k,height:i},f[f.length-1]+=k+r}),p}_fitCols(e,n,s,i){const{ctx:l,maxHeight:o,options:{labels:{padding:r}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],h=o-e;let p=r,g=0,m=0,_=0,b=0;return this.legendItems.forEach((k,v)=>{const{itemWidth:y,itemHeight:S}=o2(s,n,l,k,i);v>0&&m+S+2*r>h&&(p+=g+r,f.push({width:g,height:m}),_+=g+r,b++,g=m=0),u[v]={left:_,top:m,col:b,width:y,height:S},g=Math.max(g,y),m+=S+r}),p+=g,f.push({width:g,height:m}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:l}}=this,o=ji(l,this.left,this.width);if(this.isHorizontal()){let r=0,u=Yn(s,this.left+i,this.right-this.lineWidths[r]);for(const f of n)r!==f.row&&(r=f.row,u=Yn(s,this.left+i,this.right-this.lineWidths[r])),f.top+=this.top+e+i,f.left=o.leftForLtr(o.x(u),f.width),u+=f.width+i}else{let r=0,u=Yn(s,this.top+e+i,this.bottom-this.columnSizes[r].height);for(const f of n)f.col!==r&&(r=f.col,u=Yn(s,this.top+e+i,this.bottom-this.columnSizes[r].height)),f.top=u,f.left+=this.left+i,f.left=o.leftForLtr(o.x(f.left),f.width),u+=f.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Zr(e,this),this._draw(),Qr(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:s,ctx:i}=this,{align:l,labels:o}=e,r=Sn.color,u=ji(e.rtl,this.left,this.width),f=Qn(o.font),{padding:h}=o,p=f.size,g=p/2;let m;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=f.string;const{boxWidth:_,boxHeight:b,itemHeight:k}=Nu(o,p),v=function(O,A,x){if(isNaN(_)||_<=0||isNaN(b)||b<0)return;i.save();const P=dt(x.lineWidth,1);if(i.fillStyle=dt(x.fillStyle,r),i.lineCap=dt(x.lineCap,"butt"),i.lineDashOffset=dt(x.lineDashOffset,0),i.lineJoin=dt(x.lineJoin,"miter"),i.lineWidth=P,i.strokeStyle=dt(x.strokeStyle,r),i.setLineDash(dt(x.lineDash,[])),o.usePointStyle){const D={radius:b*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:P},I=u.xPlus(O,_/2),R=A+g;qd(i,D,I,R,o.pointStyleWidth&&_)}else{const D=A+Math.max((p-b)/2,0),I=u.leftForLtr(O,_),R=Ni(x.borderRadius);i.beginPath(),Object.values(R).some(U=>U!==0)?vo(i,{x:I,y:D,w:_,h:b,radius:R}):i.rect(I,D,_,b),i.fill(),P!==0&&i.stroke()}i.restore()},y=function(O,A,x){Cl(i,x.text,O,A+k/2,f,{strikethrough:x.hidden,textAlign:u.textAlign(x.textAlign)})},S=this.isHorizontal(),C=this._computeTitleHeight();S?m={x:Yn(l,this.left+h,this.right-s[0]),y:this.top+h+C,line:0}:m={x:this.left+h,y:Yn(l,this.top+C+h,this.bottom-n[0].height),line:0},Qd(this.ctx,e.textDirection);const T=k+h;this.legendItems.forEach((O,A)=>{i.strokeStyle=O.fontColor,i.fillStyle=O.fontColor;const x=i.measureText(O.text).width,P=u.textAlign(O.textAlign||(O.textAlign=o.textAlign)),D=_+g+x;let I=m.x,R=m.y;u.setWidth(this.width),S?A>0&&I+D+h>this.right&&(R=m.y+=T,m.line++,I=m.x=Yn(l,this.left+h,this.right-s[m.line])):A>0&&R+T>this.bottom&&(I=m.x=I+n[m.line].width+h,m.line++,R=m.y=Yn(l,this.top+C+h,this.bottom-n[m.line].height));const U=u.x(I);if(v(U,R,O),I=Gm(P,I+_+g,S?I+D:this.right,e.rtl),y(u.x(I),R,O),S)m.x+=D+h;else if(typeof O.text!="string"){const N=f.lineHeight;m.y+=mp(O,N)+h}else m.y+=T}),$d(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,s=Qn(n.font),i=Ts(n.padding);if(!n.display)return;const l=ji(e.rtl,this.left,this.width),o=this.ctx,r=n.position,u=s.size/2,f=i.top+u;let h,p=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),h=this.top+f,p=Yn(e.align,p,this.right-g);else{const _=this.columnSizes.reduce((b,k)=>Math.max(b,k.height),0);h=f+Yn(e.align,this.top,this.bottom-_-e.labels.padding-this._computeTitleHeight())}const m=Yn(r,p,p+g);o.textAlign=l.textAlign(Yr(r)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=s.string,Cl(o,n.text,m,h,s)}_computeTitleHeight(){const e=this.options.title,n=Qn(e.font),s=Ts(e.padding);return e.display?n.lineHeight+s.height:0}_getLegendItemAt(e,n){let s,i,l;if(ii(e,this.left,this.right)&&ii(n,this.top,this.bottom)){for(l=this.legendHitBoxes,s=0;s<l.length;++s)if(i=l[s],ii(e,i.left,i.left+i.width)&&ii(n,i.top,i.top+i.height))return this.legendItems[s]}return null}handleEvent(e){const n=this.options;if(!u2(e.type,n))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,l=l2(i,s);i&&!l&&rn(n.onLeave,[e,i,this],this),this._hoveredItem=s,s&&!l&&rn(n.onHover,[e,s,this],this)}else s&&rn(n.onClick,[e,s,this],this)}}function o2(t,e,n,s,i){const l=r2(s,t,e,n),o=a2(i,s,e.lineHeight);return{itemWidth:l,itemHeight:o}}function r2(t,e,n,s){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((l,o)=>l.length>o.length?l:o)),e+n.size/2+s.measureText(i).width}function a2(t,e,n){let s=t;return typeof e.text!="string"&&(s=mp(e,n)),s}function mp(t,e){const n=t.text?t.text.length:0;return e*n}function u2(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var oa={id:"legend",_element:ju,start(t,e,n){const s=t.legend=new ju({ctx:t.ctx,options:n,chart:t});ks.configure(t,s,n),ks.addBox(t,s)},stop(t){ks.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const s=t.legend;ks.configure(t,s,n),s.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const s=e.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),e.hidden=!0):(i.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:s,textAlign:i,color:l,useBorderRadius:o,borderRadius:r}}=t.legend.options;return t._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(n?0:void 0),h=Ts(f.borderWidth);return{text:e[u.index].label,fillStyle:f.backgroundColor,fontColor:l,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:f.borderColor,pointStyle:s||f.pointStyle,rotation:f.rotation,textAlign:i||f.textAlign,borderRadius:o&&(r||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class bp extends Ks{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){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=e,this.height=this.bottom=n;const i=On(s.text)?s.text.length:1;this._padding=Ts(s.padding);const l=i*Qn(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=l:this.width=l}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:s,bottom:i,right:l,options:o}=this,r=o.align;let u=0,f,h,p;return this.isHorizontal()?(h=Yn(r,s,l),p=n+e,f=l-s):(o.position==="left"?(h=s+e,p=Yn(r,i,n),u=Nt*-.5):(h=l-e,p=Yn(r,n,i),u=Nt*.5),f=i-n),{titleX:h,titleY:p,maxWidth:f,rotation:u}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const s=Qn(n.font),l=s.lineHeight/2+this._padding.top,{titleX:o,titleY:r,maxWidth:u,rotation:f}=this._drawArgs(l);Cl(e,n.text,0,0,s,{color:n.color,maxWidth:u,rotation:f,textAlign:Yr(n.align),textBaseline:"middle",translation:[o,r]})}}function c2(t,e){const n=new bp({ctx:t.ctx,options:e,chart:t});ks.configure(t,n,e),ks.addBox(t,n),t.titleBlock=n}var f2={id:"title",_element:bp,start(t,e,n){c2(t,n)},stop(t){const e=t.titleBlock;ks.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const s=t.titleBlock;ks.configure(t,s,n),s.options=n},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 cl={average(t){if(!t.length)return!1;let e,n,s=new Set,i=0,l=0;for(e=0,n=t.length;e<n;++e){const r=t[e].element;if(r&&r.hasValue()){const u=r.tooltipPosition();s.add(u.x),i+=u.y,++l}}return l===0||s.size===0?!1:{x:[...s].reduce((r,u)=>r+u)/s.size,y:i/l}},nearest(t,e){if(!t.length)return!1;let n=e.x,s=e.y,i=Number.POSITIVE_INFINITY,l,o,r;for(l=0,o=t.length;l<o;++l){const u=t[l].element;if(u&&u.hasValue()){const f=u.getCenterPoint(),h=Er(e,f);h<i&&(i=h,r=u)}}if(r){const u=r.tooltipPosition();n=u.x,s=u.y}return{x:n,y:s}}};function Ls(t,e){return e&&(On(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Vs(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(\`
21212
+ */class tb{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,s,i){const l=n.listeners[i],o=n.duration;l.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(s-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Xd.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((s,i)=>{if(!s.running||!s.items.length)return;const l=s.items;let o=l.length-1,a=!1,u;for(;o>=0;--o)u=l[o],u._active?(u._total>s.duration&&(s.duration=u._total),u.tick(e),a=!0):(l[o]=l[l.length-1],l.pop());a&&(i.draw(),this._notify(i,s,e,"progress")),l.length||(s.running=!1,this._notify(i,s,e,"complete"),s.initial=!1),n+=l.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let s=n.get(e);return s||(s={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,s)),s}listen(e,n,s){this._getAnims(e).listeners[n].push(s)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((s,i)=>Math.max(s,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const s=n.items;let i=s.length-1;for(;i>=0;--i)s[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Vs=new tb;const pu="transparent",nb={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const s=su(t||pu),i=s.valid&&su(e||pu);return i&&i.valid?i.mix(s,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class sb{constructor(e,n,s,i){const l=n[s];i=Xl([e.to,i,l,e.from]);const o=Xl([e.from,l,i]);this._active=!0,this._fn=e.fn||nb[e.type||typeof o],this._easing=bl[e.easing]||bl.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=s,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,s){if(this._active){this._notify(!1);const i=this._target[this._prop],l=s-this._start,o=this._duration-l;this._start=s,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Xl([e.to,n,i,e.from]),this._from=Xl([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,s=this._duration,i=this._prop,l=this._from,o=this._loop,a=this._to;let u;if(this._active=l!==a&&(o||n<s),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=l;return}u=n/s%2,u=o&&u>1?2-u:u,u=this._easing(Math.min(1,Math.max(0,u))),this._target[i]=this._fn(l,a,u)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,s)=>{e.push({res:n,rej:s})})}_notify(e){const n=e?"res":"rej",s=this._promises||[];for(let i=0;i<s.length;i++)s[i][n]()}}class op{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Ot(e))return;const n=Object.keys(En.animation),s=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const l=e[i];if(!Ot(l))return;const o={};for(const a of n)o[a]=l[a];(xn(l.properties)&&l.properties||[i]).forEach(a=>{(a===i||!s.has(a))&&s.set(a,o)})})}_animateOptions(e,n){const s=n.options,i=lb(e,s);if(!i)return[];const l=this._createAnimations(i,s);return s.$shared&&ib(e.options.$animations,s).then(()=>{e.options=s},()=>{}),l}_createAnimations(e,n){const s=this._properties,i=[],l=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let u;for(u=o.length-1;u>=0;--u){const f=o[u];if(f.charAt(0)==="$")continue;if(f==="options"){i.push(...this._animateOptions(e,n));continue}const h=n[f];let p=l[f];const g=s.get(f);if(p)if(g&&p.active()){p.update(g,h,a);continue}else p.cancel();if(!g||!g.duration){e[f]=h;continue}l[f]=p=new sb(g,e,f,h),i.push(p)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const s=this._createAnimations(e,n);if(s.length)return Vs.add(this._chart,s),!0}}function ib(t,e){const n=[],s=Object.keys(e);for(let i=0;i<s.length;i++){const l=t[s[i]];l&&l.active()&&n.push(l.wait())}return Promise.all(n)}function lb(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function gu(t,e){const n=t&&t.options||{},s=n.reverse,i=n.min===void 0?e:0,l=n.max===void 0?e:0;return{start:s?l:i,end:s?i:l}}function ob(t,e,n){if(n===!1)return!1;const s=gu(t,n),i=gu(e,n);return{top:i.end,right:s.end,bottom:i.start,left:s.start}}function rb(t){let e,n,s,i;return Ot(t)?(e=t.top,n=t.right,s=t.bottom,i=t.left):e=n=s=i=t,{top:e,right:n,bottom:s,left:i,disabled:t===!1}}function rp(t,e){const n=[],s=t._getSortedDatasetMetas(e);let i,l;for(i=0,l=s.length;i<l;++i)n.push(s[i].index);return n}function mu(t,e,n,s={}){const i=t.keys,l=s.mode==="single";let o,a,u,f;if(e===null)return;let h=!1;for(o=0,a=i.length;o<a;++o){if(u=+i[o],u===n){if(h=!0,s.all)continue;break}f=t.values[u],Es(f)&&(l||e===0||Bs(e)===Bs(f))&&(e+=f)}return!h&&!s.all?0:e}function ab(t,e){const{iScale:n,vScale:s}=e,i=n.axis==="x"?"x":"y",l=s.axis==="x"?"x":"y",o=Object.keys(t),a=new Array(o.length);let u,f,h;for(u=0,f=o.length;u<f;++u)h=o[u],a[u]={[i]:h,[l]:t[h]};return a}function $o(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function ub(t,e,n){return\`\${t.id}.\${e.id}.\${n.stack||n.type}\`}function cb(t){const{min:e,max:n,minDefined:s,maxDefined:i}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function fb(t,e,n){const s=t[e]||(t[e]={});return s[n]||(s[n]={})}function bu(t,e,n,s){for(const i of e.getMatchingVisibleMetas(s).reverse()){const l=t[i.index];if(n&&l>0||!n&&l<0)return i.index}return null}function _u(t,e){const{chart:n,_cachedMeta:s}=t,i=n._stacks||(n._stacks={}),{iScale:l,vScale:o,index:a}=s,u=l.axis,f=o.axis,h=ub(l,o,s),p=e.length;let g;for(let m=0;m<p;++m){const b=e[m],{[u]:_,[f]:y}=b,k=b._stacks||(b._stacks={});g=k[f]=fb(i,h,_),g[a]=y,g._top=bu(g,o,!0,s.type),g._bottom=bu(g,o,!1,s.type);const w=g._visualValues||(g._visualValues={});w[a]=y}}function er(t,e){const n=t.scales;return Object.keys(n).filter(s=>n[s].axis===e).shift()}function hb(t,e){return xi(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function db(t,e,n){return xi(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function el(t,e){const n=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const i of e){const l=i._stacks;if(!l||l[s]===void 0||l[s][n]===void 0)return;delete l[s][n],l[s]._visualValues!==void 0&&l[s]._visualValues[n]!==void 0&&delete l[s]._visualValues[n]}}}const tr=t=>t==="reset"||t==="none",vu=(t,e)=>e?t:Object.assign({},t),pb=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:rp(n,!0),values:null};class Ro{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=$o(e.vScale,e),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(e){this.index!==e&&el(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,s=this.getDataset(),i=(p,g,m,b)=>p==="x"?g:p==="r"?b:m,l=n.xAxisID=bt(s.xAxisID,er(e,"x")),o=n.yAxisID=bt(s.yAxisID,er(e,"y")),a=n.rAxisID=bt(s.rAxisID,er(e,"r")),u=n.indexAxis,f=n.iAxisID=i(u,l,o,a),h=n.vAxisID=i(u,o,l,a);n.xScale=this.getScaleForId(l),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(f),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&eu(this._data,this),e._stacked&&el(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),s=this._data;if(Ot(n)){const i=this._cachedMeta;this._data=ab(n,i)}else if(s!==n){if(s){eu(s,this);const i=this._cachedMeta;el(i),i._parsed=[]}n&&Object.isExtensible(n)&&Xm(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,s=this.getDataset();let i=!1;this._dataCheck();const l=n._stacked;n._stacked=$o(n.vScale,n),n.stack!==s.stack&&(i=!0,el(n),n.stack=s.stack),this._resyncElements(e),(i||l!==n._stacked)&&(_u(this,n._parsed),n._stacked=$o(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),s=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(s,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:s,_data:i}=this,{iScale:l,_stacked:o}=s,a=l.axis;let u=e===0&&n===i.length?!0:s._sorted,f=e>0&&s._parsed[e-1],h,p,g;if(this._parsing===!1)s._parsed=i,s._sorted=!0,g=i;else{xn(i[e])?g=this.parseArrayData(s,i,e,n):Ot(i[e])?g=this.parseObjectData(s,i,e,n):g=this.parsePrimitiveData(s,i,e,n);const m=()=>p[a]===null||f&&p[a]<f[a];for(h=0;h<n;++h)s._parsed[h+e]=p=g[h],u&&(m()&&(u=!1),f=p);s._sorted=u}o&&_u(this,g)}parsePrimitiveData(e,n,s,i){const{iScale:l,vScale:o}=e,a=l.axis,u=o.axis,f=l.getLabels(),h=l===o,p=new Array(i);let g,m,b;for(g=0,m=i;g<m;++g)b=g+s,p[g]={[a]:h||l.parse(f[b],b),[u]:o.parse(n[b],b)};return p}parseArrayData(e,n,s,i){const{xScale:l,yScale:o}=e,a=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+s,p=n[h],a[u]={x:l.parse(p[0],h),y:o.parse(p[1],h)};return a}parseObjectData(e,n,s,i){const{xScale:l,yScale:o}=e,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,f=new Array(i);let h,p,g,m;for(h=0,p=i;h<p;++h)g=h+s,m=n[g],f[h]={x:l.parse(Mi(m,a),g),y:o.parse(Mi(m,u),g)};return f}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,s){const i=this.chart,l=this._cachedMeta,o=n[e.axis],a={keys:rp(i,!0),values:n._stacks[e.axis]._visualValues};return mu(a,o,l.index,{mode:s})}updateRangeFromParsed(e,n,s,i){const l=s[n.axis];let o=l===null?NaN:l;const a=i&&s._stacks[n.axis];i&&a&&(i.values=a,o=mu(i,l,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const s=this._cachedMeta,i=s._parsed,l=s._sorted&&e===s.iScale,o=i.length,a=this._getOtherScale(e),u=pb(n,s,this.chart),f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=cb(a);let g,m;function b(){m=i[g];const _=m[a.axis];return!Es(m[e.axis])||h>_||p<_}for(g=0;g<o&&!(!b()&&(this.updateRangeFromParsed(f,e,m,u),l));++g);if(l){for(g=o-1;g>=0;--g)if(!b()){this.updateRangeFromParsed(f,e,m,u);break}}return f}getAllParsedValues(e){const n=this._cachedMeta._parsed,s=[];let i,l,o;for(i=0,l=n.length;i<l;++i)o=n[i][e.axis],Es(o)&&s.push(o);return s}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,s=n.iScale,i=n.vScale,l=this.getParsed(e);return{label:s?""+s.getLabelForValue(l[s.axis]):"",value:i?""+i.getLabelForValue(l[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=rb(bt(this.options.clip,ob(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,s=this._cachedMeta,i=s.data||[],l=n.chartArea,o=[],a=this._drawStart||0,u=this._drawCount||i.length-a,f=this.options.drawActiveElementsOnTop;let h;for(s.dataset&&s.dataset.draw(e,l,a,u),h=a;h<a+u;++h){const p=i[h];p.hidden||(p.active&&f?o.push(p):p.draw(e,l))}for(h=0;h<o.length;++h)o[h].draw(e,l)}getStyle(e,n){const s=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(s):this.resolveDataElementOptions(e||0,s)}getContext(e,n,s){const i=this.getDataset();let l;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];l=o.$context||(o.$context=db(this.getContext(),e,o)),l.parsed=this.getParsed(e),l.raw=i.data[e],l.index=l.dataIndex=e}else l=this.$context||(this.$context=hb(this.chart.getContext(),this.index)),l.dataset=i,l.index=l.datasetIndex=this.index;return l.active=!!n,l.mode=s,l}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",s){const i=n==="active",l=this._cachedDataOpts,o=e+"-"+n,a=l[o],u=this.enableOptionSharing&&El(s);if(a)return vu(a,u);const f=this.chart.config,h=f.datasetElementScopeKeys(this._type,e),p=i?[\`\${e}Hover\`,"hover",e,""]:[e,""],g=f.getOptionScopes(this.getDataset(),h),m=Object.keys(En.elements[e]),b=()=>this.getContext(s,i,n),_=f.resolveNamedOptions(g,m,b,p);return _.$shared&&(_.$shared=u,l[o]=Object.freeze(vu(_,u))),_}_resolveAnimations(e,n,s){const i=this.chart,l=this._cachedDataOpts,o=\`animation-\${n}\`,a=l[o];if(a)return a;let u;if(i.options.animation!==!1){const h=this.chart.config,p=h.datasetAnimationScopeKeys(this._type,n),g=h.getOptionScopes(this.getDataset(),p);u=h.createResolver(g,this.getContext(e,s,n))}const f=new op(i,u&&u.animations);return u&&u._cacheable&&(l[o]=Object.freeze(f)),f}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||tr(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const s=this.resolveDataElementOptions(e,n),i=this._sharedOptions,l=this.getSharedOptions(s),o=this.includeOptions(n,l)||l!==i;return this.updateSharedOptions(l,n,s),{sharedOptions:l,includeOptions:o}}updateElement(e,n,s,i){tr(i)?Object.assign(e,s):this._resolveAnimations(n,i).update(e,s)}updateSharedOptions(e,n,s){e&&!tr(n)&&this._resolveAnimations(void 0,n).update(e,s)}_setStyle(e,n,s,i){e.active=i;const l=this.getStyle(n,i);this._resolveAnimations(n,s,i).update(e,{options:!i&&this.getSharedOptions(l)||l})}removeHoverStyle(e,n,s){this._setStyle(e,s,"active",!1)}setHoverStyle(e,n,s){this._setStyle(e,s,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,s=this._cachedMeta.data;for(const[a,u,f]of this._syncList)this[a](u,f);this._syncList=[];const i=s.length,l=n.length,o=Math.min(l,i);o&&this.parse(0,o),l>i?this._insertElements(i,l-i,e):l<i&&this._removeElements(l,i-l)}_insertElements(e,n,s=!0){const i=this._cachedMeta,l=i.data,o=e+n;let a;const u=f=>{for(f.length+=n,a=f.length-1;a>=o;a--)f[a]=f[a-n]};for(u(l),a=e;a<o;++a)l[a]=new this.dataElementType;this._parsing&&u(i._parsed),this.parse(e,n),s&&this.updateElements(l,e,n,"reset")}updateElements(e,n,s,i){}_removeElements(e,n){const s=this._cachedMeta;if(this._parsing){const i=s._parsed.splice(e,n);s._stacked&&el(s,i)}s.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,s,i]=e;this[n](s,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const s=arguments.length-2;s&&this._sync(["_insertElements",e,s])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function gb(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let s=[];for(let i=0,l=n.length;i<l;i++)s=s.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=Gd(s.sort((i,l)=>i-l))}return t._cache.$bar}function mb(t){const e=t.iScale,n=gb(e,t.type);let s=e._length,i,l,o,a;const u=()=>{o===32767||o===-32768||(El(a)&&(s=Math.min(s,Math.abs(o-a)||s)),a=o)};for(i=0,l=n.length;i<l;++i)o=e.getPixelForValue(n[i]),u();for(a=void 0,i=0,l=e.ticks.length;i<l;++i)o=e.getPixelForTick(i),u();return s}function bb(t,e,n,s){const i=n.barThickness;let l,o;return Ft(i)?(l=e.min*n.categoryPercentage,o=n.barPercentage):(l=i*s,o=1),{chunk:l/s,ratio:o,start:e.pixels[t]-l/2}}function _b(t,e,n,s){const i=e.pixels,l=i[t];let o=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const u=n.categoryPercentage;o===null&&(o=l-(a===null?e.end-e.start:a-l)),a===null&&(a=l+l-o);const f=l-(l-Math.min(o,a))/2*u;return{chunk:Math.abs(a-o)/2*u/s,ratio:n.barPercentage,start:f}}function vb(t,e,n,s){const i=n.parse(t[0],s),l=n.parse(t[1],s),o=Math.min(i,l),a=Math.max(i,l);let u=o,f=a;Math.abs(o)>Math.abs(a)&&(u=a,f=o),e[n.axis]=f,e._custom={barStart:u,barEnd:f,start:i,end:l,min:o,max:a}}function ap(t,e,n,s){return xn(t)?vb(t,e,n,s):e[n.axis]=n.parse(t,s),e}function yu(t,e,n,s){const i=t.iScale,l=t.vScale,o=i.getLabels(),a=i===l,u=[];let f,h,p,g;for(f=n,h=n+s;f<h;++f)g=e[f],p={},p[i.axis]=a||i.parse(o[f],f),u.push(ap(g,p,l,f));return u}function nr(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function yb(t,e,n){return t!==0?Bs(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function wb(t){let e,n,s,i,l;return t.horizontal?(e=t.base>t.x,n="left",s="right"):(e=t.base<t.y,n="bottom",s="top"),e?(i="end",l="start"):(i="start",l="end"),{start:n,end:s,reverse:e,top:i,bottom:l}}function kb(t,e,n,s){let i=e.borderSkipped;const l={};if(!i){t.borderSkipped=l;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:u,top:f,bottom:h}=wb(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===s?i=f:(n._bottom||0)===s?i=h:(l[wu(h,o,a,u)]=!0,i=f)),l[wu(i,o,a,u)]=!0,t.borderSkipped=l}function wu(t,e,n,s){return s?(t=Sb(t,e,n),t=ku(t,n,e)):t=ku(t,e,n),t}function Sb(t,e,n){return t===e?n:t===n?e:t}function ku(t,e,n){return t==="start"?e:t==="end"?n:t}function Eb(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Tb extends Ro{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(e,n,s,i){return yu(e,n,s,i)}parseArrayData(e,n,s,i){return yu(e,n,s,i)}parseObjectData(e,n,s,i){const{iScale:l,vScale:o}=e,{xAxisKey:a="x",yAxisKey:u="y"}=this._parsing,f=l.axis==="x"?a:u,h=o.axis==="x"?a:u,p=[];let g,m,b,_;for(g=s,m=s+i;g<m;++g)_=n[g],b={},b[l.axis]=l.parse(Mi(_,f),g),p.push(ap(Mi(_,h),b,o,g));return p}updateRangeFromParsed(e,n,s,i){super.updateRangeFromParsed(e,n,s,i);const l=s._custom;l&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,l.min),e.max=Math.max(e.max,l.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:s,vScale:i}=n,l=this.getParsed(e),o=l._custom,a=nr(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(l[i.axis]);return{label:""+s.getLabelForValue(l[s.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,s,i){const l=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,u=a.getBasePixel(),f=a.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);for(let m=n;m<n+s;m++){const b=this.getParsed(m),_=l||Ft(b[a.axis])?{base:u,head:u}:this._calculateBarValuePixels(m),y=this._calculateBarIndexPixels(m,h),k=(b._stacks||{})[a.axis],w={horizontal:f,base:_.base,enableBorderRadius:!k||nr(b._custom)||o===k._top||o===k._bottom,x:f?_.head:y.center,y:f?y.center:_.head,height:f?y.size:Math.abs(_.size),width:f?Math.abs(_.size):y.size};g&&(w.options=p||this.resolveDataElementOptions(m,e[m].active?"active":i));const S=w.options||e[m].options;kb(w,S,k,o),Eb(w,S,h.ratio),this.updateElement(e[m],m,w,i)}}_getStacks(e,n){const{iScale:s}=this._cachedMeta,i=s.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),l=s.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),u=a&&a[s.axis],f=h=>{const p=h._parsed.find(m=>m[s.axis]===u),g=p&&p[h.vScale.axis];if(Ft(g)||isNaN(g))return!0};for(const h of i)if(!(n!==void 0&&f(h))&&((l===!1||o.indexOf(h.stack)===-1||l===void 0&&h.stack===void 0)&&o.push(h.stack),h.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(s=>e[s].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const s of this.chart.data.datasets)e[bt(this.chart.options.indexAxis==="x"?s.xAxisID:s.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,s){const i=this._getStacks(e,s),l=n!==void 0?i.indexOf(n):-1;return l===-1?i.length-1:l}_getRuler(){const e=this.options,n=this._cachedMeta,s=n.iScale,i=[];let l,o;for(l=0,o=n.data.length;l<o;++l)i.push(s.getPixelForValue(this.getParsed(l)[s.axis],l));const a=e.barThickness;return{min:a||mb(n),pixels:i,start:s._startPixel,end:s._endPixel,stackCount:this._getStackCount(),scale:s,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:s,index:i},options:{base:l,minBarLength:o}}=this,a=l||0,u=this.getParsed(e),f=u._custom,h=nr(f);let p=u[n.axis],g=0,m=s?this.applyStack(n,u,s):p,b,_;m!==p&&(g=m-p,m=p),h&&(p=f.barStart,m=f.barEnd-f.barStart,p!==0&&Bs(p)!==Bs(f.barEnd)&&(g=0),g+=p);const y=!Ft(l)&&!h?l:g;let k=n.getPixelForValue(y);if(this.chart.getDataVisibility(e)?b=n.getPixelForValue(g+m):b=k,_=b-k,Math.abs(_)<o){_=yb(_,n,a)*o,p===a&&(k-=_/2);const w=n.getPixelForDecimal(0),S=n.getPixelForDecimal(1),P=Math.min(w,S),M=Math.max(w,S);k=Math.max(Math.min(k,M),P),b=k+_,s&&!h&&(u._stacks[n.axis]._visualValues[i]=n.getValueForPixel(b)-n.getValueForPixel(k))}if(k===n.getPixelForValue(a)){const w=Bs(_)*n.getLineWidthForValue(a)/2;k+=w,_-=w}return{size:_,base:k,head:b,center:b+_/2}}_calculateBarIndexPixels(e,n){const s=n.scale,i=this.options,l=i.skipNull,o=bt(i.maxBarThickness,1/0);let a,u;const f=this._getAxisCount();if(n.grouped){const h=l?this._getStackCount(e):n.stackCount,p=i.barThickness==="flex"?_b(e,n,i,h*f):bb(e,n,i,h*f),g=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(bt(g,this.getFirstScaleIdForIndexAxis())),b=this._getStackIndex(this.index,this._cachedMeta.stack,l?e:void 0)+m;a=p.start+p.chunk*b+p.chunk/2,u=Math.min(o,p.chunk*p.ratio)}else a=s.getPixelForValue(this.getParsed(e)[s.axis],e),u=Math.min(o,n.min*n.ratio);return{base:a-u/2,head:a+u/2,center:a,size:u}}draw(){const e=this._cachedMeta,n=e.vScale,s=e.data,i=s.length;let l=0;for(;l<i;++l)this.getParsed(l)[n.axis]!==null&&!s[l].hidden&&s[l].draw(this._ctx)}}function Mb(t,e,n){let s=1,i=1,l=0,o=0;if(e<kn){const a=t,u=a+e,f=Math.cos(a),h=Math.sin(a),p=Math.cos(u),g=Math.sin(u),m=(S,P,M)=>Ml(S,a,u,!0)?1:Math.max(P,P*n,M,M*n),b=(S,P,M)=>Ml(S,a,u,!0)?-1:Math.min(P,P*n,M,M*n),_=m(0,f,p),y=m(On,h,g),k=b(Wt,f,p),w=b(Wt+On,h,g);s=(_-k)/2,i=(y-w)/2,l=-(_+k)/2,o=-(y+w)/2}return{ratioX:s,ratioY:i,offsetX:l,offsetY:o}}class Cb extends Ro{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:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:s,color:i}}=e.legend.options;return n.labels.map((l,o)=>{const u=e.getDatasetMeta(0).controller.getStyle(o);return{text:l,fillStyle:u.backgroundColor,strokeStyle:u.borderColor,fontColor:i,lineWidth:u.borderWidth,pointStyle:s,hidden:!e.getDataVisibility(o),index:o}})}return[]}},onClick(e,n,s){s.chart.toggleDataVisibility(n.index),s.chart.update()}}}};constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const s=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=s;else{let l=u=>+s[u];if(Ot(s[e])){const{key:u="value"}=this._parsing;l=f=>+Mi(s[f],u)}let o,a;for(o=e,a=e+n;o<a;++o)i._parsed[o]=l(o)}}_getRotation(){return Gs(this.options.rotation-90)}_getCircumference(){return Gs(this.options.circumference)}_getRotationExtents(){let e=kn,n=-kn;for(let s=0;s<this.chart.data.datasets.length;++s)if(this.chart.isDatasetVisible(s)&&this.chart.getDatasetMeta(s).type===this._type){const i=this.chart.getDatasetMeta(s).controller,l=i._getRotation(),o=i._getCircumference();e=Math.min(e,l),n=Math.max(n,l+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:s}=n,i=this._cachedMeta,l=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(l)+this.options.spacing,a=Math.max((Math.min(s.width,s.height)-o)/2,0),u=Math.min(xm(this.options.cutout,a),1),f=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:g,ratioY:m,offsetX:b,offsetY:_}=Mb(p,h,u),y=(s.width-o)/g,k=(s.height-o)/m,w=Math.max(Math.min(y,k)/2,0),S=zd(this.options.radius,w),P=Math.max(S*u,0),M=(S-P)/this._getVisibleDatasetWeightTotal();this.offsetX=b*S,this.offsetY=_*S,i.total=this.calculateTotal(),this.outerRadius=S-M*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-M*f,0),this.updateElements(l,0,l.length,e)}_circumference(e,n){const s=this.options,i=this._cachedMeta,l=this._getCircumference();return n&&s.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*l/kn)}updateElements(e,n,s,i){const l=i==="reset",o=this.chart,a=o.chartArea,f=o.options.animation,h=(a.left+a.right)/2,p=(a.top+a.bottom)/2,g=l&&f.animateScale,m=g?0:this.innerRadius,b=g?0:this.outerRadius,{sharedOptions:_,includeOptions:y}=this._getSharedOptions(n,i);let k=this._getRotation(),w;for(w=0;w<n;++w)k+=this._circumference(w,l);for(w=n;w<n+s;++w){const S=this._circumference(w,l),P=e[w],M={x:h+this.offsetX,y:p+this.offsetY,startAngle:k,endAngle:k+S,circumference:S,outerRadius:b,innerRadius:m};y&&(M.options=_||this.resolveDataElementOptions(w,P.active?"active":i)),k+=S,this.updateElement(P,w,M,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let s=0,i;for(i=0;i<n.length;i++){const l=e._parsed[i];l!==null&&!isNaN(l)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(s+=Math.abs(l))}return s}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?kn*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,s=this.chart,i=s.data.labels||[],l=$r(n._parsed[e],s.options.locale);return{label:i[e]||"",value:l}}getMaxBorderWidth(e){let n=0;const s=this.chart;let i,l,o,a,u;if(!e){for(i=0,l=s.data.datasets.length;i<l;++i)if(s.isDatasetVisible(i)){o=s.getDatasetMeta(i),e=o.data,a=o.controller;break}}if(!e)return 0;for(i=0,l=e.length;i<l;++i)u=a.resolveDataElementOptions(i),u.borderAlign!=="inner"&&(n=Math.max(n,u.borderWidth||0,u.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let s=0,i=e.length;s<i;++s){const l=this.resolveDataElementOptions(s);n=Math.max(n,l.offset||0,l.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let s=0;s<e;++s)this.chart.isDatasetVisible(s)&&(n+=this._getRingWeight(s));return n}_getRingWeight(e){return Math.max(bt(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Pb extends Ro{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(e){const n=this._cachedMeta,{dataset:s,data:i=[],_dataset:l}=n,o=this.chart._animationsDisabled;let{start:a,count:u}=Km(n,i,o);this._drawStart=a,this._drawCount=u,Zm(n)&&(a=0,u=i.length),s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!l._decimated,s.points=i;const f=this.resolveDatasetElementOptions(e);this.options.showLine||(f.borderWidth=0),f.segment=this.options.segment,this.updateElement(s,void 0,{animated:!o,options:f},e),this.updateElements(i,a,u,e)}updateElements(e,n,s,i){const l=i==="reset",{iScale:o,vScale:a,_stacked:u,_dataset:f}=this._cachedMeta,{sharedOptions:h,includeOptions:p}=this._getSharedOptions(n,i),g=o.axis,m=a.axis,{spanGaps:b,segment:_}=this.options,y=Tl(b)?b:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||l||i==="none",w=n+s,S=e.length;let P=n>0&&this.getParsed(n-1);for(let M=0;M<S;++M){const x=e[M],A=k?x:{};if(M<n||M>=w){A.skip=!0;continue}const O=this.getParsed(M),C=Ft(O[m]),R=A[g]=o.getPixelForValue(O[g],M),L=A[m]=l||C?a.getBasePixel():a.getPixelForValue(u?this.applyStack(a,O,u):O[m],M);A.skip=isNaN(R)||isNaN(L)||C,A.stop=M>0&&Math.abs(O[g]-P[g])>y,_&&(A.parsed=O,A.raw=f.data[M]),p&&(A.options=h||this.resolveDataElementOptions(M,x.active?"active":i)),k||this.updateElement(x,M,A,i),P=O}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,s=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return s;const l=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(s,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}function vi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class aa{static override(e){Object.assign(aa.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return vi()}parse(){return vi()}format(){return vi()}add(){return vi()}diff(){return vi()}startOf(){return vi()}endOf(){return vi()}}var Ab={_date:aa};function xb(t,e,n,s){const{controller:i,data:l,_sorted:o}=t,a=i._cachedMeta.iScale,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&e!=="r"&&o&&l.length){const f=a._reversePixels?qm:Si;if(s){if(i._sharedOptions){const h=l[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const g=f(l,e,n-p),m=f(l,e,n+p);return{lo:g.lo,hi:m.hi}}}}else{const h=f(l,e,n);if(u){const{vScale:p}=i._cachedMeta,{_parsed:g}=t,m=g.slice(0,h.lo+1).reverse().findIndex(_=>!Ft(_[p.axis]));h.lo-=Math.max(0,m);const b=g.slice(h.hi).findIndex(_=>!Ft(_[p.axis]));h.hi+=Math.max(0,b)}return h}}return{lo:0,hi:l.length-1}}function Do(t,e,n,s,i){const l=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,u=l.length;a<u;++a){const{index:f,data:h}=l[a],{lo:p,hi:g}=xb(l[a],e,o,i);for(let m=p;m<=g;++m){const b=h[m];b.skip||s(b,f,m)}}}function Ob(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(s,i){const l=e?Math.abs(s.x-i.x):0,o=n?Math.abs(s.y-i.y):0;return Math.sqrt(Math.pow(l,2)+Math.pow(o,2))}}function sr(t,e,n,s,i){const l=[];return!i&&!t.isPointInArea(e)||Do(t,n,e,function(a,u,f){!i&&!Cl(a,t.chartArea,0)||a.inRange(e.x,e.y,s)&&l.push({element:a,datasetIndex:u,index:f})},!0),l}function Rb(t,e,n,s){let i=[];function l(o,a,u){const{startAngle:f,endAngle:h}=o.getProps(["startAngle","endAngle"],s),{angle:p}=Wd(o,{x:e.x,y:e.y});Ml(p,f,h)&&i.push({element:o,datasetIndex:a,index:u})}return Do(t,n,e,l),i}function Db(t,e,n,s,i,l){let o=[];const a=Ob(n);let u=Number.POSITIVE_INFINITY;function f(h,p,g){const m=h.inRange(e.x,e.y,i);if(s&&!m)return;const b=h.getCenterPoint(i);if(!(!!l||t.isPointInArea(b))&&!m)return;const y=a(e,b);y<u?(o=[{element:h,datasetIndex:p,index:g}],u=y):y===u&&o.push({element:h,datasetIndex:p,index:g})}return Do(t,n,e,f),o}function ir(t,e,n,s,i,l){return!l&&!t.isPointInArea(e)?[]:n==="r"&&!s?Rb(t,e,n,i):Db(t,e,n,s,i,l)}function Su(t,e,n,s,i){const l=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Do(t,n,e,(u,f,h)=>{u[o]&&u[o](e[n],i)&&(l.push({element:u,datasetIndex:f,index:h}),a=a||u.inRange(e.x,e.y,i))}),s&&!a?[]:l}var Lb={modes:{index(t,e,n,s){const i=yi(e,t),l=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?sr(t,i,l,s,o):ir(t,i,l,!1,s,o),u=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(f=>{const h=a[0].index,p=f.data[h];p&&!p.skip&&u.push({element:p,datasetIndex:f.index,index:h})}),u):[]},dataset(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?sr(t,i,l,s,o):ir(t,i,l,!1,s,o);if(a.length>0){const u=a[0].datasetIndex,f=t.getDatasetMeta(u).data;a=[];for(let h=0;h<f.length;++h)a.push({element:f[h],datasetIndex:u,index:h})}return a},point(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return sr(t,i,l,s,o)},nearest(t,e,n,s){const i=yi(e,t),l=n.axis||"xy",o=n.includeInvisible||!1;return ir(t,i,l,n.intersect,s,o)},x(t,e,n,s){const i=yi(e,t);return Su(t,i,"x",n.intersect,s)},y(t,e,n,s){const i=yi(e,t);return Su(t,i,"y",n.intersect,s)}}};const up=["left","top","right","bottom"];function tl(t,e){return t.filter(n=>n.pos===e)}function Eu(t,e){return t.filter(n=>up.indexOf(n.pos)===-1&&n.box.axis===e)}function nl(t,e){return t.sort((n,s)=>{const i=e?s:n,l=e?n:s;return i.weight===l.weight?i.index-l.index:i.weight-l.weight})}function Hb(t){const e=[];let n,s,i,l,o,a;for(n=0,s=(t||[]).length;n<s;++n)i=t[n],{position:l,options:{stack:o,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:l,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&l+o,stackWeight:a});return e}function Ib(t){const e={};for(const n of t){const{stack:s,pos:i,stackWeight:l}=n;if(!s||!up.includes(i))continue;const o=e[s]||(e[s]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=l}return e}function Bb(t,e){const n=Ib(t),{vBoxMaxWidth:s,hBoxMaxHeight:i}=e;let l,o,a;for(l=0,o=t.length;l<o;++l){a=t[l];const{fullSize:u}=a.box,f=n[a.stack],h=f&&a.stackWeight/f.weight;a.horizontal?(a.width=h?h*s:u&&e.availableWidth,a.height=i):(a.width=s,a.height=h?h*i:u&&e.availableHeight)}return n}function Fb(t){const e=Hb(t),n=nl(e.filter(f=>f.box.fullSize),!0),s=nl(tl(e,"left"),!0),i=nl(tl(e,"right")),l=nl(tl(e,"top"),!0),o=nl(tl(e,"bottom")),a=Eu(e,"x"),u=Eu(e,"y");return{fullSize:n,leftAndTop:s.concat(l),rightAndBottom:i.concat(u).concat(o).concat(a),chartArea:tl(e,"chartArea"),vertical:s.concat(i).concat(u),horizontal:l.concat(o).concat(a)}}function Tu(t,e,n,s){return Math.max(t[n],e[n])+Math.max(t[s],e[s])}function cp(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Nb(t,e,n,s){const{pos:i,box:l}=n,o=t.maxPadding;if(!Ot(i)){n.size&&(t[i]-=n.size);const p=s[n.stack]||{size:0,count:1};p.size=Math.max(p.size,n.horizontal?l.height:l.width),n.size=p.size/p.count,t[i]+=n.size}l.getPadding&&cp(o,l.getPadding());const a=Math.max(0,e.outerWidth-Tu(o,t,"left","right")),u=Math.max(0,e.outerHeight-Tu(o,t,"top","bottom")),f=a!==t.w,h=u!==t.h;return t.w=a,t.h=u,n.horizontal?{same:f,other:h}:{same:h,other:f}}function jb(t){const e=t.maxPadding;function n(s){const i=Math.max(e[s]-t[s],0);return t[s]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function zb(t,e){const n=e.maxPadding;function s(i){const l={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{l[o]=Math.max(e[o],n[o])}),l}return s(t?["left","right"]:["top","bottom"])}function ul(t,e,n,s){const i=[];let l,o,a,u,f,h;for(l=0,o=t.length,f=0;l<o;++l){a=t[l],u=a.box,u.update(a.width||e.w,a.height||e.h,zb(a.horizontal,e));const{same:p,other:g}=Nb(e,n,a,s);f|=p&&i.length,h=h||g,u.fullSize||i.push(a)}return f&&ul(i,e,n,s)||h}function Zl(t,e,n,s,i){t.top=n,t.left=e,t.right=e+s,t.bottom=n+i,t.width=s,t.height=i}function Mu(t,e,n,s){const i=n.padding;let{x:l,y:o}=e;for(const a of t){const u=a.box,f=s[a.stack]||{placed:0,weight:1},h=a.stackWeight/f.weight||1;if(a.horizontal){const p=e.w*h,g=f.size||u.height;El(f.start)&&(o=f.start),u.fullSize?Zl(u,i.left,o,n.outerWidth-i.right-i.left,g):Zl(u,e.left+f.placed,o,p,g),f.start=o,f.placed+=p,o=u.bottom}else{const p=e.h*h,g=f.size||u.width;El(f.start)&&(l=f.start),u.fullSize?Zl(u,l,i.top,g,n.outerHeight-i.bottom-i.top):Zl(u,l,e.top+f.placed,g,p),f.start=l,f.placed+=p,l=u.right}}e.x=l,e.y=o}var ks={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,s){if(!t)return;const i=Ts(t.options.layout.padding),l=Math.max(e-i.width,0),o=Math.max(n-i.height,0),a=Fb(t.boxes),u=a.vertical,f=a.horizontal;Vt(t.boxes,_=>{typeof _.beforeLayout=="function"&&_.beforeLayout()});const h=u.reduce((_,y)=>y.box.options&&y.box.options.display===!1?_:_+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/h,hBoxMaxHeight:o/2}),g=Object.assign({},i);cp(g,Ts(s));const m=Object.assign({maxPadding:g,w:l,h:o,x:i.left,y:i.top},i),b=Bb(u.concat(f),p);ul(a.fullSize,m,p,b),ul(u,m,p,b),ul(f,m,p,b)&&ul(u,m,p,b),jb(m),Mu(a.leftAndTop,m,p,b),m.x+=m.w,m.y+=m.h,Mu(a.rightAndBottom,m,p,b),t.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},Vt(a.chartArea,_=>{const y=_.box;Object.assign(y,t.chartArea),y.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class fp{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,s){}removeEventListener(e,n,s){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,s,i){return n=Math.max(0,n||e.width),s=s||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):s)}}isAttached(e){return!0}updateConfig(e){}}class Ub extends fp{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const uo="$chartjs",Vb={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Cu=t=>t===null||t==="";function Wb(t,e){const n=t.style,s=t.getAttribute("height"),i=t.getAttribute("width");if(t[uo]={initial:{height:s,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Cu(i)){const l=cu(t,"width");l!==void 0&&(t.width=l)}if(Cu(s))if(t.style.height==="")t.height=t.width/(e||2);else{const l=cu(t,"height");l!==void 0&&(t.height=l)}return t}const hp=j1?{passive:!0}:!1;function qb(t,e,n){t&&t.addEventListener(e,n,hp)}function Gb(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,hp)}function Xb(t,e){const n=Vb[t.type]||t.type,{x:s,y:i}=yi(t,e);return{type:n,chart:e,native:t,x:s!==void 0?s:null,y:i!==void 0?i:null}}function So(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Yb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const a of l)o=o||So(a.addedNodes,s),o=o&&!So(a.removedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Jb(t,e,n){const s=t.canvas,i=new MutationObserver(l=>{let o=!1;for(const a of l)o=o||So(a.removedNodes,s),o=o&&!So(a.addedNodes,s);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Al=new Map;let Pu=0;function dp(){const t=window.devicePixelRatio;t!==Pu&&(Pu=t,Al.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Kb(t,e){Al.size||window.addEventListener("resize",dp),Al.set(t,e)}function Zb(t){Al.delete(t),Al.size||window.removeEventListener("resize",dp)}function Qb(t,e,n){const s=t.canvas,i=s&&ra(s);if(!i)return;const l=Yd((a,u)=>{const f=i.clientWidth;n(a,u),f<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const u=a[0],f=u.contentRect.width,h=u.contentRect.height;f===0&&h===0||l(f,h)});return o.observe(i),Kb(t,l),o}function lr(t,e,n){n&&n.disconnect(),e==="resize"&&Zb(t)}function $b(t,e,n){const s=t.canvas,i=Yd(l=>{t.ctx!==null&&n(Xb(l,t))},t);return qb(s,e,i),i}class e2 extends fp{acquireContext(e,n){const s=e&&e.getContext&&e.getContext("2d");return s&&s.canvas===e?(Wb(e,n),s):null}releaseContext(e){const n=e.canvas;if(!n[uo])return!1;const s=n[uo].initial;["height","width"].forEach(l=>{const o=s[l];Ft(o)?n.removeAttribute(l):n.setAttribute(l,o)});const i=s.style||{};return Object.keys(i).forEach(l=>{n.style[l]=i[l]}),n.width=n.width,delete n[uo],!0}addEventListener(e,n,s){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:Yb,detach:Jb,resize:Qb}[n]||$b;i[n]=o(e,n,s)}removeEventListener(e,n){const s=e.$proxies||(e.$proxies={}),i=s[n];if(!i)return;({attach:lr,detach:lr,resize:lr}[n]||Gb)(e,n,i),s[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,s,i){return N1(e,n,s,i)}isAttached(e){const n=e&&ra(e);return!!(n&&n.isConnected)}}function t2(t){return!oa()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Ub:e2}let Ks=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}hasValue(){return Tl(this.x)&&Tl(this.y)}getProps(e,n){const s=this.$animations;if(!n||!s)return this;const i={};return e.forEach(l=>{i[l]=s[l]&&s[l].active()?s[l]._to:this[l]}),i}};function n2(t,e){const n=t.options.ticks,s=s2(t),i=Math.min(n.maxTicksLimit||s,s),l=n.major.enabled?l2(e):[],o=l.length,a=l[0],u=l[o-1],f=[];if(o>i)return o2(e,f,l,o/i),f;const h=i2(l,e,i);if(o>0){let p,g;const m=o>1?Math.round((u-a)/(o-1)):null;for(Ql(e,f,h,Ft(m)?0:a-m,a),p=0,g=o-1;p<g;p++)Ql(e,f,h,l[p],l[p+1]);return Ql(e,f,h,u,Ft(m)?e.length:u+m),f}return Ql(e,f,h),f}function s2(t){const e=t.options.offset,n=t._tickSize(),s=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(s,i))}function i2(t,e,n){const s=r2(t),i=e.length/n;if(!s)return Math.max(i,1);const l=Fm(s);for(let o=0,a=l.length-1;o<a;o++){const u=l[o];if(u>i)return u}return Math.max(i,1)}function l2(t){const e=[];let n,s;for(n=0,s=t.length;n<s;n++)t[n].major&&e.push(n);return e}function o2(t,e,n,s){let i=0,l=n[0],o;for(s=Math.ceil(s),o=0;o<t.length;o++)o===l&&(e.push(t[o]),i++,l=n[i*s])}function Ql(t,e,n,s,i){const l=bt(s,0),o=Math.min(bt(i,t.length),t.length);let a=0,u,f,h;for(n=Math.ceil(n),i&&(u=i-s,n=u/Math.floor(u/n)),h=l;h<0;)a++,h=Math.round(l+a*n);for(f=Math.max(l,0);f<o;f++)f===h&&(e.push(t[f]),a++,h=Math.round(l+a*n))}function r2(t){const e=t.length;let n,s;if(e<2)return!1;for(s=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==s)return!1;return s}const a2=t=>t==="left"?"right":t==="right"?"left":t,Au=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,xu=(t,e)=>Math.min(e||t,t);function Ou(t,e){const n=[],s=t.length/e,i=t.length;let l=0;for(;l<i;l+=s)n.push(t[Math.floor(l)]);return n}function u2(t,e,n){const s=t.ticks.length,i=Math.min(e,s-1),l=t._startPixel,o=t._endPixel,a=1e-6;let u=t.getPixelForTick(i),f;if(!(n&&(s===1?f=Math.max(u-l,o-u):e===0?f=(t.getPixelForTick(1)-u)/2:f=(u-t.getPixelForTick(i-1))/2,u+=i<e?f:-f,u<l-a||u>o+a)))return u}function c2(t,e){Vt(t,n=>{const s=n.gc,i=s.length/2;let l;if(i>e){for(l=0;l<i;++l)delete n.data[s[l]];s.splice(0,i)}})}function sl(t){return t.drawTicks?t.tickLength:0}function Ru(t,e){if(!t.display)return 0;const n=Kn(t.font,e),s=Ts(t.padding);return(xn(t.text)?t.text.length:1)*n.lineHeight+s.height}function f2(t,e){return xi(t,{scale:e,type:"scale"})}function h2(t,e,n){return xi(t,{tick:n,index:e,type:"tick"})}function d2(t,e,n){let s=Zr(t);return(n&&e!=="right"||!n&&e==="right")&&(s=a2(s)),s}function p2(t,e,n,s){const{top:i,left:l,bottom:o,right:a,chart:u}=t,{chartArea:f,scales:h}=u;let p=0,g,m,b;const _=o-i,y=a-l;if(t.isHorizontal()){if(m=Gn(s,l,a),Ot(n)){const k=Object.keys(n)[0],w=n[k];b=h[k].getPixelForValue(w)+_-e}else n==="center"?b=(f.bottom+f.top)/2+_-e:b=Au(t,n,e);g=a-l}else{if(Ot(n)){const k=Object.keys(n)[0],w=n[k];m=h[k].getPixelForValue(w)-y+e}else n==="center"?m=(f.left+f.right)/2-y+e:m=Au(t,n,e);b=Gn(s,o,i),p=n==="left"?-On:On}return{titleX:m,titleY:b,maxWidth:g,rotation:p}}class Zi extends Ks{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:s,_suggestedMax:i}=this;return e=Ds(e,Number.POSITIVE_INFINITY),n=Ds(n,Number.NEGATIVE_INFINITY),s=Ds(s,Number.POSITIVE_INFINITY),i=Ds(i,Number.NEGATIVE_INFINITY),{min:Ds(e,s),max:Ds(n,i),minDefined:Es(e),maxDefined:Es(n)}}getMinMax(e){let{min:n,max:s,minDefined:i,maxDefined:l}=this.getUserBounds(),o;if(i&&l)return{min:n,max:s};const a=this.getMatchingVisibleMetas();for(let u=0,f=a.length;u<f;++u)o=a[u].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),l||(s=Math.max(s,o.max));return n=l&&n>s?s:n,s=i&&n>s?n:s,{min:Ds(n,Ds(s,n)),max:Ds(s,Ds(n,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 e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){an(this.options.beforeUpdate,[this])}update(e,n,s){const{beginAtZero:i,grace:l,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,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=b1(this,l,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const u=a<this.ticks.length;this._convertTicksToLabels(u?Ou(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=n2(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),u&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,s;this.isHorizontal()?(n=this.left,s=this.right):(n=this.top,s=this.bottom,e=!e),this._startPixel=n,this._endPixel=s,this._reversePixels=e,this._length=s-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){an(this.options.afterUpdate,[this])}beforeSetDimensions(){an(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(){an(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),an(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){an(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let s,i,l;for(s=0,i=e.length;s<i;s++)l=e[s],l.label=an(n.callback,[l.value,s,e],this)}afterTickToLabelConversion(){an(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){an(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,s=xu(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,l=n.maxRotation;let o=i,a,u,f;if(!this._isVisible()||!n.display||i>=l||s<=1||!this.isHorizontal()){this.labelRotation=i;return}const h=this._getLabelSizes(),p=h.widest.width,g=h.highest.height,m=Jn(this.chart.width-p,0,this.maxWidth);a=e.offset?this.maxWidth/s:m/(s-1),p+6>a&&(a=m/(s-(e.offset?.5:1)),u=this.maxHeight-sl(e.grid)-n.padding-Ru(e.title,this.chart.options.font),f=Math.sqrt(p*p+g*g),o=Um(Math.min(Math.asin(Jn((h.highest.height+6)/a,-1,1)),Math.asin(Jn(u/f,-1,1))-Math.asin(Jn(g/f,-1,1)))),o=Math.max(i,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){an(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){an(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:s,title:i,grid:l}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const u=Ru(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=sl(l)+u):(e.height=this.maxHeight,e.width=sl(l)+u),s.display&&this.ticks.length){const{first:f,last:h,widest:p,highest:g}=this._getLabelSizes(),m=s.padding*2,b=Gs(this.labelRotation),_=Math.cos(b),y=Math.sin(b);if(a){const k=s.mirror?0:y*p.width+_*g.height;e.height=Math.min(this.maxHeight,e.height+k+m)}else{const k=s.mirror?0:_*p.width+y*g.height;e.width=Math.min(this.maxWidth,e.width+k+m)}this._calculatePadding(f,h,y,_)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,s,i){const{ticks:{align:l,padding:o},position:a}=this.options,u=this.labelRotation!==0,f=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,p=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,m=0;u?f?(g=i*e.width,m=s*n.height):(g=s*e.height,m=i*n.width):l==="start"?m=n.width:l==="end"?g=e.width:l!=="inner"&&(g=e.width/2,m=n.width/2),this.paddingLeft=Math.max((g-h+o)*this.width/(this.width-h),0),this.paddingRight=Math.max((m-p+o)*this.width/(this.width-p),0)}else{let h=n.height/2,p=e.height/2;l==="start"?(h=0,p=e.height):l==="end"&&(h=n.height,p=0),this.paddingTop=h+o,this.paddingBottom=p+o}}_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(){an(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,s;for(n=0,s=e.length;n<s;n++)Ft(e[n].label)&&(e.splice(n,1),s--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let s=this.ticks;n<s.length&&(s=Ou(s,n)),this._labelSizes=e=this._computeLabelSizes(s,s.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,s){const{ctx:i,_longestTextCache:l}=this,o=[],a=[],u=Math.floor(n/xu(n,s));let f=0,h=0,p,g,m,b,_,y,k,w,S,P,M;for(p=0;p<n;p+=u){if(b=e[p].label,_=this._resolveTickFontOptions(p),i.font=y=_.string,k=l[y]=l[y]||{data:{},gc:[]},w=_.lineHeight,S=P=0,!Ft(b)&&!xn(b))S=lu(i,k.data,k.gc,S,b),P=w;else if(xn(b))for(g=0,m=b.length;g<m;++g)M=b[g],!Ft(M)&&!xn(M)&&(S=lu(i,k.data,k.gc,S,M),P+=w);o.push(S),a.push(P),f=Math.max(S,f),h=Math.max(P,h)}c2(l,n);const x=o.indexOf(f),A=a.indexOf(h),O=C=>({width:o[C]||0,height:a[C]||0});return{first:O(0),last:O(n-1),widest:O(x),highest:O(A),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Wm(this._alignToPixels?_i(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const s=n[e];return s.$context||(s.$context=h2(this.getContext(),e,s))}return this.$context||(this.$context=f2(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Gs(this.labelRotation),s=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),l=this._getLabelSizes(),o=e.autoSkipPadding||0,a=l?l.widest.width+o:0,u=l?l.highest.height+o:0;return this.isHorizontal()?u*s>a*i?a/s:u/i:u*i<a*s?u/s:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,s=this.chart,i=this.options,{grid:l,position:o,border:a}=i,u=l.offset,f=this.isHorizontal(),p=this.ticks.length+(u?1:0),g=sl(l),m=[],b=a.setContext(this.getContext()),_=b.display?b.width:0,y=_/2,k=function(F){return _i(s,F,_)};let w,S,P,M,x,A,O,C,R,L,D,z;if(o==="top")w=k(this.bottom),A=this.bottom-g,C=w-y,L=k(e.top)+y,z=e.bottom;else if(o==="bottom")w=k(this.top),L=e.top,z=k(e.bottom)-y,A=w+y,C=this.top+g;else if(o==="left")w=k(this.right),x=this.right-g,O=w-y,R=k(e.left)+y,D=e.right;else if(o==="right")w=k(this.left),R=e.left,D=k(e.right)-y,x=w+y,O=this.left+g;else if(n==="x"){if(o==="center")w=k((e.top+e.bottom)/2+.5);else if(Ot(o)){const F=Object.keys(o)[0],V=o[F];w=k(this.chart.scales[F].getPixelForValue(V))}L=e.top,z=e.bottom,A=w+y,C=A+g}else if(n==="y"){if(o==="center")w=k((e.left+e.right)/2);else if(Ot(o)){const F=Object.keys(o)[0],V=o[F];w=k(this.chart.scales[F].getPixelForValue(V))}x=w-y,O=x-g,R=e.left,D=e.right}const B=bt(i.ticks.maxTicksLimit,p),U=Math.max(1,Math.ceil(p/B));for(S=0;S<p;S+=U){const F=this.getContext(S),V=l.setContext(F),Y=a.setContext(F),j=V.lineWidth,q=V.color,Q=Y.dash||[],X=Y.dashOffset,re=V.tickWidth,K=V.tickColor,W=V.tickBorderDash||[],G=V.tickBorderDashOffset;P=u2(this,S,u),P!==void 0&&(M=_i(s,P,j),f?x=O=R=D=M:A=C=L=z=M,m.push({tx1:x,ty1:A,tx2:O,ty2:C,x1:R,y1:L,x2:D,y2:z,width:j,color:q,borderDash:Q,borderDashOffset:X,tickWidth:re,tickColor:K,tickBorderDash:W,tickBorderDashOffset:G}))}return this._ticksLength=p,this._borderValue=w,m}_computeLabelItems(e){const n=this.axis,s=this.options,{position:i,ticks:l}=s,o=this.isHorizontal(),a=this.ticks,{align:u,crossAlign:f,padding:h,mirror:p}=l,g=sl(s.grid),m=g+h,b=p?-h:m,_=-Gs(this.labelRotation),y=[];let k,w,S,P,M,x,A,O,C,R,L,D,z="middle";if(i==="top")x=this.bottom-b,A=this._getXAxisLabelAlignment();else if(i==="bottom")x=this.top+b,A=this._getXAxisLabelAlignment();else if(i==="left"){const U=this._getYAxisLabelAlignment(g);A=U.textAlign,M=U.x}else if(i==="right"){const U=this._getYAxisLabelAlignment(g);A=U.textAlign,M=U.x}else if(n==="x"){if(i==="center")x=(e.top+e.bottom)/2+m;else if(Ot(i)){const U=Object.keys(i)[0],F=i[U];x=this.chart.scales[U].getPixelForValue(F)+m}A=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")M=(e.left+e.right)/2-m;else if(Ot(i)){const U=Object.keys(i)[0],F=i[U];M=this.chart.scales[U].getPixelForValue(F)}A=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(u==="start"?z="top":u==="end"&&(z="bottom"));const B=this._getLabelSizes();for(k=0,w=a.length;k<w;++k){S=a[k],P=S.label;const U=l.setContext(this.getContext(k));O=this.getPixelForTick(k)+l.labelOffset,C=this._resolveTickFontOptions(k),R=C.lineHeight,L=xn(P)?P.length:1;const F=L/2,V=U.color,Y=U.textStrokeColor,j=U.textStrokeWidth;let q=A;o?(M=O,A==="inner"&&(k===w-1?q=this.options.reverse?"left":"right":k===0?q=this.options.reverse?"right":"left":q="center"),i==="top"?f==="near"||_!==0?D=-L*R+R/2:f==="center"?D=-B.highest.height/2-F*R+R:D=-B.highest.height+R/2:f==="near"||_!==0?D=R/2:f==="center"?D=B.highest.height/2-F*R:D=B.highest.height-L*R,p&&(D*=-1),_!==0&&!U.showLabelBackdrop&&(M+=R/2*Math.sin(_))):(x=O,D=(1-L)*R/2);let Q;if(U.showLabelBackdrop){const X=Ts(U.backdropPadding),re=B.heights[k],K=B.widths[k];let W=D-X.top,G=0-X.left;switch(z){case"middle":W-=re/2;break;case"bottom":W-=re;break}switch(A){case"center":G-=K/2;break;case"right":G-=K;break;case"inner":k===w-1?G-=K:k>0&&(G-=K/2);break}Q={left:G,top:W,width:K+X.width,height:re+X.height,color:U.backdropColor}}y.push({label:P,font:C,textOffset:D,options:{rotation:_,color:V,strokeColor:Y,strokeWidth:j,textAlign:q,textBaseline:z,translation:[M,x],backdrop:Q}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Gs(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:s,mirror:i,padding:l}}=this.options,o=this._getLabelSizes(),a=e+l,u=o.widest.width;let f,h;return n==="left"?i?(h=this.right+l,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h+=u)):(h=this.right-a,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h=this.left)):n==="right"?i?(h=this.left+l,s==="near"?f="right":s==="center"?(f="center",h-=u/2):(f="left",h-=u)):(h=this.left+a,s==="near"?f="left":s==="center"?(f="center",h+=u/2):(f="right",h=this.right)):f="right",{textAlign:f,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:s,top:i,width:l,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(s,i,l,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(l=>l.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,s=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const a=(u,f,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(u.x,u.y),s.lineTo(f.x,f.y),s.stroke(),s.restore())};if(n.display)for(l=0,o=i.length;l<o;++l){const u=i[l];n.drawOnChartArea&&a({x:u.x1,y:u.y1},{x:u.x2,y:u.y2},u),n.drawTicks&&a({x:u.tx1,y:u.ty1},{x:u.tx2,y:u.ty2},{color:u.tickColor,width:u.tickWidth,borderDash:u.tickBorderDash,borderDashOffset:u.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:s,grid:i}}=this,l=s.setContext(this.getContext()),o=s.display?l.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,u=this._borderValue;let f,h,p,g;this.isHorizontal()?(f=_i(e,this.left,o)-o/2,h=_i(e,this.right,a)+a/2,p=g=u):(p=_i(e,this.top,o)-o/2,g=_i(e,this.bottom,a)+a/2,f=h=u),n.save(),n.lineWidth=l.width,n.strokeStyle=l.color,n.beginPath(),n.moveTo(f,p),n.lineTo(h,g),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const s=this.ctx,i=this._computeLabelArea();i&&ea(s,i);const l=this.getLabelItems(e);for(const o of l){const a=o.options,u=o.font,f=o.label,h=o.textOffset;Pl(s,f,0,h,u,a)}i&&ta(s)}drawTitle(){const{ctx:e,options:{position:n,title:s,reverse:i}}=this;if(!s.display)return;const l=Kn(s.font),o=Ts(s.padding),a=s.align;let u=l.lineHeight/2;n==="bottom"||n==="center"||Ot(n)?(u+=o.bottom,xn(s.text)&&(u+=l.lineHeight*(s.text.length-1))):u+=o.top;const{titleX:f,titleY:h,maxWidth:p,rotation:g}=p2(this,u,n,a);Pl(e,s.text,0,0,l,{color:s.color,maxWidth:p,rotation:g,textAlign:d2(a,n,i),textBaseline:"middle",translation:[f,h]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,s=bt(e.grid&&e.grid.z,-1),i=bt(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Zi.prototype.draw?[{z:n,draw:l=>{this.draw(l)}}]:[{z:s,draw:l=>{this.drawBackground(),this.drawGrid(l),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:l=>{this.drawLabels(l)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),s=this.axis+"AxisID",i=[];let l,o;for(l=0,o=n.length;l<o;++l){const a=n[l];a[s]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Kn(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class $l{constructor(e,n,s){this.type=e,this.scope=n,this.override=s,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let s;b2(n)&&(s=this.register(n));const i=this.items,l=e.id,o=this.scope+"."+l;if(!l)throw new Error("class does not have id: "+e);return l in i||(i[l]=e,g2(e,o,s),this.override&&En.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,s=e.id,i=this.scope;s in n&&delete n[s],i&&s in En[i]&&(delete En[i][s],this.override&&delete Ci[s])}}function g2(t,e,n){const s=Sl(Object.create(null),[n?En.get(n):{},En.get(e),t.defaults]);En.set(e,s),t.defaultRoutes&&m2(e,t.defaultRoutes),t.descriptors&&En.describe(e,t.descriptors)}function m2(t,e){Object.keys(e).forEach(n=>{const s=n.split("."),i=s.pop(),l=[t].concat(s).join("."),o=e[n].split("."),a=o.pop(),u=o.join(".");En.route(l,i,u,a)})}function b2(t){return"id"in t&&"defaults"in t}class _2{constructor(){this.controllers=new $l(Ro,"datasets",!0),this.elements=new $l(Ks,"elements"),this.plugins=new $l(Object,"plugins"),this.scales=new $l(Zi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,s){[...n].forEach(i=>{const l=s||this._getRegistryForType(i);s||l.isForType(i)||l===this.plugins&&i.id?this._exec(e,l,i):Vt(i,o=>{const a=s||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,s){const i=Jr(e);an(s["before"+i],[],s),n[e](s),an(s["after"+i],[],s)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const s=this._typedRegistries[n];if(s.isForType(e))return s}return this.plugins}_get(e,n,s){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+s+".");return i}}var Hs=new _2;class v2{constructor(){this._init=[]}notify(e,n,s,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(l,e,n,s);return n==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,s,i){i=i||{};for(const l of e){const o=l.plugin,a=o[s],u=[n,i,l.options];if(an(a,u,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Ft(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const s=e&&e.config,i=bt(s.options&&s.options.plugins,{}),l=y2(s);return i===!1&&!n?[]:k2(e,l,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],s=this._cache,i=(l,o)=>l.filter(a=>!o.some(u=>a.plugin.id===u.plugin.id));this._notify(i(n,s),e,"stop"),this._notify(i(s,n),e,"start")}}function y2(t){const e={},n=[],s=Object.keys(Hs.plugins.items);for(let l=0;l<s.length;l++)n.push(Hs.getPlugin(s[l]));const i=t.plugins||[];for(let l=0;l<i.length;l++){const o=i[l];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function w2(t,e){return!e&&t===!1?null:t===!0?{}:t}function k2(t,{plugins:e,localIds:n},s,i){const l=[],o=t.getContext();for(const a of e){const u=a.id,f=w2(s[u],i);f!==null&&l.push({plugin:a,options:S2(t.config,{plugin:a,local:n[u]},f,o)})}return l}function S2(t,{plugin:e,local:n},s,i){const l=t.pluginScopeKeys(e),o=t.getOptionScopes(s,l);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ar(t,e){const n=En.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function E2(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function T2(t,e){return t===e?"_index_":"_value_"}function Du(t){if(t==="x"||t==="y"||t==="r")return t}function M2(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function xr(t,...e){if(Du(t))return t;for(const n of e){const s=n.axis||M2(n.position)||t.length>1&&Du(t[0].toLowerCase());if(s)return s}throw new Error(\`Cannot determine type of '\${t}' axis. Please provide 'axis' or 'position' option.\`)}function Lu(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function C2(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(s=>s.xAxisID===t||s.yAxisID===t);if(n.length)return Lu(t,"x",n[0])||Lu(t,"y",n[0])}return{}}function P2(t,e){const n=Ci[t.type]||{scales:{}},s=e.scales||{},i=Ar(t.type,e),l=Object.create(null);return Object.keys(s).forEach(o=>{const a=s[o];if(!Ot(a))return console.error(\`Invalid scale configuration for scale: \${o}\`);if(a._proxy)return console.warn(\`Ignoring resolver passed as options for scale: \${o}\`);const u=xr(o,a,C2(o,t),En.scales[a.type]),f=T2(u,i),h=n.scales||{};l[o]=gl(Object.create(null),[{axis:u},a,h[u],h[f]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,u=o.indexAxis||Ar(a,e),h=(Ci[a]||{}).scales||{};Object.keys(h).forEach(p=>{const g=E2(p,u),m=o[g+"AxisID"]||g;l[m]=l[m]||Object.create(null),gl(l[m],[{axis:g},s[m],h[p]])})}),Object.keys(l).forEach(o=>{const a=l[o];gl(a,[En.scales[a.type],En.scale])}),l}function pp(t){const e=t.options||(t.options={});e.plugins=bt(e.plugins,{}),e.scales=P2(t,e)}function gp(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function A2(t){return t=t||{},t.data=gp(t.data),pp(t),t}const Hu=new Map,mp=new Set;function eo(t,e){let n=Hu.get(t);return n||(n=e(),Hu.set(t,n),mp.add(n)),n}const il=(t,e,n)=>{const s=Mi(e,n);s!==void 0&&t.add(s)};class x2{constructor(e){this._config=A2(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=gp(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),pp(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return eo(e,()=>[[\`datasets.\${e}\`,""]])}datasetAnimationScopeKeys(e,n){return eo(\`\${e}.transition.\${n}\`,()=>[[\`datasets.\${e}.transitions.\${n}\`,\`transitions.\${n}\`],[\`datasets.\${e}\`,""]])}datasetElementScopeKeys(e,n){return eo(\`\${e}-\${n}\`,()=>[[\`datasets.\${e}.elements.\${n}\`,\`datasets.\${e}\`,\`elements.\${n}\`,""]])}pluginScopeKeys(e){const n=e.id,s=this.type;return eo(\`\${s}-plugin-\${n}\`,()=>[[\`plugins.\${n}\`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const s=this._scopeCache;let i=s.get(e);return(!i||n)&&(i=new Map,s.set(e,i)),i}getOptionScopes(e,n,s){const{options:i,type:l}=this,o=this._cachedScopes(e,s),a=o.get(n);if(a)return a;const u=new Set;n.forEach(h=>{e&&(u.add(e),h.forEach(p=>il(u,e,p))),h.forEach(p=>il(u,i,p)),h.forEach(p=>il(u,Ci[l]||{},p)),h.forEach(p=>il(u,En,p)),h.forEach(p=>il(u,Cr,p))});const f=Array.from(u);return f.length===0&&f.push(Object.create(null)),mp.has(n)&&o.set(n,f),f}chartOptionScopes(){const{options:e,type:n}=this;return[e,Ci[n]||{},En.datasets[n]||{},{type:n},En,Cr]}resolveNamedOptions(e,n,s,i=[""]){const l={$shared:!0},{resolver:o,subPrefixes:a}=Iu(this._resolverCache,e,i);let u=o;if(R2(o,n)){l.$shared=!1,s=fi(s)?s():s;const f=this.createResolver(e,s,a);u=qi(o,s,f)}for(const f of n)l[f]=u[f];return l}createResolver(e,n,s=[""],i){const{resolver:l}=Iu(this._resolverCache,e,s);return Ot(n)?qi(l,n,void 0,i):l}}function Iu(t,e,n){let s=t.get(e);s||(s=new Map,t.set(e,s));const i=n.join();let l=s.get(i);return l||(l={resolver:sa(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},s.set(i,l)),l}const O2=t=>Ot(t)&&Object.getOwnPropertyNames(t).some(e=>fi(t[e]));function R2(t,e){const{isScriptable:n,isIndexable:s}=Qd(t);for(const i of e){const l=n(i),o=s(i),a=(o||l)&&t[i];if(l&&(fi(a)||O2(a))||o&&xn(a))return!0}return!1}var D2="4.5.0";const L2=["top","bottom","left","right","chartArea"];function Bu(t,e){return t==="top"||t==="bottom"||L2.indexOf(t)===-1&&e==="x"}function Fu(t,e){return function(n,s){return n[t]===s[t]?n[e]-s[e]:n[t]-s[t]}}function Nu(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),an(n&&n.onComplete,[t],e)}function H2(t){const e=t.chart,n=e.options.animation;an(n&&n.onProgress,[t],e)}function bp(t){return oa()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const co={},ju=t=>{const e=bp(t);return Object.values(co).filter(n=>n.canvas===e).pop()};function I2(t,e,n){const s=Object.keys(t);for(const i of s){const l=+i;if(l>=e){const o=t[i];delete t[i],(n>0||l>e)&&(t[l+n]=o)}}}function B2(t,e,n,s){return!n||t.type==="mouseout"?null:s?e:t}let pi=class{static defaults=En;static instances=co;static overrides=Ci;static registry=Hs;static version=D2;static getChart=ju;static register(...e){Hs.add(...e),zu()}static unregister(...e){Hs.remove(...e),zu()}constructor(e,n){const s=this.config=new x2(n),i=bp(e),l=ju(i);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=s.createResolver(s.chartOptionScopes(),this.getContext());this.platform=new(s.platform||t2(i)),this.platform.updateConfig(s);const a=this.platform.acquireContext(i,o.aspectRatio),u=a&&a.canvas,f=u&&u.height,h=u&&u.width;if(this.id=Am(),this.ctx=a,this.canvas=u,this.width=h,this.height=f,this._options=o,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 v2,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ym(p=>this.update(p),o.resizeDelay||0),this._dataChanges=[],co[this.id]=this,!a||!u){console.error("Failed to create chart: can't acquire context from the given item");return}Vs.listen(this,"complete",Nu),Vs.listen(this,"progress",H2),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:s,height:i,_aspectRatio:l}=this;return Ft(e)?n&&l?l:i?s/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Hs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():uu(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ou(this.canvas,this.ctx),this}stop(){return Vs.stop(this),this}resize(e,n){Vs.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const s=this.options,i=this.canvas,l=s.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,l),a=s.devicePixelRatio||this.platform.getDevicePixelRatio(),u=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,uu(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),an(s.onResize,[this,o],this),this.attached&&this._doResize(u)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Vt(n,(s,i)=>{s.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,s=this.scales,i=Object.keys(s).reduce((o,a)=>(o[a]=!1,o),{});let l=[];n&&(l=l.concat(Object.keys(n).map(o=>{const a=n[o],u=xr(o,a),f=u==="r",h=u==="x";return{options:a,dposition:f?"chartArea":h?"bottom":"left",dtype:f?"radialLinear":h?"category":"linear"}}))),Vt(l,o=>{const a=o.options,u=a.id,f=xr(u,a),h=bt(a.type,o.dtype);(a.position===void 0||Bu(a.position,f)!==Bu(o.dposition))&&(a.position=o.dposition),i[u]=!0;let p=null;if(u in s&&s[u].type===h)p=s[u];else{const g=Hs.getScale(h);p=new g({id:u,type:h,ctx:this.ctx,chart:this}),s[p.id]=p}p.init(a,e)}),Vt(i,(o,a)=>{o||delete s[a]}),Vt(s,o=>{ks.configure(this,o,o.options),ks.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,s=e.length;if(e.sort((i,l)=>i.index-l.index),s>n){for(let i=n;i<s;++i)this._destroyDatasetMeta(i);e.splice(n,s-n)}this._sortedMetasets=e.slice(0).sort(Fu("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((s,i)=>{n.filter(l=>l===s._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let s,i;for(this._removeUnreferencedMetasets(),s=0,i=n.length;s<i;s++){const l=n[s];let o=this.getDatasetMeta(s);const a=l.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(s),o=this.getDatasetMeta(s)),o.type=a,o.indexAxis=l.indexAxis||Ar(a,this.options),o.order=l.order||0,o.index=s,o.label=""+l.label,o.visible=this.isDatasetVisible(s),o.controller)o.controller.updateIndex(s),o.controller.linkScales();else{const u=Hs.getController(a),{datasetElementType:f,dataElementType:h}=En.datasets[a];Object.assign(u,{dataElementType:Hs.getElement(h),datasetElementType:f&&Hs.getElement(f)}),o.controller=new u(this,s),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){Vt(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const s=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!s.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let f=0,h=this.data.datasets.length;f<h;f++){const{controller:p}=this.getDatasetMeta(f),g=!i&&l.indexOf(p)===-1;p.buildOrUpdateElements(g),o=Math.max(+p.getMaxOverflow(),o)}o=this._minPadding=s.layout.autoPadding?o:0,this._updateLayout(o),i||Vt(l,f=>{f.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Fu("z","_idx"));const{_active:a,_lastEvent:u}=this;u?this._eventHandler(u,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Vt(this.scales,e=>{ks.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),s=new Set(e.events);(!Ka(n,s)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:s,start:i,count:l}of n){const o=s==="_removeElements"?-l:l;I2(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,s=l=>new Set(e.filter(o=>o[0]===l).map((o,a)=>a+","+o.splice(1).join(","))),i=s(0);for(let l=1;l<n;l++)if(!Ka(i,s(l)))return;return Array.from(i).map(l=>l.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;ks.update(this,this.width,this.height,e);const n=this.chartArea,s=n.width<=0||n.height<=0;this._layers=[],Vt(this.boxes,i=>{s&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,l)=>{i._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,s=this.data.datasets.length;n<s;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,s=this.data.datasets.length;n<s;++n)this._updateDataset(n,fi(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const s=this.getDatasetMeta(e),i={meta:s,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(s.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Vs.has(this)?this.attached&&!Vs.running(this)&&Vs.start(this):(this.draw(),Nu({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:s,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(s,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,s=[];let i,l;for(i=0,l=n.length;i<l;++i){const o=n[i];(!e||o.visible)&&s.push(o)}return s}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,s={meta:e,index:e.index,cancelable:!0},i=eb(this,e);this.notifyPlugins("beforeDatasetDraw",s)!==!1&&(i&&ea(n,i),e.controller.draw(),i&&ta(n),s.cancelable=!1,this.notifyPlugins("afterDatasetDraw",s))}isPointInArea(e){return Cl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,s,i){const l=Lb.modes[n];return typeof l=="function"?l(this,e,s,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],s=this._metasets;let i=s.filter(l=>l&&l._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},s.push(i)),i}getContext(){return this.$context||(this.$context=xi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const s=this.getDatasetMeta(e);return typeof s.hidden=="boolean"?!s.hidden:!n.hidden}setDatasetVisibility(e,n){const s=this.getDatasetMeta(e);s.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,s){const i=s?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,i);El(n)?(l.data[n].hidden=!s,this.update()):(this.setDatasetVisibility(e,s),o.update(l,{visible:s}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Vs.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),ou(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete co[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,s=(l,o)=>{n.addEventListener(this,l,o),e[l]=o},i=(l,o,a)=>{l.offsetX=o,l.offsetY=a,this._eventHandler(l)};Vt(this.options.events,l=>s(l,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,s=(u,f)=>{n.addEventListener(this,u,f),e[u]=f},i=(u,f)=>{e[u]&&(n.removeEventListener(this,u,f),delete e[u])},l=(u,f)=>{this.canvas&&this.resize(u,f)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),s("resize",l),s("detach",o)};o=()=>{this.attached=!1,i("resize",l),this._stop(),this._resize(0,0),s("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){Vt(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},Vt(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,s){const i=s?"set":"remove";let l,o,a,u;for(n==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+i+"DatasetHoverStyle"]()),a=0,u=e.length;a<u;++a){o=e[a];const f=o&&this.getDatasetMeta(o.datasetIndex).controller;f&&f[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],s=e.map(({datasetIndex:l,index:o})=>{const a=this.getDatasetMeta(l);if(!a)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:a.data[o],index:o}});!_o(s,n)&&(this._active=s,this._lastEvent=null,this._updateHoverStyles(s,n))}notifyPlugins(e,n,s){return this._plugins.notify(this,e,n,s)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,s){const i=this.options.hover,l=(u,f)=>u.filter(h=>!f.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),o=l(n,e),a=s?e:l(e,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const s={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",s,i)===!1)return;const l=this._handleEvent(e,n,s.inChartArea);return s.cancelable=!1,this.notifyPlugins("afterEvent",s,i),(l||s.changed)&&this.render(),this}_handleEvent(e,n,s){const{_active:i=[],options:l}=this,o=n,a=this._getActiveElements(e,i,s,o),u=Hm(e),f=B2(e,this._lastEvent,s,u);s&&(this._lastEvent=null,an(l.onHover,[e,a,this],this),u&&an(l.onClick,[e,a,this],this));const h=!_o(a,i);return(h||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=f,h}_getActiveElements(e,n,s,i){if(e.type==="mouseout")return[];if(!s)return n;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,i)}};function zu(){return Vt(pi.instances,t=>t._plugins.invalidate())}function F2(t,e,n){const{startAngle:s,x:i,y:l,outerRadius:o,innerRadius:a,options:u}=e,{borderWidth:f,borderJoinStyle:h}=u,p=Math.min(f/o,Ms(s-n));if(t.beginPath(),t.arc(i,l,o-f/2,s+p/2,n-p/2),a>0){const g=Math.min(f/a,Ms(s-n));t.arc(i,l,a+f/2,n-g/2,s+g/2,!0)}else{const g=Math.min(f/2,o*Ms(s-n));if(h==="round")t.arc(i,l,g,n-Wt/2,s+Wt/2,!0);else if(h==="bevel"){const m=2*g*g,b=-m*Math.cos(n+Wt/2)+i,_=-m*Math.sin(n+Wt/2)+l,y=m*Math.cos(s+Wt/2)+i,k=m*Math.sin(s+Wt/2)+l;t.lineTo(b,_),t.lineTo(y,k)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function N2(t,e,n){const{startAngle:s,pixelMargin:i,x:l,y:o,outerRadius:a,innerRadius:u}=e;let f=i/a;t.beginPath(),t.arc(l,o,a,s-f,n+f),u>i?(f=i/u,t.arc(l,o,u,n+f,s-f,!0)):t.arc(l,o,i,n+On,s-On),t.closePath(),t.clip()}function j2(t){return na(t,["outerStart","outerEnd","innerStart","innerEnd"])}function z2(t,e,n,s){const i=j2(t.options.borderRadius),l=(n-e)/2,o=Math.min(l,s*e/2),a=u=>{const f=(n-Math.min(l,u))*s/2;return Jn(u,0,Math.min(l,f))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:Jn(i.innerStart,0,o),innerEnd:Jn(i.innerEnd,0,o)}}function Ii(t,e,n,s){return{x:n+t*Math.cos(e),y:s+t*Math.sin(e)}}function Eo(t,e,n,s,i,l){const{x:o,y:a,startAngle:u,pixelMargin:f,innerRadius:h}=e,p=Math.max(e.outerRadius+s+n-f,0),g=h>0?h+s+n+f:0;let m=0;const b=i-u;if(s){const U=h>0?h-s:0,F=p>0?p-s:0,V=(U+F)/2,Y=V!==0?b*V/(V+s):b;m=(b-Y)/2}const _=Math.max(.001,b*p-n/Wt)/p,y=(b-_)/2,k=u+y+m,w=i-y-m,{outerStart:S,outerEnd:P,innerStart:M,innerEnd:x}=z2(e,g,p,w-k),A=p-S,O=p-P,C=k+S/A,R=w-P/O,L=g+M,D=g+x,z=k+M/L,B=w-x/D;if(t.beginPath(),l){const U=(C+R)/2;if(t.arc(o,a,p,C,U),t.arc(o,a,p,U,R),P>0){const j=Ii(O,R,o,a);t.arc(j.x,j.y,P,R,w+On)}const F=Ii(D,w,o,a);if(t.lineTo(F.x,F.y),x>0){const j=Ii(D,B,o,a);t.arc(j.x,j.y,x,w+On,B+Math.PI)}const V=(w-x/g+(k+M/g))/2;if(t.arc(o,a,g,w-x/g,V,!0),t.arc(o,a,g,V,k+M/g,!0),M>0){const j=Ii(L,z,o,a);t.arc(j.x,j.y,M,z+Math.PI,k-On)}const Y=Ii(A,k,o,a);if(t.lineTo(Y.x,Y.y),S>0){const j=Ii(A,C,o,a);t.arc(j.x,j.y,S,k-On,C)}}else{t.moveTo(o,a);const U=Math.cos(C)*p+o,F=Math.sin(C)*p+a;t.lineTo(U,F);const V=Math.cos(R)*p+o,Y=Math.sin(R)*p+a;t.lineTo(V,Y)}t.closePath()}function U2(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:a}=e;let u=e.endAngle;if(l){Eo(t,e,n,s,u,i);for(let f=0;f<l;++f)t.fill();isNaN(a)||(u=o+(a%kn||kn))}return Eo(t,e,n,s,u,i),t.fill(),u}function V2(t,e,n,s,i){const{fullCircles:l,startAngle:o,circumference:a,options:u}=e,{borderWidth:f,borderJoinStyle:h,borderDash:p,borderDashOffset:g,borderRadius:m}=u,b=u.borderAlign==="inner";if(!f)return;t.setLineDash(p||[]),t.lineDashOffset=g,b?(t.lineWidth=f*2,t.lineJoin=h||"round"):(t.lineWidth=f,t.lineJoin=h||"bevel");let _=e.endAngle;if(l){Eo(t,e,n,s,_,i);for(let y=0;y<l;++y)t.stroke();isNaN(a)||(_=o+(a%kn||kn))}b&&N2(t,e,_),u.selfJoin&&_-o>=Wt&&m===0&&h!=="miter"&&F2(t,e,_),l||(Eo(t,e,n,s,_,i),t.stroke())}class W2 extends Ks{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:e=>e!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(e){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,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.getProps(["x","y"],s),{angle:l,distance:o}=Wd(i,{x:e,y:n}),{startAngle:a,endAngle:u,innerRadius:f,outerRadius:h,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),g=(this.options.spacing+this.options.borderWidth)/2,m=bt(p,u-a),b=Ml(l,a,u)&&a!==u,_=m>=kn||b,y=ii(o,f+g,h+g);return _&&y}getCenterPoint(e){const{x:n,y:s,startAngle:i,endAngle:l,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:u,spacing:f}=this.options,h=(i+l)/2,p=(o+a+f+u)/2;return{x:n+Math.cos(h)*p,y:s+Math.sin(h)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:n,circumference:s}=this,i=(n.offset||0)/4,l=(n.spacing||0)/2,o=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=s>kn?Math.floor(s/kn):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const a=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(a)*i,Math.sin(a)*i);const u=1-Math.sin(Math.min(Wt,s||0)),f=i*u;e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,U2(e,this,f,l,o),V2(e,this,f,l,o),e.restore()}}function _p(t,e,n=e){t.lineCap=bt(n.borderCapStyle,e.borderCapStyle),t.setLineDash(bt(n.borderDash,e.borderDash)),t.lineDashOffset=bt(n.borderDashOffset,e.borderDashOffset),t.lineJoin=bt(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=bt(n.borderWidth,e.borderWidth),t.strokeStyle=bt(n.borderColor,e.borderColor)}function q2(t,e,n){t.lineTo(n.x,n.y)}function G2(t){return t.stepped?a1:t.tension||t.cubicInterpolationMode==="monotone"?u1:q2}function vp(t,e,n={}){const s=t.length,{start:i=0,end:l=s-1}=n,{start:o,end:a}=e,u=Math.max(i,o),f=Math.min(l,a),h=i<o&&l<o||i>a&&l>a;return{count:s,start:u,loop:e.loop,ilen:f<u&&!h?s+f-u:f-u}}function X2(t,e,n,s){const{points:i,options:l}=e,{count:o,start:a,loop:u,ilen:f}=vp(i,n,s),h=G2(l);let{move:p=!0,reverse:g}=s||{},m,b,_;for(m=0;m<=f;++m)b=i[(a+(g?f-m:m))%o],!b.skip&&(p?(t.moveTo(b.x,b.y),p=!1):h(t,_,b,g,l.stepped),_=b);return u&&(b=i[(a+(g?f:0))%o],h(t,_,b,g,l.stepped)),!!u}function Y2(t,e,n,s){const i=e.points,{count:l,start:o,ilen:a}=vp(i,n,s),{move:u=!0,reverse:f}=s||{};let h=0,p=0,g,m,b,_,y,k;const w=P=>(o+(f?a-P:P))%l,S=()=>{_!==y&&(t.lineTo(h,y),t.lineTo(h,_),t.lineTo(h,k))};for(u&&(m=i[w(0)],t.moveTo(m.x,m.y)),g=0;g<=a;++g){if(m=i[w(g)],m.skip)continue;const P=m.x,M=m.y,x=P|0;x===b?(M<_?_=M:M>y&&(y=M),h=(p*h+P)/++p):(S(),t.lineTo(P,M),b=x,p=0,_=y=M),k=M}S()}function Or(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Y2:X2}function J2(t){return t.stepped?z1:t.tension||t.cubicInterpolationMode==="monotone"?U1:wi}function K2(t,e,n,s){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,s)&&i.closePath()),_p(t,e.options),t.stroke(i)}function Z2(t,e,n,s){const{segments:i,options:l}=e,o=Or(e);for(const a of i)_p(t,l,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+s-1})&&t.closePath(),t.stroke()}const Q2=typeof Path2D=="function";function $2(t,e,n,s){Q2&&!e.options.segment?K2(t,e,n,s):Z2(t,e,n,s)}class e_ extends Ks{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:e=>e!=="borderDash"&&e!=="fill"};constructor(e){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,e&&Object.assign(this,e)}updateControlPoints(e,n){const s=this.options;if((s.tension||s.cubicInterpolationMode==="monotone")&&!s.stepped&&!this._pointsUpdated){const i=s.spanGaps?this._loop:this._fullLoop;D1(this._points,s,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=K1(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,s=e.length;return s&&n[e[s-1].end]}interpolate(e,n){const s=this.options,i=e[n],l=this.points,o=X1(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],u=J2(s);let f,h;for(f=0,h=o.length;f<h;++f){const{start:p,end:g}=o[f],m=l[p],b=l[g];if(m===b){a.push(m);continue}const _=Math.abs((i-m[n])/(b[n]-m[n])),y=u(m,b,_,s.stepped);y[n]=e[n],a.push(y)}return a.length===1?a[0]:a}pathSegment(e,n,s){return Or(this)(e,this,n,s)}path(e,n,s){const i=this.segments,l=Or(this);let o=this._loop;n=n||0,s=s||this.points.length-n;for(const a of i)o&=l(e,this,a,{start:n,end:n+s-1});return!!o}draw(e,n,s,i){const l=this.options||{};(this.points||[]).length&&l.borderWidth&&(e.save(),$2(e,this,s,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Uu(t,e,n,s){const i=t.options,{[n]:l}=t.getProps([n],s);return Math.abs(e-l)<i.radius+i.hitRadius}class t_ extends Ks{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(e){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,n,s){const i=this.options,{x:l,y:o}=this.getProps(["x","y"],s);return Math.pow(e-l,2)+Math.pow(n-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(e,n){return Uu(this,e,"x",n)}inYRange(e,n){return Uu(this,e,"y",n)}getCenterPoint(e){const{x:n,y:s}=this.getProps(["x","y"],e);return{x:n,y:s}}size(e){e=e||this.options||{};let n=e.radius||0;n=Math.max(n,n&&e.hoverRadius||0);const s=n&&e.borderWidth||0;return(n+s)*2}draw(e,n){const s=this.options;this.skip||s.radius<.1||!Cl(this,n,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Pr(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function yp(t,e){const{x:n,y:s,base:i,width:l,height:o}=t.getProps(["x","y","base","width","height"],e);let a,u,f,h,p;return t.horizontal?(p=o/2,a=Math.min(n,i),u=Math.max(n,i),f=s-p,h=s+p):(p=l/2,a=n-p,u=n+p,f=Math.min(s,i),h=Math.max(s,i)),{left:a,top:f,right:u,bottom:h}}function li(t,e,n,s){return t?0:Jn(e,n,s)}function n_(t,e,n){const s=t.options.borderWidth,i=t.borderSkipped,l=Zd(s);return{t:li(i.top,l.top,0,n),r:li(i.right,l.right,0,e),b:li(i.bottom,l.bottom,0,n),l:li(i.left,l.left,0,e)}}function s_(t,e,n){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,l=Ni(i),o=Math.min(e,n),a=t.borderSkipped,u=s||Ot(i);return{topLeft:li(!u||a.top||a.left,l.topLeft,0,o),topRight:li(!u||a.top||a.right,l.topRight,0,o),bottomLeft:li(!u||a.bottom||a.left,l.bottomLeft,0,o),bottomRight:li(!u||a.bottom||a.right,l.bottomRight,0,o)}}function i_(t){const e=yp(t),n=e.right-e.left,s=e.bottom-e.top,i=n_(t,n/2,s/2),l=s_(t,n/2,s/2);return{outer:{x:e.left,y:e.top,w:n,h:s,radius:l},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:s-i.t-i.b,radius:{topLeft:Math.max(0,l.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,l.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,l.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,l.bottomRight-Math.max(i.b,i.r))}}}}function or(t,e,n,s){const i=e===null,l=n===null,a=t&&!(i&&l)&&yp(t,s);return a&&(i||ii(e,a.left,a.right))&&(l||ii(n,a.top,a.bottom))}function l_(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function o_(t,e){t.rect(e.x,e.y,e.w,e.h)}function rr(t,e,n={}){const s=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,l=(t.x+t.w!==n.x+n.w?e:0)-s,o=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+s,y:t.y+i,w:t.w+l,h:t.h+o,radius:t.radius}}class r_ extends Ks{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:s,backgroundColor:i}}=this,{inner:l,outer:o}=i_(this),a=l_(o.radius)?wo:o_;e.save(),(o.w!==l.w||o.h!==l.h)&&(e.beginPath(),a(e,rr(o,n,l)),e.clip(),a(e,rr(l,-n,o)),e.fillStyle=s,e.fill("evenodd")),e.beginPath(),a(e,rr(l,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,s){return or(this,e,n,s)}inXRange(e,n){return or(this,e,null,n)}inYRange(e,n){return or(this,null,e,n)}getCenterPoint(e){const{x:n,y:s,base:i,horizontal:l}=this.getProps(["x","y","base","horizontal"],e);return{x:l?(n+i)/2:n,y:l?s:(s+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const Vu=(t,e)=>{let{boxHeight:n=e,boxWidth:s=e}=t;return t.usePointStyle&&(n=Math.min(n,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:n,itemHeight:Math.max(e,n)}},a_=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Wu extends Ks{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,s){this.maxWidth=e,this.maxHeight=n,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 e=this.options.labels||{};let n=an(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(s=>e.filter(s,this.chart.data))),e.sort&&(n=n.sort((s,i)=>e.sort(s,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const s=e.labels,i=Kn(s.font),l=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:u}=Vu(s,l);let f,h;n.font=i.string,this.isHorizontal()?(f=this.maxWidth,h=this._fitRows(o,l,a,u)+10):(h=this.maxHeight,f=this._fitCols(o,i,a,u)+10),this.width=Math.min(f,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,n,s,i){const{ctx:l,maxWidth:o,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.lineWidths=[0],h=i+a;let p=e;l.textAlign="left",l.textBaseline="middle";let g=-1,m=-h;return this.legendItems.forEach((b,_)=>{const y=s+n/2+l.measureText(b.text).width;(_===0||f[f.length-1]+y+2*a>o)&&(p+=h,f[f.length-(_>0?0:1)]=0,m+=h,g++),u[_]={left:0,top:m,row:g,width:y,height:i},f[f.length-1]+=y+a}),p}_fitCols(e,n,s,i){const{ctx:l,maxHeight:o,options:{labels:{padding:a}}}=this,u=this.legendHitBoxes=[],f=this.columnSizes=[],h=o-e;let p=a,g=0,m=0,b=0,_=0;return this.legendItems.forEach((y,k)=>{const{itemWidth:w,itemHeight:S}=u_(s,n,l,y,i);k>0&&m+S+2*a>h&&(p+=g+a,f.push({width:g,height:m}),b+=g+a,_++,g=m=0),u[k]={left:b,top:m,col:_,width:w,height:S},g=Math.max(g,w),m+=S+a}),p+=g,f.push({width:g,height:m}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:s,labels:{padding:i},rtl:l}}=this,o=ji(l,this.left,this.width);if(this.isHorizontal()){let a=0,u=Gn(s,this.left+i,this.right-this.lineWidths[a]);for(const f of n)a!==f.row&&(a=f.row,u=Gn(s,this.left+i,this.right-this.lineWidths[a])),f.top+=this.top+e+i,f.left=o.leftForLtr(o.x(u),f.width),u+=f.width+i}else{let a=0,u=Gn(s,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const f of n)f.col!==a&&(a=f.col,u=Gn(s,this.top+e+i,this.bottom-this.columnSizes[a].height)),f.top=u,f.left+=this.left+i,f.left=o.leftForLtr(o.x(f.left),f.width),u+=f.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;ea(e,this),this._draw(),ta(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:s,ctx:i}=this,{align:l,labels:o}=e,a=En.color,u=ji(e.rtl,this.left,this.width),f=Kn(o.font),{padding:h}=o,p=f.size,g=p/2;let m;this.drawTitle(),i.textAlign=u.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=f.string;const{boxWidth:b,boxHeight:_,itemHeight:y}=Vu(o,p),k=function(x,A,O){if(isNaN(b)||b<=0||isNaN(_)||_<0)return;i.save();const C=bt(O.lineWidth,1);if(i.fillStyle=bt(O.fillStyle,a),i.lineCap=bt(O.lineCap,"butt"),i.lineDashOffset=bt(O.lineDashOffset,0),i.lineJoin=bt(O.lineJoin,"miter"),i.lineWidth=C,i.strokeStyle=bt(O.strokeStyle,a),i.setLineDash(bt(O.lineDash,[])),o.usePointStyle){const R={radius:_*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:C},L=u.xPlus(x,b/2),D=A+g;Kd(i,R,L,D,o.pointStyleWidth&&b)}else{const R=A+Math.max((p-_)/2,0),L=u.leftForLtr(x,b),D=Ni(O.borderRadius);i.beginPath(),Object.values(D).some(z=>z!==0)?wo(i,{x:L,y:R,w:b,h:_,radius:D}):i.rect(L,R,b,_),i.fill(),C!==0&&i.stroke()}i.restore()},w=function(x,A,O){Pl(i,O.text,x,A+y/2,f,{strikethrough:O.hidden,textAlign:u.textAlign(O.textAlign)})},S=this.isHorizontal(),P=this._computeTitleHeight();S?m={x:Gn(l,this.left+h,this.right-s[0]),y:this.top+h+P,line:0}:m={x:this.left+h,y:Gn(l,this.top+P+h,this.bottom-n[0].height),line:0},sp(this.ctx,e.textDirection);const M=y+h;this.legendItems.forEach((x,A)=>{i.strokeStyle=x.fontColor,i.fillStyle=x.fontColor;const O=i.measureText(x.text).width,C=u.textAlign(x.textAlign||(x.textAlign=o.textAlign)),R=b+g+O;let L=m.x,D=m.y;u.setWidth(this.width),S?A>0&&L+R+h>this.right&&(D=m.y+=M,m.line++,L=m.x=Gn(l,this.left+h,this.right-s[m.line])):A>0&&D+M>this.bottom&&(L=m.x=L+n[m.line].width+h,m.line++,D=m.y=Gn(l,this.top+P+h,this.bottom-n[m.line].height));const z=u.x(L);if(k(z,D,x),L=Jm(C,L+b+g,S?L+R:this.right,e.rtl),w(u.x(L),D,x),S)m.x+=R+h;else if(typeof x.text!="string"){const B=f.lineHeight;m.y+=wp(x,B)+h}else m.y+=M}),ip(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,s=Kn(n.font),i=Ts(n.padding);if(!n.display)return;const l=ji(e.rtl,this.left,this.width),o=this.ctx,a=n.position,u=s.size/2,f=i.top+u;let h,p=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),h=this.top+f,p=Gn(e.align,p,this.right-g);else{const b=this.columnSizes.reduce((_,y)=>Math.max(_,y.height),0);h=f+Gn(e.align,this.top,this.bottom-b-e.labels.padding-this._computeTitleHeight())}const m=Gn(a,p,p+g);o.textAlign=l.textAlign(Zr(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=s.string,Pl(o,n.text,m,h,s)}_computeTitleHeight(){const e=this.options.title,n=Kn(e.font),s=Ts(e.padding);return e.display?n.lineHeight+s.height:0}_getLegendItemAt(e,n){let s,i,l;if(ii(e,this.left,this.right)&&ii(n,this.top,this.bottom)){for(l=this.legendHitBoxes,s=0;s<l.length;++s)if(i=l[s],ii(e,i.left,i.left+i.width)&&ii(n,i.top,i.top+i.height))return this.legendItems[s]}return null}handleEvent(e){const n=this.options;if(!h_(e.type,n))return;const s=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,l=a_(i,s);i&&!l&&an(n.onLeave,[e,i,this],this),this._hoveredItem=s,s&&!l&&an(n.onHover,[e,s,this],this)}else s&&an(n.onClick,[e,s,this],this)}}function u_(t,e,n,s,i){const l=c_(s,t,e,n),o=f_(i,s,e.lineHeight);return{itemWidth:l,itemHeight:o}}function c_(t,e,n,s){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((l,o)=>l.length>o.length?l:o)),e+n.size/2+s.measureText(i).width}function f_(t,e,n){let s=t;return typeof e.text!="string"&&(s=wp(e,n)),s}function wp(t,e){const n=t.text?t.text.length:0;return e*n}function h_(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var ua={id:"legend",_element:Wu,start(t,e,n){const s=t.legend=new Wu({ctx:t.ctx,options:n,chart:t});ks.configure(t,s,n),ks.addBox(t,s)},stop(t){ks.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const s=t.legend;ks.configure(t,s,n),s.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const s=e.datasetIndex,i=n.chart;i.isDatasetVisible(s)?(i.hide(s),e.hidden=!0):(i.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:s,textAlign:i,color:l,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(u=>{const f=u.controller.getStyle(n?0:void 0),h=Ts(f.borderWidth);return{text:e[u.index].label,fillStyle:f.backgroundColor,fontColor:l,hidden:!u.visible,lineCap:f.borderCapStyle,lineDash:f.borderDash,lineDashOffset:f.borderDashOffset,lineJoin:f.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:f.borderColor,pointStyle:s||f.pointStyle,rotation:f.rotation,textAlign:i||f.textAlign,borderRadius:o&&(a||f.borderRadius),datasetIndex:u.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class kp extends Ks{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){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=e,this.height=this.bottom=n;const i=xn(s.text)?s.text.length:1;this._padding=Ts(s.padding);const l=i*Kn(s.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=l:this.width=l}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:s,bottom:i,right:l,options:o}=this,a=o.align;let u=0,f,h,p;return this.isHorizontal()?(h=Gn(a,s,l),p=n+e,f=l-s):(o.position==="left"?(h=s+e,p=Gn(a,i,n),u=Wt*-.5):(h=l-e,p=Gn(a,n,i),u=Wt*.5),f=i-n),{titleX:h,titleY:p,maxWidth:f,rotation:u}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const s=Kn(n.font),l=s.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:u,rotation:f}=this._drawArgs(l);Pl(e,n.text,0,0,s,{color:n.color,maxWidth:u,rotation:f,textAlign:Zr(n.align),textBaseline:"middle",translation:[o,a]})}}function d_(t,e){const n=new kp({ctx:t.ctx,options:e,chart:t});ks.configure(t,n,e),ks.addBox(t,n),t.titleBlock=n}var p_={id:"title",_element:kp,start(t,e,n){d_(t,n)},stop(t){const e=t.titleBlock;ks.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const s=t.titleBlock;ks.configure(t,s,n),s.options=n},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 cl={average(t){if(!t.length)return!1;let e,n,s=new Set,i=0,l=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const u=a.tooltipPosition();s.add(u.x),i+=u.y,++l}}return l===0||s.size===0?!1:{x:[...s].reduce((a,u)=>a+u)/s.size,y:i/l}},nearest(t,e){if(!t.length)return!1;let n=e.x,s=e.y,i=Number.POSITIVE_INFINITY,l,o,a;for(l=0,o=t.length;l<o;++l){const u=t[l].element;if(u&&u.hasValue()){const f=u.getCenterPoint(),h=Mr(e,f);h<i&&(i=h,a=u)}}if(a){const u=a.tooltipPosition();n=u.x,s=u.y}return{x:n,y:s}}};function Ls(t,e){return e&&(xn(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ws(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(\`
21212
21213
  \`)>-1?t.split(\`
21213
- \`):t}function h2(t,e){const{element:n,datasetIndex:s,index:i}=e,l=t.getDatasetMeta(s).controller,{label:o,value:r}=l.getLabelAndValue(i);return{chart:t,label:o,parsed:l.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:r,dataset:l.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function zu(t,e){const n=t.chart.ctx,{body:s,footer:i,title:l}=t,{boxWidth:o,boxHeight:r}=e,u=Qn(e.bodyFont),f=Qn(e.titleFont),h=Qn(e.footerFont),p=l.length,g=i.length,m=s.length,_=Ts(e.padding);let b=_.height,k=0,v=s.reduce((C,T)=>C+T.before.length+T.lines.length+T.after.length,0);if(v+=t.beforeBody.length+t.afterBody.length,p&&(b+=p*f.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),v){const C=e.displayColors?Math.max(r,u.lineHeight):u.lineHeight;b+=m*C+(v-m)*u.lineHeight+(v-1)*e.bodySpacing}g&&(b+=e.footerMarginTop+g*h.lineHeight+(g-1)*e.footerSpacing);let y=0;const S=function(C){k=Math.max(k,n.measureText(C).width+y)};return n.save(),n.font=f.string,Ft(t.title,S),n.font=u.string,Ft(t.beforeBody.concat(t.afterBody),S),y=e.displayColors?o+2+e.boxPadding:0,Ft(s,C=>{Ft(C.before,S),Ft(C.lines,S),Ft(C.after,S)}),y=0,n.font=h.string,Ft(t.footer,S),n.restore(),k+=_.width,{width:k,height:b}}function d2(t,e){const{y:n,height:s}=e;return n<s/2?"top":n>t.height-s/2?"bottom":"center"}function p2(t,e,n,s){const{x:i,width:l}=s,o=n.caretSize+n.caretPadding;if(t==="left"&&i+l+o>e.width||t==="right"&&i-l-o<0)return!0}function g2(t,e,n,s){const{x:i,width:l}=n,{width:o,chartArea:{left:r,right:u}}=t;let f="center";return s==="center"?f=i<=(r+u)/2?"left":"right":i<=l/2?f="left":i>=o-l/2&&(f="right"),p2(f,t,e,n)&&(f="center"),f}function Uu(t,e,n){const s=n.yAlign||e.yAlign||d2(t,n);return{xAlign:n.xAlign||e.xAlign||g2(t,e,n,s),yAlign:s}}function m2(t,e){let{x:n,width:s}=t;return e==="right"?n-=s:e==="center"&&(n-=s/2),n}function b2(t,e,n){let{y:s,height:i}=t;return e==="top"?s+=n:e==="bottom"?s-=i+n:s-=i/2,s}function Vu(t,e,n,s){const{caretSize:i,caretPadding:l,cornerRadius:o}=t,{xAlign:r,yAlign:u}=n,f=i+l,{topLeft:h,topRight:p,bottomLeft:g,bottomRight:m}=Ni(o);let _=m2(e,r);const b=b2(e,u,f);return u==="center"?r==="left"?_+=f:r==="right"&&(_-=f):r==="left"?_-=Math.max(h,g)+i:r==="right"&&(_+=Math.max(p,m)+i),{x:Zn(_,0,s.width-e.width),y:Zn(b,0,s.height-e.height)}}function eo(t,e,n){const s=Ts(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function Wu(t){return Ls([],Vs(t))}function _2(t,e,n){return Oi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function qu(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const _p={beforeTitle:zs,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return n[e.dataIndex]}return""},afterTitle:zs,beforeBody:zs,beforeLabel:zs,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Dt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:zs,afterBody:zs,beforeFooter:zs,footer:zs,afterFooter:zs};function hs(t,e,n,s){const i=t[e].call(n,s);return typeof i>"u"?_p[e].call(n,s):i}class Gu extends Ks{static positioners=cl;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,l=new tp(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=_2(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:s}=n,i=hs(s,"beforeTitle",this,e),l=hs(s,"title",this,e),o=hs(s,"afterTitle",this,e);let r=[];return r=Ls(r,Vs(i)),r=Ls(r,Vs(l)),r=Ls(r,Vs(o)),r}getBeforeBody(e,n){return Wu(hs(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:s}=n,i=[];return Ft(e,l=>{const o={before:[],lines:[],after:[]},r=qu(s,l);Ls(o.before,Vs(hs(r,"beforeLabel",this,l))),Ls(o.lines,hs(r,"label",this,l)),Ls(o.after,Vs(hs(r,"afterLabel",this,l))),i.push(o)}),i}getAfterBody(e,n){return Wu(hs(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:s}=n,i=hs(s,"beforeFooter",this,e),l=hs(s,"footer",this,e),o=hs(s,"afterFooter",this,e);let r=[];return r=Ls(r,Vs(i)),r=Ls(r,Vs(l)),r=Ls(r,Vs(o)),r}_createItems(e){const n=this._active,s=this.chart.data,i=[],l=[],o=[];let r=[],u,f;for(u=0,f=n.length;u<f;++u)r.push(h2(this.chart,n[u]));return e.filter&&(r=r.filter((h,p,g)=>e.filter(h,p,g,s))),e.itemSort&&(r=r.sort((h,p)=>e.itemSort(h,p,s))),Ft(r,h=>{const p=qu(e.callbacks,h);i.push(hs(p,"labelColor",this,h)),l.push(hs(p,"labelPointStyle",this,h)),o.push(hs(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,n){const s=this.options.setContext(this.getContext()),i=this._active;let l,o=[];if(!i.length)this.opacity!==0&&(l={opacity:0});else{const r=cl[s.position].call(this,i,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);const u=this._size=zu(this,s),f=Object.assign({},r,u),h=Uu(this.chart,s,f),p=Vu(s,f,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,l={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,s,i){const l=this.getCaretPosition(e,s,i);n.lineTo(l.x1,l.y1),n.lineTo(l.x2,l.y2),n.lineTo(l.x3,l.y3)}getCaretPosition(e,n,s){const{xAlign:i,yAlign:l}=this,{caretSize:o,cornerRadius:r}=s,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Ni(r),{x:g,y:m}=e,{width:_,height:b}=n;let k,v,y,S,C,T;return l==="center"?(C=m+b/2,i==="left"?(k=g,v=k-o,S=C+o,T=C-o):(k=g+_,v=k+o,S=C-o,T=C+o),y=k):(i==="left"?v=g+Math.max(u,h)+o:i==="right"?v=g+_-Math.max(f,p)-o:v=this.caretX,l==="top"?(S=m,C=S-o,k=v-o,y=v+o):(S=m+b,C=S+o,k=v+o,y=v-o),T=S),{x1:k,x2:v,x3:y,y1:S,y2:C,y3:T}}drawTitle(e,n,s){const i=this.title,l=i.length;let o,r,u;if(l){const f=ji(s.rtl,this.x,this.width);for(e.x=eo(this,s.titleAlign,s),n.textAlign=f.textAlign(s.titleAlign),n.textBaseline="middle",o=Qn(s.titleFont),r=s.titleSpacing,n.fillStyle=s.titleColor,n.font=o.string,u=0;u<l;++u)n.fillText(i[u],f.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+r,u+1===l&&(e.y+=s.titleMarginBottom-r)}}_drawColorBox(e,n,s,i,l){const o=this.labelColors[s],r=this.labelPointStyles[s],{boxHeight:u,boxWidth:f}=l,h=Qn(l.bodyFont),p=eo(this,"left",l),g=i.x(p),m=u<h.lineHeight?(h.lineHeight-u)/2:0,_=n.y+m;if(l.usePointStyle){const b={radius:Math.min(f,u)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},k=i.leftForLtr(g,f)+f/2,v=_+u/2;e.strokeStyle=l.multiKeyBackground,e.fillStyle=l.multiKeyBackground,Mr(e,b,k,v),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,Mr(e,b,k,v)}else{e.lineWidth=Tt(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const b=i.leftForLtr(g,f),k=i.leftForLtr(i.xPlus(g,1),f-2),v=Ni(o.borderRadius);Object.values(v).some(y=>y!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,vo(e,{x:b,y:_,w:f,h:u,radius:v}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),vo(e,{x:k,y:_+1,w:f-2,h:u-2,radius:v}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,_,f,u),e.strokeRect(b,_,f,u),e.fillStyle=o.backgroundColor,e.fillRect(k,_+1,f-2,u-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,n,s){const{body:i}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:u,boxWidth:f,boxPadding:h}=s,p=Qn(s.bodyFont);let g=p.lineHeight,m=0;const _=ji(s.rtl,this.x,this.width),b=function(x){n.fillText(x,_.x(e.x+m),e.y+g/2),e.y+=g+l},k=_.textAlign(o);let v,y,S,C,T,O,A;for(n.textAlign=o,n.textBaseline="middle",n.font=p.string,e.x=eo(this,k,s),n.fillStyle=s.bodyColor,Ft(this.beforeBody,b),m=r&&k!=="right"?o==="center"?f/2+h:f+2+h:0,C=0,O=i.length;C<O;++C){for(v=i[C],y=this.labelTextColors[C],n.fillStyle=y,Ft(v.before,b),S=v.lines,r&&S.length&&(this._drawColorBox(n,e,C,_,s),g=Math.max(p.lineHeight,u)),T=0,A=S.length;T<A;++T)b(S[T]),g=p.lineHeight;Ft(v.after,b)}m=0,g=p.lineHeight,Ft(this.afterBody,b),e.y-=l}drawFooter(e,n,s){const i=this.footer,l=i.length;let o,r;if(l){const u=ji(s.rtl,this.x,this.width);for(e.x=eo(this,s.footerAlign,s),e.y+=s.footerMarginTop,n.textAlign=u.textAlign(s.footerAlign),n.textBaseline="middle",o=Qn(s.footerFont),n.fillStyle=s.footerColor,n.font=o.string,r=0;r<l;++r)n.fillText(i[r],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s.footerSpacing}}drawBackground(e,n,s,i){const{xAlign:l,yAlign:o}=this,{x:r,y:u}=e,{width:f,height:h}=s,{topLeft:p,topRight:g,bottomLeft:m,bottomRight:_}=Ni(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(r+p,u),o==="top"&&this.drawCaret(e,n,s,i),n.lineTo(r+f-g,u),n.quadraticCurveTo(r+f,u,r+f,u+g),o==="center"&&l==="right"&&this.drawCaret(e,n,s,i),n.lineTo(r+f,u+h-_),n.quadraticCurveTo(r+f,u+h,r+f-_,u+h),o==="bottom"&&this.drawCaret(e,n,s,i),n.lineTo(r+m,u+h),n.quadraticCurveTo(r,u+h,r,u+h-m),o==="center"&&l==="left"&&this.drawCaret(e,n,s,i),n.lineTo(r,u+p),n.quadraticCurveTo(r,u,r+p,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,s=this.$animations,i=s&&s.x,l=s&&s.y;if(i||l){const o=cl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=zu(this,e),u=Object.assign({},o,this._size),f=Uu(n,e,u),h=Vu(e,u,f,n);(i._to!==h.x||l._to!==h.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},l={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const o=Ts(n.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&r&&(e.save(),e.globalAlpha=s,this.drawBackground(l,e,i,n),Qd(e,n.textDirection),l.y+=o.top,this.drawTitle(l,e,n),this.drawBody(l,e,n),this.drawFooter(l,e,n),$d(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const s=this._active,i=e.map(({datasetIndex:r,index:u})=>{const f=this.chart.getDatasetMeta(r);if(!f)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:f.data[u],index:u}}),l=!mo(s,i),o=this._positionChanged(i,n);(l||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,l=this._active||[],o=this._getActiveElements(e,l,n,s),r=this._positionChanged(o,e),u=n||!mo(o,l)||r;return u&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,s,i){const l=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(r=>this.chart.data.datasets[r.datasetIndex]&&this.chart.getDatasetMeta(r.datasetIndex).controller.getParsed(r.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,l.mode,l,s);return l.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:s,caretY:i,options:l}=this,o=cl[l.position].call(this,e,n);return o!==!1&&(s!==o.x||i!==o.y)}}var ra={id:"tooltip",_element:Gu,positioners:cl,afterInit(t,e,n){n&&(t.tooltip=new Gu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:_p},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const v2=(t,e,n,s)=>(typeof e=="string"?(n=t.push(e)-1,s.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function y2(t,e,n,s){const i=t.indexOf(e);if(i===-1)return v2(t,e,n,s);const l=t.lastIndexOf(e);return i!==l?n:i}const w2=(t,e)=>t===null?null:Zn(Math.round(t),0,e);function Xu(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class vp extends Zi{static id="category";static defaults={ticks:{callback:Xu}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const s=this.getLabels();for(const{index:i,label:l}of n)s[i]===l&&s.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Dt(e))return null;const s=this.getLabels();return n=isFinite(n)&&s[n]===e?n:y2(s,e,dt(n,e),this._addedLabels),w2(n,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),n||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const e=this.min,n=this.max,s=this.options.offset,i=[];let l=this.getLabels();l=e===0&&n===l.length-1?l:l.slice(e,n+1),this._valueRange=Math.max(l.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(e){return Xu.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function k2(t,e){const n=[],{bounds:i,step:l,min:o,max:r,precision:u,count:f,maxTicks:h,maxDigits:p,includeBounds:g}=t,m=l||1,_=h-1,{min:b,max:k}=e,v=!Dt(o),y=!Dt(r),S=!Dt(f),C=(k-b)/(p+1);let T=Ya((k-b)/_/m)*m,O,A,x,P;if(T<1e-14&&!v&&!y)return[{value:b},{value:k}];P=Math.ceil(k/T)-Math.floor(b/T),P>_&&(T=Ya(P*T/_/m)*m),Dt(u)||(O=Math.pow(10,u),T=Math.ceil(T*O)/O),i==="ticks"?(A=Math.floor(b/T)*T,x=Math.ceil(k/T)*T):(A=b,x=k),v&&y&&l&&Bm((r-o)/l,T/1e3)?(P=Math.round(Math.min((r-o)/T,h)),T=(r-o)/P,A=o,x=r):S?(A=v?o:A,x=y?r:x,P=f-1,T=(x-A)/P):(P=(x-A)/T,ml(P,Math.round(P),T/1e3)?P=Math.round(P):P=Math.ceil(P));const D=Math.max(Ja(T),Ja(A));O=Math.pow(10,Dt(u)?D:u),A=Math.round(A*O)/O,x=Math.round(x*O)/O;let I=0;for(v&&(g&&A!==o?(n.push({value:o}),A<o&&I++,ml(Math.round((A+I*T)*O)/O,o,Yu(o,C,t))&&I++):A<o&&I++);I<P;++I){const R=Math.round((A+I*T)*O)/O;if(y&&R>r)break;n.push({value:R})}return y&&g&&x!==r?n.length&&ml(n[n.length-1].value,r,Yu(r,C,t))?n[n.length-1].value=r:n.push({value:r}):(!y||x===r)&&n.push({value:x}),n}function Yu(t,e,{horizontal:n,minRotation:s}){const i=qs(s),l=(n?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/l,o)}class S2 extends Zi{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Dt(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:l}=this;const o=u=>i=n?i:u,r=u=>l=s?l:u;if(e){const u=Bs(i),f=Bs(l);u<0&&f<0?r(0):u>0&&f>0&&o(0)}if(i===l){let u=l===0?1:Math.abs(l*.05);r(l+u),e||o(i-u)}this.min=i,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=e,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${i} ticks. Limiting to 1000.\`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},l=this._range||this,o=k2(i,l);return e.bounds==="ticks"&&Fm(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const i=(s-n)/Math.max(e.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(e){return Kr(e,this.chart.options.locale,this.options.ticks.format)}}class yp extends S2{static id="linear";static defaults={ticks:{callback:Wd.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Es(e)?e:0,this.max=Es(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,s=qs(this.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,l.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Ro={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}},ps=Object.keys(Ro);function Ju(t,e){return t-e}function Ku(t,e){if(Dt(e))return null;const n=t._adapter,{parser:s,round:i,isoWeekday:l}=t._parseOpts;let o=e;return typeof s=="function"&&(o=s(o)),Es(o)||(o=typeof s=="string"?n.parse(o,s):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(El(l)||l===!0)?n.startOf(o,"isoWeek",l):n.startOf(o,i)),+o)}function Zu(t,e,n,s){const i=ps.length;for(let l=ps.indexOf(t);l<i-1;++l){const o=Ro[ps[l]],r=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(r*o.size))<=s)return ps[l]}return ps[i-1]}function E2(t,e,n,s,i){for(let l=ps.length-1;l>=ps.indexOf(n);l--){const o=ps[l];if(Ro[o].common&&t._adapter.diff(i,s,o)>=e-1)return o}return ps[n?ps.indexOf(n):0]}function T2(t){for(let e=ps.indexOf(t)+1,n=ps.length;e<n;++e)if(Ro[ps[e]].common)return ps[e]}function Qu(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:s,hi:i}=Xr(n,e),l=n[s]>=e?n[s]:n[i];t[l]=!0}}function M2(t,e,n,s){const i=t._adapter,l=+i.startOf(e[0].value,s),o=e[e.length-1].value;let r,u;for(r=l;r<=o;r=+i.add(r,1,s))u=n[r],u>=0&&(e[u].major=!0);return e}function $u(t,e,n){const s=[],i={},l=e.length;let o,r;for(o=0;o<l;++o)r=e[o],i[r]=o,s.push({value:r,major:!1});return l===0||!n?s:M2(t,s,i,n)}class ec extends Zi{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(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const s=e.time||(e.time={}),i=this._adapter=new Mb._date(e.adapters.date);i.init(n),gl(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ku(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,s=e.time.unit||"day";let{min:i,max:l,minDefined:o,maxDefined:r}=this.getUserBounds();function u(f){!o&&!isNaN(f.min)&&(i=Math.min(i,f.min)),!r&&!isNaN(f.max)&&(l=Math.max(l,f.max))}(!o||!r)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=Es(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),l=Es(l)&&!isNaN(l)?l:+n.endOf(Date.now(),s)+1,this.min=Math.min(i,l-1),this.max=Math.max(i+1,l)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],s=e[e.length-1]),{min:n,max:s}}buildTicks(){const e=this.options,n=e.time,s=e.ticks,i=s.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const l=this.min,o=this.max,r=Vm(i,l,o);return this._unit=n.unit||(s.autoSkip?Zu(n.minUnit,this.min,this.max,this._getLabelCapacity(l)):E2(this,r.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:T2(this._unit),this.initOffsets(i),e.reverse&&r.reverse(),$u(this,r,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,s=0,i,l;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?s=l:s=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Zn(n,0,o),s=Zn(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const e=this._adapter,n=this.min,s=this.max,i=this.options,l=i.time,o=l.unit||Zu(l.minUnit,n,s,this._getLabelCapacity(n)),r=dt(i.ticks.stepSize,1),u=o==="week"?l.isoWeekday:!1,f=El(u)||u===!0,h={};let p=n,g,m;if(f&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,f?"day":o),e.diff(s,n,o)>1e5*r)throw new Error(n+" and "+s+" are too far apart with stepSize of "+r+" "+o);const _=i.ticks.source==="data"&&this.getDataTimestamps();for(g=p,m=0;g<s;g=+e.add(g,r,o),m++)Qu(h,g,_);return(g===s||i.bounds==="ticks"||m===1)&&Qu(h,g,_),Object.keys(h).sort(Ju).map(b=>+b)}getLabelForValue(e){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(e,s.tooltipFormat):n.format(e,s.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,l=this._unit,o=n||i[l];return this._adapter.format(e,o)}_tickFormatFunction(e,n,s,i){const l=this.options,o=l.ticks.callback;if(o)return rn(o,[e,n,s],this);const r=l.time.displayFormats,u=this._unit,f=this._majorUnit,h=u&&r[u],p=f&&r[f],g=s[n],m=f&&p&&g&&g.major;return this._adapter.format(e,i||(m?p:h))}generateTickLabels(e){let n,s,i;for(n=0,s=e.length;n<s;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,s=this.ctx.measureText(e).width,i=qs(this.isHorizontal()?n.maxRotation:n.minRotation),l=Math.cos(i),o=Math.sin(i),r=this._resolveTickFontOptions(0).size;return{w:s*l+r*o,h:s*o+r*l}}_getLabelCapacity(e){const n=this.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,l=this._tickFormatFunction(e,0,$u(this,[e],this._majorUnit),i),o=this._getLabelSize(l),r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let e=this._cache.data||[],n,s;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n<s;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,s;if(e.length)return e;const i=this.getLabels();for(n=0,s=i.length;n<s;++n)e.push(Ku(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return zd(e.sort(Ju))}}function to(t,e,n){let s=0,i=t.length-1,l,o,r,u;n?(e>=t[s].pos&&e<=t[i].pos&&({lo:s,hi:i}=Si(t,"pos",e)),{pos:l,time:r}=t[s],{pos:o,time:u}=t[i]):(e>=t[s].time&&e<=t[i].time&&({lo:s,hi:i}=Si(t,"time",e)),{time:l,pos:r}=t[s],{time:o,pos:u}=t[i]);const f=o-l;return f?r+(u-r)*(e-l)/f:r}class Y5 extends ec{static id="timeseries";static defaults=ec.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=to(n,this.min),this._tableRange=to(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:s}=this,i=[],l=[];let o,r,u,f,h;for(o=0,r=e.length;o<r;++o)f=e[o],f>=n&&f<=s&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(o=0,r=i.length;o<r;++o)h=i[o+1],u=i[o-1],f=i[o],Math.round((h+u)/2)!==f&&l.push({time:f,pos:o/(r-1)});return l}_generate(){const e=this.min,n=this.max;let s=super.getDataTimestamps();return(!s.includes(e)||!s.length)&&s.splice(0,0,e),(!s.includes(n)||s.length===1)&&s.push(n),s.sort((i,l)=>i-l)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?e=this.normalize(n.concat(s)):e=n.length?n:s,e=this._cache.all=e,e}getDecimalForValue(e){return(to(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return to(this._table,s*this._tableRange+this._minPos,!0)}}const tc=/^on/,wp=[];Object.keys(globalThis).forEach(t=>{tc.test(t)&&wp.push(t.replace(tc,""))});function Do(t){const e=zi,n=[];function s(i){tg(e,i)}is(()=>{const i=t();wp.forEach(i instanceof Element?l=>n.push(te(i,l,s)):l=>n.push(i.$on(l,s)))}),Ai(()=>{for(;n.length;)n.pop()()})}function C2(t){let e,n=[t[1]],s={};for(let i=0;i<n.length;i+=1)s=Ss(s,n[i]);return{c(){e=d("canvas"),Kp(e,s)},m(i,l){H(i,e,l),t[8](e)},p:Ee,i:Ee,o:Ee,d(i){i&&L(e),t[8](null)}}}function P2(t){let{data:e,type:n,options:s,plugins:i,children:l,$$scope:o,$$slots:r,...u}=t;return u}function A2(t,e,n){let{type:s}=e,{data:i={datasets:[]}}=e,{options:l={}}=e,{plugins:o=[]}=e,{updateMode:r=void 0}=e,{chart:u=null}=e,f,h=P2(e);is(()=>{n(2,u=new pi(f,{type:s,data:i,options:l,plugins:o}))}),eg(()=>{u&&(n(2,u.data=i,u),Object.assign(u.options,l),u.update(r))}),Ai(()=>{u&&u.destroy(),n(2,u=null)}),Do(()=>f);function p(g){vn[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{n(9,e=Ss(Ss({},e),ci(g))),"type"in g&&n(3,s=g.type),"data"in g&&n(4,i=g.data),"options"in g&&n(5,l=g.options),"plugins"in g&&n(6,o=g.plugins),"updateMode"in g&&n(7,r=g.updateMode),"chart"in g&&n(2,u=g.chart)},e=ci(e),[f,h,u,s,i,l,o,r,p]}class aa extends zt{constructor(e){super(),jt(this,e,A2,C2,Lt,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function O2(t){let e,n,s;const i=[{type:"line"},t[1]];function l(r){t[4](r)}let o={};for(let r=0;r<i.length;r+=1)o=Ss(o,i[r]);return t[0]!==void 0&&(o.chart=t[0]),e=new aa({props:o}),t[3](e),vn.push(()=>Kn(e,"chart",l)),{c(){pt(e.$$.fragment)},m(r,u){ut(e,r,u),s=!0},p(r,[u]){const f=u&2?Br(i,[i[0],Fr(r[1])]):{};!n&&u&1&&(n=!0,f.chart=r[0],Jn(()=>n=!1)),e.$set(f)},i(r){s||(Be(e.$$.fragment,r),s=!0)},o(r){Fe(e.$$.fragment,r),s=!1},d(r){t[3](null),ct(e,r)}}}function x2(t,e,n){pi.register(Tb);let{chart:s=null}=e,i,l;Do(()=>l);function o(u){vn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function r(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,r]}class R2 extends zt{constructor(e){super(),jt(this,e,x2,O2,Lt,{chart:0})}}function D2(t){let e,n,s;const i=[{type:"doughnut"},t[1]];function l(r){t[4](r)}let o={};for(let r=0;r<i.length;r+=1)o=Ss(o,i[r]);return t[0]!==void 0&&(o.chart=t[0]),e=new aa({props:o}),t[3](e),vn.push(()=>Kn(e,"chart",l)),{c(){pt(e.$$.fragment)},m(r,u){ut(e,r,u),s=!0},p(r,[u]){const f=u&2?Br(i,[i[0],Fr(r[1])]):{};!n&&u&1&&(n=!0,f.chart=r[0],Jn(()=>n=!1)),e.$set(f)},i(r){s||(Be(e.$$.fragment,r),s=!0)},o(r){Fe(e.$$.fragment,r),s=!1},d(r){t[3](null),ct(e,r)}}}function L2(t,e,n){pi.register(Eb);let{chart:s=null}=e,i,l;Do(()=>l);function o(u){vn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function r(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,r]}class H2 extends zt{constructor(e){super(),jt(this,e,L2,D2,Lt,{chart:0})}}function I2(t){let e,n,s;const i=[{type:"bar"},t[1]];function l(r){t[4](r)}let o={};for(let r=0;r<i.length;r+=1)o=Ss(o,i[r]);return t[0]!==void 0&&(o.chart=t[0]),e=new aa({props:o}),t[3](e),vn.push(()=>Kn(e,"chart",l)),{c(){pt(e.$$.fragment)},m(r,u){ut(e,r,u),s=!0},p(r,[u]){const f=u&2?Br(i,[i[0],Fr(r[1])]):{};!n&&u&1&&(n=!0,f.chart=r[0],Jn(()=>n=!1)),e.$set(f)},i(r){s||(Be(e.$$.fragment,r),s=!0)},o(r){Fe(e.$$.fragment,r),s=!1},d(r){t[3](null),ct(e,r)}}}function B2(t,e,n){pi.register(kb);let{chart:s=null}=e,i,l;Do(()=>l);function o(u){vn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function r(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,r]}class F2 extends zt{constructor(e){super(),jt(this,e,B2,I2,Lt,{chart:0})}}const nc=typeof window<"u";function N2(){const{subscribe:t,set:e}=Js({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let n=null,s=null,i=!1;function l(){if(!nc)return;const u=document.createElement("div");u.className="text-base-content",u.style.position="absolute",u.style.visibility="hidden",document.body.appendChild(u);const f=getComputedStyle(u).color;document.body.removeChild(u);const h=f.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/),p=h?\`rgba(\${h[1]}, \${h[2]}, \${h[3]}, 0.1)\`:"rgba(255, 255, 255, 0.1)";e({textColor:f,gridColor:p})}function o(){if(!nc||i)return;i=!0,l(),n=new MutationObserver(()=>{l()}),n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),s=window.matchMedia("(prefers-color-scheme: dark)");const u=()=>l();s.addEventListener("change",u),typeof window<"u"&&window.addEventListener("beforeunload",()=>{r()})}function r(){n&&(n.disconnect(),n=null),s&&(s.removeEventListener("change",l),s=null),i=!1}return{subscribe:t,init:o,cleanup:r}}const Cs=N2();Ns(Cs,t=>t.textColor);Ns(Cs,t=>t.gridColor);function ua(t,e,n=!0){return{display:n&&!!t,text:t,color:e,font:{size:16,weight:"bold"}}}function j2(t,e={}){const{position:n="top",display:s=!0,padding:i=15,fontSize:l=11}=e;return{display:s,position:n,labels:{padding:i,font:{size:l},color:t}}}function So(t,e,n={}){const{stacked:s=!1,beginAtZero:i=!0,fontSize:l=11,maxRotation:o,minRotation:r,title:u}=n,f={stacked:s,beginAtZero:i,ticks:{font:{size:l},color:t},grid:{color:e}};return u&&(f.title={display:u.display,text:u.text,color:t}),o!==void 0&&(f.ticks.maxRotation=o),r!==void 0&&(f.ticks.minRotation=r),f}function kp(t="index",e=!1){return{mode:t,intersect:e}}function z2(t){let e,n,s;return n=new R2({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),pt(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){H(i,e,l),ut(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(Be(n.$$.fragment,i),s=!0)},o(i){Fe(n.$$.fragment,i),s=!1},d(i){i&&L(e),ct(n)}}}function U2(t,e,n){let s,i,l;Gt(t,Cs,h=>n(6,l=h)),pi.register(vp,yp,Q_,Z_,f2,ra,oa);let{title:o}=e,{labels:r}=e,{datasets:u}=e,{yAxisLabel:f=""}=e;return is(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=h=>{"title"in h&&n(2,o=h.title),"labels"in h&&n(3,r=h.labels),"datasets"in h&&n(4,u=h.datasets),"yAxisLabel"in h&&n(5,f=h.yAxisLabel)},t.$$.update=()=>{t.$$.dirty&24&&n(1,s={labels:r,datasets:u.map(h=>({...h,borderColor:h.borderColor||"rgb(75, 192, 192)",backgroundColor:h.backgroundColor||"rgba(75, 192, 192, 0.2)",tension:h.tension??.4}))}),t.$$.dirty&116&&n(0,i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:u.length>1,position:"top",labels:{color:l.textColor}},title:ua(o,l.textColor,!0),tooltip:kp("index",!1)},scales:{y:So(l.textColor,l.gridColor,{beginAtZero:!0,title:f?{display:!0,text:f}:void 0}),x:{...So(l.textColor,l.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:l.textColor}}},interaction:{mode:"nearest",axis:"x",intersect:!1}})},[i,s,o,r,u,f,l]}class no extends zt{constructor(e){super(),jt(this,e,U2,z2,Lt,{title:2,labels:3,datasets:4,yAxisLabel:5})}}function V2(t){let e,n,s;return n=new H2({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),pt(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){H(i,e,l),ut(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(Be(n.$$.fragment,i),s=!0)},o(i){Fe(n.$$.fragment,i),s=!1},d(i){i&&L(e),ct(n)}}}function W2(t,e,n){let s,i,l;Gt(t,Cs,u=>n(4,l=u)),pi.register(z_,ra,oa);let{data:o=[]}=e,{title:r=""}=e;return is(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,r=u.title)},t.$$.update=()=>{t.$$.dirty&20&&n(1,s={labels:o.map(u=>u.label),datasets:[{data:o.map(u=>u.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:l.gridColor,borderWidth:1}]}),t.$$.dirty&28&&n(0,i={responsive:!0,maintainAspectRatio:!1,plugins:{title:ua(r,l.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:l.textColor,generateLabels:u=>{const h=u.data.datasets[0].backgroundColor;return u.data.labels?.map((p,g)=>({text:\`\${p} (\${o[g]?.percentage||0}%)\`,fillStyle:h[g],strokeStyle:h[g],fontColor:l.textColor,hidden:!1,index:g}))||[]}}},tooltip:{callbacks:{label:u=>{const f=u.label||"",h=u.parsed||0,p=o[u.dataIndex]?.percentage||0;return\`\${f}: \${h} (\${p}%)\`}}}}})},[i,s,o,r,l]}class Sp extends zt{constructor(e){super(),jt(this,e,W2,V2,Lt,{data:2,title:3})}}function q2(t){let e,n,s;return n=new F2({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),pt(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){H(i,e,l),ut(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(Be(n.$$.fragment,i),s=!0)},o(i){Fe(n.$$.fragment,i),s=!1},d(i){i&&L(e),ct(n)}}}function G2(t,e,n){let s,i,l;Gt(t,Cs,u=>n(4,l=u)),pi.register(i2,vp,yp,ra,oa);let{data:o=[]}=e,{title:r=""}=e;return is(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,r=u.title)},t.$$.update=()=>{t.$$.dirty&4&&n(1,s={labels:o.map(u=>u.label),datasets:[{label:"2xx",data:o.map(u=>u.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:o.map(u=>u.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:o.map(u=>u.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:o.map(u=>u.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),t.$$.dirty&24&&n(0,i={responsive:!0,maintainAspectRatio:!1,scales:{x:So(l.textColor,l.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:So(l.textColor,l.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:ua(r,l.textColor),legend:j2(l.textColor,{position:"top",padding:15,fontSize:11}),tooltip:kp("index",!1)}})},[i,s,o,r,l]}class X2 extends zt{constructor(e){super(),jt(this,e,G2,q2,Lt,{data:2,title:3})}}function Y2(t){let e,n,s,i,l,o=t[11]("monitoring.noData")+"",r;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r)},p(u,f){f&2048&&o!==(o=u[11]("monitoring.noData")+"")&&M(r,o)},i:Ee,o:Ee,d(u){u&&L(e)}}}function J2(t){let e,n,s,i,l,o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O,A,x,P,D,I,R,U,N,z,B,j,F,W,G,Y,Q,le;l=new no({props:{title:t[11]("monitoring.charts.requestsTrend"),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")}}),h=new no({props:{title:t[11]("monitoring.charts.responseTimeTrend"),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")}}),b=new no({props:{title:t[11]("monitoring.charts.successRateTrend"),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")}}),C=new no({props:{title:t[11]("monitoring.charts.errorsTrend"),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")}});const Z=[$2,Q2],V=[];function X(q,ce){return q[5].length>0?0:1}P=X(t),D=V[P]=Z[P](t);const J=[tv,ev],oe=[];function ne(q,ce){return q[4].length>0?0:1}z=ne(t),B=oe[z]=J[z](t);const ee=[sv,nv],se=[];function K(q,ce){return q[3].length>0?0:1}return Y=K(t),Q=se[Y]=ee[Y](t),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),pt(l.$$.fragment),o=w(),r=d("div"),u=d("div"),f=d("div"),pt(h.$$.fragment),p=w(),g=d("div"),m=d("div"),_=d("div"),pt(b.$$.fragment),k=w(),v=d("div"),y=d("div"),S=d("div"),pt(C.$$.fragment),T=w(),O=d("div"),A=d("div"),x=d("div"),D.c(),I=w(),R=d("div"),U=d("div"),N=d("div"),B.c(),j=w(),F=d("div"),W=d("div"),G=d("div"),Q.c(),c(i,"class","h-64"),c(s,"class","card-body p-4"),c(n,"class","card bg-base-100 shadow-xl"),c(f,"class","h-64"),c(u,"class","card-body p-4"),c(r,"class","card bg-base-100 shadow-xl"),c(_,"class","h-64"),c(m,"class","card-body p-4"),c(g,"class","card bg-base-100 shadow-xl"),c(S,"class","h-64"),c(y,"class","card-body p-4"),c(v,"class","card bg-base-100 shadow-xl"),c(x,"class","h-64"),c(A,"class","card-body p-4"),c(O,"class","card bg-base-100 shadow-xl"),c(N,"class","h-64"),c(U,"class","card-body p-4"),c(R,"class","card bg-base-100 shadow-xl"),c(G,"class","h-64"),c(W,"class","card-body p-4"),c(F,"class","card bg-base-100 shadow-xl lg:col-span-2"),c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(q,ce){H(q,e,ce),a(e,n),a(n,s),a(s,i),ut(l,i,null),a(e,o),a(e,r),a(r,u),a(u,f),ut(h,f,null),a(e,p),a(e,g),a(g,m),a(m,_),ut(b,_,null),a(e,k),a(e,v),a(v,y),a(y,S),ut(C,S,null),a(e,T),a(e,O),a(O,A),a(A,x),V[P].m(x,null),a(e,I),a(e,R),a(R,U),a(U,N),oe[z].m(N,null),a(e,j),a(e,F),a(F,W),a(W,G),se[Y].m(G,null),le=!0},p(q,ce){const he={};ce&2048&&(he.title=q[11]("monitoring.charts.requestsTrend")),ce&1024&&(he.labels=q[10]),ce&2560&&(he.datasets=[{label:q[11]("monitoring.charts.periodRequests"),data:q[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),ce&2048&&(he.yAxisLabel=q[11]("monitoring.charts.requests")),l.$set(he);const ke={};ce&2048&&(ke.title=q[11]("monitoring.charts.responseTimeTrend")),ce&1024&&(ke.labels=q[10]),ce&2176&&(ke.datasets=[{label:q[11]("monitoring.charts.avgResponseTime"),data:q[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),ce&2048&&(ke.yAxisLabel=q[11]("monitoring.charts.milliseconds")),h.$set(ke);const we={};ce&2048&&(we.title=q[11]("monitoring.charts.successRateTrend")),ce&1024&&(we.labels=q[10]),ce&2112&&(we.datasets=[{label:q[11]("monitoring.charts.successRate"),data:q[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),ce&2048&&(we.yAxisLabel=q[11]("monitoring.charts.percentage")),b.$set(we);const pe={};ce&2048&&(pe.title=q[11]("monitoring.charts.errorsTrend")),ce&1024&&(pe.labels=q[10]),ce&2304&&(pe.datasets=[{label:q[11]("monitoring.charts.periodErrors"),data:q[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),ce&2048&&(pe.yAxisLabel=q[11]("monitoring.charts.errors")),C.$set(pe);let me=P;P=X(q),P===me?V[P].p(q,ce):(gs(),Fe(V[me],1,1,()=>{V[me]=null}),ms(),D=V[P],D?D.p(q,ce):(D=V[P]=Z[P](q),D.c()),Be(D,1),D.m(x,null));let Pe=z;z=ne(q),z===Pe?oe[z].p(q,ce):(gs(),Fe(oe[Pe],1,1,()=>{oe[Pe]=null}),ms(),B=oe[z],B?B.p(q,ce):(B=oe[z]=J[z](q),B.c()),Be(B,1),B.m(N,null));let Se=Y;Y=K(q),Y===Se?se[Y].p(q,ce):(gs(),Fe(se[Se],1,1,()=>{se[Se]=null}),ms(),Q=se[Y],Q?Q.p(q,ce):(Q=se[Y]=ee[Y](q),Q.c()),Be(Q,1),Q.m(G,null))},i(q){le||(Be(l.$$.fragment,q),Be(h.$$.fragment,q),Be(b.$$.fragment,q),Be(C.$$.fragment,q),Be(D),Be(B),Be(Q),le=!0)},o(q){Fe(l.$$.fragment,q),Fe(h.$$.fragment,q),Fe(b.$$.fragment,q),Fe(C.$$.fragment,q),Fe(D),Fe(B),Fe(Q),le=!1},d(q){q&&L(e),ct(l),ct(h),ct(b),ct(C),V[P].d(),oe[z].d(),se[Y].d()}}}function K2(t){let e,n,s,i,l,o=t[11]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[1]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p&2048&&o!==(o=h[11]("common.error")+"")&&M(r,o),p&2&&M(f,h[1])},i:Ee,o:Ee,d(h){h&&L(e)}}}function Z2(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Q2(t){let e,n=t[11]("dashboard.noData")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-50")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&2048&&n!==(n=i[11]("dashboard.noData")+"")&&M(s,n)},i:Ee,o:Ee,d(i){i&&L(e)}}}function $2(t){let e,n;return e=new Sp({props:{data:t[5],title:t[11]("dashboard.upstreamDistribution")}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&32&&(l.data=s[5]),i&2048&&(l.title=s[11]("dashboard.upstreamDistribution")),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function ev(t){let e,n=t[11]("dashboard.noData")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-50")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&2048&&n!==(n=i[11]("dashboard.noData")+"")&&M(s,n)},i:Ee,o:Ee,d(i){i&&L(e)}}}function tv(t){let e,n;return e=new Sp({props:{data:t[4],title:t[11]("dashboard.upstreamFailures")}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&16&&(l.data=s[4]),i&2048&&(l.title=s[11]("dashboard.upstreamFailures")),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function nv(t){let e,n=t[11]("dashboard.noData")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-50")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&2048&&n!==(n=i[11]("dashboard.noData")+"")&&M(s,n)},i:Ee,o:Ee,d(i){i&&L(e)}}}function sv(t){let e,n;return e=new X2({props:{data:t[3],title:t[11]("dashboard.upstreamStatusCodes")}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&8&&(l.data=s[3]),i&2048&&(l.title=s[11]("dashboard.upstreamStatusCodes")),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function iv(t){let e,n,s,i=t[11]("monitoring.title")+"",l,o,r,u,f;const h=[Z2,K2,J2,Y2],p=[];function g(m,_){return m[2]&&!m[0]?0:m[1]?1:m[0]&&m[0].timestamps.length>0?2:3}return r=g(t),u=p[r]=h[r](t),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=w(),u.c(),c(s,"class","text-2xl font-bold"),c(e,"class","space-y-6")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(s,l),a(e,o),p[r].m(e,null),f=!0},p(m,[_]){(!f||_&2048)&&i!==(i=m[11]("monitoring.title")+"")&&M(l,i);let b=r;r=g(m),r===b?p[r].p(m,_):(gs(),Fe(p[b],1,1,()=>{p[b]=null}),ms(),u=p[r],u?u.p(m,_):(u=p[r]=h[r](m),u.c()),Be(u,1),u.m(e,null))},i(m){f||(Be(u),f=!0)},o(m){Fe(u),f=!1},d(m){m&&L(e),p[r].d()}}}function lv(t,e,n){let s,i,l,o,r,u,f,h,p;Gt(t,Et,x=>n(11,p=x));let{selectedRange:g="1h"}=e,{onDataLoaded:m=()=>{}}=e,_=null,b=!0,k=null,v,y=[],S=[],C=[];async function T(){try{n(2,b=!0),n(0,_=await em(g)),n(1,k=null)}catch(x){n(1,k=x.message)}finally{n(2,b=!1)}}async function O(){try{const[x,P,D]=await Promise.all([tm(g),nm(g),sm(g)]);n(14,y=x.data),n(15,S=P.data),n(16,C=D.data)}catch(x){console.error("Failed to load upstream stats:",x)}finally{}}async function A(){await Promise.all([T(),O()])}return is(()=>{A(),v=setInterval(A,3e4)}),Ai(()=>{v&&clearInterval(v)}),t.$$set=x=>{"selectedRange"in x&&n(12,g=x.selectedRange),"onDataLoaded"in x&&n(13,m=x.onDataLoaded)},t.$$.update=()=>{t.$$.dirty&4096&&g&&A(),t.$$.dirty&8195&&(_!==null||k!==null)&&m(k?null:_),t.$$.dirty&4097&&n(10,s=_?.timestamps.map(x=>{const P=new Date(x);switch(g){case"1h":return P.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return P.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return P.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return P.toLocaleTimeString("zh-CN")}})||[]),t.$$.dirty&1&&n(9,i=_?.requests||[]),t.$$.dirty&1&&n(8,l=_?.errors||[]),t.$$.dirty&1&&n(7,o=_?.responseTime||[]),t.$$.dirty&1&&n(6,r=_?.successRate||[]),t.$$.dirty&16384&&n(5,u=y.map(x=>({label:new URL(x.upstream).host,value:x.count,percentage:x.percentage}))),t.$$.dirty&32768&&n(4,f=(()=>{const x=S.reduce((P,D)=>P+D.failedRequests,0);return S.filter(P=>P.failedRequests>0).map(P=>({label:new URL(P.upstream).host,value:P.failedRequests,percentage:x>0?Math.round(P.failedRequests/x*100*100)/100:0}))})()),t.$$.dirty&65536&&n(3,h=C.map(x=>({label:new URL(x.upstream).host,status2xx:x.status2xx,status3xx:x.status3xx,status4xx:x.status4xx,status5xx:x.status5xx})))},[_,k,b,h,f,u,r,o,l,i,s,p,g,m,y,S,C]}class ov extends zt{constructor(e){super(),jt(this,e,lv,iv,Lt,{selectedRange:12,onDataLoaded:13})}}function rv(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,r,u,f,h,p,g,m=t[2]("dashboard.requestsPerSecond")+"",_,b,k,v,y,S,C,T=t[2]("dashboard.successRate")+"",O,A,x,P,D,I,R,U=t[2]("dashboard.avgResponseTime")+"",N,z,B;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),r=w(),u=d("p"),u.textContent="-",f=w(),h=d("div"),p=d("div"),g=d("h2"),_=E(m),b=w(),k=d("p"),k.textContent="-",v=w(),y=d("div"),S=d("div"),C=d("h2"),O=E(T),A=w(),x=d("p"),x.textContent="-",P=w(),D=d("div"),I=d("div"),R=d("h2"),N=E(U),z=w(),B=d("p"),B.textContent="-",c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(g,"class","card-title text-sm"),c(k,"class","text-3xl font-bold"),c(p,"class","card-body"),c(h,"class","card bg-base-100 shadow-xl"),c(C,"class","card-title text-sm"),c(x,"class","text-3xl font-bold"),c(S,"class","card-body"),c(y,"class","card bg-base-100 shadow-xl"),c(R,"class","card-title text-sm"),c(B,"class","text-3xl font-bold"),c(I,"class","card-body"),c(D,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(j,F){H(j,e,F),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(e,f),a(e,h),a(h,p),a(p,g),a(g,_),a(p,b),a(p,k),a(e,v),a(e,y),a(y,S),a(S,C),a(C,O),a(S,A),a(S,x),a(e,P),a(e,D),a(D,I),a(I,R),a(R,N),a(I,z),a(I,B)},p(j,F){F&4&&l!==(l=j[2]("dashboard.totalRequests")+"")&&M(o,l),F&4&&m!==(m=j[2]("dashboard.requestsPerSecond")+"")&&M(_,m),F&4&&T!==(T=j[2]("dashboard.successRate")+"")&&M(O,T),F&4&&U!==(U=j[2]("dashboard.avgResponseTime")+"")&&M(N,U)},d(j){j&&L(e)}}}function av(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,r,u,f=t[1].totalRequests+"",h,p,g,m,_,b=t[2]("dashboard.requestsPerSecond")+"",k,v,y,S=t[1].requestsPerSecond.toFixed(2)+"",C,T,O,A,x,P=t[2]("dashboard.successRate")+"",D,I,R,U=t[1].successRate.toFixed(1)+"",N,z,B,j,F,W,G=t[2]("dashboard.avgResponseTime")+"",Y,Q,le,Z=t[1].avgResponseTime.toFixed(0)+"",V,X;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),g=d("div"),m=d("div"),_=d("h2"),k=E(b),v=w(),y=d("p"),C=E(S),T=w(),O=d("div"),A=d("div"),x=d("h2"),D=E(P),I=w(),R=d("p"),N=E(U),z=E("%"),B=w(),j=d("div"),F=d("div"),W=d("h2"),Y=E(G),Q=w(),le=d("p"),V=E(Z),X=E("ms"),c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(_,"class","card-title text-sm"),c(y,"class","text-3xl font-bold"),c(m,"class","card-body"),c(g,"class","card bg-base-100 shadow-xl"),c(x,"class","card-title text-sm"),c(R,"class","text-3xl font-bold"),c(A,"class","card-body"),c(O,"class","card bg-base-100 shadow-xl"),c(W,"class","card-title text-sm"),c(le,"class","text-3xl font-bold"),c(F,"class","card-body"),c(j,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(J,oe){H(J,e,oe),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(e,p),a(e,g),a(g,m),a(m,_),a(_,k),a(m,v),a(m,y),a(y,C),a(e,T),a(e,O),a(O,A),a(A,x),a(x,D),a(A,I),a(A,R),a(R,N),a(R,z),a(e,B),a(e,j),a(j,F),a(F,W),a(W,Y),a(F,Q),a(F,le),a(le,V),a(le,X)},p(J,oe){oe&4&&l!==(l=J[2]("dashboard.totalRequests")+"")&&M(o,l),oe&2&&f!==(f=J[1].totalRequests+"")&&M(h,f),oe&4&&b!==(b=J[2]("dashboard.requestsPerSecond")+"")&&M(k,b),oe&2&&S!==(S=J[1].requestsPerSecond.toFixed(2)+"")&&M(C,S),oe&4&&P!==(P=J[2]("dashboard.successRate")+"")&&M(D,P),oe&2&&U!==(U=J[1].successRate.toFixed(1)+"")&&M(N,U),oe&4&&G!==(G=J[2]("dashboard.avgResponseTime")+"")&&M(Y,G),oe&2&&Z!==(Z=J[1].avgResponseTime.toFixed(0)+"")&&M(V,Z)},d(J){J&&L(e)}}}function uv(t){let e,n,s=t[2]("dashboard.title")+"",i,l,o,r,u=t[2]("dashboard.dataRange")+"",f,h,p=t[2]("monitoring.range."+t[0])+"",g,m,_,b,k,v,y,S,C,T,O,A,x,P,D,I,R,U;function N(j,F){return j[1]?av:rv}let z=N(t),B=z(t);return P=new ov({props:{selectedRange:t[0],onDataLoaded:t[3]}}),I=Zp(t[5][0]),{c(){e=d("div"),n=d("h1"),i=E(s),l=w(),o=d("div"),r=d("p"),f=E(u),h=E(": "),g=E(p),m=w(),_=d("div"),b=d("input"),v=w(),y=d("input"),C=w(),T=d("input"),A=w(),B.c(),x=w(),pt(P.$$.fragment),c(n,"class","text-3xl font-bold mb-6"),c(r,"class","text-sm text-gray-500"),c(b,"class","join-item btn btn-sm"),c(b,"type","radio"),c(b,"name","range"),c(b,"aria-label",k=t[2]("monitoring.range.oneHour")),b.__value="1h",ie(b,b.__value),c(y,"class","join-item btn btn-sm"),c(y,"type","radio"),c(y,"name","range"),c(y,"aria-label",S=t[2]("monitoring.range.twelveHours")),y.__value="12h",ie(y,y.__value),c(T,"class","join-item btn btn-sm"),c(T,"type","radio"),c(T,"name","range"),c(T,"aria-label",O=t[2]("monitoring.range.twentyFourHours")),T.__value="24h",ie(T,T.__value),c(_,"class","join"),c(o,"class","flex justify-between items-center mb-6"),c(e,"class","p-6"),I.p(b,y,T)},m(j,F){H(j,e,F),a(e,n),a(n,i),a(e,l),a(e,o),a(o,r),a(r,f),a(r,h),a(r,g),a(o,m),a(o,_),a(_,b),b.checked=b.__value===t[0],a(_,v),a(_,y),y.checked=y.__value===t[0],a(_,C),a(_,T),T.checked=T.__value===t[0],a(e,A),B.m(e,null),a(e,x),ut(P,e,null),D=!0,R||(U=[te(b,"change",t[4]),te(y,"change",t[6]),te(T,"change",t[7])],R=!0)},p(j,[F]){(!D||F&4)&&s!==(s=j[2]("dashboard.title")+"")&&M(i,s),(!D||F&4)&&u!==(u=j[2]("dashboard.dataRange")+"")&&M(f,u),(!D||F&5)&&p!==(p=j[2]("monitoring.range."+j[0])+"")&&M(g,p),(!D||F&4&&k!==(k=j[2]("monitoring.range.oneHour")))&&c(b,"aria-label",k),F&1&&(b.checked=b.__value===j[0]),(!D||F&4&&S!==(S=j[2]("monitoring.range.twelveHours")))&&c(y,"aria-label",S),F&1&&(y.checked=y.__value===j[0]),(!D||F&4&&O!==(O=j[2]("monitoring.range.twentyFourHours")))&&c(T,"aria-label",O),F&1&&(T.checked=T.__value===j[0]),z===(z=N(j))&&B?B.p(j,F):(B.d(1),B=z(j),B&&(B.c(),B.m(e,x)));const W={};F&1&&(W.selectedRange=j[0]),P.$set(W)},i(j){D||(Be(P.$$.fragment,j),D=!0)},o(j){Fe(P.$$.fragment,j),D=!1},d(j){j&&L(e),B.d(),ct(P),I.r(),R=!1,at(U)}}}function cv(t){switch(t){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function fv(t,e,n){let s;Gt(t,Et,g=>n(2,s=g));let i="1h",l=null;function o(g){n(1,l=r(g))}function r(g){if(!g||g.requests.length===0)return null;const m=g.requests.reduce((S,C)=>S+C,0),_=cv(i),b=m/_,k=g.errors.reduce((S,C)=>S+C,0),v=m>0?(m-k)/m*100:100,y=g.responseTime.length>0?g.responseTime.reduce((S,C)=>S+C,0)/g.responseTime.length:0;return{totalRequests:m,requestsPerSecond:b,successRate:v,avgResponseTime:y}}const u=[[]];function f(){i=this.__value,n(0,i)}function h(){i=this.__value,n(0,i)}function p(){i=this.__value,n(0,i)}return[i,l,s,o,f,u,h,p]}class hv extends zt{constructor(e){super(),jt(this,e,fv,uv,Lt,{})}}async function dv(){return dn.post("/system/reload",{})}async function pv(){return dn.post("/system/restart",{})}function fl(){const{subscribe:t,update:e}=Js([]);let n=0;return{subscribe:t,show:(s,i="info",l=3e3)=>{const o=n++,r={id:o,message:s,type:i,duration:l};return e(u=>[...u,r]),l>0&&setTimeout(()=>{e(u=>u.filter(f=>f.id!==o))},l),o},success:(s,i=3e3)=>fl().show(s,"success",i),error:(s,i=4e3)=>fl().show(s,"error",i),warning:(s,i=3500)=>fl().show(s,"warning",i),info:(s,i=3e3)=>fl().show(s,"info",i),remove:s=>{e(i=>i.filter(l=>l.id!==s))},clear:()=>{e(()=>[])}}}const bt=fl();function sc(t,e,n){const s=t.slice();return s[13]=e[n],s[14]=e,s[15]=n,s}function ic(t){let e,n=t[5]("auth.helpText")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&32&&n!==(n=i[5]("auth.helpText")+"")&&M(s,n)},d(i){i&&L(e)}}}function lc(t){let e,n,s,i,l=t[5]("auth.tokens")+"",o,r,u=t[3].length+"",f,h,p,g,m,_,b,k,v,y,S=t[5]("auth.expressionSupport")+"",C,T,O,A,x,P,D,I,R=t[5]("auth.addToken")+"",U,N,z,B,j,F,W,G=t[5]("auth.securityNotice")+"",Y,Q,le,Z=et(t[3]),V=[];for(let X=0;X<Z.length;X+=1)V[X]=oc(sc(t,Z,X));return{c(){e=d("div"),n=d("input"),s=w(),i=d("div"),o=E(l),r=E(" ("),f=E(u),h=E(")"),p=w(),g=d("div"),m=d("div"),_=de("svg"),b=de("path"),k=w(),v=d("div"),y=d("div"),C=E(S),T=w(),O=d("div"),A=d("code"),A.textContent="{{ env.API_TOKEN }}",x=w();for(let X=0;X<V.length;X+=1)V[X].c();P=w(),D=d("button"),I=E("+ "),U=E(R),N=w(),z=d("div"),B=de("svg"),j=de("path"),F=w(),W=d("div"),Y=E(G),c(n,"type","checkbox"),n.checked=!0,c(i,"class","collapse-title text-sm font-medium"),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(_,"xmlns","http://www.w3.org/2000/svg"),c(_,"fill","none"),c(_,"viewBox","0 0 24 24"),c(_,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),c(A,"class","text-xs bg-base-300 px-1 rounded"),c(O,"class","mt-1"),c(m,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),c(D,"type","button"),c(D,"class","btn btn-sm btn-ghost"),c(g,"class","collapse-content space-y-2"),c(e,"class","collapse collapse-arrow bg-base-200 collapse-open"),c(j,"stroke-linecap","round"),c(j,"stroke-linejoin","round"),c(j,"stroke-width","2"),c(j,"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"),c(B,"xmlns","http://www.w3.org/2000/svg"),c(B,"fill","none"),c(B,"viewBox","0 0 24 24"),c(B,"class","stroke-current shrink-0 w-4 h-4"),c(z,"class","alert alert-warning shadow-sm text-xs")},m(X,J){H(X,e,J),a(e,n),a(e,s),a(e,i),a(i,o),a(i,r),a(i,f),a(i,h),a(e,p),a(e,g),a(g,m),a(m,_),a(_,b),a(m,k),a(m,v),a(v,y),a(y,C),a(v,T),a(v,O),a(O,A),a(g,x);for(let oe=0;oe<V.length;oe+=1)V[oe]&&V[oe].m(g,null);a(g,P),a(g,D),a(D,I),a(D,U),H(X,N,J),H(X,z,J),a(z,B),a(B,j),a(z,F),a(z,W),a(W,Y),Q||(le=te(D,"click",t[6]),Q=!0)},p(X,J){if(J&32&&l!==(l=X[5]("auth.tokens")+"")&&M(o,l),J&8&&u!==(u=X[3].length+"")&&M(f,u),J&32&&S!==(S=X[5]("auth.expressionSupport")+"")&&M(C,S),J&168){Z=et(X[3]);let oe;for(oe=0;oe<Z.length;oe+=1){const ne=sc(X,Z,oe);V[oe]?V[oe].p(ne,J):(V[oe]=oc(ne),V[oe].c(),V[oe].m(g,P))}for(;oe<V.length;oe+=1)V[oe].d(1);V.length=Z.length}J&32&&R!==(R=X[5]("auth.addToken")+"")&&M(U,R),J&32&&G!==(G=X[5]("auth.securityNotice")+"")&&M(Y,G)},d(X){X&&(L(e),L(N),L(z)),En(V,X),Q=!1,le()}}}function oc(t){let e,n,s,i,l,o,r;function u(){t[11].call(n,t[15])}function f(){return t[12](t[15])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("button"),l.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("auth.tokenPlaceholder")),c(n,"class","input input-bordered input-sm flex-1 font-mono text-xs"),c(l,"type","button"),c(l,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(h,p){H(h,e,p),a(e,n),ie(n,t[3][t[15]]),a(e,i),a(e,l),o||(r=[te(n,"input",u),te(l,"click",f)],o=!0)},p(h,p){t=h,p&32&&s!==(s=t[5]("auth.tokenPlaceholder"))&&c(n,"placeholder",s),p&8&&n.value!==t[3][t[15]]&&ie(n,t[3][t[15]])},d(h){h&&L(e),o=!1,at(r)}}}function gv(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=t[5]("auth.enableAuth")+"",_,b,k,v,y=t[1]&&ic(t),S=t[2]&&lc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),y&&y.c(),o=w(),r=d("div"),u=d("div"),f=d("label"),h=d("input"),p=w(),g=d("span"),_=E(m),b=w(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(C,T){H(C,e,T),a(e,n),a(n,s),a(s,i),a(n,l),y&&y.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(f,h),h.checked=t[2],a(f,p),a(f,g),a(g,_),a(r,b),S&&S.m(r,null),k||(v=[te(h,"change",t[9]),te(h,"change",t[10])],k=!0)},p(C,[T]){T&1&&M(i,C[0]),C[1]?y?y.p(C,T):(y=ic(C),y.c(),y.m(n,null)):y&&(y.d(1),y=null),T&4&&(h.checked=C[2]),T&32&&m!==(m=C[5]("auth.enableAuth")+"")&&M(_,m),C[2]?S?S.p(C,T):(S=lc(C),S.c(),S.m(r,null)):S&&(S.d(1),S=null)},i:Ee,o:Ee,d(C){C&&L(e),y&&y.d(),S&&S.d(),k=!1,at(v)}}}function mv(t,e,n){let s;Gt(t,Et,k=>n(5,s=k));let{value:i=void 0}=e,{label:l="Authentication"}=e,{showHelp:o=!0}=e,r=!1,u=[],f=!1;function h(){n(3,u=[...u,""]),n(4,f=!0)}function p(k){n(3,u=u.filter((v,y)=>y!==k))}function g(){r=this.checked,n(2,r),n(4,f),n(8,i),n(3,u)}const m=()=>{r&&u.length===0&&n(3,u=[""]),n(4,f=!0)};function _(k){u[k]=this.value,n(3,u),n(4,f),n(8,i),n(2,r)}const b=k=>p(k);return t.$$set=k=>{"value"in k&&n(8,i=k.value),"label"in k&&n(0,l=k.label),"showHelp"in k&&n(1,o=k.showHelp)},t.$$.update=()=>{if(t.$$.dirty&284)if(!f&&i&&(n(2,r=i.enabled||!1),n(3,u=i.tokens?[...i.tokens]:[]),n(4,f=!0)),r){const k=u.filter(v=>v.trim()!=="");i?(n(8,i.enabled=!0,i),n(8,i.tokens=k,i)):n(8,i={enabled:!0,tokens:k})}else i&&(n(8,i.enabled=!1,i),n(8,i.tokens=[],i))},[l,o,r,u,f,s,h,p,i,g,m,_,b]}class Ep extends zt{constructor(e){super(),jt(this,e,mv,gv,Lt,{value:8,label:0,showHelp:1})}}async function bv(t={}){const e=new URLSearchParams;return Object.entries(t).forEach(([n,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>e.append(n,String(i))):e.append(n,String(s)))}),dn.get(\`/logs?\${e.toString()}\`)}async function _v(t={},e="json"){const n=new URLSearchParams;Object.entries(t).forEach(([i,l])=>{l!=null&&n.append(i,String(l))}),n.append("format",e);const s=await fetch(\`/__ui/api/logs/export?\${n.toString()}\`);if(!s.ok)throw new Error("Failed to export logs");return s.blob()}function vv(t=1e3){return new EventSource(\`/__ui/api/logs/stream?interval=\${t}\`)}async function or(t){return(await dn.get(\`/logs/body/\${t}\`)).content}async function rr(t){return dn.get(\`/logs/headers/\${t}\`)}async function yv(){return dn.get("/logs/cleanup/config")}async function wv(){return dn.post("/logs/cleanup")}function rc(t){let e,n;return{c(){e=d("h3"),n=E(t[1]),c(e,"class","text-lg font-semibold")},m(s,i){H(s,e,i),a(e,n)},p(s,i){i&2&&M(n,s[1])},d(s){s&&L(e)}}}function ac(t){let e,n,s,i,l=t[6]("logging.maxSize")+"",o,r,u,f,h,p,g,m,_,b=t[6]("logging.maxSizeHelp")+"",k,v,y,S,C,T=t[6]("logging.retentionDays")+"",O,A,x,P,D,I,R=t[6]("logging.days")+"",U,N,z,B,j=t[6]("logging.retentionDaysHelp")+"",F,W,G;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),r=w(),u=d("div"),f=d("input"),h=w(),p=d("span"),p.textContent="KB",g=w(),m=d("div"),_=d("span"),k=E(b),v=w(),y=d("div"),S=d("label"),C=d("span"),O=E(T),A=w(),x=d("div"),P=d("input"),D=w(),I=d("span"),U=E(R),N=w(),z=d("div"),B=d("span"),F=E(j),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","logging-max-size"),c(f,"id","logging-max-size"),c(f,"type","number"),c(f,"class","input input-bordered flex-1"),c(f,"min","1024"),c(f,"max","102400"),c(f,"step","1024"),c(p,"class","text-sm text-gray-500"),c(u,"class","flex gap-2 items-center"),c(_,"class","label-text-alt"),c(m,"class","label"),c(n,"class","form-control"),c(C,"class","label-text"),c(S,"class","label"),c(S,"for","logging-retention-days"),c(P,"id","logging-retention-days"),c(P,"type","number"),c(P,"class","input input-bordered flex-1"),c(P,"min","1"),c(P,"max","30"),c(I,"class","text-sm text-gray-500"),c(x,"class","flex gap-2 items-center"),c(B,"class","label-text-alt"),c(z,"class","label"),c(y,"class","form-control"),c(e,"class","ml-8 space-y-4")},m(Y,Q){H(Y,e,Q),a(e,n),a(n,s),a(s,i),a(i,o),a(n,r),a(n,u),a(u,f),ie(f,t[0].body.maxSize),a(u,h),a(u,p),a(n,g),a(n,m),a(m,_),a(_,k),a(e,v),a(e,y),a(y,S),a(S,C),a(C,O),a(y,A),a(y,x),a(x,P),ie(P,t[0].body.retentionDays),a(x,D),a(x,I),a(I,U),a(y,N),a(y,z),a(z,B),a(B,F),W||(G=[te(f,"input",t[10]),te(f,"input",t[7]),te(P,"input",t[11]),te(P,"input",t[7])],W=!0)},p(Y,Q){Q&64&&l!==(l=Y[6]("logging.maxSize")+"")&&M(o,l),Q&1&&gt(f.value)!==Y[0].body.maxSize&&ie(f,Y[0].body.maxSize),Q&64&&b!==(b=Y[6]("logging.maxSizeHelp")+"")&&M(k,b),Q&64&&T!==(T=Y[6]("logging.retentionDays")+"")&&M(O,T),Q&1&&gt(P.value)!==Y[0].body.retentionDays&&ie(P,Y[0].body.retentionDays),Q&64&&R!==(R=Y[6]("logging.days")+"")&&M(U,R),Q&64&&j!==(j=Y[6]("logging.retentionDaysHelp")+"")&&M(F,j)},d(Y){Y&&L(e),W=!1,at(G)}}}function kv(t){let e,n,s,i=t[6]("logging.cleanupStatus")+"",l,o,r,u=(t[2].isActive?t[6]("logging.active"):t[6]("logging.inactive"))+"",f,h,p,g,m,_=t[6]("logging.cleanupRetention")+"",b,k,v,y=t[2].retentionDays+"",S,C,T=t[6]("logging.days")+"",O,A,x,P,D=t[6]("logging.cleanupInterval")+"",I,R,U,N=t[2].scheduleIntervalHours+"",z,B,j=t[6]("logging.hours")+"",F,W,G,Y,Q=t[6]("logging.manualCleanup")+"",le,Z,V,X,J;function oe(K,q){return K[4]?Tv:Ev}let ne=oe(t),ee=ne(t),se=t[5]&&uc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),l=E(i),o=w(),r=d("span"),f=E(u),p=w(),g=d("div"),m=d("span"),b=E(_),k=w(),v=d("span"),S=E(y),C=w(),O=E(T),A=w(),x=d("div"),P=d("span"),I=E(D),R=w(),U=d("span"),z=E(N),B=w(),F=E(j),W=w(),G=d("button"),ee.c(),Y=w(),le=E(Q),Z=w(),se&&se.c(),V=$n(),c(s,"class","text-gray-500"),c(r,"class",h="font-semibold "+(t[2].isActive?"text-success":"text-error")),c(n,"class","flex justify-between text-sm"),c(m,"class","text-gray-500"),c(v,"class","font-semibold"),c(g,"class","flex justify-between text-sm"),c(P,"class","text-gray-500"),c(U,"class","font-semibold"),c(x,"class","flex justify-between text-sm"),c(e,"class","bg-base-200 p-4 rounded-lg space-y-2"),c(G,"class","btn btn-outline btn-sm w-full"),G.disabled=t[4]},m(K,q){H(K,e,q),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,f),a(e,p),a(e,g),a(g,m),a(m,b),a(g,k),a(g,v),a(v,S),a(v,C),a(v,O),a(e,A),a(e,x),a(x,P),a(P,I),a(x,R),a(x,U),a(U,z),a(U,B),a(U,F),H(K,W,q),H(K,G,q),ee.m(G,null),a(G,Y),a(G,le),H(K,Z,q),se&&se.m(K,q),H(K,V,q),X||(J=te(G,"click",t[8]),X=!0)},p(K,q){q&64&&i!==(i=K[6]("logging.cleanupStatus")+"")&&M(l,i),q&68&&u!==(u=(K[2].isActive?K[6]("logging.active"):K[6]("logging.inactive"))+"")&&M(f,u),q&4&&h!==(h="font-semibold "+(K[2].isActive?"text-success":"text-error"))&&c(r,"class",h),q&64&&_!==(_=K[6]("logging.cleanupRetention")+"")&&M(b,_),q&4&&y!==(y=K[2].retentionDays+"")&&M(S,y),q&64&&T!==(T=K[6]("logging.days")+"")&&M(O,T),q&64&&D!==(D=K[6]("logging.cleanupInterval")+"")&&M(I,D),q&4&&N!==(N=K[2].scheduleIntervalHours+"")&&M(z,N),q&64&&j!==(j=K[6]("logging.hours")+"")&&M(F,j),ne!==(ne=oe(K))&&(ee.d(1),ee=ne(K),ee&&(ee.c(),ee.m(G,Y))),q&64&&Q!==(Q=K[6]("logging.manualCleanup")+"")&&M(le,Q),q&16&&(G.disabled=K[4]),K[5]?se?se.p(K,q):(se=uc(K),se.c(),se.m(V.parentNode,V)):se&&(se.d(1),se=null)},d(K){K&&(L(e),L(W),L(G),L(Z),L(V)),ee.d(),se&&se.d(K),X=!1,J()}}}function Sv(t){let e,n,s,i,l=t[6]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u&64&&l!==(l=r[6]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Ev(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Tv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function uc(t){let e,n,s,i,l,o,r=t[6]("logging.lastCleanup")+"",u,f,h,p,g=t[6]("logging.deletedSqliteRecords")+"",m,_,b=t[5].deletedSqliteRecords+"",k,v,y,S=t[6]("logging.deletedFileLogFiles")+"",C,T,O=t[5].deletedFileLogFiles+"",A,x,P,D=t[6]("logging.deletedBodyFiles")+"",I,R,U=t[5].deletedBodyDirs+"",N,z,B=t[6]("logging.dirs")+"",j,F,W=t[5].deletedBodyFiles+"",G,Y,Q=t[6]("logging.files")+"",le,Z,V,X=t[6]("logging.duration")+"",J,oe,ne=t[5].durationMs+"",ee,se;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("div"),o=d("div"),u=E(r),f=w(),h=d("div"),p=d("div"),m=E(g),_=E(": "),k=E(b),v=w(),y=d("div"),C=E(S),T=E(": "),A=E(O),x=w(),P=d("div"),I=E(D),R=E(": "),N=E(U),z=w(),j=E(B),F=E(", "),G=E(W),Y=w(),le=E(Q),Z=w(),V=d("div"),J=E(X),oe=E(": "),ee=E(ne),se=E("ms"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-semibold"),c(h,"class","mt-1 space-y-1"),c(l,"class","text-sm"),c(e,"class","alert alert-success")},m(K,q){H(K,e,q),a(e,n),a(n,s),a(e,i),a(e,l),a(l,o),a(o,u),a(l,f),a(l,h),a(h,p),a(p,m),a(p,_),a(p,k),a(h,v),a(h,y),a(y,C),a(y,T),a(y,A),a(h,x),a(h,P),a(P,I),a(P,R),a(P,N),a(P,z),a(P,j),a(P,F),a(P,G),a(P,Y),a(P,le),a(h,Z),a(h,V),a(V,J),a(V,oe),a(V,ee),a(V,se)},p(K,q){q&64&&r!==(r=K[6]("logging.lastCleanup")+"")&&M(u,r),q&64&&g!==(g=K[6]("logging.deletedSqliteRecords")+"")&&M(m,g),q&32&&b!==(b=K[5].deletedSqliteRecords+"")&&M(k,b),q&64&&S!==(S=K[6]("logging.deletedFileLogFiles")+"")&&M(C,S),q&32&&O!==(O=K[5].deletedFileLogFiles+"")&&M(A,O),q&64&&D!==(D=K[6]("logging.deletedBodyFiles")+"")&&M(I,D),q&32&&U!==(U=K[5].deletedBodyDirs+"")&&M(N,U),q&64&&B!==(B=K[6]("logging.dirs")+"")&&M(j,B),q&32&&W!==(W=K[5].deletedBodyFiles+"")&&M(G,W),q&64&&Q!==(Q=K[6]("logging.files")+"")&&M(le,Q),q&64&&X!==(X=K[6]("logging.duration")+"")&&M(J,X),q&32&&ne!==(ne=K[5].durationMs+"")&&M(ee,ne)},d(K){K&&L(e)}}}function Mv(t){let e,n,s,i,l,o,r,u,f=t[6]("logging.bodyRecording")+"",h,p,g,m=t[6]("logging.bodyRecordingHelp")+"",_,b,k,v,y,S,C=t[6]("logging.cleanupConfig")+"",T,O,A,x,P=t[1]&&rc(t),D=t[0].body.enabled&&ac(t);function I(N,z){if(N[3])return Sv;if(N[2])return kv}let R=I(t),U=R&&R(t);return{c(){e=d("div"),P&&P.c(),n=w(),s=d("div"),i=d("label"),l=d("input"),o=w(),r=d("div"),u=d("span"),h=E(f),p=w(),g=d("p"),_=E(m),b=w(),D&&D.c(),k=w(),v=d("div"),y=w(),S=d("h4"),T=E(C),O=w(),U&&U.c(),c(l,"type","checkbox"),c(l,"class","checkbox"),c(u,"class","label-text font-semibold"),c(g,"class","text-xs text-gray-500 mt-1"),c(r,"class","flex-1"),c(i,"class","label cursor-pointer justify-start gap-4"),c(s,"class","form-control"),c(v,"class","divider"),c(S,"class","font-semibold"),c(e,"class","space-y-4")},m(N,z){H(N,e,z),P&&P.m(e,null),a(e,n),a(e,s),a(s,i),a(i,l),l.checked=t[0].body.enabled,a(i,o),a(i,r),a(r,u),a(u,h),a(r,p),a(r,g),a(g,_),a(e,b),D&&D.m(e,null),a(e,k),a(e,v),a(e,y),a(e,S),a(S,T),a(e,O),U&&U.m(e,null),A||(x=[te(l,"change",t[9]),te(l,"change",t[7])],A=!0)},p(N,[z]){N[1]?P?P.p(N,z):(P=rc(N),P.c(),P.m(e,n)):P&&(P.d(1),P=null),z&1&&(l.checked=N[0].body.enabled),z&64&&f!==(f=N[6]("logging.bodyRecording")+"")&&M(h,f),z&64&&m!==(m=N[6]("logging.bodyRecordingHelp")+"")&&M(_,m),N[0].body.enabled?D?D.p(N,z):(D=ac(N),D.c(),D.m(e,k)):D&&(D.d(1),D=null),z&64&&C!==(C=N[6]("logging.cleanupConfig")+"")&&M(T,C),R===(R=I(N))&&U?U.p(N,z):(U&&U.d(1),U=R&&R(N),U&&(U.c(),U.m(e,null)))},i:Ee,o:Ee,d(N){N&&L(e),P&&P.d(),D&&D.d(),U&&U.d(),A=!1,at(x)}}}function Cv(t,e,n){let s;Gt(t,Et,v=>n(6,s=v));let{value:i=null}=e,{label:l=""}=e;const o=Rl();let r=null,u=!1,f=!1,h=null;function p(){o("input")}async function g(){n(3,u=!0);try{n(2,r=await yv())}catch(v){console.error("Failed to load cleanup config:",v),bt.show(s("common.error")+": "+(v instanceof Error?v.message:"Unknown error"),"error")}finally{n(3,u=!1)}}async function m(){if(confirm(s("logging.confirmCleanup"))){n(4,f=!0);try{n(5,h=await wv()),bt.show(s("logging.cleanupSuccess"),"success"),await g()}catch(v){console.error("Failed to trigger cleanup:",v),bt.show(s("logging.cleanupFailed",{values:{error:v instanceof Error?v.message:"Unknown error"}}),"error")}finally{n(4,f=!1)}}}is(()=>{g()});function _(){i.body.enabled=this.checked,n(0,i)}function b(){i.body.maxSize=gt(this.value),n(0,i)}function k(){i.body.retentionDays=gt(this.value),n(0,i)}return t.$$set=v=>{"value"in v&&n(0,i=v.value),"label"in v&&n(1,l=v.label)},t.$$.update=()=>{t.$$.dirty&1&&(i||n(0,i={body:{enabled:!1,maxSize:5120,retentionDays:1}})),t.$$.dirty&1&&i&&!i.body&&n(0,i.body={enabled:!1,maxSize:5120,retentionDays:1},i)},[i,l,r,u,f,h,s,p,m,_,b,k]}class Pv extends zt{constructor(e){super(),jt(this,e,Cv,Mv,Lt,{value:0,label:1})}}function Av(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Ov(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function xv(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Rv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function Dv(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function Lv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function Hv(t){let e,n,s=t[11]("configuration.formEditor")+"",i,l,o,r=t[11]("configuration.jsonEditor")+"",u,f,h,p,g,m,_,b;const k=[Nv,Fv],v=[];function y(S,C){return S[7]==="form"?0:1}return h=y(t),p=v[h]=k[h](t),{c(){e=d("div"),n=d("button"),i=E(s),l=w(),o=d("button"),u=E(r),f=w(),p.c(),g=$n(),c(n,"class","tab"),Rt(n,"tab-active",t[7]==="form"),c(o,"class","tab"),Rt(o,"tab-active",t[7]==="json"),c(e,"class","tabs tabs-boxed mb-4")},m(S,C){H(S,e,C),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),H(S,f,C),v[h].m(S,C),H(S,g,C),m=!0,_||(b=[te(n,"click",t[19]),te(o,"click",t[20])],_=!0)},p(S,C){(!m||C&2048)&&s!==(s=S[11]("configuration.formEditor")+"")&&M(i,s),(!m||C&128)&&Rt(n,"tab-active",S[7]==="form"),(!m||C&2048)&&r!==(r=S[11]("configuration.jsonEditor")+"")&&M(u,r),(!m||C&128)&&Rt(o,"tab-active",S[7]==="json");let T=h;h=y(S),h===T?v[h].p(S,C):(gs(),Fe(v[T],1,1,()=>{v[T]=null}),ms(),p=v[h],p?p.p(S,C):(p=v[h]=k[h](S),p.c()),Be(p,1),p.m(g.parentNode,g))},i(S){m||(Be(p),m=!0)},o(S){Fe(p),m=!1},d(S){S&&(L(e),L(f),L(g)),v[h].d(S),_=!1,at(b)}}}function Iv(t){let e,n,s,i,l,o=t[11]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[2]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p&2048&&o!==(o=h[11]("common.error")+"")&&M(r,o),p&4&&M(f,h[2])},i:Ee,o:Ee,d(h){h&&L(e)}}}function Bv(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Fv(t){let e,n,s,i=t[11]("configuration.jsonConfiguration")+"",l,o,r,u,f,h,p,g=t[11]("configuration.jsonHelp")+"",m,_,b,k=t[9]&&cc(t);return{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=w(),k&&k.c(),r=w(),u=d("textarea"),h=w(),p=d("p"),m=E(g),c(s,"class","card-title"),c(u,"class","textarea textarea-bordered font-mono text-sm h-96"),c(u,"placeholder",f=t[11]("configuration.jsonPlaceholder")),c(p,"class","text-sm text-gray-500 mt-2"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl")},m(v,y){H(v,e,y),a(e,n),a(n,s),a(s,l),a(n,o),k&&k.m(n,null),a(n,r),a(n,u),ie(u,t[8]),a(n,h),a(n,p),a(p,m),_||(b=[te(u,"input",t[27]),te(u,"input",t[12])],_=!0)},p(v,y){y&2048&&i!==(i=v[11]("configuration.jsonConfiguration")+"")&&M(l,i),v[9]?k?k.p(v,y):(k=cc(v),k.c(),k.m(n,r)):k&&(k.d(1),k=null),y&2048&&f!==(f=v[11]("configuration.jsonPlaceholder"))&&c(u,"placeholder",f),y&256&&ie(u,v[8]),y&2048&&g!==(g=v[11]("configuration.jsonHelp")+"")&&M(m,g)},i:Ee,o:Ee,d(v){v&&L(e),k&&k.d(),_=!1,at(b)}}}function Nv(t){let e,n,s,i=t[11]("configuration.systemSettings")+"",l,o,r,u,f,h=t[11]("configuration.serverPort")+"",p,g,m,_,b,k,v,y=t[11]("configuration.workerProcesses")+"",S,C,T,O,A,x,P=t[11]("configuration.workerProcessesHelp")+"",D,I,R,U,N,z=t[11]("configuration.logLevel")+"",B,j,F,W,G,Y,Q,le,Z,V,X,J=t[11]("configuration.bodyParserLimit")+"",oe,ne,ee,se,K,q,ce=t[11]("configuration.bodyParserLimitHelp")+"",he,ke,we,pe,me,Pe,Se,Ce,_e,Ae,ye,$,ue,ae,ge=t[11]("configuration.requiresRestart")+"",re,Ne,Ye,Ve,Qe,st=t[11]("logging.title")+"",Xe,vt,rt,He,$e,Oe,ft,qe,Re=t[11]("routes.title")+"",ze,ve,Je,be,We,yt,Ke,Ie=t[11]("configuration.routesConfigured",{values:{count:t[1].routes.length}})+"",kt,nt,ht=t[11]("configuration.manageRoutes")+"",Ot,Te,it,De;function tt(xe){t[25](xe)}let Ht={label:t[11]("auth.globalAuth")};t[1].auth!==void 0&&(Ht.value=t[1].auth),me=new Ep({props:Ht}),vn.push(()=>Kn(me,"value",tt));function Rn(xe){t[26](xe)}let pn={};return t[1].logging!==void 0&&(pn.value=t[1].logging),rt=new Pv({props:pn}),vn.push(()=>Kn(rt,"value",Rn)),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=w(),r=d("div"),u=d("label"),f=d("span"),p=E(h),g=w(),m=d("input"),_=w(),b=d("div"),k=d("label"),v=d("span"),S=E(y),C=w(),T=d("input"),O=w(),A=d("div"),x=d("span"),D=E(P),I=w(),R=d("div"),U=d("label"),N=d("span"),B=E(z),j=w(),F=d("select"),W=d("option"),W.textContent="Debug",G=d("option"),G.textContent="Info",Y=d("option"),Y.textContent="Warning",Q=d("option"),Q.textContent="Error",le=w(),Z=d("div"),V=d("label"),X=d("span"),oe=E(J),ne=w(),ee=d("input"),se=w(),K=d("div"),q=d("span"),he=E(ce),ke=w(),we=d("div"),pe=w(),pt(me.$$.fragment),Se=w(),Ce=d("div"),_e=w(),Ae=d("div"),ye=de("svg"),$=de("path"),ue=w(),ae=d("span"),re=E(ge),Ne=w(),Ye=d("div"),Ve=d("div"),Qe=d("h2"),Xe=E(st),vt=w(),pt(rt.$$.fragment),$e=w(),Oe=d("div"),ft=d("div"),qe=d("h2"),ze=E(Re),ve=w(),Je=d("div"),be=de("svg"),We=de("path"),yt=w(),Ke=d("span"),kt=E(Ie),nt=w(),Ot=E(ht),c(s,"class","card-title"),c(f,"class","label-text"),c(u,"class","label"),c(u,"for","config-port"),c(m,"id","config-port"),c(m,"type","number"),c(m,"class","input input-bordered"),c(m,"placeholder","8088"),c(r,"class","form-control"),c(v,"class","label-text"),c(k,"class","label"),c(k,"for","config-workers"),c(T,"id","config-workers"),c(T,"type","number"),c(T,"class","input input-bordered"),c(T,"min","1"),c(T,"placeholder","2"),c(x,"class","label-text-alt"),c(A,"class","label"),c(b,"class","form-control"),c(N,"class","label-text"),c(U,"class","label"),c(U,"for","config-log-level"),W.__value="debug",ie(W,W.__value),G.__value="info",ie(G,G.__value),Y.__value="warn",ie(Y,Y.__value),Q.__value="error",ie(Q,Q.__value),c(F,"id","config-log-level"),c(F,"class","select select-bordered"),t[1].logLevel===void 0&&bs(()=>t[23].call(F)),c(R,"class","form-control"),c(X,"class","label-text"),c(V,"class","label"),c(V,"for","config-body-limit"),c(ee,"id","config-body-limit"),c(ee,"type","text"),c(ee,"class","input input-bordered"),c(ee,"placeholder","50mb"),c(q,"class","label-text-alt"),c(K,"class","label"),c(Z,"class","form-control"),c(we,"class","divider"),c(Ce,"class","divider"),c($,"stroke-linecap","round"),c($,"stroke-linejoin","round"),c($,"stroke-width","2"),c($,"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"),c(ye,"xmlns","http://www.w3.org/2000/svg"),c(ye,"class","stroke-current shrink-0 h-6 w-6"),c(ye,"fill","none"),c(ye,"viewBox","0 0 24 24"),c(Ae,"class","alert alert-warning"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl mb-4"),c(Qe,"class","card-title"),c(Ve,"class","card-body"),c(Ye,"class","card bg-base-100 shadow-xl mb-4"),c(qe,"class","card-title"),c(We,"stroke-linecap","round"),c(We,"stroke-linejoin","round"),c(We,"stroke-width","2"),c(We,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(be,"xmlns","http://www.w3.org/2000/svg"),c(be,"fill","none"),c(be,"viewBox","0 0 24 24"),c(be,"class","stroke-current shrink-0 w-6 h-6"),c(Je,"class","alert alert-info"),c(ft,"class","card-body"),c(Oe,"class","card bg-base-100 shadow-xl")},m(xe,lt){H(xe,e,lt),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,f),a(f,p),a(r,g),a(r,m),ie(m,t[1].port),a(n,_),a(n,b),a(b,k),a(k,v),a(v,S),a(b,C),a(b,T),ie(T,t[1].workers),a(b,O),a(b,A),a(A,x),a(x,D),a(n,I),a(n,R),a(R,U),a(U,N),a(N,B),a(R,j),a(R,F),a(F,W),a(F,G),a(F,Y),a(F,Q),Cn(F,t[1].logLevel,!0),a(n,le),a(n,Z),a(Z,V),a(V,X),a(X,oe),a(Z,ne),a(Z,ee),ie(ee,t[1].bodyParserLimit),a(Z,se),a(Z,K),a(K,q),a(q,he),a(n,ke),a(n,we),a(n,pe),ut(me,n,null),a(n,Se),a(n,Ce),a(n,_e),a(n,Ae),a(Ae,ye),a(ye,$),a(Ae,ue),a(Ae,ae),a(ae,re),H(xe,Ne,lt),H(xe,Ye,lt),a(Ye,Ve),a(Ve,Qe),a(Qe,Xe),a(Ve,vt),ut(rt,Ve,null),H(xe,$e,lt),H(xe,Oe,lt),a(Oe,ft),a(ft,qe),a(qe,ze),a(ft,ve),a(ft,Je),a(Je,be),a(be,We),a(Je,yt),a(Je,Ke),a(Ke,kt),a(Ke,nt),a(Ke,Ot),Te=!0,it||(De=[te(m,"input",t[21]),te(T,"input",t[22]),te(F,"change",t[23]),te(ee,"input",t[24])],it=!0)},p(xe,lt){(!Te||lt&2048)&&i!==(i=xe[11]("configuration.systemSettings")+"")&&M(l,i),(!Te||lt&2048)&&h!==(h=xe[11]("configuration.serverPort")+"")&&M(p,h),lt&2&&gt(m.value)!==xe[1].port&&ie(m,xe[1].port),(!Te||lt&2048)&&y!==(y=xe[11]("configuration.workerProcesses")+"")&&M(S,y),lt&2&&gt(T.value)!==xe[1].workers&&ie(T,xe[1].workers),(!Te||lt&2048)&&P!==(P=xe[11]("configuration.workerProcessesHelp")+"")&&M(D,P),(!Te||lt&2048)&&z!==(z=xe[11]("configuration.logLevel")+"")&&M(B,z),lt&2&&Cn(F,xe[1].logLevel),(!Te||lt&2048)&&J!==(J=xe[11]("configuration.bodyParserLimit")+"")&&M(oe,J),lt&2&&ee.value!==xe[1].bodyParserLimit&&ie(ee,xe[1].bodyParserLimit),(!Te||lt&2048)&&ce!==(ce=xe[11]("configuration.bodyParserLimitHelp")+"")&&M(he,ce);const an={};lt&2048&&(an.label=xe[11]("auth.globalAuth")),!Pe&&lt&2&&(Pe=!0,an.value=xe[1].auth,Jn(()=>Pe=!1)),me.$set(an),(!Te||lt&2048)&&ge!==(ge=xe[11]("configuration.requiresRestart")+"")&&M(re,ge),(!Te||lt&2048)&&st!==(st=xe[11]("logging.title")+"")&&M(Xe,st);const Mt={};!He&&lt&2&&(He=!0,Mt.value=xe[1].logging,Jn(()=>He=!1)),rt.$set(Mt),(!Te||lt&2048)&&Re!==(Re=xe[11]("routes.title")+"")&&M(ze,Re),(!Te||lt&2050)&&Ie!==(Ie=xe[11]("configuration.routesConfigured",{values:{count:xe[1].routes.length}})+"")&&M(kt,Ie),(!Te||lt&2048)&&ht!==(ht=xe[11]("configuration.manageRoutes")+"")&&M(Ot,ht)},i(xe){Te||(Be(me.$$.fragment,xe),Be(rt.$$.fragment,xe),Te=!0)},o(xe){Fe(me.$$.fragment,xe),Fe(rt.$$.fragment,xe),Te=!1},d(xe){xe&&(L(e),L(Ne),L(Ye),L($e),L(Oe)),ct(me),ct(rt),it=!1,at(De)}}}function cc(t){let e,n,s,i,l,o=t[11]("configuration.jsonParseError",{values:{error:t[9]}})+"",r;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error mb-4")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r)},p(u,f){f&2560&&o!==(o=u[11]("configuration.jsonParseError",{values:{error:u[9]}})+"")&&M(r,o)},d(u){u&&L(e)}}}function jv(t){let e,n,s,i,l=t[11]("configuration.title")+"",o,r,u,f=t[11]("configuration.subtitle")+"",h,p,g,m,_,b,k,v=t[11]("configuration.export")+"",y,S,C,T,O,A,x,P=t[11]("configuration.import")+"",D,I,R,U,N=t[11]("configuration.save")+"",z,B,j,F,W,G=t[11]("configuration.reload")+"",Y,Q,le,Z,V,X=t[11]("configuration.restart")+"",J,oe,ne,ee,se,K,q,ce,he,ke,we,pe=t[11]("configuration.confirmRestart")+"",me,Pe,Se,Ce=t[11]("configuration.restartMessage")+"",_e,Ae,ye,$,ue,ae,ge,re=t[11]("configuration.restartWarning")+"",Ne,Ye,Ve,Qe,st=t[11]("common.cancel")+"",Xe,vt,rt,He,$e,Oe,ft=t[11]("configuration.restart")+"",qe,Re,ze,ve;function Je(De,tt){return De[6]?Ov:Av}let be=Je(t),We=be(t);function yt(De,tt){return De[4]?Rv:xv}let Ke=yt(t),Ie=Ke(t);function kt(De,tt){return De[5]?Lv:Dv}let nt=kt(t),ht=nt(t);const Ot=[Bv,Iv,Hv],Te=[];function it(De,tt){return De[3]?0:De[2]?1:De[1]?2:-1}return~(ee=it(t))&&(se=Te[ee]=Ot[ee](t)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),g=d("div"),m=d("button"),_=de("svg"),b=de("path"),k=w(),y=E(v),C=w(),T=d("button"),O=de("svg"),A=de("path"),x=w(),D=E(P),I=w(),R=d("button"),We.c(),U=w(),z=E(N),j=w(),F=d("button"),Ie.c(),W=w(),Y=E(G),le=w(),Z=d("button"),ht.c(),V=w(),J=E(X),ne=w(),se&&se.c(),K=w(),q=d("input"),ce=w(),he=d("div"),ke=d("div"),we=d("h3"),me=E(pe),Pe=w(),Se=d("p"),_e=E(Ce),Ae=w(),ye=d("div"),$=de("svg"),ue=de("path"),ae=w(),ge=d("span"),Ne=E(re),Ye=w(),Ve=d("div"),Qe=d("button"),Xe=E(st),vt=w(),rt=d("button"),He=de("svg"),$e=de("path"),Oe=w(),qe=E(ft),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(_,"xmlns","http://www.w3.org/2000/svg"),c(_,"class","h-4 w-4"),c(_,"fill","none"),c(_,"viewBox","0 0 24 24"),c(_,"stroke","currentColor"),c(m,"class","btn btn-outline btn-sm"),m.disabled=S=t[3]||!t[0],c(A,"stroke-linecap","round"),c(A,"stroke-linejoin","round"),c(A,"stroke-width","2"),c(A,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(O,"xmlns","http://www.w3.org/2000/svg"),c(O,"class","h-4 w-4"),c(O,"fill","none"),c(O,"viewBox","0 0 24 24"),c(O,"stroke","currentColor"),c(T,"class","btn btn-outline btn-sm"),T.disabled=t[3],c(R,"class","btn btn-success btn-sm"),R.disabled=B=t[6]||t[3]||!!t[9],c(F,"class","btn btn-primary btn-sm"),F.disabled=Q=t[4]||t[3],c(Z,"class","btn btn-warning btn-sm"),Z.disabled=oe=t[5]||t[3],c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(q,"type","checkbox"),c(q,"class","modal-toggle"),c(we,"class","font-bold text-lg"),c(Se,"class","py-4"),c(ue,"stroke-linecap","round"),c(ue,"stroke-linejoin","round"),c(ue,"stroke-width","2"),c(ue,"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"),c($,"xmlns","http://www.w3.org/2000/svg"),c($,"class","stroke-current shrink-0 h-6 w-6"),c($,"fill","none"),c($,"viewBox","0 0 24 24"),c(ye,"class","alert alert-warning"),c(Qe,"class","btn btn-ghost"),c($e,"stroke-linecap","round"),c($e,"stroke-linejoin","round"),c($e,"stroke-width","2"),c($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"),c(He,"xmlns","http://www.w3.org/2000/svg"),c(He,"class","h-4 w-4 mr-1"),c(He,"fill","none"),c(He,"viewBox","0 0 24 24"),c(He,"stroke","currentColor"),c(rt,"class","btn btn-warning"),c(Ve,"class","modal-action"),c(ke,"class","modal-box"),c(he,"class","modal"),Rt(he,"modal-open",t[10]),c(e,"class","p-6")},m(De,tt){H(De,e,tt),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(n,p),a(n,g),a(g,m),a(m,_),a(_,b),a(m,k),a(m,y),a(g,C),a(g,T),a(T,O),a(O,A),a(T,x),a(T,D),a(g,I),a(g,R),We.m(R,null),a(R,U),a(R,z),a(g,j),a(g,F),Ie.m(F,null),a(F,W),a(F,Y),a(g,le),a(g,Z),ht.m(Z,null),a(Z,V),a(Z,J),a(e,ne),~ee&&Te[ee].m(e,null),a(e,K),a(e,q),q.checked=t[10],a(e,ce),a(e,he),a(he,ke),a(ke,we),a(we,me),a(ke,Pe),a(ke,Se),a(Se,_e),a(ke,Ae),a(ke,ye),a(ye,$),a($,ue),a(ye,ae),a(ye,ge),a(ge,Ne),a(ke,Ye),a(ke,Ve),a(Ve,Qe),a(Qe,Xe),a(Ve,vt),a(Ve,rt),a(rt,He),a(He,$e),a(rt,Oe),a(rt,qe),Re=!0,ze||(ve=[te(m,"click",t[14]),te(T,"click",t[15]),te(R,"click",t[13]),te(F,"click",t[16]),te(Z,"click",t[18]),te(q,"change",t[28]),te(Qe,"click",t[29]),te(rt,"click",t[17])],ze=!0)},p(De,[tt]){(!Re||tt&2048)&&l!==(l=De[11]("configuration.title")+"")&&M(o,l),(!Re||tt&2048)&&f!==(f=De[11]("configuration.subtitle")+"")&&M(h,f),(!Re||tt&2048)&&v!==(v=De[11]("configuration.export")+"")&&M(y,v),(!Re||tt&9&&S!==(S=De[3]||!De[0]))&&(m.disabled=S),(!Re||tt&2048)&&P!==(P=De[11]("configuration.import")+"")&&M(D,P),(!Re||tt&8)&&(T.disabled=De[3]),be!==(be=Je(De))&&(We.d(1),We=be(De),We&&(We.c(),We.m(R,U))),(!Re||tt&2048)&&N!==(N=De[11]("configuration.save")+"")&&M(z,N),(!Re||tt&584&&B!==(B=De[6]||De[3]||!!De[9]))&&(R.disabled=B),Ke!==(Ke=yt(De))&&(Ie.d(1),Ie=Ke(De),Ie&&(Ie.c(),Ie.m(F,W))),(!Re||tt&2048)&&G!==(G=De[11]("configuration.reload")+"")&&M(Y,G),(!Re||tt&24&&Q!==(Q=De[4]||De[3]))&&(F.disabled=Q),nt!==(nt=kt(De))&&(ht.d(1),ht=nt(De),ht&&(ht.c(),ht.m(Z,V))),(!Re||tt&2048)&&X!==(X=De[11]("configuration.restart")+"")&&M(J,X),(!Re||tt&40&&oe!==(oe=De[5]||De[3]))&&(Z.disabled=oe);let Ht=ee;ee=it(De),ee===Ht?~ee&&Te[ee].p(De,tt):(se&&(gs(),Fe(Te[Ht],1,1,()=>{Te[Ht]=null}),ms()),~ee?(se=Te[ee],se?se.p(De,tt):(se=Te[ee]=Ot[ee](De),se.c()),Be(se,1),se.m(e,K)):se=null),tt&1024&&(q.checked=De[10]),(!Re||tt&2048)&&pe!==(pe=De[11]("configuration.confirmRestart")+"")&&M(me,pe),(!Re||tt&2048)&&Ce!==(Ce=De[11]("configuration.restartMessage")+"")&&M(_e,Ce),(!Re||tt&2048)&&re!==(re=De[11]("configuration.restartWarning")+"")&&M(Ne,re),(!Re||tt&2048)&&st!==(st=De[11]("common.cancel")+"")&&M(Xe,st),(!Re||tt&2048)&&ft!==(ft=De[11]("configuration.restart")+"")&&M(qe,ft),(!Re||tt&1024)&&Rt(he,"modal-open",De[10])},i(De){Re||(Be(se),Re=!0)},o(De){Fe(se),Re=!1},d(De){De&&L(e),We.d(),Ie.d(),ht.d(),~ee&&Te[ee].d(),ze=!1,at(ve)}}}function zv(t,e,n){let s;Gt(t,Et,F=>n(11,s=F));let i=null,l=null,o=null,r=!0,u=!1,f=!1,h=!1,p="form",g="",m=null,_=!1;async function b(){try{n(0,i=await Ur()),n(1,l=JSON.parse(JSON.stringify(i))),n(8,g=JSON.stringify(i,null,2)),n(2,o=null)}catch(F){n(2,o=F.message)}finally{n(3,r=!1)}}function k(){n(9,m=null);try{n(1,l=JSON.parse(g))}catch(F){n(9,m=F.message)}}async function v(){if(l){n(6,h=!0);try{const F=await $0(l);if(!F.valid){bt.show(s("configuration.validationFailed",{values:{error:F.error}}),"error");return}const W=await Q0(l);W.success?(bt.show(s("configuration.saved"),"success"),n(0,i=JSON.parse(JSON.stringify(l)))):bt.show(s("configuration.saveFailed",{values:{error:W.message}}),"error")}catch(F){bt.show(s("configuration.saveFailed",{values:{error:F.message}}),"error")}finally{n(6,h=!1)}}}function y(){if(!i)return;const F=JSON.stringify(i,null,2),W="data:application/json;charset=utf-8,"+encodeURIComponent(F),G=\`bungee-config-\${new Date().toISOString().split("T")[0]}.json\`,Y=document.createElement("a");Y.setAttribute("href",W),Y.setAttribute("download",G),Y.click(),bt.show(s("configuration.exported"),"success")}function S(){const F=document.createElement("input");F.type="file",F.accept=".json",F.onchange=async W=>{const G=W.target.files[0];if(G)try{const Y=await G.text(),Q=JSON.parse(Y);n(1,l=Q),n(8,g=JSON.stringify(Q,null,2)),bt.show(s("configuration.imported"),"success")}catch(Y){bt.show(s("configuration.importFailed",{values:{error:Y.message}}),"error")}},F.click()}async function C(){n(4,u=!0);try{const F=await dv();F.success?(bt.show(s("configuration.reloaded"),"success"),await b()):bt.show(s("configuration.reloadFailed",{values:{error:F.message}}),"error")}catch(F){bt.show(s("configuration.reloadFailed",{values:{error:F.message}}),"error")}finally{n(4,u=!1)}}async function T(){n(10,_=!1),n(5,f=!0);try{const F=await pv();F.success?bt.show(s("configuration.restartSent"),"success"):F.error&&F.error.includes("daemon mode")?bt.show(s("configuration.restartDaemonOnly"),"error",8e3):bt.show(s("configuration.restartFailed",{values:{error:F.error||F.message}}),"error")}catch(F){bt.show(s("configuration.restartFailed",{values:{error:F.message}}),"error")}finally{n(5,f=!1)}}is(()=>{b()});const O=()=>n(10,_=!0),A=()=>n(7,p="form"),x=()=>n(7,p="json");function P(){l.port=gt(this.value),n(1,l)}function D(){l.workers=gt(this.value),n(1,l)}function I(){l.logLevel=Is(this),n(1,l)}function R(){l.bodyParserLimit=this.value,n(1,l)}function U(F){t.$$.not_equal(l.auth,F)&&(l.auth=F,n(1,l))}function N(F){t.$$.not_equal(l.logging,F)&&(l.logging=F,n(1,l))}function z(){g=this.value,n(8,g)}function B(){_=this.checked,n(10,_)}return[i,l,o,r,u,f,h,p,g,m,_,s,k,v,y,S,C,T,O,A,x,P,D,I,R,U,N,z,B,()=>n(10,_=!1)]}class Uv extends zt{constructor(e){super(),jt(this,e,zv,jv,Lt,{})}}class Ei{static async list(){return await dn.get("/routes")}static async get(e){return(await this.list()).find(s=>s.path===e)||null}static async create(e){const n=await dn.get("/config");if(n.routes?.some(s=>s.path===e.path))throw new Error(\`Route with path "\${e.path}" already exists\`);n.routes=n.routes||[],n.routes.push(e),await dn.put("/config",n)}static async update(e,n){const s=await dn.get("/config"),i=s.routes?.findIndex(l=>l.path===e);if(i===void 0||i===-1)throw new Error(\`Route with path "\${e}" not found\`);if(e!==n.path&&s.routes?.some(l=>l.path===n.path))throw new Error(\`Route with path "\${n.path}" already exists\`);s.routes[i]=n,await dn.put("/config",s)}static async delete(e){const n=await dn.get("/config"),s=n.routes?.findIndex(i=>i.path===e);if(s===void 0||s===-1)throw new Error(\`Route with path "\${e}" not found\`);n.routes.splice(s,1),await dn.put("/config",n)}static async validateRoute(e){const n={routes:[e]};return await dn.post("/config/validate",n)}static async duplicate(e){const n=await this.get(e);if(!n)throw new Error(\`Route with path "\${e}" not found\`);const s={...n};let i=1,l=\`\${e}-copy\`;const o=await this.list();for(;o.some(r=>r.path===l);)i++,l=\`\${e}-copy-\${i}\`;s.path=l,await this.create(s)}}function fc(t,e,n){const s=t.slice();return s[7]=e[n][0],s[8]=e[n][1],s}function hc(t,e,n){const s=t.slice();return s[11]=e[n],s[13]=n,s}function dc(t){let e,n=t[5]("routeCard.hasTransformer")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-info")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.hasTransformer")+"")&&M(s,n)},d(i){i&&L(e)}}}function pc(t){let e,n=t[5]("routeCard.failover")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-success")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.failover")+"")&&M(s,n)},d(i){i&&L(e)}}}function gc(t){let e,n=t[5]("upstream.weight")+"",s,i,l=t[11].weight+"",o;return{c(){e=d("span"),s=E(n),i=E(": "),o=E(l),c(e,"class","badge badge-xs")},m(r,u){H(r,e,u),a(e,s),a(e,i),a(e,o)},p(r,u){u&32&&n!==(n=r[5]("upstream.weight")+"")&&M(s,n),u&1&&l!==(l=r[11].weight+"")&&M(o,l)},d(r){r&&L(e)}}}function mc(t){let e,n,s=t[11].priority+"",i;return{c(){e=d("span"),n=E("P: "),i=E(s),c(e,"class","badge badge-xs")},m(l,o){H(l,e,o),a(e,n),a(e,i)},p(l,o){o&1&&s!==(s=l[11].priority+"")&&M(i,s)},d(l){l&&L(e)}}}function bc(t){let e,n,s,i,l,o=t[11].target+"",r,u,f,h,p=t[11].weight&&gc(t),g=t[11].priority!==void 0&&mc(t);return{c(){e=d("div"),n=d("div"),i=w(),l=d("code"),r=E(o),u=w(),p&&p.c(),f=w(),g&&g.c(),h=w(),c(n,"class","w-2 h-2 rounded-full tooltip tooltip-right"),c(n,"data-tip",s=t[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${yc(t[11].lastFailureTime)}\`:ei(t[11])),Rt(n,"bg-success",ei(t[11])==="healthy"),Rt(n,"bg-error",ei(t[11])==="unhealthy"),Rt(n,"bg-warning",ei(t[11])==="unknown"),c(l,"class","text-xs flex-1 truncate"),c(e,"class","flex items-center gap-2 text-sm")},m(m,_){H(m,e,_),a(e,n),a(e,i),a(e,l),a(l,r),a(e,u),p&&p.m(e,null),a(e,f),g&&g.m(e,null),a(e,h)},p(m,_){_&1&&s!==(s=m[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${yc(m[11].lastFailureTime)}\`:ei(m[11]))&&c(n,"data-tip",s),_&1&&Rt(n,"bg-success",ei(m[11])==="healthy"),_&1&&Rt(n,"bg-error",ei(m[11])==="unhealthy"),_&1&&Rt(n,"bg-warning",ei(m[11])==="unknown"),_&1&&o!==(o=m[11].target+"")&&M(r,o),m[11].weight?p?p.p(m,_):(p=gc(m),p.c(),p.m(e,f)):p&&(p.d(1),p=null),m[11].priority!==void 0?g?g.p(m,_):(g=mc(m),g.c(),g.m(e,h)):g&&(g.d(1),g=null)},d(m){m&&L(e),p&&p.d(),g&&g.d()}}}function _c(t){let e,n,s,i,l=et(Object.entries(t[0].pathRewrite)),o=[];for(let r=0;r<l.length;r+=1)o[r]=vc(fc(t,l,r));return{c(){e=d("div"),n=d("p"),n.textContent="Path Rewrite:",s=w(),i=d("div");for(let r=0;r<o.length;r+=1)o[r].c();c(n,"class","text-sm font-semibold"),c(i,"class","text-xs text-gray-500"),c(e,"class","mt-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i);for(let f=0;f<o.length;f+=1)o[f]&&o[f].m(i,null)},p(r,u){if(u&1){l=et(Object.entries(r[0].pathRewrite));let f;for(f=0;f<l.length;f+=1){const h=fc(r,l,f);o[f]?o[f].p(h,u):(o[f]=vc(h),o[f].c(),o[f].m(i,null))}for(;f<o.length;f+=1)o[f].d(1);o.length=l.length}},d(r){r&&L(e),En(o,r)}}}function vc(t){let e,n,s=t[7]+"",i,l,o,r=t[8]+"",u;return{c(){e=d("div"),n=d("code"),i=E(s),l=E(" \u2192 "),o=d("code"),u=E(r)},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u)},p(f,h){h&1&&s!==(s=f[7]+"")&&M(i,s),h&1&&r!==(r=f[8]+"")&&M(u,r)},d(f){f&&L(e)}}}function Vv(t){let e,n,s,i=t[5]("routeCard.duplicate")+"",l;return{c(){e=de("svg"),n=de("path"),s=w(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,r){H(o,e,r),a(e,n),H(o,s,r),H(o,l,r)},p(o,r){r&32&&i!==(i=o[5]("routeCard.duplicate")+"")&&M(l,i)},d(o){o&&(L(e),L(s),L(l))}}}function Wv(t){let e,n,s=t[5]("routeCard.duplicating")+"",i;return{c(){e=d("span"),n=w(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){H(l,e,o),H(l,n,o),H(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.duplicating")+"")&&M(i,s)},d(l){l&&(L(e),L(n),L(i))}}}function qv(t){let e,n,s,i=t[5]("routeCard.delete")+"",l;return{c(){e=de("svg"),n=de("path"),s=w(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,r){H(o,e,r),a(e,n),H(o,s,r),H(o,l,r)},p(o,r){r&32&&i!==(i=o[5]("routeCard.delete")+"")&&M(l,i)},d(o){o&&(L(e),L(s),L(l))}}}function Gv(t){let e,n,s=t[5]("routeCard.deleting")+"",i;return{c(){e=d("span"),n=w(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){H(l,e,o),H(l,n,o),H(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.deleting")+"")&&M(i,s)},d(l){l&&(L(e),L(n),L(i))}}}function Xv(t){let e,n,s,i,l,o,r=t[0].path+"",u,f,h,p,g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"",m,_,b,k,v,y,S=t[5]("routeEditor.upstreams")+"",C,T,O,A,x,P,D,I,R,U,N,z=t[5]("routeCard.edit")+"",B,j,F,W,G,Y,Q,le=t[0].transformer&&dc(t),Z=t[0].failover?.enabled&&pc(t),V=et(t[0].upstreams),X=[];for(let ce=0;ce<V.length;ce+=1)X[ce]=bc(hc(t,V,ce));let J=t[0].pathRewrite&&_c(t);function oe(ce,he){return ce[4]?Wv:Vv}let ne=oe(t),ee=ne(t);function se(ce,he){return ce[3]?Gv:qv}let K=se(t),q=K(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h2"),o=d("code"),u=E(r),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),le&&le.c(),b=w(),Z&&Z.c(),k=w(),v=d("div"),y=d("p"),C=E(S),T=E(":"),O=w(),A=d("div");for(let ce=0;ce<X.length;ce+=1)X[ce].c();x=w(),J&&J.c(),P=w(),D=d("div"),I=d("button"),R=de("svg"),U=de("path"),N=w(),B=E(z),j=w(),F=d("button"),ee.c(),W=w(),G=d("button"),q.c(),c(o,"class","text-primary"),c(l,"class","card-title text-lg"),c(p,"class","badge badge-sm"),c(h,"class","flex gap-2 mt-2 flex-wrap"),c(i,"class","flex-1"),c(s,"class","flex justify-between items-start"),c(y,"class","text-sm font-semibold mb-2"),c(A,"class","space-y-2"),c(v,"class","mt-4"),c(U,"stroke-linecap","round"),c(U,"stroke-linejoin","round"),c(U,"stroke-width","2"),c(U,"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"),c(R,"xmlns","http://www.w3.org/2000/svg"),c(R,"class","h-4 w-4"),c(R,"fill","none"),c(R,"viewBox","0 0 24 24"),c(R,"stroke","currentColor"),c(I,"class","btn btn-sm btn-primary btn-outline"),c(F,"class","btn btn-sm btn-secondary btn-outline"),F.disabled=t[4],c(G,"class","btn btn-sm btn-error btn-outline"),G.disabled=t[3],c(D,"class","card-actions justify-end mt-auto pt-4"),c(n,"class","card-body flex flex-col"),c(e,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(ce,he){H(ce,e,he),a(e,n),a(n,s),a(s,i),a(i,l),a(l,o),a(o,u),a(i,f),a(i,h),a(h,p),a(p,m),a(h,_),le&&le.m(h,null),a(h,b),Z&&Z.m(h,null),a(n,k),a(n,v),a(v,y),a(y,C),a(y,T),a(v,O),a(v,A);for(let ke=0;ke<X.length;ke+=1)X[ke]&&X[ke].m(A,null);a(n,x),J&&J.m(n,null),a(n,P),a(n,D),a(D,I),a(I,R),a(R,U),a(I,N),a(I,B),a(D,j),a(D,F),ee.m(F,null),a(D,W),a(D,G),q.m(G,null),Y||(Q=[te(I,"click",t[6]),te(F,"click",function(){ui(t[2])&&t[2].apply(this,arguments)}),te(G,"click",function(){ui(t[1])&&t[1].apply(this,arguments)})],Y=!0)},p(ce,[he]){if(t=ce,he&1&&r!==(r=t[0].path+"")&&M(u,r),he&33&&g!==(g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"")&&M(m,g),t[0].transformer?le?le.p(t,he):(le=dc(t),le.c(),le.m(h,b)):le&&(le.d(1),le=null),t[0].failover?.enabled?Z?Z.p(t,he):(Z=pc(t),Z.c(),Z.m(h,null)):Z&&(Z.d(1),Z=null),he&32&&S!==(S=t[5]("routeEditor.upstreams")+"")&&M(C,S),he&33){V=et(t[0].upstreams);let ke;for(ke=0;ke<V.length;ke+=1){const we=hc(t,V,ke);X[ke]?X[ke].p(we,he):(X[ke]=bc(we),X[ke].c(),X[ke].m(A,null))}for(;ke<X.length;ke+=1)X[ke].d(1);X.length=V.length}t[0].pathRewrite?J?J.p(t,he):(J=_c(t),J.c(),J.m(n,P)):J&&(J.d(1),J=null),he&32&&z!==(z=t[5]("routeCard.edit")+"")&&M(B,z),ne===(ne=oe(t))&&ee?ee.p(t,he):(ee.d(1),ee=ne(t),ee&&(ee.c(),ee.m(F,null))),he&16&&(F.disabled=t[4]),K===(K=se(t))&&q?q.p(t,he):(q.d(1),q=K(t),q&&(q.c(),q.m(G,null))),he&8&&(G.disabled=t[3])},i:Ee,o:Ee,d(ce){ce&&L(e),le&&le.d(),Z&&Z.d(),En(X,ce),J&&J.d(),ee.d(),q.d(),Y=!1,at(Q)}}}function ei(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function yc(t){if(!t)return"";const e=new Date(t),s=new Date().getTime()-e.getTime(),i=Math.floor(s/1e3),l=Math.floor(i/60),o=Math.floor(l/60);return i<60?\`\${i}\u79D2\u524D\`:l<60?\`\${l}\u5206\u949F\u524D\`:o<24?\`\${o}\u5C0F\u65F6\u524D\`:e.toLocaleString("zh-CN")}function Yv(t,e,n){let s;Gt(t,Et,h=>n(5,s=h));let{route:i}=e,{onDelete:l}=e,{onDuplicate:o}=e,{isDeleting:r=!1}=e,{isDuplicating:u=!1}=e;function f(){id(\`/routes/edit/\${encodeURIComponent(i.path)}\`)}return t.$$set=h=>{"route"in h&&n(0,i=h.route),"onDelete"in h&&n(1,l=h.onDelete),"onDuplicate"in h&&n(2,o=h.onDuplicate),"isDeleting"in h&&n(3,r=h.isDeleting),"isDuplicating"in h&&n(4,u=h.isDuplicating)},[i,l,o,r,u,s,f]}class Jv extends zt{constructor(e){super(),jt(this,e,Yv,Xv,Lt,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function wc(t){let e,n,s,i,l,o,r,u,f,h,p,g,m,_,b,k,v;return{c(){e=d("dialog"),n=d("div"),s=d("h3"),i=E(t[5]),l=w(),o=d("p"),r=E(t[4]),u=w(),f=d("div"),h=d("button"),p=E(t[2]),g=w(),m=d("button"),_=E(t[3]),c(s,"class","font-bold text-lg"),c(o,"class","py-4"),c(h,"class","btn"),c(m,"class",b="btn "+t[1]),c(f,"class","modal-action"),c(n,"class","modal-box"),c(e,"class","modal modal-open")},m(y,S){H(y,e,S),a(e,n),a(n,s),a(s,i),a(n,l),a(n,o),a(o,r),a(n,u),a(n,f),a(f,h),a(h,p),a(f,g),a(f,m),a(m,_),k||(v=[te(h,"click",t[7]),te(m,"click",t[6]),te(e,"click",t[8])],k=!0)},p(y,S){S&32&&M(i,y[5]),S&16&&M(r,y[4]),S&4&&M(p,y[2]),S&8&&M(_,y[3]),S&2&&b!==(b="btn "+y[1])&&c(m,"class",b)},d(y){y&&L(e),k=!1,at(v)}}}function Kv(t){let e,n=t[0]&&wc(t);return{c(){n&&n.c(),e=$n()},m(s,i){n&&n.m(s,i),H(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=wc(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ee,o:Ee,d(s){s&&L(e),n&&n.d(s)}}}function Zv(t,e,n){let s,i,l,o,r;Gt(t,Et,y=>n(13,r=y));let{open:u=!1}=e,{title:f=""}=e,{message:h=""}=e,{confirmText:p=""}=e,{cancelText:g=""}=e,{confirmClass:m="btn-error"}=e;const _=Rl();function b(){_("confirm"),n(0,u=!1)}function k(){_("cancel"),n(0,u=!1)}function v(y){y.target===y.currentTarget&&k()}return t.$$set=y=>{"open"in y&&n(0,u=y.open),"title"in y&&n(9,f=y.title),"message"in y&&n(10,h=y.message),"confirmText"in y&&n(11,p=y.confirmText),"cancelText"in y&&n(12,g=y.cancelText),"confirmClass"in y&&n(1,m=y.confirmClass)},t.$$.update=()=>{t.$$.dirty&8704&&n(5,s=f||r("confirmDialog.title")),t.$$.dirty&1024&&n(4,i=h),t.$$.dirty&10240&&n(3,l=p||r("confirmDialog.confirm")),t.$$.dirty&12288&&n(2,o=g||r("confirmDialog.cancel"))},[u,m,o,l,i,s,b,k,v,f,h,p,g,r]}class Qv extends zt{constructor(e){super(),jt(this,e,Zv,Kv,Lt,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function kc(t,e,n){const s=t.slice();return s[27]=e[n],s}function Sc(t,e,n){const s=t.slice();return s[30]=e[n],s}function $v(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function ey(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function Ec(t){let e,n=t[30]+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[30],ie(e,e.__value)},m(l,o){H(l,e,o),a(e,s)},p(l,o){o[0]&1024&&n!==(n=l[30]+"")&&M(s,n),o[0]&1024&&i!==(i=l[30])&&(e.__value=i,ie(e,e.__value))},d(l){l&&L(e)}}}function ty(t){let e,n,s=et(t[11]),i=[];for(let o=0;o<s.length;o+=1)i[o]=Tc(kc(t,s,o));const l=o=>Fe(i[o],1,1,()=>{i[o]=null});return{c(){e=d("div");for(let o=0;o<i.length;o+=1)i[o].c();c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(o,r){H(o,e,r);for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(e,null);n=!0},p(o,r){if(r[0]&76160){s=et(o[11]);let u;for(u=0;u<s.length;u+=1){const f=kc(o,s,u);i[u]?(i[u].p(f,r),Be(i[u],1)):(i[u]=Tc(f),i[u].c(),Be(i[u],1),i[u].m(e,null))}for(gs(),u=s.length;u<i.length;u+=1)l(u);ms()}},i(o){if(!n){for(let r=0;r<s.length;r+=1)Be(i[r]);n=!0}},o(o){i=i.filter(Boolean);for(let r=0;r<i.length;r+=1)Fe(i[r]);n=!1},d(o){o&&L(e),En(i,o)}}}function ny(t){let e;function n(l,o){return l[0].length===0?oy:ly}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","text-center py-12")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},i:Ee,o:Ee,d(l){l&&L(e),i.d()}}}function sy(t){let e,n,s,i,l,o=t[12]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[4]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p[0]&4096&&o!==(o=h[12]("common.error")+"")&&M(r,o),p[0]&16&&M(f,h[4])},i:Ee,o:Ee,d(h){h&&L(e)}}}function iy(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Tc(t){let e,n;function s(){return t[22](t[27])}function i(){return t[23](t[27])}return e=new Jv({props:{route:t[27],onDelete:s,onDuplicate:i,isDeleting:t[7].has(t[27].path),isDuplicating:t[8].has(t[27].path)}}),{c(){pt(e.$$.fragment)},m(l,o){ut(e,l,o),n=!0},p(l,o){t=l;const r={};o[0]&2048&&(r.route=t[27]),o[0]&2048&&(r.onDelete=s),o[0]&2048&&(r.onDuplicate=i),o[0]&2176&&(r.isDeleting=t[7].has(t[27].path)),o[0]&2304&&(r.isDuplicating=t[8].has(t[27].path)),e.$set(r)},i(l){n||(Be(e.$$.fragment,l),n=!0)},o(l){Fe(e.$$.fragment,l),n=!1},d(l){ct(e,l)}}}function ly(t){let e,n,s,i=t[12]("routes.noMatchingRoutes")+"",l,o,r,u=t[12]("routes.noMatchingMessage")+"",f;return{c(){e=d("div"),e.textContent="\uD83D\uDD0D",n=w(),s=d("h3"),l=E(i),o=w(),r=d("p"),f=E(u),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(r,"class","text-gray-500")},m(h,p){H(h,e,p),H(h,n,p),H(h,s,p),a(s,l),H(h,o,p),H(h,r,p),a(r,f)},p(h,p){p[0]&4096&&i!==(i=h[12]("routes.noMatchingRoutes")+"")&&M(l,i),p[0]&4096&&u!==(u=h[12]("routes.noMatchingMessage")+"")&&M(f,u)},d(h){h&&(L(e),L(n),L(s),L(o),L(r))}}}function oy(t){let e,n,s,i=t[12]("routes.noRoutes")+"",l,o,r,u=t[12]("routes.noRoutesMessage")+"",f,h,p,g=t[12]("routes.createFirstRoute")+"",m,_,b;return{c(){e=d("div"),e.textContent="\uD83D\uDE80",n=w(),s=d("h3"),l=E(i),o=w(),r=d("p"),f=E(u),h=w(),p=d("button"),m=E(g),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(r,"class","text-gray-500 mb-4"),c(p,"class","btn btn-primary")},m(k,v){H(k,e,v),H(k,n,v),H(k,s,v),a(s,l),H(k,o,v),H(k,r,v),a(r,f),H(k,h,v),H(k,p,v),a(p,m),_||(b=te(p,"click",t[17]),_=!0)},p(k,v){v[0]&4096&&i!==(i=k[12]("routes.noRoutes")+"")&&M(l,i),v[0]&4096&&u!==(u=k[12]("routes.noRoutesMessage")+"")&&M(f,u),v[0]&4096&&g!==(g=k[12]("routes.createFirstRoute")+"")&&M(m,g)},d(k){k&&(L(e),L(n),L(s),L(o),L(r),L(h),L(p)),_=!1,b()}}}function Mc(t){let e,n=t[12]("routes.showingRoutes",{values:{count:t[11].length,total:t[0].length}})+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","mt-6 text-sm text-gray-500 text-center")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&6145&&n!==(n=i[12]("routes.showingRoutes",{values:{count:i[11].length,total:i[0].length}})+"")&&M(s,n)},d(i){i&&L(e)}}}function ry(t){let e,n,s,i,l=t[12]("routes.title")+"",o,r,u,f=t[12]("routes.subtitle")+"",h,p,g,m,_,b,k,v=t[12]("routes.export")+"",y,S,C,T,O,A=t[12]("routes.import")+"",x,P,D,I,R=t[12]("routes.newRoute")+"",U,N,z,B,j,F,W,G,Y,Q,le=t[12]("routes.allTransformers")+"",Z,V,X,J,oe,ne,ee,se,K,q,ce;function he($,ue){return $[9]?ey:$v}let ke=he(t),we=ke(t),pe=et(t[10]),me=[];for(let $=0;$<pe.length;$+=1)me[$]=Ec(Sc(t,pe,$));const Pe=[iy,sy,ny,ty],Se=[];function Ce($,ue){return $[3]?0:$[4]?1:$[11].length===0?2:3}X=Ce(t),J=Se[X]=Pe[X](t);let _e=!t[3]&&t[0].length>0&&Mc(t);function Ae($){t[24]($)}let ye={title:t[12]("routes.confirmDelete"),message:t[6]?t[12]("routes.confirmDeleteMessage",{values:{path:t[6].path}}):"",confirmText:t[12]("common.delete"),cancelText:t[12]("common.cancel"),confirmClass:"btn-error"};return t[5]!==void 0&&(ye.open=t[5]),ee=new Qv({props:ye}),vn.push(()=>Kn(ee,"open",Ae)),ee.$on("confirm",t[14]),ee.$on("cancel",t[15]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),g=d("div"),m=d("button"),_=de("svg"),b=de("path"),k=w(),y=E(v),C=w(),T=d("button"),we.c(),O=w(),x=E(A),D=w(),I=d("button"),U=E(R),N=w(),z=d("div"),B=d("div"),j=d("input"),W=w(),G=d("div"),Y=d("select"),Q=d("option"),Z=E(le);for(let $=0;$<me.length;$+=1)me[$].c();V=w(),J.c(),oe=w(),_e&&_e.c(),ne=w(),pt(ee.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(_,"xmlns","http://www.w3.org/2000/svg"),c(_,"class","h-4 w-4"),c(_,"fill","none"),c(_,"viewBox","0 0 24 24"),c(_,"stroke","currentColor"),c(m,"class","btn btn-sm btn-outline"),m.disabled=S=t[3]||t[0].length===0,c(T,"class","btn btn-sm btn-outline"),T.disabled=P=t[3]||t[9],c(I,"class","btn btn-primary btn-sm"),c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(j,"type","text"),c(j,"placeholder",F=t[12]("routes.searchPlaceholder")),c(j,"class","input input-bordered"),c(B,"class","form-control flex-1"),Q.__value="",ie(Q,Q.__value),c(Y,"class","select select-bordered"),t[2]===void 0&&bs(()=>t[21].call(Y)),c(G,"class","form-control w-64"),c(z,"class","flex gap-4 mb-6"),c(e,"class","p-6")},m($,ue){H($,e,ue),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(n,p),a(n,g),a(g,m),a(m,_),a(_,b),a(m,k),a(m,y),a(g,C),a(g,T),we.m(T,null),a(T,O),a(T,x),a(g,D),a(g,I),a(I,U),a(e,N),a(e,z),a(z,B),a(B,j),ie(j,t[1]),a(z,W),a(z,G),a(G,Y),a(Y,Q),a(Q,Z);for(let ae=0;ae<me.length;ae+=1)me[ae]&&me[ae].m(Y,null);Cn(Y,t[2],!0),a(e,V),Se[X].m(e,null),a(e,oe),_e&&_e.m(e,null),a(e,ne),ut(ee,e,null),K=!0,q||(ce=[te(m,"click",t[18]),te(T,"click",t[19]),te(I,"click",t[17]),te(j,"input",t[20]),te(Y,"change",t[21])],q=!0)},p($,ue){if((!K||ue[0]&4096)&&l!==(l=$[12]("routes.title")+"")&&M(o,l),(!K||ue[0]&4096)&&f!==(f=$[12]("routes.subtitle")+"")&&M(h,f),(!K||ue[0]&4096)&&v!==(v=$[12]("routes.export")+"")&&M(y,v),(!K||ue[0]&9&&S!==(S=$[3]||$[0].length===0))&&(m.disabled=S),ke!==(ke=he($))&&(we.d(1),we=ke($),we&&(we.c(),we.m(T,O))),(!K||ue[0]&4096)&&A!==(A=$[12]("routes.import")+"")&&M(x,A),(!K||ue[0]&520&&P!==(P=$[3]||$[9]))&&(T.disabled=P),(!K||ue[0]&4096)&&R!==(R=$[12]("routes.newRoute")+"")&&M(U,R),(!K||ue[0]&4096&&F!==(F=$[12]("routes.searchPlaceholder")))&&c(j,"placeholder",F),ue[0]&2&&j.value!==$[1]&&ie(j,$[1]),(!K||ue[0]&4096)&&le!==(le=$[12]("routes.allTransformers")+"")&&M(Z,le),ue[0]&1024){pe=et($[10]);let re;for(re=0;re<pe.length;re+=1){const Ne=Sc($,pe,re);me[re]?me[re].p(Ne,ue):(me[re]=Ec(Ne),me[re].c(),me[re].m(Y,null))}for(;re<me.length;re+=1)me[re].d(1);me.length=pe.length}ue[0]&1028&&Cn(Y,$[2]);let ae=X;X=Ce($),X===ae?Se[X].p($,ue):(gs(),Fe(Se[ae],1,1,()=>{Se[ae]=null}),ms(),J=Se[X],J?J.p($,ue):(J=Se[X]=Pe[X]($),J.c()),Be(J,1),J.m(e,oe)),!$[3]&&$[0].length>0?_e?_e.p($,ue):(_e=Mc($),_e.c(),_e.m(e,ne)):_e&&(_e.d(1),_e=null);const ge={};ue[0]&4096&&(ge.title=$[12]("routes.confirmDelete")),ue[0]&4160&&(ge.message=$[6]?$[12]("routes.confirmDeleteMessage",{values:{path:$[6].path}}):""),ue[0]&4096&&(ge.confirmText=$[12]("common.delete")),ue[0]&4096&&(ge.cancelText=$[12]("common.cancel")),!se&&ue[0]&32&&(se=!0,ge.open=$[5],Jn(()=>se=!1)),ee.$set(ge)},i($){K||(Be(J),Be(ee.$$.fragment,$),K=!0)},o($){Fe(J),Fe(ee.$$.fragment,$),K=!1},d($){$&&L(e),we.d(),En(me,$),Se[X].d(),_e&&_e.d(),ct(ee),q=!1,at(ce)}}}function ay(t,e,n){let s,i,l;Gt(t,Et,N=>n(12,l=N));let o=[],r=!0,u=null,f="",h="",p=!0,g=!1,m=null,_=new Set,b=new Set,k=!1;async function v(N=!1){const z=!N&&p;try{z&&n(3,r=!0),n(0,o=await Ei.list()),n(4,u=null),p=!1}catch(B){n(4,u=B.message),N||bt.show(B.message,"error")}finally{z&&n(3,r=!1)}}async function y(N){n(6,m=N),n(5,g=!0)}async function S(){if(m){_.add(m.path),n(7,_);try{await Ei.delete(m.path),bt.show(l("routes.deleted",{values:{path:m.path}}),"success"),await v()}catch(N){bt.show(l("routes.deleteFailed",{values:{error:N.message}}),"error")}finally{_.delete(m.path),n(7,_),n(6,m=null)}}}function C(){n(6,m=null)}async function T(N){b.add(N.path),n(8,b);try{await Ei.duplicate(N.path),bt.show(l("routes.duplicated",{values:{path:N.path}}),"success"),await v()}catch(z){bt.show(l("routes.duplicateFailed",{values:{error:z.message}}),"error")}finally{b.delete(N.path),n(8,b)}}function O(){id("/routes/new")}function A(){if(o.length===0){bt.show(l("routes.noRoutesToExport"),"warning");return}const N=JSON.stringify(o,null,2),z="data:application/json;charset=utf-8,"+encodeURIComponent(N),B=\`bungee-routes-\${new Date().toISOString().split("T")[0]}.json\`,j=document.createElement("a");j.setAttribute("href",z),j.setAttribute("download",B),j.click(),bt.show(l("routes.exported"),"success")}function x(){const N=document.createElement("input");N.type="file",N.accept=".json",N.onchange=async z=>{const B=z.target.files[0];if(B){n(9,k=!0);try{const j=await B.text(),F=JSON.parse(j);if(!Array.isArray(F))throw new Error(l("routes.importMustBeArray"));let W=0,G=0;for(const Y of F)try{await Ei.create(Y),W++}catch(Q){G++,console.error(\`Failed to import route \${Y.path}:\`,Q)}if(W>0){const Y=G>0?l("routes.importPartialSuccess",{values:{success:W,failed:G}}):l("routes.importSuccess",{values:{success:W}});bt.show(Y,"success"),await v()}else bt.show(l("routes.importFailed",{values:{error:\`\${G} routes failed\`}}),"error")}catch(j){bt.show(l("routes.importFailed",{values:{error:j.message}}),"error")}finally{n(9,k=!1)}}},N.click()}is(()=>{v();const N=setInterval(()=>{v(!0)},5e3);return()=>{clearInterval(N)}});function P(){f=this.value,n(1,f)}function D(){h=Is(this),n(2,h),n(10,i),n(0,o)}const I=N=>y(N),R=N=>T(N);function U(N){g=N,n(5,g)}return t.$$.update=()=>{t.$$.dirty[0]&7&&n(11,s=o.filter(N=>{const z=N.path.toLowerCase().includes(f.toLowerCase())||N.upstreams.some(j=>j.target.toLowerCase().includes(f.toLowerCase())),B=!h||typeof N.transformer=="string"&&N.transformer===h||N.upstreams.some(j=>typeof j.transformer=="string"&&j.transformer===h);return z&&B})),t.$$.dirty[0]&1&&n(10,i=Array.from(new Set(o.flatMap(N=>{const z=[];return typeof N.transformer=="string"&&z.push(N.transformer),N.upstreams.forEach(B=>{typeof B.transformer=="string"&&z.push(B.transformer)}),z}))))},[o,f,h,r,u,g,m,_,b,k,i,s,l,y,S,C,T,O,A,x,P,D,I,R,U]}class uy extends zt{constructor(e){super(),jt(this,e,ay,ry,Lt,{},null,[-1,-1])}}var Tp=typeof global=="object"&&global&&global.Object===Object&&global,cy=typeof self=="object"&&self&&self.Object===Object&&self,Zs=Tp||cy||Function("return this")(),Fs=Zs.Symbol,Mp=Object.prototype,fy=Mp.hasOwnProperty,hy=Mp.toString,ll=Fs?Fs.toStringTag:void 0;function dy(t){var e=fy.call(t,ll),n=t[ll];try{t[ll]=void 0;var s=!0}catch{}var i=hy.call(t);return s&&(e?t[ll]=n:delete t[ll]),i}var py=Object.prototype,gy=py.toString;function my(t){return gy.call(t)}var by="[object Null]",_y="[object Undefined]",Cc=Fs?Fs.toStringTag:void 0;function Qi(t){return t==null?t===void 0?_y:by:Cc&&Cc in Object(t)?dy(t):my(t)}function Xi(t){return t!=null&&typeof t=="object"}var vy="[object Symbol]";function Al(t){return typeof t=="symbol"||Xi(t)&&Qi(t)==vy}function co(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var Ps=Array.isArray,Pc=Fs?Fs.prototype:void 0,Ac=Pc?Pc.toString:void 0;function Cp(t){if(typeof t=="string")return t;if(Ps(t))return co(t,Cp)+"";if(Al(t))return Ac?Ac.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Lo(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ho(t){return t}var yy="[object AsyncFunction]",wy="[object Function]",ky="[object GeneratorFunction]",Sy="[object Proxy]";function Pp(t){if(!Lo(t))return!1;var e=Qi(t);return e==wy||e==ky||e==yy||e==Sy}var ar=Zs["__core-js_shared__"],Oc=(function(){var t=/[^.]+$/.exec(ar&&ar.keys&&ar.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Ey(t){return!!Oc&&Oc in t}var Ty=Function.prototype,My=Ty.toString;function xi(t){if(t!=null){try{return My.call(t)}catch{}try{return t+""}catch{}}return""}var Cy=/[\\\\^$.*+?()[\\]{}|]/g,Py=/^\\[object .+?Constructor\\]$/,Ay=Function.prototype,Oy=Object.prototype,xy=Ay.toString,Ry=Oy.hasOwnProperty,Dy=RegExp("^"+xy.call(Ry).replace(Cy,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function Ly(t){if(!Lo(t)||Ey(t))return!1;var e=Pp(t)?Dy:Py;return e.test(xi(t))}function Hy(t,e){return t?.[e]}function Ri(t,e){var n=Hy(t,e);return Ly(n)?n:void 0}var Or=Ri(Zs,"WeakMap");function Iy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var By=800,Fy=16,Ny=Date.now;function jy(t){var e=0,n=0;return function(){var s=Ny(),i=Fy-(s-n);if(n=s,i>0){if(++e>=By)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function zy(t){return function(){return t}}var xc=(function(){try{var t=Ri(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Uy=xc?function(t,e){return xc(t,"toString",{configurable:!0,enumerable:!1,value:zy(e),writable:!0})}:Ho,Vy=jy(Uy),Wy=9007199254740991,qy=/^(?:0|[1-9]\\d*)$/;function ca(t,e){var n=typeof t;return e=e??Wy,!!e&&(n=="number"||n!="symbol"&&qy.test(t))&&t>-1&&t%1==0&&t<e}function fa(t,e){return t===e||t!==t&&e!==e}var Rc=Math.max;function Gy(t,e,n){return e=Rc(e===void 0?t.length-1:e,0),function(){for(var s=arguments,i=-1,l=Rc(s.length-e,0),o=Array(l);++i<l;)o[i]=s[e+i];i=-1;for(var r=Array(e+1);++i<e;)r[i]=s[i];return r[e]=n(o),Iy(t,this,r)}}function Xy(t,e){return Vy(Gy(t,e,Ho),t+"")}var Yy=9007199254740991;function ha(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Yy}function Io(t){return t!=null&&ha(t.length)&&!Pp(t)}function Dc(t,e,n){if(!Lo(n))return!1;var s=typeof e;return(s=="number"?Io(n)&&ca(e,n.length):s=="string"&&e in n)?fa(n[e],t):!1}var Jy=Object.prototype;function Ky(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||Jy;return t===n}function Zy(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var Qy="[object Arguments]";function Lc(t){return Xi(t)&&Qi(t)==Qy}var Ap=Object.prototype,$y=Ap.hasOwnProperty,e4=Ap.propertyIsEnumerable,da=Lc((function(){return arguments})())?Lc:function(t){return Xi(t)&&$y.call(t,"callee")&&!e4.call(t,"callee")};function t4(){return!1}var Op=typeof Gs=="object"&&Gs&&!Gs.nodeType&&Gs,Hc=Op&&typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,n4=Hc&&Hc.exports===Op,Ic=n4?Zs.Buffer:void 0,s4=Ic?Ic.isBuffer:void 0,xr=s4||t4,i4="[object Arguments]",l4="[object Array]",o4="[object Boolean]",r4="[object Date]",a4="[object Error]",u4="[object Function]",c4="[object Map]",f4="[object Number]",h4="[object Object]",d4="[object RegExp]",p4="[object Set]",g4="[object String]",m4="[object WeakMap]",b4="[object ArrayBuffer]",_4="[object DataView]",v4="[object Float32Array]",y4="[object Float64Array]",w4="[object Int8Array]",k4="[object Int16Array]",S4="[object Int32Array]",E4="[object Uint8Array]",T4="[object Uint8ClampedArray]",M4="[object Uint16Array]",C4="[object Uint32Array]",on={};on[v4]=on[y4]=on[w4]=on[k4]=on[S4]=on[E4]=on[T4]=on[M4]=on[C4]=!0;on[i4]=on[l4]=on[b4]=on[o4]=on[_4]=on[r4]=on[a4]=on[u4]=on[c4]=on[f4]=on[h4]=on[d4]=on[p4]=on[g4]=on[m4]=!1;function P4(t){return Xi(t)&&ha(t.length)&&!!on[Qi(t)]}function xp(t){return function(e){return t(e)}}var Rp=typeof Gs=="object"&&Gs&&!Gs.nodeType&&Gs,vl=Rp&&typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,A4=vl&&vl.exports===Rp,ur=A4&&Tp.process,Bc=(function(){try{var t=vl&&vl.require&&vl.require("util").types;return t||ur&&ur.binding&&ur.binding("util")}catch{}})(),Fc=Bc&&Bc.isTypedArray,Dp=Fc?xp(Fc):P4,O4=Object.prototype,x4=O4.hasOwnProperty;function R4(t,e){var n=Ps(t),s=!n&&da(t),i=!n&&!s&&xr(t),l=!n&&!s&&!i&&Dp(t),o=n||s||i||l,r=o?Zy(t.length,String):[],u=r.length;for(var f in t)x4.call(t,f)&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||l&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||ca(f,u)))&&r.push(f);return r}function D4(t,e){return function(n){return t(e(n))}}var L4=D4(Object.keys,Object),H4=Object.prototype,I4=H4.hasOwnProperty;function B4(t){if(!Ky(t))return L4(t);var e=[];for(var n in Object(t))I4.call(t,n)&&n!="constructor"&&e.push(n);return e}function pa(t){return Io(t)?R4(t):B4(t)}var F4=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,N4=/^\\w*$/;function ga(t,e){if(Ps(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Al(t)?!0:N4.test(t)||!F4.test(t)||e!=null&&t in Object(e)}var Ol=Ri(Object,"create");function j4(){this.__data__=Ol?Ol(null):{},this.size=0}function z4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var U4="__lodash_hash_undefined__",V4=Object.prototype,W4=V4.hasOwnProperty;function q4(t){var e=this.__data__;if(Ol){var n=e[t];return n===U4?void 0:n}return W4.call(e,t)?e[t]:void 0}var G4=Object.prototype,X4=G4.hasOwnProperty;function Y4(t){var e=this.__data__;return Ol?e[t]!==void 0:X4.call(e,t)}var J4="__lodash_hash_undefined__";function K4(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ol&&e===void 0?J4:e,this}function Pi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Pi.prototype.clear=j4;Pi.prototype.delete=z4;Pi.prototype.get=q4;Pi.prototype.has=Y4;Pi.prototype.set=K4;function Z4(){this.__data__=[],this.size=0}function Bo(t,e){for(var n=t.length;n--;)if(fa(t[n][0],e))return n;return-1}var Q4=Array.prototype,$4=Q4.splice;function ew(t){var e=this.__data__,n=Bo(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():$4.call(e,n,1),--this.size,!0}function tw(t){var e=this.__data__,n=Bo(e,t);return n<0?void 0:e[n][1]}function nw(t){return Bo(this.__data__,t)>-1}function sw(t,e){var n=this.__data__,s=Bo(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}function Qs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Qs.prototype.clear=Z4;Qs.prototype.delete=ew;Qs.prototype.get=tw;Qs.prototype.has=nw;Qs.prototype.set=sw;var xl=Ri(Zs,"Map");function iw(){this.size=0,this.__data__={hash:new Pi,map:new(xl||Qs),string:new Pi}}function lw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Fo(t,e){var n=t.__data__;return lw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function ow(t){var e=Fo(this,t).delete(t);return this.size-=e?1:0,e}function rw(t){return Fo(this,t).get(t)}function aw(t){return Fo(this,t).has(t)}function uw(t,e){var n=Fo(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}function $s(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}$s.prototype.clear=iw;$s.prototype.delete=ow;$s.prototype.get=rw;$s.prototype.has=aw;$s.prototype.set=uw;var cw="Expected a function";function ma(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(cw);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],l=n.cache;if(l.has(i))return l.get(i);var o=t.apply(this,s);return n.cache=l.set(i,o)||l,o};return n.cache=new(ma.Cache||$s),n}ma.Cache=$s;var fw=500;function hw(t){var e=ma(t,function(s){return n.size===fw&&n.clear(),s}),n=e.cache;return e}var dw=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,pw=/\\\\(\\\\)?/g,gw=hw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(dw,function(n,s,i,l){e.push(i?l.replace(pw,"$1"):s||n)}),e});function mw(t){return t==null?"":Cp(t)}function Lp(t,e){return Ps(t)?t:ga(t,e)?[t]:gw(mw(t))}function No(t){if(typeof t=="string"||Al(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ba(t,e){e=Lp(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[No(e[n++])];return n&&n==s?t:void 0}function bw(t,e,n){var s=t==null?void 0:ba(t,e);return s===void 0?n:s}function Hp(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var Nc=Fs?Fs.isConcatSpreadable:void 0;function _w(t){return Ps(t)||da(t)||!!(Nc&&t&&t[Nc])}function vw(t,e,n,s,i){var l=-1,o=t.length;for(n||(n=_w),i||(i=[]);++l<o;){var r=t[l];n(r)?Hp(i,r):i[i.length]=r}return i}function yw(){this.__data__=new Qs,this.size=0}function ww(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function kw(t){return this.__data__.get(t)}function Sw(t){return this.__data__.has(t)}var Ew=200;function Tw(t,e){var n=this.__data__;if(n instanceof Qs){var s=n.__data__;if(!xl||s.length<Ew-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new $s(s)}return n.set(t,e),this.size=n.size,this}function Ys(t){var e=this.__data__=new Qs(t);this.size=e.size}Ys.prototype.clear=yw;Ys.prototype.delete=ww;Ys.prototype.get=kw;Ys.prototype.has=Sw;Ys.prototype.set=Tw;function Mw(t,e){for(var n=-1,s=t==null?0:t.length,i=0,l=[];++n<s;){var o=t[n];e(o,n,t)&&(l[i++]=o)}return l}function Cw(){return[]}var Pw=Object.prototype,Aw=Pw.propertyIsEnumerable,jc=Object.getOwnPropertySymbols,Ow=jc?function(t){return t==null?[]:(t=Object(t),Mw(jc(t),function(e){return Aw.call(t,e)}))}:Cw;function xw(t,e,n){var s=e(t);return Ps(t)?s:Hp(s,n(t))}function zc(t){return xw(t,pa,Ow)}var Rr=Ri(Zs,"DataView"),Dr=Ri(Zs,"Promise"),Lr=Ri(Zs,"Set"),Uc="[object Map]",Rw="[object Object]",Vc="[object Promise]",Wc="[object Set]",qc="[object WeakMap]",Gc="[object DataView]",Dw=xi(Rr),Lw=xi(xl),Hw=xi(Dr),Iw=xi(Lr),Bw=xi(Or),ti=Qi;(Rr&&ti(new Rr(new ArrayBuffer(1)))!=Gc||xl&&ti(new xl)!=Uc||Dr&&ti(Dr.resolve())!=Vc||Lr&&ti(new Lr)!=Wc||Or&&ti(new Or)!=qc)&&(ti=function(t){var e=Qi(t),n=e==Rw?t.constructor:void 0,s=n?xi(n):"";if(s)switch(s){case Dw:return Gc;case Lw:return Uc;case Hw:return Vc;case Iw:return Wc;case Bw:return qc}return e});var Xc=Zs.Uint8Array,Fw="__lodash_hash_undefined__";function Nw(t){return this.__data__.set(t,Fw),this}function jw(t){return this.__data__.has(t)}function Eo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new $s;++e<n;)this.add(t[e])}Eo.prototype.add=Eo.prototype.push=Nw;Eo.prototype.has=jw;function zw(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}function Uw(t,e){return t.has(e)}var Vw=1,Ww=2;function Ip(t,e,n,s,i,l){var o=n&Vw,r=t.length,u=e.length;if(r!=u&&!(o&&u>r))return!1;var f=l.get(t),h=l.get(e);if(f&&h)return f==e&&h==t;var p=-1,g=!0,m=n&Ww?new Eo:void 0;for(l.set(t,e),l.set(e,t);++p<r;){var _=t[p],b=e[p];if(s)var k=o?s(b,_,p,e,t,l):s(_,b,p,t,e,l);if(k!==void 0){if(k)continue;g=!1;break}if(m){if(!zw(e,function(v,y){if(!Uw(m,y)&&(_===v||i(_,v,n,s,l)))return m.push(y)})){g=!1;break}}else if(!(_===b||i(_,b,n,s,l))){g=!1;break}}return l.delete(t),l.delete(e),g}function qw(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}function Gw(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var Xw=1,Yw=2,Jw="[object Boolean]",Kw="[object Date]",Zw="[object Error]",Qw="[object Map]",$w="[object Number]",ek="[object RegExp]",tk="[object Set]",nk="[object String]",sk="[object Symbol]",ik="[object ArrayBuffer]",lk="[object DataView]",Yc=Fs?Fs.prototype:void 0,cr=Yc?Yc.valueOf:void 0;function ok(t,e,n,s,i,l,o){switch(n){case lk:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ik:return!(t.byteLength!=e.byteLength||!l(new Xc(t),new Xc(e)));case Jw:case Kw:case $w:return fa(+t,+e);case Zw:return t.name==e.name&&t.message==e.message;case ek:case nk:return t==e+"";case Qw:var r=qw;case tk:var u=s&Xw;if(r||(r=Gw),t.size!=e.size&&!u)return!1;var f=o.get(t);if(f)return f==e;s|=Yw,o.set(t,e);var h=Ip(r(t),r(e),s,i,l,o);return o.delete(t),h;case sk:if(cr)return cr.call(t)==cr.call(e)}return!1}var rk=1,ak=Object.prototype,uk=ak.hasOwnProperty;function ck(t,e,n,s,i,l){var o=n&rk,r=zc(t),u=r.length,f=zc(e),h=f.length;if(u!=h&&!o)return!1;for(var p=u;p--;){var g=r[p];if(!(o?g in e:uk.call(e,g)))return!1}var m=l.get(t),_=l.get(e);if(m&&_)return m==e&&_==t;var b=!0;l.set(t,e),l.set(e,t);for(var k=o;++p<u;){g=r[p];var v=t[g],y=e[g];if(s)var S=o?s(y,v,g,e,t,l):s(v,y,g,t,e,l);if(!(S===void 0?v===y||i(v,y,n,s,l):S)){b=!1;break}k||(k=g=="constructor")}if(b&&!k){var C=t.constructor,T=e.constructor;C!=T&&"constructor"in t&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof T=="function"&&T instanceof T)&&(b=!1)}return l.delete(t),l.delete(e),b}var fk=1,Jc="[object Arguments]",Kc="[object Array]",so="[object Object]",hk=Object.prototype,Zc=hk.hasOwnProperty;function dk(t,e,n,s,i,l){var o=Ps(t),r=Ps(e),u=o?Kc:ti(t),f=r?Kc:ti(e);u=u==Jc?so:u,f=f==Jc?so:f;var h=u==so,p=f==so,g=u==f;if(g&&xr(t)){if(!xr(e))return!1;o=!0,h=!1}if(g&&!h)return l||(l=new Ys),o||Dp(t)?Ip(t,e,n,s,i,l):ok(t,e,u,n,s,i,l);if(!(n&fk)){var m=h&&Zc.call(t,"__wrapped__"),_=p&&Zc.call(e,"__wrapped__");if(m||_){var b=m?t.value():t,k=_?e.value():e;return l||(l=new Ys),i(b,k,n,s,l)}}return g?(l||(l=new Ys),ck(t,e,n,s,i,l)):!1}function _a(t,e,n,s,i){return t===e?!0:t==null||e==null||!Xi(t)&&!Xi(e)?t!==t&&e!==e:dk(t,e,n,s,_a,i)}var pk=1,gk=2;function mk(t,e,n,s){var i=n.length,l=i;if(t==null)return!l;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<l;){o=n[i];var r=o[0],u=t[r],f=o[1];if(o[2]){if(u===void 0&&!(r in t))return!1}else{var h=new Ys,p;if(!(p===void 0?_a(f,u,pk|gk,s,h):p))return!1}}return!0}function Bp(t){return t===t&&!Lo(t)}function bk(t){for(var e=pa(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,Bp(i)]}return e}function Fp(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function _k(t){var e=bk(t);return e.length==1&&e[0][2]?Fp(e[0][0],e[0][1]):function(n){return n===t||mk(n,t,e)}}function vk(t,e){return t!=null&&e in Object(t)}function yk(t,e,n){e=Lp(e,t);for(var s=-1,i=e.length,l=!1;++s<i;){var o=No(e[s]);if(!(l=t!=null&&n(t,o)))break;t=t[o]}return l||++s!=i?l:(i=t==null?0:t.length,!!i&&ha(i)&&ca(o,i)&&(Ps(t)||da(t)))}function wk(t,e){return t!=null&&yk(t,e,vk)}var kk=1,Sk=2;function Ek(t,e){return ga(t)&&Bp(e)?Fp(No(t),e):function(n){var s=bw(n,t);return s===void 0&&s===e?wk(n,t):_a(e,s,kk|Sk)}}function Tk(t){return function(e){return e?.[t]}}function Mk(t){return function(e){return ba(e,t)}}function Ck(t){return ga(t)?Tk(No(t)):Mk(t)}function Pk(t){return typeof t=="function"?t:t==null?Ho:typeof t=="object"?Ps(t)?Ek(t[0],t[1]):_k(t):Ck(t)}function Ak(t){return function(e,n,s){for(var i=-1,l=Object(e),o=s(e),r=o.length;r--;){var u=o[++i];if(n(l[u],u,l)===!1)break}return e}}var Ok=Ak();function xk(t,e){return t&&Ok(t,e,pa)}function Rk(t,e){return function(n,s){if(n==null)return n;if(!Io(n))return t(n,s);for(var i=n.length,l=-1,o=Object(n);++l<i&&s(o[l],l,o)!==!1;);return n}}var Dk=Rk(xk);function Lk(t,e){var n=-1,s=Io(t)?Array(t.length):[];return Dk(t,function(i,l,o){s[++n]=e(i,l,o)}),s}function Hk(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Ik(t,e){if(t!==e){var n=t!==void 0,s=t===null,i=t===t,l=Al(t),o=e!==void 0,r=e===null,u=e===e,f=Al(e);if(!r&&!f&&!l&&t>e||l&&o&&u&&!r&&!f||s&&o&&u||!n&&u||!i)return 1;if(!s&&!l&&!f&&t<e||f&&n&&i&&!s&&!l||r&&n&&i||!o&&i||!u)return-1}return 0}function Bk(t,e,n){for(var s=-1,i=t.criteria,l=e.criteria,o=i.length,r=n.length;++s<o;){var u=Ik(i[s],l[s]);if(u){if(s>=r)return u;var f=n[s];return u*(f=="desc"?-1:1)}}return t.index-e.index}function Fk(t,e,n){e.length?e=co(e,function(l){return Ps(l)?function(o){return ba(o,l.length===1?l[0]:l)}:l}):e=[Ho];var s=-1;e=co(e,xp(Pk));var i=Lk(t,function(l,o,r){var u=co(e,function(f){return f(l)});return{criteria:u,index:++s,value:l}});return Hk(i,function(l,o){return Bk(l,o,n)})}var Nk=Xy(function(t,e){if(t==null)return[];var n=e.length;return n>1&&Dc(t,e[0],e[1])?e=[]:n>2&&Dc(e[0],e[1],e[2])&&(e=[e[0]]),Fk(t,vw(e),[])});const Qc="/__ui/api";class Np{static async getAll(){const e=await fetch(\`\${Qc}/transformers\`);if(!e.ok)throw new Error(\`HTTP \${e.status}: \${e.statusText}\`);const n=await e.json();return n.plugins||n.transformers||[]}static async getById(e){const n=await fetch(\`\${Qc}/transformers/\${encodeURIComponent(e)}\`);if(!n.ok)throw new Error(\`HTTP \${n.status}: \${n.statusText}\`);return await n.json()}}let io=null;async function jk(){if(io===null)try{io=await Np.getAll()}catch(t){console.warn("Failed to fetch transformers from API, using fallback:",t),io=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return io}function jp(t,e){const n=[],s=\`upstreams[\${e}]\`;if(!t.target)n.push({field:\`\${s}.target\`,message:ds(Et)("validation.targetRequired")});else try{const i=new URL(t.target);["http:","https:"].includes(i.protocol)||n.push({field:\`\${s}.target\`,message:ds(Et)("validation.targetProtocol")})}catch{n.push({field:\`\${s}.target\`,message:ds(Et)("validation.invalidUrl")})}return t.weight!==void 0&&(typeof t.weight!="number"||t.weight<=0)&&n.push({field:\`\${s}.weight\`,message:ds(Et)("validation.weightPositive")}),t.priority!==void 0&&(typeof t.priority!="number"||t.priority<0)&&n.push({field:\`\${s}.priority\`,message:ds(Et)("validation.priorityNonNegative")}),n}function zk(t){const e=[];return t.some(s=>s.weight!==void 0)&&t.reduce((i,l)=>i+(l.weight||0),0)===0&&e.push({field:"upstreams",message:ds(Et)("validation.totalWeightPositive")}),e}async function Uk(t,e){const n=jp(t,e),s=\`upstreams[\${e}]\`;if(t.plugins&&t.plugins.length>0){const i=t.plugins[0];if(typeof i=="string")try{const l=await jk();if(!l.includes(i)){const o=ds(Et);n.push({field:\`\${s}.plugins\`,message:o("validation.unknownTransformer",{values:{transformer:i,options:l.join(", ")}})})}}catch(l){console.warn("Failed to validate plugin:",l)}}return n}async function Vk(t){const e=[];if(t.path?t.path.startsWith("/")||e.push({field:"path",message:ds(Et)("validation.pathStartSlash")}):e.push({field:"path",message:ds(Et)("validation.pathRequired")}),!t.upstreams||t.upstreams.length===0)e.push({field:"upstreams",message:ds(Et)("validation.upstreamRequired")});else{const n=t.upstreams.map((i,l)=>Uk(i,l));(await Promise.all(n)).forEach(i=>e.push(...i))}return t.pathRewrite&&Object.keys(t.pathRewrite).forEach(n=>{try{new RegExp(n)}catch{const s=ds(Et);e.push({field:\`pathRewrite.\${n}\`,message:s("validation.invalidRegex",{values:{pattern:n}})})}}),t.failover?.enabled&&(t.failover.retryableStatusCodes&&t.failover.retryableStatusCodes.forEach(n=>{if(n<100||n>599){const s=ds(Et);e.push({field:"failover.retryableStatusCodes",message:s("validation.invalidStatusCode",{values:{code:n}})})}}),t.failover.recoveryIntervalMs!==void 0&&t.failover.recoveryIntervalMs<=0&&e.push({field:"failover.recoveryIntervalMs",message:ds(Et)("validation.recoveryIntervalPositive")}),t.failover.recoveryTimeoutMs!==void 0&&t.failover.recoveryTimeoutMs<=0&&e.push({field:"failover.recoveryTimeoutMs",message:ds(Et)("validation.recoveryTimeoutPositive")})),e}function $c(t,e,n){const s=t.slice();return s[19]=e[n],s[20]=e,s[21]=n,s}function ef(t,e,n){const s=t.slice();return s[19]=e[n],s[22]=e,s[21]=n,s}function tf(t){let e,n,s;return{c(){e=d("span"),n=E("Support dynamic expressions: "),s=d("code"),s.textContent="{{ expression }}",c(s,"class","text-xs"),c(e,"class","label-text-alt text-xs")},m(i,l){H(i,e,l),a(e,n),a(e,s)},d(i){i&&L(e)}}}function nf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[12].call(n,t[22],t[21])}function g(){t[13].call(l,t[22],t[21])}function m(){return t[14](t[21])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[19].key),a(e,i),a(e,l),ie(l,t[19].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),b&4&&n.value!==t[19].key&&ie(n,t[19].key),b&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),b&4&&l.value!==t[19].value&&ie(l,t[19].value)},d(_){_&&L(e),f=!1,at(h)}}}function sf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[16].call(n,t[20],t[21])}function g(){t[17].call(l,t[20],t[21])}function m(){return t[18](t[21])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[19].key),a(e,i),a(e,l),ie(l,t[19].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),b&16&&n.value!==t[19].key&&ie(n,t[19].key),b&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),b&16&&l.value!==t[19].value&&ie(l,t[19].value)},d(_){_&&L(e),f=!1,at(h)}}}function Wk(t){let e,n,s,i,l,o,r,u,f,h,p,g=t[5]("headers.addHeader")+"",m,_,b=t[2].length+"",k,v,y,S,C,T,O=t[5]("headers.addHeader")+"",A,x,P,D,I,R,U=t[5]("headers.remove")+"",N,z,B,j,F,W,G,Y=t[5]("headers.empty")+"",Q,le,Z,V,X,J,oe=t[5]("headers.default")+"",ne,ee,se=t[4].length+"",K,q,ce,he,ke,we,pe=t[5]("headers.addHeader")+"",me,Pe,Se,Ce=t[1]&&tf(),_e=et(t[2]),Ae=[];for(let ue=0;ue<_e.length;ue+=1)Ae[ue]=nf(ef(t,_e,ue));let ye=et(t[4]),$=[];for(let ue=0;ue<ye.length;ue+=1)$[ue]=sf($c(t,ye,ue));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),Ce&&Ce.c(),o=w(),r=d("div"),u=d("div"),f=d("input"),h=w(),p=d("div"),m=E(g),_=E(" ("),k=E(b),v=E(")"),y=w(),S=d("div");for(let ue=0;ue<Ae.length;ue+=1)Ae[ue].c();C=w(),T=d("button"),A=E(O),x=w(),P=d("div"),D=d("input"),I=w(),R=d("div"),N=E(U),z=w(),B=d("div"),j=d("input"),W=w(),G=d("p"),Q=E(Y),le=w(),Z=d("div"),V=d("input"),X=w(),J=d("div"),ne=E(oe),ee=E(" ("),K=E(se),q=E(")"),ce=w(),he=d("div");for(let ue=0;ue<$.length;ue+=1)$[ue].c();ke=w(),we=d("button"),me=E(pe),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(T,"type","button"),c(T,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(D,"type","checkbox"),c(R,"class","collapse-title text-sm font-medium"),c(j,"type","text"),c(j,"placeholder",F=t[5]("headers.namePlaceholder")),c(j,"class","input input-bordered input-sm w-full"),c(G,"class","text-xs text-gray-500 mt-1"),c(B,"class","collapse-content"),c(P,"class","collapse collapse-arrow bg-base-200"),c(V,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(we,"type","button"),c(we,"class","btn btn-sm btn-ghost"),c(he,"class","collapse-content space-y-2"),c(Z,"class","collapse collapse-arrow bg-base-200"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(ue,ae){H(ue,e,ae),a(e,n),a(n,s),a(s,i),a(n,l),Ce&&Ce.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(u,h),a(u,p),a(p,m),a(p,_),a(p,k),a(p,v),a(u,y),a(u,S);for(let ge=0;ge<Ae.length;ge+=1)Ae[ge]&&Ae[ge].m(S,null);a(S,C),a(S,T),a(T,A),a(r,x),a(r,P),a(P,D),a(P,I),a(P,R),a(R,N),a(P,z),a(P,B),a(B,j),ie(j,t[3]),a(B,W),a(B,G),a(G,Q),a(r,le),a(r,Z),a(Z,V),a(Z,X),a(Z,J),a(J,ne),a(J,ee),a(J,K),a(J,q),a(Z,ce),a(Z,he);for(let ge=0;ge<$.length;ge+=1)$[ge]&&$[ge].m(he,null);a(he,ke),a(he,we),a(we,me),Pe||(Se=[te(T,"click",t[6]),te(j,"input",t[15]),te(we,"click",t[8])],Pe=!0)},p(ue,[ae]){if(ae&1&&M(i,ue[0]),ue[1]?Ce||(Ce=tf(),Ce.c(),Ce.m(n,null)):Ce&&(Ce.d(1),Ce=null),ae&32&&g!==(g=ue[5]("headers.addHeader")+"")&&M(m,g),ae&4&&b!==(b=ue[2].length+"")&&M(k,b),ae&164){_e=et(ue[2]);let ge;for(ge=0;ge<_e.length;ge+=1){const re=ef(ue,_e,ge);Ae[ge]?Ae[ge].p(re,ae):(Ae[ge]=nf(re),Ae[ge].c(),Ae[ge].m(S,C))}for(;ge<Ae.length;ge+=1)Ae[ge].d(1);Ae.length=_e.length}if(ae&32&&O!==(O=ue[5]("headers.addHeader")+"")&&M(A,O),ae&32&&U!==(U=ue[5]("headers.remove")+"")&&M(N,U),ae&32&&F!==(F=ue[5]("headers.namePlaceholder"))&&c(j,"placeholder",F),ae&8&&j.value!==ue[3]&&ie(j,ue[3]),ae&32&&Y!==(Y=ue[5]("headers.empty")+"")&&M(Q,Y),ae&32&&oe!==(oe=ue[5]("headers.default")+"")&&M(ne,oe),ae&16&&se!==(se=ue[4].length+"")&&M(K,se),ae&560){ye=et(ue[4]);let ge;for(ge=0;ge<ye.length;ge+=1){const re=$c(ue,ye,ge);$[ge]?$[ge].p(re,ae):($[ge]=sf(re),$[ge].c(),$[ge].m(he,ke))}for(;ge<$.length;ge+=1)$[ge].d(1);$.length=ye.length}ae&32&&pe!==(pe=ue[5]("headers.addHeader")+"")&&M(me,pe)},i:Ee,o:Ee,d(ue){ue&&L(e),Ce&&Ce.d(),En(Ae,ue),En($,ue),Pe=!1,at(Se)}}}function qk(t,e,n){let s;Gt(t,Et,O=>n(5,s=O));let{value:i={}}=e,{label:l="Headers"}=e,{showHelp:o=!0}=e,r=[],u="",f=[],h=!1;function p(){n(2,r=[...r,{key:"",value:""}]),n(11,h=!0)}function g(O){n(2,r=r.filter((A,x)=>x!==O))}function m(){n(4,f=[...f,{key:"",value:""}]),n(11,h=!0)}function _(O){n(4,f=f.filter((A,x)=>x!==O))}function b(O,A){O[A].key=this.value,n(2,r),n(11,h),n(10,i),n(3,u),n(4,f)}function k(O,A){O[A].value=this.value,n(2,r),n(11,h),n(10,i),n(3,u),n(4,f)}const v=O=>g(O);function y(){u=this.value,n(3,u),n(11,h),n(10,i),n(2,r),n(4,f)}function S(O,A){O[A].key=this.value,n(4,f),n(11,h),n(10,i),n(2,r),n(3,u)}function C(O,A){O[A].value=this.value,n(4,f),n(11,h),n(10,i),n(2,r),n(3,u)}const T=O=>_(O);return t.$$set=O=>{"value"in O&&n(10,i=O.value),"label"in O&&n(0,l=O.label),"showHelp"in O&&n(1,o=O.showHelp)},t.$$.update=()=>{if(t.$$.dirty&3100){!h&&(i.add||i.remove||i.default)&&(n(2,r=Object.entries(i.add||{}).map(([P,D])=>({key:P,value:String(D)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.default||{}).map(([P,D])=>({key:P,value:String(D)}))),n(11,h=!0));const O={};r.filter(P=>P.key.trim()).forEach(P=>{O[P.key]=P.value}),n(10,i.add=Object.keys(O).length>0?O:void 0,i);const A=u.split(",").map(P=>P.trim()).filter(P=>P);n(10,i.remove=A.length>0?A:void 0,i);const x={};f.filter(P=>P.key.trim()).forEach(P=>{x[P.key]=P.value}),n(10,i.default=Object.keys(x).length>0?x:void 0,i)}},[l,o,r,u,f,s,p,g,m,_,i,h,b,k,v,y,S,C,T]}class zp extends zt{constructor(e){super(),jt(this,e,qk,Wk,Lt,{value:10,label:0,showHelp:1})}}function lf(t,e,n){const s=t.slice();return s[25]=e[n],s[26]=e,s[27]=n,s}function of(t,e,n){const s=t.slice();return s[25]=e[n],s[28]=e,s[27]=n,s}function rf(t,e,n){const s=t.slice();return s[25]=e[n],s[29]=e,s[27]=n,s}function af(t){let e;return{c(){e=d("span"),e.textContent="Support JSON values and dynamic expressions",c(e,"class","label-text-alt text-xs")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function uf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[15].call(n,t[29],t[27])}function g(){t[16].call(l,t[29],t[27])}function m(){return t[17](t[27])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[25].key),a(e,i),a(e,l),ie(l,t[25].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),b&4&&n.value!==t[25].key&&ie(n,t[25].key),b&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),b&4&&l.value!==t[25].value&&ie(l,t[25].value)},d(_){_&&L(e),f=!1,at(h)}}}function cf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[19].call(n,t[28],t[27])}function g(){t[20].call(l,t[28],t[27])}function m(){return t[21](t[27])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[25].key),a(e,i),a(e,l),ie(l,t[25].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),b&16&&n.value!==t[25].key&&ie(n,t[25].key),b&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),b&16&&l.value!==t[25].value&&ie(l,t[25].value)},d(_){_&&L(e),f=!1,at(h)}}}function ff(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[22].call(n,t[26],t[27])}function g(){t[23].call(l,t[26],t[27])}function m(){return t[24](t[27])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[25].key),a(e,i),a(e,l),ie(l,t[25].value),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),b&32&&n.value!==t[25].key&&ie(n,t[25].key),b&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),b&32&&l.value!==t[25].value&&ie(l,t[25].value)},d(_){_&&L(e),f=!1,at(h)}}}function Gk(t){let e,n,s,i,l,o,r,u,f,h,p,g=t[6]("common.add")+"",m,_,b=t[2].length+"",k,v,y,S,C,T,O=t[6]("common.add")+"",A,x,P,D,I,R,U=t[6]("headers.remove")+"",N,z,B,j,F,W,G,Y=t[6]("headers.empty")+"",Q,le,Z,V,X,J,oe=t[6]("body.replace")+"",ne,ee,se=t[4].length+"",K,q,ce,he,ke,we,pe=t[6]("common.add")+"",me,Pe,Se,Ce,_e,Ae,ye=t[6]("body.default")+"",$,ue,ae=t[5].length+"",ge,re,Ne,Ye,Ve,Qe,st=t[6]("common.add")+"",Xe,vt,rt,He=t[1]&&af(),$e=et(t[2]),Oe=[];for(let ve=0;ve<$e.length;ve+=1)Oe[ve]=uf(rf(t,$e,ve));let ft=et(t[4]),qe=[];for(let ve=0;ve<ft.length;ve+=1)qe[ve]=cf(of(t,ft,ve));let Re=et(t[5]),ze=[];for(let ve=0;ve<Re.length;ve+=1)ze[ve]=ff(lf(t,Re,ve));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),He&&He.c(),o=w(),r=d("div"),u=d("div"),f=d("input"),h=w(),p=d("div"),m=E(g),_=E(" ("),k=E(b),v=E(")"),y=w(),S=d("div");for(let ve=0;ve<Oe.length;ve+=1)Oe[ve].c();C=w(),T=d("button"),A=E(O),x=w(),P=d("div"),D=d("input"),I=w(),R=d("div"),N=E(U),z=w(),B=d("div"),j=d("input"),W=w(),G=d("p"),Q=E(Y),le=w(),Z=d("div"),V=d("input"),X=w(),J=d("div"),ne=E(oe),ee=E(" ("),K=E(se),q=E(")"),ce=w(),he=d("div");for(let ve=0;ve<qe.length;ve+=1)qe[ve].c();ke=w(),we=d("button"),me=E(pe),Pe=w(),Se=d("div"),Ce=d("input"),_e=w(),Ae=d("div"),$=E(ye),ue=E(" ("),ge=E(ae),re=E(")"),Ne=w(),Ye=d("div");for(let ve=0;ve<ze.length;ve+=1)ze[ve].c();Ve=w(),Qe=d("button"),Xe=E(st),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(T,"type","button"),c(T,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(D,"type","checkbox"),c(R,"class","collapse-title text-sm font-medium"),c(j,"type","text"),c(j,"placeholder",F=t[6]("body.placeholder")),c(j,"class","input input-bordered input-sm w-full"),c(G,"class","text-xs text-gray-500 mt-1"),c(B,"class","collapse-content"),c(P,"class","collapse collapse-arrow bg-base-200"),c(V,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(we,"type","button"),c(we,"class","btn btn-sm btn-ghost"),c(he,"class","collapse-content space-y-2"),c(Z,"class","collapse collapse-arrow bg-base-200"),c(Ce,"type","checkbox"),c(Ae,"class","collapse-title text-sm font-medium"),c(Qe,"type","button"),c(Qe,"class","btn btn-sm btn-ghost"),c(Ye,"class","collapse-content space-y-2"),c(Se,"class","collapse collapse-arrow bg-base-200"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(ve,Je){H(ve,e,Je),a(e,n),a(n,s),a(s,i),a(n,l),He&&He.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(u,h),a(u,p),a(p,m),a(p,_),a(p,k),a(p,v),a(u,y),a(u,S);for(let be=0;be<Oe.length;be+=1)Oe[be]&&Oe[be].m(S,null);a(S,C),a(S,T),a(T,A),a(r,x),a(r,P),a(P,D),a(P,I),a(P,R),a(R,N),a(P,z),a(P,B),a(B,j),ie(j,t[3]),a(B,W),a(B,G),a(G,Q),a(r,le),a(r,Z),a(Z,V),a(Z,X),a(Z,J),a(J,ne),a(J,ee),a(J,K),a(J,q),a(Z,ce),a(Z,he);for(let be=0;be<qe.length;be+=1)qe[be]&&qe[be].m(he,null);a(he,ke),a(he,we),a(we,me),a(r,Pe),a(r,Se),a(Se,Ce),a(Se,_e),a(Se,Ae),a(Ae,$),a(Ae,ue),a(Ae,ge),a(Ae,re),a(Se,Ne),a(Se,Ye);for(let be=0;be<ze.length;be+=1)ze[be]&&ze[be].m(Ye,null);a(Ye,Ve),a(Ye,Qe),a(Qe,Xe),vt||(rt=[te(T,"click",t[7]),te(j,"input",t[18]),te(we,"click",t[9]),te(Qe,"click",t[11])],vt=!0)},p(ve,[Je]){if(Je&1&&M(i,ve[0]),ve[1]?He||(He=af(),He.c(),He.m(n,null)):He&&(He.d(1),He=null),Je&64&&g!==(g=ve[6]("common.add")+"")&&M(m,g),Je&4&&b!==(b=ve[2].length+"")&&M(k,b),Je&324){$e=et(ve[2]);let be;for(be=0;be<$e.length;be+=1){const We=rf(ve,$e,be);Oe[be]?Oe[be].p(We,Je):(Oe[be]=uf(We),Oe[be].c(),Oe[be].m(S,C))}for(;be<Oe.length;be+=1)Oe[be].d(1);Oe.length=$e.length}if(Je&64&&O!==(O=ve[6]("common.add")+"")&&M(A,O),Je&64&&U!==(U=ve[6]("headers.remove")+"")&&M(N,U),Je&64&&F!==(F=ve[6]("body.placeholder"))&&c(j,"placeholder",F),Je&8&&j.value!==ve[3]&&ie(j,ve[3]),Je&64&&Y!==(Y=ve[6]("headers.empty")+"")&&M(Q,Y),Je&64&&oe!==(oe=ve[6]("body.replace")+"")&&M(ne,oe),Je&16&&se!==(se=ve[4].length+"")&&M(K,se),Je&1104){ft=et(ve[4]);let be;for(be=0;be<ft.length;be+=1){const We=of(ve,ft,be);qe[be]?qe[be].p(We,Je):(qe[be]=cf(We),qe[be].c(),qe[be].m(he,ke))}for(;be<qe.length;be+=1)qe[be].d(1);qe.length=ft.length}if(Je&64&&pe!==(pe=ve[6]("common.add")+"")&&M(me,pe),Je&64&&ye!==(ye=ve[6]("body.default")+"")&&M($,ye),Je&32&&ae!==(ae=ve[5].length+"")&&M(ge,ae),Je&4192){Re=et(ve[5]);let be;for(be=0;be<Re.length;be+=1){const We=lf(ve,Re,be);ze[be]?ze[be].p(We,Je):(ze[be]=ff(We),ze[be].c(),ze[be].m(Ye,Ve))}for(;be<ze.length;be+=1)ze[be].d(1);ze.length=Re.length}Je&64&&st!==(st=ve[6]("common.add")+"")&&M(Xe,st)},i:Ee,o:Ee,d(ve){ve&&L(e),He&&He.d(),En(Oe,ve),En(qe,ve),En(ze,ve),vt=!1,at(rt)}}}function Xk(t,e,n){let s;Gt(t,Et,R=>n(6,s=R));let{value:i={}}=e,{label:l="Body"}=e,{showHelp:o=!0}=e,r=[],u="",f=[],h=[],p=!1;function g(){n(2,r=[...r,{key:"",value:""}]),n(14,p=!0)}function m(R){n(2,r=r.filter((U,N)=>N!==R))}function _(){n(4,f=[...f,{key:"",value:""}]),n(14,p=!0)}function b(R){n(4,f=f.filter((U,N)=>N!==R))}function k(){n(5,h=[...h,{key:"",value:""}]),n(14,p=!0)}function v(R){n(5,h=h.filter((U,N)=>N!==R))}function y(R,U){R[U].key=this.value,n(2,r),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}function S(R,U){R[U].value=this.value,n(2,r),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}const C=R=>m(R);function T(){u=this.value,n(3,u),n(14,p),n(13,i),n(2,r),n(4,f),n(5,h)}function O(R,U){R[U].key=this.value,n(4,f),n(14,p),n(13,i),n(2,r),n(3,u),n(5,h)}function A(R,U){R[U].value=this.value,n(4,f),n(14,p),n(13,i),n(2,r),n(3,u),n(5,h)}const x=R=>b(R);function P(R,U){R[U].key=this.value,n(5,h),n(14,p),n(13,i),n(2,r),n(3,u),n(4,f)}function D(R,U){R[U].value=this.value,n(5,h),n(14,p),n(13,i),n(2,r),n(3,u),n(4,f)}const I=R=>v(R);return t.$$set=R=>{"value"in R&&n(13,i=R.value),"label"in R&&n(0,l=R.label),"showHelp"in R&&n(1,o=R.showHelp)},t.$$.update=()=>{if(t.$$.dirty&24636){!p&&(i.add||i.remove||i.replace||i.default)&&(n(2,r=Object.entries(i.add||{}).map(([B,j])=>({key:B,value:typeof j=="string"?j:JSON.stringify(j)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.replace||{}).map(([B,j])=>({key:B,value:typeof j=="string"?j:JSON.stringify(j)}))),n(5,h=Object.entries(i.default||{}).map(([B,j])=>({key:B,value:typeof j=="string"?j:JSON.stringify(j)}))),n(14,p=!0));const R={};r.filter(B=>B.key.trim()).forEach(B=>{try{R[B.key]=JSON.parse(B.value)}catch{R[B.key]=B.value}}),n(13,i.add=Object.keys(R).length>0?R:void 0,i);const U=u.split(",").map(B=>B.trim()).filter(B=>B);n(13,i.remove=U.length>0?U:void 0,i);const N={};f.filter(B=>B.key.trim()).forEach(B=>{try{N[B.key]=JSON.parse(B.value)}catch{N[B.key]=B.value}}),n(13,i.replace=Object.keys(N).length>0?N:void 0,i);const z={};h.filter(B=>B.key.trim()).forEach(B=>{try{z[B.key]=JSON.parse(B.value)}catch{z[B.key]=B.value}}),n(13,i.default=Object.keys(z).length>0?z:void 0,i)}},[l,o,r,u,f,h,s,g,m,_,b,k,v,i,p,y,S,C,T,O,A,x,P,D,I]}class Up extends zt{constructor(e){super(),jt(this,e,Xk,Gk,Lt,{value:13,label:0,showHelp:1})}}function hf(t,e,n){const s=t.slice();return s[16]=e[n],s}function df(t){let e,n=t[16].name+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[16].id,ie(e,e.__value)},m(l,o){H(l,e,o),a(e,s)},p(l,o){o&64&&n!==(n=l[16].name+"")&&M(s,n),o&64&&i!==(i=l[16].id)&&(e.__value=i,ie(e,e.__value))},d(l){l&&L(e)}}}function pf(t){let e,n,s=t[6].find(t[12])?.description+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-gray-500"),c(e,"class","label")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o&65&&s!==(s=l[6].find(l[12])?.description+"")&&M(i,s)},d(l){l&&L(e)}}}function gf(t){let e,n,s=t[2]?"Hide":"Show",i,l,o,r,u,f,h=t[2]&&mf(t);return{c(){e=d("div"),n=d("button"),i=E(s),l=E(" Preview"),o=w(),h&&h.c(),r=$n(),c(n,"type","button"),c(n,"class","btn btn-xs btn-outline"),c(e,"class","flex items-center gap-2")},m(p,g){H(p,e,g),a(e,n),a(n,i),a(n,l),H(p,o,g),h&&h.m(p,g),H(p,r,g),u||(f=te(n,"click",t[13]),u=!0)},p(p,g){g&4&&s!==(s=p[2]?"Hide":"Show")&&M(i,s),p[2]?h?h.p(p,g):(h=mf(p),h.c(),h.m(r.parentNode,r)):h&&(h.d(1),h=null)},d(p){p&&(L(e),L(o),L(r)),h&&h.d(p),u=!1,f()}}}function mf(t){let e,n,s,i=t[7]("plugin.testPlugin")+"",l,o,r,u,f,h,p=t[7]("plugin.input")+"",g,m,_,b,k,v,y,S,C=t[7]("plugin.output")+"",T,O,A,x,P,D,I,R,U,N,z=t[7]("plugin.testPlugin")+"",B,j,F,W,G,Y=(t[4]||t[5])&&bf(t),Q=t[5]&&_f(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=w(),_=d("textarea"),k=w(),v=d("div"),y=d("label"),S=d("span"),T=E(C),O=w(),A=d("textarea"),P=w(),D=d("div"),I=d("button"),R=de("svg"),U=de("path"),N=w(),B=E(z),j=w(),Y&&Y.c(),F=w(),Q&&Q.c(),c(s,"class","font-semibold text-sm"),c(h,"class","label-text text-xs"),c(f,"class","label py-1"),c(f,"for","plugin-input"),c(_,"id","plugin-input"),c(_,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),c(_,"placeholder",b=t[7]("plugin.inputPlaceholder")),c(_,"rows","10"),c(S,"class","label-text text-xs"),c(y,"class","label py-1"),c(y,"for","plugin-output"),c(A,"id","plugin-output"),c(A,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),A.value=t[4],A.readOnly=!0,c(A,"rows","10"),c(A,"placeholder",x=t[7]("plugin.outputPlaceholder")),c(r,"class","grid grid-cols-2 gap-4"),c(U,"stroke-linecap","round"),c(U,"stroke-linejoin","round"),c(U,"stroke-width","2"),c(U,"d","M14 5l7 7m0 0l-7 7m7-7H3"),c(R,"xmlns","http://www.w3.org/2000/svg"),c(R,"class","h-3 w-3"),c(R,"fill","none"),c(R,"viewBox","0 0 24 24"),c(R,"stroke","currentColor"),c(I,"type","button"),c(I,"class","btn btn-xs btn-primary"),c(D,"class","flex gap-2"),c(n,"class","card-body p-4 space-y-3"),c(e,"class","card bg-base-200")},m(le,Z){H(le,e,Z),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,f),a(f,h),a(h,g),a(u,m),a(u,_),ie(_,t[3]),a(r,k),a(r,v),a(v,y),a(y,S),a(S,T),a(v,O),a(v,A),a(n,P),a(n,D),a(D,I),a(I,R),a(R,U),a(I,N),a(I,B),a(D,j),Y&&Y.m(D,null),a(n,F),Q&&Q.m(n,null),W||(G=[te(_,"input",t[14]),te(I,"click",t[9])],W=!0)},p(le,Z){Z&128&&i!==(i=le[7]("plugin.testPlugin")+"")&&M(l,i),Z&128&&p!==(p=le[7]("plugin.input")+"")&&M(g,p),Z&128&&b!==(b=le[7]("plugin.inputPlaceholder"))&&c(_,"placeholder",b),Z&8&&ie(_,le[3]),Z&128&&C!==(C=le[7]("plugin.output")+"")&&M(T,C),Z&16&&(A.value=le[4]),Z&128&&x!==(x=le[7]("plugin.outputPlaceholder"))&&c(A,"placeholder",x),Z&128&&z!==(z=le[7]("plugin.testPlugin")+"")&&M(B,z),le[4]||le[5]?Y?Y.p(le,Z):(Y=bf(le),Y.c(),Y.m(D,null)):Y&&(Y.d(1),Y=null),le[5]?Q?Q.p(le,Z):(Q=_f(le),Q.c(),Q.m(n,null)):Q&&(Q.d(1),Q=null)},d(le){le&&L(e),Y&&Y.d(),Q&&Q.d(),W=!1,at(G)}}}function bf(t){let e,n=t[7]("common.reset")+"",s,i,l;return{c(){e=d("button"),s=E(n),c(e,"type","button"),c(e,"class","btn btn-xs btn-ghost")},m(o,r){H(o,e,r),a(e,s),i||(l=te(e,"click",t[10]),i=!0)},p(o,r){r&128&&n!==(n=o[7]("common.reset")+"")&&M(s,n)},d(o){o&&L(e),i=!1,l()}}}function _f(t){let e,n,s,i,l,o=t[7]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[5]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(l,"class","text-xs"),c(e,"class","alert alert-error py-2")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p&128&&o!==(o=h[7]("common.error")+"")&&M(r,o),p&32&&M(f,h[5])},d(h){h&&L(e)}}}function Yk(t){let e,n,s,i,l,o,r,u,f=t[7]("plugin.none")+"",h,p,g,m,_,b=et(t[6]),k=[];for(let S=0;S<b.length;S+=1)k[S]=df(hf(t,b,S));let v=t[0]&&pf(t),y=t[0]&&gf(t);return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),l=E(t[1]),o=w(),r=d("select"),u=d("option"),h=E(f);for(let S=0;S<k.length;S+=1)k[S].c();p=w(),v&&v.c(),g=w(),y&&y.c(),c(i,"class","label-text font-semibold"),c(s,"class","label"),c(s,"for","plugin-select"),u.__value=null,ie(u,u.__value),c(r,"id","plugin-select"),c(r,"class","select select-bordered"),t[0]===void 0&&bs(()=>t[11].call(r)),c(n,"class","form-control"),c(e,"class","space-y-3")},m(S,C){H(S,e,C),a(e,n),a(n,s),a(s,i),a(i,l),a(n,o),a(n,r),a(r,u),a(u,h);for(let T=0;T<k.length;T+=1)k[T]&&k[T].m(r,null);Cn(r,t[0],!0),a(n,p),v&&v.m(n,null),a(e,g),y&&y.m(e,null),m||(_=[te(r,"change",t[11]),te(r,"change",t[8])],m=!0)},p(S,[C]){if(C&2&&M(l,S[1]),C&128&&f!==(f=S[7]("plugin.none")+"")&&M(h,f),C&64){b=et(S[6]);let T;for(T=0;T<b.length;T+=1){const O=hf(S,b,T);k[T]?k[T].p(O,C):(k[T]=df(O),k[T].c(),k[T].m(r,null))}for(;T<k.length;T+=1)k[T].d(1);k.length=b.length}C&65&&Cn(r,S[0]),S[0]?v?v.p(S,C):(v=pf(S),v.c(),v.m(n,null)):v&&(v.d(1),v=null),S[0]?y?y.p(S,C):(y=gf(S),y.c(),y.m(e,null)):y&&(y.d(1),y=null)},i:Ee,o:Ee,d(S){S&&L(e),En(k,S),v&&v.d(),y&&y.d(),m=!1,at(_)}}}function Vp(t){return t.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" \u2192 ")}function Jk(t){const e=t.split("-to-");if(e.length===2){const[n,s]=e;return\`Convert \${n.charAt(0).toUpperCase()+n.slice(1)} API format to \${s.charAt(0).toUpperCase()+s.slice(1)} format\`}return\`\${Vp(t)} plugin\`}function Kk(t,e,n){let s;Gt(t,Et,S=>n(7,s=S));let{plugin:i=null}=e,{label:l="Plugin"}=e;const o=Rl();let r=!1,u=\`{
21214
+ \`):t}function g_(t,e){const{element:n,datasetIndex:s,index:i}=e,l=t.getDatasetMeta(s).controller,{label:o,value:a}=l.getLabelAndValue(i);return{chart:t,label:o,parsed:l.getParsed(i),raw:t.data.datasets[s].data[i],formattedValue:a,dataset:l.getDataset(),dataIndex:i,datasetIndex:s,element:n}}function qu(t,e){const n=t.chart.ctx,{body:s,footer:i,title:l}=t,{boxWidth:o,boxHeight:a}=e,u=Kn(e.bodyFont),f=Kn(e.titleFont),h=Kn(e.footerFont),p=l.length,g=i.length,m=s.length,b=Ts(e.padding);let _=b.height,y=0,k=s.reduce((P,M)=>P+M.before.length+M.lines.length+M.after.length,0);if(k+=t.beforeBody.length+t.afterBody.length,p&&(_+=p*f.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),k){const P=e.displayColors?Math.max(a,u.lineHeight):u.lineHeight;_+=m*P+(k-m)*u.lineHeight+(k-1)*e.bodySpacing}g&&(_+=e.footerMarginTop+g*h.lineHeight+(g-1)*e.footerSpacing);let w=0;const S=function(P){y=Math.max(y,n.measureText(P).width+w)};return n.save(),n.font=f.string,Vt(t.title,S),n.font=u.string,Vt(t.beforeBody.concat(t.afterBody),S),w=e.displayColors?o+2+e.boxPadding:0,Vt(s,P=>{Vt(P.before,S),Vt(P.lines,S),Vt(P.after,S)}),w=0,n.font=h.string,Vt(t.footer,S),n.restore(),y+=b.width,{width:y,height:_}}function m_(t,e){const{y:n,height:s}=e;return n<s/2?"top":n>t.height-s/2?"bottom":"center"}function b_(t,e,n,s){const{x:i,width:l}=s,o=n.caretSize+n.caretPadding;if(t==="left"&&i+l+o>e.width||t==="right"&&i-l-o<0)return!0}function __(t,e,n,s){const{x:i,width:l}=n,{width:o,chartArea:{left:a,right:u}}=t;let f="center";return s==="center"?f=i<=(a+u)/2?"left":"right":i<=l/2?f="left":i>=o-l/2&&(f="right"),b_(f,t,e,n)&&(f="center"),f}function Gu(t,e,n){const s=n.yAlign||e.yAlign||m_(t,n);return{xAlign:n.xAlign||e.xAlign||__(t,e,n,s),yAlign:s}}function v_(t,e){let{x:n,width:s}=t;return e==="right"?n-=s:e==="center"&&(n-=s/2),n}function y_(t,e,n){let{y:s,height:i}=t;return e==="top"?s+=n:e==="bottom"?s-=i+n:s-=i/2,s}function Xu(t,e,n,s){const{caretSize:i,caretPadding:l,cornerRadius:o}=t,{xAlign:a,yAlign:u}=n,f=i+l,{topLeft:h,topRight:p,bottomLeft:g,bottomRight:m}=Ni(o);let b=v_(e,a);const _=y_(e,u,f);return u==="center"?a==="left"?b+=f:a==="right"&&(b-=f):a==="left"?b-=Math.max(h,g)+i:a==="right"&&(b+=Math.max(p,m)+i),{x:Jn(b,0,s.width-e.width),y:Jn(_,0,s.height-e.height)}}function to(t,e,n){const s=Ts(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-s.right:t.x+s.left}function Yu(t){return Ls([],Ws(t))}function w_(t,e,n){return xi(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Ju(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Sp={beforeTitle:Us,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,s=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return n[e.dataIndex]}return""},afterTitle:Us,beforeBody:Us,beforeLabel:Us,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Ft(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Us,afterBody:Us,beforeFooter:Us,footer:Us,afterFooter:Us};function ds(t,e,n,s){const i=t[e].call(n,s);return typeof i>"u"?Sp[e].call(n,s):i}class Ku extends Ks{static positioners=cl;constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,s=this.options.setContext(this.getContext()),i=s.enabled&&n.options.animation&&s.animations,l=new op(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=w_(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:s}=n,i=ds(s,"beforeTitle",this,e),l=ds(s,"title",this,e),o=ds(s,"afterTitle",this,e);let a=[];return a=Ls(a,Ws(i)),a=Ls(a,Ws(l)),a=Ls(a,Ws(o)),a}getBeforeBody(e,n){return Yu(ds(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:s}=n,i=[];return Vt(e,l=>{const o={before:[],lines:[],after:[]},a=Ju(s,l);Ls(o.before,Ws(ds(a,"beforeLabel",this,l))),Ls(o.lines,ds(a,"label",this,l)),Ls(o.after,Ws(ds(a,"afterLabel",this,l))),i.push(o)}),i}getAfterBody(e,n){return Yu(ds(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:s}=n,i=ds(s,"beforeFooter",this,e),l=ds(s,"footer",this,e),o=ds(s,"afterFooter",this,e);let a=[];return a=Ls(a,Ws(i)),a=Ls(a,Ws(l)),a=Ls(a,Ws(o)),a}_createItems(e){const n=this._active,s=this.chart.data,i=[],l=[],o=[];let a=[],u,f;for(u=0,f=n.length;u<f;++u)a.push(g_(this.chart,n[u]));return e.filter&&(a=a.filter((h,p,g)=>e.filter(h,p,g,s))),e.itemSort&&(a=a.sort((h,p)=>e.itemSort(h,p,s))),Vt(a,h=>{const p=Ju(e.callbacks,h);i.push(ds(p,"labelColor",this,h)),l.push(ds(p,"labelPointStyle",this,h)),o.push(ds(p,"labelTextColor",this,h))}),this.labelColors=i,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const s=this.options.setContext(this.getContext()),i=this._active;let l,o=[];if(!i.length)this.opacity!==0&&(l={opacity:0});else{const a=cl[s.position].call(this,i,this._eventPosition);o=this._createItems(s),this.title=this.getTitle(o,s),this.beforeBody=this.getBeforeBody(o,s),this.body=this.getBody(o,s),this.afterBody=this.getAfterBody(o,s),this.footer=this.getFooter(o,s);const u=this._size=qu(this,s),f=Object.assign({},a,u),h=Gu(this.chart,s,f),p=Xu(s,f,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,l={opacity:1,x:p.x,y:p.y,width:u.width,height:u.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&s.external&&s.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,s,i){const l=this.getCaretPosition(e,s,i);n.lineTo(l.x1,l.y1),n.lineTo(l.x2,l.y2),n.lineTo(l.x3,l.y3)}getCaretPosition(e,n,s){const{xAlign:i,yAlign:l}=this,{caretSize:o,cornerRadius:a}=s,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Ni(a),{x:g,y:m}=e,{width:b,height:_}=n;let y,k,w,S,P,M;return l==="center"?(P=m+_/2,i==="left"?(y=g,k=y-o,S=P+o,M=P-o):(y=g+b,k=y+o,S=P-o,M=P+o),w=y):(i==="left"?k=g+Math.max(u,h)+o:i==="right"?k=g+b-Math.max(f,p)-o:k=this.caretX,l==="top"?(S=m,P=S-o,y=k-o,w=k+o):(S=m+_,P=S+o,y=k+o,w=k-o),M=S),{x1:y,x2:k,x3:w,y1:S,y2:P,y3:M}}drawTitle(e,n,s){const i=this.title,l=i.length;let o,a,u;if(l){const f=ji(s.rtl,this.x,this.width);for(e.x=to(this,s.titleAlign,s),n.textAlign=f.textAlign(s.titleAlign),n.textBaseline="middle",o=Kn(s.titleFont),a=s.titleSpacing,n.fillStyle=s.titleColor,n.font=o.string,u=0;u<l;++u)n.fillText(i[u],f.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+a,u+1===l&&(e.y+=s.titleMarginBottom-a)}}_drawColorBox(e,n,s,i,l){const o=this.labelColors[s],a=this.labelPointStyles[s],{boxHeight:u,boxWidth:f}=l,h=Kn(l.bodyFont),p=to(this,"left",l),g=i.x(p),m=u<h.lineHeight?(h.lineHeight-u)/2:0,b=n.y+m;if(l.usePointStyle){const _={radius:Math.min(f,u)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=i.leftForLtr(g,f)+f/2,k=b+u/2;e.strokeStyle=l.multiKeyBackground,e.fillStyle=l.multiKeyBackground,Pr(e,_,y,k),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,Pr(e,_,y,k)}else{e.lineWidth=Ot(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const _=i.leftForLtr(g,f),y=i.leftForLtr(i.xPlus(g,1),f-2),k=Ni(o.borderRadius);Object.values(k).some(w=>w!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,wo(e,{x:_,y:b,w:f,h:u,radius:k}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),wo(e,{x:y,y:b+1,w:f-2,h:u-2,radius:k}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(_,b,f,u),e.strokeRect(_,b,f,u),e.fillStyle=o.backgroundColor,e.fillRect(y,b+1,f-2,u-2))}e.fillStyle=this.labelTextColors[s]}drawBody(e,n,s){const{body:i}=this,{bodySpacing:l,bodyAlign:o,displayColors:a,boxHeight:u,boxWidth:f,boxPadding:h}=s,p=Kn(s.bodyFont);let g=p.lineHeight,m=0;const b=ji(s.rtl,this.x,this.width),_=function(O){n.fillText(O,b.x(e.x+m),e.y+g/2),e.y+=g+l},y=b.textAlign(o);let k,w,S,P,M,x,A;for(n.textAlign=o,n.textBaseline="middle",n.font=p.string,e.x=to(this,y,s),n.fillStyle=s.bodyColor,Vt(this.beforeBody,_),m=a&&y!=="right"?o==="center"?f/2+h:f+2+h:0,P=0,x=i.length;P<x;++P){for(k=i[P],w=this.labelTextColors[P],n.fillStyle=w,Vt(k.before,_),S=k.lines,a&&S.length&&(this._drawColorBox(n,e,P,b,s),g=Math.max(p.lineHeight,u)),M=0,A=S.length;M<A;++M)_(S[M]),g=p.lineHeight;Vt(k.after,_)}m=0,g=p.lineHeight,Vt(this.afterBody,_),e.y-=l}drawFooter(e,n,s){const i=this.footer,l=i.length;let o,a;if(l){const u=ji(s.rtl,this.x,this.width);for(e.x=to(this,s.footerAlign,s),e.y+=s.footerMarginTop,n.textAlign=u.textAlign(s.footerAlign),n.textBaseline="middle",o=Kn(s.footerFont),n.fillStyle=s.footerColor,n.font=o.string,a=0;a<l;++a)n.fillText(i[a],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+s.footerSpacing}}drawBackground(e,n,s,i){const{xAlign:l,yAlign:o}=this,{x:a,y:u}=e,{width:f,height:h}=s,{topLeft:p,topRight:g,bottomLeft:m,bottomRight:b}=Ni(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+p,u),o==="top"&&this.drawCaret(e,n,s,i),n.lineTo(a+f-g,u),n.quadraticCurveTo(a+f,u,a+f,u+g),o==="center"&&l==="right"&&this.drawCaret(e,n,s,i),n.lineTo(a+f,u+h-b),n.quadraticCurveTo(a+f,u+h,a+f-b,u+h),o==="bottom"&&this.drawCaret(e,n,s,i),n.lineTo(a+m,u+h),n.quadraticCurveTo(a,u+h,a,u+h-m),o==="center"&&l==="left"&&this.drawCaret(e,n,s,i),n.lineTo(a,u+p),n.quadraticCurveTo(a,u,a+p,u),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,s=this.$animations,i=s&&s.x,l=s&&s.y;if(i||l){const o=cl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=qu(this,e),u=Object.assign({},o,this._size),f=Gu(n,e,u),h=Xu(e,u,f,n);(i._to!==h.x||l._to!==h.y)&&(this.xAlign=f.xAlign,this.yAlign=f.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let s=this.opacity;if(!s)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},l={x:this.x,y:this.y};s=Math.abs(s)<.001?0:s;const o=Ts(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=s,this.drawBackground(l,e,i,n),sp(e,n.textDirection),l.y+=o.top,this.drawTitle(l,e,n),this.drawBody(l,e,n),this.drawFooter(l,e,n),ip(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const s=this._active,i=e.map(({datasetIndex:a,index:u})=>{const f=this.chart.getDatasetMeta(a);if(!f)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:f.data[u],index:u}}),l=!_o(s,i),o=this._positionChanged(i,n);(l||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,s=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,l=this._active||[],o=this._getActiveElements(e,l,n,s),a=this._positionChanged(o,e),u=n||!_o(o,l)||a;return u&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),u}_getActiveElements(e,n,s,i){const l=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,l.mode,l,s);return l.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:s,caretY:i,options:l}=this,o=cl[l.position].call(this,e,n);return o!==!1&&(s!==o.x||i!==o.y)}}var ca={id:"tooltip",_element:Ku,positioners:cl,afterInit(t,e,n){n&&(t.tooltip=new Ku({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.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:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.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:Sp},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const k_=(t,e,n,s)=>(typeof e=="string"?(n=t.push(e)-1,s.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function S_(t,e,n,s){const i=t.indexOf(e);if(i===-1)return k_(t,e,n,s);const l=t.lastIndexOf(e);return i!==l?n:i}const E_=(t,e)=>t===null?null:Jn(Math.round(t),0,e);function Zu(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ep extends Zi{static id="category";static defaults={ticks:{callback:Zu}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const s=this.getLabels();for(const{index:i,label:l}of n)s[i]===l&&s.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Ft(e))return null;const s=this.getLabels();return n=isFinite(n)&&s[n]===e?n:S_(s,e,bt(n,e),this._addedLabels),E_(n,s.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:s,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(s=0),n||(i=this.getLabels().length-1)),this.min=s,this.max=i}buildTicks(){const e=this.min,n=this.max,s=this.options.offset,i=[];let l=this.getLabels();l=e===0&&n===l.length-1?l:l.slice(e,n+1),this._valueRange=Math.max(l.length-(s?0:1),1),this._startValue=this.min-(s?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(e){return Zu.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}function T_(t,e){const n=[],{bounds:i,step:l,min:o,max:a,precision:u,count:f,maxTicks:h,maxDigits:p,includeBounds:g}=t,m=l||1,b=h-1,{min:_,max:y}=e,k=!Ft(o),w=!Ft(a),S=!Ft(f),P=(y-_)/(p+1);let M=Qa((y-_)/b/m)*m,x,A,O,C;if(M<1e-14&&!k&&!w)return[{value:_},{value:y}];C=Math.ceil(y/M)-Math.floor(_/M),C>b&&(M=Qa(C*M/b/m)*m),Ft(u)||(x=Math.pow(10,u),M=Math.ceil(M*x)/x),i==="ticks"?(A=Math.floor(_/M)*M,O=Math.ceil(y/M)*M):(A=_,O=y),k&&w&&l&&jm((a-o)/l,M/1e3)?(C=Math.round(Math.min((a-o)/M,h)),M=(a-o)/C,A=o,O=a):S?(A=k?o:A,O=w?a:O,C=f-1,M=(O-A)/C):(C=(O-A)/M,ml(C,Math.round(C),M/1e3)?C=Math.round(C):C=Math.ceil(C));const R=Math.max($a(M),$a(A));x=Math.pow(10,Ft(u)?R:u),A=Math.round(A*x)/x,O=Math.round(O*x)/x;let L=0;for(k&&(g&&A!==o?(n.push({value:o}),A<o&&L++,ml(Math.round((A+L*M)*x)/x,o,Qu(o,P,t))&&L++):A<o&&L++);L<C;++L){const D=Math.round((A+L*M)*x)/x;if(w&&D>a)break;n.push({value:D})}return w&&g&&O!==a?n.length&&ml(n[n.length-1].value,a,Qu(a,P,t))?n[n.length-1].value=a:n.push({value:a}):(!w||O===a)&&n.push({value:O}),n}function Qu(t,e,{horizontal:n,minRotation:s}){const i=Gs(s),l=(n?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/l,o)}class M_ extends Zi{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Ft(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:s}=this.getUserBounds();let{min:i,max:l}=this;const o=u=>i=n?i:u,a=u=>l=s?l:u;if(e){const u=Bs(i),f=Bs(l);u<0&&f<0?a(0):u>0&&f>0&&o(0)}if(i===l){let u=l===0?1:Math.abs(l*.05);a(l+u),e||o(i-u)}this.min=i,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:s}=e,i;return s?(i=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,i>1e3&&(console.warn(\`scales.\${this.id}.ticks.stepSize: \${s} would result generating up to \${i} ticks. Limiting to 1000.\`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let s=this.getTickLimit();s=Math.max(2,s);const i={maxTicks:s,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},l=this._range||this,o=T_(i,l);return e.bounds==="ticks"&&zm(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,s=this.max;if(super.configure(),this.options.offset&&e.length){const i=(s-n)/Math.max(e.length-1,1)/2;n-=i,s+=i}this._startValue=n,this._endValue=s,this._valueRange=s-n}getLabelForValue(e){return $r(e,this.chart.options.locale,this.options.ticks.format)}}class Tp extends M_{static id="linear";static defaults={ticks:{callback:Jd.formatters.numeric}};determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=Es(e)?e:0,this.max=Es(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,s=Gs(this.options.ticks.minRotation),i=(e?Math.sin(s):Math.cos(s))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,l.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const Lo={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}},gs=Object.keys(Lo);function $u(t,e){return t-e}function ec(t,e){if(Ft(e))return null;const n=t._adapter,{parser:s,round:i,isoWeekday:l}=t._parseOpts;let o=e;return typeof s=="function"&&(o=s(o)),Es(o)||(o=typeof s=="string"?n.parse(o,s):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(Tl(l)||l===!0)?n.startOf(o,"isoWeek",l):n.startOf(o,i)),+o)}function tc(t,e,n,s){const i=gs.length;for(let l=gs.indexOf(t);l<i-1;++l){const o=Lo[gs[l]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(a*o.size))<=s)return gs[l]}return gs[i-1]}function C_(t,e,n,s,i){for(let l=gs.length-1;l>=gs.indexOf(n);l--){const o=gs[l];if(Lo[o].common&&t._adapter.diff(i,s,o)>=e-1)return o}return gs[n?gs.indexOf(n):0]}function P_(t){for(let e=gs.indexOf(t)+1,n=gs.length;e<n;++e)if(Lo[gs[e]].common)return gs[e]}function nc(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:s,hi:i}=Kr(n,e),l=n[s]>=e?n[s]:n[i];t[l]=!0}}function A_(t,e,n,s){const i=t._adapter,l=+i.startOf(e[0].value,s),o=e[e.length-1].value;let a,u;for(a=l;a<=o;a=+i.add(a,1,s))u=n[a],u>=0&&(e[u].major=!0);return e}function sc(t,e,n){const s=[],i={},l=e.length;let o,a;for(o=0;o<l;++o)a=e[o],i[a]=o,s.push({value:a,major:!1});return l===0||!n?s:A_(t,s,i,n)}class ic extends Zi{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(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const s=e.time||(e.time={}),i=this._adapter=new Ab._date(e.adapters.date);i.init(n),gl(s.displayFormats,i.formats()),this._parseOpts={parser:s.parser,round:s.round,isoWeekday:s.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:ec(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,s=e.time.unit||"day";let{min:i,max:l,minDefined:o,maxDefined:a}=this.getUserBounds();function u(f){!o&&!isNaN(f.min)&&(i=Math.min(i,f.min)),!a&&!isNaN(f.max)&&(l=Math.max(l,f.max))}(!o||!a)&&(u(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&u(this.getMinMax(!1))),i=Es(i)&&!isNaN(i)?i:+n.startOf(Date.now(),s),l=Es(l)&&!isNaN(l)?l:+n.endOf(Date.now(),s)+1,this.min=Math.min(i,l-1),this.max=Math.max(i+1,l)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],s=e[e.length-1]),{min:n,max:s}}buildTicks(){const e=this.options,n=e.time,s=e.ticks,i=s.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const l=this.min,o=this.max,a=Gm(i,l,o);return this._unit=n.unit||(s.autoSkip?tc(n.minUnit,this.min,this.max,this._getLabelCapacity(l)):C_(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!s.major.enabled||this._unit==="year"?void 0:P_(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),sc(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,s=0,i,l;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?s=l:s=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=Jn(n,0,o),s=Jn(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const e=this._adapter,n=this.min,s=this.max,i=this.options,l=i.time,o=l.unit||tc(l.minUnit,n,s,this._getLabelCapacity(n)),a=bt(i.ticks.stepSize,1),u=o==="week"?l.isoWeekday:!1,f=Tl(u)||u===!0,h={};let p=n,g,m;if(f&&(p=+e.startOf(p,"isoWeek",u)),p=+e.startOf(p,f?"day":o),e.diff(s,n,o)>1e5*a)throw new Error(n+" and "+s+" are too far apart with stepSize of "+a+" "+o);const b=i.ticks.source==="data"&&this.getDataTimestamps();for(g=p,m=0;g<s;g=+e.add(g,a,o),m++)nc(h,g,b);return(g===s||i.bounds==="ticks"||m===1)&&nc(h,g,b),Object.keys(h).sort($u).map(_=>+_)}getLabelForValue(e){const n=this._adapter,s=this.options.time;return s.tooltipFormat?n.format(e,s.tooltipFormat):n.format(e,s.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,l=this._unit,o=n||i[l];return this._adapter.format(e,o)}_tickFormatFunction(e,n,s,i){const l=this.options,o=l.ticks.callback;if(o)return an(o,[e,n,s],this);const a=l.time.displayFormats,u=this._unit,f=this._majorUnit,h=u&&a[u],p=f&&a[f],g=s[n],m=f&&p&&g&&g.major;return this._adapter.format(e,i||(m?p:h))}generateTickLabels(e){let n,s,i;for(n=0,s=e.length;n<s;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,s=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+s)*n.factor)}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+s*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,s=this.ctx.measureText(e).width,i=Gs(this.isHorizontal()?n.maxRotation:n.minRotation),l=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:s*l+a*o,h:s*o+a*l}}_getLabelCapacity(e){const n=this.options.time,s=n.displayFormats,i=s[n.unit]||s.millisecond,l=this._tickFormatFunction(e,0,sc(this,[e],this._majorUnit),i),o=this._getLabelSize(l),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,s;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,s=i.length;n<s;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,s;if(e.length)return e;const i=this.getLabels();for(n=0,s=i.length;n<s;++n)e.push(ec(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Gd(e.sort($u))}}function no(t,e,n){let s=0,i=t.length-1,l,o,a,u;n?(e>=t[s].pos&&e<=t[i].pos&&({lo:s,hi:i}=Si(t,"pos",e)),{pos:l,time:a}=t[s],{pos:o,time:u}=t[i]):(e>=t[s].time&&e<=t[i].time&&({lo:s,hi:i}=Si(t,"time",e)),{time:l,pos:a}=t[s],{time:o,pos:u}=t[i]);const f=o-l;return f?a+(u-a)*(e-l)/f:a}class nS extends ic{static id="timeseries";static defaults=ic.defaults;constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=no(n,this.min),this._tableRange=no(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:s}=this,i=[],l=[];let o,a,u,f,h;for(o=0,a=e.length;o<a;++o)f=e[o],f>=n&&f<=s&&i.push(f);if(i.length<2)return[{time:n,pos:0},{time:s,pos:1}];for(o=0,a=i.length;o<a;++o)h=i[o+1],u=i[o-1],f=i[o],Math.round((h+u)/2)!==f&&l.push({time:f,pos:o/(a-1)});return l}_generate(){const e=this.min,n=this.max;let s=super.getDataTimestamps();return(!s.includes(e)||!s.length)&&s.splice(0,0,e),(!s.includes(n)||s.length===1)&&s.push(n),s.sort((i,l)=>i-l)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),s=this.getLabelTimestamps();return n.length&&s.length?e=this.normalize(n.concat(s)):e=n.length?n:s,e=this._cache.all=e,e}getDecimalForValue(e){return(no(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,s=this.getDecimalForPixel(e)/n.factor-n.end;return no(this._table,s*this._tableRange+this._minPos,!0)}}const lc=/^on/,Mp=[];Object.keys(globalThis).forEach(t=>{lc.test(t)&&Mp.push(t.replace(lc,""))});function Ho(t){const e=zi,n=[];function s(i){og(e,i)}ls(()=>{const i=t();Mp.forEach(i instanceof Element?l=>n.push(ee(i,l,s)):l=>n.push(i.$on(l,s)))}),Ai(()=>{for(;n.length;)n.pop()()})}function x_(t){let e,n=[t[1]],s={};for(let i=0;i<n.length;i+=1)s=Ss(s,n[i]);return{c(){e=d("canvas"),ng(e,s)},m(i,l){I(i,e,l),t[8](e)},p:Ae,i:Ae,o:Ae,d(i){i&&H(e),t[8](null)}}}function O_(t){let{data:e,type:n,options:s,plugins:i,children:l,$$scope:o,$$slots:a,...u}=t;return u}function R_(t,e,n){let{type:s}=e,{data:i={datasets:[]}}=e,{options:l={}}=e,{plugins:o=[]}=e,{updateMode:a=void 0}=e,{chart:u=null}=e,f,h=O_(e);ls(()=>{n(2,u=new pi(f,{type:s,data:i,options:l,plugins:o}))}),lg(()=>{u&&(n(2,u.data=i,u),Object.assign(u.options,l),u.update(a))}),Ai(()=>{u&&u.destroy(),n(2,u=null)}),Ho(()=>f);function p(g){wn[g?"unshift":"push"](()=>{f=g,n(0,f)})}return t.$$set=g=>{n(9,e=Ss(Ss({},e),ci(g))),"type"in g&&n(3,s=g.type),"data"in g&&n(4,i=g.data),"options"in g&&n(5,l=g.options),"plugins"in g&&n(6,o=g.plugins),"updateMode"in g&&n(7,a=g.updateMode),"chart"in g&&n(2,u=g.chart)},e=ci(e),[f,h,u,s,i,l,o,a,p]}class fa extends Gt{constructor(e){super(),qt(this,e,R_,x_,Nt,{type:3,data:4,options:5,plugins:6,updateMode:7,chart:2})}}function D_(t){let e,n,s;const i=[{type:"line"},t[1]];function l(a){t[4](a)}let o={};for(let a=0;a<i.length;a+=1)o=Ss(o,i[a]);return t[0]!==void 0&&(o.chart=t[0]),e=new fa({props:o}),t[3](e),wn.push(()=>Yn(e,"chart",l)),{c(){_t(e.$$.fragment)},m(a,u){pt(e,a,u),s=!0},p(a,[u]){const f=u&2?jr(i,[i[0],zr(a[1])]):{};!n&&u&1&&(n=!0,f.chart=a[0],Xn(()=>n=!1)),e.$set(f)},i(a){s||(ze(e.$$.fragment,a),s=!0)},o(a){Ue(e.$$.fragment,a),s=!1},d(a){t[3](null),gt(e,a)}}}function L_(t,e,n){pi.register(Pb);let{chart:s=null}=e,i,l;Ho(()=>l);function o(u){wn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function a(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,a]}class H_ extends Gt{constructor(e){super(),qt(this,e,L_,D_,Nt,{chart:0})}}function I_(t){let e,n,s;const i=[{type:"doughnut"},t[1]];function l(a){t[4](a)}let o={};for(let a=0;a<i.length;a+=1)o=Ss(o,i[a]);return t[0]!==void 0&&(o.chart=t[0]),e=new fa({props:o}),t[3](e),wn.push(()=>Yn(e,"chart",l)),{c(){_t(e.$$.fragment)},m(a,u){pt(e,a,u),s=!0},p(a,[u]){const f=u&2?jr(i,[i[0],zr(a[1])]):{};!n&&u&1&&(n=!0,f.chart=a[0],Xn(()=>n=!1)),e.$set(f)},i(a){s||(ze(e.$$.fragment,a),s=!0)},o(a){Ue(e.$$.fragment,a),s=!1},d(a){t[3](null),gt(e,a)}}}function B_(t,e,n){pi.register(Cb);let{chart:s=null}=e,i,l;Ho(()=>l);function o(u){wn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function a(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,a]}class F_ extends Gt{constructor(e){super(),qt(this,e,B_,I_,Nt,{chart:0})}}function N_(t){let e,n,s;const i=[{type:"bar"},t[1]];function l(a){t[4](a)}let o={};for(let a=0;a<i.length;a+=1)o=Ss(o,i[a]);return t[0]!==void 0&&(o.chart=t[0]),e=new fa({props:o}),t[3](e),wn.push(()=>Yn(e,"chart",l)),{c(){_t(e.$$.fragment)},m(a,u){pt(e,a,u),s=!0},p(a,[u]){const f=u&2?jr(i,[i[0],zr(a[1])]):{};!n&&u&1&&(n=!0,f.chart=a[0],Xn(()=>n=!1)),e.$set(f)},i(a){s||(ze(e.$$.fragment,a),s=!0)},o(a){Ue(e.$$.fragment,a),s=!1},d(a){t[3](null),gt(e,a)}}}function j_(t,e,n){pi.register(Tb);let{chart:s=null}=e,i,l;Ho(()=>l);function o(u){wn[u?"unshift":"push"](()=>{l=u,n(2,l)})}function a(u){s=u,n(0,s)}return t.$$set=u=>{n(5,e=Ss(Ss({},e),ci(u))),"chart"in u&&n(0,s=u.chart)},t.$$.update=()=>{n(1,i=e)},e=ci(e),[s,i,l,o,a]}class z_ extends Gt{constructor(e){super(),qt(this,e,j_,N_,Nt,{chart:0})}}const oc=typeof window<"u";function U_(){const{subscribe:t,set:e}=Ns({textColor:"rgba(255, 255, 255, 0.9)",gridColor:"rgba(255, 255, 255, 0.1)"});let n=null,s=null,i=!1;function l(){if(!oc)return;const u=document.createElement("div");u.className="text-base-content",u.style.position="absolute",u.style.visibility="hidden",document.body.appendChild(u);const f=getComputedStyle(u).color;document.body.removeChild(u);const h=f.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*[\\d.]+)?\\)/);if(h){const p=parseInt(h[1]),g=parseInt(h[2]),m=parseInt(h[3]),_=(p*299+g*587+m*114)/1e3<128?.2:.15,y=\`rgba(\${p}, \${g}, \${m}, \${_})\`;e({textColor:f,gridColor:y})}else e({textColor:"rgba(100, 100, 100, 0.9)",gridColor:"rgba(100, 100, 100, 0.2)"})}function o(){if(!oc||i)return;i=!0,l(),n=new MutationObserver(()=>{l()}),n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]}),s=window.matchMedia("(prefers-color-scheme: dark)");const u=()=>l();s.addEventListener("change",u),typeof window<"u"&&window.addEventListener("beforeunload",()=>{a()})}function a(){n&&(n.disconnect(),n=null),s&&(s.removeEventListener("change",l),s=null),i=!1}return{subscribe:t,init:o,cleanup:a}}const Cs=U_();js(Cs,t=>t.textColor);js(Cs,t=>t.gridColor);function ha(t,e,n=!0){return{display:n&&!!t,text:t,color:e,font:{size:16,weight:"bold"}}}function V_(t,e={}){const{position:n="top",display:s=!0,padding:i=15,fontSize:l=11}=e;return{display:s,position:n,labels:{padding:i,font:{size:l},color:t}}}function To(t,e,n={}){const{stacked:s=!1,beginAtZero:i=!0,fontSize:l=11,maxRotation:o,minRotation:a,title:u}=n,f={stacked:s,beginAtZero:i,ticks:{font:{size:l},color:t},grid:{color:e}};return u&&(f.title={display:u.display,text:u.text,color:t}),o!==void 0&&(f.ticks.maxRotation=o),a!==void 0&&(f.ticks.minRotation=a),f}function Cp(t="index",e=!1){return{mode:t,intersect:e}}const fo=new Map,vl=new Map;function Pp(t){return fo.has(t)||fo.set(t,Ns({activeIndex:null})),fo.get(t)}function W_(t,e){vl.has(t)||vl.set(t,new Set),vl.get(t).add(e)}function q_(t,e){const n=vl.get(t);n&&(n.delete(e),n.size===0&&(vl.delete(t),fo.delete(t)))}function rc(t,e,n){Pp(t).set({activeIndex:e,sourceChartId:n})}function G_(t){let e=null,n=!1;return{id:\`chartSync-\${t}-\${Math.random().toString(36).substring(2,11)}\`,afterInit(i){W_(t,i),e=Pp(t).subscribe(o=>{n||(o.activeIndex!==null&&o.sourceChartId!==i.id?X_(i,o.activeIndex):o.activeIndex===null&&Y_(i))})},afterEvent(i,l){const o=l.event;if(o.type==="mousemove"){const a=i.getElementsAtEventForMode(o,"index",{axis:"x",intersect:!1},!1);if(a.length>0){const u=a[0].index;rc(t,u,i.id),l.changed=!0}}else o.type==="mouseout"&&(rc(t,null,i.id),l.changed=!0)},destroy(i){n=!0,e&&(e(),e=null),q_(t,i)}}}function X_(t,e){try{if(!t||!t.ctx||!t.tooltip||!t.data.datasets||t.data.datasets.length===0)return;const n=[];for(let s=0;s<t.data.datasets.length;s++){const i=t.data.datasets[s];if(!i.data||e<0||e>=i.data.length)continue;const l=t.getDatasetMeta(s);!l||!l.controller||!l.data||!l.data[e]||n.push({datasetIndex:s,index:e})}if(n.length===0)return;t.tooltip.setActiveElements(n,{x:0,y:0}),t.update("none")}catch(n){console.debug("Chart sync: tooltip update failed (chart may be destroying)",n)}}function Y_(t){try{if(!t||!t.ctx||!t.tooltip)return;t.tooltip.setActiveElements([],{x:0,y:0}),t.update("none")}catch(e){console.debug("Chart sync: tooltip hide failed (chart may be destroying)",e)}}function J_(t){let e,n,s;return n=new H_({props:{data:t[2],options:t[1],plugins:t[0]}}),{c(){e=d("div"),_t(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){I(i,e,l),pt(n,e,null),s=!0},p(i,[l]){const o={};l&4&&(o.data=i[2]),l&2&&(o.options=i[1]),l&1&&(o.plugins=i[0]),n.$set(o)},i(i){s||(ze(n.$$.fragment,i),s=!0)},o(i){Ue(n.$$.fragment,i),s=!1},d(i){i&&H(e),gt(n)}}}function K_(t,e,n){let s,i,l,o;Zt(t,Cs,g=>n(8,o=g)),pi.register(Ep,Tp,t_,e_,p_,ca,ua);let{title:a}=e,{labels:u}=e,{datasets:f}=e,{yAxisLabel:h=""}=e,{syncGroup:p=void 0}=e;return ls(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=g=>{"title"in g&&n(3,a=g.title),"labels"in g&&n(4,u=g.labels),"datasets"in g&&n(5,f=g.datasets),"yAxisLabel"in g&&n(6,h=g.yAxisLabel),"syncGroup"in g&&n(7,p=g.syncGroup)},t.$$.update=()=>{t.$$.dirty&48&&n(2,s={labels:u,datasets:f.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&&n(1,i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:f.length>1,position:"top",labels:{color:o.textColor}},title:ha(a,o.textColor,!0),tooltip:Cp("index",!1)},scales:{y:To(o.textColor,o.gridColor,{beginAtZero:!0,title:h?{display:!0,text:h}:void 0}),x:{...To(o.textColor,o.gridColor),ticks:{maxRotation:45,minRotation:0,autoSkip:!0,maxTicksLimit:10,color:o.textColor}}},interaction:{mode:"index",axis:"x",intersect:!1}}),t.$$.dirty&128&&n(0,l=p?[G_(p)]:[])},[l,i,s,a,u,f,h,p,o]}class so extends Gt{constructor(e){super(),qt(this,e,K_,J_,Nt,{title:3,labels:4,datasets:5,yAxisLabel:6,syncGroup:7})}}function Z_(t){let e,n,s;return n=new F_({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),_t(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){I(i,e,l),pt(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(ze(n.$$.fragment,i),s=!0)},o(i){Ue(n.$$.fragment,i),s=!1},d(i){i&&H(e),gt(n)}}}function Q_(t,e,n){let s,i,l;Zt(t,Cs,u=>n(4,l=u)),pi.register(W2,ca,ua);let{data:o=[]}=e,{title:a=""}=e;return ls(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,a=u.title)},t.$$.update=()=>{t.$$.dirty&20&&n(1,s={labels:o.map(u=>u.label),datasets:[{data:o.map(u=>u.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:l.gridColor,borderWidth:1}]}),t.$$.dirty&28&&n(0,i={responsive:!0,maintainAspectRatio:!1,plugins:{title:ha(a,l.textColor),legend:{position:"right",labels:{padding:10,font:{size:11},color:l.textColor,generateLabels:u=>{const h=u.data.datasets[0].backgroundColor,p=u.getDatasetMeta(0);return u.data.labels?.map((g,m)=>{const b=p.data[m],_=b&&typeof b.hidden<"u"?b.hidden:!1;return{text:\`\${g} (\${o[m]?.percentage||0}%)\`,fillStyle:h[m],strokeStyle:h[m],fontColor:l.textColor,hidden:_,index:m,datasetIndex:0}})||[]}},onClick:(u,f,h)=>{const p=f.index,g=h.chart,m=g.getDatasetMeta(0);m.data[p].hidden=!m.data[p].hidden,g.update()}},tooltip:{callbacks:{label:u=>{const f=u.label||"",h=u.parsed||0,p=o[u.dataIndex]?.percentage||0;return\`\${f}: \${h} (\${p}%)\`}}}}})},[i,s,o,a,l]}class Ap extends Gt{constructor(e){super(),qt(this,e,Q_,Z_,Nt,{data:2,title:3})}}function $_(t){let e,n,s;return n=new z_({props:{data:t[1],options:t[0]}}),{c(){e=d("div"),_t(n.$$.fragment),c(e,"class","w-full h-full")},m(i,l){I(i,e,l),pt(n,e,null),s=!0},p(i,[l]){const o={};l&2&&(o.data=i[1]),l&1&&(o.options=i[0]),n.$set(o)},i(i){s||(ze(n.$$.fragment,i),s=!0)},o(i){Ue(n.$$.fragment,i),s=!1},d(i){i&&H(e),gt(n)}}}function ev(t,e,n){let s,i,l;Zt(t,Cs,u=>n(4,l=u)),pi.register(r_,Ep,Tp,ca,ua);let{data:o=[]}=e,{title:a=""}=e;return ls(()=>{Cs.init()}),Ai(()=>{Cs.cleanup()}),t.$$set=u=>{"data"in u&&n(2,o=u.data),"title"in u&&n(3,a=u.title)},t.$$.update=()=>{t.$$.dirty&4&&n(1,s={labels:o.map(u=>u.label),datasets:[{label:"2xx",data:o.map(u=>u.status2xx),backgroundColor:"rgba(16, 185, 129, 0.8)",borderColor:"rgba(16, 185, 129, 1)",borderWidth:1},{label:"3xx",data:o.map(u=>u.status3xx),backgroundColor:"rgba(59, 130, 246, 0.8)",borderColor:"rgba(59, 130, 246, 1)",borderWidth:1},{label:"4xx",data:o.map(u=>u.status4xx),backgroundColor:"rgba(245, 158, 11, 0.8)",borderColor:"rgba(245, 158, 11, 1)",borderWidth:1},{label:"5xx",data:o.map(u=>u.status5xx),backgroundColor:"rgba(239, 68, 68, 0.8)",borderColor:"rgba(239, 68, 68, 1)",borderWidth:1}]}),t.$$.dirty&24&&n(0,i={responsive:!0,maintainAspectRatio:!1,scales:{x:To(l.textColor,l.gridColor,{stacked:!0,fontSize:10,maxRotation:45,minRotation:45}),y:To(l.textColor,l.gridColor,{stacked:!0,beginAtZero:!0,fontSize:11})},plugins:{title:ha(a,l.textColor),legend:V_(l.textColor,{position:"top",padding:15,fontSize:11}),tooltip:Cp("index",!1)}})},[i,s,o,a,l]}class tv extends Gt{constructor(e){super(),qt(this,e,ev,$_,Nt,{data:2,title:3})}}function nv(t){let e,n,s,i,l,o=t[11]("monitoring.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("monitoring.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function sv(t){let e,n,s,i,l=t[11]("monitoring.charts.requestsTrend")+"",o,a,u,f,h,p,g,m,b=t[11]("monitoring.charts.responseTimeTrend")+"",_,y,k,w,S,P,M,x,A=t[11]("monitoring.charts.successRateTrend")+"",O,C,R,L,D,z,B,U,F=t[11]("monitoring.charts.errorsTrend")+"",V,Y,j,q,Q,X,re,K,W,G,J,le,se,N,te,Z,oe=t[11]("dashboard.upstreamFailures")+"",Se,me,Ee,ye,ge,be,He,Te,Pe,_e=t[11]("dashboard.upstreamStatusCodes")+"",De,ke,$,ae,ue,de;f=new so({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"}}),w=new so({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"}}),L=new so({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"}}),q=new so({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 fe=[rv,ov],Be=[];function Qe(he,Re){return he[5].length>0?0:1}J=Qe(t),le=Be[J]=fe[J](t);const We=[uv,av],Ye=[];function nt(he,Re){return he[4].length>0?0:1}ye=nt(t),ge=Ye[ye]=We[ye](t);const Je=[fv,cv],rt=[];function lt(he,Re){return he[3].length>0?0:1}return ae=lt(t),ue=rt[ae]=Je[ae](t),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),a=v(),u=d("div"),_t(f.$$.fragment),h=v(),p=d("div"),g=d("div"),m=d("h3"),_=E(b),y=v(),k=d("div"),_t(w.$$.fragment),S=v(),P=d("div"),M=d("div"),x=d("h3"),O=E(A),C=v(),R=d("div"),_t(L.$$.fragment),D=v(),z=d("div"),B=d("div"),U=d("h3"),V=E(F),Y=v(),j=d("div"),_t(q.$$.fragment),Q=v(),X=d("div"),re=d("div"),K=d("h3"),K.textContent="\u4E0A\u6E38\u6210\u529F\u7EDF\u8BA1",W=v(),G=d("div"),le.c(),se=v(),N=d("div"),te=d("div"),Z=d("h3"),Se=E(oe),me=v(),Ee=d("div"),ge.c(),be=v(),He=d("div"),Te=d("div"),Pe=d("h3"),De=E(_e),ke=v(),$=d("div"),ue.c(),c(i,"class","text-base font-semibold mb-3"),c(u,"class","h-64"),c(s,"class","card-body p-4"),c(n,"class","card bg-base-100 shadow-xl"),c(m,"class","text-base font-semibold mb-3"),c(k,"class","h-64"),c(g,"class","card-body p-4"),c(p,"class","card bg-base-100 shadow-xl"),c(x,"class","text-base font-semibold mb-3"),c(R,"class","h-64"),c(M,"class","card-body p-4"),c(P,"class","card bg-base-100 shadow-xl"),c(U,"class","text-base font-semibold mb-3"),c(j,"class","h-64"),c(B,"class","card-body p-4"),c(z,"class","card bg-base-100 shadow-xl"),c(K,"class","text-base font-semibold mb-3"),c(G,"class","h-64"),c(re,"class","card-body p-4"),c(X,"class","card bg-base-100 shadow-xl"),c(Z,"class","text-base font-semibold mb-3"),c(Ee,"class","h-64"),c(te,"class","card-body p-4"),c(N,"class","card bg-base-100 shadow-xl"),c(Pe,"class","text-base font-semibold mb-3"),c($,"class","h-64"),c(Te,"class","card-body p-4"),c(He,"class","card bg-base-100 shadow-xl lg:col-span-2"),c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-6")},m(he,Re){I(he,e,Re),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),pt(f,u,null),r(e,h),r(e,p),r(p,g),r(g,m),r(m,_),r(g,y),r(g,k),pt(w,k,null),r(e,S),r(e,P),r(P,M),r(M,x),r(x,O),r(M,C),r(M,R),pt(L,R,null),r(e,D),r(e,z),r(z,B),r(B,U),r(U,V),r(B,Y),r(B,j),pt(q,j,null),r(e,Q),r(e,X),r(X,re),r(re,K),r(re,W),r(re,G),Be[J].m(G,null),r(e,se),r(e,N),r(N,te),r(te,Z),r(Z,Se),r(te,me),r(te,Ee),Ye[ye].m(Ee,null),r(e,be),r(e,He),r(He,Te),r(Te,Pe),r(Pe,De),r(Te,ke),r(Te,$),rt[ae].m($,null),de=!0},p(he,Re){(!de||Re&2048)&&l!==(l=he[11]("monitoring.charts.requestsTrend")+"")&&T(o,l);const Le={};Re&1024&&(Le.labels=he[10]),Re&2560&&(Le.datasets=[{label:he[11]("monitoring.charts.periodRequests"),data:he[9],borderColor:"rgb(59, 130, 246)",backgroundColor:"rgba(59, 130, 246, 0.1)"}]),Re&2048&&(Le.yAxisLabel=he[11]("monitoring.charts.requests")),f.$set(Le),(!de||Re&2048)&&b!==(b=he[11]("monitoring.charts.responseTimeTrend")+"")&&T(_,b);const ot={};Re&1024&&(ot.labels=he[10]),Re&2176&&(ot.datasets=[{label:he[11]("monitoring.charts.avgResponseTime"),data:he[7],borderColor:"rgb(34, 197, 94)",backgroundColor:"rgba(34, 197, 94, 0.1)"}]),Re&2048&&(ot.yAxisLabel=he[11]("monitoring.charts.milliseconds")),w.$set(ot),(!de||Re&2048)&&A!==(A=he[11]("monitoring.charts.successRateTrend")+"")&&T(O,A);const Ge={};Re&1024&&(Ge.labels=he[10]),Re&2112&&(Ge.datasets=[{label:he[11]("monitoring.charts.successRate"),data:he[6],borderColor:"rgb(16, 185, 129)",backgroundColor:"rgba(16, 185, 129, 0.1)"}]),Re&2048&&(Ge.yAxisLabel=he[11]("monitoring.charts.percentage")),L.$set(Ge),(!de||Re&2048)&&F!==(F=he[11]("monitoring.charts.errorsTrend")+"")&&T(V,F);const Ie={};Re&1024&&(Ie.labels=he[10]),Re&2304&&(Ie.datasets=[{label:he[11]("monitoring.charts.periodErrors"),data:he[8],borderColor:"rgb(239, 68, 68)",backgroundColor:"rgba(239, 68, 68, 0.1)"}]),Re&2048&&(Ie.yAxisLabel=he[11]("monitoring.charts.errors")),q.$set(Ie);let Ve=J;J=Qe(he),J===Ve?Be[J].p(he,Re):(ms(),Ue(Be[Ve],1,1,()=>{Be[Ve]=null}),bs(),le=Be[J],le?le.p(he,Re):(le=Be[J]=fe[J](he),le.c()),ze(le,1),le.m(G,null)),(!de||Re&2048)&&oe!==(oe=he[11]("dashboard.upstreamFailures")+"")&&T(Se,oe);let we=ye;ye=nt(he),ye===we?Ye[ye].p(he,Re):(ms(),Ue(Ye[we],1,1,()=>{Ye[we]=null}),bs(),ge=Ye[ye],ge?ge.p(he,Re):(ge=Ye[ye]=We[ye](he),ge.c()),ze(ge,1),ge.m(Ee,null)),(!de||Re&2048)&&_e!==(_e=he[11]("dashboard.upstreamStatusCodes")+"")&&T(De,_e);let Ke=ae;ae=lt(he),ae===Ke?rt[ae].p(he,Re):(ms(),Ue(rt[Ke],1,1,()=>{rt[Ke]=null}),bs(),ue=rt[ae],ue?ue.p(he,Re):(ue=rt[ae]=Je[ae](he),ue.c()),ze(ue,1),ue.m($,null))},i(he){de||(ze(f.$$.fragment,he),ze(w.$$.fragment,he),ze(L.$$.fragment,he),ze(q.$$.fragment,he),ze(le),ze(ge),ze(ue),de=!0)},o(he){Ue(f.$$.fragment,he),Ue(w.$$.fragment,he),Ue(L.$$.fragment,he),Ue(q.$$.fragment,he),Ue(le),Ue(ge),Ue(ue),de=!1},d(he){he&&H(e),gt(f),gt(w),gt(L),gt(q),Be[J].d(),Ye[ye].d(),rt[ae].d()}}}function iv(t){let e,n,s,i,l,o=t[11]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[1]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p&2048&&o!==(o=h[11]("common.error")+"")&&T(a,o),p&2&&T(f,h[1])},i:Ae,o:Ae,d(h){h&&H(e)}}}function lv(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function ov(t){let e,n,s,i,l,o=t[11]("dashboard.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","1.5"),c(s,"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"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-12 w-12"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(l,"class","text-sm"),c(e,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("dashboard.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function rv(t){let e,n;return e=new Ap({props:{data:t[5]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&32&&(l.data=s[5]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function av(t){let e,n,s,i,l,o=t[11]("dashboard.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","1.5"),c(s,"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"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-12 w-12"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(l,"class","text-sm"),c(e,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("dashboard.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function uv(t){let e,n;return e=new Ap({props:{data:t[4]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&16&&(l.data=s[4]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function cv(t){let e,n,s,i,l,o=t[11]("dashboard.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","1.5"),c(s,"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"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-12 w-12"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(l,"class","text-sm"),c(e,"class","flex flex-col items-center justify-center h-full gap-3 opacity-60")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f&2048&&o!==(o=u[11]("dashboard.noData")+"")&&T(a,o)},i:Ae,o:Ae,d(u){u&&H(e)}}}function fv(t){let e,n;return e=new tv({props:{data:t[3]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&8&&(l.data=s[3]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function hv(t){let e,n,s,i=t[11]("monitoring.title")+"",l,o,a,u,f;const h=[lv,iv,sv,nv],p=[];function g(m,b){return m[2]&&!m[0]?0:m[1]?1:m[0]&&m[0].timestamps.length>0?2:3}return a=g(t),u=p[a]=h[a](t),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=v(),u.c(),c(s,"class","text-2xl font-bold"),c(e,"class","space-y-6")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(s,l),r(e,o),p[a].m(e,null),f=!0},p(m,[b]){(!f||b&2048)&&i!==(i=m[11]("monitoring.title")+"")&&T(l,i);let _=a;a=g(m),a===_?p[a].p(m,b):(ms(),Ue(p[_],1,1,()=>{p[_]=null}),bs(),u=p[a],u?u.p(m,b):(u=p[a]=h[a](m),u.c()),ze(u,1),u.m(e,null))},i(m){f||(ze(u),f=!0)},o(m){Ue(u),f=!1},d(m){m&&H(e),p[a].d()}}}function dv(t,e,n){let s,i,l,o,a,u,f,h,p;Zt(t,xt,O=>n(11,p=O));let{selectedRange:g="1h"}=e,{onDataLoaded:m=()=>{}}=e,b=null,_=!0,y=null,k,w=[],S=[],P=[];async function M(){try{n(2,_=!0),n(0,b=await lm(g)),n(1,y=null)}catch(O){n(1,y=O.message)}finally{n(2,_=!1)}}async function x(){try{const[O,C,R]=await Promise.all([Wa(g,"success"),Wa(g,"failure"),om(g)]);n(14,w=O.data),n(15,S=C.data),n(16,P=R.data)}catch(O){console.error("Failed to load upstream stats:",O)}finally{}}async function A(){await Promise.all([M(),x()])}return ls(()=>{A(),k=setInterval(A,3e4)}),Ai(()=>{k&&clearInterval(k)}),t.$$set=O=>{"selectedRange"in O&&n(12,g=O.selectedRange),"onDataLoaded"in O&&n(13,m=O.onDataLoaded)},t.$$.update=()=>{t.$$.dirty&4096&&g&&A(),t.$$.dirty&8195&&(b!==null||y!==null)&&m(y?null:b),t.$$.dirty&4097&&n(10,s=b?.timestamps.map(O=>{const C=new Date(O);switch(g){case"1h":return C.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});case"12h":return C.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});case"24h":return C.toLocaleString("zh-CN",{month:"short",day:"numeric",hour:"2-digit"});default:return C.toLocaleTimeString("zh-CN")}})||[]),t.$$.dirty&1&&n(9,i=b?.requests||[]),t.$$.dirty&1&&n(8,l=b?.errors||[]),t.$$.dirty&1&&n(7,o=b?.responseTime||[]),t.$$.dirty&1&&n(6,a=b?.successRate||[]),t.$$.dirty&16384&&n(5,u=w.map(O=>({label:new URL(O.upstream).host,value:O.count,percentage:O.percentage}))),t.$$.dirty&32768&&n(4,f=S.filter(O=>O.failedRequests>0).sort((O,C)=>C.failedRequests-O.failedRequests).map(O=>({label:new URL(O.upstream).host,value:O.failedRequests,percentage:O.percentage}))),t.$$.dirty&65536&&n(3,h=P.map(O=>({label:new URL(O.upstream).host,status2xx:O.status2xx,status3xx:O.status3xx,status4xx:O.status4xx,status5xx:O.status5xx})))},[b,y,_,h,f,u,a,o,l,i,s,p,g,m,w,S,P]}class pv extends Gt{constructor(e){super(),qt(this,e,dv,hv,Nt,{selectedRange:12,onDataLoaded:13})}}function gv(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,a,u,f,h,p,g,m=t[2]("dashboard.requestsPerSecond")+"",b,_,y,k,w,S,P,M=t[2]("dashboard.successRate")+"",x,A,O,C,R,L,D,z=t[2]("dashboard.avgResponseTime")+"",B,U,F;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),a=v(),u=d("p"),u.textContent="-",f=v(),h=d("div"),p=d("div"),g=d("h2"),b=E(m),_=v(),y=d("p"),y.textContent="-",k=v(),w=d("div"),S=d("div"),P=d("h2"),x=E(M),A=v(),O=d("p"),O.textContent="-",C=v(),R=d("div"),L=d("div"),D=d("h2"),B=E(z),U=v(),F=d("p"),F.textContent="-",c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(g,"class","card-title text-sm"),c(y,"class","text-3xl font-bold"),c(p,"class","card-body"),c(h,"class","card bg-base-100 shadow-xl"),c(P,"class","card-title text-sm"),c(O,"class","text-3xl font-bold"),c(S,"class","card-body"),c(w,"class","card bg-base-100 shadow-xl"),c(D,"class","card-title text-sm"),c(F,"class","text-3xl font-bold"),c(L,"class","card-body"),c(R,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(V,Y){I(V,e,Y),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(e,f),r(e,h),r(h,p),r(p,g),r(g,b),r(p,_),r(p,y),r(e,k),r(e,w),r(w,S),r(S,P),r(P,x),r(S,A),r(S,O),r(e,C),r(e,R),r(R,L),r(L,D),r(D,B),r(L,U),r(L,F)},p(V,Y){Y&4&&l!==(l=V[2]("dashboard.totalRequests")+"")&&T(o,l),Y&4&&m!==(m=V[2]("dashboard.requestsPerSecond")+"")&&T(b,m),Y&4&&M!==(M=V[2]("dashboard.successRate")+"")&&T(x,M),Y&4&&z!==(z=V[2]("dashboard.avgResponseTime")+"")&&T(B,z)},d(V){V&&H(e)}}}function mv(t){let e,n,s,i,l=t[2]("dashboard.totalRequests")+"",o,a,u,f=t[1].totalRequests+"",h,p,g,m,b,_=t[2]("dashboard.requestsPerSecond")+"",y,k,w,S=t[1].requestsPerSecond.toFixed(2)+"",P,M,x,A,O,C=t[2]("dashboard.successRate")+"",R,L,D,z=t[1].successRate.toFixed(1)+"",B,U,F,V,Y,j,q=t[2]("dashboard.avgResponseTime")+"",Q,X,re,K=t[1].avgResponseTime.toFixed(0)+"",W,G;return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),g=d("div"),m=d("div"),b=d("h2"),y=E(_),k=v(),w=d("p"),P=E(S),M=v(),x=d("div"),A=d("div"),O=d("h2"),R=E(C),L=v(),D=d("p"),B=E(z),U=E("%"),F=v(),V=d("div"),Y=d("div"),j=d("h2"),Q=E(q),X=v(),re=d("p"),W=E(K),G=E("ms"),c(i,"class","card-title text-sm"),c(u,"class","text-3xl font-bold"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-xl"),c(b,"class","card-title text-sm"),c(w,"class","text-3xl font-bold"),c(m,"class","card-body"),c(g,"class","card bg-base-100 shadow-xl"),c(O,"class","card-title text-sm"),c(D,"class","text-3xl font-bold"),c(A,"class","card-body"),c(x,"class","card bg-base-100 shadow-xl"),c(j,"class","card-title text-sm"),c(re,"class","text-3xl font-bold"),c(Y,"class","card-body"),c(V,"class","card bg-base-100 shadow-xl"),c(e,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-8")},m(J,le){I(J,e,le),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(e,p),r(e,g),r(g,m),r(m,b),r(b,y),r(m,k),r(m,w),r(w,P),r(e,M),r(e,x),r(x,A),r(A,O),r(O,R),r(A,L),r(A,D),r(D,B),r(D,U),r(e,F),r(e,V),r(V,Y),r(Y,j),r(j,Q),r(Y,X),r(Y,re),r(re,W),r(re,G)},p(J,le){le&4&&l!==(l=J[2]("dashboard.totalRequests")+"")&&T(o,l),le&2&&f!==(f=J[1].totalRequests+"")&&T(h,f),le&4&&_!==(_=J[2]("dashboard.requestsPerSecond")+"")&&T(y,_),le&2&&S!==(S=J[1].requestsPerSecond.toFixed(2)+"")&&T(P,S),le&4&&C!==(C=J[2]("dashboard.successRate")+"")&&T(R,C),le&2&&z!==(z=J[1].successRate.toFixed(1)+"")&&T(B,z),le&4&&q!==(q=J[2]("dashboard.avgResponseTime")+"")&&T(Q,q),le&2&&K!==(K=J[1].avgResponseTime.toFixed(0)+"")&&T(W,K)},d(J){J&&H(e)}}}function bv(t){let e,n,s=t[2]("dashboard.title")+"",i,l,o,a,u=t[2]("dashboard.dataRange")+"",f,h,p=t[2]("monitoring.range."+t[0])+"",g,m,b,_,y,k,w,S=t[2]("monitoring.range.oneHour")+"",P,M,x,A,O,C,R=t[2]("monitoring.range.twelveHours")+"",L,D,z,B,U,F,V=t[2]("monitoring.range.twentyFourHours")+"",Y,j,q,Q,X,re,K,W;function G(se,N){return se[1]?mv:gv}let J=G(t),le=J(t);return Q=new pv({props:{selectedRange:t[0],onDataLoaded:t[3]}}),re=Fr(t[5][0]),{c(){e=d("div"),n=d("h1"),i=E(s),l=v(),o=d("div"),a=d("p"),f=E(u),h=E(": "),g=E(p),m=v(),b=d("div"),_=d("label"),y=d("input"),k=v(),w=d("span"),P=E(S),M=v(),x=d("label"),A=d("input"),O=v(),C=d("span"),L=E(R),D=v(),z=d("label"),B=d("input"),U=v(),F=d("span"),Y=E(V),j=v(),le.c(),q=v(),_t(Q.$$.fragment),c(n,"class","text-3xl font-bold mb-6"),c(a,"class","text-sm text-gray-500"),c(y,"class","sr-only"),c(y,"type","radio"),c(y,"name","range"),y.__value="1h",ne(y,y.__value),c(w,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(w,"bg-primary",t[0]==="1h"),ie(w,"text-primary-content",t[0]==="1h"),ie(w,"shadow",t[0]==="1h"),ie(w,"text-gray-700",t[0]!=="1h"),ie(w,"dark:text-gray-300",t[0]!=="1h"),ie(w,"hover:text-gray-900",t[0]!=="1h"),ie(w,"dark:hover:text-gray-100",t[0]!=="1h"),c(_,"class","cursor-pointer"),c(A,"class","sr-only"),c(A,"type","radio"),c(A,"name","range"),A.__value="12h",ne(A,A.__value),c(C,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(C,"bg-primary",t[0]==="12h"),ie(C,"text-primary-content",t[0]==="12h"),ie(C,"shadow",t[0]==="12h"),ie(C,"text-gray-700",t[0]!=="12h"),ie(C,"dark:text-gray-300",t[0]!=="12h"),ie(C,"hover:text-gray-900",t[0]!=="12h"),ie(C,"dark:hover:text-gray-100",t[0]!=="12h"),c(x,"class","cursor-pointer"),c(B,"class","sr-only"),c(B,"type","radio"),c(B,"name","range"),B.__value="24h",ne(B,B.__value),c(F,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(F,"bg-primary",t[0]==="24h"),ie(F,"text-primary-content",t[0]==="24h"),ie(F,"shadow",t[0]==="24h"),ie(F,"text-gray-700",t[0]!=="24h"),ie(F,"dark:text-gray-300",t[0]!=="24h"),ie(F,"hover:text-gray-900",t[0]!=="24h"),ie(F,"dark:hover:text-gray-100",t[0]!=="24h"),c(z,"class","cursor-pointer"),c(b,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),c(o,"class","flex justify-between items-center mb-6"),c(e,"class","p-6"),re.p(y,A,B)},m(se,N){I(se,e,N),r(e,n),r(n,i),r(e,l),r(e,o),r(o,a),r(a,f),r(a,h),r(a,g),r(o,m),r(o,b),r(b,_),r(_,y),y.checked=y.__value===t[0],r(_,k),r(_,w),r(w,P),r(b,M),r(b,x),r(x,A),A.checked=A.__value===t[0],r(x,O),r(x,C),r(C,L),r(b,D),r(b,z),r(z,B),B.checked=B.__value===t[0],r(z,U),r(z,F),r(F,Y),r(e,j),le.m(e,null),r(e,q),pt(Q,e,null),X=!0,K||(W=[ee(y,"change",t[4]),ee(A,"change",t[6]),ee(B,"change",t[7])],K=!0)},p(se,[N]){(!X||N&4)&&s!==(s=se[2]("dashboard.title")+"")&&T(i,s),(!X||N&4)&&u!==(u=se[2]("dashboard.dataRange")+"")&&T(f,u),(!X||N&5)&&p!==(p=se[2]("monitoring.range."+se[0])+"")&&T(g,p),N&1&&(y.checked=y.__value===se[0]),(!X||N&4)&&S!==(S=se[2]("monitoring.range.oneHour")+"")&&T(P,S),(!X||N&1)&&ie(w,"bg-primary",se[0]==="1h"),(!X||N&1)&&ie(w,"text-primary-content",se[0]==="1h"),(!X||N&1)&&ie(w,"shadow",se[0]==="1h"),(!X||N&1)&&ie(w,"text-gray-700",se[0]!=="1h"),(!X||N&1)&&ie(w,"dark:text-gray-300",se[0]!=="1h"),(!X||N&1)&&ie(w,"hover:text-gray-900",se[0]!=="1h"),(!X||N&1)&&ie(w,"dark:hover:text-gray-100",se[0]!=="1h"),N&1&&(A.checked=A.__value===se[0]),(!X||N&4)&&R!==(R=se[2]("monitoring.range.twelveHours")+"")&&T(L,R),(!X||N&1)&&ie(C,"bg-primary",se[0]==="12h"),(!X||N&1)&&ie(C,"text-primary-content",se[0]==="12h"),(!X||N&1)&&ie(C,"shadow",se[0]==="12h"),(!X||N&1)&&ie(C,"text-gray-700",se[0]!=="12h"),(!X||N&1)&&ie(C,"dark:text-gray-300",se[0]!=="12h"),(!X||N&1)&&ie(C,"hover:text-gray-900",se[0]!=="12h"),(!X||N&1)&&ie(C,"dark:hover:text-gray-100",se[0]!=="12h"),N&1&&(B.checked=B.__value===se[0]),(!X||N&4)&&V!==(V=se[2]("monitoring.range.twentyFourHours")+"")&&T(Y,V),(!X||N&1)&&ie(F,"bg-primary",se[0]==="24h"),(!X||N&1)&&ie(F,"text-primary-content",se[0]==="24h"),(!X||N&1)&&ie(F,"shadow",se[0]==="24h"),(!X||N&1)&&ie(F,"text-gray-700",se[0]!=="24h"),(!X||N&1)&&ie(F,"dark:text-gray-300",se[0]!=="24h"),(!X||N&1)&&ie(F,"hover:text-gray-900",se[0]!=="24h"),(!X||N&1)&&ie(F,"dark:hover:text-gray-100",se[0]!=="24h"),J===(J=G(se))&&le?le.p(se,N):(le.d(1),le=J(se),le&&(le.c(),le.m(e,q)));const te={};N&1&&(te.selectedRange=se[0]),Q.$set(te)},i(se){X||(ze(Q.$$.fragment,se),X=!0)},o(se){Ue(Q.$$.fragment,se),X=!1},d(se){se&&H(e),le.d(),gt(Q),re.r(),K=!1,ht(W)}}}function _v(t){switch(t){case"1h":return 3600;case"12h":return 43200;case"24h":return 86400;default:return 3600}}function vv(t,e,n){let s;Zt(t,xt,g=>n(2,s=g));let i="1h",l=null;function o(g){n(1,l=a(g))}function a(g){if(!g||g.requests.length===0)return null;const m=g.requests.reduce((S,P)=>S+P,0),b=_v(i),_=m/b,y=g.errors.reduce((S,P)=>S+P,0),k=m>0?(m-y)/m*100:100,w=g.responseTime.length>0?g.responseTime.reduce((S,P)=>S+P,0)/g.responseTime.length:0;return{totalRequests:m,requestsPerSecond:_,successRate:k,avgResponseTime:w}}const u=[[]];function f(){i=this.__value,n(0,i)}function h(){i=this.__value,n(0,i)}function p(){i=this.__value,n(0,i)}return[i,l,s,o,f,u,h,p]}class yv extends Gt{constructor(e){super(),qt(this,e,vv,bv,Nt,{})}}async function wv(){return yn.post("/system/reload",{})}async function kv(){return yn.post("/system/restart",{})}function fl(){const{subscribe:t,update:e}=Ns([]);let n=0;return{subscribe:t,show:(s,i="info",l=3e3)=>{const o=n++,a={id:o,message:s,type:i,duration:l};return e(u=>[...u,a]),l>0&&setTimeout(()=>{e(u=>u.filter(f=>f.id!==o))},l),o},success:(s,i=3e3)=>fl().show(s,"success",i),error:(s,i=4e3)=>fl().show(s,"error",i),warning:(s,i=3500)=>fl().show(s,"warning",i),info:(s,i=3e3)=>fl().show(s,"info",i),remove:s=>{e(i=>i.filter(l=>l.id!==s))},clear:()=>{e(()=>[])}}}const Et=fl();function ac(t,e,n){const s=t.slice();return s[13]=e[n],s[14]=e,s[15]=n,s}function uc(t){let e,n=t[5]("auth.helpText")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l&32&&n!==(n=i[5]("auth.helpText")+"")&&T(s,n)},d(i){i&&H(e)}}}function cc(t){let e,n,s,i,l=t[5]("auth.tokens")+"",o,a,u=t[3].length+"",f,h,p,g,m,b,_,y,k,w,S=t[5]("auth.expressionSupport")+"",P,M,x,A,O,C,R,L,D=t[5]("auth.addToken")+"",z,B,U,F,V,Y,j,q=t[5]("auth.securityNotice")+"",Q,X,re,K=tt(t[3]),W=[];for(let G=0;G<K.length;G+=1)W[G]=fc(ac(t,K,G));return{c(){e=d("div"),n=d("input"),s=v(),i=d("div"),o=E(l),a=E(" ("),f=E(u),h=E(")"),p=v(),g=d("div"),m=d("div"),b=pe("svg"),_=pe("path"),y=v(),k=d("div"),w=d("div"),P=E(S),M=v(),x=d("div"),A=d("code"),A.textContent="{{ env.API_TOKEN }}",O=v();for(let G=0;G<W.length;G+=1)W[G].c();C=v(),R=d("button"),L=E("+ "),z=E(D),B=v(),U=d("div"),F=pe("svg"),V=pe("path"),Y=v(),j=d("div"),Q=E(q),c(n,"type","checkbox"),n.checked=!0,c(i,"class","collapse-title text-sm font-medium"),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(b,"xmlns","http://www.w3.org/2000/svg"),c(b,"fill","none"),c(b,"viewBox","0 0 24 24"),c(b,"class","stroke-current shrink-0 w-4 h-4 opacity-60"),c(A,"class","text-xs bg-base-300 px-1 rounded"),c(x,"class","mt-1"),c(m,"class","text-xs text-base-content/60 bg-base-200 rounded p-3 flex gap-2"),c(R,"type","button"),c(R,"class","btn btn-sm btn-ghost"),c(g,"class","collapse-content space-y-2"),c(e,"class","collapse collapse-arrow bg-base-200 collapse-open"),c(V,"stroke-linecap","round"),c(V,"stroke-linejoin","round"),c(V,"stroke-width","2"),c(V,"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"),c(F,"xmlns","http://www.w3.org/2000/svg"),c(F,"fill","none"),c(F,"viewBox","0 0 24 24"),c(F,"class","stroke-current shrink-0 w-4 h-4"),c(U,"class","alert alert-warning shadow-sm text-xs")},m(G,J){I(G,e,J),r(e,n),r(e,s),r(e,i),r(i,o),r(i,a),r(i,f),r(i,h),r(e,p),r(e,g),r(g,m),r(m,b),r(b,_),r(m,y),r(m,k),r(k,w),r(w,P),r(k,M),r(k,x),r(x,A),r(g,O);for(let le=0;le<W.length;le+=1)W[le]&&W[le].m(g,null);r(g,C),r(g,R),r(R,L),r(R,z),I(G,B,J),I(G,U,J),r(U,F),r(F,V),r(U,Y),r(U,j),r(j,Q),X||(re=ee(R,"click",t[6]),X=!0)},p(G,J){if(J&32&&l!==(l=G[5]("auth.tokens")+"")&&T(o,l),J&8&&u!==(u=G[3].length+"")&&T(f,u),J&32&&S!==(S=G[5]("auth.expressionSupport")+"")&&T(P,S),J&168){K=tt(G[3]);let le;for(le=0;le<K.length;le+=1){const se=ac(G,K,le);W[le]?W[le].p(se,J):(W[le]=fc(se),W[le].c(),W[le].m(g,C))}for(;le<W.length;le+=1)W[le].d(1);W.length=K.length}J&32&&D!==(D=G[5]("auth.addToken")+"")&&T(z,D),J&32&&q!==(q=G[5]("auth.securityNotice")+"")&&T(Q,q)},d(G){G&&(H(e),H(B),H(U)),Tn(W,G),X=!1,re()}}}function fc(t){let e,n,s,i,l,o,a;function u(){t[11].call(n,t[15])}function f(){return t[12](t[15])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("button"),l.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("auth.tokenPlaceholder")),c(n,"class","input input-bordered input-sm flex-1 font-mono text-xs"),c(l,"type","button"),c(l,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(h,p){I(h,e,p),r(e,n),ne(n,t[3][t[15]]),r(e,i),r(e,l),o||(a=[ee(n,"input",u),ee(l,"click",f)],o=!0)},p(h,p){t=h,p&32&&s!==(s=t[5]("auth.tokenPlaceholder"))&&c(n,"placeholder",s),p&8&&n.value!==t[3][t[15]]&&ne(n,t[3][t[15]])},d(h){h&&H(e),o=!1,ht(a)}}}function Sv(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=t[5]("auth.enableAuth")+"",b,_,y,k,w=t[1]&&uc(t),S=t[2]&&cc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),w&&w.c(),o=v(),a=d("div"),u=d("div"),f=d("label"),h=d("input"),p=v(),g=d("span"),b=E(m),_=v(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(P,M){I(P,e,M),r(e,n),r(n,s),r(s,i),r(n,l),w&&w.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(f,h),h.checked=t[2],r(f,p),r(f,g),r(g,b),r(a,_),S&&S.m(a,null),y||(k=[ee(h,"change",t[9]),ee(h,"change",t[10])],y=!0)},p(P,[M]){M&1&&T(i,P[0]),P[1]?w?w.p(P,M):(w=uc(P),w.c(),w.m(n,null)):w&&(w.d(1),w=null),M&4&&(h.checked=P[2]),M&32&&m!==(m=P[5]("auth.enableAuth")+"")&&T(b,m),P[2]?S?S.p(P,M):(S=cc(P),S.c(),S.m(a,null)):S&&(S.d(1),S=null)},i:Ae,o:Ae,d(P){P&&H(e),w&&w.d(),S&&S.d(),y=!1,ht(k)}}}function Ev(t,e,n){let s;Zt(t,xt,y=>n(5,s=y));let{value:i=void 0}=e,{label:l="Authentication"}=e,{showHelp:o=!0}=e,a=!1,u=[],f=!1;function h(){n(3,u=[...u,""]),n(4,f=!0)}function p(y){n(3,u=u.filter((k,w)=>w!==y))}function g(){a=this.checked,n(2,a),n(4,f),n(8,i),n(3,u)}const m=()=>{a&&u.length===0&&n(3,u=[""]),n(4,f=!0)};function b(y){u[y]=this.value,n(3,u),n(4,f),n(8,i),n(2,a)}const _=y=>p(y);return t.$$set=y=>{"value"in y&&n(8,i=y.value),"label"in y&&n(0,l=y.label),"showHelp"in y&&n(1,o=y.showHelp)},t.$$.update=()=>{if(t.$$.dirty&284)if(!f&&i&&(n(2,a=i.enabled||!1),n(3,u=i.tokens?[...i.tokens]:[]),n(4,f=!0)),a){const y=u.filter(k=>k.trim()!=="");i?(n(8,i.enabled=!0,i),n(8,i.tokens=y,i)):n(8,i={enabled:!0,tokens:y})}else i&&(n(8,i.enabled=!1,i),n(8,i.tokens=[],i))},[l,o,a,u,f,s,h,p,i,g,m,b,_]}class xp extends Gt{constructor(e){super(),qt(this,e,Ev,Sv,Nt,{value:8,label:0,showHelp:1})}}async function Tv(t={}){const e=new URLSearchParams;return Object.entries(t).forEach(([n,s])=>{s!=null&&(Array.isArray(s)?s.forEach(i=>e.append(n,String(i))):e.append(n,String(s)))}),yn.get(\`/logs?\${e.toString()}\`)}async function Mv(t={},e="json"){const n=new URLSearchParams;Object.entries(t).forEach(([i,l])=>{l!=null&&n.append(i,String(l))}),n.append("format",e);const s=await fetch(\`/__ui/api/logs/export?\${n.toString()}\`);if(!s.ok)throw new Error("Failed to export logs");return s.blob()}function Cv(t=1e3){return new EventSource(\`/__ui/api/logs/stream?interval=\${t}\`)}async function ar(t){return(await yn.get(\`/logs/body/\${t}\`)).content}async function ur(t){return yn.get(\`/logs/headers/\${t}\`)}async function Pv(){return yn.get("/logs/cleanup/config")}async function Av(){return yn.post("/logs/cleanup")}function hc(t){let e,n;return{c(){e=d("h3"),n=E(t[1]),c(e,"class","text-lg font-semibold")},m(s,i){I(s,e,i),r(e,n)},p(s,i){i&2&&T(n,s[1])},d(s){s&&H(e)}}}function dc(t){let e,n,s,i,l=t[6]("logging.maxSize")+"",o,a,u,f,h,p,g,m,b,_=t[6]("logging.maxSizeHelp")+"",y,k,w,S,P,M=t[6]("logging.retentionDays")+"",x,A,O,C,R,L,D=t[6]("logging.days")+"",z,B,U,F,V=t[6]("logging.retentionDaysHelp")+"",Y,j,q;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),a=v(),u=d("div"),f=d("input"),h=v(),p=d("span"),p.textContent="KB",g=v(),m=d("div"),b=d("span"),y=E(_),k=v(),w=d("div"),S=d("label"),P=d("span"),x=E(M),A=v(),O=d("div"),C=d("input"),R=v(),L=d("span"),z=E(D),B=v(),U=d("div"),F=d("span"),Y=E(V),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","logging-max-size"),c(f,"id","logging-max-size"),c(f,"type","number"),c(f,"class","input input-bordered flex-1"),c(f,"min","1024"),c(f,"max","102400"),c(f,"step","1024"),c(p,"class","text-sm text-gray-500"),c(u,"class","flex gap-2 items-center"),c(b,"class","label-text-alt"),c(m,"class","label"),c(n,"class","form-control"),c(P,"class","label-text"),c(S,"class","label"),c(S,"for","logging-retention-days"),c(C,"id","logging-retention-days"),c(C,"type","number"),c(C,"class","input input-bordered flex-1"),c(C,"min","1"),c(C,"max","30"),c(L,"class","text-sm text-gray-500"),c(O,"class","flex gap-2 items-center"),c(F,"class","label-text-alt"),c(U,"class","label"),c(w,"class","form-control"),c(e,"class","ml-8 space-y-4")},m(Q,X){I(Q,e,X),r(e,n),r(n,s),r(s,i),r(i,o),r(n,a),r(n,u),r(u,f),ne(f,t[0].body.maxSize),r(u,h),r(u,p),r(n,g),r(n,m),r(m,b),r(b,y),r(e,k),r(e,w),r(w,S),r(S,P),r(P,x),r(w,A),r(w,O),r(O,C),ne(C,t[0].body.retentionDays),r(O,R),r(O,L),r(L,z),r(w,B),r(w,U),r(U,F),r(F,Y),j||(q=[ee(f,"input",t[10]),ee(f,"input",t[7]),ee(C,"input",t[11]),ee(C,"input",t[7])],j=!0)},p(Q,X){X&64&&l!==(l=Q[6]("logging.maxSize")+"")&&T(o,l),X&1&&yt(f.value)!==Q[0].body.maxSize&&ne(f,Q[0].body.maxSize),X&64&&_!==(_=Q[6]("logging.maxSizeHelp")+"")&&T(y,_),X&64&&M!==(M=Q[6]("logging.retentionDays")+"")&&T(x,M),X&1&&yt(C.value)!==Q[0].body.retentionDays&&ne(C,Q[0].body.retentionDays),X&64&&D!==(D=Q[6]("logging.days")+"")&&T(z,D),X&64&&V!==(V=Q[6]("logging.retentionDaysHelp")+"")&&T(Y,V)},d(Q){Q&&H(e),j=!1,ht(q)}}}function xv(t){let e,n,s,i=t[6]("logging.cleanupStatus")+"",l,o,a,u=(t[2].isActive?t[6]("logging.active"):t[6]("logging.inactive"))+"",f,h,p,g,m,b=t[6]("logging.cleanupRetention")+"",_,y,k,w=t[2].retentionDays+"",S,P,M=t[6]("logging.days")+"",x,A,O,C,R=t[6]("logging.cleanupInterval")+"",L,D,z,B=t[2].scheduleIntervalHours+"",U,F,V=t[6]("logging.hours")+"",Y,j,q,Q,X=t[6]("logging.manualCleanup")+"",re,K,W,G,J;function le(Z,oe){return Z[4]?Dv:Rv}let se=le(t),N=se(t),te=t[5]&&pc(t);return{c(){e=d("div"),n=d("div"),s=d("span"),l=E(i),o=v(),a=d("span"),f=E(u),p=v(),g=d("div"),m=d("span"),_=E(b),y=v(),k=d("span"),S=E(w),P=v(),x=E(M),A=v(),O=d("div"),C=d("span"),L=E(R),D=v(),z=d("span"),U=E(B),F=v(),Y=E(V),j=v(),q=d("button"),N.c(),Q=v(),re=E(X),K=v(),te&&te.c(),W=Zn(),c(s,"class","text-gray-500"),c(a,"class",h="font-semibold "+(t[2].isActive?"text-success":"text-error")),c(n,"class","flex justify-between text-sm"),c(m,"class","text-gray-500"),c(k,"class","font-semibold"),c(g,"class","flex justify-between text-sm"),c(C,"class","text-gray-500"),c(z,"class","font-semibold"),c(O,"class","flex justify-between text-sm"),c(e,"class","bg-base-200 p-4 rounded-lg space-y-2"),c(q,"class","btn btn-outline btn-sm w-full"),q.disabled=t[4]},m(Z,oe){I(Z,e,oe),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,f),r(e,p),r(e,g),r(g,m),r(m,_),r(g,y),r(g,k),r(k,S),r(k,P),r(k,x),r(e,A),r(e,O),r(O,C),r(C,L),r(O,D),r(O,z),r(z,U),r(z,F),r(z,Y),I(Z,j,oe),I(Z,q,oe),N.m(q,null),r(q,Q),r(q,re),I(Z,K,oe),te&&te.m(Z,oe),I(Z,W,oe),G||(J=ee(q,"click",t[8]),G=!0)},p(Z,oe){oe&64&&i!==(i=Z[6]("logging.cleanupStatus")+"")&&T(l,i),oe&68&&u!==(u=(Z[2].isActive?Z[6]("logging.active"):Z[6]("logging.inactive"))+"")&&T(f,u),oe&4&&h!==(h="font-semibold "+(Z[2].isActive?"text-success":"text-error"))&&c(a,"class",h),oe&64&&b!==(b=Z[6]("logging.cleanupRetention")+"")&&T(_,b),oe&4&&w!==(w=Z[2].retentionDays+"")&&T(S,w),oe&64&&M!==(M=Z[6]("logging.days")+"")&&T(x,M),oe&64&&R!==(R=Z[6]("logging.cleanupInterval")+"")&&T(L,R),oe&4&&B!==(B=Z[2].scheduleIntervalHours+"")&&T(U,B),oe&64&&V!==(V=Z[6]("logging.hours")+"")&&T(Y,V),se!==(se=le(Z))&&(N.d(1),N=se(Z),N&&(N.c(),N.m(q,Q))),oe&64&&X!==(X=Z[6]("logging.manualCleanup")+"")&&T(re,X),oe&16&&(q.disabled=Z[4]),Z[5]?te?te.p(Z,oe):(te=pc(Z),te.c(),te.m(W.parentNode,W)):te&&(te.d(1),te=null)},d(Z){Z&&(H(e),H(j),H(q),H(K),H(W)),N.d(),te&&te.d(Z),G=!1,J()}}}function Ov(t){let e,n,s,i,l=t[6]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u&64&&l!==(l=a[6]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Rv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function Dv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function pc(t){let e,n,s,i,l,o,a=t[6]("logging.lastCleanup")+"",u,f,h,p,g=t[6]("logging.deletedSqliteRecords")+"",m,b,_=t[5].deletedSqliteRecords+"",y,k,w,S=t[6]("logging.deletedFileLogFiles")+"",P,M,x=t[5].deletedFileLogFiles+"",A,O,C,R=t[6]("logging.deletedBodyFiles")+"",L,D,z=t[5].deletedBodyDirs+"",B,U,F=t[6]("logging.dirs")+"",V,Y,j=t[5].deletedBodyFiles+"",q,Q,X=t[6]("logging.files")+"",re,K,W,G=t[6]("logging.duration")+"",J,le,se=t[5].durationMs+"",N,te;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("div"),o=d("div"),u=E(a),f=v(),h=d("div"),p=d("div"),m=E(g),b=E(": "),y=E(_),k=v(),w=d("div"),P=E(S),M=E(": "),A=E(x),O=v(),C=d("div"),L=E(R),D=E(": "),B=E(z),U=v(),V=E(F),Y=E(", "),q=E(j),Q=v(),re=E(X),K=v(),W=d("div"),J=E(G),le=E(": "),N=E(se),te=E("ms"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-semibold"),c(h,"class","mt-1 space-y-1"),c(l,"class","text-sm"),c(e,"class","alert alert-success")},m(Z,oe){I(Z,e,oe),r(e,n),r(n,s),r(e,i),r(e,l),r(l,o),r(o,u),r(l,f),r(l,h),r(h,p),r(p,m),r(p,b),r(p,y),r(h,k),r(h,w),r(w,P),r(w,M),r(w,A),r(h,O),r(h,C),r(C,L),r(C,D),r(C,B),r(C,U),r(C,V),r(C,Y),r(C,q),r(C,Q),r(C,re),r(h,K),r(h,W),r(W,J),r(W,le),r(W,N),r(W,te)},p(Z,oe){oe&64&&a!==(a=Z[6]("logging.lastCleanup")+"")&&T(u,a),oe&64&&g!==(g=Z[6]("logging.deletedSqliteRecords")+"")&&T(m,g),oe&32&&_!==(_=Z[5].deletedSqliteRecords+"")&&T(y,_),oe&64&&S!==(S=Z[6]("logging.deletedFileLogFiles")+"")&&T(P,S),oe&32&&x!==(x=Z[5].deletedFileLogFiles+"")&&T(A,x),oe&64&&R!==(R=Z[6]("logging.deletedBodyFiles")+"")&&T(L,R),oe&32&&z!==(z=Z[5].deletedBodyDirs+"")&&T(B,z),oe&64&&F!==(F=Z[6]("logging.dirs")+"")&&T(V,F),oe&32&&j!==(j=Z[5].deletedBodyFiles+"")&&T(q,j),oe&64&&X!==(X=Z[6]("logging.files")+"")&&T(re,X),oe&64&&G!==(G=Z[6]("logging.duration")+"")&&T(J,G),oe&32&&se!==(se=Z[5].durationMs+"")&&T(N,se)},d(Z){Z&&H(e)}}}function Lv(t){let e,n,s,i,l,o,a,u,f=t[6]("logging.bodyRecording")+"",h,p,g,m=t[6]("logging.bodyRecordingHelp")+"",b,_,y,k,w,S,P=t[6]("logging.cleanupConfig")+"",M,x,A,O,C=t[1]&&hc(t),R=t[0].body.enabled&&dc(t);function L(B,U){if(B[3])return Ov;if(B[2])return xv}let D=L(t),z=D&&D(t);return{c(){e=d("div"),C&&C.c(),n=v(),s=d("div"),i=d("label"),l=d("input"),o=v(),a=d("div"),u=d("span"),h=E(f),p=v(),g=d("p"),b=E(m),_=v(),R&&R.c(),y=v(),k=d("div"),w=v(),S=d("h4"),M=E(P),x=v(),z&&z.c(),c(l,"type","checkbox"),c(l,"class","checkbox"),c(u,"class","label-text font-semibold"),c(g,"class","text-xs text-gray-500 mt-1"),c(a,"class","flex-1"),c(i,"class","label cursor-pointer justify-start gap-4"),c(s,"class","form-control"),c(k,"class","divider"),c(S,"class","font-semibold"),c(e,"class","space-y-4")},m(B,U){I(B,e,U),C&&C.m(e,null),r(e,n),r(e,s),r(s,i),r(i,l),l.checked=t[0].body.enabled,r(i,o),r(i,a),r(a,u),r(u,h),r(a,p),r(a,g),r(g,b),r(e,_),R&&R.m(e,null),r(e,y),r(e,k),r(e,w),r(e,S),r(S,M),r(e,x),z&&z.m(e,null),A||(O=[ee(l,"change",t[9]),ee(l,"change",t[7])],A=!0)},p(B,[U]){B[1]?C?C.p(B,U):(C=hc(B),C.c(),C.m(e,n)):C&&(C.d(1),C=null),U&1&&(l.checked=B[0].body.enabled),U&64&&f!==(f=B[6]("logging.bodyRecording")+"")&&T(h,f),U&64&&m!==(m=B[6]("logging.bodyRecordingHelp")+"")&&T(b,m),B[0].body.enabled?R?R.p(B,U):(R=dc(B),R.c(),R.m(e,y)):R&&(R.d(1),R=null),U&64&&P!==(P=B[6]("logging.cleanupConfig")+"")&&T(M,P),D===(D=L(B))&&z?z.p(B,U):(z&&z.d(1),z=D&&D(B),z&&(z.c(),z.m(e,null)))},i:Ae,o:Ae,d(B){B&&H(e),C&&C.d(),R&&R.d(),z&&z.d(),A=!1,ht(O)}}}function Hv(t,e,n){let s;Zt(t,xt,k=>n(6,s=k));let{value:i=null}=e,{label:l=""}=e;const o=Dl();let a=null,u=!1,f=!1,h=null;function p(){o("input")}async function g(){n(3,u=!0);try{n(2,a=await Pv())}catch(k){console.error("Failed to load cleanup config:",k),Et.show(s("common.error")+": "+(k instanceof Error?k.message:"Unknown error"),"error")}finally{n(3,u=!1)}}async function m(){if(confirm(s("logging.confirmCleanup"))){n(4,f=!0);try{n(5,h=await Av()),Et.show(s("logging.cleanupSuccess"),"success"),await g()}catch(k){console.error("Failed to trigger cleanup:",k),Et.show(s("logging.cleanupFailed",{values:{error:k instanceof Error?k.message:"Unknown error"}}),"error")}finally{n(4,f=!1)}}}ls(()=>{g()});function b(){i.body.enabled=this.checked,n(0,i)}function _(){i.body.maxSize=yt(this.value),n(0,i)}function y(){i.body.retentionDays=yt(this.value),n(0,i)}return t.$$set=k=>{"value"in k&&n(0,i=k.value),"label"in k&&n(1,l=k.label)},t.$$.update=()=>{t.$$.dirty&1&&(i||n(0,i={body:{enabled:!1,maxSize:5120,retentionDays:1}})),t.$$.dirty&1&&i&&!i.body&&n(0,i.body={enabled:!1,maxSize:5120,retentionDays:1},i)},[i,l,a,u,f,h,s,p,m,b,_,y]}class Iv extends Gt{constructor(e){super(),qt(this,e,Hv,Lv,Nt,{value:0,label:1})}}function Bv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function Fv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function Nv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function jv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function zv(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function Uv(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function Vv(t){let e,n,s,i,l,o=t[11]("configuration.formEditor")+"",a,u,f,h,p,g,m=t[11]("configuration.jsonEditor")+"",b,_,y,k,w,S,P,M,x;const A=[Xv,Gv],O=[];function C(R,L){return R[7]==="form"?0:1}return y=C(t),k=O[y]=A[y](t),P=Fr(t[20][0]),{c(){e=d("div"),n=d("label"),s=d("input"),i=v(),l=d("span"),a=E(o),u=v(),f=d("label"),h=d("input"),p=v(),g=d("span"),b=E(m),_=v(),k.c(),w=Zn(),c(s,"class","sr-only"),c(s,"type","radio"),c(s,"name","editMode"),s.__value="form",ne(s,s.__value),c(l,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(l,"bg-primary",t[7]==="form"),ie(l,"text-primary-content",t[7]==="form"),ie(l,"shadow",t[7]==="form"),ie(l,"text-gray-700",t[7]!=="form"),ie(l,"dark:text-gray-300",t[7]!=="form"),ie(l,"hover:text-gray-900",t[7]!=="form"),ie(l,"dark:hover:text-gray-100",t[7]!=="form"),c(n,"class","cursor-pointer"),c(h,"class","sr-only"),c(h,"type","radio"),c(h,"name","editMode"),h.__value="json",ne(h,h.__value),c(g,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(g,"bg-primary",t[7]==="json"),ie(g,"text-primary-content",t[7]==="json"),ie(g,"shadow",t[7]==="json"),ie(g,"text-gray-700",t[7]!=="json"),ie(g,"dark:text-gray-300",t[7]!=="json"),ie(g,"hover:text-gray-900",t[7]!=="json"),ie(g,"dark:hover:text-gray-100",t[7]!=="json"),c(f,"class","cursor-pointer"),c(e,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm mb-4"),P.p(s,h)},m(R,L){I(R,e,L),r(e,n),r(n,s),s.checked=s.__value===t[7],r(n,i),r(n,l),r(l,a),r(e,u),r(e,f),r(f,h),h.checked=h.__value===t[7],r(f,p),r(f,g),r(g,b),I(R,_,L),O[y].m(R,L),I(R,w,L),S=!0,M||(x=[ee(s,"change",t[19]),ee(h,"change",t[21])],M=!0)},p(R,L){L[0]&128&&(s.checked=s.__value===R[7]),(!S||L[0]&2048)&&o!==(o=R[11]("configuration.formEditor")+"")&&T(a,o),(!S||L[0]&128)&&ie(l,"bg-primary",R[7]==="form"),(!S||L[0]&128)&&ie(l,"text-primary-content",R[7]==="form"),(!S||L[0]&128)&&ie(l,"shadow",R[7]==="form"),(!S||L[0]&128)&&ie(l,"text-gray-700",R[7]!=="form"),(!S||L[0]&128)&&ie(l,"dark:text-gray-300",R[7]!=="form"),(!S||L[0]&128)&&ie(l,"hover:text-gray-900",R[7]!=="form"),(!S||L[0]&128)&&ie(l,"dark:hover:text-gray-100",R[7]!=="form"),L[0]&128&&(h.checked=h.__value===R[7]),(!S||L[0]&2048)&&m!==(m=R[11]("configuration.jsonEditor")+"")&&T(b,m),(!S||L[0]&128)&&ie(g,"bg-primary",R[7]==="json"),(!S||L[0]&128)&&ie(g,"text-primary-content",R[7]==="json"),(!S||L[0]&128)&&ie(g,"shadow",R[7]==="json"),(!S||L[0]&128)&&ie(g,"text-gray-700",R[7]!=="json"),(!S||L[0]&128)&&ie(g,"dark:text-gray-300",R[7]!=="json"),(!S||L[0]&128)&&ie(g,"hover:text-gray-900",R[7]!=="json"),(!S||L[0]&128)&&ie(g,"dark:hover:text-gray-100",R[7]!=="json");let D=y;y=C(R),y===D?O[y].p(R,L):(ms(),Ue(O[D],1,1,()=>{O[D]=null}),bs(),k=O[y],k?k.p(R,L):(k=O[y]=A[y](R),k.c()),ze(k,1),k.m(w.parentNode,w))},i(R){S||(ze(k),S=!0)},o(R){Ue(k),S=!1},d(R){R&&(H(e),H(_),H(w)),O[y].d(R),P.r(),M=!1,ht(x)}}}function Wv(t){let e,n,s,i,l,o=t[11]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[2]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p[0]&2048&&o!==(o=h[11]("common.error")+"")&&T(a,o),p[0]&4&&T(f,h[2])},i:Ae,o:Ae,d(h){h&&H(e)}}}function qv(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function Gv(t){let e,n,s,i=t[11]("configuration.jsonConfiguration")+"",l,o,a,u,f,h,p,g=t[11]("configuration.jsonHelp")+"",m,b,_,y=t[9]&&gc(t);return{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=v(),y&&y.c(),a=v(),u=d("textarea"),h=v(),p=d("p"),m=E(g),c(s,"class","card-title"),c(u,"class","textarea textarea-bordered font-mono text-sm h-96"),c(u,"placeholder",f=t[11]("configuration.jsonPlaceholder")),c(p,"class","text-sm text-gray-500 mt-2"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl")},m(k,w){I(k,e,w),r(e,n),r(n,s),r(s,l),r(n,o),y&&y.m(n,null),r(n,a),r(n,u),ne(u,t[8]),r(n,h),r(n,p),r(p,m),b||(_=[ee(u,"input",t[28]),ee(u,"input",t[12])],b=!0)},p(k,w){w[0]&2048&&i!==(i=k[11]("configuration.jsonConfiguration")+"")&&T(l,i),k[9]?y?y.p(k,w):(y=gc(k),y.c(),y.m(n,a)):y&&(y.d(1),y=null),w[0]&2048&&f!==(f=k[11]("configuration.jsonPlaceholder"))&&c(u,"placeholder",f),w[0]&256&&ne(u,k[8]),w[0]&2048&&g!==(g=k[11]("configuration.jsonHelp")+"")&&T(m,g)},i:Ae,o:Ae,d(k){k&&H(e),y&&y.d(),b=!1,ht(_)}}}function Xv(t){let e,n,s,i=t[11]("configuration.systemSettings")+"",l,o,a,u,f,h=t[11]("configuration.serverPort")+"",p,g,m,b,_,y,k,w=t[11]("configuration.workerProcesses")+"",S,P,M,x,A,O,C=t[11]("configuration.workerProcessesHelp")+"",R,L,D,z,B,U=t[11]("configuration.logLevel")+"",F,V,Y,j,q,Q,X,re,K,W,G,J=t[11]("configuration.bodyParserLimit")+"",le,se,N,te,Z,oe,Se=t[11]("configuration.bodyParserLimitHelp")+"",me,Ee,ye,ge,be,He,Te,Pe,_e,De,ke,$,ae,ue,de=t[11]("configuration.requiresRestart")+"",fe,Be,Qe,We,Ye,nt=t[11]("logging.title")+"",Je,rt,lt,he,Re,Le,ot,Ge,Ie=t[11]("routes.title")+"",Ve,we,Ke,ve,Xe,Ct,$e,je=t[11]("configuration.routesConfigured",{values:{count:t[1].routes.length}})+"",At,it,mt=t[11]("configuration.manageRoutes")+"",Lt,xe,at,Ne;function st(Fe){t[26](Fe)}let jt={label:t[11]("auth.globalAuth")};t[1].auth!==void 0&&(jt.value=t[1].auth),be=new xp({props:jt}),wn.push(()=>Yn(be,"value",st));function Rn(Fe){t[27](Fe)}let gn={};return t[1].logging!==void 0&&(gn.value=t[1].logging),lt=new Iv({props:gn}),wn.push(()=>Yn(lt,"value",Rn)),{c(){e=d("div"),n=d("div"),s=d("h2"),l=E(i),o=v(),a=d("div"),u=d("label"),f=d("span"),p=E(h),g=v(),m=d("input"),b=v(),_=d("div"),y=d("label"),k=d("span"),S=E(w),P=v(),M=d("input"),x=v(),A=d("div"),O=d("span"),R=E(C),L=v(),D=d("div"),z=d("label"),B=d("span"),F=E(U),V=v(),Y=d("select"),j=d("option"),j.textContent="Debug",q=d("option"),q.textContent="Info",Q=d("option"),Q.textContent="Warning",X=d("option"),X.textContent="Error",re=v(),K=d("div"),W=d("label"),G=d("span"),le=E(J),se=v(),N=d("input"),te=v(),Z=d("div"),oe=d("span"),me=E(Se),Ee=v(),ye=d("div"),ge=v(),_t(be.$$.fragment),Te=v(),Pe=d("div"),_e=v(),De=d("div"),ke=pe("svg"),$=pe("path"),ae=v(),ue=d("span"),fe=E(de),Be=v(),Qe=d("div"),We=d("div"),Ye=d("h2"),Je=E(nt),rt=v(),_t(lt.$$.fragment),Re=v(),Le=d("div"),ot=d("div"),Ge=d("h2"),Ve=E(Ie),we=v(),Ke=d("div"),ve=pe("svg"),Xe=pe("path"),Ct=v(),$e=d("span"),At=E(je),it=v(),Lt=E(mt),c(s,"class","card-title"),c(f,"class","label-text"),c(u,"class","label"),c(u,"for","config-port"),c(m,"id","config-port"),c(m,"type","number"),c(m,"class","input input-bordered"),c(m,"placeholder","8088"),c(a,"class","form-control"),c(k,"class","label-text"),c(y,"class","label"),c(y,"for","config-workers"),c(M,"id","config-workers"),c(M,"type","number"),c(M,"class","input input-bordered"),c(M,"min","1"),c(M,"placeholder","2"),c(O,"class","label-text-alt"),c(A,"class","label"),c(_,"class","form-control"),c(B,"class","label-text"),c(z,"class","label"),c(z,"for","config-log-level"),j.__value="debug",ne(j,j.__value),q.__value="info",ne(q,q.__value),Q.__value="warn",ne(Q,Q.__value),X.__value="error",ne(X,X.__value),c(Y,"id","config-log-level"),c(Y,"class","select select-bordered"),t[1].logLevel===void 0&&vs(()=>t[24].call(Y)),c(D,"class","form-control"),c(G,"class","label-text"),c(W,"class","label"),c(W,"for","config-body-limit"),c(N,"id","config-body-limit"),c(N,"type","text"),c(N,"class","input input-bordered"),c(N,"placeholder","50mb"),c(oe,"class","label-text-alt"),c(Z,"class","label"),c(K,"class","form-control"),c(ye,"class","divider"),c(Pe,"class","divider"),c($,"stroke-linecap","round"),c($,"stroke-linejoin","round"),c($,"stroke-width","2"),c($,"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"),c(ke,"xmlns","http://www.w3.org/2000/svg"),c(ke,"class","stroke-current shrink-0 h-6 w-6"),c(ke,"fill","none"),c(ke,"viewBox","0 0 24 24"),c(De,"class","alert alert-warning"),c(n,"class","card-body"),c(e,"class","card bg-base-100 shadow-xl mb-4"),c(Ye,"class","card-title"),c(We,"class","card-body"),c(Qe,"class","card bg-base-100 shadow-xl mb-4"),c(Ge,"class","card-title"),c(Xe,"stroke-linecap","round"),c(Xe,"stroke-linejoin","round"),c(Xe,"stroke-width","2"),c(Xe,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(ve,"xmlns","http://www.w3.org/2000/svg"),c(ve,"fill","none"),c(ve,"viewBox","0 0 24 24"),c(ve,"class","stroke-current shrink-0 w-6 h-6"),c(Ke,"class","alert alert-info"),c(ot,"class","card-body"),c(Le,"class","card bg-base-100 shadow-xl")},m(Fe,ut){I(Fe,e,ut),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,f),r(f,p),r(a,g),r(a,m),ne(m,t[1].port),r(n,b),r(n,_),r(_,y),r(y,k),r(k,S),r(_,P),r(_,M),ne(M,t[1].workers),r(_,x),r(_,A),r(A,O),r(O,R),r(n,L),r(n,D),r(D,z),r(z,B),r(B,F),r(D,V),r(D,Y),r(Y,j),r(Y,q),r(Y,Q),r(Y,X),Cn(Y,t[1].logLevel,!0),r(n,re),r(n,K),r(K,W),r(W,G),r(G,le),r(K,se),r(K,N),ne(N,t[1].bodyParserLimit),r(K,te),r(K,Z),r(Z,oe),r(oe,me),r(n,Ee),r(n,ye),r(n,ge),pt(be,n,null),r(n,Te),r(n,Pe),r(n,_e),r(n,De),r(De,ke),r(ke,$),r(De,ae),r(De,ue),r(ue,fe),I(Fe,Be,ut),I(Fe,Qe,ut),r(Qe,We),r(We,Ye),r(Ye,Je),r(We,rt),pt(lt,We,null),I(Fe,Re,ut),I(Fe,Le,ut),r(Le,ot),r(ot,Ge),r(Ge,Ve),r(ot,we),r(ot,Ke),r(Ke,ve),r(ve,Xe),r(Ke,Ct),r(Ke,$e),r($e,At),r($e,it),r($e,Lt),xe=!0,at||(Ne=[ee(m,"input",t[22]),ee(M,"input",t[23]),ee(Y,"change",t[24]),ee(N,"input",t[25])],at=!0)},p(Fe,ut){(!xe||ut[0]&2048)&&i!==(i=Fe[11]("configuration.systemSettings")+"")&&T(l,i),(!xe||ut[0]&2048)&&h!==(h=Fe[11]("configuration.serverPort")+"")&&T(p,h),ut[0]&2&&yt(m.value)!==Fe[1].port&&ne(m,Fe[1].port),(!xe||ut[0]&2048)&&w!==(w=Fe[11]("configuration.workerProcesses")+"")&&T(S,w),ut[0]&2&&yt(M.value)!==Fe[1].workers&&ne(M,Fe[1].workers),(!xe||ut[0]&2048)&&C!==(C=Fe[11]("configuration.workerProcessesHelp")+"")&&T(R,C),(!xe||ut[0]&2048)&&U!==(U=Fe[11]("configuration.logLevel")+"")&&T(F,U),ut[0]&2&&Cn(Y,Fe[1].logLevel),(!xe||ut[0]&2048)&&J!==(J=Fe[11]("configuration.bodyParserLimit")+"")&&T(le,J),ut[0]&2&&N.value!==Fe[1].bodyParserLimit&&ne(N,Fe[1].bodyParserLimit),(!xe||ut[0]&2048)&&Se!==(Se=Fe[11]("configuration.bodyParserLimitHelp")+"")&&T(me,Se);const un={};ut[0]&2048&&(un.label=Fe[11]("auth.globalAuth")),!He&&ut[0]&2&&(He=!0,un.value=Fe[1].auth,Xn(()=>He=!1)),be.$set(un),(!xe||ut[0]&2048)&&de!==(de=Fe[11]("configuration.requiresRestart")+"")&&T(fe,de),(!xe||ut[0]&2048)&&nt!==(nt=Fe[11]("logging.title")+"")&&T(Je,nt);const Rt={};!he&&ut[0]&2&&(he=!0,Rt.value=Fe[1].logging,Xn(()=>he=!1)),lt.$set(Rt),(!xe||ut[0]&2048)&&Ie!==(Ie=Fe[11]("routes.title")+"")&&T(Ve,Ie),(!xe||ut[0]&2050)&&je!==(je=Fe[11]("configuration.routesConfigured",{values:{count:Fe[1].routes.length}})+"")&&T(At,je),(!xe||ut[0]&2048)&&mt!==(mt=Fe[11]("configuration.manageRoutes")+"")&&T(Lt,mt)},i(Fe){xe||(ze(be.$$.fragment,Fe),ze(lt.$$.fragment,Fe),xe=!0)},o(Fe){Ue(be.$$.fragment,Fe),Ue(lt.$$.fragment,Fe),xe=!1},d(Fe){Fe&&(H(e),H(Be),H(Qe),H(Re),H(Le)),gt(be),gt(lt),at=!1,ht(Ne)}}}function gc(t){let e,n,s,i,l,o=t[11]("configuration.jsonParseError",{values:{error:t[9]}})+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error mb-4")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f[0]&2560&&o!==(o=u[11]("configuration.jsonParseError",{values:{error:u[9]}})+"")&&T(a,o)},d(u){u&&H(e)}}}function Yv(t){let e,n,s,i,l=t[11]("configuration.title")+"",o,a,u,f=t[11]("configuration.subtitle")+"",h,p,g,m,b,_,y,k=t[11]("configuration.export")+"",w,S,P,M,x,A,O,C=t[11]("configuration.import")+"",R,L,D,z,B=t[11]("configuration.save")+"",U,F,V,Y,j,q=t[11]("configuration.reload")+"",Q,X,re,K,W,G=t[11]("configuration.restart")+"",J,le,se,N,te,Z,oe,Se,me,Ee,ye,ge=t[11]("configuration.confirmRestart")+"",be,He,Te,Pe=t[11]("configuration.restartMessage")+"",_e,De,ke,$,ae,ue,de,fe=t[11]("configuration.restartWarning")+"",Be,Qe,We,Ye,nt=t[11]("common.cancel")+"",Je,rt,lt,he,Re,Le,ot=t[11]("configuration.restart")+"",Ge,Ie,Ve,we;function Ke(Ne,st){return Ne[6]?Fv:Bv}let ve=Ke(t),Xe=ve(t);function Ct(Ne,st){return Ne[4]?jv:Nv}let $e=Ct(t),je=$e(t);function At(Ne,st){return Ne[5]?Uv:zv}let it=At(t),mt=it(t);const Lt=[qv,Wv,Vv],xe=[];function at(Ne,st){return Ne[3]?0:Ne[2]?1:Ne[1]?2:-1}return~(N=at(t))&&(te=xe[N]=Lt[N](t)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),g=d("div"),m=d("button"),b=pe("svg"),_=pe("path"),y=v(),w=E(k),P=v(),M=d("button"),x=pe("svg"),A=pe("path"),O=v(),R=E(C),L=v(),D=d("button"),Xe.c(),z=v(),U=E(B),V=v(),Y=d("button"),je.c(),j=v(),Q=E(q),re=v(),K=d("button"),mt.c(),W=v(),J=E(G),se=v(),te&&te.c(),Z=v(),oe=d("input"),Se=v(),me=d("div"),Ee=d("div"),ye=d("h3"),be=E(ge),He=v(),Te=d("p"),_e=E(Pe),De=v(),ke=d("div"),$=pe("svg"),ae=pe("path"),ue=v(),de=d("span"),Be=E(fe),Qe=v(),We=d("div"),Ye=d("button"),Je=E(nt),rt=v(),lt=d("button"),he=pe("svg"),Re=pe("path"),Le=v(),Ge=E(ot),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(b,"xmlns","http://www.w3.org/2000/svg"),c(b,"class","h-4 w-4"),c(b,"fill","none"),c(b,"viewBox","0 0 24 24"),c(b,"stroke","currentColor"),c(m,"class","btn btn-outline btn-sm"),m.disabled=S=t[3]||!t[0],c(A,"stroke-linecap","round"),c(A,"stroke-linejoin","round"),c(A,"stroke-width","2"),c(A,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(x,"xmlns","http://www.w3.org/2000/svg"),c(x,"class","h-4 w-4"),c(x,"fill","none"),c(x,"viewBox","0 0 24 24"),c(x,"stroke","currentColor"),c(M,"class","btn btn-outline btn-sm"),M.disabled=t[3],c(D,"class","btn btn-success btn-sm"),D.disabled=F=t[6]||t[3]||!!t[9],c(Y,"class","btn btn-primary btn-sm"),Y.disabled=X=t[4]||t[3],c(K,"class","btn btn-warning btn-sm"),K.disabled=le=t[5]||t[3],c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(oe,"type","checkbox"),c(oe,"class","modal-toggle"),c(ye,"class","font-bold text-lg"),c(Te,"class","py-4"),c(ae,"stroke-linecap","round"),c(ae,"stroke-linejoin","round"),c(ae,"stroke-width","2"),c(ae,"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"),c($,"xmlns","http://www.w3.org/2000/svg"),c($,"class","stroke-current shrink-0 h-6 w-6"),c($,"fill","none"),c($,"viewBox","0 0 24 24"),c(ke,"class","alert alert-warning"),c(Ye,"class","btn btn-ghost"),c(Re,"stroke-linecap","round"),c(Re,"stroke-linejoin","round"),c(Re,"stroke-width","2"),c(Re,"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"),c(he,"xmlns","http://www.w3.org/2000/svg"),c(he,"class","h-4 w-4 mr-1"),c(he,"fill","none"),c(he,"viewBox","0 0 24 24"),c(he,"stroke","currentColor"),c(lt,"class","btn btn-warning"),c(We,"class","modal-action"),c(Ee,"class","modal-box"),c(me,"class","modal"),ie(me,"modal-open",t[10]),c(e,"class","p-6")},m(Ne,st){I(Ne,e,st),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(n,p),r(n,g),r(g,m),r(m,b),r(b,_),r(m,y),r(m,w),r(g,P),r(g,M),r(M,x),r(x,A),r(M,O),r(M,R),r(g,L),r(g,D),Xe.m(D,null),r(D,z),r(D,U),r(g,V),r(g,Y),je.m(Y,null),r(Y,j),r(Y,Q),r(g,re),r(g,K),mt.m(K,null),r(K,W),r(K,J),r(e,se),~N&&xe[N].m(e,null),r(e,Z),r(e,oe),oe.checked=t[10],r(e,Se),r(e,me),r(me,Ee),r(Ee,ye),r(ye,be),r(Ee,He),r(Ee,Te),r(Te,_e),r(Ee,De),r(Ee,ke),r(ke,$),r($,ae),r(ke,ue),r(ke,de),r(de,Be),r(Ee,Qe),r(Ee,We),r(We,Ye),r(Ye,Je),r(We,rt),r(We,lt),r(lt,he),r(he,Re),r(lt,Le),r(lt,Ge),Ie=!0,Ve||(we=[ee(m,"click",t[14]),ee(M,"click",t[15]),ee(D,"click",t[13]),ee(Y,"click",t[16]),ee(K,"click",t[18]),ee(oe,"change",t[29]),ee(Ye,"click",t[30]),ee(lt,"click",t[17])],Ve=!0)},p(Ne,st){(!Ie||st[0]&2048)&&l!==(l=Ne[11]("configuration.title")+"")&&T(o,l),(!Ie||st[0]&2048)&&f!==(f=Ne[11]("configuration.subtitle")+"")&&T(h,f),(!Ie||st[0]&2048)&&k!==(k=Ne[11]("configuration.export")+"")&&T(w,k),(!Ie||st[0]&9&&S!==(S=Ne[3]||!Ne[0]))&&(m.disabled=S),(!Ie||st[0]&2048)&&C!==(C=Ne[11]("configuration.import")+"")&&T(R,C),(!Ie||st[0]&8)&&(M.disabled=Ne[3]),ve!==(ve=Ke(Ne))&&(Xe.d(1),Xe=ve(Ne),Xe&&(Xe.c(),Xe.m(D,z))),(!Ie||st[0]&2048)&&B!==(B=Ne[11]("configuration.save")+"")&&T(U,B),(!Ie||st[0]&584&&F!==(F=Ne[6]||Ne[3]||!!Ne[9]))&&(D.disabled=F),$e!==($e=Ct(Ne))&&(je.d(1),je=$e(Ne),je&&(je.c(),je.m(Y,j))),(!Ie||st[0]&2048)&&q!==(q=Ne[11]("configuration.reload")+"")&&T(Q,q),(!Ie||st[0]&24&&X!==(X=Ne[4]||Ne[3]))&&(Y.disabled=X),it!==(it=At(Ne))&&(mt.d(1),mt=it(Ne),mt&&(mt.c(),mt.m(K,W))),(!Ie||st[0]&2048)&&G!==(G=Ne[11]("configuration.restart")+"")&&T(J,G),(!Ie||st[0]&40&&le!==(le=Ne[5]||Ne[3]))&&(K.disabled=le);let jt=N;N=at(Ne),N===jt?~N&&xe[N].p(Ne,st):(te&&(ms(),Ue(xe[jt],1,1,()=>{xe[jt]=null}),bs()),~N?(te=xe[N],te?te.p(Ne,st):(te=xe[N]=Lt[N](Ne),te.c()),ze(te,1),te.m(e,Z)):te=null),st[0]&1024&&(oe.checked=Ne[10]),(!Ie||st[0]&2048)&&ge!==(ge=Ne[11]("configuration.confirmRestart")+"")&&T(be,ge),(!Ie||st[0]&2048)&&Pe!==(Pe=Ne[11]("configuration.restartMessage")+"")&&T(_e,Pe),(!Ie||st[0]&2048)&&fe!==(fe=Ne[11]("configuration.restartWarning")+"")&&T(Be,fe),(!Ie||st[0]&2048)&&nt!==(nt=Ne[11]("common.cancel")+"")&&T(Je,nt),(!Ie||st[0]&2048)&&ot!==(ot=Ne[11]("configuration.restart")+"")&&T(Ge,ot),(!Ie||st[0]&1024)&&ie(me,"modal-open",Ne[10])},i(Ne){Ie||(ze(te),Ie=!0)},o(Ne){Ue(te),Ie=!1},d(Ne){Ne&&H(e),Xe.d(),je.d(),mt.d(),~N&&xe[N].d(),Ve=!1,ht(we)}}}function Jv(t,e,n){let s;Zt(t,xt,j=>n(11,s=j));let i=null,l=null,o=null,a=!0,u=!1,f=!1,h=!1,p="form",g="",m=null,b=!1;async function _(){try{n(0,i=await qr()),n(1,l=JSON.parse(JSON.stringify(i))),n(8,g=JSON.stringify(i,null,2)),n(2,o=null)}catch(j){n(2,o=j.message)}finally{n(3,a=!1)}}function y(){n(9,m=null);try{n(1,l=JSON.parse(g))}catch(j){n(9,m=j.message)}}async function k(){if(l){n(6,h=!0);try{const j=await im(l);if(!j.valid){Et.show(s("configuration.validationFailed",{values:{error:j.error}}),"error");return}const q=await sm(l);q.success?(Et.show(s("configuration.saved"),"success"),n(0,i=JSON.parse(JSON.stringify(l)))):Et.show(s("configuration.saveFailed",{values:{error:q.message}}),"error")}catch(j){Et.show(s("configuration.saveFailed",{values:{error:j.message}}),"error")}finally{n(6,h=!1)}}}function w(){if(!i)return;const j=JSON.stringify(i,null,2),q="data:application/json;charset=utf-8,"+encodeURIComponent(j),Q=\`bungee-config-\${new Date().toISOString().split("T")[0]}.json\`,X=document.createElement("a");X.setAttribute("href",q),X.setAttribute("download",Q),X.click(),Et.show(s("configuration.exported"),"success")}function S(){const j=document.createElement("input");j.type="file",j.accept=".json",j.onchange=async q=>{const Q=q.target.files[0];if(Q)try{const X=await Q.text(),re=JSON.parse(X);n(1,l=re),n(8,g=JSON.stringify(re,null,2)),Et.show(s("configuration.imported"),"success")}catch(X){Et.show(s("configuration.importFailed",{values:{error:X.message}}),"error")}},j.click()}async function P(){n(4,u=!0);try{const j=await wv();j.success?(Et.show(s("configuration.reloaded"),"success"),await _()):Et.show(s("configuration.reloadFailed",{values:{error:j.message}}),"error")}catch(j){Et.show(s("configuration.reloadFailed",{values:{error:j.message}}),"error")}finally{n(4,u=!1)}}async function M(){n(10,b=!1),n(5,f=!0);try{const j=await kv();j.success?Et.show(s("configuration.restartSent"),"success"):j.error&&j.error.includes("daemon mode")?Et.show(s("configuration.restartDaemonOnly"),"error",8e3):Et.show(s("configuration.restartFailed",{values:{error:j.error||j.message}}),"error")}catch(j){Et.show(s("configuration.restartFailed",{values:{error:j.message}}),"error")}finally{n(5,f=!1)}}ls(()=>{_()});const x=[[]],A=()=>n(10,b=!0);function O(){p=this.__value,n(7,p)}function C(){p=this.__value,n(7,p)}function R(){l.port=yt(this.value),n(1,l)}function L(){l.workers=yt(this.value),n(1,l)}function D(){l.logLevel=Is(this),n(1,l)}function z(){l.bodyParserLimit=this.value,n(1,l)}function B(j){t.$$.not_equal(l.auth,j)&&(l.auth=j,n(1,l))}function U(j){t.$$.not_equal(l.logging,j)&&(l.logging=j,n(1,l))}function F(){g=this.value,n(8,g)}function V(){b=this.checked,n(10,b)}return[i,l,o,a,u,f,h,p,g,m,b,s,y,k,w,S,P,M,A,O,x,C,R,L,D,z,B,U,F,V,()=>n(10,b=!1)]}class Kv extends Gt{constructor(e){super(),qt(this,e,Jv,Yv,Nt,{},null,[-1,-1])}}class Ei{static async list(){return await yn.get("/routes")}static async get(e){return(await this.list()).find(s=>s.path===e)||null}static async create(e){const n=await yn.get("/config");if(n.routes?.some(s=>s.path===e.path))throw new Error(\`Route with path "\${e.path}" already exists\`);n.routes=n.routes||[],n.routes.push(e),await yn.put("/config",n)}static async update(e,n){const s=await yn.get("/config"),i=s.routes?.findIndex(l=>l.path===e);if(i===void 0||i===-1)throw new Error(\`Route with path "\${e}" not found\`);if(e!==n.path&&s.routes?.some(l=>l.path===n.path))throw new Error(\`Route with path "\${n.path}" already exists\`);s.routes[i]=n,await yn.put("/config",s)}static async delete(e){const n=await yn.get("/config"),s=n.routes?.findIndex(i=>i.path===e);if(s===void 0||s===-1)throw new Error(\`Route with path "\${e}" not found\`);n.routes.splice(s,1),await yn.put("/config",n)}static async validateRoute(e){const n={routes:[e]};return await yn.post("/config/validate",n)}static async duplicate(e){const n=await this.get(e);if(!n)throw new Error(\`Route with path "\${e}" not found\`);const s={...n};let i=1,l=\`\${e}-copy\`;const o=await this.list();for(;o.some(a=>a.path===l);)i++,l=\`\${e}-copy-\${i}\`;s.path=l,await this.create(s)}}function mc(t,e,n){const s=t.slice();return s[7]=e[n][0],s[8]=e[n][1],s}function bc(t,e,n){const s=t.slice();return s[11]=e[n],s[13]=n,s}function _c(t){let e,n=t[5]("routeCard.hasTransformer")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-info")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.hasTransformer")+"")&&T(s,n)},d(i){i&&H(e)}}}function vc(t){let e,n=t[5]("routeCard.failover")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-success")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l&32&&n!==(n=i[5]("routeCard.failover")+"")&&T(s,n)},d(i){i&&H(e)}}}function yc(t){let e,n=t[5]("upstream.weight")+"",s,i,l=t[11].weight+"",o;return{c(){e=d("span"),s=E(n),i=E(": "),o=E(l),c(e,"class","badge badge-xs")},m(a,u){I(a,e,u),r(e,s),r(e,i),r(e,o)},p(a,u){u&32&&n!==(n=a[5]("upstream.weight")+"")&&T(s,n),u&1&&l!==(l=a[11].weight+"")&&T(o,l)},d(a){a&&H(e)}}}function wc(t){let e,n,s=t[11].priority+"",i;return{c(){e=d("span"),n=E("P: "),i=E(s),c(e,"class","badge badge-xs")},m(l,o){I(l,e,o),r(e,n),r(e,i)},p(l,o){o&1&&s!==(s=l[11].priority+"")&&T(i,s)},d(l){l&&H(e)}}}function kc(t){let e,n,s,i,l,o=t[11].target+"",a,u,f,h,p=t[11].weight&&yc(t),g=t[11].priority!==void 0&&wc(t);return{c(){e=d("div"),n=d("div"),i=v(),l=d("code"),a=E(o),u=v(),p&&p.c(),f=v(),g&&g.c(),h=v(),c(n,"class","w-2 h-2 rounded-full tooltip tooltip-right"),c(n,"data-tip",s=t[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${Tc(t[11].lastFailureTime)}\`:ei(t[11])),ie(n,"bg-success",ei(t[11])==="healthy"),ie(n,"bg-error",ei(t[11])==="unhealthy"),ie(n,"bg-warning",ei(t[11])==="unknown"),c(l,"class","text-xs flex-1 truncate"),c(e,"class","flex items-center gap-2 text-sm")},m(m,b){I(m,e,b),r(e,n),r(e,i),r(e,l),r(l,a),r(e,u),p&&p.m(e,null),r(e,f),g&&g.m(e,null),r(e,h)},p(m,b){b&1&&s!==(s=m[11].lastFailureTime?\`\u6700\u540E\u5931\u8D25: \${Tc(m[11].lastFailureTime)}\`:ei(m[11]))&&c(n,"data-tip",s),b&1&&ie(n,"bg-success",ei(m[11])==="healthy"),b&1&&ie(n,"bg-error",ei(m[11])==="unhealthy"),b&1&&ie(n,"bg-warning",ei(m[11])==="unknown"),b&1&&o!==(o=m[11].target+"")&&T(a,o),m[11].weight?p?p.p(m,b):(p=yc(m),p.c(),p.m(e,f)):p&&(p.d(1),p=null),m[11].priority!==void 0?g?g.p(m,b):(g=wc(m),g.c(),g.m(e,h)):g&&(g.d(1),g=null)},d(m){m&&H(e),p&&p.d(),g&&g.d()}}}function Sc(t){let e,n,s,i,l=tt(Object.entries(t[0].pathRewrite)),o=[];for(let a=0;a<l.length;a+=1)o[a]=Ec(mc(t,l,a));return{c(){e=d("div"),n=d("p"),n.textContent="Path Rewrite:",s=v(),i=d("div");for(let a=0;a<o.length;a+=1)o[a].c();c(n,"class","text-sm font-semibold"),c(i,"class","text-xs text-gray-500"),c(e,"class","mt-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i);for(let f=0;f<o.length;f+=1)o[f]&&o[f].m(i,null)},p(a,u){if(u&1){l=tt(Object.entries(a[0].pathRewrite));let f;for(f=0;f<l.length;f+=1){const h=mc(a,l,f);o[f]?o[f].p(h,u):(o[f]=Ec(h),o[f].c(),o[f].m(i,null))}for(;f<o.length;f+=1)o[f].d(1);o.length=l.length}},d(a){a&&H(e),Tn(o,a)}}}function Ec(t){let e,n,s=t[7]+"",i,l,o,a=t[8]+"",u;return{c(){e=d("div"),n=d("code"),i=E(s),l=E(" \u2192 "),o=d("code"),u=E(a)},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u)},p(f,h){h&1&&s!==(s=f[7]+"")&&T(i,s),h&1&&a!==(a=f[8]+"")&&T(u,a)},d(f){f&&H(e)}}}function Zv(t){let e,n,s,i=t[5]("routeCard.duplicate")+"",l;return{c(){e=pe("svg"),n=pe("path"),s=v(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,a){I(o,e,a),r(e,n),I(o,s,a),I(o,l,a)},p(o,a){a&32&&i!==(i=o[5]("routeCard.duplicate")+"")&&T(l,i)},d(o){o&&(H(e),H(s),H(l))}}}function Qv(t){let e,n,s=t[5]("routeCard.duplicating")+"",i;return{c(){e=d("span"),n=v(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){I(l,e,o),I(l,n,o),I(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.duplicating")+"")&&T(i,s)},d(l){l&&(H(e),H(n),H(i))}}}function $v(t){let e,n,s,i=t[5]("routeCard.delete")+"",l;return{c(){e=pe("svg"),n=pe("path"),s=v(),l=E(i),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(o,a){I(o,e,a),r(e,n),I(o,s,a),I(o,l,a)},p(o,a){a&32&&i!==(i=o[5]("routeCard.delete")+"")&&T(l,i)},d(o){o&&(H(e),H(s),H(l))}}}function ey(t){let e,n,s=t[5]("routeCard.deleting")+"",i;return{c(){e=d("span"),n=v(),i=E(s),c(e,"class","loading loading-spinner loading-xs")},m(l,o){I(l,e,o),I(l,n,o),I(l,i,o)},p(l,o){o&32&&s!==(s=l[5]("routeCard.deleting")+"")&&T(i,s)},d(l){l&&(H(e),H(n),H(i))}}}function ty(t){let e,n,s,i,l,o,a=t[0].path+"",u,f,h,p,g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"",m,b,_,y,k,w,S=t[5]("routeEditor.upstreams")+"",P,M,x,A,O,C,R,L,D,z,B,U=t[5]("routeCard.edit")+"",F,V,Y,j,q,Q,X,re=t[0].transformer&&_c(t),K=t[0].failover?.enabled&&vc(t),W=tt(t[0].upstreams),G=[];for(let Se=0;Se<W.length;Se+=1)G[Se]=kc(bc(t,W,Se));let J=t[0].pathRewrite&&Sc(t);function le(Se,me){return Se[4]?Qv:Zv}let se=le(t),N=se(t);function te(Se,me){return Se[3]?ey:$v}let Z=te(t),oe=Z(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h2"),o=d("code"),u=E(a),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),re&&re.c(),_=v(),K&&K.c(),y=v(),k=d("div"),w=d("p"),P=E(S),M=E(":"),x=v(),A=d("div");for(let Se=0;Se<G.length;Se+=1)G[Se].c();O=v(),J&&J.c(),C=v(),R=d("div"),L=d("button"),D=pe("svg"),z=pe("path"),B=v(),F=E(U),V=v(),Y=d("button"),N.c(),j=v(),q=d("button"),oe.c(),c(o,"class","text-primary"),c(l,"class","card-title text-lg"),c(p,"class","badge badge-sm"),c(h,"class","flex gap-2 mt-2 flex-wrap"),c(i,"class","flex-1"),c(s,"class","flex justify-between items-start"),c(w,"class","text-sm font-semibold mb-2"),c(A,"class","space-y-2"),c(k,"class","mt-4"),c(z,"stroke-linecap","round"),c(z,"stroke-linejoin","round"),c(z,"stroke-width","2"),c(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"),c(D,"xmlns","http://www.w3.org/2000/svg"),c(D,"class","h-4 w-4"),c(D,"fill","none"),c(D,"viewBox","0 0 24 24"),c(D,"stroke","currentColor"),c(L,"class","btn btn-sm btn-primary btn-outline"),c(Y,"class","btn btn-sm btn-secondary btn-outline"),Y.disabled=t[4],c(q,"class","btn btn-sm btn-error btn-outline"),q.disabled=t[3],c(R,"class","card-actions justify-end mt-auto pt-4"),c(n,"class","card-body flex flex-col"),c(e,"class","card bg-base-100 shadow-md hover:shadow-lg transition-shadow")},m(Se,me){I(Se,e,me),r(e,n),r(n,s),r(s,i),r(i,l),r(l,o),r(o,u),r(i,f),r(i,h),r(h,p),r(p,m),r(h,b),re&&re.m(h,null),r(h,_),K&&K.m(h,null),r(n,y),r(n,k),r(k,w),r(w,P),r(w,M),r(k,x),r(k,A);for(let Ee=0;Ee<G.length;Ee+=1)G[Ee]&&G[Ee].m(A,null);r(n,O),J&&J.m(n,null),r(n,C),r(n,R),r(R,L),r(L,D),r(D,z),r(L,B),r(L,F),r(R,V),r(R,Y),N.m(Y,null),r(R,j),r(R,q),oe.m(q,null),Q||(X=[ee(L,"click",t[6]),ee(Y,"click",function(){ui(t[2])&&t[2].apply(this,arguments)}),ee(q,"click",function(){ui(t[1])&&t[1].apply(this,arguments)})],Q=!0)},p(Se,[me]){if(t=Se,me&1&&a!==(a=t[0].path+"")&&T(u,a),me&33&&g!==(g=t[5]("routeCard.upstreams",{values:{count:t[0].upstreams.length}})+"")&&T(m,g),t[0].transformer?re?re.p(t,me):(re=_c(t),re.c(),re.m(h,_)):re&&(re.d(1),re=null),t[0].failover?.enabled?K?K.p(t,me):(K=vc(t),K.c(),K.m(h,null)):K&&(K.d(1),K=null),me&32&&S!==(S=t[5]("routeEditor.upstreams")+"")&&T(P,S),me&33){W=tt(t[0].upstreams);let Ee;for(Ee=0;Ee<W.length;Ee+=1){const ye=bc(t,W,Ee);G[Ee]?G[Ee].p(ye,me):(G[Ee]=kc(ye),G[Ee].c(),G[Ee].m(A,null))}for(;Ee<G.length;Ee+=1)G[Ee].d(1);G.length=W.length}t[0].pathRewrite?J?J.p(t,me):(J=Sc(t),J.c(),J.m(n,C)):J&&(J.d(1),J=null),me&32&&U!==(U=t[5]("routeCard.edit")+"")&&T(F,U),se===(se=le(t))&&N?N.p(t,me):(N.d(1),N=se(t),N&&(N.c(),N.m(Y,null))),me&16&&(Y.disabled=t[4]),Z===(Z=te(t))&&oe?oe.p(t,me):(oe.d(1),oe=Z(t),oe&&(oe.c(),oe.m(q,null))),me&8&&(q.disabled=t[3])},i:Ae,o:Ae,d(Se){Se&&H(e),re&&re.d(),K&&K.d(),Tn(G,Se),J&&J.d(),N.d(),oe.d(),Q=!1,ht(X)}}}function ei(t){return t.status?t.status==="HEALTHY"?"healthy":"unhealthy":"unknown"}function Tc(t){if(!t)return"";const e=new Date(t),s=new Date().getTime()-e.getTime(),i=Math.floor(s/1e3),l=Math.floor(i/60),o=Math.floor(l/60);return i<60?\`\${i}\u79D2\u524D\`:l<60?\`\${l}\u5206\u949F\u524D\`:o<24?\`\${o}\u5C0F\u65F6\u524D\`:e.toLocaleString("zh-CN")}function ny(t,e,n){let s;Zt(t,xt,h=>n(5,s=h));let{route:i}=e,{onDelete:l}=e,{onDuplicate:o}=e,{isDeleting:a=!1}=e,{isDuplicating:u=!1}=e;function f(){ud(\`/routes/edit/\${encodeURIComponent(i.path)}\`)}return t.$$set=h=>{"route"in h&&n(0,i=h.route),"onDelete"in h&&n(1,l=h.onDelete),"onDuplicate"in h&&n(2,o=h.onDuplicate),"isDeleting"in h&&n(3,a=h.isDeleting),"isDuplicating"in h&&n(4,u=h.isDuplicating)},[i,l,o,a,u,s,f]}class sy extends Gt{constructor(e){super(),qt(this,e,ny,ty,Nt,{route:0,onDelete:1,onDuplicate:2,isDeleting:3,isDuplicating:4})}}function Mc(t){let e,n,s,i,l,o,a,u,f,h,p,g,m,b,_,y,k;return{c(){e=d("dialog"),n=d("div"),s=d("h3"),i=E(t[5]),l=v(),o=d("p"),a=E(t[4]),u=v(),f=d("div"),h=d("button"),p=E(t[2]),g=v(),m=d("button"),b=E(t[3]),c(s,"class","font-bold text-lg"),c(o,"class","py-4"),c(h,"class","btn"),c(m,"class",_="btn "+t[1]),c(f,"class","modal-action"),c(n,"class","modal-box"),c(e,"class","modal modal-open")},m(w,S){I(w,e,S),r(e,n),r(n,s),r(s,i),r(n,l),r(n,o),r(o,a),r(n,u),r(n,f),r(f,h),r(h,p),r(f,g),r(f,m),r(m,b),y||(k=[ee(h,"click",t[7]),ee(m,"click",t[6]),ee(e,"click",t[8])],y=!0)},p(w,S){S&32&&T(i,w[5]),S&16&&T(a,w[4]),S&4&&T(p,w[2]),S&8&&T(b,w[3]),S&2&&_!==(_="btn "+w[1])&&c(m,"class",_)},d(w){w&&H(e),y=!1,ht(k)}}}function iy(t){let e,n=t[0]&&Mc(t);return{c(){n&&n.c(),e=Zn()},m(s,i){n&&n.m(s,i),I(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Mc(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ae,o:Ae,d(s){s&&H(e),n&&n.d(s)}}}function ly(t,e,n){let s,i,l,o,a;Zt(t,xt,w=>n(13,a=w));let{open:u=!1}=e,{title:f=""}=e,{message:h=""}=e,{confirmText:p=""}=e,{cancelText:g=""}=e,{confirmClass:m="btn-error"}=e;const b=Dl();function _(){b("confirm"),n(0,u=!1)}function y(){b("cancel"),n(0,u=!1)}function k(w){w.target===w.currentTarget&&y()}return t.$$set=w=>{"open"in w&&n(0,u=w.open),"title"in w&&n(9,f=w.title),"message"in w&&n(10,h=w.message),"confirmText"in w&&n(11,p=w.confirmText),"cancelText"in w&&n(12,g=w.cancelText),"confirmClass"in w&&n(1,m=w.confirmClass)},t.$$.update=()=>{t.$$.dirty&8704&&n(5,s=f||a("confirmDialog.title")),t.$$.dirty&1024&&n(4,i=h),t.$$.dirty&10240&&n(3,l=p||a("confirmDialog.confirm")),t.$$.dirty&12288&&n(2,o=g||a("confirmDialog.cancel"))},[u,m,o,l,i,s,_,y,k,f,h,p,g,a]}class oy extends Gt{constructor(e){super(),qt(this,e,ly,iy,Nt,{open:0,title:9,message:10,confirmText:11,cancelText:12,confirmClass:1})}}function Cc(t,e,n){const s=t.slice();return s[27]=e[n],s}function Pc(t,e,n){const s=t.slice();return s[30]=e[n],s}function ry(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function ay(t){let e;return{c(){e=d("span"),c(e,"class","loading loading-spinner loading-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function Ac(t){let e,n=t[30]+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[30],ne(e,e.__value)},m(l,o){I(l,e,o),r(e,s)},p(l,o){o[0]&1024&&n!==(n=l[30]+"")&&T(s,n),o[0]&1024&&i!==(i=l[30])&&(e.__value=i,ne(e,e.__value))},d(l){l&&H(e)}}}function uy(t){let e,n,s=tt(t[11]),i=[];for(let o=0;o<s.length;o+=1)i[o]=xc(Cc(t,s,o));const l=o=>Ue(i[o],1,1,()=>{i[o]=null});return{c(){e=d("div");for(let o=0;o<i.length;o+=1)i[o].c();c(e,"class","grid grid-cols-1 lg:grid-cols-2 gap-4")},m(o,a){I(o,e,a);for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(e,null);n=!0},p(o,a){if(a[0]&76160){s=tt(o[11]);let u;for(u=0;u<s.length;u+=1){const f=Cc(o,s,u);i[u]?(i[u].p(f,a),ze(i[u],1)):(i[u]=xc(f),i[u].c(),ze(i[u],1),i[u].m(e,null))}for(ms(),u=s.length;u<i.length;u+=1)l(u);bs()}},i(o){if(!n){for(let a=0;a<s.length;a+=1)ze(i[a]);n=!0}},o(o){i=i.filter(Boolean);for(let a=0;a<i.length;a+=1)Ue(i[a]);n=!1},d(o){o&&H(e),Tn(i,o)}}}function cy(t){let e;function n(l,o){return l[0].length===0?py:dy}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","text-center py-12")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},i:Ae,o:Ae,d(l){l&&H(e),i.d()}}}function fy(t){let e,n,s,i,l,o=t[12]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[4]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p[0]&4096&&o!==(o=h[12]("common.error")+"")&&T(a,o),p[0]&16&&T(f,h[4])},i:Ae,o:Ae,d(h){h&&H(e)}}}function hy(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function xc(t){let e,n;function s(){return t[22](t[27])}function i(){return t[23](t[27])}return e=new sy({props:{route:t[27],onDelete:s,onDuplicate:i,isDeleting:t[7].has(t[27].path),isDuplicating:t[8].has(t[27].path)}}),{c(){_t(e.$$.fragment)},m(l,o){pt(e,l,o),n=!0},p(l,o){t=l;const a={};o[0]&2048&&(a.route=t[27]),o[0]&2048&&(a.onDelete=s),o[0]&2048&&(a.onDuplicate=i),o[0]&2176&&(a.isDeleting=t[7].has(t[27].path)),o[0]&2304&&(a.isDuplicating=t[8].has(t[27].path)),e.$set(a)},i(l){n||(ze(e.$$.fragment,l),n=!0)},o(l){Ue(e.$$.fragment,l),n=!1},d(l){gt(e,l)}}}function dy(t){let e,n,s,i=t[12]("routes.noMatchingRoutes")+"",l,o,a,u=t[12]("routes.noMatchingMessage")+"",f;return{c(){e=d("div"),e.textContent="\uD83D\uDD0D",n=v(),s=d("h3"),l=E(i),o=v(),a=d("p"),f=E(u),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(a,"class","text-gray-500")},m(h,p){I(h,e,p),I(h,n,p),I(h,s,p),r(s,l),I(h,o,p),I(h,a,p),r(a,f)},p(h,p){p[0]&4096&&i!==(i=h[12]("routes.noMatchingRoutes")+"")&&T(l,i),p[0]&4096&&u!==(u=h[12]("routes.noMatchingMessage")+"")&&T(f,u)},d(h){h&&(H(e),H(n),H(s),H(o),H(a))}}}function py(t){let e,n,s,i=t[12]("routes.noRoutes")+"",l,o,a,u=t[12]("routes.noRoutesMessage")+"",f,h,p,g=t[12]("routes.createFirstRoute")+"",m,b,_;return{c(){e=d("div"),e.textContent="\uD83D\uDE80",n=v(),s=d("h3"),l=E(i),o=v(),a=d("p"),f=E(u),h=v(),p=d("button"),m=E(g),c(e,"class","text-6xl mb-4"),c(s,"class","text-xl font-semibold mb-2"),c(a,"class","text-gray-500 mb-4"),c(p,"class","btn btn-primary")},m(y,k){I(y,e,k),I(y,n,k),I(y,s,k),r(s,l),I(y,o,k),I(y,a,k),r(a,f),I(y,h,k),I(y,p,k),r(p,m),b||(_=ee(p,"click",t[17]),b=!0)},p(y,k){k[0]&4096&&i!==(i=y[12]("routes.noRoutes")+"")&&T(l,i),k[0]&4096&&u!==(u=y[12]("routes.noRoutesMessage")+"")&&T(f,u),k[0]&4096&&g!==(g=y[12]("routes.createFirstRoute")+"")&&T(m,g)},d(y){y&&(H(e),H(n),H(s),H(o),H(a),H(h),H(p)),b=!1,_()}}}function Oc(t){let e,n=t[12]("routes.showingRoutes",{values:{count:t[11].length,total:t[0].length}})+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","mt-6 text-sm text-gray-500 text-center")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&6145&&n!==(n=i[12]("routes.showingRoutes",{values:{count:i[11].length,total:i[0].length}})+"")&&T(s,n)},d(i){i&&H(e)}}}function gy(t){let e,n,s,i,l=t[12]("routes.title")+"",o,a,u,f=t[12]("routes.subtitle")+"",h,p,g,m,b,_,y,k=t[12]("routes.export")+"",w,S,P,M,x,A=t[12]("routes.import")+"",O,C,R,L,D=t[12]("routes.newRoute")+"",z,B,U,F,V,Y,j,q,Q,X,re=t[12]("routes.allTransformers")+"",K,W,G,J,le,se,N,te,Z,oe,Se;function me($,ae){return $[9]?ay:ry}let Ee=me(t),ye=Ee(t),ge=tt(t[10]),be=[];for(let $=0;$<ge.length;$+=1)be[$]=Ac(Pc(t,ge,$));const He=[hy,fy,cy,uy],Te=[];function Pe($,ae){return $[3]?0:$[4]?1:$[11].length===0?2:3}G=Pe(t),J=Te[G]=He[G](t);let _e=!t[3]&&t[0].length>0&&Oc(t);function De($){t[24]($)}let ke={title:t[12]("routes.confirmDelete"),message:t[6]?t[12]("routes.confirmDeleteMessage",{values:{path:t[6].path}}):"",confirmText:t[12]("common.delete"),cancelText:t[12]("common.cancel"),confirmClass:"btn-error"};return t[5]!==void 0&&(ke.open=t[5]),N=new oy({props:ke}),wn.push(()=>Yn(N,"open",De)),N.$on("confirm",t[14]),N.$on("cancel",t[15]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),g=d("div"),m=d("button"),b=pe("svg"),_=pe("path"),y=v(),w=E(k),P=v(),M=d("button"),ye.c(),x=v(),O=E(A),R=v(),L=d("button"),z=E(D),B=v(),U=d("div"),F=d("div"),V=d("input"),j=v(),q=d("div"),Q=d("select"),X=d("option"),K=E(re);for(let $=0;$<be.length;$+=1)be[$].c();W=v(),J.c(),le=v(),_e&&_e.c(),se=v(),_t(N.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(b,"xmlns","http://www.w3.org/2000/svg"),c(b,"class","h-4 w-4"),c(b,"fill","none"),c(b,"viewBox","0 0 24 24"),c(b,"stroke","currentColor"),c(m,"class","btn btn-sm btn-outline"),m.disabled=S=t[3]||t[0].length===0,c(M,"class","btn btn-sm btn-outline"),M.disabled=C=t[3]||t[9],c(L,"class","btn btn-primary btn-sm"),c(g,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(V,"type","text"),c(V,"placeholder",Y=t[12]("routes.searchPlaceholder")),c(V,"class","input input-bordered"),c(F,"class","form-control flex-1"),X.__value="",ne(X,X.__value),c(Q,"class","select select-bordered"),t[2]===void 0&&vs(()=>t[21].call(Q)),c(q,"class","form-control w-64"),c(U,"class","flex gap-4 mb-6"),c(e,"class","p-6")},m($,ae){I($,e,ae),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(n,p),r(n,g),r(g,m),r(m,b),r(b,_),r(m,y),r(m,w),r(g,P),r(g,M),ye.m(M,null),r(M,x),r(M,O),r(g,R),r(g,L),r(L,z),r(e,B),r(e,U),r(U,F),r(F,V),ne(V,t[1]),r(U,j),r(U,q),r(q,Q),r(Q,X),r(X,K);for(let ue=0;ue<be.length;ue+=1)be[ue]&&be[ue].m(Q,null);Cn(Q,t[2],!0),r(e,W),Te[G].m(e,null),r(e,le),_e&&_e.m(e,null),r(e,se),pt(N,e,null),Z=!0,oe||(Se=[ee(m,"click",t[18]),ee(M,"click",t[19]),ee(L,"click",t[17]),ee(V,"input",t[20]),ee(Q,"change",t[21])],oe=!0)},p($,ae){if((!Z||ae[0]&4096)&&l!==(l=$[12]("routes.title")+"")&&T(o,l),(!Z||ae[0]&4096)&&f!==(f=$[12]("routes.subtitle")+"")&&T(h,f),(!Z||ae[0]&4096)&&k!==(k=$[12]("routes.export")+"")&&T(w,k),(!Z||ae[0]&9&&S!==(S=$[3]||$[0].length===0))&&(m.disabled=S),Ee!==(Ee=me($))&&(ye.d(1),ye=Ee($),ye&&(ye.c(),ye.m(M,x))),(!Z||ae[0]&4096)&&A!==(A=$[12]("routes.import")+"")&&T(O,A),(!Z||ae[0]&520&&C!==(C=$[3]||$[9]))&&(M.disabled=C),(!Z||ae[0]&4096)&&D!==(D=$[12]("routes.newRoute")+"")&&T(z,D),(!Z||ae[0]&4096&&Y!==(Y=$[12]("routes.searchPlaceholder")))&&c(V,"placeholder",Y),ae[0]&2&&V.value!==$[1]&&ne(V,$[1]),(!Z||ae[0]&4096)&&re!==(re=$[12]("routes.allTransformers")+"")&&T(K,re),ae[0]&1024){ge=tt($[10]);let fe;for(fe=0;fe<ge.length;fe+=1){const Be=Pc($,ge,fe);be[fe]?be[fe].p(Be,ae):(be[fe]=Ac(Be),be[fe].c(),be[fe].m(Q,null))}for(;fe<be.length;fe+=1)be[fe].d(1);be.length=ge.length}ae[0]&1028&&Cn(Q,$[2]);let ue=G;G=Pe($),G===ue?Te[G].p($,ae):(ms(),Ue(Te[ue],1,1,()=>{Te[ue]=null}),bs(),J=Te[G],J?J.p($,ae):(J=Te[G]=He[G]($),J.c()),ze(J,1),J.m(e,le)),!$[3]&&$[0].length>0?_e?_e.p($,ae):(_e=Oc($),_e.c(),_e.m(e,se)):_e&&(_e.d(1),_e=null);const de={};ae[0]&4096&&(de.title=$[12]("routes.confirmDelete")),ae[0]&4160&&(de.message=$[6]?$[12]("routes.confirmDeleteMessage",{values:{path:$[6].path}}):""),ae[0]&4096&&(de.confirmText=$[12]("common.delete")),ae[0]&4096&&(de.cancelText=$[12]("common.cancel")),!te&&ae[0]&32&&(te=!0,de.open=$[5],Xn(()=>te=!1)),N.$set(de)},i($){Z||(ze(J),ze(N.$$.fragment,$),Z=!0)},o($){Ue(J),Ue(N.$$.fragment,$),Z=!1},d($){$&&H(e),ye.d(),Tn(be,$),Te[G].d(),_e&&_e.d(),gt(N),oe=!1,ht(Se)}}}function my(t,e,n){let s,i,l;Zt(t,xt,B=>n(12,l=B));let o=[],a=!0,u=null,f="",h="",p=!0,g=!1,m=null,b=new Set,_=new Set,y=!1;async function k(B=!1){const U=!B&&p;try{U&&n(3,a=!0),n(0,o=await Ei.list()),n(4,u=null),p=!1}catch(F){n(4,u=F.message),B||Et.show(F.message,"error")}finally{U&&n(3,a=!1)}}async function w(B){n(6,m=B),n(5,g=!0)}async function S(){if(m){b.add(m.path),n(7,b);try{await Ei.delete(m.path),Et.show(l("routes.deleted",{values:{path:m.path}}),"success"),await k()}catch(B){Et.show(l("routes.deleteFailed",{values:{error:B.message}}),"error")}finally{b.delete(m.path),n(7,b),n(6,m=null)}}}function P(){n(6,m=null)}async function M(B){_.add(B.path),n(8,_);try{await Ei.duplicate(B.path),Et.show(l("routes.duplicated",{values:{path:B.path}}),"success"),await k()}catch(U){Et.show(l("routes.duplicateFailed",{values:{error:U.message}}),"error")}finally{_.delete(B.path),n(8,_)}}function x(){ud("/routes/new")}function A(){if(o.length===0){Et.show(l("routes.noRoutesToExport"),"warning");return}const B=JSON.stringify(o,null,2),U="data:application/json;charset=utf-8,"+encodeURIComponent(B),F=\`bungee-routes-\${new Date().toISOString().split("T")[0]}.json\`,V=document.createElement("a");V.setAttribute("href",U),V.setAttribute("download",F),V.click(),Et.show(l("routes.exported"),"success")}function O(){const B=document.createElement("input");B.type="file",B.accept=".json",B.onchange=async U=>{const F=U.target.files[0];if(F){n(9,y=!0);try{const V=await F.text(),Y=JSON.parse(V);if(!Array.isArray(Y))throw new Error(l("routes.importMustBeArray"));let j=0,q=0;for(const Q of Y)try{await Ei.create(Q),j++}catch(X){q++,console.error(\`Failed to import route \${Q.path}:\`,X)}if(j>0){const Q=q>0?l("routes.importPartialSuccess",{values:{success:j,failed:q}}):l("routes.importSuccess",{values:{success:j}});Et.show(Q,"success"),await k()}else Et.show(l("routes.importFailed",{values:{error:\`\${q} routes failed\`}}),"error")}catch(V){Et.show(l("routes.importFailed",{values:{error:V.message}}),"error")}finally{n(9,y=!1)}}},B.click()}ls(()=>{k();const B=setInterval(()=>{k(!0)},5e3);return()=>{clearInterval(B)}});function C(){f=this.value,n(1,f)}function R(){h=Is(this),n(2,h),n(10,i),n(0,o)}const L=B=>w(B),D=B=>M(B);function z(B){g=B,n(5,g)}return t.$$.update=()=>{t.$$.dirty[0]&7&&n(11,s=o.filter(B=>{const U=B.path.toLowerCase().includes(f.toLowerCase())||B.upstreams.some(V=>V.target.toLowerCase().includes(f.toLowerCase())),F=!h||typeof B.transformer=="string"&&B.transformer===h||B.upstreams.some(V=>typeof V.transformer=="string"&&V.transformer===h);return U&&F})),t.$$.dirty[0]&1&&n(10,i=Array.from(new Set(o.flatMap(B=>{const U=[];return typeof B.transformer=="string"&&U.push(B.transformer),B.upstreams.forEach(F=>{typeof F.transformer=="string"&&U.push(F.transformer)}),U}))))},[o,f,h,a,u,g,m,b,_,y,i,s,l,w,S,P,M,x,A,O,C,R,L,D,z]}class by extends Gt{constructor(e){super(),qt(this,e,my,gy,Nt,{},null,[-1,-1])}}var Op=typeof global=="object"&&global&&global.Object===Object&&global,_y=typeof self=="object"&&self&&self.Object===Object&&self,Zs=Op||_y||Function("return this")(),Fs=Zs.Symbol,Rp=Object.prototype,vy=Rp.hasOwnProperty,yy=Rp.toString,ll=Fs?Fs.toStringTag:void 0;function wy(t){var e=vy.call(t,ll),n=t[ll];try{t[ll]=void 0;var s=!0}catch{}var i=yy.call(t);return s&&(e?t[ll]=n:delete t[ll]),i}var ky=Object.prototype,Sy=ky.toString;function Ey(t){return Sy.call(t)}var Ty="[object Null]",My="[object Undefined]",Rc=Fs?Fs.toStringTag:void 0;function Qi(t){return t==null?t===void 0?My:Ty:Rc&&Rc in Object(t)?wy(t):Ey(t)}function Xi(t){return t!=null&&typeof t=="object"}var Cy="[object Symbol]";function xl(t){return typeof t=="symbol"||Xi(t)&&Qi(t)==Cy}function ho(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var Ps=Array.isArray,Dc=Fs?Fs.prototype:void 0,Lc=Dc?Dc.toString:void 0;function Dp(t){if(typeof t=="string")return t;if(Ps(t))return ho(t,Dp)+"";if(xl(t))return Lc?Lc.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Io(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Bo(t){return t}var Py="[object AsyncFunction]",Ay="[object Function]",xy="[object GeneratorFunction]",Oy="[object Proxy]";function Lp(t){if(!Io(t))return!1;var e=Qi(t);return e==Ay||e==xy||e==Py||e==Oy}var cr=Zs["__core-js_shared__"],Hc=(function(){var t=/[^.]+$/.exec(cr&&cr.keys&&cr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function Ry(t){return!!Hc&&Hc in t}var Dy=Function.prototype,Ly=Dy.toString;function Oi(t){if(t!=null){try{return Ly.call(t)}catch{}try{return t+""}catch{}}return""}var Hy=/[\\\\^$.*+?()[\\]{}|]/g,Iy=/^\\[object .+?Constructor\\]$/,By=Function.prototype,Fy=Object.prototype,Ny=By.toString,jy=Fy.hasOwnProperty,zy=RegExp("^"+Ny.call(jy).replace(Hy,"\\\\$&").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,"$1.*?")+"$");function Uy(t){if(!Io(t)||Ry(t))return!1;var e=Lp(t)?zy:Iy;return e.test(Oi(t))}function Vy(t,e){return t?.[e]}function Ri(t,e){var n=Vy(t,e);return Uy(n)?n:void 0}var Rr=Ri(Zs,"WeakMap");function Wy(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var qy=800,Gy=16,Xy=Date.now;function Yy(t){var e=0,n=0;return function(){var s=Xy(),i=Gy-(s-n);if(n=s,i>0){if(++e>=qy)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Jy(t){return function(){return t}}var Ic=(function(){try{var t=Ri(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Ky=Ic?function(t,e){return Ic(t,"toString",{configurable:!0,enumerable:!1,value:Jy(e),writable:!0})}:Bo,Zy=Yy(Ky),Qy=9007199254740991,$y=/^(?:0|[1-9]\\d*)$/;function da(t,e){var n=typeof t;return e=e??Qy,!!e&&(n=="number"||n!="symbol"&&$y.test(t))&&t>-1&&t%1==0&&t<e}function pa(t,e){return t===e||t!==t&&e!==e}var Bc=Math.max;function e4(t,e,n){return e=Bc(e===void 0?t.length-1:e,0),function(){for(var s=arguments,i=-1,l=Bc(s.length-e,0),o=Array(l);++i<l;)o[i]=s[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=s[i];return a[e]=n(o),Wy(t,this,a)}}function t4(t,e){return Zy(e4(t,e,Bo),t+"")}var n4=9007199254740991;function ga(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=n4}function Fo(t){return t!=null&&ga(t.length)&&!Lp(t)}function Fc(t,e,n){if(!Io(n))return!1;var s=typeof e;return(s=="number"?Fo(n)&&da(e,n.length):s=="string"&&e in n)?pa(n[e],t):!1}var s4=Object.prototype;function i4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||s4;return t===n}function l4(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var o4="[object Arguments]";function Nc(t){return Xi(t)&&Qi(t)==o4}var Hp=Object.prototype,r4=Hp.hasOwnProperty,a4=Hp.propertyIsEnumerable,ma=Nc((function(){return arguments})())?Nc:function(t){return Xi(t)&&r4.call(t,"callee")&&!a4.call(t,"callee")};function u4(){return!1}var Ip=typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,jc=Ip&&typeof Ys=="object"&&Ys&&!Ys.nodeType&&Ys,c4=jc&&jc.exports===Ip,zc=c4?Zs.Buffer:void 0,f4=zc?zc.isBuffer:void 0,Dr=f4||u4,h4="[object Arguments]",d4="[object Array]",p4="[object Boolean]",g4="[object Date]",m4="[object Error]",b4="[object Function]",_4="[object Map]",v4="[object Number]",y4="[object Object]",w4="[object RegExp]",k4="[object Set]",S4="[object String]",E4="[object WeakMap]",T4="[object ArrayBuffer]",M4="[object DataView]",C4="[object Float32Array]",P4="[object Float64Array]",A4="[object Int8Array]",x4="[object Int16Array]",O4="[object Int32Array]",R4="[object Uint8Array]",D4="[object Uint8ClampedArray]",L4="[object Uint16Array]",H4="[object Uint32Array]",rn={};rn[C4]=rn[P4]=rn[A4]=rn[x4]=rn[O4]=rn[R4]=rn[D4]=rn[L4]=rn[H4]=!0;rn[h4]=rn[d4]=rn[T4]=rn[p4]=rn[M4]=rn[g4]=rn[m4]=rn[b4]=rn[_4]=rn[v4]=rn[y4]=rn[w4]=rn[k4]=rn[S4]=rn[E4]=!1;function I4(t){return Xi(t)&&ga(t.length)&&!!rn[Qi(t)]}function Bp(t){return function(e){return t(e)}}var Fp=typeof Xs=="object"&&Xs&&!Xs.nodeType&&Xs,yl=Fp&&typeof Ys=="object"&&Ys&&!Ys.nodeType&&Ys,B4=yl&&yl.exports===Fp,fr=B4&&Op.process,Uc=(function(){try{var t=yl&&yl.require&&yl.require("util").types;return t||fr&&fr.binding&&fr.binding("util")}catch{}})(),Vc=Uc&&Uc.isTypedArray,Np=Vc?Bp(Vc):I4,F4=Object.prototype,N4=F4.hasOwnProperty;function j4(t,e){var n=Ps(t),s=!n&&ma(t),i=!n&&!s&&Dr(t),l=!n&&!s&&!i&&Np(t),o=n||s||i||l,a=o?l4(t.length,String):[],u=a.length;for(var f in t)N4.call(t,f)&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||l&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||da(f,u)))&&a.push(f);return a}function z4(t,e){return function(n){return t(e(n))}}var U4=z4(Object.keys,Object),V4=Object.prototype,W4=V4.hasOwnProperty;function q4(t){if(!i4(t))return U4(t);var e=[];for(var n in Object(t))W4.call(t,n)&&n!="constructor"&&e.push(n);return e}function ba(t){return Fo(t)?j4(t):q4(t)}var G4=/\\.|\\[(?:[^[\\]]*|(["'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,X4=/^\\w*$/;function _a(t,e){if(Ps(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||xl(t)?!0:X4.test(t)||!G4.test(t)||e!=null&&t in Object(e)}var Ol=Ri(Object,"create");function Y4(){this.__data__=Ol?Ol(null):{},this.size=0}function J4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var K4="__lodash_hash_undefined__",Z4=Object.prototype,Q4=Z4.hasOwnProperty;function $4(t){var e=this.__data__;if(Ol){var n=e[t];return n===K4?void 0:n}return Q4.call(e,t)?e[t]:void 0}var ew=Object.prototype,tw=ew.hasOwnProperty;function nw(t){var e=this.__data__;return Ol?e[t]!==void 0:tw.call(e,t)}var sw="__lodash_hash_undefined__";function iw(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ol&&e===void 0?sw:e,this}function Pi(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Pi.prototype.clear=Y4;Pi.prototype.delete=J4;Pi.prototype.get=$4;Pi.prototype.has=nw;Pi.prototype.set=iw;function lw(){this.__data__=[],this.size=0}function No(t,e){for(var n=t.length;n--;)if(pa(t[n][0],e))return n;return-1}var ow=Array.prototype,rw=ow.splice;function aw(t){var e=this.__data__,n=No(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():rw.call(e,n,1),--this.size,!0}function uw(t){var e=this.__data__,n=No(e,t);return n<0?void 0:e[n][1]}function cw(t){return No(this.__data__,t)>-1}function fw(t,e){var n=this.__data__,s=No(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}function Qs(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Qs.prototype.clear=lw;Qs.prototype.delete=aw;Qs.prototype.get=uw;Qs.prototype.has=cw;Qs.prototype.set=fw;var Rl=Ri(Zs,"Map");function hw(){this.size=0,this.__data__={hash:new Pi,map:new(Rl||Qs),string:new Pi}}function dw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function jo(t,e){var n=t.__data__;return dw(e)?n[typeof e=="string"?"string":"hash"]:n.map}function pw(t){var e=jo(this,t).delete(t);return this.size-=e?1:0,e}function gw(t){return jo(this,t).get(t)}function mw(t){return jo(this,t).has(t)}function bw(t,e){var n=jo(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}function $s(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}$s.prototype.clear=hw;$s.prototype.delete=pw;$s.prototype.get=gw;$s.prototype.has=mw;$s.prototype.set=bw;var _w="Expected a function";function va(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(_w);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],l=n.cache;if(l.has(i))return l.get(i);var o=t.apply(this,s);return n.cache=l.set(i,o)||l,o};return n.cache=new(va.Cache||$s),n}va.Cache=$s;var vw=500;function yw(t){var e=va(t,function(s){return n.size===vw&&n.clear(),s}),n=e.cache;return e}var ww=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|(["'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,kw=/\\\\(\\\\)?/g,Sw=yw(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ww,function(n,s,i,l){e.push(i?l.replace(kw,"$1"):s||n)}),e});function Ew(t){return t==null?"":Dp(t)}function jp(t,e){return Ps(t)?t:_a(t,e)?[t]:Sw(Ew(t))}function zo(t){if(typeof t=="string"||xl(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function ya(t,e){e=jp(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[zo(e[n++])];return n&&n==s?t:void 0}function Tw(t,e,n){var s=t==null?void 0:ya(t,e);return s===void 0?n:s}function zp(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var Wc=Fs?Fs.isConcatSpreadable:void 0;function Mw(t){return Ps(t)||ma(t)||!!(Wc&&t&&t[Wc])}function Cw(t,e,n,s,i){var l=-1,o=t.length;for(n||(n=Mw),i||(i=[]);++l<o;){var a=t[l];n(a)?zp(i,a):i[i.length]=a}return i}function Pw(){this.__data__=new Qs,this.size=0}function Aw(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function xw(t){return this.__data__.get(t)}function Ow(t){return this.__data__.has(t)}var Rw=200;function Dw(t,e){var n=this.__data__;if(n instanceof Qs){var s=n.__data__;if(!Rl||s.length<Rw-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new $s(s)}return n.set(t,e),this.size=n.size,this}function Js(t){var e=this.__data__=new Qs(t);this.size=e.size}Js.prototype.clear=Pw;Js.prototype.delete=Aw;Js.prototype.get=xw;Js.prototype.has=Ow;Js.prototype.set=Dw;function Lw(t,e){for(var n=-1,s=t==null?0:t.length,i=0,l=[];++n<s;){var o=t[n];e(o,n,t)&&(l[i++]=o)}return l}function Hw(){return[]}var Iw=Object.prototype,Bw=Iw.propertyIsEnumerable,qc=Object.getOwnPropertySymbols,Fw=qc?function(t){return t==null?[]:(t=Object(t),Lw(qc(t),function(e){return Bw.call(t,e)}))}:Hw;function Nw(t,e,n){var s=e(t);return Ps(t)?s:zp(s,n(t))}function Gc(t){return Nw(t,ba,Fw)}var Lr=Ri(Zs,"DataView"),Hr=Ri(Zs,"Promise"),Ir=Ri(Zs,"Set"),Xc="[object Map]",jw="[object Object]",Yc="[object Promise]",Jc="[object Set]",Kc="[object WeakMap]",Zc="[object DataView]",zw=Oi(Lr),Uw=Oi(Rl),Vw=Oi(Hr),Ww=Oi(Ir),qw=Oi(Rr),ti=Qi;(Lr&&ti(new Lr(new ArrayBuffer(1)))!=Zc||Rl&&ti(new Rl)!=Xc||Hr&&ti(Hr.resolve())!=Yc||Ir&&ti(new Ir)!=Jc||Rr&&ti(new Rr)!=Kc)&&(ti=function(t){var e=Qi(t),n=e==jw?t.constructor:void 0,s=n?Oi(n):"";if(s)switch(s){case zw:return Zc;case Uw:return Xc;case Vw:return Yc;case Ww:return Jc;case qw:return Kc}return e});var Qc=Zs.Uint8Array,Gw="__lodash_hash_undefined__";function Xw(t){return this.__data__.set(t,Gw),this}function Yw(t){return this.__data__.has(t)}function Mo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new $s;++e<n;)this.add(t[e])}Mo.prototype.add=Mo.prototype.push=Xw;Mo.prototype.has=Yw;function Jw(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}function Kw(t,e){return t.has(e)}var Zw=1,Qw=2;function Up(t,e,n,s,i,l){var o=n&Zw,a=t.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var f=l.get(t),h=l.get(e);if(f&&h)return f==e&&h==t;var p=-1,g=!0,m=n&Qw?new Mo:void 0;for(l.set(t,e),l.set(e,t);++p<a;){var b=t[p],_=e[p];if(s)var y=o?s(_,b,p,e,t,l):s(b,_,p,t,e,l);if(y!==void 0){if(y)continue;g=!1;break}if(m){if(!Jw(e,function(k,w){if(!Kw(m,w)&&(b===k||i(b,k,n,s,l)))return m.push(w)})){g=!1;break}}else if(!(b===_||i(b,_,n,s,l))){g=!1;break}}return l.delete(t),l.delete(e),g}function $w(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}function ek(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var tk=1,nk=2,sk="[object Boolean]",ik="[object Date]",lk="[object Error]",ok="[object Map]",rk="[object Number]",ak="[object RegExp]",uk="[object Set]",ck="[object String]",fk="[object Symbol]",hk="[object ArrayBuffer]",dk="[object DataView]",$c=Fs?Fs.prototype:void 0,hr=$c?$c.valueOf:void 0;function pk(t,e,n,s,i,l,o){switch(n){case dk:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case hk:return!(t.byteLength!=e.byteLength||!l(new Qc(t),new Qc(e)));case sk:case ik:case rk:return pa(+t,+e);case lk:return t.name==e.name&&t.message==e.message;case ak:case ck:return t==e+"";case ok:var a=$w;case uk:var u=s&tk;if(a||(a=ek),t.size!=e.size&&!u)return!1;var f=o.get(t);if(f)return f==e;s|=nk,o.set(t,e);var h=Up(a(t),a(e),s,i,l,o);return o.delete(t),h;case fk:if(hr)return hr.call(t)==hr.call(e)}return!1}var gk=1,mk=Object.prototype,bk=mk.hasOwnProperty;function _k(t,e,n,s,i,l){var o=n&gk,a=Gc(t),u=a.length,f=Gc(e),h=f.length;if(u!=h&&!o)return!1;for(var p=u;p--;){var g=a[p];if(!(o?g in e:bk.call(e,g)))return!1}var m=l.get(t),b=l.get(e);if(m&&b)return m==e&&b==t;var _=!0;l.set(t,e),l.set(e,t);for(var y=o;++p<u;){g=a[p];var k=t[g],w=e[g];if(s)var S=o?s(w,k,g,e,t,l):s(k,w,g,t,e,l);if(!(S===void 0?k===w||i(k,w,n,s,l):S)){_=!1;break}y||(y=g=="constructor")}if(_&&!y){var P=t.constructor,M=e.constructor;P!=M&&"constructor"in t&&"constructor"in e&&!(typeof P=="function"&&P instanceof P&&typeof M=="function"&&M instanceof M)&&(_=!1)}return l.delete(t),l.delete(e),_}var vk=1,ef="[object Arguments]",tf="[object Array]",io="[object Object]",yk=Object.prototype,nf=yk.hasOwnProperty;function wk(t,e,n,s,i,l){var o=Ps(t),a=Ps(e),u=o?tf:ti(t),f=a?tf:ti(e);u=u==ef?io:u,f=f==ef?io:f;var h=u==io,p=f==io,g=u==f;if(g&&Dr(t)){if(!Dr(e))return!1;o=!0,h=!1}if(g&&!h)return l||(l=new Js),o||Np(t)?Up(t,e,n,s,i,l):pk(t,e,u,n,s,i,l);if(!(n&vk)){var m=h&&nf.call(t,"__wrapped__"),b=p&&nf.call(e,"__wrapped__");if(m||b){var _=m?t.value():t,y=b?e.value():e;return l||(l=new Js),i(_,y,n,s,l)}}return g?(l||(l=new Js),_k(t,e,n,s,i,l)):!1}function wa(t,e,n,s,i){return t===e?!0:t==null||e==null||!Xi(t)&&!Xi(e)?t!==t&&e!==e:wk(t,e,n,s,wa,i)}var kk=1,Sk=2;function Ek(t,e,n,s){var i=n.length,l=i;if(t==null)return!l;for(t=Object(t);i--;){var o=n[i];if(o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i<l;){o=n[i];var a=o[0],u=t[a],f=o[1];if(o[2]){if(u===void 0&&!(a in t))return!1}else{var h=new Js,p;if(!(p===void 0?wa(f,u,kk|Sk,s,h):p))return!1}}return!0}function Vp(t){return t===t&&!Io(t)}function Tk(t){for(var e=ba(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,Vp(i)]}return e}function Wp(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Mk(t){var e=Tk(t);return e.length==1&&e[0][2]?Wp(e[0][0],e[0][1]):function(n){return n===t||Ek(n,t,e)}}function Ck(t,e){return t!=null&&e in Object(t)}function Pk(t,e,n){e=jp(e,t);for(var s=-1,i=e.length,l=!1;++s<i;){var o=zo(e[s]);if(!(l=t!=null&&n(t,o)))break;t=t[o]}return l||++s!=i?l:(i=t==null?0:t.length,!!i&&ga(i)&&da(o,i)&&(Ps(t)||ma(t)))}function Ak(t,e){return t!=null&&Pk(t,e,Ck)}var xk=1,Ok=2;function Rk(t,e){return _a(t)&&Vp(e)?Wp(zo(t),e):function(n){var s=Tw(n,t);return s===void 0&&s===e?Ak(n,t):wa(e,s,xk|Ok)}}function Dk(t){return function(e){return e?.[t]}}function Lk(t){return function(e){return ya(e,t)}}function Hk(t){return _a(t)?Dk(zo(t)):Lk(t)}function Ik(t){return typeof t=="function"?t:t==null?Bo:typeof t=="object"?Ps(t)?Rk(t[0],t[1]):Mk(t):Hk(t)}function Bk(t){return function(e,n,s){for(var i=-1,l=Object(e),o=s(e),a=o.length;a--;){var u=o[++i];if(n(l[u],u,l)===!1)break}return e}}var Fk=Bk();function Nk(t,e){return t&&Fk(t,e,ba)}function jk(t,e){return function(n,s){if(n==null)return n;if(!Fo(n))return t(n,s);for(var i=n.length,l=-1,o=Object(n);++l<i&&s(o[l],l,o)!==!1;);return n}}var zk=jk(Nk);function Uk(t,e){var n=-1,s=Fo(t)?Array(t.length):[];return zk(t,function(i,l,o){s[++n]=e(i,l,o)}),s}function Vk(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Wk(t,e){if(t!==e){var n=t!==void 0,s=t===null,i=t===t,l=xl(t),o=e!==void 0,a=e===null,u=e===e,f=xl(e);if(!a&&!f&&!l&&t>e||l&&o&&u&&!a&&!f||s&&o&&u||!n&&u||!i)return 1;if(!s&&!l&&!f&&t<e||f&&n&&i&&!s&&!l||a&&n&&i||!o&&i||!u)return-1}return 0}function qk(t,e,n){for(var s=-1,i=t.criteria,l=e.criteria,o=i.length,a=n.length;++s<o;){var u=Wk(i[s],l[s]);if(u){if(s>=a)return u;var f=n[s];return u*(f=="desc"?-1:1)}}return t.index-e.index}function Gk(t,e,n){e.length?e=ho(e,function(l){return Ps(l)?function(o){return ya(o,l.length===1?l[0]:l)}:l}):e=[Bo];var s=-1;e=ho(e,Bp(Ik));var i=Uk(t,function(l,o,a){var u=ho(e,function(f){return f(l)});return{criteria:u,index:++s,value:l}});return Vk(i,function(l,o){return qk(l,o,n)})}var Xk=t4(function(t,e){if(t==null)return[];var n=e.length;return n>1&&Fc(t,e[0],e[1])?e=[]:n>2&&Fc(e[0],e[1],e[2])&&(e=[e[0]]),Gk(t,Cw(e),[])});const sf="/__ui/api";class qp{static async getAll(){const e=await fetch(\`\${sf}/transformers\`);if(!e.ok)throw new Error(\`HTTP \${e.status}: \${e.statusText}\`);const n=await e.json();return n.plugins||n.transformers||[]}static async getById(e){const n=await fetch(\`\${sf}/transformers/\${encodeURIComponent(e)}\`);if(!n.ok)throw new Error(\`HTTP \${n.status}: \${n.statusText}\`);return await n.json()}}let lo=null;async function Yk(){if(lo===null)try{lo=await qp.getAll()}catch(t){console.warn("Failed to fetch transformers from API, using fallback:",t),lo=["openai-to-anthropic","anthropic-to-openai","anthropic-to-gemini"]}return lo}function Gp(t,e){const n=[],s=\`upstreams[\${e}]\`;if(!t.target)n.push({field:\`\${s}.target\`,message:ps(xt)("validation.targetRequired")});else try{const i=new URL(t.target);["http:","https:"].includes(i.protocol)||n.push({field:\`\${s}.target\`,message:ps(xt)("validation.targetProtocol")})}catch{n.push({field:\`\${s}.target\`,message:ps(xt)("validation.invalidUrl")})}return t.weight!==void 0&&(typeof t.weight!="number"||t.weight<=0)&&n.push({field:\`\${s}.weight\`,message:ps(xt)("validation.weightPositive")}),t.priority!==void 0&&(typeof t.priority!="number"||t.priority<0)&&n.push({field:\`\${s}.priority\`,message:ps(xt)("validation.priorityNonNegative")}),n}function Jk(t){const e=[];return t.some(s=>s.weight!==void 0)&&t.reduce((i,l)=>i+(l.weight||0),0)===0&&e.push({field:"upstreams",message:ps(xt)("validation.totalWeightPositive")}),e}async function Kk(t,e){const n=Gp(t,e),s=\`upstreams[\${e}]\`;if(t.plugins&&t.plugins.length>0){const i=t.plugins[0];if(typeof i=="string")try{const l=await Yk();if(!l.includes(i)){const o=ps(xt);n.push({field:\`\${s}.plugins\`,message:o("validation.unknownTransformer",{values:{transformer:i,options:l.join(", ")}})})}}catch(l){console.warn("Failed to validate plugin:",l)}}return n}async function Zk(t){const e=[];if(t.path?t.path.startsWith("/")||e.push({field:"path",message:ps(xt)("validation.pathStartSlash")}):e.push({field:"path",message:ps(xt)("validation.pathRequired")}),!t.upstreams||t.upstreams.length===0)e.push({field:"upstreams",message:ps(xt)("validation.upstreamRequired")});else{const n=t.upstreams.map((i,l)=>Kk(i,l));(await Promise.all(n)).forEach(i=>e.push(...i))}return t.pathRewrite&&Object.keys(t.pathRewrite).forEach(n=>{try{new RegExp(n)}catch{const s=ps(xt);e.push({field:\`pathRewrite.\${n}\`,message:s("validation.invalidRegex",{values:{pattern:n}})})}}),t.failover?.enabled&&(t.failover.retryableStatusCodes&&t.failover.retryableStatusCodes.forEach(n=>{if(n<100||n>599){const s=ps(xt);e.push({field:"failover.retryableStatusCodes",message:s("validation.invalidStatusCode",{values:{code:n}})})}}),t.failover.recoveryIntervalMs!==void 0&&t.failover.recoveryIntervalMs<=0&&e.push({field:"failover.recoveryIntervalMs",message:ps(xt)("validation.recoveryIntervalPositive")}),t.failover.recoveryTimeoutMs!==void 0&&t.failover.recoveryTimeoutMs<=0&&e.push({field:"failover.recoveryTimeoutMs",message:ps(xt)("validation.recoveryTimeoutPositive")})),e}function lf(t,e,n){const s=t.slice();return s[19]=e[n],s[20]=e,s[21]=n,s}function of(t,e,n){const s=t.slice();return s[19]=e[n],s[22]=e,s[21]=n,s}function rf(t){let e,n,s;return{c(){e=d("span"),n=E("Support dynamic expressions: "),s=d("code"),s.textContent="{{ expression }}",c(s,"class","text-xs"),c(e,"class","label-text-alt text-xs")},m(i,l){I(i,e,l),r(e,n),r(e,s)},d(i){i&&H(e)}}}function af(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[12].call(n,t[22],t[21])}function g(){t[13].call(l,t[22],t[21])}function m(){return t[14](t[21])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[19].key),r(e,i),r(e,l),ne(l,t[19].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),_&4&&n.value!==t[19].key&&ne(n,t[19].key),_&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),_&4&&l.value!==t[19].value&&ne(l,t[19].value)},d(b){b&&H(e),f=!1,ht(h)}}}function uf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[16].call(n,t[20],t[21])}function g(){t[17].call(l,t[20],t[21])}function m(){return t[18](t[21])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[5]("headers.namePlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[5]("headers.valuePlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[19].key),r(e,i),r(e,l),ne(l,t[19].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&32&&s!==(s=t[5]("headers.namePlaceholder"))&&c(n,"placeholder",s),_&16&&n.value!==t[19].key&&ne(n,t[19].key),_&32&&o!==(o=t[5]("headers.valuePlaceholder"))&&c(l,"placeholder",o),_&16&&l.value!==t[19].value&&ne(l,t[19].value)},d(b){b&&H(e),f=!1,ht(h)}}}function Qk(t){let e,n,s,i,l,o,a,u,f,h,p,g=t[5]("headers.addHeader")+"",m,b,_=t[2].length+"",y,k,w,S,P,M,x=t[5]("headers.addHeader")+"",A,O,C,R,L,D,z=t[5]("headers.remove")+"",B,U,F,V,Y,j,q,Q=t[5]("headers.empty")+"",X,re,K,W,G,J,le=t[5]("headers.default")+"",se,N,te=t[4].length+"",Z,oe,Se,me,Ee,ye,ge=t[5]("headers.addHeader")+"",be,He,Te,Pe=t[1]&&rf(),_e=tt(t[2]),De=[];for(let ae=0;ae<_e.length;ae+=1)De[ae]=af(of(t,_e,ae));let ke=tt(t[4]),$=[];for(let ae=0;ae<ke.length;ae+=1)$[ae]=uf(lf(t,ke,ae));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),Pe&&Pe.c(),o=v(),a=d("div"),u=d("div"),f=d("input"),h=v(),p=d("div"),m=E(g),b=E(" ("),y=E(_),k=E(")"),w=v(),S=d("div");for(let ae=0;ae<De.length;ae+=1)De[ae].c();P=v(),M=d("button"),A=E(x),O=v(),C=d("div"),R=d("input"),L=v(),D=d("div"),B=E(z),U=v(),F=d("div"),V=d("input"),j=v(),q=d("p"),X=E(Q),re=v(),K=d("div"),W=d("input"),G=v(),J=d("div"),se=E(le),N=E(" ("),Z=E(te),oe=E(")"),Se=v(),me=d("div");for(let ae=0;ae<$.length;ae+=1)$[ae].c();Ee=v(),ye=d("button"),be=E(ge),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(M,"type","button"),c(M,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(R,"type","checkbox"),c(D,"class","collapse-title text-sm font-medium"),c(V,"type","text"),c(V,"placeholder",Y=t[5]("headers.namePlaceholder")),c(V,"class","input input-bordered input-sm w-full"),c(q,"class","text-xs text-gray-500 mt-1"),c(F,"class","collapse-content"),c(C,"class","collapse collapse-arrow bg-base-200"),c(W,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(ye,"type","button"),c(ye,"class","btn btn-sm btn-ghost"),c(me,"class","collapse-content space-y-2"),c(K,"class","collapse collapse-arrow bg-base-200"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(ae,ue){I(ae,e,ue),r(e,n),r(n,s),r(s,i),r(n,l),Pe&&Pe.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(u,h),r(u,p),r(p,m),r(p,b),r(p,y),r(p,k),r(u,w),r(u,S);for(let de=0;de<De.length;de+=1)De[de]&&De[de].m(S,null);r(S,P),r(S,M),r(M,A),r(a,O),r(a,C),r(C,R),r(C,L),r(C,D),r(D,B),r(C,U),r(C,F),r(F,V),ne(V,t[3]),r(F,j),r(F,q),r(q,X),r(a,re),r(a,K),r(K,W),r(K,G),r(K,J),r(J,se),r(J,N),r(J,Z),r(J,oe),r(K,Se),r(K,me);for(let de=0;de<$.length;de+=1)$[de]&&$[de].m(me,null);r(me,Ee),r(me,ye),r(ye,be),He||(Te=[ee(M,"click",t[6]),ee(V,"input",t[15]),ee(ye,"click",t[8])],He=!0)},p(ae,[ue]){if(ue&1&&T(i,ae[0]),ae[1]?Pe||(Pe=rf(),Pe.c(),Pe.m(n,null)):Pe&&(Pe.d(1),Pe=null),ue&32&&g!==(g=ae[5]("headers.addHeader")+"")&&T(m,g),ue&4&&_!==(_=ae[2].length+"")&&T(y,_),ue&164){_e=tt(ae[2]);let de;for(de=0;de<_e.length;de+=1){const fe=of(ae,_e,de);De[de]?De[de].p(fe,ue):(De[de]=af(fe),De[de].c(),De[de].m(S,P))}for(;de<De.length;de+=1)De[de].d(1);De.length=_e.length}if(ue&32&&x!==(x=ae[5]("headers.addHeader")+"")&&T(A,x),ue&32&&z!==(z=ae[5]("headers.remove")+"")&&T(B,z),ue&32&&Y!==(Y=ae[5]("headers.namePlaceholder"))&&c(V,"placeholder",Y),ue&8&&V.value!==ae[3]&&ne(V,ae[3]),ue&32&&Q!==(Q=ae[5]("headers.empty")+"")&&T(X,Q),ue&32&&le!==(le=ae[5]("headers.default")+"")&&T(se,le),ue&16&&te!==(te=ae[4].length+"")&&T(Z,te),ue&560){ke=tt(ae[4]);let de;for(de=0;de<ke.length;de+=1){const fe=lf(ae,ke,de);$[de]?$[de].p(fe,ue):($[de]=uf(fe),$[de].c(),$[de].m(me,Ee))}for(;de<$.length;de+=1)$[de].d(1);$.length=ke.length}ue&32&&ge!==(ge=ae[5]("headers.addHeader")+"")&&T(be,ge)},i:Ae,o:Ae,d(ae){ae&&H(e),Pe&&Pe.d(),Tn(De,ae),Tn($,ae),He=!1,ht(Te)}}}function $k(t,e,n){let s;Zt(t,xt,x=>n(5,s=x));let{value:i={}}=e,{label:l="Headers"}=e,{showHelp:o=!0}=e,a=[],u="",f=[],h=!1;function p(){n(2,a=[...a,{key:"",value:""}]),n(11,h=!0)}function g(x){n(2,a=a.filter((A,O)=>O!==x))}function m(){n(4,f=[...f,{key:"",value:""}]),n(11,h=!0)}function b(x){n(4,f=f.filter((A,O)=>O!==x))}function _(x,A){x[A].key=this.value,n(2,a),n(11,h),n(10,i),n(3,u),n(4,f)}function y(x,A){x[A].value=this.value,n(2,a),n(11,h),n(10,i),n(3,u),n(4,f)}const k=x=>g(x);function w(){u=this.value,n(3,u),n(11,h),n(10,i),n(2,a),n(4,f)}function S(x,A){x[A].key=this.value,n(4,f),n(11,h),n(10,i),n(2,a),n(3,u)}function P(x,A){x[A].value=this.value,n(4,f),n(11,h),n(10,i),n(2,a),n(3,u)}const M=x=>b(x);return t.$$set=x=>{"value"in x&&n(10,i=x.value),"label"in x&&n(0,l=x.label),"showHelp"in x&&n(1,o=x.showHelp)},t.$$.update=()=>{if(t.$$.dirty&3100){!h&&(i.add||i.remove||i.default)&&(n(2,a=Object.entries(i.add||{}).map(([C,R])=>({key:C,value:String(R)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.default||{}).map(([C,R])=>({key:C,value:String(R)}))),n(11,h=!0));const x={};a.filter(C=>C.key.trim()).forEach(C=>{x[C.key]=C.value}),n(10,i.add=Object.keys(x).length>0?x:void 0,i);const A=u.split(",").map(C=>C.trim()).filter(C=>C);n(10,i.remove=A.length>0?A:void 0,i);const O={};f.filter(C=>C.key.trim()).forEach(C=>{O[C.key]=C.value}),n(10,i.default=Object.keys(O).length>0?O:void 0,i)}},[l,o,a,u,f,s,p,g,m,b,i,h,_,y,k,w,S,P,M]}class Xp extends Gt{constructor(e){super(),qt(this,e,$k,Qk,Nt,{value:10,label:0,showHelp:1})}}function cf(t,e,n){const s=t.slice();return s[25]=e[n],s[26]=e,s[27]=n,s}function ff(t,e,n){const s=t.slice();return s[25]=e[n],s[28]=e,s[27]=n,s}function hf(t,e,n){const s=t.slice();return s[25]=e[n],s[29]=e,s[27]=n,s}function df(t){let e;return{c(){e=d("span"),e.textContent="Support JSON values and dynamic expressions",c(e,"class","label-text-alt text-xs")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function pf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[15].call(n,t[29],t[27])}function g(){t[16].call(l,t[29],t[27])}function m(){return t[17](t[27])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[25].key),r(e,i),r(e,l),ne(l,t[25].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),_&4&&n.value!==t[25].key&&ne(n,t[25].key),_&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),_&4&&l.value!==t[25].value&&ne(l,t[25].value)},d(b){b&&H(e),f=!1,ht(h)}}}function gf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[19].call(n,t[28],t[27])}function g(){t[20].call(l,t[28],t[27])}function m(){return t[21](t[27])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[25].key),r(e,i),r(e,l),ne(l,t[25].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),_&16&&n.value!==t[25].key&&ne(n,t[25].key),_&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),_&16&&l.value!==t[25].value&&ne(l,t[25].value)},d(b){b&&H(e),f=!1,ht(h)}}}function mf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[22].call(n,t[26],t[27])}function g(){t[23].call(l,t[26],t[27])}function m(){return t[24](t[27])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"type","text"),c(n,"placeholder",s=t[6]("headers.name")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"type","text"),c(l,"placeholder",o=t[6]("headers.value")),c(l,"class","input input-bordered input-sm flex-[2]"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[25].key),r(e,i),r(e,l),ne(l,t[25].value),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_&64&&s!==(s=t[6]("headers.name"))&&c(n,"placeholder",s),_&32&&n.value!==t[25].key&&ne(n,t[25].key),_&64&&o!==(o=t[6]("headers.value"))&&c(l,"placeholder",o),_&32&&l.value!==t[25].value&&ne(l,t[25].value)},d(b){b&&H(e),f=!1,ht(h)}}}function e3(t){let e,n,s,i,l,o,a,u,f,h,p,g=t[6]("common.add")+"",m,b,_=t[2].length+"",y,k,w,S,P,M,x=t[6]("common.add")+"",A,O,C,R,L,D,z=t[6]("headers.remove")+"",B,U,F,V,Y,j,q,Q=t[6]("headers.empty")+"",X,re,K,W,G,J,le=t[6]("body.replace")+"",se,N,te=t[4].length+"",Z,oe,Se,me,Ee,ye,ge=t[6]("common.add")+"",be,He,Te,Pe,_e,De,ke=t[6]("body.default")+"",$,ae,ue=t[5].length+"",de,fe,Be,Qe,We,Ye,nt=t[6]("common.add")+"",Je,rt,lt,he=t[1]&&df(),Re=tt(t[2]),Le=[];for(let we=0;we<Re.length;we+=1)Le[we]=pf(hf(t,Re,we));let ot=tt(t[4]),Ge=[];for(let we=0;we<ot.length;we+=1)Ge[we]=gf(ff(t,ot,we));let Ie=tt(t[5]),Ve=[];for(let we=0;we<Ie.length;we+=1)Ve[we]=mf(cf(t,Ie,we));return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),he&&he.c(),o=v(),a=d("div"),u=d("div"),f=d("input"),h=v(),p=d("div"),m=E(g),b=E(" ("),y=E(_),k=E(")"),w=v(),S=d("div");for(let we=0;we<Le.length;we+=1)Le[we].c();P=v(),M=d("button"),A=E(x),O=v(),C=d("div"),R=d("input"),L=v(),D=d("div"),B=E(z),U=v(),F=d("div"),V=d("input"),j=v(),q=d("p"),X=E(Q),re=v(),K=d("div"),W=d("input"),G=v(),J=d("div"),se=E(le),N=E(" ("),Z=E(te),oe=E(")"),Se=v(),me=d("div");for(let we=0;we<Ge.length;we+=1)Ge[we].c();Ee=v(),ye=d("button"),be=E(ge),He=v(),Te=d("div"),Pe=d("input"),_e=v(),De=d("div"),$=E(ke),ae=E(" ("),de=E(ue),fe=E(")"),Be=v(),Qe=d("div");for(let we=0;we<Ve.length;we+=1)Ve[we].c();We=v(),Ye=d("button"),Je=E(nt),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(f,"type","checkbox"),f.checked=!0,c(p,"class","collapse-title text-sm font-medium"),c(M,"type","button"),c(M,"class","btn btn-sm btn-ghost"),c(S,"class","collapse-content space-y-2"),c(u,"class","collapse collapse-arrow bg-base-200"),c(R,"type","checkbox"),c(D,"class","collapse-title text-sm font-medium"),c(V,"type","text"),c(V,"placeholder",Y=t[6]("body.placeholder")),c(V,"class","input input-bordered input-sm w-full"),c(q,"class","text-xs text-gray-500 mt-1"),c(F,"class","collapse-content"),c(C,"class","collapse collapse-arrow bg-base-200"),c(W,"type","checkbox"),c(J,"class","collapse-title text-sm font-medium"),c(ye,"type","button"),c(ye,"class","btn btn-sm btn-ghost"),c(me,"class","collapse-content space-y-2"),c(K,"class","collapse collapse-arrow bg-base-200"),c(Pe,"type","checkbox"),c(De,"class","collapse-title text-sm font-medium"),c(Ye,"type","button"),c(Ye,"class","btn btn-sm btn-ghost"),c(Qe,"class","collapse-content space-y-2"),c(Te,"class","collapse collapse-arrow bg-base-200"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(we,Ke){I(we,e,Ke),r(e,n),r(n,s),r(s,i),r(n,l),he&&he.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(u,h),r(u,p),r(p,m),r(p,b),r(p,y),r(p,k),r(u,w),r(u,S);for(let ve=0;ve<Le.length;ve+=1)Le[ve]&&Le[ve].m(S,null);r(S,P),r(S,M),r(M,A),r(a,O),r(a,C),r(C,R),r(C,L),r(C,D),r(D,B),r(C,U),r(C,F),r(F,V),ne(V,t[3]),r(F,j),r(F,q),r(q,X),r(a,re),r(a,K),r(K,W),r(K,G),r(K,J),r(J,se),r(J,N),r(J,Z),r(J,oe),r(K,Se),r(K,me);for(let ve=0;ve<Ge.length;ve+=1)Ge[ve]&&Ge[ve].m(me,null);r(me,Ee),r(me,ye),r(ye,be),r(a,He),r(a,Te),r(Te,Pe),r(Te,_e),r(Te,De),r(De,$),r(De,ae),r(De,de),r(De,fe),r(Te,Be),r(Te,Qe);for(let ve=0;ve<Ve.length;ve+=1)Ve[ve]&&Ve[ve].m(Qe,null);r(Qe,We),r(Qe,Ye),r(Ye,Je),rt||(lt=[ee(M,"click",t[7]),ee(V,"input",t[18]),ee(ye,"click",t[9]),ee(Ye,"click",t[11])],rt=!0)},p(we,[Ke]){if(Ke&1&&T(i,we[0]),we[1]?he||(he=df(),he.c(),he.m(n,null)):he&&(he.d(1),he=null),Ke&64&&g!==(g=we[6]("common.add")+"")&&T(m,g),Ke&4&&_!==(_=we[2].length+"")&&T(y,_),Ke&324){Re=tt(we[2]);let ve;for(ve=0;ve<Re.length;ve+=1){const Xe=hf(we,Re,ve);Le[ve]?Le[ve].p(Xe,Ke):(Le[ve]=pf(Xe),Le[ve].c(),Le[ve].m(S,P))}for(;ve<Le.length;ve+=1)Le[ve].d(1);Le.length=Re.length}if(Ke&64&&x!==(x=we[6]("common.add")+"")&&T(A,x),Ke&64&&z!==(z=we[6]("headers.remove")+"")&&T(B,z),Ke&64&&Y!==(Y=we[6]("body.placeholder"))&&c(V,"placeholder",Y),Ke&8&&V.value!==we[3]&&ne(V,we[3]),Ke&64&&Q!==(Q=we[6]("headers.empty")+"")&&T(X,Q),Ke&64&&le!==(le=we[6]("body.replace")+"")&&T(se,le),Ke&16&&te!==(te=we[4].length+"")&&T(Z,te),Ke&1104){ot=tt(we[4]);let ve;for(ve=0;ve<ot.length;ve+=1){const Xe=ff(we,ot,ve);Ge[ve]?Ge[ve].p(Xe,Ke):(Ge[ve]=gf(Xe),Ge[ve].c(),Ge[ve].m(me,Ee))}for(;ve<Ge.length;ve+=1)Ge[ve].d(1);Ge.length=ot.length}if(Ke&64&&ge!==(ge=we[6]("common.add")+"")&&T(be,ge),Ke&64&&ke!==(ke=we[6]("body.default")+"")&&T($,ke),Ke&32&&ue!==(ue=we[5].length+"")&&T(de,ue),Ke&4192){Ie=tt(we[5]);let ve;for(ve=0;ve<Ie.length;ve+=1){const Xe=cf(we,Ie,ve);Ve[ve]?Ve[ve].p(Xe,Ke):(Ve[ve]=mf(Xe),Ve[ve].c(),Ve[ve].m(Qe,We))}for(;ve<Ve.length;ve+=1)Ve[ve].d(1);Ve.length=Ie.length}Ke&64&&nt!==(nt=we[6]("common.add")+"")&&T(Je,nt)},i:Ae,o:Ae,d(we){we&&H(e),he&&he.d(),Tn(Le,we),Tn(Ge,we),Tn(Ve,we),rt=!1,ht(lt)}}}function t3(t,e,n){let s;Zt(t,xt,D=>n(6,s=D));let{value:i={}}=e,{label:l="Body"}=e,{showHelp:o=!0}=e,a=[],u="",f=[],h=[],p=!1;function g(){n(2,a=[...a,{key:"",value:""}]),n(14,p=!0)}function m(D){n(2,a=a.filter((z,B)=>B!==D))}function b(){n(4,f=[...f,{key:"",value:""}]),n(14,p=!0)}function _(D){n(4,f=f.filter((z,B)=>B!==D))}function y(){n(5,h=[...h,{key:"",value:""}]),n(14,p=!0)}function k(D){n(5,h=h.filter((z,B)=>B!==D))}function w(D,z){D[z].key=this.value,n(2,a),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}function S(D,z){D[z].value=this.value,n(2,a),n(14,p),n(13,i),n(3,u),n(4,f),n(5,h)}const P=D=>m(D);function M(){u=this.value,n(3,u),n(14,p),n(13,i),n(2,a),n(4,f),n(5,h)}function x(D,z){D[z].key=this.value,n(4,f),n(14,p),n(13,i),n(2,a),n(3,u),n(5,h)}function A(D,z){D[z].value=this.value,n(4,f),n(14,p),n(13,i),n(2,a),n(3,u),n(5,h)}const O=D=>_(D);function C(D,z){D[z].key=this.value,n(5,h),n(14,p),n(13,i),n(2,a),n(3,u),n(4,f)}function R(D,z){D[z].value=this.value,n(5,h),n(14,p),n(13,i),n(2,a),n(3,u),n(4,f)}const L=D=>k(D);return t.$$set=D=>{"value"in D&&n(13,i=D.value),"label"in D&&n(0,l=D.label),"showHelp"in D&&n(1,o=D.showHelp)},t.$$.update=()=>{if(t.$$.dirty&24636){!p&&(i.add||i.remove||i.replace||i.default)&&(n(2,a=Object.entries(i.add||{}).map(([F,V])=>({key:F,value:typeof V=="string"?V:JSON.stringify(V)}))),n(3,u=(i.remove||[]).join(", ")),n(4,f=Object.entries(i.replace||{}).map(([F,V])=>({key:F,value:typeof V=="string"?V:JSON.stringify(V)}))),n(5,h=Object.entries(i.default||{}).map(([F,V])=>({key:F,value:typeof V=="string"?V:JSON.stringify(V)}))),n(14,p=!0));const D={};a.filter(F=>F.key.trim()).forEach(F=>{try{D[F.key]=JSON.parse(F.value)}catch{D[F.key]=F.value}}),n(13,i.add=Object.keys(D).length>0?D:void 0,i);const z=u.split(",").map(F=>F.trim()).filter(F=>F);n(13,i.remove=z.length>0?z:void 0,i);const B={};f.filter(F=>F.key.trim()).forEach(F=>{try{B[F.key]=JSON.parse(F.value)}catch{B[F.key]=F.value}}),n(13,i.replace=Object.keys(B).length>0?B:void 0,i);const U={};h.filter(F=>F.key.trim()).forEach(F=>{try{U[F.key]=JSON.parse(F.value)}catch{U[F.key]=F.value}}),n(13,i.default=Object.keys(U).length>0?U:void 0,i)}},[l,o,a,u,f,h,s,g,m,b,_,y,k,i,p,w,S,P,M,x,A,O,C,R,L]}class Yp extends Gt{constructor(e){super(),qt(this,e,t3,e3,Nt,{value:13,label:0,showHelp:1})}}function bf(t,e,n){const s=t.slice();return s[16]=e[n],s}function _f(t){let e,n=t[16].name+"",s,i;return{c(){e=d("option"),s=E(n),e.__value=i=t[16].id,ne(e,e.__value)},m(l,o){I(l,e,o),r(e,s)},p(l,o){o&64&&n!==(n=l[16].name+"")&&T(s,n),o&64&&i!==(i=l[16].id)&&(e.__value=i,ne(e,e.__value))},d(l){l&&H(e)}}}function vf(t){let e,n,s=t[6].find(t[12])?.description+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-gray-500"),c(e,"class","label")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o&65&&s!==(s=l[6].find(l[12])?.description+"")&&T(i,s)},d(l){l&&H(e)}}}function yf(t){let e,n,s=t[2]?"Hide":"Show",i,l,o,a,u,f,h=t[2]&&wf(t);return{c(){e=d("div"),n=d("button"),i=E(s),l=E(" Preview"),o=v(),h&&h.c(),a=Zn(),c(n,"type","button"),c(n,"class","btn btn-xs btn-outline"),c(e,"class","flex items-center gap-2")},m(p,g){I(p,e,g),r(e,n),r(n,i),r(n,l),I(p,o,g),h&&h.m(p,g),I(p,a,g),u||(f=ee(n,"click",t[13]),u=!0)},p(p,g){g&4&&s!==(s=p[2]?"Hide":"Show")&&T(i,s),p[2]?h?h.p(p,g):(h=wf(p),h.c(),h.m(a.parentNode,a)):h&&(h.d(1),h=null)},d(p){p&&(H(e),H(o),H(a)),h&&h.d(p),u=!1,f()}}}function wf(t){let e,n,s,i=t[7]("plugin.testPlugin")+"",l,o,a,u,f,h,p=t[7]("plugin.input")+"",g,m,b,_,y,k,w,S,P=t[7]("plugin.output")+"",M,x,A,O,C,R,L,D,z,B,U=t[7]("plugin.testPlugin")+"",F,V,Y,j,q,Q=(t[4]||t[5])&&kf(t),X=t[5]&&Sf(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=v(),b=d("textarea"),y=v(),k=d("div"),w=d("label"),S=d("span"),M=E(P),x=v(),A=d("textarea"),C=v(),R=d("div"),L=d("button"),D=pe("svg"),z=pe("path"),B=v(),F=E(U),V=v(),Q&&Q.c(),Y=v(),X&&X.c(),c(s,"class","font-semibold text-sm"),c(h,"class","label-text text-xs"),c(f,"class","label py-1"),c(f,"for","plugin-input"),c(b,"id","plugin-input"),c(b,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full"),c(b,"placeholder",_=t[7]("plugin.inputPlaceholder")),c(b,"rows","10"),c(S,"class","label-text text-xs"),c(w,"class","label py-1"),c(w,"for","plugin-output"),c(A,"id","plugin-output"),c(A,"class","textarea textarea-bordered textarea-sm font-mono text-xs w-full bg-base-100"),A.value=t[4],A.readOnly=!0,c(A,"rows","10"),c(A,"placeholder",O=t[7]("plugin.outputPlaceholder")),c(a,"class","grid grid-cols-2 gap-4"),c(z,"stroke-linecap","round"),c(z,"stroke-linejoin","round"),c(z,"stroke-width","2"),c(z,"d","M14 5l7 7m0 0l-7 7m7-7H3"),c(D,"xmlns","http://www.w3.org/2000/svg"),c(D,"class","h-3 w-3"),c(D,"fill","none"),c(D,"viewBox","0 0 24 24"),c(D,"stroke","currentColor"),c(L,"type","button"),c(L,"class","btn btn-xs btn-primary"),c(R,"class","flex gap-2"),c(n,"class","card-body p-4 space-y-3"),c(e,"class","card bg-base-200")},m(re,K){I(re,e,K),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,f),r(f,h),r(h,g),r(u,m),r(u,b),ne(b,t[3]),r(a,y),r(a,k),r(k,w),r(w,S),r(S,M),r(k,x),r(k,A),r(n,C),r(n,R),r(R,L),r(L,D),r(D,z),r(L,B),r(L,F),r(R,V),Q&&Q.m(R,null),r(n,Y),X&&X.m(n,null),j||(q=[ee(b,"input",t[14]),ee(L,"click",t[9])],j=!0)},p(re,K){K&128&&i!==(i=re[7]("plugin.testPlugin")+"")&&T(l,i),K&128&&p!==(p=re[7]("plugin.input")+"")&&T(g,p),K&128&&_!==(_=re[7]("plugin.inputPlaceholder"))&&c(b,"placeholder",_),K&8&&ne(b,re[3]),K&128&&P!==(P=re[7]("plugin.output")+"")&&T(M,P),K&16&&(A.value=re[4]),K&128&&O!==(O=re[7]("plugin.outputPlaceholder"))&&c(A,"placeholder",O),K&128&&U!==(U=re[7]("plugin.testPlugin")+"")&&T(F,U),re[4]||re[5]?Q?Q.p(re,K):(Q=kf(re),Q.c(),Q.m(R,null)):Q&&(Q.d(1),Q=null),re[5]?X?X.p(re,K):(X=Sf(re),X.c(),X.m(n,null)):X&&(X.d(1),X=null)},d(re){re&&H(e),Q&&Q.d(),X&&X.d(),j=!1,ht(q)}}}function kf(t){let e,n=t[7]("common.reset")+"",s,i,l;return{c(){e=d("button"),s=E(n),c(e,"type","button"),c(e,"class","btn btn-xs btn-ghost")},m(o,a){I(o,e,a),r(e,s),i||(l=ee(e,"click",t[10]),i=!0)},p(o,a){a&128&&n!==(n=o[7]("common.reset")+"")&&T(s,n)},d(o){o&&H(e),i=!1,l()}}}function Sf(t){let e,n,s,i,l,o=t[7]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[5]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(l,"class","text-xs"),c(e,"class","alert alert-error py-2")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p&128&&o!==(o=h[7]("common.error")+"")&&T(a,o),p&32&&T(f,h[5])},d(h){h&&H(e)}}}function n3(t){let e,n,s,i,l,o,a,u,f=t[7]("plugin.none")+"",h,p,g,m,b,_=tt(t[6]),y=[];for(let S=0;S<_.length;S+=1)y[S]=_f(bf(t,_,S));let k=t[0]&&vf(t),w=t[0]&&yf(t);return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),l=E(t[1]),o=v(),a=d("select"),u=d("option"),h=E(f);for(let S=0;S<y.length;S+=1)y[S].c();p=v(),k&&k.c(),g=v(),w&&w.c(),c(i,"class","label-text font-semibold"),c(s,"class","label"),c(s,"for","plugin-select"),u.__value=null,ne(u,u.__value),c(a,"id","plugin-select"),c(a,"class","select select-bordered"),t[0]===void 0&&vs(()=>t[11].call(a)),c(n,"class","form-control"),c(e,"class","space-y-3")},m(S,P){I(S,e,P),r(e,n),r(n,s),r(s,i),r(i,l),r(n,o),r(n,a),r(a,u),r(u,h);for(let M=0;M<y.length;M+=1)y[M]&&y[M].m(a,null);Cn(a,t[0],!0),r(n,p),k&&k.m(n,null),r(e,g),w&&w.m(e,null),m||(b=[ee(a,"change",t[11]),ee(a,"change",t[8])],m=!0)},p(S,[P]){if(P&2&&T(l,S[1]),P&128&&f!==(f=S[7]("plugin.none")+"")&&T(h,f),P&64){_=tt(S[6]);let M;for(M=0;M<_.length;M+=1){const x=bf(S,_,M);y[M]?y[M].p(x,P):(y[M]=_f(x),y[M].c(),y[M].m(a,null))}for(;M<y.length;M+=1)y[M].d(1);y.length=_.length}P&65&&Cn(a,S[0]),S[0]?k?k.p(S,P):(k=vf(S),k.c(),k.m(n,null)):k&&(k.d(1),k=null),S[0]?w?w.p(S,P):(w=yf(S),w.c(),w.m(e,null)):w&&(w.d(1),w=null)},i:Ae,o:Ae,d(S){S&&H(e),Tn(y,S),k&&k.d(),w&&w.d(),m=!1,ht(b)}}}function Jp(t){return t.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" \u2192 ")}function s3(t){const e=t.split("-to-");if(e.length===2){const[n,s]=e;return\`Convert \${n.charAt(0).toUpperCase()+n.slice(1)} API format to \${s.charAt(0).toUpperCase()+s.slice(1)} format\`}return\`\${Jp(t)} plugin\`}function i3(t,e,n){let s;Zt(t,xt,S=>n(7,s=S));let{plugin:i=null}=e,{label:l="Plugin"}=e;const o=Dl();let a=!1,u=\`{
21214
21215
  "model": "claude-3-5-sonnet-20241022",
21215
21216
  "messages": [
21216
21217
  {
@@ -21218,11 +21219,10 @@ Note: there are at least one loader still registered to this locale that wasn't
21218
21219
  "content": "Hello"
21219
21220
  }
21220
21221
  ]
21221
- }\`,f="",h=null,p=[];is(async()=>{try{const S=await Np.getAll();n(6,p=S.map(C=>({id:C,name:Vp(C),description:Jk(C)})))}catch(S){console.warn("Failed to load plugins from API, using fallback:",S),n(6,p=[{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(){o("change",i),n(4,f=""),n(5,h=null)}function m(){if(!i||!u){n(5,h=s("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const S=JSON.parse(u);let C;i==="anthropic-to-gemini"?C={contents:S.messages?.map(T=>({role:T.role==="user"?"user":"model",parts:[{text:T.content}]})),generationConfig:{temperature:S.temperature||1,maxOutputTokens:S.max_tokens||8192}}:i==="anthropic-to-openai"?C={model:S.model?.replace("claude","gpt-4"),messages:S.messages,temperature:S.temperature,max_tokens:S.max_tokens}:C={...S,_transformed:!0},n(4,f=JSON.stringify(C,null,2)),n(5,h=null)}catch(S){n(5,h=S.message),n(4,f="")}}function _(){n(4,f=""),n(5,h=null)}function b(){i=Is(this),n(0,i),n(6,p)}const k=S=>S.id===i,v=()=>n(2,r=!r);function y(){u=this.value,n(3,u)}return t.$$set=S=>{"plugin"in S&&n(0,i=S.plugin),"label"in S&&n(1,l=S.label)},[i,l,r,u,f,h,p,s,g,m,_,b,k,v,y]}class Wp extends zt{constructor(e){super(),jt(this,e,Kk,Yk,Lt,{plugin:0,label:1})}}function vf(t){let e,n,s=t[6].find(kf)?.message+"",i,l;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for",l="upstream-target-"+t[2])},m(o,r){H(o,e,r),a(e,n),a(n,i)},p(o,r){r&64&&s!==(s=o[6].find(kf)?.message+"")&&M(i,s),r&4&&l!==(l="upstream-target-"+o[2])&&c(e,"for",l)},d(o){o&&L(e)}}}function Zk(t){let e,n,s,i,l=t[7]("upstream.title",{values:{index:t[2]+1}})+"",o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O=t[7]("upstream.targetUrl")+"",A,x,P,D,I,R,U,N,z,B=t[6].some(yf),j,F,W,G,Y,Q=t[7]("upstream.weight")+"",le,Z,V,X=t[7]("upstream.weightHelp")+"",J,oe,ne,ee,se,K,q,ce,he,ke,we,pe,me,Pe,Se,Ce,_e,Ae,ye,$,ue,ae,ge,re=t[7]("upstream.transformerHelp")+"",Ne,Ye,Ve,Qe,st,Xe,vt,rt,He,$e,Oe,ft,qe,Re=B&&vf(t);function ze(Ke){t[11](Ke)}let ve={label:t[7]("upstream.transformer")};t[5]!==void 0&&(ve.plugin=t[5]),_e=new Wp({props:ve}),vn.push(()=>Kn(_e,"plugin",ze));function Je(Ke){t[13](Ke)}let be={label:t[7]("headers.title")};t[0].headers!==void 0&&(be.value=t[0].headers),Qe=new zp({props:be}),vn.push(()=>Kn(Qe,"value",Je));function We(Ke){t[14](Ke)}let yt={label:t[7]("body.title")};return t[0].body!==void 0&&(yt.value=t[0].body),He=new Up({props:yt}),vn.push(()=>Kn(He,"value",We)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),r=w(),u=d("div"),f=d("button"),h=de("svg"),p=de("path"),m=w(),_=d("button"),b=E("\u2715"),v=w(),y=d("div"),S=d("div"),C=d("label"),T=d("span"),A=E(O),x=w(),P=d("span"),P.textContent="*",I=w(),R=d("input"),z=w(),Re&&Re.c(),j=w(),F=d("div"),W=d("div"),G=d("label"),Y=d("span"),le=E(Q),Z=w(),V=d("span"),J=E(X),ne=w(),ee=d("input"),K=w(),q=d("div"),ce=d("label"),he=d("span"),he.textContent="Priority",ke=w(),we=d("span"),we.textContent="Failover order",me=w(),Pe=d("input"),Ce=w(),pt(_e.$$.fragment),ye=w(),$=d("div"),ue=d("input"),ae=w(),ge=d("div"),Ne=E(re),Ye=w(),Ve=d("div"),pt(Qe.$$.fragment),Xe=w(),vt=d("div"),rt=w(),pt(He.$$.fragment),c(i,"class","font-semibold"),c(p,"stroke-linecap","round"),c(p,"stroke-linejoin","round"),c(p,"stroke-width","2"),c(p,"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"),c(h,"xmlns","http://www.w3.org/2000/svg"),c(h,"class","h-4 w-4"),c(h,"fill","none"),c(h,"viewBox","0 0 24 24"),c(h,"stroke","currentColor"),c(f,"type","button"),c(f,"class","btn btn-sm btn-outline btn-square"),c(f,"title",g=t[7]("routeCard.duplicate")),c(_,"type","button"),c(_,"class","btn btn-sm btn-error btn-square"),c(_,"title",k=t[7]("upstream.remove")),c(u,"class","flex gap-2"),c(s,"class","flex justify-between items-center mb-4"),c(P,"class","text-error"),c(T,"class","label-text font-semibold"),c(C,"class","label"),c(C,"for",D="upstream-target-"+t[2]),c(R,"id",U="upstream-target-"+t[2]),c(R,"type","url"),c(R,"placeholder",N=t[7]("upstream.targetPlaceholder")),c(R,"class","input input-bordered"),R.required=!0,Rt(R,"input-error",t[6].some(wf)),c(S,"class","form-control"),c(Y,"class","label-text"),c(V,"class","label-text-alt text-xs"),c(G,"class","label"),c(G,"for",oe="upstream-weight-"+t[2]),c(ee,"id",se="upstream-weight-"+t[2]),c(ee,"type","number"),c(ee,"placeholder","100"),c(ee,"class","input input-bordered"),c(ee,"min","1"),c(W,"class","form-control"),c(he,"class","label-text"),c(we,"class","label-text-alt text-xs"),c(ce,"class","label"),c(ce,"for",pe="upstream-priority-"+t[2]),c(Pe,"id",Se="upstream-priority-"+t[2]),c(Pe,"type","number"),c(Pe,"placeholder","1"),c(Pe,"class","input input-bordered"),c(Pe,"min","0"),c(q,"class","form-control"),c(F,"class","grid grid-cols-2 gap-4"),c(ue,"type","checkbox"),c(ge,"class","collapse-title text-sm font-medium"),c(vt,"class","divider"),c(Ve,"class","collapse-content space-y-6"),c($,"class","collapse collapse-arrow bg-base-200"),c(y,"class","grid grid-cols-1 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-100 shadow-sm border border-base-300")},m(Ke,Ie){H(Ke,e,Ie),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,f),a(f,h),a(h,p),a(u,m),a(u,_),a(_,b),a(n,v),a(n,y),a(y,S),a(S,C),a(C,T),a(T,A),a(T,x),a(T,P),a(S,I),a(S,R),ie(R,t[0].target),a(S,z),Re&&Re.m(S,null),a(y,j),a(y,F),a(F,W),a(W,G),a(G,Y),a(Y,le),a(G,Z),a(G,V),a(V,J),a(W,ne),a(W,ee),ie(ee,t[0].weight),a(F,K),a(F,q),a(q,ce),a(ce,he),a(ce,ke),a(ce,we),a(q,me),a(q,Pe),ie(Pe,t[0].priority),a(y,Ce),ut(_e,y,null),a(y,ye),a(y,$),a($,ue),ue.checked=t[1],a($,ae),a($,ge),a(ge,Ne),a($,Ye),a($,Ve),ut(Qe,Ve,null),a(Ve,Xe),a(Ve,vt),a(Ve,rt),ut(He,Ve,null),Oe=!0,ft||(qe=[te(f,"click",function(){ui(t[4])&&t[4].apply(this,arguments)}),te(_,"click",function(){ui(t[3])&&t[3].apply(this,arguments)}),te(R,"input",t[8]),te(ee,"input",t[9]),te(Pe,"input",t[10]),te(ue,"change",t[12])],ft=!0)},p(Ke,[Ie]){t=Ke,(!Oe||Ie&132)&&l!==(l=t[7]("upstream.title",{values:{index:t[2]+1}})+"")&&M(o,l),(!Oe||Ie&128&&g!==(g=t[7]("routeCard.duplicate")))&&c(f,"title",g),(!Oe||Ie&128&&k!==(k=t[7]("upstream.remove")))&&c(_,"title",k),(!Oe||Ie&128)&&O!==(O=t[7]("upstream.targetUrl")+"")&&M(A,O),(!Oe||Ie&4&&D!==(D="upstream-target-"+t[2]))&&c(C,"for",D),(!Oe||Ie&4&&U!==(U="upstream-target-"+t[2]))&&c(R,"id",U),(!Oe||Ie&128&&N!==(N=t[7]("upstream.targetPlaceholder")))&&c(R,"placeholder",N),Ie&1&&R.value!==t[0].target&&ie(R,t[0].target),(!Oe||Ie&64)&&Rt(R,"input-error",t[6].some(wf)),Ie&64&&(B=t[6].some(yf)),B?Re?Re.p(t,Ie):(Re=vf(t),Re.c(),Re.m(S,null)):Re&&(Re.d(1),Re=null),(!Oe||Ie&128)&&Q!==(Q=t[7]("upstream.weight")+"")&&M(le,Q),(!Oe||Ie&128)&&X!==(X=t[7]("upstream.weightHelp")+"")&&M(J,X),(!Oe||Ie&4&&oe!==(oe="upstream-weight-"+t[2]))&&c(G,"for",oe),(!Oe||Ie&4&&se!==(se="upstream-weight-"+t[2]))&&c(ee,"id",se),Ie&1&&gt(ee.value)!==t[0].weight&&ie(ee,t[0].weight),(!Oe||Ie&4&&pe!==(pe="upstream-priority-"+t[2]))&&c(ce,"for",pe),(!Oe||Ie&4&&Se!==(Se="upstream-priority-"+t[2]))&&c(Pe,"id",Se),Ie&1&&gt(Pe.value)!==t[0].priority&&ie(Pe,t[0].priority);const kt={};Ie&128&&(kt.label=t[7]("upstream.transformer")),!Ae&&Ie&32&&(Ae=!0,kt.plugin=t[5],Jn(()=>Ae=!1)),_e.$set(kt),Ie&2&&(ue.checked=t[1]),(!Oe||Ie&128)&&re!==(re=t[7]("upstream.transformerHelp")+"")&&M(Ne,re);const nt={};Ie&128&&(nt.label=t[7]("headers.title")),!st&&Ie&1&&(st=!0,nt.value=t[0].headers,Jn(()=>st=!1)),Qe.$set(nt);const ht={};Ie&128&&(ht.label=t[7]("body.title")),!$e&&Ie&1&&($e=!0,ht.value=t[0].body,Jn(()=>$e=!1)),He.$set(ht)},i(Ke){Oe||(Be(_e.$$.fragment,Ke),Be(Qe.$$.fragment,Ke),Be(He.$$.fragment,Ke),Oe=!0)},o(Ke){Fe(_e.$$.fragment,Ke),Fe(Qe.$$.fragment,Ke),Fe(He.$$.fragment,Ke),Oe=!1},d(Ke){Ke&&L(e),Re&&Re.d(),ct(_e),ct(Qe),ct(He),ft=!1,at(qe)}}}const yf=t=>t.field.includes("target"),wf=t=>t.field.includes("target"),kf=t=>t.field.includes("target");function Qk(t,e,n){let s,i;Gt(t,Et,y=>n(7,i=y));let{upstream:l}=e,{index:o}=e,{onRemove:r}=e,{onDuplicate:u}=e,{showAdvanced:f=!1}=e,h=l.plugins?.[0]||null;function p(){l.target=this.value,n(0,l),n(5,h)}function g(){l.weight=gt(this.value),n(0,l),n(5,h)}function m(){l.priority=gt(this.value),n(0,l),n(5,h)}function _(y){h=y,n(5,h)}function b(){f=this.checked,n(1,f)}function k(y){t.$$.not_equal(l.headers,y)&&(l.headers=y,n(0,l),n(5,h))}function v(y){t.$$.not_equal(l.body,y)&&(l.body=y,n(0,l),n(5,h))}return t.$$set=y=>{"upstream"in y&&n(0,l=y.upstream),"index"in y&&n(2,o=y.index),"onRemove"in y&&n(3,r=y.onRemove),"onDuplicate"in y&&n(4,u=y.onDuplicate),"showAdvanced"in y&&n(1,f=y.showAdvanced)},t.$$.update=()=>{t.$$.dirty&1&&(n(0,l.headers=l.headers||{add:{},remove:[],default:{}},l),n(0,l.body=l.body||{add:{},remove:[],replace:{},default:{}},l)),t.$$.dirty&32&&n(0,l.plugins=h?[h]:void 0,l),t.$$.dirty&5&&n(6,s=jp(l,o))},[l,f,o,r,u,h,s,i,p,g,m,_,b,k,v]}class $k extends zt{constructor(e){super(),jt(this,e,Qk,Zk,Lt,{upstream:0,index:2,onRemove:3,onDuplicate:4,showAdvanced:1})}}function Sf(t,e,n){const s=t.slice();return s[7]=e[n],s}function Ef(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=et(t[1]),_=[];for(let b=0;b<m.length;b+=1)_[b]=Tf(Sf(t,m,b));return{c(){e=d("div"),n=d("div"),s=d("h3"),s.textContent="Select Route Template",i=w(),l=d("div");for(let b=0;b<_.length;b+=1)_[b].c();o=w(),r=d("div"),u=d("button"),u.textContent="Close",f=w(),h=d("button"),c(s,"class","font-bold text-lg mb-4"),c(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(u,"type","button"),c(u,"class","btn btn-sm"),c(r,"class","modal-action"),c(n,"class","modal-box max-w-4xl"),c(h,"type","button"),c(h,"class","modal-backdrop"),c(h,"aria-label","Close modal"),c(e,"class","modal modal-open")},m(b,k){H(b,e,k),a(e,n),a(n,s),a(n,i),a(n,l);for(let v=0;v<_.length;v+=1)_[v]&&_[v].m(l,null);a(n,o),a(n,r),a(r,u),a(e,f),a(e,h),p||(g=[te(u,"click",t[4]),te(h,"click",t[5])],p=!0)},p(b,k){if(k&6){m=et(b[1]);let v;for(v=0;v<m.length;v+=1){const y=Sf(b,m,v);_[v]?_[v].p(y,k):(_[v]=Tf(y),_[v].c(),_[v].m(l,null))}for(;v<_.length;v+=1)_[v].d(1);_.length=m.length}},d(b){b&&L(e),En(_,b),p=!1,at(g)}}}function Tf(t){let e,n,s,i,l,o,r,u,f,h,p;function g(){return t[3](t[7])}return{c(){e=d("button"),n=d("div"),s=d("h4"),s.textContent=\`\${t[7].name}\`,i=w(),l=d("p"),l.textContent=\`\${t[7].description}\`,o=w(),r=d("div"),u=d("div"),u.textContent=\`\${JSON.stringify(t[7].template,null,2)}\`,f=w(),c(s,"class","card-title text-base"),c(l,"class","text-sm text-gray-600"),c(u,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),c(r,"class","mt-2"),c(n,"class","card-body"),c(e,"type","button"),c(e,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(n,i),a(n,l),a(n,o),a(n,r),a(r,u),a(e,f),h||(p=te(e,"click",g),h=!0)},p(m,_){t=m},d(m){m&&L(e),h=!1,p()}}}function e3(t){let e,n=t[0]&&Ef(t);return{c(){n&&n.c(),e=$n()},m(s,i){n&&n.m(s,i),H(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Ef(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ee,o:Ee,d(s){s&&L(e),n&&n.d(s)}}}function t3(t,e,n){let{showTemplates:s=!1}=e;const i=Rl(),l=[{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 o(h){i("select",h.template),n(0,s=!1)}const r=h=>o(h),u=()=>n(0,s=!1),f=()=>n(0,s=!1);return t.$$set=h=>{"showTemplates"in h&&n(0,s=h.showTemplates)},[s,l,o,r,u,f]}class n3 extends zt{constructor(e){super(),jt(this,e,t3,e3,Lt,{showTemplates:0})}}function Mf(t){let e,n=t[22]("routeEditor.failoverHelp")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&4194304&&n!==(n=i[22]("routeEditor.failoverHelp")+"")&&M(s,n)},d(i){i&&L(e)}}}function Cf(t){let e,n,s,i=t[22]("routeEditor.retryableStatusCodes")+"",l,o,r,u,f,h,p,g=t[22]("routeEditor.retryableStatusCodesHelp")+"",m,_,b,k,v,y,S=t[22]("routeEditor.passiveHealthCheck")+"",C,T,O,A,x,P,D,I,R=t[22]("routeEditor.passiveHealthCheckTooltip")+"",U,N,z,B,j,F,W=t[22]("routeEditor.consecutiveFailuresThreshold")+"",G,Y,Q,le,Z,V,X=t[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",J,oe,ne,ee,se,K=t[22]("routeEditor.healthyThreshold")+"",q,ce,he,ke,we,pe,me=t[22]("routeEditor.healthyThresholdHelp")+"",Pe,Se,Ce,_e,Ae,ye=t[22]("routeEditor.requestTimeoutMs")+"",$,ue,ae,ge,re,Ne,Ye=t[22]("routeEditor.requestTimeoutMsHelp")+"",Ve,Qe,st,Xe,vt,rt=t[22]("routeEditor.connectTimeoutMs")+"",He,$e,Oe,ft,qe,Re,ze=t[22]("routeEditor.connectTimeoutMsHelp")+"",ve,Je,be,We,yt,Ke=t[22]("routeEditor.recoveryIntervalMs")+"",Ie,kt,nt,ht,Ot,Te,it=t[22]("routeEditor.recoveryIntervalHelp")+"",De,tt,Ht,Rn,pn,xe=t[22]("routeEditor.recoveryTimeoutMs")+"",lt,an,Mt,ls,Tn,zn,It=t[22]("routeEditor.recoveryTimeoutHelp")+"",gn,Dn,un,mn,Pn,Fn,Ln=t[22]("routeEditor.activeHealthCheck")+"",Un,os,Ut,Mn,Hn,hn,Vn,An,wn=t[22]("routeEditor.activeHealthCheckTooltip")+"",kn,Wn,rs,St,Xt,qn,as,ot=t[22]("routeEditor.enableActiveHealthCheck")+"",es,_s,xt,Ct,$t,nn,sn,en=t[22]("routeEditor.slowStart")+"",Vt,ts,Wt,qt,Bt,tn,Pt,Yt,Jt=t[22]("routeEditor.slowStartTooltip")+"",cn,Kt,Zt,Ue,ln,bn,fe,Le=t[22]("routeEditor.enableSlowStart")+"",Qt,vs,ys,Gn,ns,_n,Xn,As,js=t[22]("routeEditor.failoverInfoNotice")+"",gi,Os,mi,In=t[11]&&Pf(t),Nn=t[19]&&Af(t);return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=w(),r=d("input"),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),b=d("div"),k=d("input"),v=w(),y=d("div"),C=E(S),T=w(),O=d("div"),A=d("div"),x=de("svg"),P=de("path"),D=w(),I=d("span"),U=E(R),N=w(),z=d("div"),B=d("div"),j=d("label"),F=d("span"),G=E(W),Y=w(),Q=d("input"),le=w(),Z=d("div"),V=d("span"),J=E(X),oe=w(),ne=d("div"),ee=d("label"),se=d("span"),q=E(K),ce=w(),he=d("input"),ke=w(),we=d("div"),pe=d("span"),Pe=E(me),Se=w(),Ce=d("div"),_e=d("label"),Ae=d("span"),$=E(ye),ue=w(),ae=d("input"),ge=w(),re=d("div"),Ne=d("span"),Ve=E(Ye),Qe=w(),st=d("div"),Xe=d("label"),vt=d("span"),He=E(rt),$e=w(),Oe=d("input"),ft=w(),qe=d("div"),Re=d("span"),ve=E(ze),Je=w(),be=d("div"),We=d("label"),yt=d("span"),Ie=E(Ke),kt=w(),nt=d("input"),ht=w(),Ot=d("div"),Te=d("span"),De=E(it),tt=w(),Ht=d("div"),Rn=d("label"),pn=d("span"),lt=E(xe),an=w(),Mt=d("input"),ls=w(),Tn=d("div"),zn=d("span"),gn=E(It),Dn=w(),un=d("div"),mn=d("input"),Pn=w(),Fn=d("div"),Un=E(Ln),os=w(),Ut=d("div"),Mn=d("div"),Hn=de("svg"),hn=de("path"),Vn=w(),An=d("span"),kn=E(wn),Wn=w(),rs=d("div"),St=d("label"),Xt=d("input"),qn=w(),as=d("span"),es=E(ot),_s=w(),In&&In.c(),xt=w(),Ct=d("div"),$t=d("input"),nn=w(),sn=d("div"),Vt=E(en),ts=w(),Wt=d("div"),qt=d("div"),Bt=de("svg"),tn=de("path"),Pt=w(),Yt=d("span"),cn=E(Jt),Kt=w(),Zt=d("div"),Ue=d("label"),ln=d("input"),bn=w(),fe=d("span"),Qt=E(Le),vs=w(),Nn&&Nn.c(),ys=w(),Gn=d("div"),ns=de("svg"),_n=de("path"),Xn=w(),As=d("div"),gi=E(js),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","failover-status-codes"),c(r,"id","failover-status-codes"),c(r,"type","text"),c(r,"placeholder",u=t[22]("routeEditor.retryableStatusCodesPlaceholder")),c(r,"class","input input-bordered input-sm"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(e,"class","form-control"),c(k,"type","checkbox"),c(y,"class","collapse-title text-sm font-medium"),c(P,"stroke-linecap","round"),c(P,"stroke-linejoin","round"),c(P,"stroke-width","2"),c(P,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(x,"xmlns","http://www.w3.org/2000/svg"),c(x,"fill","none"),c(x,"viewBox","0 0 24 24"),c(x,"class","stroke-current shrink-0 w-4 h-4"),c(A,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(F,"class","label-text"),c(j,"class","label"),c(j,"for","consecutive-failures-threshold"),c(Q,"id","consecutive-failures-threshold"),c(Q,"type","number"),c(Q,"placeholder","3"),c(Q,"class","input input-bordered input-sm"),c(Q,"min","1"),c(V,"class","label-text-alt text-xs"),c(Z,"class","label"),c(B,"class","form-control"),c(se,"class","label-text"),c(ee,"class","label"),c(ee,"for","healthy-threshold"),c(he,"id","healthy-threshold"),c(he,"type","number"),c(he,"placeholder","2"),c(he,"class","input input-bordered input-sm"),c(he,"min","1"),c(pe,"class","label-text-alt text-xs"),c(we,"class","label"),c(ne,"class","form-control"),c(Ae,"class","label-text"),c(_e,"class","label"),c(_e,"for","request-timeout-ms"),c(ae,"id","request-timeout-ms"),c(ae,"type","number"),c(ae,"placeholder","30000"),c(ae,"class","input input-bordered input-sm"),c(ae,"min","100"),c(Ne,"class","label-text-alt text-xs"),c(re,"class","label"),c(Ce,"class","form-control"),c(vt,"class","label-text"),c(Xe,"class","label"),c(Xe,"for","connect-timeout-ms"),c(Oe,"id","connect-timeout-ms"),c(Oe,"type","number"),c(Oe,"placeholder","5000"),c(Oe,"class","input input-bordered input-sm"),c(Oe,"min","100"),c(Re,"class","label-text-alt text-xs"),c(qe,"class","label"),c(st,"class","form-control"),c(yt,"class","label-text"),c(We,"class","label"),c(We,"for","recovery-interval-ms"),c(nt,"id","recovery-interval-ms"),c(nt,"type","number"),c(nt,"placeholder","5000"),c(nt,"class","input input-bordered input-sm"),c(nt,"min","1000"),c(Te,"class","label-text-alt text-xs"),c(Ot,"class","label"),c(be,"class","form-control"),c(pn,"class","label-text"),c(Rn,"class","label"),c(Rn,"for","recovery-timeout-ms"),c(Mt,"id","recovery-timeout-ms"),c(Mt,"type","number"),c(Mt,"placeholder","3000"),c(Mt,"class","input input-bordered input-sm"),c(Mt,"min","100"),c(zn,"class","label-text-alt text-xs"),c(Tn,"class","label"),c(Ht,"class","form-control"),c(z,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(O,"class","collapse-content space-y-4"),c(b,"class","collapse collapse-arrow bg-base-200"),c(mn,"type","checkbox"),c(Fn,"class","collapse-title text-sm font-medium"),c(hn,"stroke-linecap","round"),c(hn,"stroke-linejoin","round"),c(hn,"stroke-width","2"),c(hn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Hn,"xmlns","http://www.w3.org/2000/svg"),c(Hn,"fill","none"),c(Hn,"viewBox","0 0 24 24"),c(Hn,"class","stroke-current shrink-0 w-4 h-4"),c(Mn,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(Xt,"type","checkbox"),c(Xt,"class","checkbox checkbox-sm"),c(as,"class","label-text"),c(St,"class","label cursor-pointer justify-start gap-4"),c(rs,"class","form-control"),c(Ut,"class","collapse-content space-y-4"),c(un,"class","collapse collapse-arrow bg-base-200"),c($t,"type","checkbox"),c(sn,"class","collapse-title text-sm font-medium"),c(tn,"stroke-linecap","round"),c(tn,"stroke-linejoin","round"),c(tn,"stroke-width","2"),c(tn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Bt,"xmlns","http://www.w3.org/2000/svg"),c(Bt,"fill","none"),c(Bt,"viewBox","0 0 24 24"),c(Bt,"class","stroke-current shrink-0 w-4 h-4"),c(qt,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(ln,"type","checkbox"),c(ln,"class","checkbox checkbox-sm"),c(fe,"class","label-text"),c(Ue,"class","label cursor-pointer justify-start gap-4"),c(Zt,"class","form-control"),c(Wt,"class","collapse-content space-y-4"),c(Ct,"class","collapse collapse-arrow bg-base-200"),c(_n,"stroke-linecap","round"),c(_n,"stroke-linejoin","round"),c(_n,"stroke-width","2"),c(_n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(ns,"xmlns","http://www.w3.org/2000/svg"),c(ns,"fill","none"),c(ns,"viewBox","0 0 24 24"),c(ns,"class","stroke-current shrink-0 w-4 h-4"),c(Gn,"class","alert alert-info shadow-sm text-xs")},m(je,Ze){H(je,e,Ze),a(e,n),a(n,s),a(s,l),a(e,o),a(e,r),ie(r,t[4]),a(e,f),a(e,h),a(h,p),a(p,m),H(je,_,Ze),H(je,b,Ze),a(b,k),a(b,v),a(b,y),a(y,C),a(b,T),a(b,O),a(O,A),a(A,x),a(x,P),a(A,D),a(A,I),a(I,U),a(O,N),a(O,z),a(z,B),a(B,j),a(j,F),a(F,G),a(B,Y),a(B,Q),ie(Q,t[5]),a(B,le),a(B,Z),a(Z,V),a(V,J),a(z,oe),a(z,ne),a(ne,ee),a(ee,se),a(se,q),a(ne,ce),a(ne,he),ie(he,t[6]),a(ne,ke),a(ne,we),a(we,pe),a(pe,Pe),a(z,Se),a(z,Ce),a(Ce,_e),a(_e,Ae),a(Ae,$),a(Ce,ue),a(Ce,ae),ie(ae,t[7]),a(Ce,ge),a(Ce,re),a(re,Ne),a(Ne,Ve),a(z,Qe),a(z,st),a(st,Xe),a(Xe,vt),a(vt,He),a(st,$e),a(st,Oe),ie(Oe,t[8]),a(st,ft),a(st,qe),a(qe,Re),a(Re,ve),a(z,Je),a(z,be),a(be,We),a(We,yt),a(yt,Ie),a(be,kt),a(be,nt),ie(nt,t[9]),a(be,ht),a(be,Ot),a(Ot,Te),a(Te,De),a(z,tt),a(z,Ht),a(Ht,Rn),a(Rn,pn),a(pn,lt),a(Ht,an),a(Ht,Mt),ie(Mt,t[10]),a(Ht,ls),a(Ht,Tn),a(Tn,zn),a(zn,gn),H(je,Dn,Ze),H(je,un,Ze),a(un,mn),a(un,Pn),a(un,Fn),a(Fn,Un),a(un,os),a(un,Ut),a(Ut,Mn),a(Mn,Hn),a(Hn,hn),a(Mn,Vn),a(Mn,An),a(An,kn),a(Ut,Wn),a(Ut,rs),a(rs,St),a(St,Xt),Xt.checked=t[11],a(St,qn),a(St,as),a(as,es),a(Ut,_s),In&&In.m(Ut,null),H(je,xt,Ze),H(je,Ct,Ze),a(Ct,$t),a(Ct,nn),a(Ct,sn),a(sn,Vt),a(Ct,ts),a(Ct,Wt),a(Wt,qt),a(qt,Bt),a(Bt,tn),a(qt,Pt),a(qt,Yt),a(Yt,cn),a(Wt,Kt),a(Wt,Zt),a(Zt,Ue),a(Ue,ln),ln.checked=t[19],a(Ue,bn),a(Ue,fe),a(fe,Qt),a(Wt,vs),Nn&&Nn.m(Wt,null),H(je,ys,Ze),H(je,Gn,Ze),a(Gn,ns),a(ns,_n),a(Gn,Xn),a(Gn,As),a(As,gi),Os||(mi=[te(r,"input",t[28]),te(Q,"input",t[29]),te(he,"input",t[30]),te(ae,"input",t[31]),te(Oe,"input",t[32]),te(nt,"input",t[33]),te(Mt,"input",t[34]),te(Xt,"change",t[35]),te(ln,"change",t[43])],Os=!0)},p(je,Ze){Ze[0]&4194304&&i!==(i=je[22]("routeEditor.retryableStatusCodes")+"")&&M(l,i),Ze[0]&4194304&&u!==(u=je[22]("routeEditor.retryableStatusCodesPlaceholder"))&&c(r,"placeholder",u),Ze[0]&16&&r.value!==je[4]&&ie(r,je[4]),Ze[0]&4194304&&g!==(g=je[22]("routeEditor.retryableStatusCodesHelp")+"")&&M(m,g),Ze[0]&4194304&&S!==(S=je[22]("routeEditor.passiveHealthCheck")+"")&&M(C,S),Ze[0]&4194304&&R!==(R=je[22]("routeEditor.passiveHealthCheckTooltip")+"")&&M(U,R),Ze[0]&4194304&&W!==(W=je[22]("routeEditor.consecutiveFailuresThreshold")+"")&&M(G,W),Ze[0]&32&&gt(Q.value)!==je[5]&&ie(Q,je[5]),Ze[0]&4194304&&X!==(X=je[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&M(J,X),Ze[0]&4194304&&K!==(K=je[22]("routeEditor.healthyThreshold")+"")&&M(q,K),Ze[0]&64&&gt(he.value)!==je[6]&&ie(he,je[6]),Ze[0]&4194304&&me!==(me=je[22]("routeEditor.healthyThresholdHelp")+"")&&M(Pe,me),Ze[0]&4194304&&ye!==(ye=je[22]("routeEditor.requestTimeoutMs")+"")&&M($,ye),Ze[0]&128&&gt(ae.value)!==je[7]&&ie(ae,je[7]),Ze[0]&4194304&&Ye!==(Ye=je[22]("routeEditor.requestTimeoutMsHelp")+"")&&M(Ve,Ye),Ze[0]&4194304&&rt!==(rt=je[22]("routeEditor.connectTimeoutMs")+"")&&M(He,rt),Ze[0]&256&&gt(Oe.value)!==je[8]&&ie(Oe,je[8]),Ze[0]&4194304&&ze!==(ze=je[22]("routeEditor.connectTimeoutMsHelp")+"")&&M(ve,ze),Ze[0]&4194304&&Ke!==(Ke=je[22]("routeEditor.recoveryIntervalMs")+"")&&M(Ie,Ke),Ze[0]&512&&gt(nt.value)!==je[9]&&ie(nt,je[9]),Ze[0]&4194304&&it!==(it=je[22]("routeEditor.recoveryIntervalHelp")+"")&&M(De,it),Ze[0]&4194304&&xe!==(xe=je[22]("routeEditor.recoveryTimeoutMs")+"")&&M(lt,xe),Ze[0]&1024&&gt(Mt.value)!==je[10]&&ie(Mt,je[10]),Ze[0]&4194304&&It!==(It=je[22]("routeEditor.recoveryTimeoutHelp")+"")&&M(gn,It),Ze[0]&4194304&&Ln!==(Ln=je[22]("routeEditor.activeHealthCheck")+"")&&M(Un,Ln),Ze[0]&4194304&&wn!==(wn=je[22]("routeEditor.activeHealthCheckTooltip")+"")&&M(kn,wn),Ze[0]&2048&&(Xt.checked=je[11]),Ze[0]&4194304&&ot!==(ot=je[22]("routeEditor.enableActiveHealthCheck")+"")&&M(es,ot),je[11]?In?In.p(je,Ze):(In=Pf(je),In.c(),In.m(Ut,null)):In&&(In.d(1),In=null),Ze[0]&4194304&&en!==(en=je[22]("routeEditor.slowStart")+"")&&M(Vt,en),Ze[0]&4194304&&Jt!==(Jt=je[22]("routeEditor.slowStartTooltip")+"")&&M(cn,Jt),Ze[0]&524288&&(ln.checked=je[19]),Ze[0]&4194304&&Le!==(Le=je[22]("routeEditor.enableSlowStart")+"")&&M(Qt,Le),je[19]?Nn?Nn.p(je,Ze):(Nn=Af(je),Nn.c(),Nn.m(Wt,null)):Nn&&(Nn.d(1),Nn=null),Ze[0]&4194304&&js!==(js=je[22]("routeEditor.failoverInfoNotice")+"")&&M(gi,js)},d(je){je&&(L(e),L(_),L(b),L(Dn),L(un),L(xt),L(Ct),L(ys),L(Gn)),In&&In.d(),Nn&&Nn.d(),Os=!1,at(mi)}}}function Pf(t){let e,n,s,i,l=t[22]("routeEditor.healthCheckIntervalMs")+"",o,r,u,f,h,p,g=t[22]("routeEditor.healthCheckIntervalMsHelp")+"",m,_,b,k,v,y=t[22]("routeEditor.healthCheckTimeoutMs")+"",S,C,T,O,A,x,P=t[22]("routeEditor.healthCheckTimeoutMsHelp")+"",D,I,R,U,N,z=t[22]("routeEditor.healthCheckPath")+"",B,j,F,W,G,Y,Q=t[22]("routeEditor.healthCheckPathHelp")+"",le,Z,V,X,J,oe=t[22]("routeEditor.healthCheckMethod")+"",ne,ee,se,K,q,ce,he,ke,we,pe,me,Pe=t[22]("routeEditor.healthCheckExpectedStatus")+"",Se,Ce,_e,Ae,ye,$,ue=t[22]("routeEditor.healthCheckExpectedStatusHelp")+"",ae,ge,re,Ne,Ye,Ve=t[22]("routeEditor.healthCheckUnhealthyThreshold")+"",Qe,st,Xe,vt,rt,He,$e=t[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Oe,ft,qe,Re,ze,ve=t[22]("routeEditor.healthCheckHealthyThreshold")+"",Je,be,We,yt,Ke,Ie,kt=t[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",nt,ht,Ot;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),r=w(),u=d("input"),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),b=d("div"),k=d("label"),v=d("span"),S=E(y),C=w(),T=d("input"),O=w(),A=d("div"),x=d("span"),D=E(P),I=w(),R=d("div"),U=d("label"),N=d("span"),B=E(z),j=w(),F=d("input"),W=w(),G=d("div"),Y=d("span"),le=E(Q),Z=w(),V=d("div"),X=d("label"),J=d("span"),ne=E(oe),ee=w(),se=d("select"),K=d("option"),K.textContent="GET (default)",q=d("option"),q.textContent="GET",ce=d("option"),ce.textContent="POST",he=d("option"),he.textContent="HEAD",ke=w(),we=d("div"),pe=d("label"),me=d("span"),Se=E(Pe),Ce=w(),_e=d("input"),Ae=w(),ye=d("div"),$=d("span"),ae=E(ue),ge=w(),re=d("div"),Ne=d("label"),Ye=d("span"),Qe=E(Ve),st=w(),Xe=d("input"),vt=w(),rt=d("div"),He=d("span"),Oe=E($e),ft=w(),qe=d("div"),Re=d("label"),ze=d("span"),Je=E(ve),be=w(),We=d("input"),yt=w(),Ke=d("div"),Ie=d("span"),nt=E(kt),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","health-check-interval-ms"),c(u,"id","health-check-interval-ms"),c(u,"type","number"),c(u,"placeholder","10000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(v,"class","label-text"),c(k,"class","label"),c(k,"for","health-check-timeout-ms"),c(T,"id","health-check-timeout-ms"),c(T,"type","number"),c(T,"placeholder","3000"),c(T,"class","input input-bordered input-sm"),c(T,"min","100"),c(x,"class","label-text-alt text-xs"),c(A,"class","label"),c(b,"class","form-control"),c(N,"class","label-text"),c(U,"class","label"),c(U,"for","health-check-path"),c(F,"id","health-check-path"),c(F,"type","text"),c(F,"placeholder","/health"),c(F,"class","input input-bordered input-sm"),c(Y,"class","label-text-alt text-xs"),c(G,"class","label"),c(R,"class","form-control"),c(J,"class","label-text"),c(X,"class","label"),c(X,"for","health-check-method"),K.__value="",ie(K,K.__value),q.__value="GET",ie(q,q.__value),ce.__value="POST",ie(ce,ce.__value),he.__value="HEAD",ie(he,he.__value),c(se,"id","health-check-method"),c(se,"class","select select-bordered select-sm"),t[15]===void 0&&bs(()=>t[39].call(se)),c(V,"class","form-control"),c(me,"class","label-text"),c(pe,"class","label"),c(pe,"for","health-check-expected-status"),c(_e,"id","health-check-expected-status"),c(_e,"type","text"),c(_e,"placeholder","200"),c(_e,"class","input input-bordered input-sm"),c($,"class","label-text-alt text-xs"),c(ye,"class","label"),c(we,"class","form-control"),c(Ye,"class","label-text"),c(Ne,"class","label"),c(Ne,"for","health-check-unhealthy-threshold"),c(Xe,"id","health-check-unhealthy-threshold"),c(Xe,"type","number"),c(Xe,"placeholder","3"),c(Xe,"class","input input-bordered input-sm"),c(Xe,"min","1"),c(He,"class","label-text-alt text-xs"),c(rt,"class","label"),c(re,"class","form-control"),c(ze,"class","label-text"),c(Re,"class","label"),c(Re,"for","health-check-healthy-threshold"),c(We,"id","health-check-healthy-threshold"),c(We,"type","number"),c(We,"placeholder","2"),c(We,"class","input input-bordered input-sm"),c(We,"min","1"),c(Ie,"class","label-text-alt text-xs"),c(Ke,"class","label"),c(qe,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(Te,it){H(Te,e,it),a(e,n),a(n,s),a(s,i),a(i,o),a(n,r),a(n,u),ie(u,t[12]),a(n,f),a(n,h),a(h,p),a(p,m),a(e,_),a(e,b),a(b,k),a(k,v),a(v,S),a(b,C),a(b,T),ie(T,t[13]),a(b,O),a(b,A),a(A,x),a(x,D),a(e,I),a(e,R),a(R,U),a(U,N),a(N,B),a(R,j),a(R,F),ie(F,t[14]),a(R,W),a(R,G),a(G,Y),a(Y,le),a(e,Z),a(e,V),a(V,X),a(X,J),a(J,ne),a(V,ee),a(V,se),a(se,K),a(se,q),a(se,ce),a(se,he),Cn(se,t[15],!0),a(e,ke),a(e,we),a(we,pe),a(pe,me),a(me,Se),a(we,Ce),a(we,_e),ie(_e,t[16]),a(we,Ae),a(we,ye),a(ye,$),a($,ae),a(e,ge),a(e,re),a(re,Ne),a(Ne,Ye),a(Ye,Qe),a(re,st),a(re,Xe),ie(Xe,t[17]),a(re,vt),a(re,rt),a(rt,He),a(He,Oe),a(e,ft),a(e,qe),a(qe,Re),a(Re,ze),a(ze,Je),a(qe,be),a(qe,We),ie(We,t[18]),a(qe,yt),a(qe,Ke),a(Ke,Ie),a(Ie,nt),ht||(Ot=[te(u,"input",t[36]),te(T,"input",t[37]),te(F,"input",t[38]),te(se,"change",t[39]),te(_e,"input",t[40]),te(Xe,"input",t[41]),te(We,"input",t[42])],ht=!0)},p(Te,it){it[0]&4194304&&l!==(l=Te[22]("routeEditor.healthCheckIntervalMs")+"")&&M(o,l),it[0]&4096&&gt(u.value)!==Te[12]&&ie(u,Te[12]),it[0]&4194304&&g!==(g=Te[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&M(m,g),it[0]&4194304&&y!==(y=Te[22]("routeEditor.healthCheckTimeoutMs")+"")&&M(S,y),it[0]&8192&&gt(T.value)!==Te[13]&&ie(T,Te[13]),it[0]&4194304&&P!==(P=Te[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&M(D,P),it[0]&4194304&&z!==(z=Te[22]("routeEditor.healthCheckPath")+"")&&M(B,z),it[0]&16384&&F.value!==Te[14]&&ie(F,Te[14]),it[0]&4194304&&Q!==(Q=Te[22]("routeEditor.healthCheckPathHelp")+"")&&M(le,Q),it[0]&4194304&&oe!==(oe=Te[22]("routeEditor.healthCheckMethod")+"")&&M(ne,oe),it[0]&32768&&Cn(se,Te[15]),it[0]&4194304&&Pe!==(Pe=Te[22]("routeEditor.healthCheckExpectedStatus")+"")&&M(Se,Pe),it[0]&65536&&_e.value!==Te[16]&&ie(_e,Te[16]),it[0]&4194304&&ue!==(ue=Te[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&M(ae,ue),it[0]&4194304&&Ve!==(Ve=Te[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&M(Qe,Ve),it[0]&131072&&gt(Xe.value)!==Te[17]&&ie(Xe,Te[17]),it[0]&4194304&&$e!==($e=Te[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&M(Oe,$e),it[0]&4194304&&ve!==(ve=Te[22]("routeEditor.healthCheckHealthyThreshold")+"")&&M(Je,ve),it[0]&262144&&gt(We.value)!==Te[18]&&ie(We,Te[18]),it[0]&4194304&&kt!==(kt=Te[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&M(nt,kt)},d(Te){Te&&L(e),ht=!1,at(Ot)}}}function Af(t){let e,n,s,i,l=t[22]("routeEditor.slowStartDurationMs")+"",o,r,u,f,h,p,g=t[22]("routeEditor.slowStartDurationMsHelp")+"",m,_,b,k,v,y=t[22]("routeEditor.slowStartInitialWeightFactor")+"",S,C,T,O,A,x,P=t[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",D,I,R;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),r=w(),u=d("input"),f=w(),h=d("div"),p=d("span"),m=E(g),_=w(),b=d("div"),k=d("label"),v=d("span"),S=E(y),C=w(),T=d("input"),O=w(),A=d("div"),x=d("span"),D=E(P),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","slow-start-duration-ms"),c(u,"id","slow-start-duration-ms"),c(u,"type","number"),c(u,"placeholder","30000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(v,"class","label-text"),c(k,"class","label"),c(k,"for","slow-start-initial-weight-factor"),c(T,"id","slow-start-initial-weight-factor"),c(T,"type","number"),c(T,"placeholder","0.1"),c(T,"class","input input-bordered input-sm"),c(T,"min","0.01"),c(T,"max","1"),c(T,"step","0.01"),c(x,"class","label-text-alt text-xs"),c(A,"class","label"),c(b,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(U,N){H(U,e,N),a(e,n),a(n,s),a(s,i),a(i,o),a(n,r),a(n,u),ie(u,t[20]),a(n,f),a(n,h),a(h,p),a(p,m),a(e,_),a(e,b),a(b,k),a(k,v),a(v,S),a(b,C),a(b,T),ie(T,t[21]),a(b,O),a(b,A),a(A,x),a(x,D),I||(R=[te(u,"input",t[44]),te(T,"input",t[45])],I=!0)},p(U,N){N[0]&4194304&&l!==(l=U[22]("routeEditor.slowStartDurationMs")+"")&&M(o,l),N[0]&1048576&&gt(u.value)!==U[20]&&ie(u,U[20]),N[0]&4194304&&g!==(g=U[22]("routeEditor.slowStartDurationMsHelp")+"")&&M(m,g),N[0]&4194304&&y!==(y=U[22]("routeEditor.slowStartInitialWeightFactor")+"")&&M(S,y),N[0]&2097152&&gt(T.value)!==U[21]&&ie(T,U[21]),N[0]&4194304&&P!==(P=U[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&M(D,P)},d(U){U&&L(e),I=!1,at(R)}}}function s3(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=t[22]("routeEditor.enableFailover")+"",_,b,k,v,y=t[1]&&Mf(t),S=t[2]&&Cf(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=w(),y&&y.c(),o=w(),r=d("div"),u=d("div"),f=d("label"),h=d("input"),p=w(),g=d("span"),_=E(m),b=w(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(r,"class","space-y-4"),c(e,"class","form-control w-full")},m(C,T){H(C,e,T),a(e,n),a(n,s),a(s,i),a(n,l),y&&y.m(n,null),a(e,o),a(e,r),a(r,u),a(u,f),a(f,h),h.checked=t[2],a(f,p),a(f,g),a(g,_),a(r,b),S&&S.m(r,null),k||(v=[te(h,"change",t[26]),te(h,"change",t[27])],k=!0)},p(C,T){T[0]&1&&M(i,C[0]),C[1]?y?y.p(C,T):(y=Mf(C),y.c(),y.m(n,null)):y&&(y.d(1),y=null),T[0]&4&&(h.checked=C[2]),T[0]&4194304&&m!==(m=C[22]("routeEditor.enableFailover")+"")&&M(_,m),C[2]?S?S.p(C,T):(S=Cf(C),S.c(),S.m(r,null)):S&&(S.d(1),S=null)},i:Ee,o:Ee,d(C){C&&L(e),y&&y.d(),S&&S.d(),k=!1,at(v)}}}function Of(t){return t.split(",").map(e=>parseInt(e.trim())).filter(e=>!isNaN(e)&&e>=100&&e<600)}function i3(t,e,n){let s;Gt(t,Et,q=>n(22,s=q));let{value:i=void 0}=e,{label:l="Failover"}=e,{showHelp:o=!0}=e,r=!1,u=!1,f=[],h="",p,g,m,_,b,k,v=!1,y,S,C,T,O=[],A="",x,P,D=!1,I,R;function U(){r=this.checked,n(2,r),n(3,u),n(23,i),n(24,f),n(25,O),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}const N=()=>{n(3,u=!0)};function z(){h=this.value,n(4,h),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(16,A)}function B(){p=gt(this.value),n(5,p),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function j(){g=gt(this.value),n(6,g),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function F(){m=gt(this.value),n(7,m),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function W(){_=gt(this.value),n(8,_),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function G(){b=gt(this.value),n(9,b),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function Y(){k=gt(this.value),n(10,k),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function Q(){v=this.checked,n(11,v),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function le(){y=gt(this.value),n(12,y),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function Z(){S=gt(this.value),n(13,S),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function V(){C=this.value,n(14,C),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function X(){T=Is(this),n(15,T),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function J(){A=this.value,n(16,A),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h)}function oe(){x=gt(this.value),n(17,x),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(18,P),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function ne(){P=gt(this.value),n(18,P),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(19,D),n(20,I),n(21,R),n(4,h),n(16,A)}function ee(){D=this.checked,n(19,D),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(20,I),n(21,R),n(4,h),n(16,A)}function se(){I=gt(this.value),n(20,I),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(21,R),n(4,h),n(16,A)}function K(){R=gt(this.value),n(21,R),n(3,u),n(23,i),n(24,f),n(25,O),n(2,r),n(5,p),n(6,g),n(7,m),n(8,_),n(9,b),n(10,k),n(11,v),n(12,y),n(13,S),n(14,C),n(15,T),n(17,x),n(18,P),n(19,D),n(20,I),n(4,h),n(16,A)}return t.$$set=q=>{"value"in q&&n(23,i=q.value),"label"in q&&n(0,l=q.label),"showHelp"in q&&n(1,o=q.showHelp)},t.$$.update=()=>{t.$$.dirty[0]&62849004&&(!u&&i&&(n(2,r=i.enabled||!1),n(24,f=i.retryableStatusCodes||[500,502,503,504]),n(4,h=f.join(", ")),n(5,p=i.consecutiveFailuresThreshold),n(6,g=i.healthyThreshold),n(7,m=i.requestTimeoutMs),n(8,_=i.connectTimeoutMs),n(9,b=i.recoveryIntervalMs),n(10,k=i.recoveryTimeoutMs),i.healthCheck&&(n(11,v=i.healthCheck.enabled||!1),n(12,y=i.healthCheck.intervalMs),n(13,S=i.healthCheck.timeoutMs),n(14,C=i.healthCheck.path),n(15,T=i.healthCheck.method),n(25,O=i.healthCheck.expectedStatus||[200]),n(16,A=O.join(", ")),n(17,x=i.healthCheck.unhealthyThreshold),n(18,P=i.healthCheck.healthyThreshold)),i.slowStart&&(n(19,D=i.slowStart.enabled||!1),n(20,I=i.slowStart.durationMs),n(21,R=i.slowStart.initialWeightFactor)),n(3,u=!0)),r?i?(n(23,i.enabled=!0,i),n(23,i.retryableStatusCodes=f.length>0?f:[500,502,503,504],i),p!==void 0&&n(23,i.consecutiveFailuresThreshold=p,i),g!==void 0&&n(23,i.healthyThreshold=g,i),m!==void 0&&n(23,i.requestTimeoutMs=m,i),_!==void 0&&n(23,i.connectTimeoutMs=_,i),b!==void 0&&n(23,i.recoveryIntervalMs=b,i),k!==void 0&&n(23,i.recoveryTimeoutMs=k,i),v?n(23,i.healthCheck={enabled:!0,intervalMs:y,timeoutMs:S,path:C,method:T,expectedStatus:O.length>0?O:[200],unhealthyThreshold:x,healthyThreshold:P},i):n(23,i.healthCheck=void 0,i),D?n(23,i.slowStart={enabled:!0,durationMs:I,initialWeightFactor:R},i):n(23,i.slowStart=void 0,i)):n(23,i={enabled:!0,retryableStatusCodes:f.length>0?f:[500,502,503,504]}):n(23,i=void 0)),t.$$.dirty[0]&16&&n(24,f=Of(h)),t.$$.dirty[0]&65536&&n(25,O=Of(A))},[l,o,r,u,h,p,g,m,_,b,k,v,y,S,C,T,A,x,P,D,I,R,s,i,f,O,U,N,z,B,j,F,W,G,Y,Q,le,Z,V,X,J,oe,ne,ee,se,K]}class l3 extends zt{constructor(e){super(),jt(this,e,i3,s3,Lt,{value:23,label:0,showHelp:1},null,[-1,-1])}}const jn=[];for(let t=0;t<256;++t)jn.push((t+256).toString(16).slice(1));function o3(t,e=0){return(jn[t[e+0]]+jn[t[e+1]]+jn[t[e+2]]+jn[t[e+3]]+"-"+jn[t[e+4]]+jn[t[e+5]]+"-"+jn[t[e+6]]+jn[t[e+7]]+"-"+jn[t[e+8]]+jn[t[e+9]]+"-"+jn[t[e+10]]+jn[t[e+11]]+jn[t[e+12]]+jn[t[e+13]]+jn[t[e+14]]+jn[t[e+15]]).toLowerCase()}let fr;const r3=new Uint8Array(16);function a3(){if(!fr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fr=crypto.getRandomValues.bind(crypto)}return fr(r3)}const u3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xf={randomUUID:u3};function c3(t,e,n){t=t||{};const s=t.random??t.rng?.()??a3();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,o3(s)}function ol(t,e,n){return xf.randomUUID&&!t?xf.randomUUID():c3(t)}function Rf(t,e,n){const s=t.slice();return s[38]=e[n],s}function Df(t,e,n){const s=t.slice();return s[41]=e[n],s[42]=e,s[43]=n,s}function Lf(t,e,n){const s=t.slice();return s[44]=e[n],s[45]=e,s[43]=n,s}function Hf(t){let e,n,s,i,l=t[12]("routeEditor.useTemplate")+"",o,r,u;return{c(){e=d("button"),n=de("svg"),s=de("path"),i=w(),o=E(l),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"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"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(e,"type","button"),c(e,"class","btn btn-sm btn-outline")},m(f,h){H(f,e,h),a(e,n),a(n,s),a(e,i),a(e,o),r||(u=te(e,"click",t[23]),r=!0)},p(f,h){h[0]&4096&&l!==(l=f[12]("routeEditor.useTemplate")+"")&&M(o,l)},d(f){f&&L(e),r=!1,u()}}}function f3(t){let e,n,s,i,l=t[12]("routeEditor.routePath")+"",o,r,u,f,h,p=t[12]("routes.path")+"",g,m,_,b,k,v=t[12]("routeEditor.pathHelp")+"",y,S,C,T,O,A=t[8].some(Wf),x,P,D,I,R=t[12]("routeEditor.pathRewrite")+"",U,N,z=t[12]("routeEditor.optional")+"",B,j,F,W,G=t[12]("routeEditor.pathRewriteHelp")+"",Y,Q,le,Z,V,X=t[12]("routeEditor.addPathRewriteRule")+"",J,oe,ne,ee,se,K,q=t[12]("routeEditor.upstreams")+"",ce,he,ke,we,pe,me=t[12]("routeEditor.addUpstream")+"",Pe,Se,Ce=t[8].some(Vf),_e,Ae,ye=[],$=new Map,ue,ae,ge,re,Ne,Ye=t[12]("routeEditor.transformer")+"",Ve,Qe,st,Xe=t[12]("routeEditor.transformerHelp")+"",vt,rt,He,$e,Oe,ft,qe,Re,ze,ve,Je,be,We,yt,Ke,Ie,kt,nt,ht,Ot=t[12]("auth.routeAuth")+"",Te,it,De=t[12]("routeEditor.optional")+"",tt,Ht,Rn,pn,xe=t[12]("auth.routeAuthHelp")+"",lt,an,Mt,ls,Tn,zn,It,gn,Dn=t[12]("routeEditor.failoverTitle")+"",un,mn,Pn=t[12]("routeEditor.optional")+"",Fn,Ln,Un,os,Ut=t[12]("routeEditor.failoverHelp")+"",Mn,Hn,hn,Vn,An,wn,kn,Wn=t[12]("routeEditor.cancel")+"",rs,St,Xt,qn,as,ot,es,_s,xt=A&&If(t),Ct=et(t[1]),$t=[];for(let fe=0;fe<Ct.length;fe+=1)$t[fe]=Bf(Lf(t,Ct,fe));let nn=Ce&&Ff(t),sn=et(t[0].upstreams);const en=fe=>fe[41]._uid;for(let fe=0;fe<sn.length;fe+=1){let Le=Df(t,sn,fe),Qt=en(Le);$.set(Qt,ye[fe]=Nf(Qt,Le))}let Vt=t[9].length>0&&jf(t);function ts(fe){t[31](fe)}let Wt={label:t[12]("routeEditor.transformer")};t[2]!==void 0&&(Wt.plugin=t[2]),$e=new Wp({props:Wt}),vn.push(()=>Kn($e,"plugin",ts));function qt(fe){t[32](fe)}let Bt={label:t[12]("headers.title")};t[0].headers!==void 0&&(Bt.value=t[0].headers),ze=new zp({props:Bt}),vn.push(()=>Kn(ze,"value",qt));function tn(fe){t[33](fe)}let Pt={label:t[12]("body.title")};t[0].body!==void 0&&(Pt.value=t[0].body),yt=new Up({props:Pt}),vn.push(()=>Kn(yt,"value",tn));function Yt(fe){t[34](fe)}let Jt={label:t[12]("auth.routeAuth"),showHelp:!1};t[0].auth!==void 0&&(Jt.value=t[0].auth),Mt=new Ep({props:Jt}),vn.push(()=>Kn(Mt,"value",Yt));function cn(fe){t[35](fe)}let Kt={label:t[12]("routeEditor.failoverTitle"),showHelp:!1};t[0].failover!==void 0&&(Kt.value=t[0].failover),hn=new l3({props:Kt}),vn.push(()=>Kn(hn,"value",cn));function Zt(fe,Le){return fe[6]?p3:d3}let Ue=Zt(t),ln=Ue(t),bn=t[10].length>0&&zf(t);return{c(){e=d("form"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),r=w(),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=w(),_=d("span"),_.textContent="*",b=w(),k=d("span"),y=E(v),S=w(),C=d("input"),O=w(),xt&&xt.c(),x=w(),P=d("div"),D=d("label"),I=d("span"),U=E(R),N=E(" ("),B=E(z),j=E(")"),F=w(),W=d("span"),Y=E(G),Q=w(),le=d("div");for(let fe=0;fe<$t.length;fe+=1)$t[fe].c();Z=w(),V=d("button"),J=E(X),oe=w(),ne=d("div"),ee=d("div"),se=d("div"),K=d("h2"),ce=E(q),he=w(),ke=d("span"),ke.textContent="*",we=w(),pe=d("button"),Pe=E(me),Se=w(),nn&&nn.c(),_e=w(),Ae=d("div");for(let fe=0;fe<ye.length;fe+=1)ye[fe].c();ue=w(),Vt&&Vt.c(),ae=w(),ge=d("div"),re=d("div"),Ne=d("h2"),Ve=E(Ye),Qe=w(),st=d("p"),vt=E(Xe),rt=w(),He=d("div"),pt($e.$$.fragment),ft=w(),qe=d("div"),Re=w(),pt(ze.$$.fragment),Je=w(),be=d("div"),We=w(),pt(yt.$$.fragment),Ie=w(),kt=d("div"),nt=d("div"),ht=d("h2"),Te=E(Ot),it=E(" ("),tt=E(De),Ht=E(")"),Rn=w(),pn=d("p"),lt=E(xe),an=w(),pt(Mt.$$.fragment),Tn=w(),zn=d("div"),It=d("div"),gn=d("h2"),un=E(Dn),mn=E(" ("),Fn=E(Pn),Ln=E(")"),Un=w(),os=d("p"),Mn=E(Ut),Hn=w(),pt(hn.$$.fragment),An=w(),wn=d("div"),kn=d("button"),rs=E(Wn),St=w(),Xt=d("button"),ln.c(),as=w(),bn&&bn.c(),c(i,"class","card-title"),c(_,"class","text-error"),c(h,"class","label-text font-semibold"),c(k,"class","label-text-alt text-xs"),c(f,"class","label"),c(f,"for","route-path"),c(C,"id","route-path"),c(C,"type","text"),c(C,"placeholder",T=t[12]("routeEditor.pathPlaceholder")),c(C,"class","input input-bordered"),C.required=!0,Rt(C,"input-error",t[8].some(qf)),c(u,"class","form-control"),c(I,"class","label-text font-semibold"),c(W,"class","label-text-alt text-xs"),c(D,"class","label"),c(D,"for","path-rewrite-pattern-0"),c(V,"type","button"),c(V,"class","btn btn-sm btn-ghost"),c(le,"class","space-y-2"),c(P,"class","form-control"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-md"),c(ke,"class","text-error"),c(K,"class","card-title"),c(pe,"type","button"),c(pe,"class","btn btn-sm btn-primary"),c(se,"class","flex justify-between items-center"),c(Ae,"class","space-y-4 mt-4"),c(ee,"class","card-body"),c(ne,"class","card bg-base-100 shadow-md"),c(Ne,"class","card-title"),c(st,"class","text-sm text-gray-500 mb-4"),c(qe,"class","divider"),c(be,"class","divider"),c(He,"class","space-y-6"),c(re,"class","card-body"),c(ge,"class","card bg-base-100 shadow-md"),c(ht,"class","card-title"),c(pn,"class","text-sm text-gray-500 mb-4"),c(nt,"class","card-body"),c(kt,"class","card bg-base-100 shadow-md"),c(gn,"class","card-title"),c(os,"class","text-sm text-gray-500 mb-4"),c(It,"class","card-body"),c(zn,"class","card bg-base-100 shadow-md"),c(kn,"type","button"),c(kn,"class","btn btn-ghost"),kn.disabled=t[6],c(Xt,"type","submit"),c(Xt,"class","btn btn-primary"),Xt.disabled=qn=!t[11]||t[6],c(wn,"class","flex justify-end gap-4"),c(e,"class","space-y-8")},m(fe,Le){H(fe,e,Le),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,f),a(f,h),a(h,g),a(h,m),a(h,_),a(f,b),a(f,k),a(k,y),a(u,S),a(u,C),ie(C,t[0].path),a(u,O),xt&&xt.m(u,null),a(s,x),a(s,P),a(P,D),a(D,I),a(I,U),a(I,N),a(I,B),a(I,j),a(D,F),a(D,W),a(W,Y),a(P,Q),a(P,le);for(let Qt=0;Qt<$t.length;Qt+=1)$t[Qt]&&$t[Qt].m(le,null);a(le,Z),a(le,V),a(V,J),a(e,oe),a(e,ne),a(ne,ee),a(ee,se),a(se,K),a(K,ce),a(K,he),a(K,ke),a(se,we),a(se,pe),a(pe,Pe),a(ee,Se),nn&&nn.m(ee,null),a(ee,_e),a(ee,Ae);for(let Qt=0;Qt<ye.length;Qt+=1)ye[Qt]&&ye[Qt].m(Ae,null);a(ee,ue),Vt&&Vt.m(ee,null),a(e,ae),a(e,ge),a(ge,re),a(re,Ne),a(Ne,Ve),a(re,Qe),a(re,st),a(st,vt),a(re,rt),a(re,He),ut($e,He,null),a(He,ft),a(He,qe),a(He,Re),ut(ze,He,null),a(He,Je),a(He,be),a(He,We),ut(yt,He,null),a(e,Ie),a(e,kt),a(kt,nt),a(nt,ht),a(ht,Te),a(ht,it),a(ht,tt),a(ht,Ht),a(nt,Rn),a(nt,pn),a(pn,lt),a(nt,an),ut(Mt,nt,null),a(e,Tn),a(e,zn),a(zn,It),a(It,gn),a(gn,un),a(gn,mn),a(gn,Fn),a(gn,Ln),a(It,Un),a(It,os),a(os,Mn),a(It,Hn),ut(hn,It,null),a(e,An),a(e,wn),a(wn,kn),a(kn,rs),a(wn,St),a(wn,Xt),ln.m(Xt,null),a(e,as),bn&&bn.m(e,null),ot=!0,es||(_s=[te(C,"input",t[24]),te(V,"click",t[13]),te(pe,"click",t[15]),te(kn,"click",t[19]),te(e,"submit",Yp(t[18]))],es=!0)},p(fe,Le){if((!ot||Le[0]&4096)&&l!==(l=fe[12]("routeEditor.routePath")+"")&&M(o,l),(!ot||Le[0]&4096)&&p!==(p=fe[12]("routes.path")+"")&&M(g,p),(!ot||Le[0]&4096)&&v!==(v=fe[12]("routeEditor.pathHelp")+"")&&M(y,v),(!ot||Le[0]&4096&&T!==(T=fe[12]("routeEditor.pathPlaceholder")))&&c(C,"placeholder",T),Le[0]&1&&C.value!==fe[0].path&&ie(C,fe[0].path),(!ot||Le[0]&256)&&Rt(C,"input-error",fe[8].some(qf)),Le[0]&256&&(A=fe[8].some(Wf)),A?xt?xt.p(fe,Le):(xt=If(fe),xt.c(),xt.m(u,null)):xt&&(xt.d(1),xt=null),(!ot||Le[0]&4096)&&R!==(R=fe[12]("routeEditor.pathRewrite")+"")&&M(U,R),(!ot||Le[0]&4096)&&z!==(z=fe[12]("routeEditor.optional")+"")&&M(B,z),(!ot||Le[0]&4096)&&G!==(G=fe[12]("routeEditor.pathRewriteHelp")+"")&&M(Y,G),Le[0]&20482){Ct=et(fe[1]);let _n;for(_n=0;_n<Ct.length;_n+=1){const Xn=Lf(fe,Ct,_n);$t[_n]?$t[_n].p(Xn,Le):($t[_n]=Bf(Xn),$t[_n].c(),$t[_n].m(le,Z))}for(;_n<$t.length;_n+=1)$t[_n].d(1);$t.length=Ct.length}(!ot||Le[0]&4096)&&X!==(X=fe[12]("routeEditor.addPathRewriteRule")+"")&&M(J,X),(!ot||Le[0]&4096)&&q!==(q=fe[12]("routeEditor.upstreams")+"")&&M(ce,q),(!ot||Le[0]&4096)&&me!==(me=fe[12]("routeEditor.addUpstream")+"")&&M(Pe,me),Le[0]&256&&(Ce=fe[8].some(Vf)),Ce?nn?nn.p(fe,Le):(nn=Ff(fe),nn.c(),nn.m(ee,_e)):nn&&(nn.d(1),nn=null),Le[0]&196609&&(sn=et(fe[0].upstreams),gs(),ye=Ir(ye,Le,en,1,fe,sn,$,Ae,td,Nf,null,Df),ms()),fe[9].length>0?Vt?Vt.p(fe,Le):(Vt=jf(fe),Vt.c(),Vt.m(ee,null)):Vt&&(Vt.d(1),Vt=null),(!ot||Le[0]&4096)&&Ye!==(Ye=fe[12]("routeEditor.transformer")+"")&&M(Ve,Ye),(!ot||Le[0]&4096)&&Xe!==(Xe=fe[12]("routeEditor.transformerHelp")+"")&&M(vt,Xe);const Qt={};Le[0]&4096&&(Qt.label=fe[12]("routeEditor.transformer")),!Oe&&Le[0]&4&&(Oe=!0,Qt.plugin=fe[2],Jn(()=>Oe=!1)),$e.$set(Qt);const vs={};Le[0]&4096&&(vs.label=fe[12]("headers.title")),!ve&&Le[0]&1&&(ve=!0,vs.value=fe[0].headers,Jn(()=>ve=!1)),ze.$set(vs);const ys={};Le[0]&4096&&(ys.label=fe[12]("body.title")),!Ke&&Le[0]&1&&(Ke=!0,ys.value=fe[0].body,Jn(()=>Ke=!1)),yt.$set(ys),(!ot||Le[0]&4096)&&Ot!==(Ot=fe[12]("auth.routeAuth")+"")&&M(Te,Ot),(!ot||Le[0]&4096)&&De!==(De=fe[12]("routeEditor.optional")+"")&&M(tt,De),(!ot||Le[0]&4096)&&xe!==(xe=fe[12]("auth.routeAuthHelp")+"")&&M(lt,xe);const Gn={};Le[0]&4096&&(Gn.label=fe[12]("auth.routeAuth")),!ls&&Le[0]&1&&(ls=!0,Gn.value=fe[0].auth,Jn(()=>ls=!1)),Mt.$set(Gn),(!ot||Le[0]&4096)&&Dn!==(Dn=fe[12]("routeEditor.failoverTitle")+"")&&M(un,Dn),(!ot||Le[0]&4096)&&Pn!==(Pn=fe[12]("routeEditor.optional")+"")&&M(Fn,Pn),(!ot||Le[0]&4096)&&Ut!==(Ut=fe[12]("routeEditor.failoverHelp")+"")&&M(Mn,Ut);const ns={};Le[0]&4096&&(ns.label=fe[12]("routeEditor.failoverTitle")),!Vn&&Le[0]&1&&(Vn=!0,ns.value=fe[0].failover,Jn(()=>Vn=!1)),hn.$set(ns),(!ot||Le[0]&4096)&&Wn!==(Wn=fe[12]("routeEditor.cancel")+"")&&M(rs,Wn),(!ot||Le[0]&64)&&(kn.disabled=fe[6]),Ue===(Ue=Zt(fe))&&ln?ln.p(fe,Le):(ln.d(1),ln=Ue(fe),ln&&(ln.c(),ln.m(Xt,null))),(!ot||Le[0]&2112&&qn!==(qn=!fe[11]||fe[6]))&&(Xt.disabled=qn),fe[10].length>0?bn?bn.p(fe,Le):(bn=zf(fe),bn.c(),bn.m(e,null)):bn&&(bn.d(1),bn=null)},i(fe){if(!ot){for(let Le=0;Le<sn.length;Le+=1)Be(ye[Le]);Be($e.$$.fragment,fe),Be(ze.$$.fragment,fe),Be(yt.$$.fragment,fe),Be(Mt.$$.fragment,fe),Be(hn.$$.fragment,fe),ot=!0}},o(fe){for(let Le=0;Le<ye.length;Le+=1)Fe(ye[Le]);Fe($e.$$.fragment,fe),Fe(ze.$$.fragment,fe),Fe(yt.$$.fragment,fe),Fe(Mt.$$.fragment,fe),Fe(hn.$$.fragment,fe),ot=!1},d(fe){fe&&L(e),xt&&xt.d(),En($t,fe),nn&&nn.d();for(let Le=0;Le<ye.length;Le+=1)ye[Le].d();Vt&&Vt.d(),ct($e),ct(ze),ct(yt),ct(Mt),ct(hn),ln.d(),bn&&bn.d(),es=!1,at(_s)}}}function h3(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function If(t){let e,n,s=t[8].find(Gf)?.message+"",i;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for","route-path")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Gf)?.message+"")&&M(i,s)},d(l){l&&L(e)}}}function Bf(t){let e,n,s,i,l,o,r,u,f,h;function p(){t[25].call(n,t[45],t[43])}function g(){t[26].call(l,t[45],t[43])}function m(){return t[27](t[43])}return{c(){e=d("div"),n=d("input"),i=w(),l=d("input"),r=w(),u=d("button"),u.textContent="\u2715",c(n,"id",\`path-rewrite-pattern-\${t[43]}\`),c(n,"type","text"),c(n,"placeholder",s=t[12]("routeEditor.patternPlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"id",\`path-rewrite-replacement-\${t[43]}\`),c(l,"type","text"),c(l,"placeholder",o=t[12]("routeEditor.replacementPlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(_,b){H(_,e,b),a(e,n),ie(n,t[44].pattern),a(e,i),a(e,l),ie(l,t[44].replacement),a(e,r),a(e,u),f||(h=[te(n,"input",p),te(l,"input",g),te(u,"click",m)],f=!0)},p(_,b){t=_,b[0]&4096&&s!==(s=t[12]("routeEditor.patternPlaceholder"))&&c(n,"placeholder",s),b[0]&2&&n.value!==t[44].pattern&&ie(n,t[44].pattern),b[0]&4096&&o!==(o=t[12]("routeEditor.replacementPlaceholder"))&&c(l,"placeholder",o),b[0]&2&&l.value!==t[44].replacement&&ie(l,t[44].replacement)},d(_){_&&L(e),f=!1,at(h)}}}function Ff(t){let e,n,s=t[8].find(Xf)?.message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-error")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Xf)?.message+"")&&M(i,s)},d(l){l&&L(e)}}}function Nf(t,e){let n,s,i,l;function o(){return e[28](e[43])}function r(){return e[29](e[43])}function u(h){e[30](h,e[43])}let f={index:e[43],onRemove:o,onDuplicate:r};return e[0].upstreams[e[43]]!==void 0&&(f.upstream=e[0].upstreams[e[43]]),s=new $k({props:f}),vn.push(()=>Kn(s,"upstream",u)),{key:t,first:null,c(){n=$n(),pt(s.$$.fragment),this.first=n},m(h,p){H(h,n,p),ut(s,h,p),l=!0},p(h,p){e=h;const g={};p[0]&1&&(g.index=e[43]),p[0]&1&&(g.onRemove=o),p[0]&1&&(g.onDuplicate=r),!i&&p[0]&1&&(i=!0,g.upstream=e[0].upstreams[e[43]],Jn(()=>i=!1)),s.$set(g)},i(h){l||(Be(s.$$.fragment,h),l=!0)},o(h){Fe(s.$$.fragment,h),l=!1},d(h){h&&L(n),ct(s,h)}}}function jf(t){let e,n,s=t[9][0].message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-warning mt-4")},m(l,o){H(l,e,o),a(e,n),a(n,i)},p(l,o){o[0]&512&&s!==(s=l[9][0].message+"")&&M(i,s)},d(l){l&&L(e)}}}function d3(t){let e=t[12]("routeEditor.saveRoute")+"",n;return{c(){n=E(e)},m(s,i){H(s,n,i)},p(s,i){i[0]&4096&&e!==(e=s[12]("routeEditor.saveRoute")+"")&&M(n,e)},d(s){s&&L(n)}}}function p3(t){let e,n,s=t[12]("routeEditor.saving")+"",i;return{c(){e=d("span"),n=w(),i=E(s),c(e,"class","loading loading-spinner")},m(l,o){H(l,e,o),H(l,n,o),H(l,i,o)},p(l,o){o[0]&4096&&s!==(s=l[12]("routeEditor.saving")+"")&&M(i,s)},d(l){l&&(L(e),L(n),L(i))}}}function zf(t){let e,n,s,i,l,o,r=t[12]("common.error")+"",u,f,h,p=et(t[10]),g=[];for(let m=0;m<p.length;m+=1)g[m]=Uf(Rf(t,p,m));return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("div"),o=d("h3"),u=E(r),f=w(),h=d("ul");for(let m=0;m<g.length;m+=1)g[m].c();c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"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"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","text-xs list-disc list-inside"),c(e,"class","alert alert-warning")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(e,i),a(e,l),a(l,o),a(o,u),a(l,f),a(l,h);for(let b=0;b<g.length;b+=1)g[b]&&g[b].m(h,null)},p(m,_){if(_[0]&4096&&r!==(r=m[12]("common.error")+"")&&M(u,r),_[0]&1024){p=et(m[10]);let b;for(b=0;b<p.length;b+=1){const k=Rf(m,p,b);g[b]?g[b].p(k,_):(g[b]=Uf(k),g[b].c(),g[b].m(h,null))}for(;b<g.length;b+=1)g[b].d(1);g.length=p.length}},d(m){m&&L(e),En(g,m)}}}function Uf(t){let e,n=t[38].field+"",s,i,l=t[38].message+"",o;return{c(){e=d("li"),s=E(n),i=E(": "),o=E(l)},m(r,u){H(r,e,u),a(e,s),a(e,i),a(e,o)},p(r,u){u[0]&1024&&n!==(n=r[38].field+"")&&M(s,n),u[0]&1024&&l!==(l=r[38].message+"")&&M(o,l)},d(r){r&&L(e)}}}function g3(t){let e,n,s,i,l=(t[3]?t[12]("routeEditor.editRoute"):t[12]("routeEditor.newRoute"))+"",o,r,u,f=(t[3]?\`\${t[12]("routeEditor.editRoute")}: \${t[4]}\`:t[12]("routes.subtitle"))+"",h,p,g,m,_,b,k,v,y,S=!t[3]&&Hf(t);const C=[h3,f3],T=[];function O(P,D){return P[5]?0:1}m=O(t),_=T[m]=C[m](t);function A(P){t[36](P)}let x={};return t[7]!==void 0&&(x.showTemplates=t[7]),k=new n3({props:x}),vn.push(()=>Kn(k,"showTemplates",A)),k.$on("select",t[20]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),r=w(),u=d("p"),h=E(f),p=w(),S&&S.c(),g=w(),_.c(),b=w(),pt(k.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(n,"class","mb-6 flex justify-between items-start"),c(e,"class","p-6 max-w-6xl mx-auto")},m(P,D){H(P,e,D),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,h),a(n,p),S&&S.m(n,null),a(e,g),T[m].m(e,null),a(e,b),ut(k,e,null),y=!0},p(P,D){(!y||D[0]&4104)&&l!==(l=(P[3]?P[12]("routeEditor.editRoute"):P[12]("routeEditor.newRoute"))+"")&&M(o,l),(!y||D[0]&4120)&&f!==(f=(P[3]?\`\${P[12]("routeEditor.editRoute")}: \${P[4]}\`:P[12]("routes.subtitle"))+"")&&M(h,f),P[3]?S&&(S.d(1),S=null):S?S.p(P,D):(S=Hf(P),S.c(),S.m(n,null));let I=m;m=O(P),m===I?T[m].p(P,D):(gs(),Fe(T[I],1,1,()=>{T[I]=null}),ms(),_=T[m],_?_.p(P,D):(_=T[m]=C[m](P),_.c()),Be(_,1),_.m(e,b));const R={};!v&&D[0]&128&&(v=!0,R.showTemplates=P[7],Jn(()=>v=!1)),k.$set(R)},i(P){y||(Be(_),Be(k.$$.fragment,P),y=!0)},o(P){Fe(_),Fe(k.$$.fragment,P),y=!1},d(P){P&&L(e),S&&S.d(),T[m].d(),ct(k)}}}const Vf=t=>t.field==="upstreams",Wf=t=>t.field==="path",qf=t=>t.field==="path",Gf=t=>t.field==="path",Xf=t=>t.field==="upstreams";function m3(t,e,n){let s;Gt(t,Et,V=>n(12,s=V));let{params:i={}}=e,l=!1,o="",r=!0,u=!1,f=!1,h={path:"",upstreams:[{_uid:ol(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}}},p=[],g=[],m=[],_=!1,b=null;async function k(){try{const V=await Vk(h),X=zk(h.upstreams);n(8,p=V),n(9,g=X),n(10,m=[...V,...X]),n(11,_=m.length===0&&h.upstreams.length>0)}catch(V){console.error("Validation failed:",V),n(11,_=!1)}}let v=[],y=h.plugins?.[0]||null;function S(){n(1,v=[...v,{pattern:"",replacement:""}])}function C(V){n(1,v=v.filter((X,J)=>J!==V))}function T(){n(0,h.upstreams=[...h.upstreams,{_uid:ol(),target:"",weight:100,priority:h.upstreams.length+1}],h)}function O(V){if(h.upstreams.length<=1){alert(s("routeEditor.upstreamRequired"));return}n(0,h.upstreams=h.upstreams.filter((X,J)=>J!==V),h)}function A(V){const X=h.upstreams[V],J=JSON.parse(JSON.stringify(X));if(J._uid=ol(),J.target){const oe=J.target.match(/^(.+?)(-\\d+)?$/);if(oe){const[,ne,ee]=oe;if(ee){const se=parseInt(ee.slice(1))+1;J.target=\`\${ne}-\${se}\`}else J.target=\`\${ne}-copy\`}else J.target=\`\${J.target}-copy\`}J.priority!==void 0&&(J.priority=Math.max(...h.upstreams.map(oe=>oe.priority||1))+1),n(0,h.upstreams=[...h.upstreams.slice(0,V+1),J,...h.upstreams.slice(V+1)],h)}async function x(){if(!_){bt.show(s("routeEditor.saveFailed",{values:{error:s("common.error")}}),"error");return}try{n(6,u=!0);const V={...h,upstreams:Nk(h.upstreams,[X=>X.priority??1]).map(({_uid:X,...J})=>J)};l?(await Ei.update(o,V),bt.show(s("routeEditor.routeUpdated"),"success")):(await Ei.create(V),bt.show(s("routeEditor.routeSaved"),"success")),Fl()}catch(V){bt.show(s("routeEditor.saveFailed",{values:{error:V.message}}),"error")}finally{n(6,u=!1)}}function P(){confirm(s("routeEditor.cancel")+"?")&&Fl()}function D(V){const X=V.detail;n(0,h={...h,...X,headers:X.headers||h.headers,body:X.body||h.body,upstreams:X.upstreams?.map(J=>({...J,_uid:ol(),headers:J.headers||{add:{},remove:[],default:{}},body:J.body||{add:{},remove:[],replace:{},default:{}}}))||h.upstreams}),n(2,y=h.plugins?.[0]||null),h.pathRewrite?n(1,v=Object.entries(h.pathRewrite).map(([J,oe])=>({pattern:J,replacement:oe}))):n(1,v=[]),bt.show(s("routeEditor.routeSaved"),"success")}is(async()=>{if(i.path){n(3,l=!0),n(4,o=decodeURIComponent(i.path));try{const V=await Ei.get(o);V?(n(0,h=V),n(0,h.headers=h.headers||{add:{},remove:[],default:{}},h),n(0,h.body=h.body||{add:{},remove:[],replace:{},default:{}},h),n(0,h.upstreams=h.upstreams.map(X=>({...X,_uid:ol(),headers:X.headers||{add:{},remove:[],default:{}},body:X.body||{add:{},remove:[],replace:{},default:{}}})),h),h.pathRewrite&&n(1,v=Object.entries(h.pathRewrite).map(([X,J])=>({pattern:X,replacement:J}))),n(2,y=h.plugins?.[0]||null)):(bt.show(s("routes.noRoutes"),"error"),Fl())}catch(V){bt.show(s("routeEditor.saveFailed",{values:{error:V.message}}),"error"),Fl()}}n(5,r=!1)});const I=()=>n(7,f=!0);function R(){h.path=this.value,n(0,h),n(1,v),n(2,y)}function U(V,X){V[X].pattern=this.value,n(1,v),n(0,h),n(2,y)}function N(V,X){V[X].replacement=this.value,n(1,v),n(0,h),n(2,y)}const z=V=>C(V),B=V=>O(V),j=V=>A(V);function F(V,X){t.$$.not_equal(h.upstreams[X],V)&&(h.upstreams[X]=V,n(0,h),n(1,v),n(2,y))}function W(V){y=V,n(2,y)}function G(V){t.$$.not_equal(h.headers,V)&&(h.headers=V,n(0,h),n(1,v),n(2,y))}function Y(V){t.$$.not_equal(h.body,V)&&(h.body=V,n(0,h),n(1,v),n(2,y))}function Q(V){t.$$.not_equal(h.auth,V)&&(h.auth=V,n(0,h),n(1,v),n(2,y))}function le(V){t.$$.not_equal(h.failover,V)&&(h.failover=V,n(0,h),n(1,v),n(2,y))}function Z(V){f=V,n(7,f)}return t.$$set=V=>{"params"in V&&n(21,i=V.params)},t.$$.update=()=>{if(t.$$.dirty[0]&3){!v.length&&h.pathRewrite&&n(1,v=Object.entries(h.pathRewrite||{}).map(([X,J])=>({pattern:X,replacement:J})));const V={};v.filter(X=>X.pattern.trim()).forEach(X=>{V[X.pattern]=X.replacement}),n(0,h.pathRewrite=Object.keys(V).length>0?V:void 0,h)}t.$$.dirty[0]&4&&n(0,h.plugins=y?[y]:void 0,h),t.$$.dirty[0]&4194305&&h&&(b&&clearTimeout(b),n(22,b=setTimeout(()=>{k()},300)))},[h,v,y,l,o,r,u,f,p,g,m,_,s,S,C,T,O,A,x,P,D,i,b,I,R,U,N,z,B,j,F,W,G,Y,Q,le,Z]}class qp extends zt{constructor(e){super(),jt(this,e,m3,g3,Lt,{params:21},null,[-1,-1])}}function Yf(t,e,n){const s=t.slice();return s[42]=e[n][0],s[43]=e[n][1],s}function Jf(t,e,n){const s=t.slice();return s[42]=e[n][0],s[43]=e[n][1],s}function Kf(t,e,n){const s=t.slice();return s[42]=e[n][0],s[43]=e[n][1],s}function Zf(t,e,n){const s=t.slice();s[51]=e[n],s[60]=n;const i=s[50].durations[s[60]];s[52]=i;const l=s[50].relativeTime[s[60]];s[53]=l;const o=s[52]/s[50].totalDuration*100;s[54]=o;const r=s[53]/s[50].totalDuration*100;s[55]=r;const u=n5(s[51].step);s[56]=u;const f=t5(s[51].step);s[57]=f;const h=(s[52]/s[50].totalDuration*100).toFixed(1);return s[58]=h,s}function Qf(t,e,n){const s=t.slice();return s[61]=e[n],s}function hr(t){const e=t.slice(),n=e[27]();return e[50]=n,e}function $f(t,e,n){const s=t.slice();return s[51]=e[n],s}function b3(t){let e,n,s,i,l=t[24]("logs.detail.copyToClipboard")+"",o;return{c(){e=de("svg"),n=de("path"),s=w(),i=d("span"),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor"),c(i,"class","hidden md:inline")},m(r,u){H(r,e,u),a(e,n),H(r,s,u),H(r,i,u),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("logs.detail.copyToClipboard")+"")&&M(o,l)},d(r){r&&(L(e),L(s),L(i))}}}function _3(t){let e,n=t[24]("logs.detail.copied")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","text-success")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.copied")+"")&&M(s,n)},d(i){i&&L(e)}}}function v3(t){let e;return{c(){e=d("span"),e.textContent="No steps recorded",c(e,"class","text-sm opacity-40")},m(n,s){H(n,e,s)},p:Ee,d(n){n&&L(e)}}}function y3(t){let e,n,s=et(t[0].processingSteps.slice(0,3)),i=[];for(let o=0;o<s.length;o+=1)i[o]=eh($f(t,s,o));let l=t[0].processingSteps.length>3&&th(t);return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=w(),l&&l.c(),n=$n()},m(o,r){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(o,r);H(o,e,r),l&&l.m(o,r),H(o,n,r)},p(o,r){if(r[0]&67108865){s=et(o[0].processingSteps.slice(0,3));let u;for(u=0;u<s.length;u+=1){const f=$f(o,s,u);i[u]?i[u].p(f,r):(i[u]=eh(f),i[u].c(),i[u].m(e.parentNode,e))}for(;u<i.length;u+=1)i[u].d(1);i.length=s.length}o[0].processingSteps.length>3?l?l.p(o,r):(l=th(o),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},d(o){o&&(L(e),L(n)),En(i,o),l&&l.d(o)}}}function eh(t){let e,n=t[26](t[51].step)+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-outline")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[26](i[51].step)+"")&&M(s,n)},d(i){i&&L(e)}}}function th(t){let e,n,s=t[0].processingSteps.length-3+"",i,l;return{c(){e=d("span"),n=E("+"),i=E(s),l=E(" more"),c(e,"class","badge badge-sm badge-ghost")},m(o,r){H(o,e,r),a(e,n),a(e,i),a(e,l)},p(o,r){r[0]&1&&s!==(s=o[0].processingSteps.length-3+"")&&M(i,s)},d(o){o&&L(e)}}}function nh(t){let e,n,s,i,l,o=t[24]("logs.detail.processingTimeline")+"",r,u,f,h=t[24]("logs.detail.totalSteps",{values:{count:t[0].processingSteps.length}})+"",p,g,m=t[24]("logs.detail.totalDuration",{values:{duration:ai(t[50].totalDuration)}})+"",_,b,k,v=(t[22]?t[24]("logs.detail.hideTimeline"):t[24]("logs.detail.showTimeline"))+"",y,S,C,T,O=t[22]&&sh(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h4"),r=E(o),u=w(),f=d("p"),p=E(h),g=E(\`\uFF0C
21222
- \`),_=E(m),b=w(),k=d("button"),y=E(v),S=w(),O&&O.c(),c(l,"class","card-title text-base"),c(f,"class","text-xs opacity-60 mt-1"),c(k,"class","btn btn-sm btn-ghost"),c(s,"class","flex items-center justify-between mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(A,x){H(A,e,x),a(e,n),a(n,s),a(s,i),a(i,l),a(l,r),a(i,u),a(i,f),a(f,p),a(f,g),a(f,_),a(s,b),a(s,k),a(k,y),a(n,S),O&&O.m(n,null),C||(T=te(k,"click",t[31]),C=!0)},p(A,x){x[0]&16777216&&o!==(o=A[24]("logs.detail.processingTimeline")+"")&&M(r,o),x[0]&16777217&&h!==(h=A[24]("logs.detail.totalSteps",{values:{count:A[0].processingSteps.length}})+"")&&M(p,h),x[0]&16777216&&m!==(m=A[24]("logs.detail.totalDuration",{values:{duration:ai(A[50].totalDuration)}})+"")&&M(_,m),x[0]&20971520&&v!==(v=(A[22]?A[24]("logs.detail.hideTimeline"):A[24]("logs.detail.showTimeline"))+"")&&M(y,v),A[22]?O?O.p(A,x):(O=sh(A),O.c(),O.m(n,null)):O&&(O.d(1),O=null)},d(A){A&&L(e),O&&O.d(),C=!1,T()}}}function sh(t){let e,n,s,i,l,o,r,u,f,h,p=et(t[0].processingSteps),g=[];for(let m=0;m<p.length;m+=1)g[m]=fh(Zf(t,p,m));return{c(){e=d("div"),n=d("div"),s=d("span"),s.textContent="0ms",i=w(),l=d("div"),o=w(),r=d("span"),r.textContent=\`\${ai(t[50].totalDuration)}\`,u=w();for(let m=0;m<g.length;m+=1)g[m].c();f=w(),h=d("div"),h.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>',c(l,"class","flex-1 border-t border-dashed border-base-content/20"),c(r,"class","mr-32"),c(n,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),c(e,"class","mt-4"),c(h,"class","mt-6 pt-4 border-t border-base-300")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(n,i),a(n,l),a(n,o),a(n,r),a(e,u);for(let b=0;b<g.length;b+=1)g[b]&&g[b].m(e,null);H(m,f,_),H(m,h,_)},p(m,_){if(_[0]&201326593){p=et(m[0].processingSteps);let b;for(b=0;b<p.length;b+=1){const k=Zf(m,p,b);g[b]?g[b].p(k,_):(g[b]=fh(k),g[b].c(),g[b].m(e,null))}for(;b<g.length;b+=1)g[b].d(1);g.length=p.length}},d(m){m&&(L(e),L(f),L(h)),En(g,m)}}}function ih(t){let e;return{c(){e=d("div"),c(e,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(n,s){H(n,e,s)},d(n){n&&L(e)}}}function lh(t){let e=t[51].detail.plugins&&Array.isArray(t[51].detail.plugins),n,s,i,l,o=e&&oh(t),r=t[51].detail.target&&ah(t),u=t[51].detail.level&&uh(t),f=t[51].detail.error&&ch(t);return{c(){o&&o.c(),n=w(),r&&r.c(),s=w(),u&&u.c(),i=w(),f&&f.c(),l=$n()},m(h,p){o&&o.m(h,p),H(h,n,p),r&&r.m(h,p),H(h,s,p),u&&u.m(h,p),H(h,i,p),f&&f.m(h,p),H(h,l,p)},p(h,p){p[0]&1&&(e=h[51].detail.plugins&&Array.isArray(h[51].detail.plugins)),e?o?o.p(h,p):(o=oh(h),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null),h[51].detail.target?r?r.p(h,p):(r=ah(h),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null),h[51].detail.level?u?u.p(h,p):(u=uh(h),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null),h[51].detail.error?f?f.p(h,p):(f=ch(h),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null)},d(h){h&&(L(n),L(s),L(i),L(l)),o&&o.d(h),r&&r.d(h),u&&u.d(h),f&&f.d(h)}}}function oh(t){let e,n=et(t[51].detail.plugins),s=[];for(let i=0;i<n.length;i+=1)s[i]=rh(Qf(t,n,i));return{c(){for(let i=0;i<s.length;i+=1)s[i].c();e=$n()},m(i,l){for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,l);H(i,e,l)},p(i,l){if(l[0]&1){n=et(i[51].detail.plugins);let o;for(o=0;o<n.length;o+=1){const r=Qf(i,n,o);s[o]?s[o].p(r,l):(s[o]=rh(r),s[o].c(),s[o].m(e.parentNode,e))}for(;o<s.length;o+=1)s[o].d(1);s.length=n.length}},d(i){i&&L(e),En(s,i)}}}function rh(t){let e,n=t[61]+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-primary badge-outline")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[61]+"")&&M(s,n)},d(i){i&&L(e)}}}function ah(t){let e,n=t[51].detail.target+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-info badge-outline"),c(e,"title","Target upstream")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[51].detail.target+"")&&M(s,n)},d(i){i&&L(e)}}}function uh(t){let e,n=t[51].detail.level+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-warning badge-outline")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&1&&n!==(n=i[51].detail.level+"")&&M(s,n)},d(i){i&&L(e)}}}function ch(t){let e,n,s;return{c(){e=d("span"),n=E("Error"),c(e,"class","badge badge-xs badge-error badge-outline"),c(e,"title",s=t[51].detail.error)},m(i,l){H(i,e,l),a(e,n)},p(i,l){l[0]&1&&s!==(s=i[51].detail.error)&&c(e,"title",s)},d(i){i&&L(e)}}}function w3(t){let e;return{c(){e=d("span"),e.textContent=\`\${t[58]}%\`,c(e,"class","text-xs text-white px-2 leading-7")},m(n,s){H(n,e,s)},p:Ee,d(n){n&&L(e)}}}function fh(t){let e,n,s,i,l,o,r,u,f,h=t[26](t[51].step)+"",p,g,m,_,b=t[56]+"",k,v,y,S,C,T,O,A,x,P,D,I,R,U,N,z,B=t[60]<t[0].processingSteps.length-1&&ih(),j=t[51].detail&&lh(t),F=t[54]>5&&w3(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),o=w(),B&&B.c(),r=w(),u=d("div"),f=d("div"),p=E(h),g=w(),m=d("div"),_=d("span"),k=E(b),v=w(),j&&j.c(),y=w(),S=d("div"),C=d("div"),T=d("div"),F&&F.c(),x=w(),P=d("div"),D=d("div"),D.textContent=\`+\${t[53]}ms\`,I=w(),R=d("div"),R.textContent=\`\${ai(t[52])}\`,U=w(),N=d("div"),N.textContent=\`\${t[58]}%\`,z=w(),c(i,"class",l="w-3 h-3 rounded-full "+t[57]+" z-10"),c(s,"class","flex flex-col items-center"),c(f,"class","text-sm font-medium"),c(_,"class","badge badge-xs badge-ghost"),c(m,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),c(u,"class","flex-1 -mt-0.5"),c(n,"class","flex gap-3 shrink-0 w-64"),c(T,"class",O="absolute h-full "+t[57]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),Sa(T,"left",t[55]+"%"),Sa(T,"width",Math.max(t[54],1)+"%"),c(T,"title",A=t[51].step+": "+ai(t[52])+" ("+t[58]+"%)"),c(C,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),c(S,"class","flex-1 flex items-center"),c(D,"class","opacity-60"),c(R,"class","font-semibold"),c(N,"class","opacity-40"),c(P,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),c(e,"class","flex gap-4 group relative mb-3")},m(W,G){H(W,e,G),a(e,n),a(n,s),a(s,i),a(s,o),B&&B.m(s,null),a(n,r),a(n,u),a(u,f),a(f,p),a(u,g),a(u,m),a(m,_),a(_,k),a(m,v),j&&j.m(m,null),a(e,y),a(e,S),a(S,C),a(C,T),F&&F.m(T,null),a(e,x),a(e,P),a(P,D),a(P,I),a(P,R),a(P,U),a(P,N),a(e,z)},p(W,G){G[0]&1&&l!==(l="w-3 h-3 rounded-full "+W[57]+" z-10")&&c(i,"class",l),W[60]<W[0].processingSteps.length-1?B||(B=ih(),B.c(),B.m(s,null)):B&&(B.d(1),B=null),G[0]&1&&h!==(h=W[26](W[51].step)+"")&&M(p,h),G[0]&1&&b!==(b=W[56]+"")&&M(k,b),W[51].detail?j?j.p(W,G):(j=lh(W),j.c(),j.m(m,null)):j&&(j.d(1),j=null),W[54]>5&&F.p(W,G),G[0]&1&&O!==(O="absolute h-full "+W[57]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&c(T,"class",O),G[0]&1&&A!==(A=W[51].step+": "+ai(W[52])+" ("+W[58]+"%)")&&c(T,"title",A)},d(W){W&&L(e),B&&B.d(),j&&j.d(),F&&F.d()}}}function k3(t){let e,n,s=t[24]("logs.detail.path")+"",i,l,o,r=t[0].path+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),o=d("div"),u=E(r),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.path")+"")&&M(i,s),h[0]&1&&r!==(r=f[0].path+"")&&M(u,r)},d(f){f&&L(e)}}}function S3(t){let e,n,s=t[24]("logs.detail.originalPath")+"",i,l,o,r=t[0].path+"",u,f,h,p,g=t[24]("logs.detail.transformedPath")+"",m,_,b,k=t[0].transformedPath+"",v;return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),o=d("div"),u=E(r),f=w(),h=d("div"),p=d("div"),m=E(g),_=w(),b=d("div"),v=E(k),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),c(p,"class","text-xs opacity-60 mb-1"),c(b,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(y,S){H(y,e,S),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),H(y,f,S),H(y,h,S),a(h,p),a(p,m),a(h,_),a(h,b),a(b,v)},p(y,S){S[0]&16777216&&s!==(s=y[24]("logs.detail.originalPath")+"")&&M(i,s),S[0]&1&&r!==(r=y[0].path+"")&&M(u,r),S[0]&16777216&&g!==(g=y[24]("logs.detail.transformedPath")+"")&&M(m,g),S[0]&1&&k!==(k=y[0].transformedPath+"")&&M(v,k)},d(y){y&&(L(e),L(f),L(h))}}}function hh(t){let e,n,s=t[24]("logs.detail.query")+"",i,l,o,r=t[0].query+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),o=d("div"),u=E(r),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.query")+"")&&M(i,s),h[0]&1&&r!==(r=f[0].query+"")&&M(u,r)},d(f){f&&L(e)}}}function dh(t){let e,n,s,i=t[24]("logs.detail.routePath")+"",l,o,r,u=t[0].routePath+"",f;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),f=E(u),c(s,"class","card-title text-base mb-2"),c(r,"class","font-mono text-sm"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,f)},p(h,p){p[0]&16777216&&i!==(i=h[24]("logs.detail.routePath")+"")&&M(l,i),p[0]&1&&u!==(u=h[0].routePath+"")&&M(f,u)},d(h){h&&L(e)}}}function ph(t){let e,n,s,i=t[24]("logs.detail.upstream")+"",l,o,r,u=t[0].upstream+"",f,h,p=t[0].transformer&&gh(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),f=E(u),h=w(),p&&p.c(),c(s,"class","card-title text-base mb-2"),c(r,"class","font-mono text-sm mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(g,m){H(g,e,m),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,f),a(n,h),p&&p.m(n,null)},p(g,m){m[0]&16777216&&i!==(i=g[24]("logs.detail.upstream")+"")&&M(l,i),m[0]&1&&u!==(u=g[0].upstream+"")&&M(f,u),g[0].transformer?p?p.p(g,m):(p=gh(g),p.c(),p.m(n,null)):p&&(p.d(1),p=null)},d(g){g&&L(e),p&&p.d()}}}function gh(t){let e,n=t[24]("logs.detail.transformer")+"",s,i,l=t[0].transformer+"",o;return{c(){e=d("div"),s=E(n),i=E(": "),o=E(l),c(e,"class","text-xs opacity-60")},m(r,u){H(r,e,u),a(e,s),a(e,i),a(e,o)},p(r,u){u[0]&16777216&&n!==(n=r[24]("logs.detail.transformer")+"")&&M(s,n),u[0]&1&&l!==(l=r[0].transformer+"")&&M(o,l)},d(r){r&&L(e)}}}function mh(t){let e,n,s,i,l,o,r=t[24]("logs.detail.errorInfo")+"",u,f,h,p=t[0].errorMessage+"",g;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("div"),o=d("div"),u=E(r),f=w(),h=d("div"),g=E(p),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","font-mono text-sm"),c(e,"class","alert alert-error")},m(m,_){H(m,e,_),a(e,n),a(n,s),a(e,i),a(e,l),a(l,o),a(o,u),a(l,f),a(l,h),a(h,g)},p(m,_){_[0]&16777216&&r!==(r=m[24]("logs.detail.errorInfo")+"")&&M(u,r),_[0]&1&&p!==(p=m[0].errorMessage+"")&&M(g,p)},d(m){m&&L(e)}}}function bh(t){let e;function n(l,o){return l[0].originalReqHeaderId||l[0].originalReqBodyId?T3:E3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&L(e),i.d()}}}function E3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&M(s,n)},d(i){i&&L(e)}}}function T3(t){let e,n,s=t[0].originalReqHeaderId&&_h(t),i=t[8]&&t[0].originalReqBodyId&&yh(t);return{c(){s&&s.c(),e=w(),i&&i.c(),n=$n()},m(l,o){s&&s.m(l,o),H(l,e,o),i&&i.m(l,o),H(l,n,o)},p(l,o){l[0].originalReqHeaderId?s?s.p(l,o):(s=_h(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].originalReqBodyId?i?i.p(l,o):(i=yh(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(L(e),L(n)),s&&s.d(l),i&&i.d(l)}}}function _h(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[17]?A3:f[19]?P3:f[15]!==null?C3:M3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function M3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&M(s,n)},d(i){i&&L(e)}}}function C3(t){let e,n,s,i,l,o=et(Object.entries(t[15])),r=[];for(let u=0;u<o.length;u+=1)r[u]=vh(Kf(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=w(),l=d("tbody");for(let u=0;u<r.length;u+=1)r[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(n,i),a(n,l);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(l,null)},p(u,f){if(f[0]&32768){o=et(Object.entries(u[15]));let h;for(h=0;h<o.length;h+=1){const p=Kf(u,o,h);r[h]?r[h].p(p,f):(r[h]=vh(p),r[h].c(),r[h].m(l,null))}for(;h<r.length;h+=1)r[h].d(1);r.length=o.length}},d(u){u&&L(e),En(r,u)}}}function P3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[19]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&524288&&M(s,i[19])},d(i){i&&L(e)}}}function A3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function vh(t){let e,n,s=t[42]+"",i,l,o,r=t[43]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=w(),o=d("td"),u=E(r),f=w(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){H(h,e,p),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f)},p(h,p){p[0]&32768&&s!==(s=h[42]+"")&&M(i,s),p[0]&32768&&r!==(r=h[43]+"")&&M(u,r)},d(h){h&&L(e)}}}function yh(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[18]?D3:f[20]?R3:f[16]!==null?x3:O3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function O3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&M(s,n)},d(i){i&&L(e)}}}function x3(t){let e,n=Yi(t[16])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&65536&&n!==(n=Yi(i[16])+"")&&M(s,n)},d(i){i&&L(e)}}}function R3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[20]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&1048576&&M(s,i[20])},d(i){i&&L(e)}}}function D3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function wh(t){let e;function n(l,o){return l[0].reqHeaderId||l[0].reqBodyId?H3:L3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&L(e),i.d()}}}function L3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&M(s,n)},d(i){i&&L(e)}}}function H3(t){let e,n,s=t[0].reqHeaderId&&kh(t),i=t[8]&&t[0].reqBodyId&&Eh(t);return{c(){s&&s.c(),e=w(),i&&i.c(),n=$n()},m(l,o){s&&s.m(l,o),H(l,e,o),i&&i.m(l,o),H(l,n,o)},p(l,o){l[0].reqHeaderId?s?s.p(l,o):(s=kh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].reqBodyId?i?i.p(l,o):(i=Eh(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(L(e),L(n)),s&&s.d(l),i&&i.d(l)}}}function kh(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[11]?N3:f[13]?F3:f[9]!==null?B3:I3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function I3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&M(s,n)},d(i){i&&L(e)}}}function B3(t){let e,n,s,i,l,o=et(Object.entries(t[9])),r=[];for(let u=0;u<o.length;u+=1)r[u]=Sh(Jf(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=w(),l=d("tbody");for(let u=0;u<r.length;u+=1)r[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(n,i),a(n,l);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(l,null)},p(u,f){if(f[0]&512){o=et(Object.entries(u[9]));let h;for(h=0;h<o.length;h+=1){const p=Jf(u,o,h);r[h]?r[h].p(p,f):(r[h]=Sh(p),r[h].c(),r[h].m(l,null))}for(;h<r.length;h+=1)r[h].d(1);r.length=o.length}},d(u){u&&L(e),En(r,u)}}}function F3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[13]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&8192&&M(s,i[13])},d(i){i&&L(e)}}}function N3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Sh(t){let e,n,s=t[42]+"",i,l,o,r=t[43]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=w(),o=d("td"),u=E(r),f=w(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){H(h,e,p),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f)},p(h,p){p[0]&512&&s!==(s=h[42]+"")&&M(i,s),p[0]&512&&r!==(r=h[43]+"")&&M(u,r)},d(h){h&&L(e)}}}function Eh(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[4]?V3:f[6]?U3:f[2]!==null?z3:j3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function j3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&M(s,n)},d(i){i&&L(e)}}}function z3(t){let e,n=Yi(t[2])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&4&&n!==(n=Yi(i[2])+"")&&M(s,n)},d(i){i&&L(e)}}}function U3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[6]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&64&&M(s,i[6])},d(i){i&&L(e)}}}function V3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Th(t){let e;function n(l,o){return l[0].respHeaderId||l[0].respBodyId?q3:W3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){H(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&L(e),i.d()}}}function W3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&M(s,n)},d(i){i&&L(e)}}}function q3(t){let e,n,s=t[0].respHeaderId&&Mh(t),i=t[8]&&t[0].respBodyId&&Ph(t);return{c(){s&&s.c(),e=w(),i&&i.c(),n=$n()},m(l,o){s&&s.m(l,o),H(l,e,o),i&&i.m(l,o),H(l,n,o)},p(l,o){l[0].respHeaderId?s?s.p(l,o):(s=Mh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].respBodyId?i?i.p(l,o):(i=Ph(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(L(e),L(n)),s&&s.d(l),i&&i.d(l)}}}function Mh(t){let e,n,s=t[24]("logs.detail.responseHeaders")+"",i,l;function o(f,h){return f[12]?J3:f[14]?Y3:f[10]!==null?X3:G3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseHeaders")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function G3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&M(s,n)},d(i){i&&L(e)}}}function X3(t){let e,n,s,i,l,o=et(Object.entries(t[10])),r=[];for(let u=0;u<o.length;u+=1)r[u]=Ch(Yf(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=w(),l=d("tbody");for(let u=0;u<r.length;u+=1)r[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(n,i),a(n,l);for(let h=0;h<r.length;h+=1)r[h]&&r[h].m(l,null)},p(u,f){if(f[0]&1024){o=et(Object.entries(u[10]));let h;for(h=0;h<o.length;h+=1){const p=Yf(u,o,h);r[h]?r[h].p(p,f):(r[h]=Ch(p),r[h].c(),r[h].m(l,null))}for(;h<r.length;h+=1)r[h].d(1);r.length=o.length}},d(u){u&&L(e),En(r,u)}}}function Y3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[14]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&16384&&M(s,i[14])},d(i){i&&L(e)}}}function J3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Ch(t){let e,n,s=t[42]+"",i,l,o,r=t[43]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=w(),o=d("td"),u=E(r),f=w(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){H(h,e,p),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f)},p(h,p){p[0]&1024&&s!==(s=h[42]+"")&&M(i,s),p[0]&1024&&r!==(r=h[43]+"")&&M(u,r)},d(h){h&&L(e)}}}function Ph(t){let e,n,s=t[24]("logs.detail.responseBody")+"",i,l;function o(f,h){return f[5]?$3:f[7]?Q3:f[3]!==null?Z3:K3}let r=o(t),u=r(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=w(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){H(f,e,h),a(e,n),a(n,i),a(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseBody")+"")&&M(i,s),r===(r=o(f))&&u?u.p(f,h):(u.d(1),u=r(f),u&&(u.c(),u.m(e,null)))},d(f){f&&L(e),u.d()}}}function K3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&M(s,n)},d(i){i&&L(e)}}}function Z3(t){let e,n=Yi(t[3])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){H(i,e,l),a(e,s)},p(i,l){l[0]&8&&n!==(n=Yi(i[3])+"")&&M(s,n)},d(i){i&&L(e)}}}function Q3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[7]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l[0]&128&&M(s,i[7])},d(i){i&&L(e)}}}function $3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=w(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(r,u){H(r,e,u),a(e,n),a(e,s),a(e,i),a(i,o)},p(r,u){u[0]&16777216&&l!==(l=r[24]("common.loading")+"")&&M(o,l)},d(r){r&&L(e)}}}function Ah(t){let e,n,s,i=t[24]("logs.detail.authInfo")+"",l,o,r,u,f,h=t[24]("logs.detail.authLevel")+"",p,g,m,_=t[0].authLevel+"",b,k,v,y,S=t[24]("logs.detail.authResult")+"",C,T,O,A=(t[0].authSuccess?t[24]("logs.detail.authSuccess"):t[24]("logs.detail.authFailed"))+"",x,P;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=w(),r=d("div"),u=d("div"),f=d("div"),p=E(h),g=w(),m=d("div"),b=E(_),k=w(),v=d("div"),y=d("div"),C=E(S),T=w(),O=d("span"),x=E(A),c(s,"class","card-title text-base mb-2"),c(f,"class","text-xs opacity-60 mb-1"),c(m,"class","text-sm"),c(y,"class","text-xs opacity-60 mb-1"),c(O,"class",P="badge "+(t[0].authSuccess?"badge-success":"badge-error")),c(r,"class","grid grid-cols-2 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(D,I){H(D,e,I),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,f),a(f,p),a(u,g),a(u,m),a(m,b),a(r,k),a(r,v),a(v,y),a(y,C),a(v,T),a(v,O),a(O,x)},p(D,I){I[0]&16777216&&i!==(i=D[24]("logs.detail.authInfo")+"")&&M(l,i),I[0]&16777216&&h!==(h=D[24]("logs.detail.authLevel")+"")&&M(p,h),I[0]&1&&_!==(_=D[0].authLevel+"")&&M(b,_),I[0]&16777216&&S!==(S=D[24]("logs.detail.authResult")+"")&&M(C,S),I[0]&16777217&&A!==(A=(D[0].authSuccess?D[24]("logs.detail.authSuccess"):D[24]("logs.detail.authFailed"))+"")&&M(x,A),I[0]&1&&P!==(P="badge "+(D[0].authSuccess?"badge-success":"badge-error"))&&c(O,"class",P)},d(D){D&&L(e)}}}function e5(t){let e,n,s,i,l=t[24]("logs.detail.title")+"",o,r,u,f,h,p,g,m,_,b,k,v=t[24]("logs.detail.downloadJson")+"",y,S,C,T,O,A,x,P,D,I=t[24]("logs.detail.overview")+"",R,U,N,z,B,j=t[24]("logs.detail.status")+"",F,W,G,Y=t[0].status+"",Q,le,Z,V,X,J=t[24]("logs.detail.method")+"",oe,ne,ee,se=t[0].method+"",K,q,ce,he,ke=t[24]("logs.requestType")+"",we,pe,me,Pe=t[25](t[0].requestType)+"",Se,Ce,_e,Ae,ye,$,ue=t[24]("logs.detail.duration")+"",ae,ge,re,Ne=ai(t[0].duration)+"",Ye,Ve,Qe,st,Xe=t[24]("logs.detail.timestamp")+"",vt,rt,He,$e=Oh(t[0].timestamp)+"",Oe,ft,qe,Re,ze=t[24]("logs.detail.requestId")+"",ve,Je,be,We=t[0].requestId+"",yt,Ke,Ie,kt,nt=t[24]("logs.detail.processingSteps")+"",ht,Ot,Te,it,De,tt,Ht,Rn,pn=t[24]("logs.detail.requestInfo")+"",xe,lt,an,Mt,ls,Tn,zn,It,gn,Dn,un,mn,Pn,Fn=t[24]("logs.detail.tabOriginalRequest")+"",Ln,Un,os,Ut,Mn=t[24]("logs.detail.tabFinalRequest")+"",Hn,hn,Vn,An,wn=t[24]("logs.detail.tabResponse")+"",kn,Wn,rs,St,Xt,qn,as,ot,es;function _s(Zt,Ue){return Zt[23]?_3:b3}let xt=_s(t),Ct=xt(t);function $t(Zt,Ue){return Zt[0].processingSteps&&Zt[0].processingSteps.length>0?y3:v3}let nn=$t(t),sn=nn(t),en=t[0].processingSteps&&t[0].processingSteps.length>0&&nh(hr(t));function Vt(Zt,Ue){return Zt[0].transformedPath&&Zt[0].transformedPath!==Zt[0].path?S3:k3}let ts=Vt(t),Wt=ts(t),qt=t[0].query&&hh(t),Bt=t[0].routePath&&dh(t),tn=t[0].upstream&&ph(t),Pt=t[0].errorMessage&&mh(t),Yt=t[21]==="original"&&bh(t),Jt=t[21]==="transformed"&&wh(t),cn=t[21]==="response"&&Th(t),Kt=t[0].authLevel&&Ah(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),r=w(),u=d("div"),f=d("button"),Ct.c(),p=w(),g=d("button"),m=de("svg"),_=de("path"),b=w(),k=d("span"),y=E(v),C=w(),T=d("button"),T.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>',O=w(),A=d("div"),x=d("div"),P=d("div"),D=d("h4"),R=E(I),U=w(),N=d("div"),z=d("div"),B=d("div"),F=E(j),W=w(),G=d("span"),Q=E(Y),Z=w(),V=d("div"),X=d("div"),oe=E(J),ne=w(),ee=d("span"),K=E(se),q=w(),ce=d("div"),he=d("div"),we=E(ke),pe=w(),me=d("span"),Se=E(Pe),Ae=w(),ye=d("div"),$=d("div"),ae=E(ue),ge=w(),re=d("div"),Ye=E(Ne),Ve=w(),Qe=d("div"),st=d("div"),vt=E(Xe),rt=w(),He=d("div"),Oe=E($e),ft=w(),qe=d("div"),Re=d("div"),ve=E(ze),Je=w(),be=d("div"),yt=E(We),Ke=w(),Ie=d("div"),kt=d("div"),ht=E(nt),Ot=w(),Te=d("div"),sn.c(),it=w(),en&&en.c(),De=w(),tt=d("div"),Ht=d("div"),Rn=d("h4"),xe=E(pn),lt=w(),an=d("div"),Wt.c(),Mt=w(),qt&&qt.c(),ls=w(),Tn=d("div"),Bt&&Bt.c(),zn=w(),tn&&tn.c(),It=w(),Pt&&Pt.c(),gn=w(),Dn=d("div"),un=d("div"),mn=d("div"),Pn=d("button"),Ln=E(Fn),os=w(),Ut=d("button"),Hn=E(Mn),Vn=w(),An=d("button"),kn=E(wn),rs=w(),St=d("div"),Yt&&Yt.c(),Xt=w(),Jt&&Jt.c(),qn=w(),cn&&cn.c(),as=w(),Kt&&Kt.c(),c(i,"id","modal-title"),c(i,"class","font-bold text-xl"),c(f,"class","btn btn-sm btn-ghost"),c(f,"title",h=t[24]("logs.detail.copyToClipboard")),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(k,"class","hidden md:inline"),c(g,"class","btn btn-sm btn-ghost"),c(g,"title",S=t[24]("logs.detail.downloadJson")),c(T,"class","btn btn-sm btn-circle btn-ghost"),c(u,"class","flex items-center gap-2"),c(s,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),c(D,"class","card-title text-base mb-3"),c(B,"class","text-xs opacity-60 mb-1"),c(G,"class",le="badge "+xh(t[0].status)+" badge-lg"),c(X,"class","text-xs opacity-60 mb-1"),c(ee,"class","badge badge-lg"),c(he,"class","text-xs opacity-60 mb-1"),c(me,"class",Ce="badge "+Rh(t[0].requestType)+" badge-lg"),c(me,"title",_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`)),c($,"class","text-xs opacity-60 mb-1"),c(re,"class","font-semibold"),c(st,"class","text-xs opacity-60 mb-1"),c(He,"class","text-sm"),c(Re,"class","text-xs opacity-60 mb-1"),c(be,"class","font-mono text-xs break-all"),c(qe,"class","col-span-2"),c(kt,"class","text-xs opacity-60 mb-1"),c(Te,"class","flex gap-2 flex-wrap"),c(Ie,"class","col-span-2 md:col-span-3 lg:col-span-6"),c(N,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),c(P,"class","card-body p-4"),c(x,"class","card bg-base-200"),c(Rn,"class","card-title text-base mb-3"),c(an,"class","space-y-2"),c(Ht,"class","card-body p-4"),c(tt,"class","card bg-base-200"),c(Tn,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(Pn,"class",Un="tab "+(t[21]==="original"?"tab-active":"")),c(Ut,"class",hn="tab "+(t[21]==="transformed"?"tab-active":"")),c(An,"class",Wn="tab "+(t[21]==="response"?"tab-active":"")),c(mn,"class","tabs tabs-boxed bg-transparent p-2 border-b border-base-300"),c(St,"class","p-4"),c(un,"class","card-body p-0"),c(Dn,"class","card bg-base-200"),c(A,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),c(n,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),c(n,"role","dialog"),c(n,"aria-labelledby","modal-title"),c(n,"aria-modal","true"),c(e,"class","modal modal-open"),c(e,"role","presentation")},m(Zt,Ue){H(Zt,e,Ue),a(e,n),a(n,s),a(s,i),a(i,o),a(s,r),a(s,u),a(u,f),Ct.m(f,null),a(u,p),a(u,g),a(g,m),a(m,_),a(g,b),a(g,k),a(k,y),a(u,C),a(u,T),a(n,O),a(n,A),a(A,x),a(x,P),a(P,D),a(D,R),a(P,U),a(P,N),a(N,z),a(z,B),a(B,F),a(z,W),a(z,G),a(G,Q),a(N,Z),a(N,V),a(V,X),a(X,oe),a(V,ne),a(V,ee),a(ee,K),a(N,q),a(N,ce),a(ce,he),a(he,we),a(ce,pe),a(ce,me),a(me,Se),a(N,Ae),a(N,ye),a(ye,$),a($,ae),a(ye,ge),a(ye,re),a(re,Ye),a(N,Ve),a(N,Qe),a(Qe,st),a(st,vt),a(Qe,rt),a(Qe,He),a(He,Oe),a(N,ft),a(N,qe),a(qe,Re),a(Re,ve),a(qe,Je),a(qe,be),a(be,yt),a(N,Ke),a(N,Ie),a(Ie,kt),a(kt,ht),a(Ie,Ot),a(Ie,Te),sn.m(Te,null),a(A,it),en&&en.m(A,null),a(A,De),a(A,tt),a(tt,Ht),a(Ht,Rn),a(Rn,xe),a(Ht,lt),a(Ht,an),Wt.m(an,null),a(an,Mt),qt&&qt.m(an,null),a(A,ls),a(A,Tn),Bt&&Bt.m(Tn,null),a(Tn,zn),tn&&tn.m(Tn,null),a(A,It),Pt&&Pt.m(A,null),a(A,gn),a(A,Dn),a(Dn,un),a(un,mn),a(mn,Pn),a(Pn,Ln),a(mn,os),a(mn,Ut),a(Ut,Hn),a(mn,Vn),a(mn,An),a(An,kn),a(un,rs),a(un,St),Yt&&Yt.m(St,null),a(St,Xt),Jt&&Jt.m(St,null),a(St,qn),cn&&cn.m(St,null),a(A,as),Kt&&Kt.m(A,null),ot||(es=[te(f,"click",t[29]),te(g,"click",t[30]),te(T,"click",function(){ui(t[1])&&t[1].apply(this,arguments)}),te(Pn,"click",t[32]),te(Ut,"click",t[33]),te(An,"click",t[34]),te(e,"click",t[28]),te(e,"keydown",t[35])],ot=!0)},p(Zt,Ue){t=Zt,Ue[0]&16777216&&l!==(l=t[24]("logs.detail.title")+"")&&M(o,l),xt===(xt=_s(t))&&Ct?Ct.p(t,Ue):(Ct.d(1),Ct=xt(t),Ct&&(Ct.c(),Ct.m(f,null))),Ue[0]&16777216&&h!==(h=t[24]("logs.detail.copyToClipboard"))&&c(f,"title",h),Ue[0]&16777216&&v!==(v=t[24]("logs.detail.downloadJson")+"")&&M(y,v),Ue[0]&16777216&&S!==(S=t[24]("logs.detail.downloadJson"))&&c(g,"title",S),Ue[0]&16777216&&I!==(I=t[24]("logs.detail.overview")+"")&&M(R,I),Ue[0]&16777216&&j!==(j=t[24]("logs.detail.status")+"")&&M(F,j),Ue[0]&1&&Y!==(Y=t[0].status+"")&&M(Q,Y),Ue[0]&1&&le!==(le="badge "+xh(t[0].status)+" badge-lg")&&c(G,"class",le),Ue[0]&16777216&&J!==(J=t[24]("logs.detail.method")+"")&&M(oe,J),Ue[0]&1&&se!==(se=t[0].method+"")&&M(K,se),Ue[0]&16777216&&ke!==(ke=t[24]("logs.requestType")+"")&&M(we,ke),Ue[0]&1&&Pe!==(Pe=t[25](t[0].requestType)+"")&&M(Se,Pe),Ue[0]&1&&Ce!==(Ce="badge "+Rh(t[0].requestType)+" badge-lg")&&c(me,"class",Ce),Ue[0]&16777217&&_e!==(_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`))&&c(me,"title",_e),Ue[0]&16777216&&ue!==(ue=t[24]("logs.detail.duration")+"")&&M(ae,ue),Ue[0]&1&&Ne!==(Ne=ai(t[0].duration)+"")&&M(Ye,Ne),Ue[0]&16777216&&Xe!==(Xe=t[24]("logs.detail.timestamp")+"")&&M(vt,Xe),Ue[0]&1&&$e!==($e=Oh(t[0].timestamp)+"")&&M(Oe,$e),Ue[0]&16777216&&ze!==(ze=t[24]("logs.detail.requestId")+"")&&M(ve,ze),Ue[0]&1&&We!==(We=t[0].requestId+"")&&M(yt,We),Ue[0]&16777216&&nt!==(nt=t[24]("logs.detail.processingSteps")+"")&&M(ht,nt),nn===(nn=$t(t))&&sn?sn.p(t,Ue):(sn.d(1),sn=nn(t),sn&&(sn.c(),sn.m(Te,null))),t[0].processingSteps&&t[0].processingSteps.length>0?en?en.p(hr(t),Ue):(en=nh(hr(t)),en.c(),en.m(A,De)):en&&(en.d(1),en=null),Ue[0]&16777216&&pn!==(pn=t[24]("logs.detail.requestInfo")+"")&&M(xe,pn),ts===(ts=Vt(t))&&Wt?Wt.p(t,Ue):(Wt.d(1),Wt=ts(t),Wt&&(Wt.c(),Wt.m(an,Mt))),t[0].query?qt?qt.p(t,Ue):(qt=hh(t),qt.c(),qt.m(an,null)):qt&&(qt.d(1),qt=null),t[0].routePath?Bt?Bt.p(t,Ue):(Bt=dh(t),Bt.c(),Bt.m(Tn,zn)):Bt&&(Bt.d(1),Bt=null),t[0].upstream?tn?tn.p(t,Ue):(tn=ph(t),tn.c(),tn.m(Tn,null)):tn&&(tn.d(1),tn=null),t[0].errorMessage?Pt?Pt.p(t,Ue):(Pt=mh(t),Pt.c(),Pt.m(A,gn)):Pt&&(Pt.d(1),Pt=null),Ue[0]&16777216&&Fn!==(Fn=t[24]("logs.detail.tabOriginalRequest")+"")&&M(Ln,Fn),Ue[0]&2097152&&Un!==(Un="tab "+(t[21]==="original"?"tab-active":""))&&c(Pn,"class",Un),Ue[0]&16777216&&Mn!==(Mn=t[24]("logs.detail.tabFinalRequest")+"")&&M(Hn,Mn),Ue[0]&2097152&&hn!==(hn="tab "+(t[21]==="transformed"?"tab-active":""))&&c(Ut,"class",hn),Ue[0]&16777216&&wn!==(wn=t[24]("logs.detail.tabResponse")+"")&&M(kn,wn),Ue[0]&2097152&&Wn!==(Wn="tab "+(t[21]==="response"?"tab-active":""))&&c(An,"class",Wn),t[21]==="original"?Yt?Yt.p(t,Ue):(Yt=bh(t),Yt.c(),Yt.m(St,Xt)):Yt&&(Yt.d(1),Yt=null),t[21]==="transformed"?Jt?Jt.p(t,Ue):(Jt=wh(t),Jt.c(),Jt.m(St,qn)):Jt&&(Jt.d(1),Jt=null),t[21]==="response"?cn?cn.p(t,Ue):(cn=Th(t),cn.c(),cn.m(St,null)):cn&&(cn.d(1),cn=null),t[0].authLevel?Kt?Kt.p(t,Ue):(Kt=Ah(t),Kt.c(),Kt.m(A,null)):Kt&&(Kt.d(1),Kt=null)},i:Ee,o:Ee,d(Zt){Zt&&L(e),Ct.d(),sn.d(),en&&en.d(),Wt.d(),qt&&qt.d(),Bt&&Bt.d(),tn&&tn.d(),Pt&&Pt.d(),Yt&&Yt.d(),Jt&&Jt.d(),cn&&cn.d(),Kt&&Kt.d(),ot=!1,at(es)}}}function Oh(t){return new Date(t).toLocaleString()}function ai(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function xh(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Rh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function Yi(t){return JSON.stringify(t,null,2)}function t5(t){const e=t.toLowerCase();return e.includes("auth")?"bg-blue-500":e.includes("plugin")?"bg-purple-500":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"bg-green-500":e.includes("transform")||e.includes("rewrite")?"bg-orange-500":e.includes("error")||e.includes("failed")?"bg-red-500":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function n5(t){const e=t.toLowerCase();return e.includes("auth")?"Auth":e.includes("plugin")?"Plugin":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"Upstream":e.includes("transform")||e.includes("rewrite")?"Transform":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"Retry":"Other"}function s5(t,e,n){let s;Gt(t,Et,ne=>n(24,s=ne));let{log:i}=e,{onClose:l}=e,o=null,r=null,u=!1,f=!1,h=null,p=null,g=!1,m=null,_=null,b=!1,k=!1,v=null,y=null,S=null,C=null,T=!1,O=!1,A=null,x=null,P="original",D=!1,I=!1;function R(ne){return ne?s(\`logs.requestType_\${ne}\`):"-"}function U(ne){const ee=\`logs.steps.\${ne}\`,se=s(ee);return se===ee?ne.split("_").map(K=>K.charAt(0).toUpperCase()+K.slice(1)).join(" "):se}function N(){if(!i.processingSteps||i.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const ne=i.processingSteps,ee=ne[0].timestamp,se=ne.map((ce,he)=>he===ne.length-1?i.duration-(ce.timestamp-ee):ne[he+1].timestamp-ce.timestamp),K=ne.map(ce=>ce.timestamp-ee),q=i.duration;return{durations:se,relativeTime:K,totalDuration:q}}function z(ne){ne.target===ne.currentTarget&&l()}async function B(){const ne={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:C,requestHeaders:m,requestBody:o,responseHeaders:_,responseBody:r,processingSteps:i.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(ne,null,2)),n(23,I=!0),setTimeout(()=>{n(23,I=!1)},2e3)}catch(ee){console.error("Failed to copy:",ee)}}async function j(){const ne={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:C,requestHeaders:m,requestBody:o,responseHeaders:_,responseBody:r,processingSteps:i.processingSteps},ee=new Blob([JSON.stringify(ne,null,2)],{type:"application/json"}),se=URL.createObjectURL(ee),K=document.createElement("a");K.href=se,K.download=\`log-\${i.requestId}.json\`,K.click(),URL.revokeObjectURL(se)}async function F(){if(!(!i.reqBodyId||o!==null)){n(4,u=!0),n(6,h=null);try{n(2,o=await or(i.reqBodyId))}catch(ne){n(6,h=ne instanceof Error?ne.message:"Failed to load request body")}finally{n(4,u=!1)}}}async function W(){if(!(!i.respBodyId||r!==null)){n(5,f=!0),n(7,p=null);try{n(3,r=await or(i.respBodyId))}catch(ne){n(7,p=ne instanceof Error?ne.message:"Failed to load response body")}finally{n(5,f=!1)}}}async function G(){if(!(!i.reqHeaderId||m!==null)){n(11,b=!0),n(13,v=null);try{n(9,m=await rr(i.reqHeaderId))}catch(ne){n(13,v=ne instanceof Error?ne.message:"Failed to load request headers")}finally{n(11,b=!1)}}}async function Y(){if(!(!i.respHeaderId||_!==null)){n(12,k=!0),n(14,y=null);try{n(10,_=await rr(i.respHeaderId))}catch(ne){n(14,y=ne instanceof Error?ne.message:"Failed to load response headers")}finally{n(12,k=!1)}}}async function Q(){if(!(!i.originalReqHeaderId||S!==null)){n(17,T=!0),n(19,A=null);try{n(15,S=await rr(i.originalReqHeaderId))}catch(ne){n(19,A=ne instanceof Error?ne.message:"Failed to load original request headers")}finally{n(17,T=!1)}}}async function le(){if(!(!i.originalReqBodyId||C!==null)){n(18,O=!0),n(20,x=null);try{n(16,C=await or(i.originalReqBodyId))}catch(ne){n(20,x=ne instanceof Error?ne.message:"Failed to load original request body")}finally{n(18,O=!1)}}}is(async()=>{try{const ne=await Ur();n(8,g=ne.logging?.body?.enabled||!1)}catch(ne){console.error("Failed to load config:",ne),n(8,g=!1)}i.originalReqHeaderId&&Q(),i.originalReqBodyId&&le(),i.reqHeaderId&&G(),i.respHeaderId&&Y(),i.reqBodyId&&F(),i.respBodyId&&W()});const Z=()=>n(22,D=!D),V=()=>n(21,P="original"),X=()=>n(21,P="transformed"),J=()=>n(21,P="response"),oe=ne=>ne.key==="Escape"&&l();return t.$$set=ne=>{"log"in ne&&n(0,i=ne.log),"onClose"in ne&&n(1,l=ne.onClose)},[i,l,o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O,A,x,P,D,I,s,R,U,N,z,B,j,Z,V,X,J,oe]}class i5 extends zt{constructor(e){super(),jt(this,e,s5,e5,Lt,{log:0,onClose:1},null,[-1,-1,-1])}}function Dh(t,e,n){const s=t.slice();return s[51]=e[n],s}function l5(t){let e,n,s,i,l=t[22]("logs.startStream")+"",o;return{c(){e=de("svg"),n=de("path"),s=de("path"),i=w(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(r,u){H(r,e,u),a(e,n),a(e,s),H(r,i,u),H(r,o,u)},p(r,u){u[0]&4194304&&l!==(l=r[22]("logs.startStream")+"")&&M(o,l)},d(r){r&&(L(e),L(i),L(o))}}}function o5(t){let e,n,s,i,l=t[22]("logs.stopStream")+"",o;return{c(){e=de("svg"),n=de("path"),s=de("path"),i=w(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(r,u){H(r,e,u),a(e,n),a(e,s),H(r,i,u),H(r,o,u)},p(r,u){u[0]&4194304&&l!==(l=r[22]("logs.stopStream")+"")&&M(o,l)},d(r){r&&(L(e),L(i),L(o))}}}function Lh(t){let e,n,s,i=t[22]("logs.activeFilters")+"",l;return{c(){e=d("span"),n=E(t[21]),s=w(),l=E(i),c(e,"class","badge badge-primary badge-sm")},m(o,r){H(o,e,r),a(e,n),a(e,s),a(e,l)},p(o,r){r[0]&2097152&&M(n,o[21]),r[0]&4194304&&i!==(i=o[22]("logs.activeFilters")+"")&&M(l,i)},d(o){o&&L(e)}}}function Hh(t){let e,n,s,i=t[22]("logs.recentHours")+"",l,o,r,u,f;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=w(),r=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-recent-hours"),c(r,"id","logs-recent-hours"),c(r,"type","number"),c(r,"min","1"),c(r,"class","input input-bordered input-sm"),c(e,"class","form-control")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(s,l),a(e,o),a(e,r),ie(r,t[9]),u||(f=te(r,"input",t[40]),u=!0)},p(h,p){p[0]&4194304&&i!==(i=h[22]("logs.recentHours")+"")&&M(l,i),p[0]&512&&gt(r.value)!==h[9]&&ie(r,h[9])},d(h){h&&L(e),u=!1,f()}}}function Ih(t){let e,n,s,i=t[22]("logs.startTime")+"",l,o,r,u,f,h,p,g=t[22]("logs.endTime")+"",m,_,b,k,v;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=w(),r=d("input"),u=w(),f=d("div"),h=d("label"),p=d("span"),m=E(g),_=w(),b=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-start-time"),c(r,"id","logs-start-time"),c(r,"type","datetime-local"),c(r,"class","input input-bordered input-sm"),c(e,"class","form-control"),c(p,"class","label-text"),c(h,"class","label"),c(h,"for","logs-end-time"),c(b,"id","logs-end-time"),c(b,"type","datetime-local"),c(b,"class","input input-bordered input-sm"),c(f,"class","form-control")},m(y,S){H(y,e,S),a(e,n),a(n,s),a(s,l),a(e,o),a(e,r),ie(r,t[10]),H(y,u,S),H(y,f,S),a(f,h),a(h,p),a(p,m),a(f,_),a(f,b),ie(b,t[11]),k||(v=[te(r,"input",t[41]),te(b,"input",t[42])],k=!0)},p(y,S){S[0]&4194304&&i!==(i=y[22]("logs.startTime")+"")&&M(l,i),S[0]&1024&&ie(r,y[10]),S[0]&4194304&&g!==(g=y[22]("logs.endTime")+"")&&M(m,g),S[0]&2048&&ie(b,y[11])},d(y){y&&(L(e),L(u),L(f)),k=!1,at(v)}}}function r5(t){let e,n,s,i,l,o,r,u=t[22]("logs.time")+"",f,h,p,g=t[22]("logs.method")+"",m,_,b,k=t[22]("logs.path")+"",v,y,S,C=t[22]("logs.status")+"",T,O,A,x=t[22]("logs.requestType")+"",P,D,I,R=t[22]("logs.duration")+"",U,N,z,B=t[22]("logs.upstream")+"",j,F,W,G=t[22]("logs.actions")+"",Y,Q,le,Z=[],V=new Map,X,J,oe,ne=t[22]("logs.showing",{values:{start:(t[0]-1)*oi+1,end:Math.min(t[0]*oi,t[13]),total:t[13]}})+"",ee,se,K,q,ce,he,ke,we,pe=t[22]("logs.page",{values:{page:t[0],totalPages:t[14]}})+"",me,Pe,Se,Ce,_e,Ae,ye,$=et(t[12]);const ue=ae=>ae[51].requestId;for(let ae=0;ae<$.length;ae+=1){let ge=Dh(t,$,ae),re=ue(ge);V.set(re,Z[ae]=Bh(re,ge))}return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("table"),l=d("thead"),o=d("tr"),r=d("th"),f=E(u),h=w(),p=d("th"),m=E(g),_=w(),b=d("th"),v=E(k),y=w(),S=d("th"),T=E(C),O=w(),A=d("th"),P=E(x),D=w(),I=d("th"),U=E(R),N=w(),z=d("th"),j=E(B),F=w(),W=d("th"),Y=E(G),Q=w(),le=d("tbody");for(let ae=0;ae<Z.length;ae+=1)Z[ae].c();X=w(),J=d("div"),oe=d("div"),ee=E(ne),se=w(),K=d("div"),q=d("button"),ce=E("\xAB"),ke=w(),we=d("button"),me=E(pe),Pe=w(),Se=d("button"),Ce=E("\xBB"),c(i,"class","table table-zebra table-sm"),c(s,"class","overflow-x-auto"),c(oe,"class","text-sm"),c(q,"class","join-item btn btn-sm"),q.disabled=he=t[0]<=1,c(we,"class","join-item btn btn-sm"),c(Se,"class","join-item btn btn-sm"),Se.disabled=_e=t[0]>=t[14],c(K,"class","join"),c(J,"class","flex justify-between items-center p-4"),c(n,"class","card-body p-0"),c(e,"class","card bg-base-100 shadow-xl")},m(ae,ge){H(ae,e,ge),a(e,n),a(n,s),a(s,i),a(i,l),a(l,o),a(o,r),a(r,f),a(o,h),a(o,p),a(p,m),a(o,_),a(o,b),a(b,v),a(o,y),a(o,S),a(S,T),a(o,O),a(o,A),a(A,P),a(o,D),a(o,I),a(I,U),a(o,N),a(o,z),a(z,j),a(o,F),a(o,W),a(W,Y),a(i,Q),a(i,le);for(let re=0;re<Z.length;re+=1)Z[re]&&Z[re].m(le,null);a(n,X),a(n,J),a(J,oe),a(oe,ee),a(J,se),a(J,K),a(K,q),a(q,ce),a(K,ke),a(K,we),a(we,me),a(K,Pe),a(K,Se),a(Se,Ce),Ae||(ye=[te(q,"click",t[46]),te(Se,"click",t[47])],Ae=!0)},p(ae,ge){ge[0]&4194304&&u!==(u=ae[22]("logs.time")+"")&&M(f,u),ge[0]&4194304&&g!==(g=ae[22]("logs.method")+"")&&M(m,g),ge[0]&4194304&&k!==(k=ae[22]("logs.path")+"")&&M(v,k),ge[0]&4194304&&C!==(C=ae[22]("logs.status")+"")&&M(T,C),ge[0]&4194304&&x!==(x=ae[22]("logs.requestType")+"")&&M(P,x),ge[0]&4194304&&R!==(R=ae[22]("logs.duration")+"")&&M(U,R),ge[0]&4194304&&B!==(B=ae[22]("logs.upstream")+"")&&M(j,B),ge[0]&4194304&&G!==(G=ae[22]("logs.actions")+"")&&M(Y,G),ge[0]&104861696&&($=et(ae[12]),Z=Ir(Z,ge,ue,1,ae,$,V,le,ig,Bh,null,Dh)),ge[0]&4202497&&ne!==(ne=ae[22]("logs.showing",{values:{start:(ae[0]-1)*oi+1,end:Math.min(ae[0]*oi,ae[13]),total:ae[13]}})+"")&&M(ee,ne),ge[0]&1&&he!==(he=ae[0]<=1)&&(q.disabled=he),ge[0]&4210689&&pe!==(pe=ae[22]("logs.page",{values:{page:ae[0],totalPages:ae[14]}})+"")&&M(me,pe),ge[0]&16385&&_e!==(_e=ae[0]>=ae[14])&&(Se.disabled=_e)},d(ae){ae&&L(e);for(let ge=0;ge<Z.length;ge+=1)Z[ge].d();Ae=!1,at(ye)}}}function a5(t){let e,n,s,i,l,o=t[22]("logs.noData")+"",r;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){H(u,e,f),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r)},p(u,f){f[0]&4194304&&o!==(o=u[22]("logs.noData")+"")&&M(r,o)},d(u){u&&L(e)}}}function u5(t){let e,n,s,i,l,o=t[22]("common.error")+"",r,u,f;return{c(){e=d("div"),n=de("svg"),s=de("path"),i=w(),l=d("span"),r=E(o),u=E(": "),f=E(t[16]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){H(h,e,p),a(e,n),a(n,s),a(e,i),a(e,l),a(l,r),a(l,u),a(l,f)},p(h,p){p[0]&4194304&&o!==(o=h[22]("common.error")+"")&&M(r,o),p[0]&65536&&M(f,h[16])},d(h){h&&L(e)}}}function c5(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){H(n,e,s)},p:Ee,d(n){n&&L(e)}}}function Bh(t,e){let n,s,i=Nh(e[51].timestamp)+"",l,o,r,u,f=e[51].method+"",h,p,g,m=e[51].path+"",_,b,k,v,y,S=e[51].status+"",C,T,O,A,x,P=e[26](e[51].requestType)+"",D,I,R,U,N,z=jh(e[51].duration)+"",B,j,F,W=(e[51].upstream||"-")+"",G,Y,Q,le,Z,V=e[22]("logs.viewDetail")+"",X,J,oe,ne;function ee(){return e[45](e[51])}return{key:t,first:null,c(){n=d("tr"),s=d("td"),l=E(i),o=w(),r=d("td"),u=d("span"),h=E(f),p=w(),g=d("td"),_=E(m),k=w(),v=d("td"),y=d("span"),C=E(S),O=w(),A=d("td"),x=d("span"),D=E(P),U=w(),N=d("td"),B=E(z),j=w(),F=d("td"),G=E(W),Q=w(),le=d("td"),Z=d("button"),X=E(V),J=w(),c(s,"class","text-xs"),c(u,"class","badge badge-sm"),c(g,"class","font-mono text-xs truncate max-w-xs"),c(g,"title",b=e[51].path),c(y,"class",T="badge badge-sm "+zh(e[51].status)),c(x,"class",I="badge badge-sm "+Uh(e[51].requestType)),c(x,"title",R=e[22](\`logs.requestType_\${e[51].requestType}_desc\`)),c(N,"class","text-xs"),c(F,"class","text-xs truncate max-w-xs"),c(F,"title",Y=e[51].upstream||"-"),c(Z,"class","btn btn-xs btn-ghost"),c(n,"class","hover"),this.first=n},m(se,K){H(se,n,K),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),a(u,h),a(n,p),a(n,g),a(g,_),a(n,k),a(n,v),a(v,y),a(y,C),a(n,O),a(n,A),a(A,x),a(x,D),a(n,U),a(n,N),a(N,B),a(n,j),a(n,F),a(F,G),a(n,Q),a(n,le),a(le,Z),a(Z,X),a(n,J),oe||(ne=te(Z,"click",ee),oe=!0)},p(se,K){e=se,K[0]&4096&&i!==(i=Nh(e[51].timestamp)+"")&&M(l,i),K[0]&4096&&f!==(f=e[51].method+"")&&M(h,f),K[0]&4096&&m!==(m=e[51].path+"")&&M(_,m),K[0]&4096&&b!==(b=e[51].path)&&c(g,"title",b),K[0]&4096&&S!==(S=e[51].status+"")&&M(C,S),K[0]&4096&&T!==(T="badge badge-sm "+zh(e[51].status))&&c(y,"class",T),K[0]&4096&&P!==(P=e[26](e[51].requestType)+"")&&M(D,P),K[0]&4096&&I!==(I="badge badge-sm "+Uh(e[51].requestType))&&c(x,"class",I),K[0]&4198400&&R!==(R=e[22](\`logs.requestType_\${e[51].requestType}_desc\`))&&c(x,"title",R),K[0]&4096&&z!==(z=jh(e[51].duration)+"")&&M(B,z),K[0]&4096&&W!==(W=(e[51].upstream||"-")+"")&&M(G,W),K[0]&4096&&Y!==(Y=e[51].upstream||"-")&&c(F,"title",Y),K[0]&4194304&&V!==(V=e[22]("logs.viewDetail")+"")&&M(X,V)},d(se){se&&L(n),oe=!1,ne()}}}function Fh(t){let e,n;return e=new i5({props:{log:t[17],onClose:t[48]}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i[0]&131072&&(l.log=s[17]),i[0]&393216&&(l.onClose=s[48]),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function f5(t){let e,n,s,i=t[22]("logs.title")+"",l,o,r,u,f,h,p,g,m,_,b,k=t[22]("logs.export")+"",v,y,S,C,T,O,A,x,P,D,I,R,U,N,z=t[22]("logs.filters")+"",B,j,F,W,G=t[22]("logs.clearFilters")+"",Y,Q,le,Z,V,X,J,oe=t[22]("logs.searchTerm")+"",ne,ee,se,K,q,ce,he,ke,we=t[22]("logs.method")+"",pe,me,Pe,Se,Ce=t[22]("logs.allMethods")+"",_e,Ae,ye,$,ue,ae,ge,re,Ne,Ye,Ve=t[22]("logs.status")+"",Qe,st,Xe,vt,rt,He,$e,Oe,ft=t[22]("logs.result")+"",qe,Re,ze,ve,Je=t[22]("logs.allResults")+"",be,We,yt=t[22]("logs.success")+"",Ke,Ie,kt=t[22]("logs.failed")+"",nt,ht,Ot,Te,it,De,tt=t[22]("logs.advancedFilters")+"",Ht,Rn,pn,xe,lt,an,Mt,ls=t[22]("logs.requestTypeFilter")+"",Tn,zn,It,gn,Dn=t[22]("logs.requestType_all")+"",un,mn,Pn=t[22]("logs.requestType_final")+"",Fn,Ln,Un=t[22]("logs.requestType_retry")+"",os,Ut,Mn=t[22]("logs.requestType_recovery")+"",Hn,hn,Vn,An,wn,kn=t[22]("logs.timeRange")+"",Wn,rs,St,Xt,qn=t[22]("logs.allTime")+"",as,ot,es=t[22]("logs.recentTime")+"",_s,xt,Ct=t[22]("logs.customTime")+"",$t,nn,sn,en,Vt,ts,Wt,qt=t[22]("logs.sortBy")+"",Bt,tn,Pt,Yt,Jt=t[22]("logs.sortByTimestamp")+"",cn,Kt,Zt=t[22]("logs.sortByDuration")+"",Ue,ln,bn=t[22]("logs.sortByStatus")+"",fe,Le,Qt,vs,ys,Gn=t[22]("logs.sortOrder")+"",ns,_n,Xn,As,js=t[22]("logs.desc")+"",gi,Os,mi=t[22]("logs.asc")+"",In,Nn,je,Ze,mt,jo,va;function ya(Me,Ge){return Me[19]?o5:l5}let Il=ya(t),xs=Il(t),us=t[21]>0&&Lh(t),cs=t[8]==="recent"&&Hh(t),fs=t[8]==="custom"&&Ih(t);function wa(Me,Ge){return Me[15]&&Me[12].length===0?c5:Me[16]?u5:Me[12].length===0?a5:r5}let Bl=wa(t),Rs=Bl(t),Bn=t[18]&&t[17]&&Fh(t);return{c(){e=d("div"),n=d("div"),s=d("h1"),l=E(i),o=w(),r=d("div"),u=d("button"),xs.c(),h=w(),p=d("div"),g=d("div"),m=de("svg"),_=de("path"),b=w(),v=E(k),y=w(),S=d("ul"),C=d("li"),T=d("button"),T.textContent="JSON",O=w(),A=d("li"),x=d("button"),x.textContent="CSV",P=w(),D=d("div"),I=d("div"),R=d("div"),U=d("div"),N=d("h2"),B=E(z),j=w(),us&&us.c(),F=w(),W=d("button"),Y=E(G),le=w(),Z=d("div"),V=d("div"),X=d("label"),J=d("span"),ne=E(oe),ee=w(),se=d("input"),q=w(),ce=d("div"),he=d("label"),ke=d("span"),pe=E(we),me=w(),Pe=d("select"),Se=d("option"),_e=E(Ce),Ae=d("option"),Ae.textContent="GET",ye=d("option"),ye.textContent="POST",$=d("option"),$.textContent="PUT",ue=d("option"),ue.textContent="DELETE",ae=d("option"),ae.textContent="PATCH",ge=w(),re=d("div"),Ne=d("label"),Ye=d("span"),Qe=E(Ve),st=w(),Xe=d("input"),rt=w(),He=d("div"),$e=d("label"),Oe=d("span"),qe=E(ft),Re=w(),ze=d("select"),ve=d("option"),be=E(Je),We=d("option"),Ke=E(yt),Ie=d("option"),nt=E(kt),ht=w(),Ot=d("div"),Te=d("input"),it=w(),De=d("div"),Ht=E(tt),Rn=w(),pn=d("div"),xe=d("div"),lt=d("div"),an=d("label"),Mt=d("span"),Tn=E(ls),zn=w(),It=d("select"),gn=d("option"),un=E(Dn),mn=d("option"),Fn=E(Pn),Ln=d("option"),os=E(Un),Ut=d("option"),Hn=E(Mn),hn=w(),Vn=d("div"),An=d("label"),wn=d("span"),Wn=E(kn),rs=w(),St=d("select"),Xt=d("option"),as=E(qn),ot=d("option"),_s=E(es),xt=d("option"),$t=E(Ct),nn=w(),cs&&cs.c(),sn=w(),fs&&fs.c(),en=w(),Vt=d("div"),ts=d("label"),Wt=d("span"),Bt=E(qt),tn=w(),Pt=d("select"),Yt=d("option"),cn=E(Jt),Kt=d("option"),Ue=E(Zt),ln=d("option"),fe=E(bn),Le=w(),Qt=d("div"),vs=d("label"),ys=d("span"),ns=E(Gn),_n=w(),Xn=d("select"),As=d("option"),gi=E(js),Os=d("option"),In=E(mi),Nn=w(),Rs.c(),je=w(),Bn&&Bn.c(),Ze=$n(),c(s,"class","text-3xl font-bold"),c(u,"class",f="btn btn-sm "+(t[19]?"btn-error":"btn-primary")),c(_,"stroke-linecap","round"),c(_,"stroke-linejoin","round"),c(_,"stroke-width","2"),c(_,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(g,"role","button"),c(g,"tabindex","0"),c(g,"class","btn btn-sm btn-secondary"),c(S,"role","menu"),c(S,"tabindex","0"),c(S,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 top-[3em]"),c(p,"class","dropdown dropdown-end z-[1]"),c(r,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(N,"class","card-title text-lg"),c(U,"class","flex items-center gap-2"),c(W,"class","btn btn-sm btn-ghost"),W.disabled=Q=t[21]===0,c(R,"class","flex justify-between items-center mb-4"),c(J,"class","label-text"),c(X,"class","label"),c(X,"for","logs-search"),c(se,"id","logs-search"),c(se,"type","text"),c(se,"placeholder",K=t[22]("logs.searchPlaceholder")),c(se,"class","input input-bordered input-sm"),c(V,"class","form-control"),c(ke,"class","label-text"),c(he,"class","label"),c(he,"for","logs-method"),Se.__value="",ie(Se,Se.__value),Ae.__value="GET",ie(Ae,Ae.__value),ye.__value="POST",ie(ye,ye.__value),$.__value="PUT",ie($,$.__value),ue.__value="DELETE",ie(ue,ue.__value),ae.__value="PATCH",ie(ae,ae.__value),c(Pe,"id","logs-method"),c(Pe,"class","select select-bordered select-sm"),t[2]===void 0&&bs(()=>t[34].call(Pe)),c(ce,"class","form-control"),c(Ye,"class","label-text"),c(Ne,"class","label"),c(Ne,"for","logs-status"),c(Xe,"id","logs-status"),c(Xe,"type","text"),c(Xe,"placeholder",vt=t[22]("logs.statusPlaceholder")),c(Xe,"class","input input-bordered input-sm"),c(re,"class","form-control"),c(Oe,"class","label-text"),c($e,"class","label"),c($e,"for","logs-result"),ve.__value=void 0,ie(ve,ve.__value),We.__value=!0,ie(We,We.__value),Ie.__value=!1,ie(Ie,Ie.__value),c(ze,"id","logs-result"),c(ze,"class","select select-bordered select-sm"),t[4]===void 0&&bs(()=>t[36].call(ze)),c(He,"class","form-control"),c(Z,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4"),c(Te,"type","checkbox"),c(Te,"class","peer"),c(De,"class","collapse-title text-sm font-medium"),c(Mt,"class","label-text"),c(an,"class","label"),c(an,"for","logs-request-type"),gn.__value="",ie(gn,gn.__value),mn.__value="final",ie(mn,mn.__value),Ln.__value="retry",ie(Ln,Ln.__value),Ut.__value="recovery",ie(Ut,Ut.__value),c(It,"id","logs-request-type"),c(It,"class","select select-bordered select-sm"),t[5]===void 0&&bs(()=>t[38].call(It)),c(lt,"class","form-control"),c(wn,"class","label-text"),c(An,"class","label"),c(An,"for","logs-time-range"),Xt.__value="all",ie(Xt,Xt.__value),ot.__value="recent",ie(ot,ot.__value),xt.__value="custom",ie(xt,xt.__value),c(St,"id","logs-time-range"),c(St,"class","select select-bordered select-sm"),t[8]===void 0&&bs(()=>t[39].call(St)),c(Vn,"class","form-control"),c(Wt,"class","label-text"),c(ts,"class","label"),c(ts,"for","logs-sort-by"),Yt.__value="timestamp",ie(Yt,Yt.__value),Kt.__value="duration",ie(Kt,Kt.__value),ln.__value="status",ie(ln,ln.__value),c(Pt,"id","logs-sort-by"),c(Pt,"class","select select-bordered select-sm"),t[6]===void 0&&bs(()=>t[43].call(Pt)),c(Vt,"class","form-control"),c(ys,"class","label-text"),c(vs,"class","label"),c(vs,"for","logs-sort-order"),As.__value="desc",ie(As,As.__value),Os.__value="asc",ie(Os,Os.__value),c(Xn,"id","logs-sort-order"),c(Xn,"class","select select-bordered select-sm"),t[7]===void 0&&bs(()=>t[44].call(Xn)),c(Qt,"class","form-control"),c(xe,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 pt-4"),c(pn,"class","collapse-content"),c(Ot,"class","collapse collapse-arrow bg-base-200"),c(I,"class","card-body"),c(D,"class","card bg-base-100 shadow-xl mb-6"),c(e,"class","p-6")},m(Me,Ge){H(Me,e,Ge),a(e,n),a(n,s),a(s,l),a(n,o),a(n,r),a(r,u),xs.m(u,null),a(r,h),a(r,p),a(p,g),a(g,m),a(m,_),a(g,b),a(g,v),a(p,y),a(p,S),a(S,C),a(C,T),a(S,O),a(S,A),a(A,x),a(e,P),a(e,D),a(D,I),a(I,R),a(R,U),a(U,N),a(N,B),a(U,j),us&&us.m(U,null),a(R,F),a(R,W),a(W,Y),a(I,le),a(I,Z),a(Z,V),a(V,X),a(X,J),a(J,ne),a(V,ee),a(V,se),ie(se,t[1]),a(Z,q),a(Z,ce),a(ce,he),a(he,ke),a(ke,pe),a(ce,me),a(ce,Pe),a(Pe,Se),a(Se,_e),a(Pe,Ae),a(Pe,ye),a(Pe,$),a(Pe,ue),a(Pe,ae),Cn(Pe,t[2],!0),a(Z,ge),a(Z,re),a(re,Ne),a(Ne,Ye),a(Ye,Qe),a(re,st),a(re,Xe),ie(Xe,t[3]),a(Z,rt),a(Z,He),a(He,$e),a($e,Oe),a(Oe,qe),a(He,Re),a(He,ze),a(ze,ve),a(ve,be),a(ze,We),a(We,Ke),a(ze,Ie),a(Ie,nt),Cn(ze,t[4],!0),a(I,ht),a(I,Ot),a(Ot,Te),Te.checked=t[20],a(Ot,it),a(Ot,De),a(De,Ht),a(Ot,Rn),a(Ot,pn),a(pn,xe),a(xe,lt),a(lt,an),a(an,Mt),a(Mt,Tn),a(lt,zn),a(lt,It),a(It,gn),a(gn,un),a(It,mn),a(mn,Fn),a(It,Ln),a(Ln,os),a(It,Ut),a(Ut,Hn),Cn(It,t[5],!0),a(xe,hn),a(xe,Vn),a(Vn,An),a(An,wn),a(wn,Wn),a(Vn,rs),a(Vn,St),a(St,Xt),a(Xt,as),a(St,ot),a(ot,_s),a(St,xt),a(xt,$t),Cn(St,t[8],!0),a(xe,nn),cs&&cs.m(xe,null),a(xe,sn),fs&&fs.m(xe,null),a(xe,en),a(xe,Vt),a(Vt,ts),a(ts,Wt),a(Wt,Bt),a(Vt,tn),a(Vt,Pt),a(Pt,Yt),a(Yt,cn),a(Pt,Kt),a(Kt,Ue),a(Pt,ln),a(ln,fe),Cn(Pt,t[6],!0),a(xe,Le),a(xe,Qt),a(Qt,vs),a(vs,ys),a(ys,ns),a(Qt,_n),a(Qt,Xn),a(Xn,As),a(As,gi),a(Xn,Os),a(Os,In),Cn(Xn,t[7],!0),a(e,Nn),Rs.m(e,null),H(Me,je,Ge),Bn&&Bn.m(Me,Ge),H(Me,Ze,Ge),mt=!0,jo||(va=[te(u,"click",t[24]),te(T,"click",t[31]),te(x,"click",t[32]),te(W,"click",t[27]),te(se,"input",t[33]),te(Pe,"change",t[34]),te(Xe,"input",t[35]),te(ze,"change",t[36]),te(Te,"change",t[37]),te(Te,"change",t[28]),te(It,"change",t[38]),te(St,"change",t[39]),te(Pt,"change",t[43]),te(Xn,"change",t[44])],jo=!0)},p(Me,Ge){(!mt||Ge[0]&4194304)&&i!==(i=Me[22]("logs.title")+"")&&M(l,i),Il===(Il=ya(Me))&&xs?xs.p(Me,Ge):(xs.d(1),xs=Il(Me),xs&&(xs.c(),xs.m(u,null))),(!mt||Ge[0]&524288&&f!==(f="btn btn-sm "+(Me[19]?"btn-error":"btn-primary")))&&c(u,"class",f),(!mt||Ge[0]&4194304)&&k!==(k=Me[22]("logs.export")+"")&&M(v,k),(!mt||Ge[0]&4194304)&&z!==(z=Me[22]("logs.filters")+"")&&M(B,z),Me[21]>0?us?us.p(Me,Ge):(us=Lh(Me),us.c(),us.m(U,null)):us&&(us.d(1),us=null),(!mt||Ge[0]&4194304)&&G!==(G=Me[22]("logs.clearFilters")+"")&&M(Y,G),(!mt||Ge[0]&2097152&&Q!==(Q=Me[21]===0))&&(W.disabled=Q),(!mt||Ge[0]&4194304)&&oe!==(oe=Me[22]("logs.searchTerm")+"")&&M(ne,oe),(!mt||Ge[0]&4194304&&K!==(K=Me[22]("logs.searchPlaceholder")))&&c(se,"placeholder",K),Ge[0]&2&&se.value!==Me[1]&&ie(se,Me[1]),(!mt||Ge[0]&4194304)&&we!==(we=Me[22]("logs.method")+"")&&M(pe,we),(!mt||Ge[0]&4194304)&&Ce!==(Ce=Me[22]("logs.allMethods")+"")&&M(_e,Ce),Ge[0]&4&&Cn(Pe,Me[2]),(!mt||Ge[0]&4194304)&&Ve!==(Ve=Me[22]("logs.status")+"")&&M(Qe,Ve),(!mt||Ge[0]&4194304&&vt!==(vt=Me[22]("logs.statusPlaceholder")))&&c(Xe,"placeholder",vt),Ge[0]&8&&Xe.value!==Me[3]&&ie(Xe,Me[3]),(!mt||Ge[0]&4194304)&&ft!==(ft=Me[22]("logs.result")+"")&&M(qe,ft),(!mt||Ge[0]&4194304)&&Je!==(Je=Me[22]("logs.allResults")+"")&&M(be,Je),(!mt||Ge[0]&4194304)&&yt!==(yt=Me[22]("logs.success")+"")&&M(Ke,yt),(!mt||Ge[0]&4194304)&&kt!==(kt=Me[22]("logs.failed")+"")&&M(nt,kt),Ge[0]&16&&Cn(ze,Me[4]),Ge[0]&1048576&&(Te.checked=Me[20]),(!mt||Ge[0]&4194304)&&tt!==(tt=Me[22]("logs.advancedFilters")+"")&&M(Ht,tt),(!mt||Ge[0]&4194304)&&ls!==(ls=Me[22]("logs.requestTypeFilter")+"")&&M(Tn,ls),(!mt||Ge[0]&4194304)&&Dn!==(Dn=Me[22]("logs.requestType_all")+"")&&M(un,Dn),(!mt||Ge[0]&4194304)&&Pn!==(Pn=Me[22]("logs.requestType_final")+"")&&M(Fn,Pn),(!mt||Ge[0]&4194304)&&Un!==(Un=Me[22]("logs.requestType_retry")+"")&&M(os,Un),(!mt||Ge[0]&4194304)&&Mn!==(Mn=Me[22]("logs.requestType_recovery")+"")&&M(Hn,Mn),Ge[0]&32&&Cn(It,Me[5]),(!mt||Ge[0]&4194304)&&kn!==(kn=Me[22]("logs.timeRange")+"")&&M(Wn,kn),(!mt||Ge[0]&4194304)&&qn!==(qn=Me[22]("logs.allTime")+"")&&M(as,qn),(!mt||Ge[0]&4194304)&&es!==(es=Me[22]("logs.recentTime")+"")&&M(_s,es),(!mt||Ge[0]&4194304)&&Ct!==(Ct=Me[22]("logs.customTime")+"")&&M($t,Ct),Ge[0]&256&&Cn(St,Me[8]),Me[8]==="recent"?cs?cs.p(Me,Ge):(cs=Hh(Me),cs.c(),cs.m(xe,sn)):cs&&(cs.d(1),cs=null),Me[8]==="custom"?fs?fs.p(Me,Ge):(fs=Ih(Me),fs.c(),fs.m(xe,en)):fs&&(fs.d(1),fs=null),(!mt||Ge[0]&4194304)&&qt!==(qt=Me[22]("logs.sortBy")+"")&&M(Bt,qt),(!mt||Ge[0]&4194304)&&Jt!==(Jt=Me[22]("logs.sortByTimestamp")+"")&&M(cn,Jt),(!mt||Ge[0]&4194304)&&Zt!==(Zt=Me[22]("logs.sortByDuration")+"")&&M(Ue,Zt),(!mt||Ge[0]&4194304)&&bn!==(bn=Me[22]("logs.sortByStatus")+"")&&M(fe,bn),Ge[0]&64&&Cn(Pt,Me[6]),(!mt||Ge[0]&4194304)&&Gn!==(Gn=Me[22]("logs.sortOrder")+"")&&M(ns,Gn),(!mt||Ge[0]&4194304)&&js!==(js=Me[22]("logs.desc")+"")&&M(gi,js),(!mt||Ge[0]&4194304)&&mi!==(mi=Me[22]("logs.asc")+"")&&M(In,mi),Ge[0]&128&&Cn(Xn,Me[7]),Bl===(Bl=wa(Me))&&Rs?Rs.p(Me,Ge):(Rs.d(1),Rs=Bl(Me),Rs&&(Rs.c(),Rs.m(e,null))),Me[18]&&Me[17]?Bn?(Bn.p(Me,Ge),Ge[0]&393216&&Be(Bn,1)):(Bn=Fh(Me),Bn.c(),Be(Bn,1),Bn.m(Ze.parentNode,Ze)):Bn&&(gs(),Fe(Bn,1,1,()=>{Bn=null}),ms())},i(Me){mt||(Be(Bn),mt=!0)},o(Me){Fe(Bn),mt=!1},d(Me){Me&&(L(e),L(je),L(Ze)),xs.d(),us&&us.d(),cs&&cs.d(),fs&&fs.d(),Rs.d(),Bn&&Bn.d(Me),jo=!1,at(va)}}}let oi=50;function Nh(t){return new Date(t).toLocaleString()}function jh(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function zh(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Uh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function h5(t,e,n){let s,i;Gt(t,Et,pe=>n(22,i=pe));let l=1,o="",r="",u="",f,h="",p="timestamp",g="desc",m="recent",_=1,b="",k="",v=[],y=0,S=0,C=!0,T=null,O=null,A=!1,x=!1,P=null,D="",I="",R=!1;async function U(){try{n(15,C=!0),n(16,T=null);const pe={page:l,limit:oi,sortBy:p,sortOrder:g};o.trim()&&(pe.searchTerm=o.trim()),r&&(pe.method=r),u&&(pe.status=parseInt(u)),f!==void 0&&(pe.success=f),h&&(pe.requestType=h),m==="recent"?(pe.endTime=Date.now(),pe.startTime=Date.now()-_*60*60*1e3):m==="custom"&&(b&&(pe.startTime=new Date(b).getTime()),k&&(pe.endTime=new Date(k).getTime()));const me=await bv(pe);n(12,v=me.data),n(13,y=me.total),n(14,S=me.totalPages)}catch(pe){n(16,T=pe.message)}finally{n(15,C=!1)}}async function N(pe){try{const me={};o.trim()&&(me.searchTerm=o.trim()),r&&(me.method=r),u&&(me.status=parseInt(u)),f!==void 0&&(me.success=f),h&&(me.requestType=h),m==="recent"?(me.endTime=Date.now(),me.startTime=Date.now()-_*60*60*1e3):m==="custom"&&(b&&(me.startTime=new Date(b).getTime()),k&&(me.endTime=new Date(k).getTime()));const Pe=await _v(me,pe),Se=URL.createObjectURL(Pe),Ce=document.createElement("a");Ce.href=Se,Ce.download=\`access-logs-\${Date.now()}.\${pe}\`,Ce.click(),URL.revokeObjectURL(Se)}catch(me){alert(\`Export failed: \${me.message}\`)}}function z(){x?(P&&(P.close(),P=null),n(19,x=!1)):(P=vv(1e3),P.onmessage=pe=>{const me=JSON.parse(pe.data);n(12,v=[me,...v]),v.length>oi&&n(12,v=v.slice(0,oi))},P.onerror=()=>{console.error("Stream connection error"),z()},n(19,x=!0))}function B(pe){n(17,O=pe),n(18,A=!0)}function j(pe){return pe?i(\`logs.requestType_\${pe}\`):"-"}function F(){n(1,o=""),n(2,r=""),n(3,u=""),n(4,f=void 0),n(5,h=""),n(8,m="recent"),n(9,_=1),n(10,b=""),n(11,k=""),n(6,p="timestamp"),n(7,g="desc"),n(0,l=1)}function W(){localStorage.setItem("logsAdvancedFiltersExpanded",String(R))}is(()=>{const pe=localStorage.getItem("logsAdvancedFiltersExpanded");pe!==null&&n(20,R=pe==="true"),U(),z()}),Ai(()=>{P&&P.close()});const G=()=>N("json"),Y=()=>N("csv");function Q(){o=this.value,n(1,o)}function le(){r=Is(this),n(2,r)}function Z(){u=this.value,n(3,u)}function V(){f=Is(this),n(4,f)}function X(){R=this.checked,n(20,R)}function J(){h=Is(this),n(5,h)}function oe(){m=Is(this),n(8,m)}function ne(){_=gt(this.value),n(9,_)}function ee(){b=this.value,n(10,b)}function se(){k=this.value,n(11,k)}function K(){p=Is(this),n(6,p)}function q(){g=Is(this),n(7,g)}const ce=pe=>B(pe),he=()=>n(0,l=l-1),ke=()=>n(0,l=l+1),we=()=>{n(18,A=!1),n(17,O=null)};return t.$$.update=()=>{if(t.$$.dirty[0]&1022&&n(21,s=[o.trim(),r,u,f!==void 0,h,m!=="all"&&m!=="recent"||_!==1,p!=="timestamp"||g!=="desc"].filter(Boolean).length),t.$$.dirty[0]&536871934){const pe=JSON.stringify({limit:oi,searchTerm:o,method:r,statusFilter:u,successFilter:f,requestTypeFilter:h,sortBy:p,sortOrder:g,timeRangeType:m,recentHours:_});D&&pe!==D&&n(0,l=1),n(29,D=pe)}if(t.$$.dirty[0]&1073745152){const pe=JSON.stringify({customStartTime:b,customEndTime:k});m==="custom"&&I&&pe!==I&&n(0,l=1),n(30,I=pe)}t.$$.dirty[0]&4095&&U()},[l,o,r,u,f,h,p,g,m,_,b,k,v,y,S,C,T,O,A,x,R,s,i,N,z,B,j,F,W,D,I,G,Y,Q,le,Z,V,X,J,oe,ne,ee,se,K,q,ce,he,ke,we]}class d5 extends zt{constructor(e){super(),jt(this,e,h5,f5,Lt,{},null,[-1,-1])}}async function p5(t){return dn.post("/auth/login",{token:t})}function Vh(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[2]),c(n,"class","label-text-alt text-error"),c(e,"class","label")},m(i,l){H(i,e,l),a(e,n),a(n,s)},p(i,l){l&4&&M(s,i[2])},d(i){i&&L(e)}}}function g5(t){let e,n,s,i,l,o,r,u,f=t[3]("login.title")+"",h,p,g,m=t[3]("login.subtitle")+"",_,b,k,v,y,S=t[3]("login.token")+"",C,T,O,A,x,P,D,I,R=(t[1]?t[3]("login.loggingIn"):t[3]("login.submit"))+"",U,N,z,B,j,F=t[2]&&Vh(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=de("svg"),o=de("path"),r=w(),u=d("h1"),h=E(f),p=w(),g=d("p"),_=E(m),b=w(),k=d("div"),v=d("label"),y=d("span"),C=E(S),T=w(),O=d("input"),x=w(),F&&F.c(),P=w(),D=d("div"),I=d("button"),U=E(R),N=w(),z=d("div"),z.textContent="Bungee Reverse Proxy",c(o,"stroke-linecap","round"),c(o,"stroke-linejoin","round"),c(o,"stroke-width","2"),c(o,"d","M13 10V3L4 14h7v7l9-11h-7z"),c(l,"xmlns","http://www.w3.org/2000/svg"),c(l,"class","h-16 w-16 text-primary mb-4"),c(l,"fill","none"),c(l,"viewBox","0 0 24 24"),c(l,"stroke","currentColor"),c(u,"class","text-3xl font-bold text-center"),c(g,"class","text-sm text-base-content/60 text-center mt-2"),c(i,"class","flex flex-col items-center mb-6"),c(y,"class","label-text"),c(v,"class","label"),c(v,"for","token-input"),c(O,"id","token-input"),c(O,"type","password"),c(O,"placeholder",A=t[3]("login.tokenPlaceholder")),c(O,"class","input input-bordered w-full"),O.disabled=t[1],c(O,"autocomplete","off"),Rt(O,"input-error",!!t[2]),c(k,"class","form-control w-full"),c(I,"class","btn btn-primary"),I.disabled=t[1],Rt(I,"loading",t[1]),c(D,"class","form-control mt-6"),c(z,"class","divider text-xs opacity-50 mt-6"),c(s,"class","card-body"),c(n,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),c(e,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(W,G){H(W,e,G),a(e,n),a(n,s),a(s,i),a(i,l),a(l,o),a(i,r),a(i,u),a(u,h),a(i,p),a(i,g),a(g,_),a(s,b),a(s,k),a(k,v),a(v,y),a(y,C),a(k,T),a(k,O),ie(O,t[0]),a(k,x),F&&F.m(k,null),a(s,P),a(s,D),a(D,I),a(I,U),a(s,N),a(s,z),B||(j=[te(O,"input",t[6]),te(O,"keypress",t[5]),te(I,"click",t[4])],B=!0)},p(W,[G]){G&8&&f!==(f=W[3]("login.title")+"")&&M(h,f),G&8&&m!==(m=W[3]("login.subtitle")+"")&&M(_,m),G&8&&S!==(S=W[3]("login.token")+"")&&M(C,S),G&8&&A!==(A=W[3]("login.tokenPlaceholder"))&&c(O,"placeholder",A),G&2&&(O.disabled=W[1]),G&1&&O.value!==W[0]&&ie(O,W[0]),G&4&&Rt(O,"input-error",!!W[2]),W[2]?F?F.p(W,G):(F=Vh(W),F.c(),F.m(k,null)):F&&(F.d(1),F=null),G&10&&R!==(R=(W[1]?W[3]("login.loggingIn"):W[3]("login.submit"))+"")&&M(U,R),G&2&&(I.disabled=W[1]),G&2&&Rt(I,"loading",W[1])},i:Ee,o:Ee,d(W){W&&L(e),F&&F.d(),B=!1,at(j)}}}function m5(t,e,n){let s;Gt(t,Et,h=>n(3,s=h));let i="",l=!1,o="";async function r(){if(!i.trim()){n(2,o=s("login.required"));return}n(1,l=!0),n(2,o="");try{const h=await p5(i);h.success?(K0(i),bt.show(s("login.success"),"success"),window.location.hash="#/"):n(2,o=h.error||s("login.unauthorized"))}catch(h){n(2,o=s("login.failed",{values:{error:h.message}}))}finally{n(1,l=!1)}}function u(h){h.key==="Enter"&&!l&&r()}function f(){i=this.value,n(0,i)}return[i,l,o,s,r,u,f]}class b5 extends zt{constructor(e){super(),jt(this,e,m5,g5,Lt,{})}}function _5(t){let e,n,s=t[0]("notFound.title")+"",i,l,o,r=t[0]("notFound.message")+"",u,f,h,p=t[0]("notFound.goHome")+"",g;return{c(){e=d("div"),n=d("h1"),i=E(s),l=w(),o=d("p"),u=E(r),f=w(),h=d("a"),g=E(p),c(n,"class","text-6xl font-bold mb-4"),c(o,"class","text-2xl mb-8"),c(h,"href","/__ui/#/"),c(h,"class","btn btn-primary"),c(e,"class","flex flex-col items-center justify-center h-screen")},m(m,_){H(m,e,_),a(e,n),a(n,i),a(e,l),a(e,o),a(o,u),a(e,f),a(e,h),a(h,g)},p(m,[_]){_&1&&s!==(s=m[0]("notFound.title")+"")&&M(i,s),_&1&&r!==(r=m[0]("notFound.message")+"")&&M(u,r),_&1&&p!==(p=m[0]("notFound.goHome")+"")&&M(g,p)},i:Ee,o:Ee,d(m){m&&L(e)}}}function v5(t,e,n){let s;return Gt(t,Et,i=>n(0,s=i)),[s]}class y5 extends zt{constructor(e){super(),jt(this,e,v5,_5,Lt,{})}}function Wh(t){let e,n,s,i,l,o,r,u,f,h,p;function g(b,k){return b[2]==="success"?E5:b[2]==="error"?S5:b[2]==="warning"?k5:w5}let m=g(t),_=m(t);return{c(){e=d("div"),n=d("div"),s=d("div"),_.c(),i=w(),l=d("span"),o=E(t[1]),r=w(),u=d("button"),u.textContent="\u2715",c(u,"class","btn btn-sm btn-ghost"),c(n,"class",f="alert "+t[3]+" shadow-lg"),c(e,"class","toast toast-end toast-top z-50")},m(b,k){H(b,e,k),a(e,n),a(n,s),_.m(s,null),a(s,i),a(s,l),a(l,o),a(n,r),a(n,u),h||(p=te(u,"click",t[4]),h=!0)},p(b,k){m!==(m=g(b))&&(_.d(1),_=m(b),_&&(_.c(),_.m(s,i))),k&2&&M(o,b[1]),k&8&&f!==(f="alert "+b[3]+" shadow-lg")&&c(n,"class",f)},d(b){b&&L(e),_.d(),h=!1,p()}}}function w5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"class","stroke-current shrink-0 w-6 h-6")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function k5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function S5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function E5(t){let e,n;return{c(){e=de("svg"),n=de("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){H(s,e,i),a(e,n)},d(s){s&&L(e)}}}function T5(t){let e,n=t[0]&&Wh(t);return{c(){n&&n.c(),e=$n()},m(s,i){n&&n.m(s,i),H(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Wh(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ee,o:Ee,d(s){s&&L(e),n&&n.d(s)}}}function M5(t,e,n){let s,{message:i}=e,{type:l="info"}=e,{duration:o=3e3}=e,{visible:r=!0}=e;const u=Rl();let f;is(()=>(o>0&&(f=setTimeout(()=>{n(0,r=!1),u("close")},o)),()=>{f&&clearTimeout(f)}));function h(){n(0,r=!1),u("close"),f&&clearTimeout(f)}return t.$$set=p=>{"message"in p&&n(1,i=p.message),"type"in p&&n(2,l=p.type),"duration"in p&&n(5,o=p.duration),"visible"in p&&n(0,r=p.visible)},t.$$.update=()=>{t.$$.dirty&4&&n(3,s={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[l])},[r,i,l,s,h,o]}class C5 extends zt{constructor(e){super(),jt(this,e,M5,T5,Lt,{message:1,type:2,duration:5,visible:0})}}function qh(t,e,n){const s=t.slice();return s[3]=e[n],s}function Gh(t,e){let n,s,i;function l(){return e[2](e[3])}return s=new C5({props:{message:e[3].message,type:e[3].type,duration:e[3].duration}}),s.$on("close",l),{key:t,first:null,c(){n=$n(),pt(s.$$.fragment),this.first=n},m(o,r){H(o,n,r),ut(s,o,r),i=!0},p(o,r){e=o;const u={};r&1&&(u.message=e[3].message),r&1&&(u.type=e[3].type),r&1&&(u.duration=e[3].duration),s.$set(u)},i(o){i||(Be(s.$$.fragment,o),i=!0)},o(o){Fe(s.$$.fragment,o),i=!1},d(o){o&&L(n),ct(s,o)}}}function P5(t){let e=[],n=new Map,s,i,l=et(t[0]);const o=r=>r[3].id;for(let r=0;r<l.length;r+=1){let u=qh(t,l,r),f=o(u);n.set(f,e[r]=Gh(f,u))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();s=$n()},m(r,u){for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(r,u);H(r,s,u),i=!0},p(r,[u]){u&3&&(l=et(r[0]),gs(),e=Ir(e,u,o,1,r,l,n,s.parentNode,td,Gh,s,qh),ms())},i(r){if(!i){for(let u=0;u<l.length;u+=1)Be(e[u]);i=!0}},o(r){for(let u=0;u<e.length;u+=1)Fe(e[u]);i=!1},d(r){r&&L(s);for(let u=0;u<e.length;u+=1)e[u].d(r)}}}function A5(t,e,n){let s;Gt(t,bt,o=>n(0,s=o));function i(o){bt.remove(o)}return[s,i,o=>i(o.id)]}class O5 extends zt{constructor(e){super(),jt(this,e,A5,P5,Lt,{})}}function Xh(t,e,n){const s=t.slice();return s[11]=e[n],s}function x5(t){let e,n,s,i,l,o,r,u,f,h,p,g,m=t[0]("nav.dashboard")+"",_,b,k,v,y,S,C,T,O=t[0]("nav.routes")+"",A,x,P,D,I,R,U,N,z=t[0]("nav.logs")+"",B,j,F,W,G,Y,Q,le,Z,V=t[0]("nav.configuration")+"",X,J,oe,ne,ee,se,K,q,ce=jl.find(t[8])?.name+"",he,ke,we,pe,me,Pe,Se,Ce,_e,Ae=et(jl),ye=[];for(let re=0;re<Ae.length;re+=1)ye[re]=Yh(Xh(t,Ae,re));let $=t[4]&&t[5]&&Jh(t);const ue=[j5,N5,F5,B5,I5,H5,L5,D5],ae=[];function ge(re,Ne){return Ne&2&&(Pe=null),re[1]==="/login"?0:re[1]==="/"?1:re[1]==="/routes"?2:(Pe==null&&(Pe=!!re[1].startsWith("/routes/edit/")),Pe?3:re[1]==="/routes/new"?4:re[1]==="/logs"?5:re[1]==="/config"?6:7)}return Se=ge(t,-1),Ce=ae[Se]=ue[Se](t),{c(){e=d("div"),n=d("div"),s=d("div"),s.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>',i=w(),l=d("div"),o=d("ul"),r=d("li"),u=d("a"),f=de("svg"),h=de("path"),p=w(),g=d("span"),_=E(m),b=w(),k=d("li"),v=d("a"),y=de("svg"),S=de("path"),C=w(),T=d("span"),A=E(O),x=w(),P=d("li"),D=d("a"),I=de("svg"),R=de("path"),U=w(),N=d("span"),B=E(z),j=w(),F=d("li"),W=d("a"),G=de("svg"),Y=de("path"),Q=de("path"),le=w(),Z=d("span"),X=E(V),J=w(),oe=d("div"),ne=d("div"),ee=de("svg"),se=de("path"),K=w(),q=d("span"),he=E(ce),ke=w(),we=d("ul");for(let re=0;re<ye.length;re+=1)ye[re].c();pe=w(),$&&$.c(),me=w(),Ce.c(),c(s,"class","flex-1"),c(h,"stroke-linecap","round"),c(h,"stroke-linejoin","round"),c(h,"stroke-width","2"),c(h,"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"),c(f,"xmlns","http://www.w3.org/2000/svg"),c(f,"class","h-4 w-4"),c(f,"fill","none"),c(f,"viewBox","0 0 24 24"),c(f,"stroke","currentColor"),c(u,"href","/__ui/#/"),c(u,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(u,"active",t[1]==="/"),c(S,"stroke-linecap","round"),c(S,"stroke-linejoin","round"),c(S,"stroke-width","2"),c(S,"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"),c(y,"xmlns","http://www.w3.org/2000/svg"),c(y,"class","h-4 w-4"),c(y,"fill","none"),c(y,"viewBox","0 0 24 24"),c(y,"stroke","currentColor"),c(v,"href","/__ui/#/routes"),c(v,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(v,"active",t[1].startsWith("/routes")),c(R,"stroke-linecap","round"),c(R,"stroke-linejoin","round"),c(R,"stroke-width","2"),c(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"),c(I,"xmlns","http://www.w3.org/2000/svg"),c(I,"class","h-4 w-4"),c(I,"fill","none"),c(I,"viewBox","0 0 24 24"),c(I,"stroke","currentColor"),c(D,"href","/__ui/#/logs"),c(D,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(D,"active",t[1]==="/logs"),c(Y,"stroke-linecap","round"),c(Y,"stroke-linejoin","round"),c(Y,"stroke-width","2"),c(Y,"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"),c(Q,"stroke-linecap","round"),c(Q,"stroke-linejoin","round"),c(Q,"stroke-width","2"),c(Q,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),c(G,"xmlns","http://www.w3.org/2000/svg"),c(G,"class","h-4 w-4"),c(G,"fill","none"),c(G,"viewBox","0 0 24 24"),c(G,"stroke","currentColor"),c(W,"href","/__ui/#/config"),c(W,"class","flex items-center gap-2 svelte-1fgps4v"),Rt(W,"active",t[1]==="/config"),c(o,"class","menu menu-horizontal px-1 gap-1"),c(se,"stroke-linecap","round"),c(se,"stroke-linejoin","round"),c(se,"stroke-width","2"),c(se,"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"),c(ee,"xmlns","http://www.w3.org/2000/svg"),c(ee,"class","h-4 w-4"),c(ee,"fill","none"),c(ee,"viewBox","0 0 24 24"),c(ee,"stroke","currentColor"),c(q,"class","text-xs"),c(ne,"role","button"),c(ne,"tabindex","0"),c(ne,"class","btn btn-ghost btn-sm gap-1"),c(we,"role","menu"),c(we,"tabindex","0"),c(we,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),c(oe,"class","dropdown dropdown-end mx-2"),c(l,"class","flex-none"),c(n,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),c(e,"class","min-h-screen bg-base-200")},m(re,Ne){H(re,e,Ne),a(e,n),a(n,s),a(n,i),a(n,l),a(l,o),a(o,r),a(r,u),a(u,f),a(f,h),a(u,p),a(u,g),a(g,_),a(o,b),a(o,k),a(k,v),a(v,y),a(y,S),a(v,C),a(v,T),a(T,A),a(o,x),a(o,P),a(P,D),a(D,I),a(I,R),a(D,U),a(D,N),a(N,B),a(o,j),a(o,F),a(F,W),a(W,G),a(G,Y),a(G,Q),a(W,le),a(W,Z),a(Z,X),a(l,J),a(l,oe),a(oe,ne),a(ne,ee),a(ee,se),a(ne,K),a(ne,q),a(q,he),a(oe,ke),a(oe,we);for(let Ye=0;Ye<ye.length;Ye+=1)ye[Ye]&&ye[Ye].m(we,null);a(l,pe),$&&$.m(l,null),a(e,me),ae[Se].m(e,null),_e=!0},p(re,Ne){if((!_e||Ne&1)&&m!==(m=re[0]("nav.dashboard")+"")&&M(_,m),(!_e||Ne&2)&&Rt(u,"active",re[1]==="/"),(!_e||Ne&1)&&O!==(O=re[0]("nav.routes")+"")&&M(A,O),(!_e||Ne&2)&&Rt(v,"active",re[1].startsWith("/routes")),(!_e||Ne&1)&&z!==(z=re[0]("nav.logs")+"")&&M(B,z),(!_e||Ne&2)&&Rt(D,"active",re[1]==="/logs"),(!_e||Ne&1)&&V!==(V=re[0]("nav.configuration")+"")&&M(X,V),(!_e||Ne&2)&&Rt(W,"active",re[1]==="/config"),(!_e||Ne&8)&&ce!==(ce=jl.find(re[8])?.name+"")&&M(he,ce),Ne&72){Ae=et(jl);let Ve;for(Ve=0;Ve<Ae.length;Ve+=1){const Qe=Xh(re,Ae,Ve);ye[Ve]?ye[Ve].p(Qe,Ne):(ye[Ve]=Yh(Qe),ye[Ve].c(),ye[Ve].m(we,null))}for(;Ve<ye.length;Ve+=1)ye[Ve].d(1);ye.length=Ae.length}re[4]&&re[5]?$?$.p(re,Ne):($=Jh(re),$.c(),$.m(l,null)):$&&($.d(1),$=null);let Ye=Se;Se=ge(re,Ne),Se===Ye?ae[Se].p(re,Ne):(gs(),Fe(ae[Ye],1,1,()=>{ae[Ye]=null}),ms(),Ce=ae[Se],Ce?Ce.p(re,Ne):(Ce=ae[Se]=ue[Se](re),Ce.c()),Be(Ce,1),Ce.m(e,null))},i(re){_e||(Be(Ce),_e=!0)},o(re){Fe(Ce),_e=!1},d(re){re&&L(e),En(ye,re),$&&$.d(),ae[Se].d()}}}function R5(t){let e;return{c(){e=d("div"),e.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>',c(e,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(n,s){H(n,e,s)},p:Ee,i:Ee,o:Ee,d(n){n&&L(e)}}}function Yh(t){let e,n,s,i,l;function o(){return t[9](t[11])}return{c(){e=d("li"),n=d("button"),n.textContent=\`\${t[11].name}\`,s=w(),c(n,"class","svelte-1fgps4v"),Rt(n,"active",t[3]===t[11].code)},m(r,u){H(r,e,u),a(e,n),a(e,s),i||(l=te(n,"click",o),i=!0)},p(r,u){t=r,u&8&&Rt(n,"active",t[3]===t[11].code)},d(r){r&&L(e),i=!1,l()}}}function Jh(t){let e,n,s,i,l,o,r=t[0]("login.logout")+"",u,f,h;return{c(){e=d("div"),n=d("button"),s=de("svg"),i=de("path"),l=w(),o=d("span"),u=E(r),c(i,"stroke-linecap","round"),c(i,"stroke-linejoin","round"),c(i,"stroke-width","2"),c(i,"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"),c(s,"xmlns","http://www.w3.org/2000/svg"),c(s,"class","h-4 w-4"),c(s,"fill","none"),c(s,"viewBox","0 0 24 24"),c(s,"stroke","currentColor"),c(o,"class","text-xs hidden md:inline"),c(n,"class","btn btn-ghost btn-sm gap-1"),c(e,"class","mx-2")},m(p,g){H(p,e,g),a(e,n),a(n,s),a(s,i),a(n,l),a(n,o),a(o,u),f||(h=te(n,"click",t[7]),f=!0)},p(p,g){g&1&&r!==(r=p[0]("login.logout")+"")&&M(u,r)},d(p){p&&L(e),f=!1,h()}}}function D5(t){let e,n;return e=new y5({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function L5(t){let e,n;return e=new Uv({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function H5(t){let e,n;return e=new d5({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function I5(t){let e,n;return e=new qp({props:{params:{}}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function B5(t){let e,n;return e=new qp({props:{params:{path:t[1].replace("/routes/edit/","")}}}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p(s,i){const l={};i&2&&(l.params={path:s[1].replace("/routes/edit/","")}),e.$set(l)},i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function F5(t){let e,n;return e=new uy({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function N5(t){let e,n;return e=new hv({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function j5(t){let e,n;return e=new b5({}),{c(){pt(e.$$.fragment)},m(s,i){ut(e,s,i),n=!0},p:Ee,i(s){n||(Be(e.$$.fragment,s),n=!0)},o(s){Fe(e.$$.fragment,s),n=!1},d(s){ct(e,s)}}}function z5(t){let e,n,s,i,l;const o=[R5,x5],r=[];function u(f,h){return f[2]?0:1}return e=u(t),n=r[e]=o[e](t),i=new O5({}),{c(){n.c(),s=w(),pt(i.$$.fragment)},m(f,h){r[e].m(f,h),H(f,s,h),ut(i,f,h),l=!0},p(f,[h]){let p=e;e=u(f),e===p?r[e].p(f,h):(gs(),Fe(r[p],1,1,()=>{r[p]=null}),ms(),n=r[e],n?n.p(f,h):(n=r[e]=o[e](f),n.c()),Be(n,1),n.m(s.parentNode,s))},i(f){l||(Be(n),Be(i.$$.fragment,f),l=!0)},o(f){Fe(n),Fe(i.$$.fragment,f),l=!1},d(f){f&&L(s),r[e].d(f),ct(i,f)}}}function U5(t,e,n){let s,i,l,o,r,u;Gt(t,Et,m=>n(0,s=m)),Gt(t,rg,m=>n(1,i=m)),Gt(t,ro,m=>n(2,l=m)),Gt(t,di,m=>n(3,o=m)),Gt(t,ja,m=>n(4,r=m)),Gt(t,go,m=>n(5,u=m));function f(m){G0(m)}is(async()=>{try{const _=(await Ur()).auth?.enabled||!1;if(ja.set(_),_){const b=Rd();go.set(!!b),!b&&i!=="/login"&&(window.location.hash="#/login")}}catch(m){console.error("Failed to check auth status:",m)}});function h(){confirm(s("login.logoutConfirm"))&&(xd(),window.location.hash="#/login")}return[s,i,l,o,r,u,f,h,m=>m.code===o,m=>f(m.code)]}class V5 extends zt{constructor(e){super(),jt(this,e,U5,z5,Lt,{})}}new V5({target:document.getElementById("app")})});export default W5();
21222
+ }\`,f="",h=null,p=[];ls(async()=>{try{const S=await qp.getAll();n(6,p=S.map(P=>({id:P,name:Jp(P),description:s3(P)})))}catch(S){console.warn("Failed to load plugins from API, using fallback:",S),n(6,p=[{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(){o("change",i),n(4,f=""),n(5,h=null)}function m(){if(!i||!u){n(5,h=s("plugin.testFailed",{values:{error:"Invalid input"}}));return}try{const S=JSON.parse(u);let P;i==="anthropic-to-gemini"?P={contents:S.messages?.map(M=>({role:M.role==="user"?"user":"model",parts:[{text:M.content}]})),generationConfig:{temperature:S.temperature||1,maxOutputTokens:S.max_tokens||8192}}:i==="anthropic-to-openai"?P={model:S.model?.replace("claude","gpt-4"),messages:S.messages,temperature:S.temperature,max_tokens:S.max_tokens}:P={...S,_transformed:!0},n(4,f=JSON.stringify(P,null,2)),n(5,h=null)}catch(S){n(5,h=S.message),n(4,f="")}}function b(){n(4,f=""),n(5,h=null)}function _(){i=Is(this),n(0,i),n(6,p)}const y=S=>S.id===i,k=()=>n(2,a=!a);function w(){u=this.value,n(3,u)}return t.$$set=S=>{"plugin"in S&&n(0,i=S.plugin),"label"in S&&n(1,l=S.label)},[i,l,a,u,f,h,p,s,g,m,b,_,y,k,w]}class Kp extends Gt{constructor(e){super(),qt(this,e,i3,n3,Nt,{plugin:0,label:1})}}function Ef(t){let e,n,s=t[6].find(Cf)?.message+"",i,l;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for",l="upstream-target-"+t[2])},m(o,a){I(o,e,a),r(e,n),r(n,i)},p(o,a){a&64&&s!==(s=o[6].find(Cf)?.message+"")&&T(i,s),a&4&&l!==(l="upstream-target-"+o[2])&&c(e,"for",l)},d(o){o&&H(e)}}}function l3(t){let e,n,s,i,l=t[7]("upstream.title",{values:{index:t[2]+1}})+"",o,a,u,f,h,p,g,m,b,_,y,k,w,S,P,M,x=t[7]("upstream.targetUrl")+"",A,O,C,R,L,D,z,B,U,F=t[6].some(Tf),V,Y,j,q,Q,X=t[7]("upstream.weight")+"",re,K,W,G=t[7]("upstream.weightHelp")+"",J,le,se,N,te,Z,oe,Se,me,Ee,ye,ge,be,He,Te,Pe,_e,De,ke,$,ae,ue,de,fe=t[7]("upstream.transformerHelp")+"",Be,Qe,We,Ye,nt,Je,rt,lt,he,Re,Le,ot,Ge,Ie=F&&Ef(t);function Ve($e){t[11]($e)}let we={label:t[7]("upstream.transformer")};t[5]!==void 0&&(we.plugin=t[5]),_e=new Kp({props:we}),wn.push(()=>Yn(_e,"plugin",Ve));function Ke($e){t[13]($e)}let ve={label:t[7]("headers.title")};t[0].headers!==void 0&&(ve.value=t[0].headers),Ye=new Xp({props:ve}),wn.push(()=>Yn(Ye,"value",Ke));function Xe($e){t[14]($e)}let Ct={label:t[7]("body.title")};return t[0].body!==void 0&&(Ct.value=t[0].body),he=new Yp({props:Ct}),wn.push(()=>Yn(he,"value",Xe)),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),a=v(),u=d("div"),f=d("button"),h=pe("svg"),p=pe("path"),m=v(),b=d("button"),_=E("\u2715"),k=v(),w=d("div"),S=d("div"),P=d("label"),M=d("span"),A=E(x),O=v(),C=d("span"),C.textContent="*",L=v(),D=d("input"),U=v(),Ie&&Ie.c(),V=v(),Y=d("div"),j=d("div"),q=d("label"),Q=d("span"),re=E(X),K=v(),W=d("span"),J=E(G),se=v(),N=d("input"),Z=v(),oe=d("div"),Se=d("label"),me=d("span"),me.textContent="Priority",Ee=v(),ye=d("span"),ye.textContent="Failover order",be=v(),He=d("input"),Pe=v(),_t(_e.$$.fragment),ke=v(),$=d("div"),ae=d("input"),ue=v(),de=d("div"),Be=E(fe),Qe=v(),We=d("div"),_t(Ye.$$.fragment),Je=v(),rt=d("div"),lt=v(),_t(he.$$.fragment),c(i,"class","font-semibold"),c(p,"stroke-linecap","round"),c(p,"stroke-linejoin","round"),c(p,"stroke-width","2"),c(p,"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"),c(h,"xmlns","http://www.w3.org/2000/svg"),c(h,"class","h-4 w-4"),c(h,"fill","none"),c(h,"viewBox","0 0 24 24"),c(h,"stroke","currentColor"),c(f,"type","button"),c(f,"class","btn btn-sm btn-outline btn-square"),c(f,"title",g=t[7]("routeCard.duplicate")),c(b,"type","button"),c(b,"class","btn btn-sm btn-error btn-square"),c(b,"title",y=t[7]("upstream.remove")),c(u,"class","flex gap-2"),c(s,"class","flex justify-between items-center mb-4"),c(C,"class","text-error"),c(M,"class","label-text font-semibold"),c(P,"class","label"),c(P,"for",R="upstream-target-"+t[2]),c(D,"id",z="upstream-target-"+t[2]),c(D,"type","url"),c(D,"placeholder",B=t[7]("upstream.targetPlaceholder")),c(D,"class","input input-bordered"),D.required=!0,ie(D,"input-error",t[6].some(Mf)),c(S,"class","form-control"),c(Q,"class","label-text"),c(W,"class","label-text-alt text-xs"),c(q,"class","label"),c(q,"for",le="upstream-weight-"+t[2]),c(N,"id",te="upstream-weight-"+t[2]),c(N,"type","number"),c(N,"placeholder","100"),c(N,"class","input input-bordered"),c(N,"min","1"),c(j,"class","form-control"),c(me,"class","label-text"),c(ye,"class","label-text-alt text-xs"),c(Se,"class","label"),c(Se,"for",ge="upstream-priority-"+t[2]),c(He,"id",Te="upstream-priority-"+t[2]),c(He,"type","number"),c(He,"placeholder","1"),c(He,"class","input input-bordered"),c(He,"min","0"),c(oe,"class","form-control"),c(Y,"class","grid grid-cols-2 gap-4"),c(ae,"type","checkbox"),c(de,"class","collapse-title text-sm font-medium"),c(rt,"class","divider"),c(We,"class","collapse-content space-y-6"),c($,"class","collapse collapse-arrow bg-base-200"),c(w,"class","grid grid-cols-1 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-100 shadow-sm border border-base-300")},m($e,je){I($e,e,je),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,f),r(f,h),r(h,p),r(u,m),r(u,b),r(b,_),r(n,k),r(n,w),r(w,S),r(S,P),r(P,M),r(M,A),r(M,O),r(M,C),r(S,L),r(S,D),ne(D,t[0].target),r(S,U),Ie&&Ie.m(S,null),r(w,V),r(w,Y),r(Y,j),r(j,q),r(q,Q),r(Q,re),r(q,K),r(q,W),r(W,J),r(j,se),r(j,N),ne(N,t[0].weight),r(Y,Z),r(Y,oe),r(oe,Se),r(Se,me),r(Se,Ee),r(Se,ye),r(oe,be),r(oe,He),ne(He,t[0].priority),r(w,Pe),pt(_e,w,null),r(w,ke),r(w,$),r($,ae),ae.checked=t[1],r($,ue),r($,de),r(de,Be),r($,Qe),r($,We),pt(Ye,We,null),r(We,Je),r(We,rt),r(We,lt),pt(he,We,null),Le=!0,ot||(Ge=[ee(f,"click",function(){ui(t[4])&&t[4].apply(this,arguments)}),ee(b,"click",function(){ui(t[3])&&t[3].apply(this,arguments)}),ee(D,"input",t[8]),ee(N,"input",t[9]),ee(He,"input",t[10]),ee(ae,"change",t[12])],ot=!0)},p($e,[je]){t=$e,(!Le||je&132)&&l!==(l=t[7]("upstream.title",{values:{index:t[2]+1}})+"")&&T(o,l),(!Le||je&128&&g!==(g=t[7]("routeCard.duplicate")))&&c(f,"title",g),(!Le||je&128&&y!==(y=t[7]("upstream.remove")))&&c(b,"title",y),(!Le||je&128)&&x!==(x=t[7]("upstream.targetUrl")+"")&&T(A,x),(!Le||je&4&&R!==(R="upstream-target-"+t[2]))&&c(P,"for",R),(!Le||je&4&&z!==(z="upstream-target-"+t[2]))&&c(D,"id",z),(!Le||je&128&&B!==(B=t[7]("upstream.targetPlaceholder")))&&c(D,"placeholder",B),je&1&&D.value!==t[0].target&&ne(D,t[0].target),(!Le||je&64)&&ie(D,"input-error",t[6].some(Mf)),je&64&&(F=t[6].some(Tf)),F?Ie?Ie.p(t,je):(Ie=Ef(t),Ie.c(),Ie.m(S,null)):Ie&&(Ie.d(1),Ie=null),(!Le||je&128)&&X!==(X=t[7]("upstream.weight")+"")&&T(re,X),(!Le||je&128)&&G!==(G=t[7]("upstream.weightHelp")+"")&&T(J,G),(!Le||je&4&&le!==(le="upstream-weight-"+t[2]))&&c(q,"for",le),(!Le||je&4&&te!==(te="upstream-weight-"+t[2]))&&c(N,"id",te),je&1&&yt(N.value)!==t[0].weight&&ne(N,t[0].weight),(!Le||je&4&&ge!==(ge="upstream-priority-"+t[2]))&&c(Se,"for",ge),(!Le||je&4&&Te!==(Te="upstream-priority-"+t[2]))&&c(He,"id",Te),je&1&&yt(He.value)!==t[0].priority&&ne(He,t[0].priority);const At={};je&128&&(At.label=t[7]("upstream.transformer")),!De&&je&32&&(De=!0,At.plugin=t[5],Xn(()=>De=!1)),_e.$set(At),je&2&&(ae.checked=t[1]),(!Le||je&128)&&fe!==(fe=t[7]("upstream.transformerHelp")+"")&&T(Be,fe);const it={};je&128&&(it.label=t[7]("headers.title")),!nt&&je&1&&(nt=!0,it.value=t[0].headers,Xn(()=>nt=!1)),Ye.$set(it);const mt={};je&128&&(mt.label=t[7]("body.title")),!Re&&je&1&&(Re=!0,mt.value=t[0].body,Xn(()=>Re=!1)),he.$set(mt)},i($e){Le||(ze(_e.$$.fragment,$e),ze(Ye.$$.fragment,$e),ze(he.$$.fragment,$e),Le=!0)},o($e){Ue(_e.$$.fragment,$e),Ue(Ye.$$.fragment,$e),Ue(he.$$.fragment,$e),Le=!1},d($e){$e&&H(e),Ie&&Ie.d(),gt(_e),gt(Ye),gt(he),ot=!1,ht(Ge)}}}const Tf=t=>t.field.includes("target"),Mf=t=>t.field.includes("target"),Cf=t=>t.field.includes("target");function o3(t,e,n){let s,i;Zt(t,xt,w=>n(7,i=w));let{upstream:l}=e,{index:o}=e,{onRemove:a}=e,{onDuplicate:u}=e,{showAdvanced:f=!1}=e,h=l.plugins?.[0]||null;function p(){l.target=this.value,n(0,l),n(5,h)}function g(){l.weight=yt(this.value),n(0,l),n(5,h)}function m(){l.priority=yt(this.value),n(0,l),n(5,h)}function b(w){h=w,n(5,h)}function _(){f=this.checked,n(1,f)}function y(w){t.$$.not_equal(l.headers,w)&&(l.headers=w,n(0,l),n(5,h))}function k(w){t.$$.not_equal(l.body,w)&&(l.body=w,n(0,l),n(5,h))}return t.$$set=w=>{"upstream"in w&&n(0,l=w.upstream),"index"in w&&n(2,o=w.index),"onRemove"in w&&n(3,a=w.onRemove),"onDuplicate"in w&&n(4,u=w.onDuplicate),"showAdvanced"in w&&n(1,f=w.showAdvanced)},t.$$.update=()=>{t.$$.dirty&1&&(n(0,l.headers=l.headers||{add:{},remove:[],default:{}},l),n(0,l.body=l.body||{add:{},remove:[],replace:{},default:{}},l)),t.$$.dirty&32&&n(0,l.plugins=h?[h]:void 0,l),t.$$.dirty&5&&n(6,s=Gp(l,o))},[l,f,o,a,u,h,s,i,p,g,m,b,_,y,k]}class r3 extends Gt{constructor(e){super(),qt(this,e,o3,l3,Nt,{upstream:0,index:2,onRemove:3,onDuplicate:4,showAdvanced:1})}}function Pf(t,e,n){const s=t.slice();return s[7]=e[n],s}function Af(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=tt(t[1]),b=[];for(let _=0;_<m.length;_+=1)b[_]=xf(Pf(t,m,_));return{c(){e=d("div"),n=d("div"),s=d("h3"),s.textContent="Select Route Template",i=v(),l=d("div");for(let _=0;_<b.length;_+=1)b[_].c();o=v(),a=d("div"),u=d("button"),u.textContent="Close",f=v(),h=d("button"),c(s,"class","font-bold text-lg mb-4"),c(l,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(u,"type","button"),c(u,"class","btn btn-sm"),c(a,"class","modal-action"),c(n,"class","modal-box max-w-4xl"),c(h,"type","button"),c(h,"class","modal-backdrop"),c(h,"aria-label","Close modal"),c(e,"class","modal modal-open")},m(_,y){I(_,e,y),r(e,n),r(n,s),r(n,i),r(n,l);for(let k=0;k<b.length;k+=1)b[k]&&b[k].m(l,null);r(n,o),r(n,a),r(a,u),r(e,f),r(e,h),p||(g=[ee(u,"click",t[4]),ee(h,"click",t[5])],p=!0)},p(_,y){if(y&6){m=tt(_[1]);let k;for(k=0;k<m.length;k+=1){const w=Pf(_,m,k);b[k]?b[k].p(w,y):(b[k]=xf(w),b[k].c(),b[k].m(l,null))}for(;k<b.length;k+=1)b[k].d(1);b.length=m.length}},d(_){_&&H(e),Tn(b,_),p=!1,ht(g)}}}function xf(t){let e,n,s,i,l,o,a,u,f,h,p;function g(){return t[3](t[7])}return{c(){e=d("button"),n=d("div"),s=d("h4"),s.textContent=\`\${t[7].name}\`,i=v(),l=d("p"),l.textContent=\`\${t[7].description}\`,o=v(),a=d("div"),u=d("div"),u.textContent=\`\${JSON.stringify(t[7].template,null,2)}\`,f=v(),c(s,"class","card-title text-base"),c(l,"class","text-sm text-gray-600"),c(u,"class","text-xs font-mono bg-base-100 p-2 rounded max-h-32 overflow-auto"),c(a,"class","mt-2"),c(n,"class","card-body"),c(e,"type","button"),c(e,"class","card card-compact bg-base-200 hover:bg-base-300 cursor-pointer text-left")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(n,i),r(n,l),r(n,o),r(n,a),r(a,u),r(e,f),h||(p=ee(e,"click",g),h=!0)},p(m,b){t=m},d(m){m&&H(e),h=!1,p()}}}function a3(t){let e,n=t[0]&&Af(t);return{c(){n&&n.c(),e=Zn()},m(s,i){n&&n.m(s,i),I(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Af(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ae,o:Ae,d(s){s&&H(e),n&&n.d(s)}}}function u3(t,e,n){let{showTemplates:s=!1}=e;const i=Dl(),l=[{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 o(h){i("select",h.template),n(0,s=!1)}const a=h=>o(h),u=()=>n(0,s=!1),f=()=>n(0,s=!1);return t.$$set=h=>{"showTemplates"in h&&n(0,s=h.showTemplates)},[s,l,o,a,u,f]}class c3 extends Gt{constructor(e){super(),qt(this,e,u3,a3,Nt,{showTemplates:0})}}function Of(t){let e,n=t[22]("routeEditor.failoverHelp")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","label-text-alt text-xs")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&4194304&&n!==(n=i[22]("routeEditor.failoverHelp")+"")&&T(s,n)},d(i){i&&H(e)}}}function Rf(t){let e,n,s,i=t[22]("routeEditor.retryableStatusCodes")+"",l,o,a,u,f,h,p,g=t[22]("routeEditor.retryableStatusCodesHelp")+"",m,b,_,y,k,w,S=t[22]("routeEditor.passiveHealthCheck")+"",P,M,x,A,O,C,R,L,D=t[22]("routeEditor.passiveHealthCheckTooltip")+"",z,B,U,F,V,Y,j=t[22]("routeEditor.consecutiveFailuresThreshold")+"",q,Q,X,re,K,W,G=t[22]("routeEditor.consecutiveFailuresThresholdHelp")+"",J,le,se,N,te,Z=t[22]("routeEditor.healthyThreshold")+"",oe,Se,me,Ee,ye,ge,be=t[22]("routeEditor.healthyThresholdHelp")+"",He,Te,Pe,_e,De,ke=t[22]("routeEditor.requestTimeoutMs")+"",$,ae,ue,de,fe,Be,Qe=t[22]("routeEditor.requestTimeoutMsHelp")+"",We,Ye,nt,Je,rt,lt=t[22]("routeEditor.connectTimeoutMs")+"",he,Re,Le,ot,Ge,Ie,Ve=t[22]("routeEditor.connectTimeoutMsHelp")+"",we,Ke,ve,Xe,Ct,$e=t[22]("routeEditor.recoveryIntervalMs")+"",je,At,it,mt,Lt,xe,at=t[22]("routeEditor.recoveryIntervalHelp")+"",Ne,st,jt,Rn,gn,Fe=t[22]("routeEditor.recoveryTimeoutMs")+"",ut,un,Rt,os,Mn,Un,zt=t[22]("routeEditor.recoveryTimeoutHelp")+"",mn,Dn,cn,Ln,Sn,Pn,Ut=t[22]("routeEditor.activeHealthCheck")+"",rs,Ht,sn,An,Fn,ln,Xt,Qn,Tt=t[22]("routeEditor.activeHealthCheckTooltip")+"",bn,$n,as,Yt,vt,es,It,ct=t[22]("routeEditor.enableActiveHealthCheck")+"",Vn,ys,wt,on,Qt,dn,Hn,ts=t[22]("routeEditor.slowStart")+"",Jt,_s,_n,fn,Nn,Wn,Kt,$t,ns=t[22]("routeEditor.slowStartTooltip")+"",us,pn,en,Bt,dt,kt,ce,Me=t[22]("routeEditor.enableSlowStart")+"",ft,tn,nn,Ce,ss,vn,qn,As,zs=t[22]("routeEditor.failoverInfoNotice")+"",gi,xs,mi,In=t[11]&&Df(t),jn=t[19]&&Lf(t);return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=v(),a=d("input"),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),_=d("div"),y=d("input"),k=v(),w=d("div"),P=E(S),M=v(),x=d("div"),A=d("div"),O=pe("svg"),C=pe("path"),R=v(),L=d("span"),z=E(D),B=v(),U=d("div"),F=d("div"),V=d("label"),Y=d("span"),q=E(j),Q=v(),X=d("input"),re=v(),K=d("div"),W=d("span"),J=E(G),le=v(),se=d("div"),N=d("label"),te=d("span"),oe=E(Z),Se=v(),me=d("input"),Ee=v(),ye=d("div"),ge=d("span"),He=E(be),Te=v(),Pe=d("div"),_e=d("label"),De=d("span"),$=E(ke),ae=v(),ue=d("input"),de=v(),fe=d("div"),Be=d("span"),We=E(Qe),Ye=v(),nt=d("div"),Je=d("label"),rt=d("span"),he=E(lt),Re=v(),Le=d("input"),ot=v(),Ge=d("div"),Ie=d("span"),we=E(Ve),Ke=v(),ve=d("div"),Xe=d("label"),Ct=d("span"),je=E($e),At=v(),it=d("input"),mt=v(),Lt=d("div"),xe=d("span"),Ne=E(at),st=v(),jt=d("div"),Rn=d("label"),gn=d("span"),ut=E(Fe),un=v(),Rt=d("input"),os=v(),Mn=d("div"),Un=d("span"),mn=E(zt),Dn=v(),cn=d("div"),Ln=d("input"),Sn=v(),Pn=d("div"),rs=E(Ut),Ht=v(),sn=d("div"),An=d("div"),Fn=pe("svg"),ln=pe("path"),Xt=v(),Qn=d("span"),bn=E(Tt),$n=v(),as=d("div"),Yt=d("label"),vt=d("input"),es=v(),It=d("span"),Vn=E(ct),ys=v(),In&&In.c(),wt=v(),on=d("div"),Qt=d("input"),dn=v(),Hn=d("div"),Jt=E(ts),_s=v(),_n=d("div"),fn=d("div"),Nn=pe("svg"),Wn=pe("path"),Kt=v(),$t=d("span"),us=E(ns),pn=v(),en=d("div"),Bt=d("label"),dt=d("input"),kt=v(),ce=d("span"),ft=E(Me),tn=v(),jn&&jn.c(),nn=v(),Ce=d("div"),ss=pe("svg"),vn=pe("path"),qn=v(),As=d("div"),gi=E(zs),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","failover-status-codes"),c(a,"id","failover-status-codes"),c(a,"type","text"),c(a,"placeholder",u=t[22]("routeEditor.retryableStatusCodesPlaceholder")),c(a,"class","input input-bordered input-sm"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(e,"class","form-control"),c(y,"type","checkbox"),c(w,"class","collapse-title text-sm font-medium"),c(C,"stroke-linecap","round"),c(C,"stroke-linejoin","round"),c(C,"stroke-width","2"),c(C,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(O,"xmlns","http://www.w3.org/2000/svg"),c(O,"fill","none"),c(O,"viewBox","0 0 24 24"),c(O,"class","stroke-current shrink-0 w-4 h-4"),c(A,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(Y,"class","label-text"),c(V,"class","label"),c(V,"for","consecutive-failures-threshold"),c(X,"id","consecutive-failures-threshold"),c(X,"type","number"),c(X,"placeholder","3"),c(X,"class","input input-bordered input-sm"),c(X,"min","1"),c(W,"class","label-text-alt text-xs"),c(K,"class","label"),c(F,"class","form-control"),c(te,"class","label-text"),c(N,"class","label"),c(N,"for","healthy-threshold"),c(me,"id","healthy-threshold"),c(me,"type","number"),c(me,"placeholder","2"),c(me,"class","input input-bordered input-sm"),c(me,"min","1"),c(ge,"class","label-text-alt text-xs"),c(ye,"class","label"),c(se,"class","form-control"),c(De,"class","label-text"),c(_e,"class","label"),c(_e,"for","request-timeout-ms"),c(ue,"id","request-timeout-ms"),c(ue,"type","number"),c(ue,"placeholder","30000"),c(ue,"class","input input-bordered input-sm"),c(ue,"min","100"),c(Be,"class","label-text-alt text-xs"),c(fe,"class","label"),c(Pe,"class","form-control"),c(rt,"class","label-text"),c(Je,"class","label"),c(Je,"for","connect-timeout-ms"),c(Le,"id","connect-timeout-ms"),c(Le,"type","number"),c(Le,"placeholder","5000"),c(Le,"class","input input-bordered input-sm"),c(Le,"min","100"),c(Ie,"class","label-text-alt text-xs"),c(Ge,"class","label"),c(nt,"class","form-control"),c(Ct,"class","label-text"),c(Xe,"class","label"),c(Xe,"for","recovery-interval-ms"),c(it,"id","recovery-interval-ms"),c(it,"type","number"),c(it,"placeholder","5000"),c(it,"class","input input-bordered input-sm"),c(it,"min","1000"),c(xe,"class","label-text-alt text-xs"),c(Lt,"class","label"),c(ve,"class","form-control"),c(gn,"class","label-text"),c(Rn,"class","label"),c(Rn,"for","recovery-timeout-ms"),c(Rt,"id","recovery-timeout-ms"),c(Rt,"type","number"),c(Rt,"placeholder","3000"),c(Rt,"class","input input-bordered input-sm"),c(Rt,"min","100"),c(Un,"class","label-text-alt text-xs"),c(Mn,"class","label"),c(jt,"class","form-control"),c(U,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(x,"class","collapse-content space-y-4"),c(_,"class","collapse collapse-arrow bg-base-200"),c(Ln,"type","checkbox"),c(Pn,"class","collapse-title text-sm font-medium"),c(ln,"stroke-linecap","round"),c(ln,"stroke-linejoin","round"),c(ln,"stroke-width","2"),c(ln,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Fn,"xmlns","http://www.w3.org/2000/svg"),c(Fn,"fill","none"),c(Fn,"viewBox","0 0 24 24"),c(Fn,"class","stroke-current shrink-0 w-4 h-4"),c(An,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(vt,"type","checkbox"),c(vt,"class","checkbox checkbox-sm"),c(It,"class","label-text"),c(Yt,"class","label cursor-pointer justify-start gap-4"),c(as,"class","form-control"),c(sn,"class","collapse-content space-y-4"),c(cn,"class","collapse collapse-arrow bg-base-200"),c(Qt,"type","checkbox"),c(Hn,"class","collapse-title text-sm font-medium"),c(Wn,"stroke-linecap","round"),c(Wn,"stroke-linejoin","round"),c(Wn,"stroke-width","2"),c(Wn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(Nn,"xmlns","http://www.w3.org/2000/svg"),c(Nn,"fill","none"),c(Nn,"viewBox","0 0 24 24"),c(Nn,"class","stroke-current shrink-0 w-4 h-4"),c(fn,"class","text-xs text-base-content/60 bg-base-300 rounded p-2 flex gap-2 items-start"),c(dt,"type","checkbox"),c(dt,"class","checkbox checkbox-sm"),c(ce,"class","label-text"),c(Bt,"class","label cursor-pointer justify-start gap-4"),c(en,"class","form-control"),c(_n,"class","collapse-content space-y-4"),c(on,"class","collapse collapse-arrow bg-base-200"),c(vn,"stroke-linecap","round"),c(vn,"stroke-linejoin","round"),c(vn,"stroke-width","2"),c(vn,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(ss,"xmlns","http://www.w3.org/2000/svg"),c(ss,"fill","none"),c(ss,"viewBox","0 0 24 24"),c(ss,"class","stroke-current shrink-0 w-4 h-4"),c(Ce,"class","alert alert-info shadow-sm text-xs")},m(qe,et){I(qe,e,et),r(e,n),r(n,s),r(s,l),r(e,o),r(e,a),ne(a,t[4]),r(e,f),r(e,h),r(h,p),r(p,m),I(qe,b,et),I(qe,_,et),r(_,y),r(_,k),r(_,w),r(w,P),r(_,M),r(_,x),r(x,A),r(A,O),r(O,C),r(A,R),r(A,L),r(L,z),r(x,B),r(x,U),r(U,F),r(F,V),r(V,Y),r(Y,q),r(F,Q),r(F,X),ne(X,t[5]),r(F,re),r(F,K),r(K,W),r(W,J),r(U,le),r(U,se),r(se,N),r(N,te),r(te,oe),r(se,Se),r(se,me),ne(me,t[6]),r(se,Ee),r(se,ye),r(ye,ge),r(ge,He),r(U,Te),r(U,Pe),r(Pe,_e),r(_e,De),r(De,$),r(Pe,ae),r(Pe,ue),ne(ue,t[7]),r(Pe,de),r(Pe,fe),r(fe,Be),r(Be,We),r(U,Ye),r(U,nt),r(nt,Je),r(Je,rt),r(rt,he),r(nt,Re),r(nt,Le),ne(Le,t[8]),r(nt,ot),r(nt,Ge),r(Ge,Ie),r(Ie,we),r(U,Ke),r(U,ve),r(ve,Xe),r(Xe,Ct),r(Ct,je),r(ve,At),r(ve,it),ne(it,t[9]),r(ve,mt),r(ve,Lt),r(Lt,xe),r(xe,Ne),r(U,st),r(U,jt),r(jt,Rn),r(Rn,gn),r(gn,ut),r(jt,un),r(jt,Rt),ne(Rt,t[10]),r(jt,os),r(jt,Mn),r(Mn,Un),r(Un,mn),I(qe,Dn,et),I(qe,cn,et),r(cn,Ln),r(cn,Sn),r(cn,Pn),r(Pn,rs),r(cn,Ht),r(cn,sn),r(sn,An),r(An,Fn),r(Fn,ln),r(An,Xt),r(An,Qn),r(Qn,bn),r(sn,$n),r(sn,as),r(as,Yt),r(Yt,vt),vt.checked=t[11],r(Yt,es),r(Yt,It),r(It,Vn),r(sn,ys),In&&In.m(sn,null),I(qe,wt,et),I(qe,on,et),r(on,Qt),r(on,dn),r(on,Hn),r(Hn,Jt),r(on,_s),r(on,_n),r(_n,fn),r(fn,Nn),r(Nn,Wn),r(fn,Kt),r(fn,$t),r($t,us),r(_n,pn),r(_n,en),r(en,Bt),r(Bt,dt),dt.checked=t[19],r(Bt,kt),r(Bt,ce),r(ce,ft),r(_n,tn),jn&&jn.m(_n,null),I(qe,nn,et),I(qe,Ce,et),r(Ce,ss),r(ss,vn),r(Ce,qn),r(Ce,As),r(As,gi),xs||(mi=[ee(a,"input",t[28]),ee(X,"input",t[29]),ee(me,"input",t[30]),ee(ue,"input",t[31]),ee(Le,"input",t[32]),ee(it,"input",t[33]),ee(Rt,"input",t[34]),ee(vt,"change",t[35]),ee(dt,"change",t[43])],xs=!0)},p(qe,et){et[0]&4194304&&i!==(i=qe[22]("routeEditor.retryableStatusCodes")+"")&&T(l,i),et[0]&4194304&&u!==(u=qe[22]("routeEditor.retryableStatusCodesPlaceholder"))&&c(a,"placeholder",u),et[0]&16&&a.value!==qe[4]&&ne(a,qe[4]),et[0]&4194304&&g!==(g=qe[22]("routeEditor.retryableStatusCodesHelp")+"")&&T(m,g),et[0]&4194304&&S!==(S=qe[22]("routeEditor.passiveHealthCheck")+"")&&T(P,S),et[0]&4194304&&D!==(D=qe[22]("routeEditor.passiveHealthCheckTooltip")+"")&&T(z,D),et[0]&4194304&&j!==(j=qe[22]("routeEditor.consecutiveFailuresThreshold")+"")&&T(q,j),et[0]&32&&yt(X.value)!==qe[5]&&ne(X,qe[5]),et[0]&4194304&&G!==(G=qe[22]("routeEditor.consecutiveFailuresThresholdHelp")+"")&&T(J,G),et[0]&4194304&&Z!==(Z=qe[22]("routeEditor.healthyThreshold")+"")&&T(oe,Z),et[0]&64&&yt(me.value)!==qe[6]&&ne(me,qe[6]),et[0]&4194304&&be!==(be=qe[22]("routeEditor.healthyThresholdHelp")+"")&&T(He,be),et[0]&4194304&&ke!==(ke=qe[22]("routeEditor.requestTimeoutMs")+"")&&T($,ke),et[0]&128&&yt(ue.value)!==qe[7]&&ne(ue,qe[7]),et[0]&4194304&&Qe!==(Qe=qe[22]("routeEditor.requestTimeoutMsHelp")+"")&&T(We,Qe),et[0]&4194304&&lt!==(lt=qe[22]("routeEditor.connectTimeoutMs")+"")&&T(he,lt),et[0]&256&&yt(Le.value)!==qe[8]&&ne(Le,qe[8]),et[0]&4194304&&Ve!==(Ve=qe[22]("routeEditor.connectTimeoutMsHelp")+"")&&T(we,Ve),et[0]&4194304&&$e!==($e=qe[22]("routeEditor.recoveryIntervalMs")+"")&&T(je,$e),et[0]&512&&yt(it.value)!==qe[9]&&ne(it,qe[9]),et[0]&4194304&&at!==(at=qe[22]("routeEditor.recoveryIntervalHelp")+"")&&T(Ne,at),et[0]&4194304&&Fe!==(Fe=qe[22]("routeEditor.recoveryTimeoutMs")+"")&&T(ut,Fe),et[0]&1024&&yt(Rt.value)!==qe[10]&&ne(Rt,qe[10]),et[0]&4194304&&zt!==(zt=qe[22]("routeEditor.recoveryTimeoutHelp")+"")&&T(mn,zt),et[0]&4194304&&Ut!==(Ut=qe[22]("routeEditor.activeHealthCheck")+"")&&T(rs,Ut),et[0]&4194304&&Tt!==(Tt=qe[22]("routeEditor.activeHealthCheckTooltip")+"")&&T(bn,Tt),et[0]&2048&&(vt.checked=qe[11]),et[0]&4194304&&ct!==(ct=qe[22]("routeEditor.enableActiveHealthCheck")+"")&&T(Vn,ct),qe[11]?In?In.p(qe,et):(In=Df(qe),In.c(),In.m(sn,null)):In&&(In.d(1),In=null),et[0]&4194304&&ts!==(ts=qe[22]("routeEditor.slowStart")+"")&&T(Jt,ts),et[0]&4194304&&ns!==(ns=qe[22]("routeEditor.slowStartTooltip")+"")&&T(us,ns),et[0]&524288&&(dt.checked=qe[19]),et[0]&4194304&&Me!==(Me=qe[22]("routeEditor.enableSlowStart")+"")&&T(ft,Me),qe[19]?jn?jn.p(qe,et):(jn=Lf(qe),jn.c(),jn.m(_n,null)):jn&&(jn.d(1),jn=null),et[0]&4194304&&zs!==(zs=qe[22]("routeEditor.failoverInfoNotice")+"")&&T(gi,zs)},d(qe){qe&&(H(e),H(b),H(_),H(Dn),H(cn),H(wt),H(on),H(nn),H(Ce)),In&&In.d(),jn&&jn.d(),xs=!1,ht(mi)}}}function Df(t){let e,n,s,i,l=t[22]("routeEditor.healthCheckIntervalMs")+"",o,a,u,f,h,p,g=t[22]("routeEditor.healthCheckIntervalMsHelp")+"",m,b,_,y,k,w=t[22]("routeEditor.healthCheckTimeoutMs")+"",S,P,M,x,A,O,C=t[22]("routeEditor.healthCheckTimeoutMsHelp")+"",R,L,D,z,B,U=t[22]("routeEditor.healthCheckPath")+"",F,V,Y,j,q,Q,X=t[22]("routeEditor.healthCheckPathHelp")+"",re,K,W,G,J,le=t[22]("routeEditor.healthCheckMethod")+"",se,N,te,Z,oe,Se,me,Ee,ye,ge,be,He=t[22]("routeEditor.healthCheckExpectedStatus")+"",Te,Pe,_e,De,ke,$,ae=t[22]("routeEditor.healthCheckExpectedStatusHelp")+"",ue,de,fe,Be,Qe,We=t[22]("routeEditor.healthCheckUnhealthyThreshold")+"",Ye,nt,Je,rt,lt,he,Re=t[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"",Le,ot,Ge,Ie,Ve,we=t[22]("routeEditor.healthCheckHealthyThreshold")+"",Ke,ve,Xe,Ct,$e,je,At=t[22]("routeEditor.healthCheckHealthyThresholdHelp")+"",it,mt,Lt;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),a=v(),u=d("input"),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),_=d("div"),y=d("label"),k=d("span"),S=E(w),P=v(),M=d("input"),x=v(),A=d("div"),O=d("span"),R=E(C),L=v(),D=d("div"),z=d("label"),B=d("span"),F=E(U),V=v(),Y=d("input"),j=v(),q=d("div"),Q=d("span"),re=E(X),K=v(),W=d("div"),G=d("label"),J=d("span"),se=E(le),N=v(),te=d("select"),Z=d("option"),Z.textContent="GET (default)",oe=d("option"),oe.textContent="GET",Se=d("option"),Se.textContent="POST",me=d("option"),me.textContent="HEAD",Ee=v(),ye=d("div"),ge=d("label"),be=d("span"),Te=E(He),Pe=v(),_e=d("input"),De=v(),ke=d("div"),$=d("span"),ue=E(ae),de=v(),fe=d("div"),Be=d("label"),Qe=d("span"),Ye=E(We),nt=v(),Je=d("input"),rt=v(),lt=d("div"),he=d("span"),Le=E(Re),ot=v(),Ge=d("div"),Ie=d("label"),Ve=d("span"),Ke=E(we),ve=v(),Xe=d("input"),Ct=v(),$e=d("div"),je=d("span"),it=E(At),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","health-check-interval-ms"),c(u,"id","health-check-interval-ms"),c(u,"type","number"),c(u,"placeholder","10000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(k,"class","label-text"),c(y,"class","label"),c(y,"for","health-check-timeout-ms"),c(M,"id","health-check-timeout-ms"),c(M,"type","number"),c(M,"placeholder","3000"),c(M,"class","input input-bordered input-sm"),c(M,"min","100"),c(O,"class","label-text-alt text-xs"),c(A,"class","label"),c(_,"class","form-control"),c(B,"class","label-text"),c(z,"class","label"),c(z,"for","health-check-path"),c(Y,"id","health-check-path"),c(Y,"type","text"),c(Y,"placeholder","/health"),c(Y,"class","input input-bordered input-sm"),c(Q,"class","label-text-alt text-xs"),c(q,"class","label"),c(D,"class","form-control"),c(J,"class","label-text"),c(G,"class","label"),c(G,"for","health-check-method"),Z.__value="",ne(Z,Z.__value),oe.__value="GET",ne(oe,oe.__value),Se.__value="POST",ne(Se,Se.__value),me.__value="HEAD",ne(me,me.__value),c(te,"id","health-check-method"),c(te,"class","select select-bordered select-sm"),t[15]===void 0&&vs(()=>t[39].call(te)),c(W,"class","form-control"),c(be,"class","label-text"),c(ge,"class","label"),c(ge,"for","health-check-expected-status"),c(_e,"id","health-check-expected-status"),c(_e,"type","text"),c(_e,"placeholder","200"),c(_e,"class","input input-bordered input-sm"),c($,"class","label-text-alt text-xs"),c(ke,"class","label"),c(ye,"class","form-control"),c(Qe,"class","label-text"),c(Be,"class","label"),c(Be,"for","health-check-unhealthy-threshold"),c(Je,"id","health-check-unhealthy-threshold"),c(Je,"type","number"),c(Je,"placeholder","3"),c(Je,"class","input input-bordered input-sm"),c(Je,"min","1"),c(he,"class","label-text-alt text-xs"),c(lt,"class","label"),c(fe,"class","form-control"),c(Ve,"class","label-text"),c(Ie,"class","label"),c(Ie,"for","health-check-healthy-threshold"),c(Xe,"id","health-check-healthy-threshold"),c(Xe,"type","number"),c(Xe,"placeholder","2"),c(Xe,"class","input input-bordered input-sm"),c(Xe,"min","1"),c(je,"class","label-text-alt text-xs"),c($e,"class","label"),c(Ge,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(xe,at){I(xe,e,at),r(e,n),r(n,s),r(s,i),r(i,o),r(n,a),r(n,u),ne(u,t[12]),r(n,f),r(n,h),r(h,p),r(p,m),r(e,b),r(e,_),r(_,y),r(y,k),r(k,S),r(_,P),r(_,M),ne(M,t[13]),r(_,x),r(_,A),r(A,O),r(O,R),r(e,L),r(e,D),r(D,z),r(z,B),r(B,F),r(D,V),r(D,Y),ne(Y,t[14]),r(D,j),r(D,q),r(q,Q),r(Q,re),r(e,K),r(e,W),r(W,G),r(G,J),r(J,se),r(W,N),r(W,te),r(te,Z),r(te,oe),r(te,Se),r(te,me),Cn(te,t[15],!0),r(e,Ee),r(e,ye),r(ye,ge),r(ge,be),r(be,Te),r(ye,Pe),r(ye,_e),ne(_e,t[16]),r(ye,De),r(ye,ke),r(ke,$),r($,ue),r(e,de),r(e,fe),r(fe,Be),r(Be,Qe),r(Qe,Ye),r(fe,nt),r(fe,Je),ne(Je,t[17]),r(fe,rt),r(fe,lt),r(lt,he),r(he,Le),r(e,ot),r(e,Ge),r(Ge,Ie),r(Ie,Ve),r(Ve,Ke),r(Ge,ve),r(Ge,Xe),ne(Xe,t[18]),r(Ge,Ct),r(Ge,$e),r($e,je),r(je,it),mt||(Lt=[ee(u,"input",t[36]),ee(M,"input",t[37]),ee(Y,"input",t[38]),ee(te,"change",t[39]),ee(_e,"input",t[40]),ee(Je,"input",t[41]),ee(Xe,"input",t[42])],mt=!0)},p(xe,at){at[0]&4194304&&l!==(l=xe[22]("routeEditor.healthCheckIntervalMs")+"")&&T(o,l),at[0]&4096&&yt(u.value)!==xe[12]&&ne(u,xe[12]),at[0]&4194304&&g!==(g=xe[22]("routeEditor.healthCheckIntervalMsHelp")+"")&&T(m,g),at[0]&4194304&&w!==(w=xe[22]("routeEditor.healthCheckTimeoutMs")+"")&&T(S,w),at[0]&8192&&yt(M.value)!==xe[13]&&ne(M,xe[13]),at[0]&4194304&&C!==(C=xe[22]("routeEditor.healthCheckTimeoutMsHelp")+"")&&T(R,C),at[0]&4194304&&U!==(U=xe[22]("routeEditor.healthCheckPath")+"")&&T(F,U),at[0]&16384&&Y.value!==xe[14]&&ne(Y,xe[14]),at[0]&4194304&&X!==(X=xe[22]("routeEditor.healthCheckPathHelp")+"")&&T(re,X),at[0]&4194304&&le!==(le=xe[22]("routeEditor.healthCheckMethod")+"")&&T(se,le),at[0]&32768&&Cn(te,xe[15]),at[0]&4194304&&He!==(He=xe[22]("routeEditor.healthCheckExpectedStatus")+"")&&T(Te,He),at[0]&65536&&_e.value!==xe[16]&&ne(_e,xe[16]),at[0]&4194304&&ae!==(ae=xe[22]("routeEditor.healthCheckExpectedStatusHelp")+"")&&T(ue,ae),at[0]&4194304&&We!==(We=xe[22]("routeEditor.healthCheckUnhealthyThreshold")+"")&&T(Ye,We),at[0]&131072&&yt(Je.value)!==xe[17]&&ne(Je,xe[17]),at[0]&4194304&&Re!==(Re=xe[22]("routeEditor.healthCheckUnhealthyThresholdHelp")+"")&&T(Le,Re),at[0]&4194304&&we!==(we=xe[22]("routeEditor.healthCheckHealthyThreshold")+"")&&T(Ke,we),at[0]&262144&&yt(Xe.value)!==xe[18]&&ne(Xe,xe[18]),at[0]&4194304&&At!==(At=xe[22]("routeEditor.healthCheckHealthyThresholdHelp")+"")&&T(it,At)},d(xe){xe&&H(e),mt=!1,ht(Lt)}}}function Lf(t){let e,n,s,i,l=t[22]("routeEditor.slowStartDurationMs")+"",o,a,u,f,h,p,g=t[22]("routeEditor.slowStartDurationMsHelp")+"",m,b,_,y,k,w=t[22]("routeEditor.slowStartInitialWeightFactor")+"",S,P,M,x,A,O,C=t[22]("routeEditor.slowStartInitialWeightFactorHelp")+"",R,L,D;return{c(){e=d("div"),n=d("div"),s=d("label"),i=d("span"),o=E(l),a=v(),u=d("input"),f=v(),h=d("div"),p=d("span"),m=E(g),b=v(),_=d("div"),y=d("label"),k=d("span"),S=E(w),P=v(),M=d("input"),x=v(),A=d("div"),O=d("span"),R=E(C),c(i,"class","label-text"),c(s,"class","label"),c(s,"for","slow-start-duration-ms"),c(u,"id","slow-start-duration-ms"),c(u,"type","number"),c(u,"placeholder","30000"),c(u,"class","input input-bordered input-sm"),c(u,"min","1000"),c(p,"class","label-text-alt text-xs"),c(h,"class","label"),c(n,"class","form-control"),c(k,"class","label-text"),c(y,"class","label"),c(y,"for","slow-start-initial-weight-factor"),c(M,"id","slow-start-initial-weight-factor"),c(M,"type","number"),c(M,"placeholder","0.1"),c(M,"class","input input-bordered input-sm"),c(M,"min","0.01"),c(M,"max","1"),c(M,"step","0.01"),c(O,"class","label-text-alt text-xs"),c(A,"class","label"),c(_,"class","form-control"),c(e,"class","grid grid-cols-1 md:grid-cols-2 gap-4")},m(z,B){I(z,e,B),r(e,n),r(n,s),r(s,i),r(i,o),r(n,a),r(n,u),ne(u,t[20]),r(n,f),r(n,h),r(h,p),r(p,m),r(e,b),r(e,_),r(_,y),r(y,k),r(k,S),r(_,P),r(_,M),ne(M,t[21]),r(_,x),r(_,A),r(A,O),r(O,R),L||(D=[ee(u,"input",t[44]),ee(M,"input",t[45])],L=!0)},p(z,B){B[0]&4194304&&l!==(l=z[22]("routeEditor.slowStartDurationMs")+"")&&T(o,l),B[0]&1048576&&yt(u.value)!==z[20]&&ne(u,z[20]),B[0]&4194304&&g!==(g=z[22]("routeEditor.slowStartDurationMsHelp")+"")&&T(m,g),B[0]&4194304&&w!==(w=z[22]("routeEditor.slowStartInitialWeightFactor")+"")&&T(S,w),B[0]&2097152&&yt(M.value)!==z[21]&&ne(M,z[21]),B[0]&4194304&&C!==(C=z[22]("routeEditor.slowStartInitialWeightFactorHelp")+"")&&T(R,C)},d(z){z&&H(e),L=!1,ht(D)}}}function f3(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=t[22]("routeEditor.enableFailover")+"",b,_,y,k,w=t[1]&&Of(t),S=t[2]&&Rf(t);return{c(){e=d("div"),n=d("div"),s=d("span"),i=E(t[0]),l=v(),w&&w.c(),o=v(),a=d("div"),u=d("div"),f=d("label"),h=d("input"),p=v(),g=d("span"),b=E(m),_=v(),S&&S.c(),c(s,"class","label-text font-semibold"),c(n,"class","label"),c(h,"type","checkbox"),c(h,"class","checkbox"),c(g,"class","label-text"),c(f,"class","label cursor-pointer justify-start gap-4"),c(u,"class","form-control"),c(a,"class","space-y-4"),c(e,"class","form-control w-full")},m(P,M){I(P,e,M),r(e,n),r(n,s),r(s,i),r(n,l),w&&w.m(n,null),r(e,o),r(e,a),r(a,u),r(u,f),r(f,h),h.checked=t[2],r(f,p),r(f,g),r(g,b),r(a,_),S&&S.m(a,null),y||(k=[ee(h,"change",t[26]),ee(h,"change",t[27])],y=!0)},p(P,M){M[0]&1&&T(i,P[0]),P[1]?w?w.p(P,M):(w=Of(P),w.c(),w.m(n,null)):w&&(w.d(1),w=null),M[0]&4&&(h.checked=P[2]),M[0]&4194304&&m!==(m=P[22]("routeEditor.enableFailover")+"")&&T(b,m),P[2]?S?S.p(P,M):(S=Rf(P),S.c(),S.m(a,null)):S&&(S.d(1),S=null)},i:Ae,o:Ae,d(P){P&&H(e),w&&w.d(),S&&S.d(),y=!1,ht(k)}}}function Hf(t){return t.split(",").map(e=>parseInt(e.trim())).filter(e=>!isNaN(e)&&e>=100&&e<600)}function h3(t,e,n){let s;Zt(t,xt,oe=>n(22,s=oe));let{value:i=void 0}=e,{label:l="Failover"}=e,{showHelp:o=!0}=e,a=!1,u=!1,f=[],h="",p,g,m,b,_,y,k=!1,w,S,P,M,x=[],A="",O,C,R=!1,L,D;function z(){a=this.checked,n(2,a),n(3,u),n(23,i),n(24,f),n(25,x),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}const B=()=>{n(3,u=!0)};function U(){h=this.value,n(4,h),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(16,A)}function F(){p=yt(this.value),n(5,p),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function V(){g=yt(this.value),n(6,g),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function Y(){m=yt(this.value),n(7,m),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function j(){b=yt(this.value),n(8,b),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function q(){_=yt(this.value),n(9,_),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function Q(){y=yt(this.value),n(10,y),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function X(){k=this.checked,n(11,k),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function re(){w=yt(this.value),n(12,w),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function K(){S=yt(this.value),n(13,S),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function W(){P=this.value,n(14,P),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function G(){M=Is(this),n(15,M),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function J(){A=this.value,n(16,A),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h)}function le(){O=yt(this.value),n(17,O),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(18,C),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function se(){C=yt(this.value),n(18,C),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(19,R),n(20,L),n(21,D),n(4,h),n(16,A)}function N(){R=this.checked,n(19,R),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(20,L),n(21,D),n(4,h),n(16,A)}function te(){L=yt(this.value),n(20,L),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(21,D),n(4,h),n(16,A)}function Z(){D=yt(this.value),n(21,D),n(3,u),n(23,i),n(24,f),n(25,x),n(2,a),n(5,p),n(6,g),n(7,m),n(8,b),n(9,_),n(10,y),n(11,k),n(12,w),n(13,S),n(14,P),n(15,M),n(17,O),n(18,C),n(19,R),n(20,L),n(4,h),n(16,A)}return t.$$set=oe=>{"value"in oe&&n(23,i=oe.value),"label"in oe&&n(0,l=oe.label),"showHelp"in oe&&n(1,o=oe.showHelp)},t.$$.update=()=>{t.$$.dirty[0]&62849004&&(!u&&i&&(n(2,a=i.enabled||!1),n(24,f=i.retryableStatusCodes||[500,502,503,504]),n(4,h=f.join(", ")),n(5,p=i.consecutiveFailuresThreshold),n(6,g=i.healthyThreshold),n(7,m=i.requestTimeoutMs),n(8,b=i.connectTimeoutMs),n(9,_=i.recoveryIntervalMs),n(10,y=i.recoveryTimeoutMs),i.healthCheck&&(n(11,k=i.healthCheck.enabled||!1),n(12,w=i.healthCheck.intervalMs),n(13,S=i.healthCheck.timeoutMs),n(14,P=i.healthCheck.path),n(15,M=i.healthCheck.method),n(25,x=i.healthCheck.expectedStatus||[200]),n(16,A=x.join(", ")),n(17,O=i.healthCheck.unhealthyThreshold),n(18,C=i.healthCheck.healthyThreshold)),i.slowStart&&(n(19,R=i.slowStart.enabled||!1),n(20,L=i.slowStart.durationMs),n(21,D=i.slowStart.initialWeightFactor)),n(3,u=!0)),a?i?(n(23,i.enabled=!0,i),n(23,i.retryableStatusCodes=f.length>0?f:[500,502,503,504],i),p!==void 0&&n(23,i.consecutiveFailuresThreshold=p,i),g!==void 0&&n(23,i.healthyThreshold=g,i),m!==void 0&&n(23,i.requestTimeoutMs=m,i),b!==void 0&&n(23,i.connectTimeoutMs=b,i),_!==void 0&&n(23,i.recoveryIntervalMs=_,i),y!==void 0&&n(23,i.recoveryTimeoutMs=y,i),k?n(23,i.healthCheck={enabled:!0,intervalMs:w,timeoutMs:S,path:P,method:M,expectedStatus:x.length>0?x:[200],unhealthyThreshold:O,healthyThreshold:C},i):n(23,i.healthCheck=void 0,i),R?n(23,i.slowStart={enabled:!0,durationMs:L,initialWeightFactor:D},i):n(23,i.slowStart=void 0,i)):n(23,i={enabled:!0,retryableStatusCodes:f.length>0?f:[500,502,503,504]}):n(23,i=void 0)),t.$$.dirty[0]&16&&n(24,f=Hf(h)),t.$$.dirty[0]&65536&&n(25,x=Hf(A))},[l,o,a,u,h,p,g,m,b,_,y,k,w,S,P,M,A,O,C,R,L,D,s,i,f,x,z,B,U,F,V,Y,j,q,Q,X,re,K,W,G,J,le,se,N,te,Z]}class d3 extends Gt{constructor(e){super(),qt(this,e,h3,f3,Nt,{value:23,label:0,showHelp:1},null,[-1,-1])}}const zn=[];for(let t=0;t<256;++t)zn.push((t+256).toString(16).slice(1));function p3(t,e=0){return(zn[t[e+0]]+zn[t[e+1]]+zn[t[e+2]]+zn[t[e+3]]+"-"+zn[t[e+4]]+zn[t[e+5]]+"-"+zn[t[e+6]]+zn[t[e+7]]+"-"+zn[t[e+8]]+zn[t[e+9]]+"-"+zn[t[e+10]]+zn[t[e+11]]+zn[t[e+12]]+zn[t[e+13]]+zn[t[e+14]]+zn[t[e+15]]).toLowerCase()}let dr;const g3=new Uint8Array(16);function m3(){if(!dr){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");dr=crypto.getRandomValues.bind(crypto)}return dr(g3)}const b3=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),If={randomUUID:b3};function _3(t,e,n){t=t||{};const s=t.random??t.rng?.()??m3();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,p3(s)}function ol(t,e,n){return If.randomUUID&&!t?If.randomUUID():_3(t)}function Bf(t,e,n){const s=t.slice();return s[38]=e[n],s}function Ff(t,e,n){const s=t.slice();return s[41]=e[n],s[42]=e,s[43]=n,s}function Nf(t,e,n){const s=t.slice();return s[44]=e[n],s[45]=e,s[43]=n,s}function jf(t){let e,n,s,i,l=t[12]("routeEditor.useTemplate")+"",o,a,u;return{c(){e=d("button"),n=pe("svg"),s=pe("path"),i=v(),o=E(l),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"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"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","h-4 w-4"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"stroke","currentColor"),c(e,"type","button"),c(e,"class","btn btn-sm btn-outline")},m(f,h){I(f,e,h),r(e,n),r(n,s),r(e,i),r(e,o),a||(u=ee(e,"click",t[23]),a=!0)},p(f,h){h[0]&4096&&l!==(l=f[12]("routeEditor.useTemplate")+"")&&T(o,l)},d(f){f&&H(e),a=!1,u()}}}function v3(t){let e,n,s,i,l=t[12]("routeEditor.routePath")+"",o,a,u,f,h,p=t[12]("routes.path")+"",g,m,b,_,y,k=t[12]("routeEditor.pathHelp")+"",w,S,P,M,x,A=t[8].some(Jf),O,C,R,L,D=t[12]("routeEditor.pathRewrite")+"",z,B,U=t[12]("routeEditor.optional")+"",F,V,Y,j,q=t[12]("routeEditor.pathRewriteHelp")+"",Q,X,re,K,W,G=t[12]("routeEditor.addPathRewriteRule")+"",J,le,se,N,te,Z,oe=t[12]("routeEditor.upstreams")+"",Se,me,Ee,ye,ge,be=t[12]("routeEditor.addUpstream")+"",He,Te,Pe=t[8].some(Yf),_e,De,ke=[],$=new Map,ae,ue,de,fe,Be,Qe=t[12]("routeEditor.transformer")+"",We,Ye,nt,Je=t[12]("routeEditor.transformerHelp")+"",rt,lt,he,Re,Le,ot,Ge,Ie,Ve,we,Ke,ve,Xe,Ct,$e,je,At,it,mt,Lt=t[12]("auth.routeAuth")+"",xe,at,Ne=t[12]("routeEditor.optional")+"",st,jt,Rn,gn,Fe=t[12]("auth.routeAuthHelp")+"",ut,un,Rt,os,Mn,Un,zt,mn,Dn=t[12]("routeEditor.failoverTitle")+"",cn,Ln,Sn=t[12]("routeEditor.optional")+"",Pn,Ut,rs,Ht,sn=t[12]("routeEditor.failoverHelp")+"",An,Fn,ln,Xt,Qn,Tt,bn,$n=t[12]("routeEditor.cancel")+"",as,Yt,vt,es,It,ct,Vn,ys,wt=A&&zf(t),on=tt(t[1]),Qt=[];for(let ce=0;ce<on.length;ce+=1)Qt[ce]=Uf(Nf(t,on,ce));let dn=Pe&&Vf(t),Hn=tt(t[0].upstreams);const ts=ce=>ce[41]._uid;for(let ce=0;ce<Hn.length;ce+=1){let Me=Ff(t,Hn,ce),ft=ts(Me);$.set(ft,ke[ce]=Wf(ft,Me))}let Jt=t[9].length>0&&qf(t);function _s(ce){t[31](ce)}let _n={label:t[12]("routeEditor.transformer")};t[2]!==void 0&&(_n.plugin=t[2]),Re=new Kp({props:_n}),wn.push(()=>Yn(Re,"plugin",_s));function fn(ce){t[32](ce)}let Nn={label:t[12]("headers.title")};t[0].headers!==void 0&&(Nn.value=t[0].headers),Ve=new Xp({props:Nn}),wn.push(()=>Yn(Ve,"value",fn));function Wn(ce){t[33](ce)}let Kt={label:t[12]("body.title")};t[0].body!==void 0&&(Kt.value=t[0].body),Ct=new Yp({props:Kt}),wn.push(()=>Yn(Ct,"value",Wn));function $t(ce){t[34](ce)}let ns={label:t[12]("auth.routeAuth"),showHelp:!1};t[0].auth!==void 0&&(ns.value=t[0].auth),Rt=new xp({props:ns}),wn.push(()=>Yn(Rt,"value",$t));function us(ce){t[35](ce)}let pn={label:t[12]("routeEditor.failoverTitle"),showHelp:!1};t[0].failover!==void 0&&(pn.value=t[0].failover),ln=new d3({props:pn}),wn.push(()=>Yn(ln,"value",us));function en(ce,Me){return ce[6]?k3:w3}let Bt=en(t),dt=Bt(t),kt=t[10].length>0&&Gf(t);return{c(){e=d("form"),n=d("div"),s=d("div"),i=d("h2"),o=E(l),a=v(),u=d("div"),f=d("label"),h=d("span"),g=E(p),m=v(),b=d("span"),b.textContent="*",_=v(),y=d("span"),w=E(k),S=v(),P=d("input"),x=v(),wt&&wt.c(),O=v(),C=d("div"),R=d("label"),L=d("span"),z=E(D),B=E(" ("),F=E(U),V=E(")"),Y=v(),j=d("span"),Q=E(q),X=v(),re=d("div");for(let ce=0;ce<Qt.length;ce+=1)Qt[ce].c();K=v(),W=d("button"),J=E(G),le=v(),se=d("div"),N=d("div"),te=d("div"),Z=d("h2"),Se=E(oe),me=v(),Ee=d("span"),Ee.textContent="*",ye=v(),ge=d("button"),He=E(be),Te=v(),dn&&dn.c(),_e=v(),De=d("div");for(let ce=0;ce<ke.length;ce+=1)ke[ce].c();ae=v(),Jt&&Jt.c(),ue=v(),de=d("div"),fe=d("div"),Be=d("h2"),We=E(Qe),Ye=v(),nt=d("p"),rt=E(Je),lt=v(),he=d("div"),_t(Re.$$.fragment),ot=v(),Ge=d("div"),Ie=v(),_t(Ve.$$.fragment),Ke=v(),ve=d("div"),Xe=v(),_t(Ct.$$.fragment),je=v(),At=d("div"),it=d("div"),mt=d("h2"),xe=E(Lt),at=E(" ("),st=E(Ne),jt=E(")"),Rn=v(),gn=d("p"),ut=E(Fe),un=v(),_t(Rt.$$.fragment),Mn=v(),Un=d("div"),zt=d("div"),mn=d("h2"),cn=E(Dn),Ln=E(" ("),Pn=E(Sn),Ut=E(")"),rs=v(),Ht=d("p"),An=E(sn),Fn=v(),_t(ln.$$.fragment),Qn=v(),Tt=d("div"),bn=d("button"),as=E($n),Yt=v(),vt=d("button"),dt.c(),It=v(),kt&&kt.c(),c(i,"class","card-title"),c(b,"class","text-error"),c(h,"class","label-text font-semibold"),c(y,"class","label-text-alt text-xs"),c(f,"class","label"),c(f,"for","route-path"),c(P,"id","route-path"),c(P,"type","text"),c(P,"placeholder",M=t[12]("routeEditor.pathPlaceholder")),c(P,"class","input input-bordered"),P.required=!0,ie(P,"input-error",t[8].some(Kf)),c(u,"class","form-control"),c(L,"class","label-text font-semibold"),c(j,"class","label-text-alt text-xs"),c(R,"class","label"),c(R,"for","path-rewrite-pattern-0"),c(W,"type","button"),c(W,"class","btn btn-sm btn-ghost"),c(re,"class","space-y-2"),c(C,"class","form-control"),c(s,"class","card-body"),c(n,"class","card bg-base-100 shadow-md"),c(Ee,"class","text-error"),c(Z,"class","card-title"),c(ge,"type","button"),c(ge,"class","btn btn-sm btn-primary"),c(te,"class","flex justify-between items-center"),c(De,"class","space-y-4 mt-4"),c(N,"class","card-body"),c(se,"class","card bg-base-100 shadow-md"),c(Be,"class","card-title"),c(nt,"class","text-sm text-gray-500 mb-4"),c(Ge,"class","divider"),c(ve,"class","divider"),c(he,"class","space-y-6"),c(fe,"class","card-body"),c(de,"class","card bg-base-100 shadow-md"),c(mt,"class","card-title"),c(gn,"class","text-sm text-gray-500 mb-4"),c(it,"class","card-body"),c(At,"class","card bg-base-100 shadow-md"),c(mn,"class","card-title"),c(Ht,"class","text-sm text-gray-500 mb-4"),c(zt,"class","card-body"),c(Un,"class","card bg-base-100 shadow-md"),c(bn,"type","button"),c(bn,"class","btn btn-ghost"),bn.disabled=t[6],c(vt,"type","submit"),c(vt,"class","btn btn-primary"),vt.disabled=es=!t[11]||t[6],c(Tt,"class","flex justify-end gap-4"),c(e,"class","space-y-8")},m(ce,Me){I(ce,e,Me),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,f),r(f,h),r(h,g),r(h,m),r(h,b),r(f,_),r(f,y),r(y,w),r(u,S),r(u,P),ne(P,t[0].path),r(u,x),wt&&wt.m(u,null),r(s,O),r(s,C),r(C,R),r(R,L),r(L,z),r(L,B),r(L,F),r(L,V),r(R,Y),r(R,j),r(j,Q),r(C,X),r(C,re);for(let ft=0;ft<Qt.length;ft+=1)Qt[ft]&&Qt[ft].m(re,null);r(re,K),r(re,W),r(W,J),r(e,le),r(e,se),r(se,N),r(N,te),r(te,Z),r(Z,Se),r(Z,me),r(Z,Ee),r(te,ye),r(te,ge),r(ge,He),r(N,Te),dn&&dn.m(N,null),r(N,_e),r(N,De);for(let ft=0;ft<ke.length;ft+=1)ke[ft]&&ke[ft].m(De,null);r(N,ae),Jt&&Jt.m(N,null),r(e,ue),r(e,de),r(de,fe),r(fe,Be),r(Be,We),r(fe,Ye),r(fe,nt),r(nt,rt),r(fe,lt),r(fe,he),pt(Re,he,null),r(he,ot),r(he,Ge),r(he,Ie),pt(Ve,he,null),r(he,Ke),r(he,ve),r(he,Xe),pt(Ct,he,null),r(e,je),r(e,At),r(At,it),r(it,mt),r(mt,xe),r(mt,at),r(mt,st),r(mt,jt),r(it,Rn),r(it,gn),r(gn,ut),r(it,un),pt(Rt,it,null),r(e,Mn),r(e,Un),r(Un,zt),r(zt,mn),r(mn,cn),r(mn,Ln),r(mn,Pn),r(mn,Ut),r(zt,rs),r(zt,Ht),r(Ht,An),r(zt,Fn),pt(ln,zt,null),r(e,Qn),r(e,Tt),r(Tt,bn),r(bn,as),r(Tt,Yt),r(Tt,vt),dt.m(vt,null),r(e,It),kt&&kt.m(e,null),ct=!0,Vn||(ys=[ee(P,"input",t[24]),ee(W,"click",t[13]),ee(ge,"click",t[15]),ee(bn,"click",t[19]),ee(e,"submit",eg(t[18]))],Vn=!0)},p(ce,Me){if((!ct||Me[0]&4096)&&l!==(l=ce[12]("routeEditor.routePath")+"")&&T(o,l),(!ct||Me[0]&4096)&&p!==(p=ce[12]("routes.path")+"")&&T(g,p),(!ct||Me[0]&4096)&&k!==(k=ce[12]("routeEditor.pathHelp")+"")&&T(w,k),(!ct||Me[0]&4096&&M!==(M=ce[12]("routeEditor.pathPlaceholder")))&&c(P,"placeholder",M),Me[0]&1&&P.value!==ce[0].path&&ne(P,ce[0].path),(!ct||Me[0]&256)&&ie(P,"input-error",ce[8].some(Kf)),Me[0]&256&&(A=ce[8].some(Jf)),A?wt?wt.p(ce,Me):(wt=zf(ce),wt.c(),wt.m(u,null)):wt&&(wt.d(1),wt=null),(!ct||Me[0]&4096)&&D!==(D=ce[12]("routeEditor.pathRewrite")+"")&&T(z,D),(!ct||Me[0]&4096)&&U!==(U=ce[12]("routeEditor.optional")+"")&&T(F,U),(!ct||Me[0]&4096)&&q!==(q=ce[12]("routeEditor.pathRewriteHelp")+"")&&T(Q,q),Me[0]&20482){on=tt(ce[1]);let vn;for(vn=0;vn<on.length;vn+=1){const qn=Nf(ce,on,vn);Qt[vn]?Qt[vn].p(qn,Me):(Qt[vn]=Uf(qn),Qt[vn].c(),Qt[vn].m(re,K))}for(;vn<Qt.length;vn+=1)Qt[vn].d(1);Qt.length=on.length}(!ct||Me[0]&4096)&&G!==(G=ce[12]("routeEditor.addPathRewriteRule")+"")&&T(J,G),(!ct||Me[0]&4096)&&oe!==(oe=ce[12]("routeEditor.upstreams")+"")&&T(Se,oe),(!ct||Me[0]&4096)&&be!==(be=ce[12]("routeEditor.addUpstream")+"")&&T(He,be),Me[0]&256&&(Pe=ce[8].some(Yf)),Pe?dn?dn.p(ce,Me):(dn=Vf(ce),dn.c(),dn.m(N,_e)):dn&&(dn.d(1),dn=null),Me[0]&196609&&(Hn=tt(ce[0].upstreams),ms(),ke=Nr(ke,Me,ts,1,ce,Hn,$,De,od,Wf,null,Ff),bs()),ce[9].length>0?Jt?Jt.p(ce,Me):(Jt=qf(ce),Jt.c(),Jt.m(N,null)):Jt&&(Jt.d(1),Jt=null),(!ct||Me[0]&4096)&&Qe!==(Qe=ce[12]("routeEditor.transformer")+"")&&T(We,Qe),(!ct||Me[0]&4096)&&Je!==(Je=ce[12]("routeEditor.transformerHelp")+"")&&T(rt,Je);const ft={};Me[0]&4096&&(ft.label=ce[12]("routeEditor.transformer")),!Le&&Me[0]&4&&(Le=!0,ft.plugin=ce[2],Xn(()=>Le=!1)),Re.$set(ft);const tn={};Me[0]&4096&&(tn.label=ce[12]("headers.title")),!we&&Me[0]&1&&(we=!0,tn.value=ce[0].headers,Xn(()=>we=!1)),Ve.$set(tn);const nn={};Me[0]&4096&&(nn.label=ce[12]("body.title")),!$e&&Me[0]&1&&($e=!0,nn.value=ce[0].body,Xn(()=>$e=!1)),Ct.$set(nn),(!ct||Me[0]&4096)&&Lt!==(Lt=ce[12]("auth.routeAuth")+"")&&T(xe,Lt),(!ct||Me[0]&4096)&&Ne!==(Ne=ce[12]("routeEditor.optional")+"")&&T(st,Ne),(!ct||Me[0]&4096)&&Fe!==(Fe=ce[12]("auth.routeAuthHelp")+"")&&T(ut,Fe);const Ce={};Me[0]&4096&&(Ce.label=ce[12]("auth.routeAuth")),!os&&Me[0]&1&&(os=!0,Ce.value=ce[0].auth,Xn(()=>os=!1)),Rt.$set(Ce),(!ct||Me[0]&4096)&&Dn!==(Dn=ce[12]("routeEditor.failoverTitle")+"")&&T(cn,Dn),(!ct||Me[0]&4096)&&Sn!==(Sn=ce[12]("routeEditor.optional")+"")&&T(Pn,Sn),(!ct||Me[0]&4096)&&sn!==(sn=ce[12]("routeEditor.failoverHelp")+"")&&T(An,sn);const ss={};Me[0]&4096&&(ss.label=ce[12]("routeEditor.failoverTitle")),!Xt&&Me[0]&1&&(Xt=!0,ss.value=ce[0].failover,Xn(()=>Xt=!1)),ln.$set(ss),(!ct||Me[0]&4096)&&$n!==($n=ce[12]("routeEditor.cancel")+"")&&T(as,$n),(!ct||Me[0]&64)&&(bn.disabled=ce[6]),Bt===(Bt=en(ce))&&dt?dt.p(ce,Me):(dt.d(1),dt=Bt(ce),dt&&(dt.c(),dt.m(vt,null))),(!ct||Me[0]&2112&&es!==(es=!ce[11]||ce[6]))&&(vt.disabled=es),ce[10].length>0?kt?kt.p(ce,Me):(kt=Gf(ce),kt.c(),kt.m(e,null)):kt&&(kt.d(1),kt=null)},i(ce){if(!ct){for(let Me=0;Me<Hn.length;Me+=1)ze(ke[Me]);ze(Re.$$.fragment,ce),ze(Ve.$$.fragment,ce),ze(Ct.$$.fragment,ce),ze(Rt.$$.fragment,ce),ze(ln.$$.fragment,ce),ct=!0}},o(ce){for(let Me=0;Me<ke.length;Me+=1)Ue(ke[Me]);Ue(Re.$$.fragment,ce),Ue(Ve.$$.fragment,ce),Ue(Ct.$$.fragment,ce),Ue(Rt.$$.fragment,ce),Ue(ln.$$.fragment,ce),ct=!1},d(ce){ce&&H(e),wt&&wt.d(),Tn(Qt,ce),dn&&dn.d();for(let Me=0;Me<ke.length;Me+=1)ke[Me].d();Jt&&Jt.d(),gt(Re),gt(Ve),gt(Ct),gt(Rt),gt(ln),dt.d(),kt&&kt.d(),Vn=!1,ht(ys)}}}function y3(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function zf(t){let e,n,s=t[8].find(Zf)?.message+"",i;return{c(){e=d("label"),n=d("span"),i=E(s),c(n,"class","label-text-alt text-error"),c(e,"class","label"),c(e,"for","route-path")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Zf)?.message+"")&&T(i,s)},d(l){l&&H(e)}}}function Uf(t){let e,n,s,i,l,o,a,u,f,h;function p(){t[25].call(n,t[45],t[43])}function g(){t[26].call(l,t[45],t[43])}function m(){return t[27](t[43])}return{c(){e=d("div"),n=d("input"),i=v(),l=d("input"),a=v(),u=d("button"),u.textContent="\u2715",c(n,"id",\`path-rewrite-pattern-\${t[43]}\`),c(n,"type","text"),c(n,"placeholder",s=t[12]("routeEditor.patternPlaceholder")),c(n,"class","input input-bordered input-sm flex-1"),c(l,"id",\`path-rewrite-replacement-\${t[43]}\`),c(l,"type","text"),c(l,"placeholder",o=t[12]("routeEditor.replacementPlaceholder")),c(l,"class","input input-bordered input-sm flex-1"),c(u,"type","button"),c(u,"class","btn btn-sm btn-error btn-square"),c(e,"class","flex gap-2")},m(b,_){I(b,e,_),r(e,n),ne(n,t[44].pattern),r(e,i),r(e,l),ne(l,t[44].replacement),r(e,a),r(e,u),f||(h=[ee(n,"input",p),ee(l,"input",g),ee(u,"click",m)],f=!0)},p(b,_){t=b,_[0]&4096&&s!==(s=t[12]("routeEditor.patternPlaceholder"))&&c(n,"placeholder",s),_[0]&2&&n.value!==t[44].pattern&&ne(n,t[44].pattern),_[0]&4096&&o!==(o=t[12]("routeEditor.replacementPlaceholder"))&&c(l,"placeholder",o),_[0]&2&&l.value!==t[44].replacement&&ne(l,t[44].replacement)},d(b){b&&H(e),f=!1,ht(h)}}}function Vf(t){let e,n,s=t[8].find(Qf)?.message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-error")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o[0]&256&&s!==(s=l[8].find(Qf)?.message+"")&&T(i,s)},d(l){l&&H(e)}}}function Wf(t,e){let n,s,i,l;function o(){return e[28](e[43])}function a(){return e[29](e[43])}function u(h){e[30](h,e[43])}let f={index:e[43],onRemove:o,onDuplicate:a};return e[0].upstreams[e[43]]!==void 0&&(f.upstream=e[0].upstreams[e[43]]),s=new r3({props:f}),wn.push(()=>Yn(s,"upstream",u)),{key:t,first:null,c(){n=Zn(),_t(s.$$.fragment),this.first=n},m(h,p){I(h,n,p),pt(s,h,p),l=!0},p(h,p){e=h;const g={};p[0]&1&&(g.index=e[43]),p[0]&1&&(g.onRemove=o),p[0]&1&&(g.onDuplicate=a),!i&&p[0]&1&&(i=!0,g.upstream=e[0].upstreams[e[43]],Xn(()=>i=!1)),s.$set(g)},i(h){l||(ze(s.$$.fragment,h),l=!0)},o(h){Ue(s.$$.fragment,h),l=!1},d(h){h&&H(n),gt(s,h)}}}function qf(t){let e,n,s=t[9][0].message+"",i;return{c(){e=d("div"),n=d("span"),i=E(s),c(e,"class","alert alert-warning mt-4")},m(l,o){I(l,e,o),r(e,n),r(n,i)},p(l,o){o[0]&512&&s!==(s=l[9][0].message+"")&&T(i,s)},d(l){l&&H(e)}}}function w3(t){let e=t[12]("routeEditor.saveRoute")+"",n;return{c(){n=E(e)},m(s,i){I(s,n,i)},p(s,i){i[0]&4096&&e!==(e=s[12]("routeEditor.saveRoute")+"")&&T(n,e)},d(s){s&&H(n)}}}function k3(t){let e,n,s=t[12]("routeEditor.saving")+"",i;return{c(){e=d("span"),n=v(),i=E(s),c(e,"class","loading loading-spinner")},m(l,o){I(l,e,o),I(l,n,o),I(l,i,o)},p(l,o){o[0]&4096&&s!==(s=l[12]("routeEditor.saving")+"")&&T(i,s)},d(l){l&&(H(e),H(n),H(i))}}}function Gf(t){let e,n,s,i,l,o,a=t[12]("common.error")+"",u,f,h,p=tt(t[10]),g=[];for(let m=0;m<p.length;m+=1)g[m]=Xf(Bf(t,p,m));return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("div"),o=d("h3"),u=E(a),f=v(),h=d("ul");for(let m=0;m<g.length;m+=1)g[m].c();c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"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"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","text-xs list-disc list-inside"),c(e,"class","alert alert-warning")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(e,i),r(e,l),r(l,o),r(o,u),r(l,f),r(l,h);for(let _=0;_<g.length;_+=1)g[_]&&g[_].m(h,null)},p(m,b){if(b[0]&4096&&a!==(a=m[12]("common.error")+"")&&T(u,a),b[0]&1024){p=tt(m[10]);let _;for(_=0;_<p.length;_+=1){const y=Bf(m,p,_);g[_]?g[_].p(y,b):(g[_]=Xf(y),g[_].c(),g[_].m(h,null))}for(;_<g.length;_+=1)g[_].d(1);g.length=p.length}},d(m){m&&H(e),Tn(g,m)}}}function Xf(t){let e,n=t[38].field+"",s,i,l=t[38].message+"",o;return{c(){e=d("li"),s=E(n),i=E(": "),o=E(l)},m(a,u){I(a,e,u),r(e,s),r(e,i),r(e,o)},p(a,u){u[0]&1024&&n!==(n=a[38].field+"")&&T(s,n),u[0]&1024&&l!==(l=a[38].message+"")&&T(o,l)},d(a){a&&H(e)}}}function S3(t){let e,n,s,i,l=(t[3]?t[12]("routeEditor.editRoute"):t[12]("routeEditor.newRoute"))+"",o,a,u,f=(t[3]?\`\${t[12]("routeEditor.editRoute")}: \${t[4]}\`:t[12]("routes.subtitle"))+"",h,p,g,m,b,_,y,k,w,S=!t[3]&&jf(t);const P=[y3,v3],M=[];function x(C,R){return C[5]?0:1}m=x(t),b=M[m]=P[m](t);function A(C){t[36](C)}let O={};return t[7]!==void 0&&(O.showTemplates=t[7]),y=new c3({props:O}),wn.push(()=>Yn(y,"showTemplates",A)),y.$on("select",t[20]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h1"),o=E(l),a=v(),u=d("p"),h=E(f),p=v(),S&&S.c(),g=v(),b.c(),_=v(),_t(y.$$.fragment),c(i,"class","text-3xl font-bold"),c(u,"class","text-sm text-gray-500 mt-1"),c(n,"class","mb-6 flex justify-between items-start"),c(e,"class","p-6 max-w-6xl mx-auto")},m(C,R){I(C,e,R),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,h),r(n,p),S&&S.m(n,null),r(e,g),M[m].m(e,null),r(e,_),pt(y,e,null),w=!0},p(C,R){(!w||R[0]&4104)&&l!==(l=(C[3]?C[12]("routeEditor.editRoute"):C[12]("routeEditor.newRoute"))+"")&&T(o,l),(!w||R[0]&4120)&&f!==(f=(C[3]?\`\${C[12]("routeEditor.editRoute")}: \${C[4]}\`:C[12]("routes.subtitle"))+"")&&T(h,f),C[3]?S&&(S.d(1),S=null):S?S.p(C,R):(S=jf(C),S.c(),S.m(n,null));let L=m;m=x(C),m===L?M[m].p(C,R):(ms(),Ue(M[L],1,1,()=>{M[L]=null}),bs(),b=M[m],b?b.p(C,R):(b=M[m]=P[m](C),b.c()),ze(b,1),b.m(e,_));const D={};!k&&R[0]&128&&(k=!0,D.showTemplates=C[7],Xn(()=>k=!1)),y.$set(D)},i(C){w||(ze(b),ze(y.$$.fragment,C),w=!0)},o(C){Ue(b),Ue(y.$$.fragment,C),w=!1},d(C){C&&H(e),S&&S.d(),M[m].d(),gt(y)}}}const Yf=t=>t.field==="upstreams",Jf=t=>t.field==="path",Kf=t=>t.field==="path",Zf=t=>t.field==="path",Qf=t=>t.field==="upstreams";function E3(t,e,n){let s;Zt(t,xt,W=>n(12,s=W));let{params:i={}}=e,l=!1,o="",a=!0,u=!1,f=!1,h={path:"",upstreams:[{_uid:ol(),target:"",weight:100,priority:1}],headers:{add:{},remove:[],default:{}},body:{add:{},remove:[],replace:{},default:{}}},p=[],g=[],m=[],b=!1,_=null;async function y(){try{const W=await Zk(h),G=Jk(h.upstreams);n(8,p=W),n(9,g=G),n(10,m=[...W,...G]),n(11,b=m.length===0&&h.upstreams.length>0)}catch(W){console.error("Validation failed:",W),n(11,b=!1)}}let k=[],w=h.plugins?.[0]||null;function S(){n(1,k=[...k,{pattern:"",replacement:""}])}function P(W){n(1,k=k.filter((G,J)=>J!==W))}function M(){n(0,h.upstreams=[...h.upstreams,{_uid:ol(),target:"",weight:100,priority:h.upstreams.length+1}],h)}function x(W){if(h.upstreams.length<=1){alert(s("routeEditor.upstreamRequired"));return}n(0,h.upstreams=h.upstreams.filter((G,J)=>J!==W),h)}function A(W){const G=h.upstreams[W],J=JSON.parse(JSON.stringify(G));if(J._uid=ol(),J.target){const le=J.target.match(/^(.+?)(-\\d+)?$/);if(le){const[,se,N]=le;if(N){const te=parseInt(N.slice(1))+1;J.target=\`\${se}-\${te}\`}else J.target=\`\${se}-copy\`}else J.target=\`\${J.target}-copy\`}J.priority!==void 0&&(J.priority=Math.max(...h.upstreams.map(le=>le.priority||1))+1),n(0,h.upstreams=[...h.upstreams.slice(0,W+1),J,...h.upstreams.slice(W+1)],h)}async function O(){if(!b){Et.show(s("routeEditor.saveFailed",{values:{error:s("common.error")}}),"error");return}try{n(6,u=!0);const W={...h,upstreams:Xk(h.upstreams,[G=>G.priority??1]).map(({_uid:G,...J})=>J)};l?(await Ei.update(o,W),Et.show(s("routeEditor.routeUpdated"),"success")):(await Ei.create(W),Et.show(s("routeEditor.routeSaved"),"success")),Nl()}catch(W){Et.show(s("routeEditor.saveFailed",{values:{error:W.message}}),"error")}finally{n(6,u=!1)}}function C(){confirm(s("routeEditor.cancel")+"?")&&Nl()}function R(W){const G=W.detail;n(0,h={...h,...G,headers:G.headers||h.headers,body:G.body||h.body,upstreams:G.upstreams?.map(J=>({...J,_uid:ol(),headers:J.headers||{add:{},remove:[],default:{}},body:J.body||{add:{},remove:[],replace:{},default:{}}}))||h.upstreams}),n(2,w=h.plugins?.[0]||null),h.pathRewrite?n(1,k=Object.entries(h.pathRewrite).map(([J,le])=>({pattern:J,replacement:le}))):n(1,k=[]),Et.show(s("routeEditor.routeSaved"),"success")}ls(async()=>{if(i.path){n(3,l=!0),n(4,o=decodeURIComponent(i.path));try{const W=await Ei.get(o);W?(n(0,h=W),n(0,h.headers=h.headers||{add:{},remove:[],default:{}},h),n(0,h.body=h.body||{add:{},remove:[],replace:{},default:{}},h),n(0,h.upstreams=h.upstreams.map(G=>({...G,_uid:ol(),headers:G.headers||{add:{},remove:[],default:{}},body:G.body||{add:{},remove:[],replace:{},default:{}}})),h),h.pathRewrite&&n(1,k=Object.entries(h.pathRewrite).map(([G,J])=>({pattern:G,replacement:J}))),n(2,w=h.plugins?.[0]||null)):(Et.show(s("routes.noRoutes"),"error"),Nl())}catch(W){Et.show(s("routeEditor.saveFailed",{values:{error:W.message}}),"error"),Nl()}}n(5,a=!1)});const L=()=>n(7,f=!0);function D(){h.path=this.value,n(0,h),n(1,k),n(2,w)}function z(W,G){W[G].pattern=this.value,n(1,k),n(0,h),n(2,w)}function B(W,G){W[G].replacement=this.value,n(1,k),n(0,h),n(2,w)}const U=W=>P(W),F=W=>x(W),V=W=>A(W);function Y(W,G){t.$$.not_equal(h.upstreams[G],W)&&(h.upstreams[G]=W,n(0,h),n(1,k),n(2,w))}function j(W){w=W,n(2,w)}function q(W){t.$$.not_equal(h.headers,W)&&(h.headers=W,n(0,h),n(1,k),n(2,w))}function Q(W){t.$$.not_equal(h.body,W)&&(h.body=W,n(0,h),n(1,k),n(2,w))}function X(W){t.$$.not_equal(h.auth,W)&&(h.auth=W,n(0,h),n(1,k),n(2,w))}function re(W){t.$$.not_equal(h.failover,W)&&(h.failover=W,n(0,h),n(1,k),n(2,w))}function K(W){f=W,n(7,f)}return t.$$set=W=>{"params"in W&&n(21,i=W.params)},t.$$.update=()=>{if(t.$$.dirty[0]&3){!k.length&&h.pathRewrite&&n(1,k=Object.entries(h.pathRewrite||{}).map(([G,J])=>({pattern:G,replacement:J})));const W={};k.filter(G=>G.pattern.trim()).forEach(G=>{W[G.pattern]=G.replacement}),n(0,h.pathRewrite=Object.keys(W).length>0?W:void 0,h)}t.$$.dirty[0]&4&&n(0,h.plugins=w?[w]:void 0,h),t.$$.dirty[0]&4194305&&h&&(_&&clearTimeout(_),n(22,_=setTimeout(()=>{y()},300)))},[h,k,w,l,o,a,u,f,p,g,m,b,s,S,P,M,x,A,O,C,R,i,_,L,D,z,B,U,F,V,Y,j,q,Q,X,re,K]}class Zp extends Gt{constructor(e){super(),qt(this,e,E3,S3,Nt,{params:21},null,[-1,-1])}}function $f(t,e,n){const s=t.slice();return s[43]=e[n][0],s[44]=e[n][1],s}function eh(t,e,n){const s=t.slice();return s[43]=e[n][0],s[44]=e[n][1],s}function th(t,e,n){const s=t.slice();return s[43]=e[n][0],s[44]=e[n][1],s}function nh(t,e,n){const s=t.slice();s[52]=e[n],s[61]=n;const i=s[51].durations[s[61]];s[53]=i;const l=s[51].relativeTime[s[61]];s[54]=l;const o=s[53]/s[51].totalDuration*100;s[55]=o;const a=s[54]/s[51].totalDuration*100;s[56]=a;const u=c5(s[52].step);s[57]=u;const f=u5(s[52].step);s[58]=f;const h=(s[53]/s[51].totalDuration*100).toFixed(1);return s[59]=h,s}function sh(t,e,n){const s=t.slice();return s[62]=e[n],s}function pr(t){const e=t.slice(),n=e[27]();return e[51]=n,e}function ih(t,e,n){const s=t.slice();return s[52]=e[n],s}function T3(t){let e,n,s,i,l=t[24]("logs.detail.copyToClipboard")+"",o;return{c(){e=pe("svg"),n=pe("path"),s=v(),i=d("span"),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor"),c(i,"class","hidden md:inline")},m(a,u){I(a,e,u),r(e,n),I(a,s,u),I(a,i,u),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("logs.detail.copyToClipboard")+"")&&T(o,l)},d(a){a&&(H(e),H(s),H(i))}}}function M3(t){let e,n=t[24]("logs.detail.copied")+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","text-success")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.copied")+"")&&T(s,n)},d(i){i&&H(e)}}}function C3(t){let e;return{c(){e=d("span"),e.textContent="No steps recorded",c(e,"class","text-sm opacity-40")},m(n,s){I(n,e,s)},p:Ae,d(n){n&&H(e)}}}function P3(t){let e,n,s=tt(t[0].processingSteps.slice(0,3)),i=[];for(let o=0;o<s.length;o+=1)i[o]=lh(ih(t,s,o));let l=t[0].processingSteps.length>3&&oh(t);return{c(){for(let o=0;o<i.length;o+=1)i[o].c();e=v(),l&&l.c(),n=Zn()},m(o,a){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(o,a);I(o,e,a),l&&l.m(o,a),I(o,n,a)},p(o,a){if(a[0]&67108865){s=tt(o[0].processingSteps.slice(0,3));let u;for(u=0;u<s.length;u+=1){const f=ih(o,s,u);i[u]?i[u].p(f,a):(i[u]=lh(f),i[u].c(),i[u].m(e.parentNode,e))}for(;u<i.length;u+=1)i[u].d(1);i.length=s.length}o[0].processingSteps.length>3?l?l.p(o,a):(l=oh(o),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},d(o){o&&(H(e),H(n)),Tn(i,o),l&&l.d(o)}}}function lh(t){let e,n=t[26](t[52].step)+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-sm badge-outline")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[26](i[52].step)+"")&&T(s,n)},d(i){i&&H(e)}}}function oh(t){let e,n,s=t[0].processingSteps.length-3+"",i,l;return{c(){e=d("span"),n=E("+"),i=E(s),l=E(" more"),c(e,"class","badge badge-sm badge-ghost")},m(o,a){I(o,e,a),r(e,n),r(e,i),r(e,l)},p(o,a){a[0]&1&&s!==(s=o[0].processingSteps.length-3+"")&&T(i,s)},d(o){o&&H(e)}}}function rh(t){let e,n,s,i,l,o=t[24]("logs.detail.processingTimeline")+"",a,u,f,h=t[24]("logs.detail.totalSteps",{values:{count:t[0].processingSteps.length}})+"",p,g,m=t[24]("logs.detail.totalDuration",{values:{duration:ai(t[51].totalDuration)}})+"",b,_,y,k=(t[22]?t[24]("logs.detail.hideTimeline"):t[24]("logs.detail.showTimeline"))+"",w,S,P,M,x=t[22]&&ah(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=d("h4"),a=E(o),u=v(),f=d("p"),p=E(h),g=E(\`\uFF0C
21223
+ \`),b=E(m),_=v(),y=d("button"),w=E(k),S=v(),x&&x.c(),c(l,"class","card-title text-base"),c(f,"class","text-xs opacity-60 mt-1"),c(y,"class","btn btn-sm btn-ghost"),c(s,"class","flex items-center justify-between mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(A,O){I(A,e,O),r(e,n),r(n,s),r(s,i),r(i,l),r(l,a),r(i,u),r(i,f),r(f,p),r(f,g),r(f,b),r(s,_),r(s,y),r(y,w),r(n,S),x&&x.m(n,null),P||(M=ee(y,"click",t[31]),P=!0)},p(A,O){O[0]&16777216&&o!==(o=A[24]("logs.detail.processingTimeline")+"")&&T(a,o),O[0]&16777217&&h!==(h=A[24]("logs.detail.totalSteps",{values:{count:A[0].processingSteps.length}})+"")&&T(p,h),O[0]&16777216&&m!==(m=A[24]("logs.detail.totalDuration",{values:{duration:ai(A[51].totalDuration)}})+"")&&T(b,m),O[0]&20971520&&k!==(k=(A[22]?A[24]("logs.detail.hideTimeline"):A[24]("logs.detail.showTimeline"))+"")&&T(w,k),A[22]?x?x.p(A,O):(x=ah(A),x.c(),x.m(n,null)):x&&(x.d(1),x=null)},d(A){A&&H(e),x&&x.d(),P=!1,M()}}}function ah(t){let e,n,s,i,l,o,a,u,f,h,p=tt(t[0].processingSteps),g=[];for(let m=0;m<p.length;m+=1)g[m]=mh(nh(t,p,m));return{c(){e=d("div"),n=d("div"),s=d("span"),s.textContent="0ms",i=v(),l=d("div"),o=v(),a=d("span"),a.textContent=\`\${ai(t[51].totalDuration)}\`,u=v();for(let m=0;m<g.length;m+=1)g[m].c();f=v(),h=d("div"),h.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>',c(l,"class","flex-1 border-t border-dashed border-base-content/20"),c(a,"class","mr-32"),c(n,"class","mb-4 flex items-center gap-2 text-xs opacity-50 px-64"),c(e,"class","mt-4"),c(h,"class","mt-6 pt-4 border-t border-base-300")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(n,i),r(n,l),r(n,o),r(n,a),r(e,u);for(let _=0;_<g.length;_+=1)g[_]&&g[_].m(e,null);I(m,f,b),I(m,h,b)},p(m,b){if(b[0]&201326593){p=tt(m[0].processingSteps);let _;for(_=0;_<p.length;_+=1){const y=nh(m,p,_);g[_]?g[_].p(y,b):(g[_]=mh(y),g[_].c(),g[_].m(e,null))}for(;_<g.length;_+=1)g[_].d(1);g.length=p.length}},d(m){m&&(H(e),H(f),H(h)),Tn(g,m)}}}function uh(t){let e;return{c(){e=d("div"),c(e,"class","w-px bg-base-content opacity-20 flex-1 min-h-[2.5rem]")},m(n,s){I(n,e,s)},d(n){n&&H(e)}}}function ch(t){let e=t[52].detail.plugins&&Array.isArray(t[52].detail.plugins),n,s,i,l,o=e&&fh(t),a=t[52].detail.target&&dh(t),u=t[52].detail.level&&ph(t),f=t[52].detail.error&&gh(t);return{c(){o&&o.c(),n=v(),a&&a.c(),s=v(),u&&u.c(),i=v(),f&&f.c(),l=Zn()},m(h,p){o&&o.m(h,p),I(h,n,p),a&&a.m(h,p),I(h,s,p),u&&u.m(h,p),I(h,i,p),f&&f.m(h,p),I(h,l,p)},p(h,p){p[0]&1&&(e=h[52].detail.plugins&&Array.isArray(h[52].detail.plugins)),e?o?o.p(h,p):(o=fh(h),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null),h[52].detail.target?a?a.p(h,p):(a=dh(h),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),h[52].detail.level?u?u.p(h,p):(u=ph(h),u.c(),u.m(i.parentNode,i)):u&&(u.d(1),u=null),h[52].detail.error?f?f.p(h,p):(f=gh(h),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null)},d(h){h&&(H(n),H(s),H(i),H(l)),o&&o.d(h),a&&a.d(h),u&&u.d(h),f&&f.d(h)}}}function fh(t){let e,n=tt(t[52].detail.plugins),s=[];for(let i=0;i<n.length;i+=1)s[i]=hh(sh(t,n,i));return{c(){for(let i=0;i<s.length;i+=1)s[i].c();e=Zn()},m(i,l){for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,l);I(i,e,l)},p(i,l){if(l[0]&1){n=tt(i[52].detail.plugins);let o;for(o=0;o<n.length;o+=1){const a=sh(i,n,o);s[o]?s[o].p(a,l):(s[o]=hh(a),s[o].c(),s[o].m(e.parentNode,e))}for(;o<s.length;o+=1)s[o].d(1);s.length=n.length}},d(i){i&&H(e),Tn(s,i)}}}function hh(t){let e,n=t[62]+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-primary badge-outline")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[62]+"")&&T(s,n)},d(i){i&&H(e)}}}function dh(t){let e,n=t[52].detail.target+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-info badge-outline"),c(e,"title","Target upstream")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[52].detail.target+"")&&T(s,n)},d(i){i&&H(e)}}}function ph(t){let e,n=t[52].detail.level+"",s;return{c(){e=d("span"),s=E(n),c(e,"class","badge badge-xs badge-warning badge-outline")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&1&&n!==(n=i[52].detail.level+"")&&T(s,n)},d(i){i&&H(e)}}}function gh(t){let e,n,s;return{c(){e=d("span"),n=E("Error"),c(e,"class","badge badge-xs badge-error badge-outline"),c(e,"title",s=t[52].detail.error)},m(i,l){I(i,e,l),r(e,n)},p(i,l){l[0]&1&&s!==(s=i[52].detail.error)&&c(e,"title",s)},d(i){i&&H(e)}}}function A3(t){let e;return{c(){e=d("span"),e.textContent=\`\${t[59]}%\`,c(e,"class","text-xs text-white px-2 leading-7")},m(n,s){I(n,e,s)},p:Ae,d(n){n&&H(e)}}}function mh(t){let e,n,s,i,l,o,a,u,f,h=t[26](t[52].step)+"",p,g,m,b,_=t[57]+"",y,k,w,S,P,M,x,A,O,C,R,L,D,z,B,U,F=t[61]<t[0].processingSteps.length-1&&uh(),V=t[52].detail&&ch(t),Y=t[55]>5&&A3(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),o=v(),F&&F.c(),a=v(),u=d("div"),f=d("div"),p=E(h),g=v(),m=d("div"),b=d("span"),y=E(_),k=v(),V&&V.c(),w=v(),S=d("div"),P=d("div"),M=d("div"),Y&&Y.c(),O=v(),C=d("div"),R=d("div"),R.textContent=\`+\${t[54]}ms\`,L=v(),D=d("div"),D.textContent=\`\${ai(t[53])}\`,z=v(),B=d("div"),B.textContent=\`\${t[59]}%\`,U=v(),c(i,"class",l="w-3 h-3 rounded-full "+t[58]+" z-10"),c(s,"class","flex flex-col items-center"),c(f,"class","text-sm font-medium"),c(b,"class","badge badge-xs badge-ghost"),c(m,"class","text-xs opacity-50 mt-0.5 flex items-center gap-2 flex-wrap"),c(u,"class","flex-1 -mt-0.5"),c(n,"class","flex gap-3 shrink-0 w-64"),c(M,"class",x="absolute h-full "+t[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer"),Ma(M,"left",t[56]+"%"),Ma(M,"width",Math.max(t[55],1)+"%"),c(M,"title",A=t[52].step+": "+ai(t[53])+" ("+t[59]+"%)"),c(P,"class","w-full h-7 relative bg-base-300/30 rounded overflow-hidden"),c(S,"class","flex-1 flex items-center"),c(R,"class","opacity-60"),c(D,"class","font-semibold"),c(B,"class","opacity-40"),c(C,"class","shrink-0 w-32 text-xs space-y-0.5 font-mono"),c(e,"class","flex gap-4 group relative mb-3")},m(j,q){I(j,e,q),r(e,n),r(n,s),r(s,i),r(s,o),F&&F.m(s,null),r(n,a),r(n,u),r(u,f),r(f,p),r(u,g),r(u,m),r(m,b),r(b,y),r(m,k),V&&V.m(m,null),r(e,w),r(e,S),r(S,P),r(P,M),Y&&Y.m(M,null),r(e,O),r(e,C),r(C,R),r(C,L),r(C,D),r(C,z),r(C,B),r(e,U)},p(j,q){q[0]&1&&l!==(l="w-3 h-3 rounded-full "+j[58]+" z-10")&&c(i,"class",l),j[61]<j[0].processingSteps.length-1?F||(F=uh(),F.c(),F.m(s,null)):F&&(F.d(1),F=null),q[0]&1&&h!==(h=j[26](j[52].step)+"")&&T(p,h),q[0]&1&&_!==(_=j[57]+"")&&T(y,_),j[52].detail?V?V.p(j,q):(V=ch(j),V.c(),V.m(m,null)):V&&(V.d(1),V=null),j[55]>5&&Y.p(j,q),q[0]&1&&x!==(x="absolute h-full "+j[58]+" opacity-70 group-hover:opacity-90 transition-all cursor-pointer")&&c(M,"class",x),q[0]&1&&A!==(A=j[52].step+": "+ai(j[53])+" ("+j[59]+"%)")&&c(M,"title",A)},d(j){j&&H(e),F&&F.d(),V&&V.d(),Y&&Y.d()}}}function x3(t){let e,n,s=t[24]("logs.detail.path")+"",i,l,o,a=t[0].path+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),o=d("div"),u=E(a),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.path")+"")&&T(i,s),h[0]&1&&a!==(a=f[0].path+"")&&T(u,a)},d(f){f&&H(e)}}}function O3(t){let e,n,s=t[24]("logs.detail.originalPath")+"",i,l,o,a=t[0].path+"",u,f,h,p,g=t[24]("logs.detail.transformedPath")+"",m,b,_,y=t[0].transformedPath+"",k;return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),o=d("div"),u=E(a),f=v(),h=d("div"),p=d("div"),m=E(g),b=v(),_=d("div"),k=E(y),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all"),c(p,"class","text-xs opacity-60 mb-1"),c(_,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(w,S){I(w,e,S),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),I(w,f,S),I(w,h,S),r(h,p),r(p,m),r(h,b),r(h,_),r(_,k)},p(w,S){S[0]&16777216&&s!==(s=w[24]("logs.detail.originalPath")+"")&&T(i,s),S[0]&1&&a!==(a=w[0].path+"")&&T(u,a),S[0]&16777216&&g!==(g=w[24]("logs.detail.transformedPath")+"")&&T(m,g),S[0]&1&&y!==(y=w[0].transformedPath+"")&&T(k,y)},d(w){w&&(H(e),H(f),H(h))}}}function bh(t){let e,n,s=t[24]("logs.detail.query")+"",i,l,o,a=t[0].query+"",u;return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),o=d("div"),u=E(a),c(n,"class","text-xs opacity-60 mb-1"),c(o,"class","font-mono text-sm bg-base-300 p-2 rounded break-all")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.query")+"")&&T(i,s),h[0]&1&&a!==(a=f[0].query+"")&&T(u,a)},d(f){f&&H(e)}}}function _h(t){let e,n,s,i=t[24]("logs.detail.routePath")+"",l,o,a,u=t[0].routePath+"",f;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),f=E(u),c(s,"class","card-title text-base mb-2"),c(a,"class","font-mono text-sm"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,f)},p(h,p){p[0]&16777216&&i!==(i=h[24]("logs.detail.routePath")+"")&&T(l,i),p[0]&1&&u!==(u=h[0].routePath+"")&&T(f,u)},d(h){h&&H(e)}}}function vh(t){let e,n,s,i=t[24]("logs.detail.upstream")+"",l,o,a,u=t[0].upstream+"",f,h,p=t[0].transformer&&yh(t);return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),f=E(u),h=v(),p&&p.c(),c(s,"class","card-title text-base mb-2"),c(a,"class","font-mono text-sm mb-2"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(g,m){I(g,e,m),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,f),r(n,h),p&&p.m(n,null)},p(g,m){m[0]&16777216&&i!==(i=g[24]("logs.detail.upstream")+"")&&T(l,i),m[0]&1&&u!==(u=g[0].upstream+"")&&T(f,u),g[0].transformer?p?p.p(g,m):(p=yh(g),p.c(),p.m(n,null)):p&&(p.d(1),p=null)},d(g){g&&H(e),p&&p.d()}}}function yh(t){let e,n=t[24]("logs.detail.transformer")+"",s,i,l=t[0].transformer+"",o;return{c(){e=d("div"),s=E(n),i=E(": "),o=E(l),c(e,"class","text-xs opacity-60")},m(a,u){I(a,e,u),r(e,s),r(e,i),r(e,o)},p(a,u){u[0]&16777216&&n!==(n=a[24]("logs.detail.transformer")+"")&&T(s,n),u[0]&1&&l!==(l=a[0].transformer+"")&&T(o,l)},d(a){a&&H(e)}}}function wh(t){let e,n,s,i,l,o,a=t[24]("logs.detail.errorInfo")+"",u,f,h,p=t[0].errorMessage+"",g;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("div"),o=d("div"),u=E(a),f=v(),h=d("div"),g=E(p),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(o,"class","font-bold"),c(h,"class","font-mono text-sm"),c(e,"class","alert alert-error")},m(m,b){I(m,e,b),r(e,n),r(n,s),r(e,i),r(e,l),r(l,o),r(o,u),r(l,f),r(l,h),r(h,g)},p(m,b){b[0]&16777216&&a!==(a=m[24]("logs.detail.errorInfo")+"")&&T(u,a),b[0]&1&&p!==(p=m[0].errorMessage+"")&&T(g,p)},d(m){m&&H(e)}}}function kh(t){let e;function n(l,o){return l[0].originalReqHeaderId||l[0].originalReqBodyId?D3:R3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&H(e),i.d()}}}function R3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&T(s,n)},d(i){i&&H(e)}}}function D3(t){let e,n,s=t[0].originalReqHeaderId&&Sh(t),i=t[8]&&t[0].originalReqBodyId&&Th(t);return{c(){s&&s.c(),e=v(),i&&i.c(),n=Zn()},m(l,o){s&&s.m(l,o),I(l,e,o),i&&i.m(l,o),I(l,n,o)},p(l,o){l[0].originalReqHeaderId?s?s.p(l,o):(s=Sh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].originalReqBodyId?i?i.p(l,o):(i=Th(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(H(e),H(n)),s&&s.d(l),i&&i.d(l)}}}function Sh(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[17]?B3:f[19]?I3:f[15]!==null?H3:L3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function L3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&T(s,n)},d(i){i&&H(e)}}}function H3(t){let e,n,s,i,l,o=tt(Object.entries(t[15])),a=[];for(let u=0;u<o.length;u+=1)a[u]=Eh(th(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=v(),l=d("tbody");for(let u=0;u<a.length;u+=1)a[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(n,i),r(n,l);for(let h=0;h<a.length;h+=1)a[h]&&a[h].m(l,null)},p(u,f){if(f[0]&32768){o=tt(Object.entries(u[15]));let h;for(h=0;h<o.length;h+=1){const p=th(u,o,h);a[h]?a[h].p(p,f):(a[h]=Eh(p),a[h].c(),a[h].m(l,null))}for(;h<a.length;h+=1)a[h].d(1);a.length=o.length}},d(u){u&&H(e),Tn(a,u)}}}function I3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[19]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&524288&&T(s,i[19])},d(i){i&&H(e)}}}function B3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Eh(t){let e,n,s=t[43]+"",i,l,o,a=t[44]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=v(),o=d("td"),u=E(a),f=v(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){I(h,e,p),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f)},p(h,p){p[0]&32768&&s!==(s=h[43]+"")&&T(i,s),p[0]&32768&&a!==(a=h[44]+"")&&T(u,a)},d(h){h&&H(e)}}}function Th(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[18]?z3:f[20]?j3:f[16]!==null?N3:F3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function F3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&T(s,n)},d(i){i&&H(e)}}}function N3(t){let e,n=Yi(t[16])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&65536&&n!==(n=Yi(i[16])+"")&&T(s,n)},d(i){i&&H(e)}}}function j3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[20]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&1048576&&T(s,i[20])},d(i){i&&H(e)}}}function z3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Mh(t){let e;function n(l,o){return l[0].reqHeaderId||l[0].reqBodyId?V3:U3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&H(e),i.d()}}}function U3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&T(s,n)},d(i){i&&H(e)}}}function V3(t){let e,n,s=t[0].reqHeaderId&&Ch(t),i=t[8]&&t[0].reqBodyId&&Ah(t);return{c(){s&&s.c(),e=v(),i&&i.c(),n=Zn()},m(l,o){s&&s.m(l,o),I(l,e,o),i&&i.m(l,o),I(l,n,o)},p(l,o){l[0].reqHeaderId?s?s.p(l,o):(s=Ch(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].reqBodyId?i?i.p(l,o):(i=Ah(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(H(e),H(n)),s&&s.d(l),i&&i.d(l)}}}function Ch(t){let e,n,s=t[24]("logs.detail.requestHeaders")+"",i,l;function o(f,h){return f[11]?X3:f[13]?G3:f[9]!==null?q3:W3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestHeaders")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function W3(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&T(s,n)},d(i){i&&H(e)}}}function q3(t){let e,n,s,i,l,o=tt(Object.entries(t[9])),a=[];for(let u=0;u<o.length;u+=1)a[u]=Ph(eh(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=v(),l=d("tbody");for(let u=0;u<a.length;u+=1)a[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(n,i),r(n,l);for(let h=0;h<a.length;h+=1)a[h]&&a[h].m(l,null)},p(u,f){if(f[0]&512){o=tt(Object.entries(u[9]));let h;for(h=0;h<o.length;h+=1){const p=eh(u,o,h);a[h]?a[h].p(p,f):(a[h]=Ph(p),a[h].c(),a[h].m(l,null))}for(;h<a.length;h+=1)a[h].d(1);a.length=o.length}},d(u){u&&H(e),Tn(a,u)}}}function G3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[13]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&8192&&T(s,i[13])},d(i){i&&H(e)}}}function X3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Ph(t){let e,n,s=t[43]+"",i,l,o,a=t[44]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=v(),o=d("td"),u=E(a),f=v(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){I(h,e,p),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f)},p(h,p){p[0]&512&&s!==(s=h[43]+"")&&T(i,s),p[0]&512&&a!==(a=h[44]+"")&&T(u,a)},d(h){h&&H(e)}}}function Ah(t){let e,n,s=t[24]("logs.detail.requestBody")+"",i,l;function o(f,h){return f[4]?Z3:f[6]?K3:f[2]!==null?J3:Y3}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.requestBody")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function Y3(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&T(s,n)},d(i){i&&H(e)}}}function J3(t){let e,n=Yi(t[2])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&4&&n!==(n=Yi(i[2])+"")&&T(s,n)},d(i){i&&H(e)}}}function K3(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[6]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&64&&T(s,i[6])},d(i){i&&H(e)}}}function Z3(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function xh(t){let e;function n(l,o){return l[0].respHeaderId||l[0].respBodyId?$3:Q3}let s=n(t),i=s(t);return{c(){e=d("div"),i.c(),c(e,"class","space-y-4")},m(l,o){I(l,e,o),i.m(e,null)},p(l,o){s===(s=n(l))&&i?i.p(l,o):(i.d(1),i=s(l),i&&(i.c(),i.m(e,null)))},d(l){l&&H(e),i.d()}}}function Q3(t){let e,n=t[24]("logs.detail.noDataAvailable")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-center py-8 opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noDataAvailable")+"")&&T(s,n)},d(i){i&&H(e)}}}function $3(t){let e,n,s=t[0].respHeaderId&&Oh(t),i=t[8]&&t[0].respBodyId&&Dh(t);return{c(){s&&s.c(),e=v(),i&&i.c(),n=Zn()},m(l,o){s&&s.m(l,o),I(l,e,o),i&&i.m(l,o),I(l,n,o)},p(l,o){l[0].respHeaderId?s?s.p(l,o):(s=Oh(l),s.c(),s.m(e.parentNode,e)):s&&(s.d(1),s=null),l[8]&&l[0].respBodyId?i?i.p(l,o):(i=Dh(l),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},d(l){l&&(H(e),H(n)),s&&s.d(l),i&&i.d(l)}}}function Oh(t){let e,n,s=t[24]("logs.detail.responseHeaders")+"",i,l;function o(f,h){return f[12]?s5:f[14]?n5:f[10]!==null?t5:e5}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseHeaders")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function e5(t){let e,n=t[24]("logs.detail.noHeaders")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noHeaders")+"")&&T(s,n)},d(i){i&&H(e)}}}function t5(t){let e,n,s,i,l,o=tt(Object.entries(t[10])),a=[];for(let u=0;u<o.length;u+=1)a[u]=Rh($f(t,o,u));return{c(){e=d("div"),n=d("table"),s=d("thead"),s.innerHTML='<tr><th class="w-1/3">Name</th> <th>Value</th></tr>',i=v(),l=d("tbody");for(let u=0;u<a.length;u+=1)a[u].c();c(n,"class","table table-sm table-zebra"),c(e,"class","overflow-x-auto")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(n,i),r(n,l);for(let h=0;h<a.length;h+=1)a[h]&&a[h].m(l,null)},p(u,f){if(f[0]&1024){o=tt(Object.entries(u[10]));let h;for(h=0;h<o.length;h+=1){const p=$f(u,o,h);a[h]?a[h].p(p,f):(a[h]=Rh(p),a[h].c(),a[h].m(l,null))}for(;h<a.length;h+=1)a[h].d(1);a.length=o.length}},d(u){u&&H(e),Tn(a,u)}}}function n5(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[14]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&16384&&T(s,i[14])},d(i){i&&H(e)}}}function s5(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Rh(t){let e,n,s=t[43]+"",i,l,o,a=t[44]+"",u,f;return{c(){e=d("tr"),n=d("td"),i=E(s),l=v(),o=d("td"),u=E(a),f=v(),c(n,"class","font-mono text-xs"),c(o,"class","font-mono text-xs break-all")},m(h,p){I(h,e,p),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f)},p(h,p){p[0]&1024&&s!==(s=h[43]+"")&&T(i,s),p[0]&1024&&a!==(a=h[44]+"")&&T(u,a)},d(h){h&&H(e)}}}function Dh(t){let e,n,s=t[24]("logs.detail.responseBody")+"",i,l;function o(f,h){return f[5]?r5:f[7]?o5:f[3]!==null?l5:i5}let a=o(t),u=a(t);return{c(){e=d("div"),n=d("div"),i=E(s),l=v(),u.c(),c(n,"class","text-sm font-semibold mb-2")},m(f,h){I(f,e,h),r(e,n),r(n,i),r(e,l),u.m(e,null)},p(f,h){h[0]&16777216&&s!==(s=f[24]("logs.detail.responseBody")+"")&&T(i,s),a===(a=o(f))&&u?u.p(f,h):(u.d(1),u=a(f),u&&(u.c(),u.m(e,null)))},d(f){f&&H(e),u.d()}}}function i5(t){let e,n=t[24]("logs.detail.noBody")+"",s;return{c(){e=d("div"),s=E(n),c(e,"class","text-sm opacity-60")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&16777216&&n!==(n=i[24]("logs.detail.noBody")+"")&&T(s,n)},d(i){i&&H(e)}}}function l5(t){let e,n=Yi(t[3])+"",s;return{c(){e=d("pre"),s=E(n),c(e,"class","bg-base-300 p-4 rounded overflow-x-auto text-xs max-h-96")},m(i,l){I(i,e,l),r(e,s)},p(i,l){l[0]&8&&n!==(n=Yi(i[3])+"")&&T(s,n)},d(i){i&&H(e)}}}function o5(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[7]),c(n,"class","text-sm"),c(e,"class","alert alert-error")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l[0]&128&&T(s,i[7])},d(i){i&&H(e)}}}function r5(t){let e,n,s,i,l=t[24]("common.loading")+"",o;return{c(){e=d("div"),n=d("span"),s=v(),i=d("span"),o=E(l),c(n,"class","loading loading-spinner loading-sm"),c(i,"class","text-sm"),c(e,"class","flex items-center gap-2")},m(a,u){I(a,e,u),r(e,n),r(e,s),r(e,i),r(i,o)},p(a,u){u[0]&16777216&&l!==(l=a[24]("common.loading")+"")&&T(o,l)},d(a){a&&H(e)}}}function Lh(t){let e,n,s,i=t[24]("logs.detail.authInfo")+"",l,o,a,u,f,h=t[24]("logs.detail.authLevel")+"",p,g,m,b=t[0].authLevel+"",_,y,k,w,S=t[24]("logs.detail.authResult")+"",P,M,x,A=(t[0].authSuccess?t[24]("logs.detail.authSuccess"):t[24]("logs.detail.authFailed"))+"",O,C;return{c(){e=d("div"),n=d("div"),s=d("h4"),l=E(i),o=v(),a=d("div"),u=d("div"),f=d("div"),p=E(h),g=v(),m=d("div"),_=E(b),y=v(),k=d("div"),w=d("div"),P=E(S),M=v(),x=d("span"),O=E(A),c(s,"class","card-title text-base mb-2"),c(f,"class","text-xs opacity-60 mb-1"),c(m,"class","text-sm"),c(w,"class","text-xs opacity-60 mb-1"),c(x,"class",C="badge "+(t[0].authSuccess?"badge-success":"badge-error")),c(a,"class","grid grid-cols-2 gap-4"),c(n,"class","card-body p-4"),c(e,"class","card bg-base-200")},m(R,L){I(R,e,L),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,f),r(f,p),r(u,g),r(u,m),r(m,_),r(a,y),r(a,k),r(k,w),r(w,P),r(k,M),r(k,x),r(x,O)},p(R,L){L[0]&16777216&&i!==(i=R[24]("logs.detail.authInfo")+"")&&T(l,i),L[0]&16777216&&h!==(h=R[24]("logs.detail.authLevel")+"")&&T(p,h),L[0]&1&&b!==(b=R[0].authLevel+"")&&T(_,b),L[0]&16777216&&S!==(S=R[24]("logs.detail.authResult")+"")&&T(P,S),L[0]&16777217&&A!==(A=(R[0].authSuccess?R[24]("logs.detail.authSuccess"):R[24]("logs.detail.authFailed"))+"")&&T(O,A),L[0]&1&&C!==(C="badge "+(R[0].authSuccess?"badge-success":"badge-error"))&&c(x,"class",C)},d(R){R&&H(e)}}}function a5(t){let e,n,s,i,l=t[24]("logs.detail.title")+"",o,a,u,f,h,p,g,m,b,_,y,k=t[24]("logs.detail.downloadJson")+"",w,S,P,M,x,A,O,C,R,L=t[24]("logs.detail.overview")+"",D,z,B,U,F,V=t[24]("logs.detail.status")+"",Y,j,q,Q=t[0].status+"",X,re,K,W,G,J=t[24]("logs.detail.method")+"",le,se,N,te=t[0].method+"",Z,oe,Se,me,Ee=t[24]("logs.requestType")+"",ye,ge,be,He=t[25](t[0].requestType)+"",Te,Pe,_e,De,ke,$,ae=t[24]("logs.detail.duration")+"",ue,de,fe,Be=ai(t[0].duration)+"",Qe,We,Ye,nt,Je=t[24]("logs.detail.timestamp")+"",rt,lt,he,Re=Hh(t[0].timestamp)+"",Le,ot,Ge,Ie,Ve=t[24]("logs.detail.requestId")+"",we,Ke,ve,Xe=t[0].requestId+"",Ct,$e,je,At,it=t[24]("logs.detail.processingSteps")+"",mt,Lt,xe,at,Ne,st,jt,Rn,gn=t[24]("logs.detail.requestInfo")+"",Fe,ut,un,Rt,os,Mn,Un,zt,mn,Dn,cn,Ln,Sn,Pn,Ut,rs,Ht,sn=t[24]("logs.detail.tabOriginalRequest")+"",An,Fn,ln,Xt,Qn,Tt,bn=t[24]("logs.detail.tabFinalRequest")+"",$n,as,Yt,vt,es,It,ct=t[24]("logs.detail.tabResponse")+"",Vn,ys,wt,on,Qt,dn,Hn,ts,Jt;function _s(nn,Ce){return nn[23]?M3:T3}let _n=_s(t),fn=_n(t);function Nn(nn,Ce){return nn[0].processingSteps&&nn[0].processingSteps.length>0?P3:C3}let Wn=Nn(t),Kt=Wn(t),$t=t[0].processingSteps&&t[0].processingSteps.length>0&&rh(pr(t));function ns(nn,Ce){return nn[0].transformedPath&&nn[0].transformedPath!==nn[0].path?O3:x3}let us=ns(t),pn=us(t),en=t[0].query&&bh(t),Bt=t[0].routePath&&_h(t),dt=t[0].upstream&&vh(t),kt=t[0].errorMessage&&wh(t),ce=t[21]==="original"&&kh(t),Me=t[21]==="transformed"&&Mh(t),ft=t[21]==="response"&&xh(t),tn=t[0].authLevel&&Lh(t);return Hn=Fr(t[33][0]),{c(){e=d("div"),n=d("div"),s=d("div"),i=d("h3"),o=E(l),a=v(),u=d("div"),f=d("button"),fn.c(),p=v(),g=d("button"),m=pe("svg"),b=pe("path"),_=v(),y=d("span"),w=E(k),P=v(),M=d("button"),M.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>',x=v(),A=d("div"),O=d("div"),C=d("div"),R=d("h4"),D=E(L),z=v(),B=d("div"),U=d("div"),F=d("div"),Y=E(V),j=v(),q=d("span"),X=E(Q),K=v(),W=d("div"),G=d("div"),le=E(J),se=v(),N=d("span"),Z=E(te),oe=v(),Se=d("div"),me=d("div"),ye=E(Ee),ge=v(),be=d("span"),Te=E(He),De=v(),ke=d("div"),$=d("div"),ue=E(ae),de=v(),fe=d("div"),Qe=E(Be),We=v(),Ye=d("div"),nt=d("div"),rt=E(Je),lt=v(),he=d("div"),Le=E(Re),ot=v(),Ge=d("div"),Ie=d("div"),we=E(Ve),Ke=v(),ve=d("div"),Ct=E(Xe),$e=v(),je=d("div"),At=d("div"),mt=E(it),Lt=v(),xe=d("div"),Kt.c(),at=v(),$t&&$t.c(),Ne=v(),st=d("div"),jt=d("div"),Rn=d("h4"),Fe=E(gn),ut=v(),un=d("div"),pn.c(),Rt=v(),en&&en.c(),os=v(),Mn=d("div"),Bt&&Bt.c(),Un=v(),dt&&dt.c(),zt=v(),kt&&kt.c(),mn=v(),Dn=d("div"),cn=d("div"),Ln=d("div"),Sn=d("div"),Pn=d("label"),Ut=d("input"),rs=v(),Ht=d("span"),An=E(sn),Fn=v(),ln=d("label"),Xt=d("input"),Qn=v(),Tt=d("span"),$n=E(bn),as=v(),Yt=d("label"),vt=d("input"),es=v(),It=d("span"),Vn=E(ct),ys=v(),wt=d("div"),ce&&ce.c(),on=v(),Me&&Me.c(),Qt=v(),ft&&ft.c(),dn=v(),tn&&tn.c(),c(i,"id","modal-title"),c(i,"class","font-bold text-xl"),c(f,"class","btn btn-sm btn-ghost"),c(f,"title",h=t[24]("logs.detail.copyToClipboard")),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(y,"class","hidden md:inline"),c(g,"class","btn btn-sm btn-ghost"),c(g,"title",S=t[24]("logs.detail.downloadJson")),c(M,"class","btn btn-sm btn-circle btn-ghost"),c(u,"class","flex items-center gap-2"),c(s,"class","flex items-center justify-between px-6 py-4 border-b border-base-300"),c(R,"class","card-title text-base mb-3"),c(F,"class","text-xs opacity-60 mb-1"),c(q,"class",re="badge "+Ih(t[0].status)+" badge-lg"),c(G,"class","text-xs opacity-60 mb-1"),c(N,"class","badge badge-lg"),c(me,"class","text-xs opacity-60 mb-1"),c(be,"class",Pe="badge "+Bh(t[0].requestType)+" badge-lg"),c(be,"title",_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`)),c($,"class","text-xs opacity-60 mb-1"),c(fe,"class","font-semibold"),c(nt,"class","text-xs opacity-60 mb-1"),c(he,"class","text-sm"),c(Ie,"class","text-xs opacity-60 mb-1"),c(ve,"class","font-mono text-xs break-all"),c(Ge,"class","col-span-2"),c(At,"class","text-xs opacity-60 mb-1"),c(xe,"class","flex gap-2 flex-wrap"),c(je,"class","col-span-2 md:col-span-3 lg:col-span-6"),c(B,"class","grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"),c(C,"class","card-body p-4"),c(O,"class","card bg-base-200"),c(Rn,"class","card-title text-base mb-3"),c(un,"class","space-y-2"),c(jt,"class","card-body p-4"),c(st,"class","card bg-base-200"),c(Mn,"class","grid grid-cols-1 md:grid-cols-2 gap-4"),c(Ut,"class","sr-only"),c(Ut,"type","radio"),c(Ut,"name","activeTab"),Ut.__value="original",ne(Ut,Ut.__value),c(Ht,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(Ht,"bg-primary",t[21]==="original"),ie(Ht,"text-primary-content",t[21]==="original"),ie(Ht,"shadow",t[21]==="original"),ie(Ht,"text-gray-700",t[21]!=="original"),ie(Ht,"dark:text-gray-300",t[21]!=="original"),ie(Ht,"hover:text-gray-900",t[21]!=="original"),ie(Ht,"dark:hover:text-gray-100",t[21]!=="original"),c(Pn,"class","cursor-pointer"),c(Xt,"class","sr-only"),c(Xt,"type","radio"),c(Xt,"name","activeTab"),Xt.__value="transformed",ne(Xt,Xt.__value),c(Tt,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(Tt,"bg-primary",t[21]==="transformed"),ie(Tt,"text-primary-content",t[21]==="transformed"),ie(Tt,"shadow",t[21]==="transformed"),ie(Tt,"text-gray-700",t[21]!=="transformed"),ie(Tt,"dark:text-gray-300",t[21]!=="transformed"),ie(Tt,"hover:text-gray-900",t[21]!=="transformed"),ie(Tt,"dark:hover:text-gray-100",t[21]!=="transformed"),c(ln,"class","cursor-pointer"),c(vt,"class","sr-only"),c(vt,"type","radio"),c(vt,"name","activeTab"),vt.__value="response",ne(vt,vt.__value),c(It,"class","block px-4 py-1.5 text-sm font-medium rounded-md transition-all"),ie(It,"bg-primary",t[21]==="response"),ie(It,"text-primary-content",t[21]==="response"),ie(It,"shadow",t[21]==="response"),ie(It,"text-gray-700",t[21]!=="response"),ie(It,"dark:text-gray-300",t[21]!=="response"),ie(It,"hover:text-gray-900",t[21]!=="response"),ie(It,"dark:hover:text-gray-100",t[21]!=="response"),c(Yt,"class","cursor-pointer"),c(Sn,"class","inline-flex gap-1 p-1 bg-white dark:bg-gray-800 rounded-lg shadow-sm"),c(Ln,"class","p-2 border-b border-base-300 flex justify-center"),c(wt,"class","p-4"),c(cn,"class","card-body p-0"),c(Dn,"class","card bg-base-200"),c(A,"class","flex-1 overflow-y-auto px-6 py-4 space-y-6"),c(n,"class","modal-box max-w-6xl h-[90vh] flex flex-col p-0"),c(n,"role","dialog"),c(n,"aria-labelledby","modal-title"),c(n,"aria-modal","true"),c(e,"class","modal modal-open"),c(e,"role","presentation"),Hn.p(Ut,Xt,vt)},m(nn,Ce){I(nn,e,Ce),r(e,n),r(n,s),r(s,i),r(i,o),r(s,a),r(s,u),r(u,f),fn.m(f,null),r(u,p),r(u,g),r(g,m),r(m,b),r(g,_),r(g,y),r(y,w),r(u,P),r(u,M),r(n,x),r(n,A),r(A,O),r(O,C),r(C,R),r(R,D),r(C,z),r(C,B),r(B,U),r(U,F),r(F,Y),r(U,j),r(U,q),r(q,X),r(B,K),r(B,W),r(W,G),r(G,le),r(W,se),r(W,N),r(N,Z),r(B,oe),r(B,Se),r(Se,me),r(me,ye),r(Se,ge),r(Se,be),r(be,Te),r(B,De),r(B,ke),r(ke,$),r($,ue),r(ke,de),r(ke,fe),r(fe,Qe),r(B,We),r(B,Ye),r(Ye,nt),r(nt,rt),r(Ye,lt),r(Ye,he),r(he,Le),r(B,ot),r(B,Ge),r(Ge,Ie),r(Ie,we),r(Ge,Ke),r(Ge,ve),r(ve,Ct),r(B,$e),r(B,je),r(je,At),r(At,mt),r(je,Lt),r(je,xe),Kt.m(xe,null),r(A,at),$t&&$t.m(A,null),r(A,Ne),r(A,st),r(st,jt),r(jt,Rn),r(Rn,Fe),r(jt,ut),r(jt,un),pn.m(un,null),r(un,Rt),en&&en.m(un,null),r(A,os),r(A,Mn),Bt&&Bt.m(Mn,null),r(Mn,Un),dt&&dt.m(Mn,null),r(A,zt),kt&&kt.m(A,null),r(A,mn),r(A,Dn),r(Dn,cn),r(cn,Ln),r(Ln,Sn),r(Sn,Pn),r(Pn,Ut),Ut.checked=Ut.__value===t[21],r(Pn,rs),r(Pn,Ht),r(Ht,An),r(Sn,Fn),r(Sn,ln),r(ln,Xt),Xt.checked=Xt.__value===t[21],r(ln,Qn),r(ln,Tt),r(Tt,$n),r(Sn,as),r(Sn,Yt),r(Yt,vt),vt.checked=vt.__value===t[21],r(Yt,es),r(Yt,It),r(It,Vn),r(cn,ys),r(cn,wt),ce&&ce.m(wt,null),r(wt,on),Me&&Me.m(wt,null),r(wt,Qt),ft&&ft.m(wt,null),r(A,dn),tn&&tn.m(A,null),ts||(Jt=[ee(f,"click",t[29]),ee(g,"click",t[30]),ee(M,"click",function(){ui(t[1])&&t[1].apply(this,arguments)}),ee(Ut,"change",t[32]),ee(Xt,"change",t[34]),ee(vt,"change",t[35]),ee(e,"click",t[28]),ee(e,"keydown",t[36])],ts=!0)},p(nn,Ce){t=nn,Ce[0]&16777216&&l!==(l=t[24]("logs.detail.title")+"")&&T(o,l),_n===(_n=_s(t))&&fn?fn.p(t,Ce):(fn.d(1),fn=_n(t),fn&&(fn.c(),fn.m(f,null))),Ce[0]&16777216&&h!==(h=t[24]("logs.detail.copyToClipboard"))&&c(f,"title",h),Ce[0]&16777216&&k!==(k=t[24]("logs.detail.downloadJson")+"")&&T(w,k),Ce[0]&16777216&&S!==(S=t[24]("logs.detail.downloadJson"))&&c(g,"title",S),Ce[0]&16777216&&L!==(L=t[24]("logs.detail.overview")+"")&&T(D,L),Ce[0]&16777216&&V!==(V=t[24]("logs.detail.status")+"")&&T(Y,V),Ce[0]&1&&Q!==(Q=t[0].status+"")&&T(X,Q),Ce[0]&1&&re!==(re="badge "+Ih(t[0].status)+" badge-lg")&&c(q,"class",re),Ce[0]&16777216&&J!==(J=t[24]("logs.detail.method")+"")&&T(le,J),Ce[0]&1&&te!==(te=t[0].method+"")&&T(Z,te),Ce[0]&16777216&&Ee!==(Ee=t[24]("logs.requestType")+"")&&T(ye,Ee),Ce[0]&1&&He!==(He=t[25](t[0].requestType)+"")&&T(Te,He),Ce[0]&1&&Pe!==(Pe="badge "+Bh(t[0].requestType)+" badge-lg")&&c(be,"class",Pe),Ce[0]&16777217&&_e!==(_e=t[24](\`logs.requestType_\${t[0].requestType}_desc\`))&&c(be,"title",_e),Ce[0]&16777216&&ae!==(ae=t[24]("logs.detail.duration")+"")&&T(ue,ae),Ce[0]&1&&Be!==(Be=ai(t[0].duration)+"")&&T(Qe,Be),Ce[0]&16777216&&Je!==(Je=t[24]("logs.detail.timestamp")+"")&&T(rt,Je),Ce[0]&1&&Re!==(Re=Hh(t[0].timestamp)+"")&&T(Le,Re),Ce[0]&16777216&&Ve!==(Ve=t[24]("logs.detail.requestId")+"")&&T(we,Ve),Ce[0]&1&&Xe!==(Xe=t[0].requestId+"")&&T(Ct,Xe),Ce[0]&16777216&&it!==(it=t[24]("logs.detail.processingSteps")+"")&&T(mt,it),Wn===(Wn=Nn(t))&&Kt?Kt.p(t,Ce):(Kt.d(1),Kt=Wn(t),Kt&&(Kt.c(),Kt.m(xe,null))),t[0].processingSteps&&t[0].processingSteps.length>0?$t?$t.p(pr(t),Ce):($t=rh(pr(t)),$t.c(),$t.m(A,Ne)):$t&&($t.d(1),$t=null),Ce[0]&16777216&&gn!==(gn=t[24]("logs.detail.requestInfo")+"")&&T(Fe,gn),us===(us=ns(t))&&pn?pn.p(t,Ce):(pn.d(1),pn=us(t),pn&&(pn.c(),pn.m(un,Rt))),t[0].query?en?en.p(t,Ce):(en=bh(t),en.c(),en.m(un,null)):en&&(en.d(1),en=null),t[0].routePath?Bt?Bt.p(t,Ce):(Bt=_h(t),Bt.c(),Bt.m(Mn,Un)):Bt&&(Bt.d(1),Bt=null),t[0].upstream?dt?dt.p(t,Ce):(dt=vh(t),dt.c(),dt.m(Mn,null)):dt&&(dt.d(1),dt=null),t[0].errorMessage?kt?kt.p(t,Ce):(kt=wh(t),kt.c(),kt.m(A,mn)):kt&&(kt.d(1),kt=null),Ce[0]&2097152&&(Ut.checked=Ut.__value===t[21]),Ce[0]&16777216&&sn!==(sn=t[24]("logs.detail.tabOriginalRequest")+"")&&T(An,sn),Ce[0]&2097152&&ie(Ht,"bg-primary",t[21]==="original"),Ce[0]&2097152&&ie(Ht,"text-primary-content",t[21]==="original"),Ce[0]&2097152&&ie(Ht,"shadow",t[21]==="original"),Ce[0]&2097152&&ie(Ht,"text-gray-700",t[21]!=="original"),Ce[0]&2097152&&ie(Ht,"dark:text-gray-300",t[21]!=="original"),Ce[0]&2097152&&ie(Ht,"hover:text-gray-900",t[21]!=="original"),Ce[0]&2097152&&ie(Ht,"dark:hover:text-gray-100",t[21]!=="original"),Ce[0]&2097152&&(Xt.checked=Xt.__value===t[21]),Ce[0]&16777216&&bn!==(bn=t[24]("logs.detail.tabFinalRequest")+"")&&T($n,bn),Ce[0]&2097152&&ie(Tt,"bg-primary",t[21]==="transformed"),Ce[0]&2097152&&ie(Tt,"text-primary-content",t[21]==="transformed"),Ce[0]&2097152&&ie(Tt,"shadow",t[21]==="transformed"),Ce[0]&2097152&&ie(Tt,"text-gray-700",t[21]!=="transformed"),Ce[0]&2097152&&ie(Tt,"dark:text-gray-300",t[21]!=="transformed"),Ce[0]&2097152&&ie(Tt,"hover:text-gray-900",t[21]!=="transformed"),Ce[0]&2097152&&ie(Tt,"dark:hover:text-gray-100",t[21]!=="transformed"),Ce[0]&2097152&&(vt.checked=vt.__value===t[21]),Ce[0]&16777216&&ct!==(ct=t[24]("logs.detail.tabResponse")+"")&&T(Vn,ct),Ce[0]&2097152&&ie(It,"bg-primary",t[21]==="response"),Ce[0]&2097152&&ie(It,"text-primary-content",t[21]==="response"),Ce[0]&2097152&&ie(It,"shadow",t[21]==="response"),Ce[0]&2097152&&ie(It,"text-gray-700",t[21]!=="response"),Ce[0]&2097152&&ie(It,"dark:text-gray-300",t[21]!=="response"),Ce[0]&2097152&&ie(It,"hover:text-gray-900",t[21]!=="response"),Ce[0]&2097152&&ie(It,"dark:hover:text-gray-100",t[21]!=="response"),t[21]==="original"?ce?ce.p(t,Ce):(ce=kh(t),ce.c(),ce.m(wt,on)):ce&&(ce.d(1),ce=null),t[21]==="transformed"?Me?Me.p(t,Ce):(Me=Mh(t),Me.c(),Me.m(wt,Qt)):Me&&(Me.d(1),Me=null),t[21]==="response"?ft?ft.p(t,Ce):(ft=xh(t),ft.c(),ft.m(wt,null)):ft&&(ft.d(1),ft=null),t[0].authLevel?tn?tn.p(t,Ce):(tn=Lh(t),tn.c(),tn.m(A,null)):tn&&(tn.d(1),tn=null)},i:Ae,o:Ae,d(nn){nn&&H(e),fn.d(),Kt.d(),$t&&$t.d(),pn.d(),en&&en.d(),Bt&&Bt.d(),dt&&dt.d(),kt&&kt.d(),ce&&ce.d(),Me&&Me.d(),ft&&ft.d(),tn&&tn.d(),Hn.r(),ts=!1,ht(Jt)}}}function Hh(t){return new Date(t).toLocaleString()}function ai(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function Ih(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Bh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function Yi(t){return JSON.stringify(t,null,2)}function u5(t){const e=t.toLowerCase();return e.includes("auth")?"bg-blue-500":e.includes("plugin")?"bg-purple-500":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"bg-green-500":e.includes("transform")||e.includes("rewrite")?"bg-orange-500":e.includes("error")||e.includes("failed")?"bg-red-500":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"bg-yellow-500":"bg-base-content/30"}function c5(t){const e=t.toLowerCase();return e.includes("auth")?"Auth":e.includes("plugin")?"Plugin":e.includes("upstream")||e.includes("proxy")||e.includes("selected")?"Upstream":e.includes("transform")||e.includes("rewrite")?"Transform":e.includes("retry")||e.includes("recover")||e.includes("circuit")?"Retry":"Other"}function f5(t,e,n){let s;Zt(t,xt,N=>n(24,s=N));let{log:i}=e,{onClose:l}=e,o=null,a=null,u=!1,f=!1,h=null,p=null,g=!1,m=null,b=null,_=!1,y=!1,k=null,w=null,S=null,P=null,M=!1,x=!1,A=null,O=null,C="original",R=!1,L=!1;function D(N){return N?s(\`logs.requestType_\${N}\`):"-"}function z(N){const te=\`logs.steps.\${N}\`,Z=s(te);return Z===te?N.split("_").map(oe=>oe.charAt(0).toUpperCase()+oe.slice(1)).join(" "):Z}function B(){if(!i.processingSteps||i.processingSteps.length===0)return{durations:[],relativeTime:[],totalDuration:0};const N=i.processingSteps,te=N[0].timestamp,Z=N.map((me,Ee)=>Ee===N.length-1?i.duration-(me.timestamp-te):N[Ee+1].timestamp-me.timestamp),oe=N.map(me=>me.timestamp-te),Se=i.duration;return{durations:Z,relativeTime:oe,totalDuration:Se}}function U(N){N.target===N.currentTarget&&l()}async function F(){const N={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:P,requestHeaders:m,requestBody:o,responseHeaders:b,responseBody:a,processingSteps:i.processingSteps};try{await navigator.clipboard.writeText(JSON.stringify(N,null,2)),n(23,L=!0),setTimeout(()=>{n(23,L=!1)},2e3)}catch(te){console.error("Failed to copy:",te)}}async function V(){const N={requestId:i.requestId,timestamp:i.timestamp,method:i.method,path:i.path,status:i.status,duration:i.duration,originalRequestHeaders:S,originalRequestBody:P,requestHeaders:m,requestBody:o,responseHeaders:b,responseBody:a,processingSteps:i.processingSteps},te=new Blob([JSON.stringify(N,null,2)],{type:"application/json"}),Z=URL.createObjectURL(te),oe=document.createElement("a");oe.href=Z,oe.download=\`log-\${i.requestId}.json\`,oe.click(),URL.revokeObjectURL(Z)}async function Y(){if(!(!i.reqBodyId||o!==null)){n(4,u=!0),n(6,h=null);try{n(2,o=await ar(i.reqBodyId))}catch(N){n(6,h=N instanceof Error?N.message:"Failed to load request body")}finally{n(4,u=!1)}}}async function j(){if(!(!i.respBodyId||a!==null)){n(5,f=!0),n(7,p=null);try{n(3,a=await ar(i.respBodyId))}catch(N){n(7,p=N instanceof Error?N.message:"Failed to load response body")}finally{n(5,f=!1)}}}async function q(){if(!(!i.reqHeaderId||m!==null)){n(11,_=!0),n(13,k=null);try{n(9,m=await ur(i.reqHeaderId))}catch(N){n(13,k=N instanceof Error?N.message:"Failed to load request headers")}finally{n(11,_=!1)}}}async function Q(){if(!(!i.respHeaderId||b!==null)){n(12,y=!0),n(14,w=null);try{n(10,b=await ur(i.respHeaderId))}catch(N){n(14,w=N instanceof Error?N.message:"Failed to load response headers")}finally{n(12,y=!1)}}}async function X(){if(!(!i.originalReqHeaderId||S!==null)){n(17,M=!0),n(19,A=null);try{n(15,S=await ur(i.originalReqHeaderId))}catch(N){n(19,A=N instanceof Error?N.message:"Failed to load original request headers")}finally{n(17,M=!1)}}}async function re(){if(!(!i.originalReqBodyId||P!==null)){n(18,x=!0),n(20,O=null);try{n(16,P=await ar(i.originalReqBodyId))}catch(N){n(20,O=N instanceof Error?N.message:"Failed to load original request body")}finally{n(18,x=!1)}}}ls(async()=>{try{const N=await qr();n(8,g=N.logging?.body?.enabled||!1)}catch(N){console.error("Failed to load config:",N),n(8,g=!1)}i.originalReqHeaderId&&X(),i.originalReqBodyId&&re(),i.reqHeaderId&&q(),i.respHeaderId&&Q(),i.reqBodyId&&Y(),i.respBodyId&&j()});const K=[[]],W=()=>n(22,R=!R);function G(){C=this.__value,n(21,C)}function J(){C=this.__value,n(21,C)}function le(){C=this.__value,n(21,C)}const se=N=>N.key==="Escape"&&l();return t.$$set=N=>{"log"in N&&n(0,i=N.log),"onClose"in N&&n(1,l=N.onClose)},[i,l,o,a,u,f,h,p,g,m,b,_,y,k,w,S,P,M,x,A,O,C,R,L,s,D,z,B,U,F,V,W,G,K,J,le,se]}class h5 extends Gt{constructor(e){super(),qt(this,e,f5,a5,Nt,{log:0,onClose:1},null,[-1,-1,-1])}}function Fh(t,e,n){const s=t.slice();return s[51]=e[n],s}function d5(t){let e,n,s,i,l=t[22]("logs.startStream")+"",o;return{c(){e=pe("svg"),n=pe("path"),s=pe("path"),i=v(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(a,u){I(a,e,u),r(e,n),r(e,s),I(a,i,u),I(a,o,u)},p(a,u){u[0]&4194304&&l!==(l=a[22]("logs.startStream")+"")&&T(o,l)},d(a){a&&(H(e),H(i),H(o))}}}function p5(t){let e,n,s,i,l=t[22]("logs.stopStream")+"",o;return{c(){e=pe("svg"),n=pe("path"),s=pe("path"),i=v(),o=E(l),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","h-4 w-4"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"stroke","currentColor")},m(a,u){I(a,e,u),r(e,n),r(e,s),I(a,i,u),I(a,o,u)},p(a,u){u[0]&4194304&&l!==(l=a[22]("logs.stopStream")+"")&&T(o,l)},d(a){a&&(H(e),H(i),H(o))}}}function Nh(t){let e,n,s,i=t[22]("logs.activeFilters")+"",l;return{c(){e=d("span"),n=E(t[21]),s=v(),l=E(i),c(e,"class","badge badge-primary badge-sm")},m(o,a){I(o,e,a),r(e,n),r(e,s),r(e,l)},p(o,a){a[0]&2097152&&T(n,o[21]),a[0]&4194304&&i!==(i=o[22]("logs.activeFilters")+"")&&T(l,i)},d(o){o&&H(e)}}}function jh(t){let e,n,s,i=t[22]("logs.recentHours")+"",l,o,a,u,f;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=v(),a=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-recent-hours"),c(a,"id","logs-recent-hours"),c(a,"type","number"),c(a,"min","1"),c(a,"class","input input-bordered input-sm"),c(e,"class","form-control")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(s,l),r(e,o),r(e,a),ne(a,t[9]),u||(f=ee(a,"input",t[40]),u=!0)},p(h,p){p[0]&4194304&&i!==(i=h[22]("logs.recentHours")+"")&&T(l,i),p[0]&512&&yt(a.value)!==h[9]&&ne(a,h[9])},d(h){h&&H(e),u=!1,f()}}}function zh(t){let e,n,s,i=t[22]("logs.startTime")+"",l,o,a,u,f,h,p,g=t[22]("logs.endTime")+"",m,b,_,y,k;return{c(){e=d("div"),n=d("label"),s=d("span"),l=E(i),o=v(),a=d("input"),u=v(),f=d("div"),h=d("label"),p=d("span"),m=E(g),b=v(),_=d("input"),c(s,"class","label-text"),c(n,"class","label"),c(n,"for","logs-start-time"),c(a,"id","logs-start-time"),c(a,"type","datetime-local"),c(a,"class","input input-bordered input-sm"),c(e,"class","form-control"),c(p,"class","label-text"),c(h,"class","label"),c(h,"for","logs-end-time"),c(_,"id","logs-end-time"),c(_,"type","datetime-local"),c(_,"class","input input-bordered input-sm"),c(f,"class","form-control")},m(w,S){I(w,e,S),r(e,n),r(n,s),r(s,l),r(e,o),r(e,a),ne(a,t[10]),I(w,u,S),I(w,f,S),r(f,h),r(h,p),r(p,m),r(f,b),r(f,_),ne(_,t[11]),y||(k=[ee(a,"input",t[41]),ee(_,"input",t[42])],y=!0)},p(w,S){S[0]&4194304&&i!==(i=w[22]("logs.startTime")+"")&&T(l,i),S[0]&1024&&ne(a,w[10]),S[0]&4194304&&g!==(g=w[22]("logs.endTime")+"")&&T(m,g),S[0]&2048&&ne(_,w[11])},d(w){w&&(H(e),H(u),H(f)),y=!1,ht(k)}}}function g5(t){let e,n,s,i,l,o,a,u=t[22]("logs.time")+"",f,h,p,g=t[22]("logs.method")+"",m,b,_,y=t[22]("logs.path")+"",k,w,S,P=t[22]("logs.status")+"",M,x,A,O=t[22]("logs.requestType")+"",C,R,L,D=t[22]("logs.duration")+"",z,B,U,F=t[22]("logs.upstream")+"",V,Y,j,q=t[22]("logs.actions")+"",Q,X,re,K=[],W=new Map,G,J,le,se=t[22]("logs.showing",{values:{start:(t[0]-1)*oi+1,end:Math.min(t[0]*oi,t[13]),total:t[13]}})+"",N,te,Z,oe,Se,me,Ee,ye,ge=t[22]("logs.page",{values:{page:t[0],totalPages:t[14]}})+"",be,He,Te,Pe,_e,De,ke,$=tt(t[12]);const ae=ue=>ue[51].requestId;for(let ue=0;ue<$.length;ue+=1){let de=Fh(t,$,ue),fe=ae(de);W.set(fe,K[ue]=Uh(fe,de))}return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("table"),l=d("thead"),o=d("tr"),a=d("th"),f=E(u),h=v(),p=d("th"),m=E(g),b=v(),_=d("th"),k=E(y),w=v(),S=d("th"),M=E(P),x=v(),A=d("th"),C=E(O),R=v(),L=d("th"),z=E(D),B=v(),U=d("th"),V=E(F),Y=v(),j=d("th"),Q=E(q),X=v(),re=d("tbody");for(let ue=0;ue<K.length;ue+=1)K[ue].c();G=v(),J=d("div"),le=d("div"),N=E(se),te=v(),Z=d("div"),oe=d("button"),Se=E("\xAB"),Ee=v(),ye=d("button"),be=E(ge),He=v(),Te=d("button"),Pe=E("\xBB"),c(i,"class","table table-zebra table-sm"),c(s,"class","overflow-x-auto"),c(le,"class","text-sm"),c(oe,"class","join-item btn btn-sm"),oe.disabled=me=t[0]<=1,c(ye,"class","join-item btn btn-sm"),c(Te,"class","join-item btn btn-sm"),Te.disabled=_e=t[0]>=t[14],c(Z,"class","join"),c(J,"class","flex justify-between items-center p-4"),c(n,"class","card-body p-0"),c(e,"class","card bg-base-100 shadow-xl")},m(ue,de){I(ue,e,de),r(e,n),r(n,s),r(s,i),r(i,l),r(l,o),r(o,a),r(a,f),r(o,h),r(o,p),r(p,m),r(o,b),r(o,_),r(_,k),r(o,w),r(o,S),r(S,M),r(o,x),r(o,A),r(A,C),r(o,R),r(o,L),r(L,z),r(o,B),r(o,U),r(U,V),r(o,Y),r(o,j),r(j,Q),r(i,X),r(i,re);for(let fe=0;fe<K.length;fe+=1)K[fe]&&K[fe].m(re,null);r(n,G),r(n,J),r(J,le),r(le,N),r(J,te),r(J,Z),r(Z,oe),r(oe,Se),r(Z,Ee),r(Z,ye),r(ye,be),r(Z,He),r(Z,Te),r(Te,Pe),De||(ke=[ee(oe,"click",t[46]),ee(Te,"click",t[47])],De=!0)},p(ue,de){de[0]&4194304&&u!==(u=ue[22]("logs.time")+"")&&T(f,u),de[0]&4194304&&g!==(g=ue[22]("logs.method")+"")&&T(m,g),de[0]&4194304&&y!==(y=ue[22]("logs.path")+"")&&T(k,y),de[0]&4194304&&P!==(P=ue[22]("logs.status")+"")&&T(M,P),de[0]&4194304&&O!==(O=ue[22]("logs.requestType")+"")&&T(C,O),de[0]&4194304&&D!==(D=ue[22]("logs.duration")+"")&&T(z,D),de[0]&4194304&&F!==(F=ue[22]("logs.upstream")+"")&&T(V,F),de[0]&4194304&&q!==(q=ue[22]("logs.actions")+"")&&T(Q,q),de[0]&104861696&&($=tt(ue[12]),K=Nr(K,de,ae,1,ue,$,W,re,ug,Uh,null,Fh)),de[0]&4202497&&se!==(se=ue[22]("logs.showing",{values:{start:(ue[0]-1)*oi+1,end:Math.min(ue[0]*oi,ue[13]),total:ue[13]}})+"")&&T(N,se),de[0]&1&&me!==(me=ue[0]<=1)&&(oe.disabled=me),de[0]&4210689&&ge!==(ge=ue[22]("logs.page",{values:{page:ue[0],totalPages:ue[14]}})+"")&&T(be,ge),de[0]&16385&&_e!==(_e=ue[0]>=ue[14])&&(Te.disabled=_e)},d(ue){ue&&H(e);for(let de=0;de<K.length;de+=1)K[de].d();De=!1,ht(ke)}}}function m5(t){let e,n,s,i,l,o=t[22]("logs.noData")+"",a;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(n,"class","stroke-current shrink-0 w-6 h-6"),c(e,"class","alert alert-info")},m(u,f){I(u,e,f),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a)},p(u,f){f[0]&4194304&&o!==(o=u[22]("logs.noData")+"")&&T(a,o)},d(u){u&&H(e)}}}function b5(t){let e,n,s,i,l,o=t[22]("common.error")+"",a,u,f;return{c(){e=d("div"),n=pe("svg"),s=pe("path"),i=v(),l=d("span"),a=E(o),u=E(": "),f=E(t[16]),c(s,"stroke-linecap","round"),c(s,"stroke-linejoin","round"),c(s,"stroke-width","2"),c(s,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(n,"xmlns","http://www.w3.org/2000/svg"),c(n,"class","stroke-current shrink-0 h-6 w-6"),c(n,"fill","none"),c(n,"viewBox","0 0 24 24"),c(e,"class","alert alert-error")},m(h,p){I(h,e,p),r(e,n),r(n,s),r(e,i),r(e,l),r(l,a),r(l,u),r(l,f)},p(h,p){p[0]&4194304&&o!==(o=h[22]("common.error")+"")&&T(a,o),p[0]&65536&&T(f,h[16])},d(h){h&&H(e)}}}function _5(t){let e;return{c(){e=d("div"),e.innerHTML='<span class="loading loading-spinner loading-lg"></span>',c(e,"class","flex justify-center items-center h-64")},m(n,s){I(n,e,s)},p:Ae,d(n){n&&H(e)}}}function Uh(t,e){let n,s,i=Wh(e[51].timestamp)+"",l,o,a,u,f=e[51].method+"",h,p,g,m=e[51].path+"",b,_,y,k,w,S=e[51].status+"",P,M,x,A,O,C=e[26](e[51].requestType)+"",R,L,D,z,B,U=qh(e[51].duration)+"",F,V,Y,j=(e[51].upstream||"-")+"",q,Q,X,re,K,W=e[22]("logs.viewDetail")+"",G,J,le,se;function N(){return e[45](e[51])}return{key:t,first:null,c(){n=d("tr"),s=d("td"),l=E(i),o=v(),a=d("td"),u=d("span"),h=E(f),p=v(),g=d("td"),b=E(m),y=v(),k=d("td"),w=d("span"),P=E(S),x=v(),A=d("td"),O=d("span"),R=E(C),z=v(),B=d("td"),F=E(U),V=v(),Y=d("td"),q=E(j),X=v(),re=d("td"),K=d("button"),G=E(W),J=v(),c(s,"class","text-xs"),c(u,"class","badge badge-sm"),c(g,"class","font-mono text-xs truncate max-w-xs"),c(g,"title",_=e[51].path),c(w,"class",M="badge badge-sm "+Gh(e[51].status)),c(O,"class",L="badge badge-sm "+Xh(e[51].requestType)),c(O,"title",D=e[22](\`logs.requestType_\${e[51].requestType}_desc\`)),c(B,"class","text-xs"),c(Y,"class","text-xs truncate max-w-xs"),c(Y,"title",Q=e[51].upstream||"-"),c(K,"class","btn btn-xs btn-ghost"),c(n,"class","hover"),this.first=n},m(te,Z){I(te,n,Z),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),r(u,h),r(n,p),r(n,g),r(g,b),r(n,y),r(n,k),r(k,w),r(w,P),r(n,x),r(n,A),r(A,O),r(O,R),r(n,z),r(n,B),r(B,F),r(n,V),r(n,Y),r(Y,q),r(n,X),r(n,re),r(re,K),r(K,G),r(n,J),le||(se=ee(K,"click",N),le=!0)},p(te,Z){e=te,Z[0]&4096&&i!==(i=Wh(e[51].timestamp)+"")&&T(l,i),Z[0]&4096&&f!==(f=e[51].method+"")&&T(h,f),Z[0]&4096&&m!==(m=e[51].path+"")&&T(b,m),Z[0]&4096&&_!==(_=e[51].path)&&c(g,"title",_),Z[0]&4096&&S!==(S=e[51].status+"")&&T(P,S),Z[0]&4096&&M!==(M="badge badge-sm "+Gh(e[51].status))&&c(w,"class",M),Z[0]&4096&&C!==(C=e[26](e[51].requestType)+"")&&T(R,C),Z[0]&4096&&L!==(L="badge badge-sm "+Xh(e[51].requestType))&&c(O,"class",L),Z[0]&4198400&&D!==(D=e[22](\`logs.requestType_\${e[51].requestType}_desc\`))&&c(O,"title",D),Z[0]&4096&&U!==(U=qh(e[51].duration)+"")&&T(F,U),Z[0]&4096&&j!==(j=(e[51].upstream||"-")+"")&&T(q,j),Z[0]&4096&&Q!==(Q=e[51].upstream||"-")&&c(Y,"title",Q),Z[0]&4194304&&W!==(W=e[22]("logs.viewDetail")+"")&&T(G,W)},d(te){te&&H(n),le=!1,se()}}}function Vh(t){let e,n;return e=new h5({props:{log:t[17],onClose:t[48]}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i[0]&131072&&(l.log=s[17]),i[0]&393216&&(l.onClose=s[48]),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function v5(t){let e,n,s,i=t[22]("logs.title")+"",l,o,a,u,f,h,p,g,m,b,_,y=t[22]("logs.export")+"",k,w,S,P,M,x,A,O,C,R,L,D,z,B,U=t[22]("logs.filters")+"",F,V,Y,j,q=t[22]("logs.clearFilters")+"",Q,X,re,K,W,G,J,le=t[22]("logs.searchTerm")+"",se,N,te,Z,oe,Se,me,Ee,ye=t[22]("logs.method")+"",ge,be,He,Te,Pe=t[22]("logs.allMethods")+"",_e,De,ke,$,ae,ue,de,fe,Be,Qe,We=t[22]("logs.status")+"",Ye,nt,Je,rt,lt,he,Re,Le,ot=t[22]("logs.result")+"",Ge,Ie,Ve,we,Ke=t[22]("logs.allResults")+"",ve,Xe,Ct=t[22]("logs.success")+"",$e,je,At=t[22]("logs.failed")+"",it,mt,Lt,xe,at,Ne,st=t[22]("logs.advancedFilters")+"",jt,Rn,gn,Fe,ut,un,Rt,os=t[22]("logs.requestTypeFilter")+"",Mn,Un,zt,mn,Dn=t[22]("logs.requestType_all")+"",cn,Ln,Sn=t[22]("logs.requestType_final")+"",Pn,Ut,rs=t[22]("logs.requestType_retry")+"",Ht,sn,An=t[22]("logs.requestType_recovery")+"",Fn,ln,Xt,Qn,Tt,bn=t[22]("logs.timeRange")+"",$n,as,Yt,vt,es=t[22]("logs.allTime")+"",It,ct,Vn=t[22]("logs.recentTime")+"",ys,wt,on=t[22]("logs.customTime")+"",Qt,dn,Hn,ts,Jt,_s,_n,fn=t[22]("logs.sortBy")+"",Nn,Wn,Kt,$t,ns=t[22]("logs.sortByTimestamp")+"",us,pn,en=t[22]("logs.sortByDuration")+"",Bt,dt,kt=t[22]("logs.sortByStatus")+"",ce,Me,ft,tn,nn,Ce=t[22]("logs.sortOrder")+"",ss,vn,qn,As,zs=t[22]("logs.desc")+"",gi,xs,mi=t[22]("logs.asc")+"",In,jn,qe,et,St,Uo,ka;function Sa(Oe,Ze){return Oe[19]?p5:d5}let Bl=Sa(t),Os=Bl(t),cs=t[21]>0&&Nh(t),fs=t[8]==="recent"&&jh(t),hs=t[8]==="custom"&&zh(t);function Ea(Oe,Ze){return Oe[15]&&Oe[12].length===0?_5:Oe[16]?b5:Oe[12].length===0?m5:g5}let Fl=Ea(t),Rs=Fl(t),Bn=t[18]&&t[17]&&Vh(t);return{c(){e=d("div"),n=d("div"),s=d("h1"),l=E(i),o=v(),a=d("div"),u=d("button"),Os.c(),h=v(),p=d("div"),g=d("div"),m=pe("svg"),b=pe("path"),_=v(),k=E(y),w=v(),S=d("ul"),P=d("li"),M=d("button"),M.textContent="JSON",x=v(),A=d("li"),O=d("button"),O.textContent="CSV",C=v(),R=d("div"),L=d("div"),D=d("div"),z=d("div"),B=d("h2"),F=E(U),V=v(),cs&&cs.c(),Y=v(),j=d("button"),Q=E(q),re=v(),K=d("div"),W=d("div"),G=d("label"),J=d("span"),se=E(le),N=v(),te=d("input"),oe=v(),Se=d("div"),me=d("label"),Ee=d("span"),ge=E(ye),be=v(),He=d("select"),Te=d("option"),_e=E(Pe),De=d("option"),De.textContent="GET",ke=d("option"),ke.textContent="POST",$=d("option"),$.textContent="PUT",ae=d("option"),ae.textContent="DELETE",ue=d("option"),ue.textContent="PATCH",de=v(),fe=d("div"),Be=d("label"),Qe=d("span"),Ye=E(We),nt=v(),Je=d("input"),lt=v(),he=d("div"),Re=d("label"),Le=d("span"),Ge=E(ot),Ie=v(),Ve=d("select"),we=d("option"),ve=E(Ke),Xe=d("option"),$e=E(Ct),je=d("option"),it=E(At),mt=v(),Lt=d("div"),xe=d("input"),at=v(),Ne=d("div"),jt=E(st),Rn=v(),gn=d("div"),Fe=d("div"),ut=d("div"),un=d("label"),Rt=d("span"),Mn=E(os),Un=v(),zt=d("select"),mn=d("option"),cn=E(Dn),Ln=d("option"),Pn=E(Sn),Ut=d("option"),Ht=E(rs),sn=d("option"),Fn=E(An),ln=v(),Xt=d("div"),Qn=d("label"),Tt=d("span"),$n=E(bn),as=v(),Yt=d("select"),vt=d("option"),It=E(es),ct=d("option"),ys=E(Vn),wt=d("option"),Qt=E(on),dn=v(),fs&&fs.c(),Hn=v(),hs&&hs.c(),ts=v(),Jt=d("div"),_s=d("label"),_n=d("span"),Nn=E(fn),Wn=v(),Kt=d("select"),$t=d("option"),us=E(ns),pn=d("option"),Bt=E(en),dt=d("option"),ce=E(kt),Me=v(),ft=d("div"),tn=d("label"),nn=d("span"),ss=E(Ce),vn=v(),qn=d("select"),As=d("option"),gi=E(zs),xs=d("option"),In=E(mi),jn=v(),Rs.c(),qe=v(),Bn&&Bn.c(),et=Zn(),c(s,"class","text-3xl font-bold"),c(u,"class",f="btn btn-sm "+(t[19]?"btn-error":"btn-primary")),c(b,"stroke-linecap","round"),c(b,"stroke-linejoin","round"),c(b,"stroke-width","2"),c(b,"d","M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"),c(m,"xmlns","http://www.w3.org/2000/svg"),c(m,"class","h-4 w-4"),c(m,"fill","none"),c(m,"viewBox","0 0 24 24"),c(m,"stroke","currentColor"),c(g,"role","button"),c(g,"tabindex","0"),c(g,"class","btn btn-sm btn-secondary"),c(S,"role","menu"),c(S,"tabindex","0"),c(S,"class","dropdown-content menu p-2 shadow bg-base-100 rounded-box w-32 top-[3em]"),c(p,"class","dropdown dropdown-end z-[1]"),c(a,"class","flex gap-2"),c(n,"class","flex justify-between items-center mb-6"),c(B,"class","card-title text-lg"),c(z,"class","flex items-center gap-2"),c(j,"class","btn btn-sm btn-ghost"),j.disabled=X=t[21]===0,c(D,"class","flex justify-between items-center mb-4"),c(J,"class","label-text"),c(G,"class","label"),c(G,"for","logs-search"),c(te,"id","logs-search"),c(te,"type","text"),c(te,"placeholder",Z=t[22]("logs.searchPlaceholder")),c(te,"class","input input-bordered input-sm"),c(W,"class","form-control"),c(Ee,"class","label-text"),c(me,"class","label"),c(me,"for","logs-method"),Te.__value="",ne(Te,Te.__value),De.__value="GET",ne(De,De.__value),ke.__value="POST",ne(ke,ke.__value),$.__value="PUT",ne($,$.__value),ae.__value="DELETE",ne(ae,ae.__value),ue.__value="PATCH",ne(ue,ue.__value),c(He,"id","logs-method"),c(He,"class","select select-bordered select-sm"),t[2]===void 0&&vs(()=>t[34].call(He)),c(Se,"class","form-control"),c(Qe,"class","label-text"),c(Be,"class","label"),c(Be,"for","logs-status"),c(Je,"id","logs-status"),c(Je,"type","text"),c(Je,"placeholder",rt=t[22]("logs.statusPlaceholder")),c(Je,"class","input input-bordered input-sm"),c(fe,"class","form-control"),c(Le,"class","label-text"),c(Re,"class","label"),c(Re,"for","logs-result"),we.__value=void 0,ne(we,we.__value),Xe.__value=!0,ne(Xe,Xe.__value),je.__value=!1,ne(je,je.__value),c(Ve,"id","logs-result"),c(Ve,"class","select select-bordered select-sm"),t[4]===void 0&&vs(()=>t[36].call(Ve)),c(he,"class","form-control"),c(K,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-4"),c(xe,"type","checkbox"),c(xe,"class","peer"),c(Ne,"class","collapse-title text-sm font-medium"),c(Rt,"class","label-text"),c(un,"class","label"),c(un,"for","logs-request-type"),mn.__value="",ne(mn,mn.__value),Ln.__value="final",ne(Ln,Ln.__value),Ut.__value="retry",ne(Ut,Ut.__value),sn.__value="recovery",ne(sn,sn.__value),c(zt,"id","logs-request-type"),c(zt,"class","select select-bordered select-sm"),t[5]===void 0&&vs(()=>t[38].call(zt)),c(ut,"class","form-control"),c(Tt,"class","label-text"),c(Qn,"class","label"),c(Qn,"for","logs-time-range"),vt.__value="all",ne(vt,vt.__value),ct.__value="recent",ne(ct,ct.__value),wt.__value="custom",ne(wt,wt.__value),c(Yt,"id","logs-time-range"),c(Yt,"class","select select-bordered select-sm"),t[8]===void 0&&vs(()=>t[39].call(Yt)),c(Xt,"class","form-control"),c(_n,"class","label-text"),c(_s,"class","label"),c(_s,"for","logs-sort-by"),$t.__value="timestamp",ne($t,$t.__value),pn.__value="duration",ne(pn,pn.__value),dt.__value="status",ne(dt,dt.__value),c(Kt,"id","logs-sort-by"),c(Kt,"class","select select-bordered select-sm"),t[6]===void 0&&vs(()=>t[43].call(Kt)),c(Jt,"class","form-control"),c(nn,"class","label-text"),c(tn,"class","label"),c(tn,"for","logs-sort-order"),As.__value="desc",ne(As,As.__value),xs.__value="asc",ne(xs,xs.__value),c(qn,"id","logs-sort-order"),c(qn,"class","select select-bordered select-sm"),t[7]===void 0&&vs(()=>t[44].call(qn)),c(ft,"class","form-control"),c(Fe,"class","grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 pt-4"),c(gn,"class","collapse-content"),c(Lt,"class","collapse collapse-arrow bg-base-200"),c(L,"class","card-body"),c(R,"class","card bg-base-100 shadow-xl mb-6"),c(e,"class","p-6")},m(Oe,Ze){I(Oe,e,Ze),r(e,n),r(n,s),r(s,l),r(n,o),r(n,a),r(a,u),Os.m(u,null),r(a,h),r(a,p),r(p,g),r(g,m),r(m,b),r(g,_),r(g,k),r(p,w),r(p,S),r(S,P),r(P,M),r(S,x),r(S,A),r(A,O),r(e,C),r(e,R),r(R,L),r(L,D),r(D,z),r(z,B),r(B,F),r(z,V),cs&&cs.m(z,null),r(D,Y),r(D,j),r(j,Q),r(L,re),r(L,K),r(K,W),r(W,G),r(G,J),r(J,se),r(W,N),r(W,te),ne(te,t[1]),r(K,oe),r(K,Se),r(Se,me),r(me,Ee),r(Ee,ge),r(Se,be),r(Se,He),r(He,Te),r(Te,_e),r(He,De),r(He,ke),r(He,$),r(He,ae),r(He,ue),Cn(He,t[2],!0),r(K,de),r(K,fe),r(fe,Be),r(Be,Qe),r(Qe,Ye),r(fe,nt),r(fe,Je),ne(Je,t[3]),r(K,lt),r(K,he),r(he,Re),r(Re,Le),r(Le,Ge),r(he,Ie),r(he,Ve),r(Ve,we),r(we,ve),r(Ve,Xe),r(Xe,$e),r(Ve,je),r(je,it),Cn(Ve,t[4],!0),r(L,mt),r(L,Lt),r(Lt,xe),xe.checked=t[20],r(Lt,at),r(Lt,Ne),r(Ne,jt),r(Lt,Rn),r(Lt,gn),r(gn,Fe),r(Fe,ut),r(ut,un),r(un,Rt),r(Rt,Mn),r(ut,Un),r(ut,zt),r(zt,mn),r(mn,cn),r(zt,Ln),r(Ln,Pn),r(zt,Ut),r(Ut,Ht),r(zt,sn),r(sn,Fn),Cn(zt,t[5],!0),r(Fe,ln),r(Fe,Xt),r(Xt,Qn),r(Qn,Tt),r(Tt,$n),r(Xt,as),r(Xt,Yt),r(Yt,vt),r(vt,It),r(Yt,ct),r(ct,ys),r(Yt,wt),r(wt,Qt),Cn(Yt,t[8],!0),r(Fe,dn),fs&&fs.m(Fe,null),r(Fe,Hn),hs&&hs.m(Fe,null),r(Fe,ts),r(Fe,Jt),r(Jt,_s),r(_s,_n),r(_n,Nn),r(Jt,Wn),r(Jt,Kt),r(Kt,$t),r($t,us),r(Kt,pn),r(pn,Bt),r(Kt,dt),r(dt,ce),Cn(Kt,t[6],!0),r(Fe,Me),r(Fe,ft),r(ft,tn),r(tn,nn),r(nn,ss),r(ft,vn),r(ft,qn),r(qn,As),r(As,gi),r(qn,xs),r(xs,In),Cn(qn,t[7],!0),r(e,jn),Rs.m(e,null),I(Oe,qe,Ze),Bn&&Bn.m(Oe,Ze),I(Oe,et,Ze),St=!0,Uo||(ka=[ee(u,"click",t[24]),ee(M,"click",t[31]),ee(O,"click",t[32]),ee(j,"click",t[27]),ee(te,"input",t[33]),ee(He,"change",t[34]),ee(Je,"input",t[35]),ee(Ve,"change",t[36]),ee(xe,"change",t[37]),ee(xe,"change",t[28]),ee(zt,"change",t[38]),ee(Yt,"change",t[39]),ee(Kt,"change",t[43]),ee(qn,"change",t[44])],Uo=!0)},p(Oe,Ze){(!St||Ze[0]&4194304)&&i!==(i=Oe[22]("logs.title")+"")&&T(l,i),Bl===(Bl=Sa(Oe))&&Os?Os.p(Oe,Ze):(Os.d(1),Os=Bl(Oe),Os&&(Os.c(),Os.m(u,null))),(!St||Ze[0]&524288&&f!==(f="btn btn-sm "+(Oe[19]?"btn-error":"btn-primary")))&&c(u,"class",f),(!St||Ze[0]&4194304)&&y!==(y=Oe[22]("logs.export")+"")&&T(k,y),(!St||Ze[0]&4194304)&&U!==(U=Oe[22]("logs.filters")+"")&&T(F,U),Oe[21]>0?cs?cs.p(Oe,Ze):(cs=Nh(Oe),cs.c(),cs.m(z,null)):cs&&(cs.d(1),cs=null),(!St||Ze[0]&4194304)&&q!==(q=Oe[22]("logs.clearFilters")+"")&&T(Q,q),(!St||Ze[0]&2097152&&X!==(X=Oe[21]===0))&&(j.disabled=X),(!St||Ze[0]&4194304)&&le!==(le=Oe[22]("logs.searchTerm")+"")&&T(se,le),(!St||Ze[0]&4194304&&Z!==(Z=Oe[22]("logs.searchPlaceholder")))&&c(te,"placeholder",Z),Ze[0]&2&&te.value!==Oe[1]&&ne(te,Oe[1]),(!St||Ze[0]&4194304)&&ye!==(ye=Oe[22]("logs.method")+"")&&T(ge,ye),(!St||Ze[0]&4194304)&&Pe!==(Pe=Oe[22]("logs.allMethods")+"")&&T(_e,Pe),Ze[0]&4&&Cn(He,Oe[2]),(!St||Ze[0]&4194304)&&We!==(We=Oe[22]("logs.status")+"")&&T(Ye,We),(!St||Ze[0]&4194304&&rt!==(rt=Oe[22]("logs.statusPlaceholder")))&&c(Je,"placeholder",rt),Ze[0]&8&&Je.value!==Oe[3]&&ne(Je,Oe[3]),(!St||Ze[0]&4194304)&&ot!==(ot=Oe[22]("logs.result")+"")&&T(Ge,ot),(!St||Ze[0]&4194304)&&Ke!==(Ke=Oe[22]("logs.allResults")+"")&&T(ve,Ke),(!St||Ze[0]&4194304)&&Ct!==(Ct=Oe[22]("logs.success")+"")&&T($e,Ct),(!St||Ze[0]&4194304)&&At!==(At=Oe[22]("logs.failed")+"")&&T(it,At),Ze[0]&16&&Cn(Ve,Oe[4]),Ze[0]&1048576&&(xe.checked=Oe[20]),(!St||Ze[0]&4194304)&&st!==(st=Oe[22]("logs.advancedFilters")+"")&&T(jt,st),(!St||Ze[0]&4194304)&&os!==(os=Oe[22]("logs.requestTypeFilter")+"")&&T(Mn,os),(!St||Ze[0]&4194304)&&Dn!==(Dn=Oe[22]("logs.requestType_all")+"")&&T(cn,Dn),(!St||Ze[0]&4194304)&&Sn!==(Sn=Oe[22]("logs.requestType_final")+"")&&T(Pn,Sn),(!St||Ze[0]&4194304)&&rs!==(rs=Oe[22]("logs.requestType_retry")+"")&&T(Ht,rs),(!St||Ze[0]&4194304)&&An!==(An=Oe[22]("logs.requestType_recovery")+"")&&T(Fn,An),Ze[0]&32&&Cn(zt,Oe[5]),(!St||Ze[0]&4194304)&&bn!==(bn=Oe[22]("logs.timeRange")+"")&&T($n,bn),(!St||Ze[0]&4194304)&&es!==(es=Oe[22]("logs.allTime")+"")&&T(It,es),(!St||Ze[0]&4194304)&&Vn!==(Vn=Oe[22]("logs.recentTime")+"")&&T(ys,Vn),(!St||Ze[0]&4194304)&&on!==(on=Oe[22]("logs.customTime")+"")&&T(Qt,on),Ze[0]&256&&Cn(Yt,Oe[8]),Oe[8]==="recent"?fs?fs.p(Oe,Ze):(fs=jh(Oe),fs.c(),fs.m(Fe,Hn)):fs&&(fs.d(1),fs=null),Oe[8]==="custom"?hs?hs.p(Oe,Ze):(hs=zh(Oe),hs.c(),hs.m(Fe,ts)):hs&&(hs.d(1),hs=null),(!St||Ze[0]&4194304)&&fn!==(fn=Oe[22]("logs.sortBy")+"")&&T(Nn,fn),(!St||Ze[0]&4194304)&&ns!==(ns=Oe[22]("logs.sortByTimestamp")+"")&&T(us,ns),(!St||Ze[0]&4194304)&&en!==(en=Oe[22]("logs.sortByDuration")+"")&&T(Bt,en),(!St||Ze[0]&4194304)&&kt!==(kt=Oe[22]("logs.sortByStatus")+"")&&T(ce,kt),Ze[0]&64&&Cn(Kt,Oe[6]),(!St||Ze[0]&4194304)&&Ce!==(Ce=Oe[22]("logs.sortOrder")+"")&&T(ss,Ce),(!St||Ze[0]&4194304)&&zs!==(zs=Oe[22]("logs.desc")+"")&&T(gi,zs),(!St||Ze[0]&4194304)&&mi!==(mi=Oe[22]("logs.asc")+"")&&T(In,mi),Ze[0]&128&&Cn(qn,Oe[7]),Fl===(Fl=Ea(Oe))&&Rs?Rs.p(Oe,Ze):(Rs.d(1),Rs=Fl(Oe),Rs&&(Rs.c(),Rs.m(e,null))),Oe[18]&&Oe[17]?Bn?(Bn.p(Oe,Ze),Ze[0]&393216&&ze(Bn,1)):(Bn=Vh(Oe),Bn.c(),ze(Bn,1),Bn.m(et.parentNode,et)):Bn&&(ms(),Ue(Bn,1,1,()=>{Bn=null}),bs())},i(Oe){St||(ze(Bn),St=!0)},o(Oe){Ue(Bn),St=!1},d(Oe){Oe&&(H(e),H(qe),H(et)),Os.d(),cs&&cs.d(),fs&&fs.d(),hs&&hs.d(),Rs.d(),Bn&&Bn.d(Oe),Uo=!1,ht(ka)}}}let oi=50;function Wh(t){return new Date(t).toLocaleString()}function qh(t){return t<1e3?\`\${t}ms\`:\`\${(t/1e3).toFixed(2)}s\`}function Gh(t){return t<300?"badge-success":t<400?"badge-info":t<500?"badge-warning":"badge-error"}function Xh(t){return t==="final"?"badge-success":t==="retry"?"badge-warning":t==="recovery"?"badge-info":"badge-ghost"}function y5(t,e,n){let s,i;Zt(t,xt,ge=>n(22,i=ge));let l=1,o="",a="",u="",f,h="",p="timestamp",g="desc",m="recent",b=1,_="",y="",k=[],w=0,S=0,P=!0,M=null,x=null,A=!1,O=!1,C=null,R="",L="",D=!1;async function z(){try{n(15,P=!0),n(16,M=null);const ge={page:l,limit:oi,sortBy:p,sortOrder:g};o.trim()&&(ge.searchTerm=o.trim()),a&&(ge.method=a),u&&(ge.status=parseInt(u)),f!==void 0&&(ge.success=f),h&&(ge.requestType=h),m==="recent"?(ge.endTime=Date.now(),ge.startTime=Date.now()-b*60*60*1e3):m==="custom"&&(_&&(ge.startTime=new Date(_).getTime()),y&&(ge.endTime=new Date(y).getTime()));const be=await Tv(ge);n(12,k=be.data),n(13,w=be.total),n(14,S=be.totalPages)}catch(ge){n(16,M=ge.message)}finally{n(15,P=!1)}}async function B(ge){try{const be={};o.trim()&&(be.searchTerm=o.trim()),a&&(be.method=a),u&&(be.status=parseInt(u)),f!==void 0&&(be.success=f),h&&(be.requestType=h),m==="recent"?(be.endTime=Date.now(),be.startTime=Date.now()-b*60*60*1e3):m==="custom"&&(_&&(be.startTime=new Date(_).getTime()),y&&(be.endTime=new Date(y).getTime()));const He=await Mv(be,ge),Te=URL.createObjectURL(He),Pe=document.createElement("a");Pe.href=Te,Pe.download=\`access-logs-\${Date.now()}.\${ge}\`,Pe.click(),URL.revokeObjectURL(Te)}catch(be){alert(\`Export failed: \${be.message}\`)}}function U(){O?(C&&(C.close(),C=null),n(19,O=!1)):(C=Cv(1e3),C.onmessage=ge=>{const be=JSON.parse(ge.data);n(12,k=[be,...k]),k.length>oi&&n(12,k=k.slice(0,oi))},C.onerror=()=>{console.error("Stream connection error"),U()},n(19,O=!0))}function F(ge){n(17,x=ge),n(18,A=!0)}function V(ge){return ge?i(\`logs.requestType_\${ge}\`):"-"}function Y(){n(1,o=""),n(2,a=""),n(3,u=""),n(4,f=void 0),n(5,h=""),n(8,m="recent"),n(9,b=1),n(10,_=""),n(11,y=""),n(6,p="timestamp"),n(7,g="desc"),n(0,l=1)}function j(){localStorage.setItem("logsAdvancedFiltersExpanded",String(D))}ls(()=>{const ge=localStorage.getItem("logsAdvancedFiltersExpanded");ge!==null&&n(20,D=ge==="true"),z(),U()}),Ai(()=>{C&&C.close()});const q=()=>B("json"),Q=()=>B("csv");function X(){o=this.value,n(1,o)}function re(){a=Is(this),n(2,a)}function K(){u=this.value,n(3,u)}function W(){f=Is(this),n(4,f)}function G(){D=this.checked,n(20,D)}function J(){h=Is(this),n(5,h)}function le(){m=Is(this),n(8,m)}function se(){b=yt(this.value),n(9,b)}function N(){_=this.value,n(10,_)}function te(){y=this.value,n(11,y)}function Z(){p=Is(this),n(6,p)}function oe(){g=Is(this),n(7,g)}const Se=ge=>F(ge),me=()=>n(0,l=l-1),Ee=()=>n(0,l=l+1),ye=()=>{n(18,A=!1),n(17,x=null)};return t.$$.update=()=>{if(t.$$.dirty[0]&1022&&n(21,s=[o.trim(),a,u,f!==void 0,h,m!=="all"&&m!=="recent"||b!==1,p!=="timestamp"||g!=="desc"].filter(Boolean).length),t.$$.dirty[0]&536871934){const ge=JSON.stringify({limit:oi,searchTerm:o,method:a,statusFilter:u,successFilter:f,requestTypeFilter:h,sortBy:p,sortOrder:g,timeRangeType:m,recentHours:b});R&&ge!==R&&n(0,l=1),n(29,R=ge)}if(t.$$.dirty[0]&1073745152){const ge=JSON.stringify({customStartTime:_,customEndTime:y});m==="custom"&&L&&ge!==L&&n(0,l=1),n(30,L=ge)}t.$$.dirty[0]&4095&&z()},[l,o,a,u,f,h,p,g,m,b,_,y,k,w,S,P,M,x,A,O,D,s,i,B,U,F,V,Y,j,R,L,q,Q,X,re,K,W,G,J,le,se,N,te,Z,oe,Se,me,Ee,ye]}class w5 extends Gt{constructor(e){super(),qt(this,e,y5,v5,Nt,{},null,[-1,-1])}}async function k5(t){return yn.post("/auth/login",{token:t})}function Yh(t){let e,n,s;return{c(){e=d("div"),n=d("span"),s=E(t[2]),c(n,"class","label-text-alt text-error"),c(e,"class","label")},m(i,l){I(i,e,l),r(e,n),r(n,s)},p(i,l){l&4&&T(s,i[2])},d(i){i&&H(e)}}}function S5(t){let e,n,s,i,l,o,a,u,f=t[3]("login.title")+"",h,p,g,m=t[3]("login.subtitle")+"",b,_,y,k,w,S=t[3]("login.token")+"",P,M,x,A,O,C,R,L,D=(t[1]?t[3]("login.loggingIn"):t[3]("login.submit"))+"",z,B,U,F,V,Y=t[2]&&Yh(t);return{c(){e=d("div"),n=d("div"),s=d("div"),i=d("div"),l=pe("svg"),o=pe("path"),a=v(),u=d("h1"),h=E(f),p=v(),g=d("p"),b=E(m),_=v(),y=d("div"),k=d("label"),w=d("span"),P=E(S),M=v(),x=d("input"),O=v(),Y&&Y.c(),C=v(),R=d("div"),L=d("button"),z=E(D),B=v(),U=d("div"),U.textContent="Bungee Reverse Proxy",c(o,"stroke-linecap","round"),c(o,"stroke-linejoin","round"),c(o,"stroke-width","2"),c(o,"d","M13 10V3L4 14h7v7l9-11h-7z"),c(l,"xmlns","http://www.w3.org/2000/svg"),c(l,"class","h-16 w-16 text-primary mb-4"),c(l,"fill","none"),c(l,"viewBox","0 0 24 24"),c(l,"stroke","currentColor"),c(u,"class","text-3xl font-bold text-center"),c(g,"class","text-sm text-base-content/60 text-center mt-2"),c(i,"class","flex flex-col items-center mb-6"),c(w,"class","label-text"),c(k,"class","label"),c(k,"for","token-input"),c(x,"id","token-input"),c(x,"type","password"),c(x,"placeholder",A=t[3]("login.tokenPlaceholder")),c(x,"class","input input-bordered w-full"),x.disabled=t[1],c(x,"autocomplete","off"),ie(x,"input-error",!!t[2]),c(y,"class","form-control w-full"),c(L,"class","btn btn-primary"),L.disabled=t[1],ie(L,"loading",t[1]),c(R,"class","form-control mt-6"),c(U,"class","divider text-xs opacity-50 mt-6"),c(s,"class","card-body"),c(n,"class","card w-full max-w-md bg-base-100 shadow-2xl svelte-1qok2wg"),c(e,"class","min-h-screen bg-base-200 flex items-center justify-center p-4")},m(j,q){I(j,e,q),r(e,n),r(n,s),r(s,i),r(i,l),r(l,o),r(i,a),r(i,u),r(u,h),r(i,p),r(i,g),r(g,b),r(s,_),r(s,y),r(y,k),r(k,w),r(w,P),r(y,M),r(y,x),ne(x,t[0]),r(y,O),Y&&Y.m(y,null),r(s,C),r(s,R),r(R,L),r(L,z),r(s,B),r(s,U),F||(V=[ee(x,"input",t[6]),ee(x,"keypress",t[5]),ee(L,"click",t[4])],F=!0)},p(j,[q]){q&8&&f!==(f=j[3]("login.title")+"")&&T(h,f),q&8&&m!==(m=j[3]("login.subtitle")+"")&&T(b,m),q&8&&S!==(S=j[3]("login.token")+"")&&T(P,S),q&8&&A!==(A=j[3]("login.tokenPlaceholder"))&&c(x,"placeholder",A),q&2&&(x.disabled=j[1]),q&1&&x.value!==j[0]&&ne(x,j[0]),q&4&&ie(x,"input-error",!!j[2]),j[2]?Y?Y.p(j,q):(Y=Yh(j),Y.c(),Y.m(y,null)):Y&&(Y.d(1),Y=null),q&10&&D!==(D=(j[1]?j[3]("login.loggingIn"):j[3]("login.submit"))+"")&&T(z,D),q&2&&(L.disabled=j[1]),q&2&&ie(L,"loading",j[1])},i:Ae,o:Ae,d(j){j&&H(e),Y&&Y.d(),F=!1,ht(V)}}}function E5(t,e,n){let s;Zt(t,xt,h=>n(3,s=h));let i="",l=!1,o="";async function a(){if(!i.trim()){n(2,o=s("login.required"));return}n(1,l=!0),n(2,o="");try{const h=await k5(i);h.success?(tm(i),Et.show(s("login.success"),"success"),window.location.hash="#/"):n(2,o=h.error||s("login.unauthorized"))}catch(h){n(2,o=s("login.failed",{values:{error:h.message}}))}finally{n(1,l=!1)}}function u(h){h.key==="Enter"&&!l&&a()}function f(){i=this.value,n(0,i)}return[i,l,o,s,a,u,f]}class T5 extends Gt{constructor(e){super(),qt(this,e,E5,S5,Nt,{})}}function M5(t){let e,n,s=t[0]("notFound.title")+"",i,l,o,a=t[0]("notFound.message")+"",u,f,h,p=t[0]("notFound.goHome")+"",g;return{c(){e=d("div"),n=d("h1"),i=E(s),l=v(),o=d("p"),u=E(a),f=v(),h=d("a"),g=E(p),c(n,"class","text-6xl font-bold mb-4"),c(o,"class","text-2xl mb-8"),c(h,"href","/__ui/#/"),c(h,"class","btn btn-primary"),c(e,"class","flex flex-col items-center justify-center h-screen")},m(m,b){I(m,e,b),r(e,n),r(n,i),r(e,l),r(e,o),r(o,u),r(e,f),r(e,h),r(h,g)},p(m,[b]){b&1&&s!==(s=m[0]("notFound.title")+"")&&T(i,s),b&1&&a!==(a=m[0]("notFound.message")+"")&&T(u,a),b&1&&p!==(p=m[0]("notFound.goHome")+"")&&T(g,p)},i:Ae,o:Ae,d(m){m&&H(e)}}}function C5(t,e,n){let s;return Zt(t,xt,i=>n(0,s=i)),[s]}class P5 extends Gt{constructor(e){super(),qt(this,e,C5,M5,Nt,{})}}function Jh(t){let e,n,s,i,l,o,a,u,f,h,p;function g(_,y){return _[2]==="success"?R5:_[2]==="error"?O5:_[2]==="warning"?x5:A5}let m=g(t),b=m(t);return{c(){e=d("div"),n=d("div"),s=d("div"),b.c(),i=v(),l=d("span"),o=E(t[1]),a=v(),u=d("button"),u.textContent="\u2715",c(u,"class","btn btn-sm btn-ghost"),c(n,"class",f="alert "+t[3]+" shadow-lg"),c(e,"class","toast toast-end toast-top z-50")},m(_,y){I(_,e,y),r(e,n),r(n,s),b.m(s,null),r(s,i),r(s,l),r(l,o),r(n,a),r(n,u),h||(p=ee(u,"click",t[4]),h=!0)},p(_,y){m!==(m=g(_))&&(b.d(1),b=m(_),b&&(b.c(),b.m(s,i))),y&2&&T(o,_[1]),y&8&&f!==(f="alert "+_[3]+" shadow-lg")&&c(n,"class",f)},d(_){_&&H(e),b.d(),h=!1,p()}}}function A5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24"),c(e,"class","stroke-current shrink-0 w-6 h-6")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function x5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"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"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function O5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function R5(t){let e,n;return{c(){e=pe("svg"),n=pe("path"),c(n,"stroke-linecap","round"),c(n,"stroke-linejoin","round"),c(n,"stroke-width","2"),c(n,"d","M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"),c(e,"xmlns","http://www.w3.org/2000/svg"),c(e,"class","stroke-current shrink-0 h-6 w-6"),c(e,"fill","none"),c(e,"viewBox","0 0 24 24")},m(s,i){I(s,e,i),r(e,n)},d(s){s&&H(e)}}}function D5(t){let e,n=t[0]&&Jh(t);return{c(){n&&n.c(),e=Zn()},m(s,i){n&&n.m(s,i),I(s,e,i)},p(s,[i]){s[0]?n?n.p(s,i):(n=Jh(s),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Ae,o:Ae,d(s){s&&H(e),n&&n.d(s)}}}function L5(t,e,n){let s,{message:i}=e,{type:l="info"}=e,{duration:o=3e3}=e,{visible:a=!0}=e;const u=Dl();let f;ls(()=>(o>0&&(f=setTimeout(()=>{n(0,a=!1),u("close")},o)),()=>{f&&clearTimeout(f)}));function h(){n(0,a=!1),u("close"),f&&clearTimeout(f)}return t.$$set=p=>{"message"in p&&n(1,i=p.message),"type"in p&&n(2,l=p.type),"duration"in p&&n(5,o=p.duration),"visible"in p&&n(0,a=p.visible)},t.$$.update=()=>{t.$$.dirty&4&&n(3,s={success:"alert-success",error:"alert-error",warning:"alert-warning",info:"alert-info"}[l])},[a,i,l,s,h,o]}class H5 extends Gt{constructor(e){super(),qt(this,e,L5,D5,Nt,{message:1,type:2,duration:5,visible:0})}}function Kh(t,e,n){const s=t.slice();return s[3]=e[n],s}function Zh(t,e){let n,s,i;function l(){return e[2](e[3])}return s=new H5({props:{message:e[3].message,type:e[3].type,duration:e[3].duration}}),s.$on("close",l),{key:t,first:null,c(){n=Zn(),_t(s.$$.fragment),this.first=n},m(o,a){I(o,n,a),pt(s,o,a),i=!0},p(o,a){e=o;const u={};a&1&&(u.message=e[3].message),a&1&&(u.type=e[3].type),a&1&&(u.duration=e[3].duration),s.$set(u)},i(o){i||(ze(s.$$.fragment,o),i=!0)},o(o){Ue(s.$$.fragment,o),i=!1},d(o){o&&H(n),gt(s,o)}}}function I5(t){let e=[],n=new Map,s,i,l=tt(t[0]);const o=a=>a[3].id;for(let a=0;a<l.length;a+=1){let u=Kh(t,l,a),f=o(u);n.set(f,e[a]=Zh(f,u))}return{c(){for(let a=0;a<e.length;a+=1)e[a].c();s=Zn()},m(a,u){for(let f=0;f<e.length;f+=1)e[f]&&e[f].m(a,u);I(a,s,u),i=!0},p(a,[u]){u&3&&(l=tt(a[0]),ms(),e=Nr(e,u,o,1,a,l,n,s.parentNode,od,Zh,s,Kh),bs())},i(a){if(!i){for(let u=0;u<l.length;u+=1)ze(e[u]);i=!0}},o(a){for(let u=0;u<e.length;u+=1)Ue(e[u]);i=!1},d(a){a&&H(s);for(let u=0;u<e.length;u+=1)e[u].d(a)}}}function B5(t,e,n){let s;Zt(t,Et,o=>n(0,s=o));function i(o){Et.remove(o)}return[s,i,o=>i(o.id)]}class F5 extends Gt{constructor(e){super(),qt(this,e,B5,I5,Nt,{})}}function Qh(t,e,n){const s=t.slice();return s[11]=e[n],s}function N5(t){let e,n,s,i,l,o,a,u,f,h,p,g,m=t[0]("nav.dashboard")+"",b,_,y,k,w,S,P,M,x=t[0]("nav.routes")+"",A,O,C,R,L,D,z,B,U=t[0]("nav.logs")+"",F,V,Y,j,q,Q,X,re,K,W=t[0]("nav.configuration")+"",G,J,le,se,N,te,Z,oe,Se=zl.find(t[8])?.name+"",me,Ee,ye,ge,be,He,Te,Pe,_e,De=tt(zl),ke=[];for(let fe=0;fe<De.length;fe+=1)ke[fe]=$h(Qh(t,De,fe));let $=t[4]&&t[5]&&ed(t);const ae=[Y5,X5,G5,q5,W5,V5,U5,z5],ue=[];function de(fe,Be){return Be&2&&(He=null),fe[1]==="/login"?0:fe[1]==="/"?1:fe[1]==="/routes"?2:(He==null&&(He=!!fe[1].startsWith("/routes/edit/")),He?3:fe[1]==="/routes/new"?4:fe[1]==="/logs"?5:fe[1]==="/config"?6:7)}return Te=de(t,-1),Pe=ue[Te]=ae[Te](t),{c(){e=d("div"),n=d("div"),s=d("div"),s.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>',i=v(),l=d("div"),o=d("ul"),a=d("li"),u=d("a"),f=pe("svg"),h=pe("path"),p=v(),g=d("span"),b=E(m),_=v(),y=d("li"),k=d("a"),w=pe("svg"),S=pe("path"),P=v(),M=d("span"),A=E(x),O=v(),C=d("li"),R=d("a"),L=pe("svg"),D=pe("path"),z=v(),B=d("span"),F=E(U),V=v(),Y=d("li"),j=d("a"),q=pe("svg"),Q=pe("path"),X=pe("path"),re=v(),K=d("span"),G=E(W),J=v(),le=d("div"),se=d("div"),N=pe("svg"),te=pe("path"),Z=v(),oe=d("span"),me=E(Se),Ee=v(),ye=d("ul");for(let fe=0;fe<ke.length;fe+=1)ke[fe].c();ge=v(),$&&$.c(),be=v(),Pe.c(),c(s,"class","flex-1"),c(h,"stroke-linecap","round"),c(h,"stroke-linejoin","round"),c(h,"stroke-width","2"),c(h,"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"),c(f,"xmlns","http://www.w3.org/2000/svg"),c(f,"class","h-4 w-4"),c(f,"fill","none"),c(f,"viewBox","0 0 24 24"),c(f,"stroke","currentColor"),c(u,"href","/__ui/#/"),c(u,"class","flex items-center gap-2 svelte-1fgps4v"),ie(u,"active",t[1]==="/"),c(S,"stroke-linecap","round"),c(S,"stroke-linejoin","round"),c(S,"stroke-width","2"),c(S,"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"),c(w,"xmlns","http://www.w3.org/2000/svg"),c(w,"class","h-4 w-4"),c(w,"fill","none"),c(w,"viewBox","0 0 24 24"),c(w,"stroke","currentColor"),c(k,"href","/__ui/#/routes"),c(k,"class","flex items-center gap-2 svelte-1fgps4v"),ie(k,"active",t[1].startsWith("/routes")),c(D,"stroke-linecap","round"),c(D,"stroke-linejoin","round"),c(D,"stroke-width","2"),c(D,"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"),c(L,"xmlns","http://www.w3.org/2000/svg"),c(L,"class","h-4 w-4"),c(L,"fill","none"),c(L,"viewBox","0 0 24 24"),c(L,"stroke","currentColor"),c(R,"href","/__ui/#/logs"),c(R,"class","flex items-center gap-2 svelte-1fgps4v"),ie(R,"active",t[1]==="/logs"),c(Q,"stroke-linecap","round"),c(Q,"stroke-linejoin","round"),c(Q,"stroke-width","2"),c(Q,"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"),c(X,"stroke-linecap","round"),c(X,"stroke-linejoin","round"),c(X,"stroke-width","2"),c(X,"d","M15 12a3 3 0 11-6 0 3 3 0 016 0z"),c(q,"xmlns","http://www.w3.org/2000/svg"),c(q,"class","h-4 w-4"),c(q,"fill","none"),c(q,"viewBox","0 0 24 24"),c(q,"stroke","currentColor"),c(j,"href","/__ui/#/config"),c(j,"class","flex items-center gap-2 svelte-1fgps4v"),ie(j,"active",t[1]==="/config"),c(o,"class","menu menu-horizontal px-1 gap-1"),c(te,"stroke-linecap","round"),c(te,"stroke-linejoin","round"),c(te,"stroke-width","2"),c(te,"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"),c(N,"xmlns","http://www.w3.org/2000/svg"),c(N,"class","h-4 w-4"),c(N,"fill","none"),c(N,"viewBox","0 0 24 24"),c(N,"stroke","currentColor"),c(oe,"class","text-xs"),c(se,"role","button"),c(se,"tabindex","0"),c(se,"class","btn btn-ghost btn-sm gap-1"),c(ye,"role","menu"),c(ye,"tabindex","0"),c(ye,"class","dropdown-content z-[1] menu p-2 shadow bg-base-100 rounded-box w-32 mt-2 gap-1"),c(le,"class","dropdown dropdown-end mx-2"),c(l,"class","flex-none"),c(n,"class","navbar bg-base-100 shadow-lg sticky top-0 z-50"),c(e,"class","min-h-screen bg-base-200")},m(fe,Be){I(fe,e,Be),r(e,n),r(n,s),r(n,i),r(n,l),r(l,o),r(o,a),r(a,u),r(u,f),r(f,h),r(u,p),r(u,g),r(g,b),r(o,_),r(o,y),r(y,k),r(k,w),r(w,S),r(k,P),r(k,M),r(M,A),r(o,O),r(o,C),r(C,R),r(R,L),r(L,D),r(R,z),r(R,B),r(B,F),r(o,V),r(o,Y),r(Y,j),r(j,q),r(q,Q),r(q,X),r(j,re),r(j,K),r(K,G),r(l,J),r(l,le),r(le,se),r(se,N),r(N,te),r(se,Z),r(se,oe),r(oe,me),r(le,Ee),r(le,ye);for(let Qe=0;Qe<ke.length;Qe+=1)ke[Qe]&&ke[Qe].m(ye,null);r(l,ge),$&&$.m(l,null),r(e,be),ue[Te].m(e,null),_e=!0},p(fe,Be){if((!_e||Be&1)&&m!==(m=fe[0]("nav.dashboard")+"")&&T(b,m),(!_e||Be&2)&&ie(u,"active",fe[1]==="/"),(!_e||Be&1)&&x!==(x=fe[0]("nav.routes")+"")&&T(A,x),(!_e||Be&2)&&ie(k,"active",fe[1].startsWith("/routes")),(!_e||Be&1)&&U!==(U=fe[0]("nav.logs")+"")&&T(F,U),(!_e||Be&2)&&ie(R,"active",fe[1]==="/logs"),(!_e||Be&1)&&W!==(W=fe[0]("nav.configuration")+"")&&T(G,W),(!_e||Be&2)&&ie(j,"active",fe[1]==="/config"),(!_e||Be&8)&&Se!==(Se=zl.find(fe[8])?.name+"")&&T(me,Se),Be&72){De=tt(zl);let We;for(We=0;We<De.length;We+=1){const Ye=Qh(fe,De,We);ke[We]?ke[We].p(Ye,Be):(ke[We]=$h(Ye),ke[We].c(),ke[We].m(ye,null))}for(;We<ke.length;We+=1)ke[We].d(1);ke.length=De.length}fe[4]&&fe[5]?$?$.p(fe,Be):($=ed(fe),$.c(),$.m(l,null)):$&&($.d(1),$=null);let Qe=Te;Te=de(fe,Be),Te===Qe?ue[Te].p(fe,Be):(ms(),Ue(ue[Qe],1,1,()=>{ue[Qe]=null}),bs(),Pe=ue[Te],Pe?Pe.p(fe,Be):(Pe=ue[Te]=ae[Te](fe),Pe.c()),ze(Pe,1),Pe.m(e,null))},i(fe){_e||(ze(Pe),_e=!0)},o(fe){Ue(Pe),_e=!1},d(fe){fe&&H(e),Tn(ke,fe),$&&$.d(),ue[Te].d()}}}function j5(t){let e;return{c(){e=d("div"),e.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>',c(e,"class","min-h-screen bg-base-200 flex items-center justify-center")},m(n,s){I(n,e,s)},p:Ae,i:Ae,o:Ae,d(n){n&&H(e)}}}function $h(t){let e,n,s,i,l;function o(){return t[9](t[11])}return{c(){e=d("li"),n=d("button"),n.textContent=\`\${t[11].name}\`,s=v(),c(n,"class","svelte-1fgps4v"),ie(n,"active",t[3]===t[11].code)},m(a,u){I(a,e,u),r(e,n),r(e,s),i||(l=ee(n,"click",o),i=!0)},p(a,u){t=a,u&8&&ie(n,"active",t[3]===t[11].code)},d(a){a&&H(e),i=!1,l()}}}function ed(t){let e,n,s,i,l,o,a=t[0]("login.logout")+"",u,f,h;return{c(){e=d("div"),n=d("button"),s=pe("svg"),i=pe("path"),l=v(),o=d("span"),u=E(a),c(i,"stroke-linecap","round"),c(i,"stroke-linejoin","round"),c(i,"stroke-width","2"),c(i,"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"),c(s,"xmlns","http://www.w3.org/2000/svg"),c(s,"class","h-4 w-4"),c(s,"fill","none"),c(s,"viewBox","0 0 24 24"),c(s,"stroke","currentColor"),c(o,"class","text-xs hidden md:inline"),c(n,"class","btn btn-ghost btn-sm gap-1"),c(e,"class","mx-2")},m(p,g){I(p,e,g),r(e,n),r(n,s),r(s,i),r(n,l),r(n,o),r(o,u),f||(h=ee(n,"click",t[7]),f=!0)},p(p,g){g&1&&a!==(a=p[0]("login.logout")+"")&&T(u,a)},d(p){p&&H(e),f=!1,h()}}}function z5(t){let e,n;return e=new P5({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function U5(t){let e,n;return e=new Kv({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function V5(t){let e,n;return e=new w5({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function W5(t){let e,n;return e=new Zp({props:{params:{}}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function q5(t){let e,n;return e=new Zp({props:{params:{path:t[1].replace("/routes/edit/","")}}}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p(s,i){const l={};i&2&&(l.params={path:s[1].replace("/routes/edit/","")}),e.$set(l)},i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function G5(t){let e,n;return e=new by({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function X5(t){let e,n;return e=new yv({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function Y5(t){let e,n;return e=new T5({}),{c(){_t(e.$$.fragment)},m(s,i){pt(e,s,i),n=!0},p:Ae,i(s){n||(ze(e.$$.fragment,s),n=!0)},o(s){Ue(e.$$.fragment,s),n=!1},d(s){gt(e,s)}}}function J5(t){let e,n,s,i,l;const o=[j5,N5],a=[];function u(f,h){return f[2]?0:1}return e=u(t),n=a[e]=o[e](t),i=new F5({}),{c(){n.c(),s=v(),_t(i.$$.fragment)},m(f,h){a[e].m(f,h),I(f,s,h),pt(i,f,h),l=!0},p(f,[h]){let p=e;e=u(f),e===p?a[e].p(f,h):(ms(),Ue(a[p],1,1,()=>{a[p]=null}),bs(),n=a[e],n?n.p(f,h):(n=a[e]=o[e](f),n.c()),ze(n,1),n.m(s.parentNode,s))},i(f){l||(ze(n),ze(i.$$.fragment,f),l=!0)},o(f){Ue(n),Ue(i.$$.fragment,f),l=!1},d(f){f&&H(s),a[e].d(f),gt(i,f)}}}function K5(t,e,n){let s,i,l,o,a,u;Zt(t,xt,m=>n(0,s=m)),Zt(t,hg,m=>n(1,i=m)),Zt(t,ao,m=>n(2,l=m)),Zt(t,di,m=>n(3,o=m)),Zt(t,Va,m=>n(4,a=m)),Zt(t,bo,m=>n(5,u=m));function f(m){Z0(m)}ls(async()=>{try{const b=(await qr()).auth?.enabled||!1;if(Va.set(b),b){const _=Bd();bo.set(!!_),!_&&i!=="/login"&&(window.location.hash="#/login")}}catch(m){console.error("Failed to check auth status:",m)}});function h(){confirm(s("login.logoutConfirm"))&&(Id(),window.location.hash="#/login")}return[s,i,l,o,a,u,f,h,m=>m.code===o,m=>f(m.code)]}class Z5 extends Gt{constructor(e){super(),qt(this,e,K5,J5,Nt,{})}}new Z5({target:document.getElementById("app")})});export default Q5();
21223
21224
  `,
21224
- "index-DTHFbwVv.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)))}@media (hover:hover){.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}.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}}.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}.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}.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}.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-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-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}@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}.\\!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-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}}.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}.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}.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))}.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-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}.visible{visibility:visible}.collapse{visibility:collapse}.static{position:static}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.top-\\[3em\\]{top:3em}.z-10{z-index:10}.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}.-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-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-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.h-16{height:4rem}.h-2{height:.5rem}.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}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-16{width:4rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.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}.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))}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.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-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))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * 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}.border{border-width:1px}.border-b{border-bottom-width:1px}.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))}.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-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-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-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:var(--fallback-wa,oklch(var(--wa)/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-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-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-1{padding-top:.25rem;padding-bottom:.25rem}.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}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.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-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/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-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/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\\: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\\: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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}.card.svelte-1qok2wg{backdrop-filter:blur(10px)}.active.svelte-1fgps4v{background-color:hsl(var(--p) / .2)}\n",
21225
- "en-Woa_MXgq.js": 'const e={error:"Error",loading:"Loading...",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",confirm:"Confirm",reset:"Reset",search:"Search",filter:"Filter",export:"Export",import:"Import",close:"Close"},t={dashboard:"Dashboard",routes:"Routes",logs:"Request Logs",configuration:"Configuration"},r={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"},a={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"},o={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}"},s={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}"},i={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)",pathRewrite:"Path Rewrite",pathRewriteHelp:"Regex patterns to modify request paths",addPathRewriteRule:"Add Path Rewrite Rule",patternPlaceholder:"^/api",replacementPlaceholder:"/v1",upstreams:"Upstreams",addUpstream:"Add Upstream",transformer:"Route Transformer",transformerHelp:"Transformer applied to the entire route (optional)",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"},l={upstreams:"{count} upstream(s)",hasTransformer:"With transformer",failover:"Failover",edit:"Edit",duplicate:"Duplicate",delete:"Delete",duplicating:"Duplicating...",deleting:"Deleting..."},u={title:"Upstream #{index}",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"},d={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}"},c={title:"Request Headers",addHeader:"Add Header",name:"Name",namePlaceholder:"Content-Type",value:"Value",valuePlaceholder:"application/json",remove:"Remove",empty:"No headers",default:"Default Headers"},p={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",replace:"Replace",default:"Default"},h={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}"},m={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"}},g={title:"Confirm Action",confirm:"Confirm",cancel:"Cancel"},f={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"},y={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."},v={title:"Request Logs",filters:"Filters",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",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"}},R={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"},T={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?"},b={common:e,nav:t,dashboard:r,monitoring:a,routes:o,configuration:s,notFound:i,routeEditor:n,routeCard:l,upstream:u,plugin:d,headers:c,body:p,expression:h,templates:m,confirmDialog:g,validation:f,auth:y,logs:v,logging:R,login:T};export{y as auth,p as body,e as common,s as configuration,g as confirmDialog,r as dashboard,b as default,h as expression,c as headers,R as logging,T as login,v as logs,a as monitoring,t as nav,i as notFound,d as plugin,l as routeCard,n as routeEditor,o as routes,m as templates,u as upstream,f as validation};\n',
21225
+ "index-Chy1BWYs.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)))}@media (hover:hover){.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)))}.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))}}}.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}.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}}.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}.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}.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}.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}.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-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-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}@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}.\\!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-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)))}.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}}.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}.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}.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))}.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))}.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-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}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.top-\\[3em\\]{top:3em}.z-10{z-index:10}.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}.-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-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-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.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{height:.5rem}.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}.min-h-\\[2\\.5rem\\]{min-height:2.5rem}.min-h-screen{min-height:100vh}.w-1\\/3{width:33.333333%}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-full{width:100%}.w-px{width:1px}.max-w-4xl{max-width:56rem}.max-w-6xl{max-width:72rem}.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}.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))}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.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-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))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * 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-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))}.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-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-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-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}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.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-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/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\\: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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@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",
21226
21226
  "zh-CN-bARHc6B8.js": 'const e={error:"\u9519\u8BEF",loading:"\u52A0\u8F7D\u4E2D...",save:"\u4FDD\uFFFD\uFFFD",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",edit:"\u7F16\u8F91",add:"\u6DFB\u52A0",confirm:"\u786E\u8BA4",reset:"\u91CD\u7F6E",search:"\u641C\u7D22",filter:"\u7B5B\u9009",export:"\u5BFC\u51FA",import:"\u5BFC\u5165",close:"\u5173\u95ED"},t={dashboard:"\u4EEA\u8868\u677F",routes:"\u8DEF\u7531\u7BA1\u7406",logs:"\u8BF7\u6C42\u65E5\u5FD7",configuration:"\u914D\u7F6E\u4E2D\u5FC3"},r={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"},a={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"},o={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}"},s={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}"},l={title:"404",message:"\u9875\u9762\u672A\u627E\u5230",goHome:"\u8FD4\u56DE\u9996\u9875"},i={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)",pathRewrite:"\u8DEF\u5F84\u91CD\u5199",pathRewriteHelp:"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u6A21\u5F0F\u4FEE\u6539\u8BF7\u6C42\u8DEF\u5F84",addPathRewriteRule:"\u6DFB\u52A0\u8DEF\u5F84\u91CD\u5199\u89C4\u5219",patternPlaceholder:"^/api",replacementPlaceholder:"/v1",upstreams:"\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",optional:"\u53EF\u9009",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"},n={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..."},d={title:"\u4E0A\u6E38\u670D\u52A1\u5668 #{index}",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"},u={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}"},c={title:"\u8BF7\u6C42\u5934",addHeader:"\u6DFB\u52A0\u8BF7\u6C42\u5934",name:"\u540D\u79F0",namePlaceholder:"Content-Type",value:"\u503C",valuePlaceholder:"application/json",remove:"\u79FB\u9664",empty:"\u6682\u65E0\u8BF7\u6C42\u5934",default:"\u9ED8\u8BA4\u8BF7\u6C42\u5934"},p={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",replace:"\u66FF\u6362",default:"\u9ED8\u8BA4\u503C"},h={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}"},m={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"}},g={title:"\u786E\u8BA4\u64CD\u4F5C",confirm:"\u786E\u8BA4",cancel:"\u53D6\u6D88"},y={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"},v={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"},T={title:"\u8BF7\u6C42\u65E5\u5FD7",filters:"\u7B5B\u9009\u5668",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",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"}},R={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"},f={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"},S={common:e,nav:t,dashboard:r,monitoring:a,routes:o,configuration:s,notFound:l,routeEditor:i,routeCard:n,upstream:d,plugin:u,headers:c,body:p,expression:h,templates:m,confirmDialog:g,validation:y,auth:v,logs:T,logging:R,login:f};export{v as auth,p as body,e as common,s as configuration,g as confirmDialog,r as dashboard,S as default,h as expression,c as headers,R as logging,f as login,T as logs,a as monitoring,t as nav,l as notFound,u as plugin,n as routeCard,i as routeEditor,o as routes,m as templates,d as upstream,y as validation};\n'
21227
21227
  }
21228
21228
  };
@@ -22196,6 +22196,36 @@ class LogQueryService {
22196
22196
  failureRate: row.failure_rate || 0
22197
22197
  }));
22198
22198
  }
22199
+ async getUnifiedUpstreamStats(startTime, endTime, type = "all", limit = 10) {
22200
+ const successFilter = type === "success" ? "AND success = 1" : type === "failure" ? "AND success = 0" : "";
22201
+ const query = `
22202
+ SELECT
22203
+ upstream,
22204
+ COUNT(*) as count,
22205
+ ROUND(COUNT(*) * 100.0 / (SELECT COUNT(*) FROM access_logs WHERE timestamp >= ? AND timestamp <= ? AND upstream IS NOT NULL ${successFilter}), 2) as percentage,
22206
+ (SELECT COUNT(*) FROM access_logs al WHERE al.upstream = access_logs.upstream AND al.timestamp >= ? AND al.timestamp <= ?) as total_requests,
22207
+ SUM(CASE WHEN success = 1 THEN 1 ELSE 0 END) as success_requests,
22208
+ SUM(CASE WHEN success = 0 THEN 1 ELSE 0 END) as failed_requests,
22209
+ ROUND(SUM(CASE WHEN success = 0 THEN 1 ELSE 0 END) * 100.0 / (SELECT COUNT(*) FROM access_logs al WHERE al.upstream = access_logs.upstream AND al.timestamp >= ? AND al.timestamp <= ?), 2) as failure_rate
22210
+ FROM access_logs
22211
+ WHERE timestamp >= ? AND timestamp <= ?
22212
+ AND upstream IS NOT NULL
22213
+ ${successFilter}
22214
+ GROUP BY upstream
22215
+ ORDER BY count DESC
22216
+ LIMIT ?
22217
+ `;
22218
+ const rows = this.db.prepare(query).all(startTime, endTime, startTime, endTime, startTime, endTime, startTime, endTime, limit);
22219
+ return rows.map((row) => ({
22220
+ upstream: row.upstream,
22221
+ count: row.count,
22222
+ percentage: row.percentage || 0,
22223
+ totalRequests: row.total_requests,
22224
+ successRequests: row.success_requests,
22225
+ failedRequests: row.failed_requests,
22226
+ failureRate: row.failure_rate || 0
22227
+ }));
22228
+ }
22199
22229
  async getUpstreamStatusCodeStats(startTime, endTime, limit = 10) {
22200
22230
  const query = `
22201
22231
  SELECT
@@ -22372,6 +22402,25 @@ class StatsHandler {
22372
22402
  });
22373
22403
  }
22374
22404
  }
22405
+ static async getUnifiedUpstreamStats(req) {
22406
+ const url = new URL(req.url);
22407
+ const range = url.searchParams.get("range") || "1h";
22408
+ const type = url.searchParams.get("type") || "all";
22409
+ try {
22410
+ const endTime = Date.now();
22411
+ const startTime = StatsHandler.getStartTimeForRange(range, endTime);
22412
+ const data = await logQueryService.getUnifiedUpstreamStats(startTime, endTime, type);
22413
+ return new Response(JSON.stringify({ data, type }), {
22414
+ headers: { "Content-Type": "application/json" }
22415
+ });
22416
+ } catch (error) {
22417
+ console.error("Failed to get unified upstream stats:", error);
22418
+ return new Response(JSON.stringify({ error: "Failed to get unified upstream stats" }), {
22419
+ status: 500,
22420
+ headers: { "Content-Type": "application/json" }
22421
+ });
22422
+ }
22423
+ }
22375
22424
  static async getUpstreamStatusCodes(req) {
22376
22425
  const url = new URL(req.url);
22377
22426
  const range = url.searchParams.get("range") || "1h";
@@ -23042,6 +23091,9 @@ async function handleAPIRequest(req, path12) {
23042
23091
  if (path12 === "/api/stats/history/v2" && method === "GET") {
23043
23092
  return await StatsHandler.getHistoryV2(req);
23044
23093
  }
23094
+ if (path12 === "/api/stats/upstream-stats" && method === "GET") {
23095
+ return await StatsHandler.getUnifiedUpstreamStats(req);
23096
+ }
23045
23097
  if (path12 === "/api/stats/upstream-distribution" && method === "GET") {
23046
23098
  return await StatsHandler.getUpstreamDistribution(req);
23047
23099
  }