oceanpress 1.0.12 → 1.0.13

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.
@@ -0,0 +1,2191 @@
1
+ import{A as Vi,r as Me,a as Wc,w as ss,c as Fe,g as hb,o as Ao,b as pi,d as mb,e as ls,f as PA,h as NA,C as OA,i as mt,j as R,T as DA,t as on,k as LA,u as MA,F as ma,l as gb,m as $t,n as bb,p as nv,q as pb,s as cs,v as ci,x as FA,y as xf,z as zA,B as UA,D as $A,E as j,G as ce,H as J,I as ic,N as gh,J as bh,K as Vs,L as yb,M as ys,O as oe,P as Er,Q as Ks,R as rn,S as vf,U as Es,V as Tf,W as Eb,X as rv,Y as Zi,Z as oi,_ as Gr,$ as Ge,a0 as sv,a1 as iv,a2 as Cb,a3 as av,a4 as ov,a5 as xb,a6 as HA,a7 as mu,a8 as Sf,a9 as ph,aa as cv,ab as Sa,ac as vb,ad as Tb,ae as Sb,af as _f,ag as qA,ah as lv,ai as Ny,aj as jA,ak as WA,al as GA,am as VA,an as KA,ao as Gc,ap as wf,aq as Br,ar as Rd,as as gu,at as uv,au as nc,av as Af,aw as F0,ax as dv,ay as Yh,az as YA,aA as Oy,aB as nt,aC as Ne,aD as qo,aE as XA,aF as QA,aG as ZA,aH as fv,aI as JA}from"./index-C2pqUSpO.js";function _b(e){return`data/${e.box}${e.path}`}const Xh=new Map,Dy=new Map,wb=new Map,z0=new Map;async function Ab(e){if(Xh.has(e))return Xh.get(e);const t=await Vi.query_sql({stmt:e});return Xh.set(e,t),t}async function e3(e){{const r=Dy.get(e);if(r)return r}const t=(await Ab(`SELECT * FROM blocks WHERE hpath = '${e}'`))[0];if(t===void 0)throw new Error(`not doc by:${e}`);const n=await hv(_b(t));return Dy.set(e,n),n}async function hv(e){const t=pv(await Vi.file_getFile({path:e}));return bv(t),t}async function U0(e){{const n=z0.get(e);if(n)return n}const t=await Ab(`
2
+ SELECT * from blocks
3
+ WHERE id = '${e}'
4
+ `);if(t.length!==0)return z0.set(e,t[0]),t[0]}async function mv(e){if(e===void 0)return;{const r=wb.get(e);if(r)return r}const t=await $0(e);if(t===void 0)return;return n(t);function n(r){if(r.ID===e)return r;if(r.Children)return r.Children.find(s=>n(s))}}async function gv(e){const t=await Ab(`
5
+ SELECT * from blocks
6
+ WHERE box = '${e}'
7
+ AND type = 'd'
8
+ limit 150000 OFFSET 0
9
+ `);return t.forEach(n=>z0.set(n.id,n)),t}async function $0(e){{const n=wb.get(e);if(n){let r=n;for(;;){if(r.Type==="NodeDocument")return r;if(r===void 0)break;r=r.Parent}}}const t=await U0(e);if(t!==void 0)return await e3(t.hpath)}function bv(e){e.ID&&wb.set(e.ID,e),e.Children&&e.Children.forEach(bv)}function pv(e){for(const t of e?.Children??[])t.Parent=e,pv(t);return e}const yv={getDocByChildID:async e=>await $0(e),getDocPathBySY:async e=>{if(e?.ID){const t=await U0(e.ID);if(t)return _b(t)}},getHPathByID_Node:async e=>{const t=typeof e=="string"?e:e.ID;if(t===void 0)throw new Error("id is undefined");if(await $0(t)===void 0)throw new Error("docNode is undefined");const r=await U0(t);if(r===void 0)throw new Error("docBlock is undefined");return r.hpath},getNodeByID:async e=>{if(e===void 0)return;const t=await yv.getDocByChildID(e);if(t===void 0)return;return n(t);function n(r){if(r.ID===e)return r;if(r.Children!==void 0)for(const s of r.Children){const i=n(s);if(i)return i}}},log(e){console.log(e)},percentage:e=>{console.log(e)}};function t3(e,t){return localStorage.setItem(e,t)}function n3(e){return localStorage.getItem(e)??void 0}const Ev={setItem:t3,getItem:n3};function Ly(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function kb(e){return e.composedPath()[0]||null}function bu(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function Is(e,t){const n=e.trim().split(/\s+/g),r={top:n[0]};switch(n.length){case 1:r.right=n[0],r.bottom=n[0],r.left=n[0];break;case 2:r.right=n[1],r.left=n[1],r.bottom=n[0];break;case 3:r.right=n[1],r.bottom=n[2],r.left=n[1];break;case 4:r.right=n[1],r.bottom=n[2],r.left=n[3];break;default:throw new Error("[seemly/getMargin]:"+e+" is not a valid value.")}return t===void 0?r:r[t]}function r3(e,t){const[n,r]=e.split(" ");return{row:n,col:r||n}}function Bd(e){return e.composedPath()[0]}const s3={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function i3(e,t,n){if(e==="mousemoveoutside"){const r=s=>{t.contains(Bd(s))||n(s)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const s=a=>{r=!t.contains(Bd(a))},i=a=>{r&&(t.contains(Bd(a))||n(a))};return{mousedown:s,mouseup:i,touchstart:s,touchend:i}}return console.error(`[evtd/create-trap-handler]: name \`${e}\` is invalid. This could be a bug of evtd.`),{}}function Cv(e,t,n){const r=s3[e];let s=r.get(t);s===void 0&&r.set(t,s=new WeakMap);let i=s.get(n);return i===void 0&&s.set(n,i=i3(e,t,n)),i}function a3(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const s=Cv(e,t,n);return Object.keys(s).forEach(i=>{Yn(i,document,s[i],r)}),!0}return!1}function o3(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const s=Cv(e,t,n);return Object.keys(s).forEach(i=>{mr(i,document,s[i],r)}),!0}return!1}function c3(){if(typeof window>"u")return{on:()=>{},off:()=>{}};const e=new WeakMap,t=new WeakMap;function n(){e.set(this,!0)}function r(){e.set(this,!0),t.set(this,!0)}function s(v,O,F){const X=v[O];return v[O]=function(){return F.apply(v,arguments),X.apply(v,arguments)},v}function i(v,O){v[O]=Event.prototype[O]}const a=new WeakMap,o=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function c(){var v;return(v=a.get(this))!==null&&v!==void 0?v:null}function l(v,O){o!==void 0&&Object.defineProperty(v,"currentTarget",{configurable:!0,enumerable:!0,get:O??o.get})}const d={bubble:{},capture:{}},f={};function m(){const v=function(O){const{type:F,eventPhase:X,bubbles:me}=O,N=Bd(O);if(X===2)return;const Y=X===1?"capture":"bubble";let x=N;const Z=[];for(;x===null&&(x=window),Z.push(x),x!==window;)x=x.parentNode||null;const Le=d.capture[F],re=d.bubble[F];if(s(O,"stopPropagation",n),s(O,"stopImmediatePropagation",r),l(O,c),Y==="capture"){if(Le===void 0)return;for(let He=Z.length-1;He>=0&&!e.has(O);--He){const he=Z[He],ze=Le.get(he);if(ze!==void 0){a.set(O,he);for(const Q of ze){if(t.has(O))break;Q(O)}}if(He===0&&!me&&re!==void 0){const Q=re.get(he);if(Q!==void 0)for(const K of Q){if(t.has(O))break;K(O)}}}}else if(Y==="bubble"){if(re===void 0)return;for(let He=0;He<Z.length&&!e.has(O);++He){const he=Z[He],ze=re.get(he);if(ze!==void 0){a.set(O,he);for(const Q of ze){if(t.has(O))break;Q(O)}}}}i(O,"stopPropagation"),i(O,"stopImmediatePropagation"),l(O)};return v.displayName="evtdUnifiedHandler",v}function h(){const v=function(O){const{type:F,eventPhase:X}=O;if(X!==2)return;const me=f[F];me!==void 0&&me.forEach(N=>N(O))};return v.displayName="evtdUnifiedWindowEventHandler",v}const g=m(),b=h();function p(v,O){const F=d[v];return F[O]===void 0&&(F[O]=new Map,window.addEventListener(O,g,v==="capture")),F[O]}function y(v){return f[v]===void 0&&(f[v]=new Set,window.addEventListener(v,b)),f[v]}function C(v,O){let F=v.get(O);return F===void 0&&v.set(O,F=new Set),F}function A(v,O,F,X){const me=d[O][F];if(me!==void 0){const N=me.get(v);if(N!==void 0&&N.has(X))return!0}return!1}function T(v,O){const F=f[v];return!!(F!==void 0&&F.has(O))}function S(v,O,F,X){let me;if(typeof X=="object"&&X.once===!0?me=Le=>{w(v,O,me,X),F(Le)}:me=F,a3(v,O,me,X))return;const Y=X===!0||typeof X=="object"&&X.capture===!0?"capture":"bubble",x=p(Y,v),Z=C(x,O);if(Z.has(me)||Z.add(me),O===window){const Le=y(v);Le.has(me)||Le.add(me)}}function w(v,O,F,X){if(o3(v,O,F,X))return;const N=X===!0||typeof X=="object"&&X.capture===!0,Y=N?"capture":"bubble",x=p(Y,v),Z=C(x,O);if(O===window&&!A(O,N?"bubble":"capture",v,F)&&T(v,F)){const re=f[v];re.delete(F),re.size===0&&(window.removeEventListener(v,b),f[v]=void 0)}Z.has(F)&&Z.delete(F),Z.size===0&&x.delete(O),x.size===0&&(window.removeEventListener(v,g,Y==="capture"),d[Y][v]=void 0)}return{on:S,off:w}}const{on:Yn,off:mr}=c3();function xv(e){const t=Me(!!e.value);if(t.value)return Wc(t);const n=ss(e,r=>{r&&(t.value=!0,n())});return Wc(t)}function yo(e){const t=Fe(e),n=Me(t.value);return ss(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}function vv(){return hb()!==null}const Ib=typeof window<"u";let ac,Xl;const l3=()=>{var e,t;ac=Ib?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Xl=!1,ac!==void 0?ac.then(()=>{Xl=!0}):Xl=!0};l3();function u3(e){if(Xl)return;let t=!1;Ao(()=>{Xl||ac?.then(()=>{t||e()})}),pi(()=>{t=!0})}const Vl=Me(null);function My(e){if(e.clientX>0||e.clientY>0)Vl.value={x:e.clientX,y:e.clientY};else{const{target:t}=e;if(t instanceof Element){const{left:n,top:r,width:s,height:i}=t.getBoundingClientRect();n>0||r>0?Vl.value={x:n+s/2,y:r+i/2}:Vl.value={x:0,y:0}}else Vl.value=null}}let nd=0,Fy=!0;function d3(){if(!Ib)return Wc(Me(null));nd===0&&Yn("click",document,My,!0);const e=()=>{nd+=1};return Fy&&(Fy=vv())?(mb(e),pi(()=>{nd-=1,nd===0&&mr("click",document,My,!0)})):e(),Wc(Vl)}const f3=Me(void 0);let rd=0;function zy(){f3.value=Date.now()}let Uy=!0;function h3(e){if(!Ib)return Wc(Me(!1));const t=Me(!1);let n=null;function r(){n!==null&&window.clearTimeout(n)}function s(){r(),t.value=!0,n=window.setTimeout(()=>{t.value=!1},e)}rd===0&&Yn("click",window,zy,!0);const i=()=>{rd+=1,Yn("click",window,s,!0)};return Uy&&(Uy=vv())?(mb(i),pi(()=>{rd-=1,rd===0&&mr("click",window,zy,!0),mr("click",window,s,!0),r()})):i(),Wc(t)}function sl(e,t){return ss(e,n=>{n!==void 0&&(t.value=n)}),Fe(()=>e.value===void 0?t.value:e.value)}function $y(e,t){return Fe(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const m3=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function g3(){return m3}const b3=ls("n-drawer-body"),p3=ls("n-modal-body"),y3=ls("n-modal-provider"),Tv=ls("n-modal"),E3=ls("n-popover-body"),il=typeof document<"u"&&typeof window<"u",Rb=Me(!1);function Hy(){Rb.value=!0}function qy(){Rb.value=!1}let Ml=0;function C3(){return il&&(mb(()=>{Ml||(window.addEventListener("compositionstart",Hy),window.addEventListener("compositionend",qy)),Ml++}),pi(()=>{Ml<=1?(window.removeEventListener("compositionstart",Hy),window.removeEventListener("compositionend",qy),Ml=0):Ml--})),Rb}let jo=0,jy="",Wy="",Gy="",Vy="";const Ky=Me("0px");function x3(e){if(typeof document>"u")return;const t=document.documentElement;let n,r=!1;const s=()=>{t.style.marginRight=jy,t.style.overflow=Wy,t.style.overflowX=Gy,t.style.overflowY=Vy,Ky.value="0px"};Ao(()=>{n=ss(e,i=>{if(i){if(!jo){const a=window.innerWidth-t.offsetWidth;a>0&&(jy=t.style.marginRight,t.style.marginRight=`${a}px`,Ky.value=`${a}px`),Wy=t.style.overflow,Gy=t.style.overflowX,Vy=t.style.overflowY,t.style.overflow="hidden",t.style.overflowX="hidden",t.style.overflowY="hidden"}r=!0,jo++}else jo--,jo||s(),r=!1},{immediate:!0})}),pi(()=>{n?.(),r&&(jo--,jo||s(),r=!1)})}function v3(e){const t={isDeactivated:!1};let n=!1;return PA(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),NA(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function Yy(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}const Wo="@@coContext",T3={mounted(e,{value:t,modifiers:n}){e[Wo]={handler:void 0},typeof t=="function"&&(e[Wo].handler=t,Yn("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Wo];typeof t=="function"?r.handler?r.handler!==t&&(mr("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,Yn("clickoutside",e,t,{capture:n.capture})):(e[Wo].handler=t,Yn("clickoutside",e,t,{capture:n.capture})):r.handler&&(mr("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Wo];n&&mr("clickoutside",e,n,{capture:t.capture}),e[Wo].handler=void 0}};function S3(e,t){console.error(`[vdirs/${e}]: ${t}`)}class _3{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(t,n){const{elementZIndex:r}=this;if(n!==void 0){t.style.zIndex=`${n}`,r.delete(t);return}const{nextZIndex:s}=this;r.has(t)&&r.get(t)+1===this.nextZIndex||(t.style.zIndex=`${s}`,r.set(t,s),this.nextZIndex=s+1,this.squashState())}unregister(t,n){const{elementZIndex:r}=this;r.has(t)?r.delete(t):n===void 0&&S3("z-index-manager/unregister-element","Element not found when unregistering."),this.squashState()}squashState(){const{elementCount:t}=this;t||(this.nextZIndex=2e3),this.nextZIndex-t>2500&&this.rearrange()}rearrange(){const t=Array.from(this.elementZIndex.entries());t.sort((n,r)=>n[1]-r[1]),this.nextZIndex=2e3,t.forEach(n=>{const r=n[0],s=this.nextZIndex++;`${s}`!==r.style.zIndex&&(r.style.zIndex=`${s}`)})}}const Qh=new _3,Go="@@ziContext",w3={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:s}=n;e[Go]={enabled:!!s,initialized:!1},s&&(Qh.ensureZIndex(e,r),e[Go].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:s}=n,i=e[Go].enabled;s&&!i&&(Qh.ensureZIndex(e,r),e[Go].initialized=!0),e[Go].enabled=!!s},unmounted(e,t){if(!e[Go].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Qh.unregister(e,r)}};function Xy(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:Qy}=OA(),A3="vueuc-style";function Zy(e){return typeof e=="string"?document.querySelector(e):e()}const k3=mt({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:xv(on(e,"show")),mergedTo:Fe(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?Yy("lazy-teleport",this.$slots):R(DA,{disabled:this.disabled,to:this.mergedTo},Yy("lazy-teleport",this.$slots)):null}});var za=[],I3=function(){return za.some(function(e){return e.activeTargets.length>0})},R3=function(){return za.some(function(e){return e.skippedTargets.length>0})},Jy="ResizeObserver loop completed with undelivered notifications.",B3=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Jy}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Jy),window.dispatchEvent(e)},pu;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(pu||(pu={}));var Ua=function(e){return Object.freeze(e)},P3=(function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Ua(this)}return e})(),Sv=(function(){function e(t,n,r,s){return this.x=t,this.y=n,this.width=r,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ua(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,r=t.y,s=t.top,i=t.right,a=t.bottom,o=t.left,c=t.width,l=t.height;return{x:n,y:r,top:s,right:i,bottom:a,left:o,width:c,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Bb=function(e){return e instanceof SVGElement&&"getBBox"in e},_v=function(e){if(Bb(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var s=e,i=s.offsetWidth,a=s.offsetHeight;return!(i||a||e.getClientRects().length)},eE=function(e){var t;if(e instanceof Element)return!0;var n=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},N3=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ql=typeof window<"u"?window:{},sd=new WeakMap,tE=/auto|scroll/,O3=/^tb|vertical/,D3=/msie|trident/i.test(Ql.navigator&&Ql.navigator.userAgent),Js=function(e){return parseFloat(e||"0")},oc=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new P3((n?t:e)||0,(n?e:t)||0)},nE=Ua({devicePixelContentBoxSize:oc(),borderBoxSize:oc(),contentBoxSize:oc(),contentRect:new Sv(0,0,0,0)}),wv=function(e,t){if(t===void 0&&(t=!1),sd.has(e)&&!t)return sd.get(e);if(_v(e))return sd.set(e,nE),nE;var n=getComputedStyle(e),r=Bb(e)&&e.ownerSVGElement&&e.getBBox(),s=!D3&&n.boxSizing==="border-box",i=O3.test(n.writingMode||""),a=!r&&tE.test(n.overflowY||""),o=!r&&tE.test(n.overflowX||""),c=r?0:Js(n.paddingTop),l=r?0:Js(n.paddingRight),d=r?0:Js(n.paddingBottom),f=r?0:Js(n.paddingLeft),m=r?0:Js(n.borderTopWidth),h=r?0:Js(n.borderRightWidth),g=r?0:Js(n.borderBottomWidth),b=r?0:Js(n.borderLeftWidth),p=f+l,y=c+d,C=b+h,A=m+g,T=o?e.offsetHeight-A-e.clientHeight:0,S=a?e.offsetWidth-C-e.clientWidth:0,w=s?p+C:0,v=s?y+A:0,O=r?r.width:Js(n.width)-w-S,F=r?r.height:Js(n.height)-v-T,X=O+p+S+C,me=F+y+T+A,N=Ua({devicePixelContentBoxSize:oc(Math.round(O*devicePixelRatio),Math.round(F*devicePixelRatio),i),borderBoxSize:oc(X,me,i),contentBoxSize:oc(O,F,i),contentRect:new Sv(f,c,O,F)});return sd.set(e,N),N},Av=function(e,t,n){var r=wv(e,n),s=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case pu.DEVICE_PIXEL_CONTENT_BOX:return a;case pu.BORDER_BOX:return s;default:return i}},L3=(function(){function e(t){var n=wv(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Ua([n.borderBoxSize]),this.contentBoxSize=Ua([n.contentBoxSize]),this.devicePixelContentBoxSize=Ua([n.devicePixelContentBoxSize])}return e})(),kv=function(e){if(_v(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},M3=function(){var e=1/0,t=[];za.forEach(function(a){if(a.activeTargets.length!==0){var o=[];a.activeTargets.forEach(function(l){var d=new L3(l.target),f=kv(l.target);o.push(d),l.lastReportedSize=Av(l.target,l.observedBox),f<e&&(e=f)}),t.push(function(){a.callback.call(a.observer,o,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,r=t;n<r.length;n++){var s=r[n];s()}return e},rE=function(e){za.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(s){s.isActive()&&(kv(s.target)>e?n.activeTargets.push(s):n.skippedTargets.push(s))})})},F3=function(){var e=0;for(rE(e);I3();)e=M3(),rE(e);return R3()&&B3(),e>0},Zh,Iv=[],z3=function(){return Iv.splice(0).forEach(function(e){return e()})},U3=function(e){if(!Zh){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return z3()}).observe(n,r),Zh=function(){n.textContent="".concat(t?t--:t++)}}Iv.push(e),Zh()},$3=function(e){U3(function(){requestAnimationFrame(e)})},Pd=0,H3=function(){return!!Pd},q3=250,j3={attributes:!0,characterData:!0,childList:!0,subtree:!0},sE=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],iE=function(e){return e===void 0&&(e=0),Date.now()+e},Jh=!1,W3=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=q3),!Jh){Jh=!0;var r=iE(t);$3(function(){var s=!1;try{s=F3()}finally{if(Jh=!1,t=r-iE(),!H3())return;s?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,j3)};document.body?n():Ql.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),sE.forEach(function(n){return Ql.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),sE.forEach(function(n){return Ql.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e})(),H0=new W3,aE=function(e){!Pd&&e>0&&H0.start(),Pd+=e,!Pd&&H0.stop()},G3=function(e){return!Bb(e)&&!N3(e)&&getComputedStyle(e).display==="inline"},V3=(function(){function e(t,n){this.target=t,this.observedBox=n||pu.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Av(this.target,this.observedBox,!0);return G3(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),K3=(function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e})(),id=new WeakMap,oE=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ad=(function(){function e(){}return e.connect=function(t,n){var r=new K3(t,n);id.set(t,r)},e.observe=function(t,n,r){var s=id.get(t),i=s.observationTargets.length===0;oE(s.observationTargets,n)<0&&(i&&za.push(s),s.observationTargets.push(new V3(n,r&&r.box)),aE(1),H0.schedule())},e.unobserve=function(t,n){var r=id.get(t),s=oE(r.observationTargets,n),i=r.observationTargets.length===1;s>=0&&(i&&za.splice(za.indexOf(r),1),r.observationTargets.splice(s,1),aE(-1))},e.disconnect=function(t){var n=this,r=id.get(t);r.observationTargets.slice().forEach(function(s){return n.unobserve(t,s.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e})(),Y3=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ad.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!eE(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ad.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!eE(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ad.unobserve(this,t)},e.prototype.disconnect=function(){ad.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();class X3{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||Y3)(this.handleResize),this.elHandlersMap=new Map}handleResize(t){for(const n of t){const r=this.elHandlersMap.get(n.target);r!==void 0&&r(n)}}registerHandler(t,n){this.elHandlersMap.set(t,n),this.observer.observe(t)}unregisterHandler(t){this.elHandlersMap.has(t)&&(this.elHandlersMap.delete(t),this.observer.unobserve(t))}}const cE=new X3,cc=mt({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=hb().proxy;function r(s){const{onResize:i}=e;i!==void 0&&i(s)}Ao(()=>{const s=n.$el;if(s===void 0){Xy("resize-observer","$el does not exist.");return}if(s.nextElementSibling!==s.nextSibling&&s.nodeType===3&&s.nodeValue!==""){Xy("resize-observer","$el can not be observed (it may be a text node).");return}s.nextElementSibling!==null&&(cE.registerHandler(s.nextElementSibling,r),t=!0)}),pi(()=>{t&&cE.unregisterHandler(n.$el.nextElementSibling)})},render(){return LA(this.$slots,"default")}}),Q3=Qy(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[Qy("&::-webkit-scrollbar",{width:0,height:0})]),Z3=mt({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=Me(null);function t(s){!(s.currentTarget.offsetWidth<s.currentTarget.scrollWidth)||s.deltaY===0||(s.currentTarget.scrollLeft+=s.deltaY+s.deltaX,s.preventDefault())}const n=MA();return Q3.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:A3,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...s){var i;(i=e.value)===null||i===void 0||i.scrollTo(...s)}})},render(){return R("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}});function Rv(e){return e instanceof HTMLElement}function Bv(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(Rv(n)&&(Nv(n)||Bv(n)))return!0}return!1}function Pv(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(Rv(n)&&(Nv(n)||Pv(n)))return!0}return!1}function Nv(e){if(!J3(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function J3(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.getAttribute("disabled"))return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return e.type!=="hidden"&&e.type!=="file";case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}}let Fl=[];const ek=mt({name:"FocusTrap",props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:String,finalFocusTo:String,returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){const t=gb(),n=Me(null),r=Me(null);let s=!1,i=!1;const a=typeof document>"u"?null:document.activeElement;function o(){return Fl[Fl.length-1]===t}function c(p){var y;p.code==="Escape"&&o()&&((y=e.onEsc)===null||y===void 0||y.call(e,p))}Ao(()=>{ss(()=>e.active,p=>{p?(f(),Yn("keydown",document,c)):(mr("keydown",document,c),s&&m())},{immediate:!0})}),pi(()=>{mr("keydown",document,c),s&&m()});function l(p){if(!i&&o()){const y=d();if(y===null||y.contains(kb(p)))return;h("first")}}function d(){const p=n.value;if(p===null)return null;let y=p;for(;y=y.nextSibling,!(y===null||y instanceof Element&&y.tagName==="DIV"););return y}function f(){var p;if(!e.disabled){if(Fl.push(t),e.autoFocus){const{initialFocusTo:y}=e;y===void 0?h("first"):(p=Zy(y))===null||p===void 0||p.focus({preventScroll:!0})}s=!0,document.addEventListener("focus",l,!0)}}function m(){var p;if(e.disabled||(document.removeEventListener("focus",l,!0),Fl=Fl.filter(C=>C!==t),o()))return;const{finalFocusTo:y}=e;y!==void 0?(p=Zy(y))===null||p===void 0||p.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&a instanceof HTMLElement&&(i=!0,a.focus({preventScroll:!0}),i=!1)}function h(p){if(o()&&e.active){const y=n.value,C=r.value;if(y!==null&&C!==null){const A=d();if(A==null||A===C){i=!0,y.focus({preventScroll:!0}),i=!1;return}i=!0;const T=p==="first"?Bv(A):Pv(A);i=!1,T||(i=!0,y.focus({preventScroll:!0}),i=!1)}}}function g(p){if(i)return;const y=d();y!==null&&(p.relatedTarget!==null&&y.contains(p.relatedTarget)?h("last"):h("first"))}function b(p){i||(p.relatedTarget!==null&&p.relatedTarget===n.value?h("last"):h("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:g,handleEndFocus:b}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return R(ma,null,[R("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),R("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function lE(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const tk=/^(\d|\.)+$/,uE=/(\d|\.)+/;function Vo(e,{c:t=1,offset:n=0,attachPx:r=!0}={}){if(typeof e=="number"){const s=(e+n)*t;return s===0?"0":`${s}px`}else if(typeof e=="string")if(tk.test(e)){const s=(Number(e)+n)*t;return r?s===0?"0":`${s}px`:`${s}`}else{const s=uE.exec(e);return s?e.replace(uE,String((Number(s[0])+n)*t)):e}return e}function dE(e){const{left:t,right:n,top:r,bottom:s}=Is(e);return`${r} ${t} ${s} ${n}`}const nk=new WeakSet;function rk(e){return!nk.has(e)}function vt(e,...t){if(Array.isArray(e))e.forEach(n=>vt(n,...t));else return e(...t)}function Si(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push($t(String(r)));return}if(Array.isArray(r)){Si(r,t,n);return}if(r.type===ma){if(r.children===null)return;Array.isArray(r.children)&&Si(r.children,t,n)}else{if(r.type===bb&&t)return;n.push(r)}}}),n}function sk(e,t,n){if(!t)return null;const r=Si(t(n));return r.length===1?r[0]:(nv("getFirstSlotVNode",`slot[${e}] should have exactly one child`),null)}function Pb(e,t="default",n=[]){const s=e.$slots[t];return s===void 0?n:s()}function q0(e,t=[],n){const r={};return t.forEach(s=>{r[s]=e[s]}),Object.assign(r,n)}function Nb(e){return Object.keys(e)}function As(e){return e.some(t=>pb(t)?!(t.type===bb||t.type===ma&&!As(t.children)):!0)?e:null}function li(e,t){return e&&As(e())||t()}function j0(e,t,n){return e&&As(e(t))||n(t)}function $n(e,t){const n=e&&As(e());return t(n||null)}function ik(e,t,n){const r=e&&As(e(t));return n(r||null)}function ak(e){return!(e&&As(e()))}const fE=mt({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),hE=ls("n-form-item");function Ou(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const s=cs(hE,null);ci(hE,null);const i=Fe(n?()=>n(s):()=>{const{size:c}=e;if(c)return c;if(s){const{mergedSize:l}=s;if(l.value!==void 0)return l.value}return t}),a=Fe(r?()=>r(s):()=>{const{disabled:c}=e;return c!==void 0?c:s?s.disabled.value:!1}),o=Fe(()=>{const{status:c}=e;return c||s?.mergedValidationStatus.value});return pi(()=>{s&&s.restoreValidation()}),{mergedSizeRef:i,mergedDisabledRef:a,mergedStatusRef:o,nTriggerFormBlur(){s&&s.handleContentBlur()},nTriggerFormChange(){s&&s.handleContentChange()},nTriggerFormFocus(){s&&s.handleContentFocus()},nTriggerFormInput(){s&&s.handleContentInput()}}}const ok={name:"en-US",global:{undo:"Undo",redo:"Redo",confirm:"Confirm",clear:"Clear"},Popconfirm:{positiveText:"Confirm",negativeText:"Cancel"},Cascader:{placeholder:"Please Select",loading:"Loading",loadingRequiredMessage:e=>`Please load all ${e}'s descendants before checking it.`},Time:{dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss"},DatePicker:{yearFormat:"yyyy",monthFormat:"MMM",dayFormat:"eeeeee",yearTypeFormat:"yyyy",monthTypeFormat:"yyyy-MM",dateFormat:"yyyy-MM-dd",dateTimeFormat:"yyyy-MM-dd HH:mm:ss",quarterFormat:"yyyy-qqq",weekFormat:"YYYY-w",clear:"Clear",now:"Now",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",datePlaceholder:"Select Date",datetimePlaceholder:"Select Date and Time",monthPlaceholder:"Select Month",yearPlaceholder:"Select Year",quarterPlaceholder:"Select Quarter",weekPlaceholder:"Select Week",startDatePlaceholder:"Start Date",endDatePlaceholder:"End Date",startDatetimePlaceholder:"Start Date and Time",endDatetimePlaceholder:"End Date and Time",startMonthPlaceholder:"Start Month",endMonthPlaceholder:"End Month",monthBeforeYear:!0,firstDayOfWeek:6,today:"Today"},DataTable:{checkTableAll:"Select all in the table",uncheckTableAll:"Unselect all in the table",confirm:"Confirm",clear:"Clear"},LegacyTransfer:{sourceTitle:"Source",targetTitle:"Target"},Transfer:{selectAll:"Select all",unselectAll:"Unselect all",clearAll:"Clear",total:e=>`Total ${e} items`,selected:e=>`${e} items selected`},Empty:{description:"No Data"},Select:{placeholder:"Please Select"},TimePicker:{placeholder:"Select Time",positiveText:"OK",negativeText:"Cancel",now:"Now",clear:"Clear"},Pagination:{goto:"Goto",selectionSuffix:"page"},DynamicTags:{add:"Add"},Log:{loading:"Loading"},Input:{placeholder:"Please Input"},InputNumber:{placeholder:"Please Input"},DynamicInput:{create:"Create"},ThemeEditor:{title:"Theme Editor",clearAllVars:"Clear All Variables",clearSearch:"Clear Search",filterCompName:"Filter Component Name",filterVarName:"Filter Variable Name",import:"Import",export:"Export",restore:"Reset to Default"},Image:{tipPrevious:"Previous picture (←)",tipNext:"Next picture (→)",tipCounterclockwise:"Counterclockwise",tipClockwise:"Clockwise",tipZoomOut:"Zoom out",tipZoomIn:"Zoom in",tipDownload:"Download",tipClose:"Close (Esc)",tipOriginalSize:"Zoom to original size"}};function em(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function zl(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):a;s=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;s=e.values[o]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}function Ul(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const a=i[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?lk(o,f=>f.test(a)):ck(o,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const d=t.slice(a.length);return{value:l,rest:d}}}function ck(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lk(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function uk(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(s.length);return{value:a,rest:o}}}const dk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},fk=(e,t,n)=>{let r;const s=dk[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},hk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mk=(e,t,n,r)=>hk[e],gk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bk={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pk={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},yk={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ek={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ck={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},xk=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vk={ordinalNumber:xk,era:zl({values:gk,defaultWidth:"wide"}),quarter:zl({values:bk,defaultWidth:"wide",argumentCallback:e=>e-1}),month:zl({values:pk,defaultWidth:"wide"}),day:zl({values:yk,defaultWidth:"wide"}),dayPeriod:zl({values:Ek,defaultWidth:"wide",formattingValues:Ck,defaultFormattingWidth:"wide"})},Tk=/^(\d+)(th|st|nd|rd)?/i,Sk=/\d+/i,_k={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wk={any:[/^b/i,/^(a|c)/i]},Ak={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kk={any:[/1/i,/2/i,/3/i,/4/i]},Ik={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Rk={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Bk={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Pk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ok={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dk={ordinalNumber:uk({matchPattern:Tk,parsePattern:Sk,valueCallback:e=>parseInt(e,10)}),era:Ul({matchPatterns:_k,defaultMatchWidth:"wide",parsePatterns:wk,defaultParseWidth:"any"}),quarter:Ul({matchPatterns:Ak,defaultMatchWidth:"wide",parsePatterns:kk,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ul({matchPatterns:Ik,defaultMatchWidth:"wide",parsePatterns:Rk,defaultParseWidth:"any"}),day:Ul({matchPatterns:Bk,defaultMatchWidth:"wide",parsePatterns:Pk,defaultParseWidth:"any"}),dayPeriod:Ul({matchPatterns:Nk,defaultMatchWidth:"any",parsePatterns:Ok,defaultParseWidth:"any"})},Lk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Mk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Fk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zk={date:em({formats:Lk,defaultWidth:"full"}),time:em({formats:Mk,defaultWidth:"full"}),dateTime:em({formats:Fk,defaultWidth:"full"})},Uk={code:"en-US",formatDistance:fk,formatLong:zk,formatRelative:mk,localize:vk,match:Dk,options:{weekStartsOn:0,firstWeekContainsDate:1}},$k={name:"en-US",locale:Uk};var Hk=/\s/;function qk(e){for(var t=e.length;t--&&Hk.test(e.charAt(t)););return t}var jk=/^\s+/;function Wk(e){return e&&e.slice(0,qk(e)+1).replace(jk,"")}var mE=NaN,Gk=/^[-+]0x[0-9a-f]+$/i,Vk=/^0b[01]+$/i,Kk=/^0o[0-7]+$/i,Yk=parseInt;function gE(e){if(typeof e=="number")return e;if(FA(e))return mE;if(xf(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xf(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Wk(e);var n=Vk.test(e);return n||Kk.test(e)?Yk(e.slice(2),n?2:8):Gk.test(e)?mE:+e}var tm=function(){return zA.Date.now()},Xk="Expected a function",Qk=Math.max,Zk=Math.min;function Jk(e,t,n){var r,s,i,a,o,c,l=0,d=!1,f=!1,m=!0;if(typeof e!="function")throw new TypeError(Xk);t=gE(t)||0,xf(n)&&(d=!!n.leading,f="maxWait"in n,i=f?Qk(gE(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m);function h(w){var v=r,O=s;return r=s=void 0,l=w,a=e.apply(O,v),a}function g(w){return l=w,o=setTimeout(y,t),d?h(w):a}function b(w){var v=w-c,O=w-l,F=t-v;return f?Zk(F,i-O):F}function p(w){var v=w-c,O=w-l;return c===void 0||v>=t||v<0||f&&O>=i}function y(){var w=tm();if(p(w))return C(w);o=setTimeout(y,b(w))}function C(w){return o=void 0,m&&r?h(w):(r=s=void 0,a)}function A(){o!==void 0&&clearTimeout(o),l=0,r=c=s=o=void 0}function T(){return o===void 0?a:C(tm())}function S(){var w=tm(),v=p(w);if(r=arguments,s=this,c=w,v){if(o===void 0)return g(c);if(f)return clearTimeout(o),o=setTimeout(y,t),h(c)}return o===void 0&&(o=setTimeout(y,t)),a}return S.cancel=A,S.flush=T,S}var eI="Expected a function";function nm(e,t,n){var r=!0,s=!0;if(typeof e!="function")throw new TypeError(eI);return xf(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),Jk(e,t,{leading:r,maxWait:t,trailing:s})}function tI(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=cs(UA,null)||{},r=Fe(()=>{var i,a;return(a=(i=t?.value)===null||i===void 0?void 0:i[e])!==null&&a!==void 0?a:ok[e]});return{dateLocaleRef:Fe(()=>{var i;return(i=n?.value)!==null&&i!==void 0?i:$k}),localeRef:r}}const nI=mt({name:"Add",render(){return R("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},R("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),rI=mt({name:"Checkmark",render(){return R("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},R("g",{fill:"none"},R("path",{d:"M14.046 3.486a.75.75 0 0 1-.032 1.06l-7.93 7.474a.85.85 0 0 1-1.188-.022l-2.68-2.72a.75.75 0 1 1 1.068-1.053l2.234 2.267l7.468-7.038a.75.75 0 0 1 1.06.032z",fill:"currentColor"})))}}),sI=mt({name:"ChevronDown",render(){return R("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},R("path",{d:"M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z",fill:"currentColor"}))}}),iI=mt({name:"ChevronLeft",render(){return R("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},R("path",{d:"M10.3536 3.14645C10.5488 3.34171 10.5488 3.65829 10.3536 3.85355L6.20711 8L10.3536 12.1464C10.5488 12.3417 10.5488 12.6583 10.3536 12.8536C10.1583 13.0488 9.84171 13.0488 9.64645 12.8536L5.14645 8.35355C4.95118 8.15829 4.95118 7.84171 5.14645 7.64645L9.64645 3.14645C9.84171 2.95118 10.1583 2.95118 10.3536 3.14645Z",fill:"currentColor"}))}}),aI=mt({name:"ChevronRight",render(){return R("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},R("path",{d:"M5.64645 3.14645C5.45118 3.34171 5.45118 3.65829 5.64645 3.85355L9.79289 8L5.64645 12.1464C5.45118 12.3417 5.45118 12.6583 5.64645 12.8536C5.84171 13.0488 6.15829 13.0488 6.35355 12.8536L10.8536 8.35355C11.0488 8.15829 11.0488 7.84171 10.8536 7.64645L6.35355 3.14645C6.15829 2.95118 5.84171 2.95118 5.64645 3.14645Z",fill:"currentColor"}))}}),oI=$A("clear",()=>R("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},R("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},R("g",{fill:"currentColor","fill-rule":"nonzero"},R("path",{d:"M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z"}))))),cI=mt({name:"Eye",render(){return R("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},R("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"}),R("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),lI=mt({name:"EyeOff",render(){return R("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},R("path",{d:"M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z",fill:"currentColor"}),R("path",{d:"M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z",fill:"currentColor"}),R("path",{d:"M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z",fill:"currentColor"}),R("path",{d:"M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z",fill:"currentColor"}),R("path",{d:"M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z",fill:"currentColor"}))}}),uI=j("base-clear",`
10
+ flex-shrink: 0;
11
+ height: 1em;
12
+ width: 1em;
13
+ position: relative;
14
+ `,[ce(">",[J("clear",`
15
+ font-size: var(--n-clear-size);
16
+ height: 1em;
17
+ width: 1em;
18
+ cursor: pointer;
19
+ color: var(--n-clear-color);
20
+ transition: color .3s var(--n-bezier);
21
+ display: flex;
22
+ `,[ce("&:hover",`
23
+ color: var(--n-clear-color-hover)!important;
24
+ `),ce("&:active",`
25
+ color: var(--n-clear-color-pressed)!important;
26
+ `)]),J("placeholder",`
27
+ display: flex;
28
+ `),J("clear, placeholder",`
29
+ position: absolute;
30
+ left: 50%;
31
+ top: 50%;
32
+ transform: translateX(-50%) translateY(-50%);
33
+ `,[ic({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),W0=mt({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return bh("-base-clear",uI,on(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return R("div",{class:`${e}-base-clear`},R(gh,null,{default:()=>{var t,n;return this.show?R("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},li(this.$slots.icon,()=>[R(Vs,{clsPrefix:e},{default:()=>R(oI,null)})])):R("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),{cubicBezierEaseInOut:bE}=yb;function Ov({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:r=bE,leaveCubicBezier:s=bE}={}){return[ce(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),ce(`&.${e}-transition-leave-active`,{transition:`all ${n} ${s}!important`}),ce(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),ce(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const dI={railInsetHorizontalBottom:"auto 2px 4px 2px",railInsetHorizontalTop:"4px 2px auto 2px",railInsetVerticalRight:"2px 4px 2px auto",railInsetVerticalLeft:"2px auto 2px 4px",railColor:"transparent"};function fI(e){const{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:s,scrollbarBorderRadius:i}=e;return Object.assign(Object.assign({},dI),{height:r,width:s,borderRadius:i,color:t,colorHover:n})}const Dv={name:"Scrollbar",common:ys,self:fI},hI=j("scrollbar",`
34
+ overflow: hidden;
35
+ position: relative;
36
+ z-index: auto;
37
+ height: 100%;
38
+ width: 100%;
39
+ `,[ce(">",[j("scrollbar-container",`
40
+ width: 100%;
41
+ overflow: scroll;
42
+ height: 100%;
43
+ min-height: inherit;
44
+ max-height: inherit;
45
+ scrollbar-width: none;
46
+ `,[ce("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
47
+ width: 0;
48
+ height: 0;
49
+ display: none;
50
+ `),ce(">",[j("scrollbar-content",`
51
+ box-sizing: border-box;
52
+ min-width: 100%;
53
+ `)])])]),ce(">, +",[j("scrollbar-rail",`
54
+ position: absolute;
55
+ pointer-events: none;
56
+ user-select: none;
57
+ background: var(--n-scrollbar-rail-color);
58
+ -webkit-user-select: none;
59
+ `,[oe("horizontal",`
60
+ height: var(--n-scrollbar-height);
61
+ `,[ce(">",[J("scrollbar",`
62
+ height: var(--n-scrollbar-height);
63
+ border-radius: var(--n-scrollbar-border-radius);
64
+ right: 0;
65
+ `)])]),oe("horizontal--top",`
66
+ top: var(--n-scrollbar-rail-top-horizontal-top);
67
+ right: var(--n-scrollbar-rail-right-horizontal-top);
68
+ bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
69
+ left: var(--n-scrollbar-rail-left-horizontal-top);
70
+ `),oe("horizontal--bottom",`
71
+ top: var(--n-scrollbar-rail-top-horizontal-bottom);
72
+ right: var(--n-scrollbar-rail-right-horizontal-bottom);
73
+ bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
74
+ left: var(--n-scrollbar-rail-left-horizontal-bottom);
75
+ `),oe("vertical",`
76
+ width: var(--n-scrollbar-width);
77
+ `,[ce(">",[J("scrollbar",`
78
+ width: var(--n-scrollbar-width);
79
+ border-radius: var(--n-scrollbar-border-radius);
80
+ bottom: 0;
81
+ `)])]),oe("vertical--left",`
82
+ top: var(--n-scrollbar-rail-top-vertical-left);
83
+ right: var(--n-scrollbar-rail-right-vertical-left);
84
+ bottom: var(--n-scrollbar-rail-bottom-vertical-left);
85
+ left: var(--n-scrollbar-rail-left-vertical-left);
86
+ `),oe("vertical--right",`
87
+ top: var(--n-scrollbar-rail-top-vertical-right);
88
+ right: var(--n-scrollbar-rail-right-vertical-right);
89
+ bottom: var(--n-scrollbar-rail-bottom-vertical-right);
90
+ left: var(--n-scrollbar-rail-left-vertical-right);
91
+ `),oe("disabled",[ce(">",[J("scrollbar","pointer-events: none;")])]),ce(">",[J("scrollbar",`
92
+ z-index: 1;
93
+ position: absolute;
94
+ cursor: pointer;
95
+ pointer-events: all;
96
+ background-color: var(--n-scrollbar-color);
97
+ transition: background-color .2s var(--n-scrollbar-bezier);
98
+ `,[Ov(),ce("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),mI=Object.assign(Object.assign({},rn.props),{duration:{type:Number,default:0},scrollable:{type:Boolean,default:!0},xScrollable:Boolean,trigger:{type:String,default:"hover"},useUnifiedContainer:Boolean,triggerDisplayManually:Boolean,container:Function,content:Function,containerClass:String,containerStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],horizontalRailStyle:[String,Object],verticalRailStyle:[String,Object],onScroll:Function,onWheel:Function,onResize:Function,internalOnUpdateScrollLeft:Function,internalHoistYRail:Boolean,yPlacement:{type:String,default:"right"},xPlacement:{type:String,default:"bottom"}}),Lv=mt({name:"Scrollbar",props:mI,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=Er(e),s=Ks("Scrollbar",r,t),i=Me(null),a=Me(null),o=Me(null),c=Me(null),l=Me(null),d=Me(null),f=Me(null),m=Me(null),h=Me(null),g=Me(null),b=Me(null),p=Me(0),y=Me(0),C=Me(!1),A=Me(!1);let T=!1,S=!1,w,v,O=0,F=0,X=0,me=0;const N=g3(),Y=rn("Scrollbar","-scrollbar",hI,Dv,e,t),x=Fe(()=>{const{value:we}=m,{value:Xe}=d,{value:ct}=g;return we===null||Xe===null||ct===null?0:Math.min(we,ct*we/Xe+bu(Y.value.self.width)*1.5)}),Z=Fe(()=>`${x.value}px`),Le=Fe(()=>{const{value:we}=h,{value:Xe}=f,{value:ct}=b;return we===null||Xe===null||ct===null?0:ct*we/Xe+bu(Y.value.self.height)*1.5}),re=Fe(()=>`${Le.value}px`),He=Fe(()=>{const{value:we}=m,{value:Xe}=p,{value:ct}=d,{value:qt}=g;if(we===null||ct===null||qt===null)return 0;{const vn=ct-we;return vn?Xe/vn*(qt-x.value):0}}),he=Fe(()=>`${He.value}px`),ze=Fe(()=>{const{value:we}=h,{value:Xe}=y,{value:ct}=f,{value:qt}=b;if(we===null||ct===null||qt===null)return 0;{const vn=ct-we;return vn?Xe/vn*(qt-Le.value):0}}),Q=Fe(()=>`${ze.value}px`),K=Fe(()=>{const{value:we}=m,{value:Xe}=d;return we!==null&&Xe!==null&&Xe>we}),Qe=Fe(()=>{const{value:we}=h,{value:Xe}=f;return we!==null&&Xe!==null&&Xe>we}),De=Fe(()=>{const{trigger:we}=e;return we==="none"||C.value}),Be=Fe(()=>{const{trigger:we}=e;return we==="none"||A.value}),et=Fe(()=>{const{container:we}=e;return we?we():a.value}),Wt=Fe(()=>{const{content:we}=e;return we?we():o.value}),ft=(we,Xe)=>{if(!e.scrollable)return;if(typeof we=="number"){Sn(we,Xe??0,0,!1,"auto");return}const{left:ct,top:qt,index:vn,elSize:Fn,position:_n,behavior:Ut,el:cr,debounce:vs=!0}=we;(ct!==void 0||qt!==void 0)&&Sn(ct??0,qt??0,0,!1,Ut),cr!==void 0?Sn(0,cr.offsetTop,cr.offsetHeight,vs,Ut):vn!==void 0&&Fn!==void 0?Sn(0,vn*Fn,Fn,vs,Ut):_n==="bottom"?Sn(0,Number.MAX_SAFE_INTEGER,0,!1,Ut):_n==="top"&&Sn(0,0,0,!1,Ut)},Ke=v3(()=>{e.container||ft({top:p.value,left:y.value})}),Ot=()=>{Ke.isDeactivated||ye()},Ft=we=>{if(Ke.isDeactivated)return;const{onResize:Xe}=e;Xe&&Xe(we),ye()},ar=(we,Xe)=>{if(!e.scrollable)return;const{value:ct}=et;ct&&(typeof we=="object"?ct.scrollBy(we):ct.scrollBy(we,Xe||0))};function Sn(we,Xe,ct,qt,vn){const{value:Fn}=et;if(Fn){if(qt){const{scrollTop:_n,offsetHeight:Ut}=Fn;if(Xe>_n){Xe+ct<=_n+Ut||Fn.scrollTo({left:we,top:Xe+ct-Ut,behavior:vn});return}}Fn.scrollTo({left:we,top:Xe,behavior:vn})}}function E(){W(),U(),ye()}function de(){se()}function se(){L(),I()}function L(){v!==void 0&&window.clearTimeout(v),v=window.setTimeout(()=>{A.value=!1},e.duration)}function I(){w!==void 0&&window.clearTimeout(w),w=window.setTimeout(()=>{C.value=!1},e.duration)}function W(){w!==void 0&&window.clearTimeout(w),C.value=!0}function U(){v!==void 0&&window.clearTimeout(v),A.value=!0}function q(we){const{onScroll:Xe}=e;Xe&&Xe(we),$()}function $(){const{value:we}=et;we&&(p.value=we.scrollTop,y.value=we.scrollLeft*(s?.value?-1:1))}function ae(){const{value:we}=Wt;we&&(d.value=we.offsetHeight,f.value=we.offsetWidth);const{value:Xe}=et;Xe&&(m.value=Xe.offsetHeight,h.value=Xe.offsetWidth);const{value:ct}=l,{value:qt}=c;ct&&(b.value=ct.offsetWidth),qt&&(g.value=qt.offsetHeight)}function Pe(){const{value:we}=et;we&&(p.value=we.scrollTop,y.value=we.scrollLeft*(s?.value?-1:1),m.value=we.offsetHeight,h.value=we.offsetWidth,d.value=we.scrollHeight,f.value=we.scrollWidth);const{value:Xe}=l,{value:ct}=c;Xe&&(b.value=Xe.offsetWidth),ct&&(g.value=ct.offsetHeight)}function ye(){e.scrollable&&(e.useUnifiedContainer?Pe():(ae(),$()))}function Ye(we){var Xe;return!(!((Xe=i.value)===null||Xe===void 0)&&Xe.contains(kb(we)))}function It(we){we.preventDefault(),we.stopPropagation(),S=!0,Yn("mousemove",window,ht,!0),Yn("mouseup",window,Zn,!0),F=y.value,X=s?.value?window.innerWidth-we.clientX:we.clientX}function ht(we){if(!S)return;w!==void 0&&window.clearTimeout(w),v!==void 0&&window.clearTimeout(v);const{value:Xe}=h,{value:ct}=f,{value:qt}=Le;if(Xe===null||ct===null)return;const Fn=(s?.value?window.innerWidth-we.clientX-X:we.clientX-X)*(ct-Xe)/(Xe-qt),_n=ct-Xe;let Ut=F+Fn;Ut=Math.min(_n,Ut),Ut=Math.max(Ut,0);const{value:cr}=et;if(cr){cr.scrollLeft=Ut*(s?.value?-1:1);const{internalOnUpdateScrollLeft:vs}=e;vs&&vs(Ut)}}function Zn(we){we.preventDefault(),we.stopPropagation(),mr("mousemove",window,ht,!0),mr("mouseup",window,Zn,!0),S=!1,ye(),Ye(we)&&se()}function $s(we){we.preventDefault(),we.stopPropagation(),T=!0,Yn("mousemove",window,or,!0),Yn("mouseup",window,ds,!0),O=p.value,me=we.clientY}function or(we){if(!T)return;w!==void 0&&window.clearTimeout(w),v!==void 0&&window.clearTimeout(v);const{value:Xe}=m,{value:ct}=d,{value:qt}=x;if(Xe===null||ct===null)return;const Fn=(we.clientY-me)*(ct-Xe)/(Xe-qt),_n=ct-Xe;let Ut=O+Fn;Ut=Math.min(_n,Ut),Ut=Math.max(Ut,0);const{value:cr}=et;cr&&(cr.scrollTop=Ut)}function ds(we){we.preventDefault(),we.stopPropagation(),mr("mousemove",window,or,!0),mr("mouseup",window,ds,!0),T=!1,ye(),Ye(we)&&se()}vf(()=>{const{value:we}=Qe,{value:Xe}=K,{value:ct}=t,{value:qt}=l,{value:vn}=c;qt&&(we?qt.classList.remove(`${ct}-scrollbar-rail--disabled`):qt.classList.add(`${ct}-scrollbar-rail--disabled`)),vn&&(Xe?vn.classList.remove(`${ct}-scrollbar-rail--disabled`):vn.classList.add(`${ct}-scrollbar-rail--disabled`))}),Ao(()=>{e.container||ye()}),pi(()=>{w!==void 0&&window.clearTimeout(w),v!==void 0&&window.clearTimeout(v),mr("mousemove",window,or,!0),mr("mouseup",window,ds,!0)});const Qt=Fe(()=>{const{common:{cubicBezierEaseInOut:we},self:{color:Xe,colorHover:ct,height:qt,width:vn,borderRadius:Fn,railInsetHorizontalTop:_n,railInsetHorizontalBottom:Ut,railInsetVerticalRight:cr,railInsetVerticalLeft:vs,railColor:$o}}=Y.value,{top:Pl,right:Di,bottom:Li,left:Nl}=Is(_n),{top:Ol,right:Ho,bottom:Mi,left:G}=Is(Ut),{top:be,right:it,bottom:Zt,left:wn}=Is(s?.value?dE(cr):cr),{top:Kt,right:Ei,bottom:Ci,left:xi}=Is(s?.value?dE(vs):vs);return{"--n-scrollbar-bezier":we,"--n-scrollbar-color":Xe,"--n-scrollbar-color-hover":ct,"--n-scrollbar-border-radius":Fn,"--n-scrollbar-width":vn,"--n-scrollbar-height":qt,"--n-scrollbar-rail-top-horizontal-top":Pl,"--n-scrollbar-rail-right-horizontal-top":Di,"--n-scrollbar-rail-bottom-horizontal-top":Li,"--n-scrollbar-rail-left-horizontal-top":Nl,"--n-scrollbar-rail-top-horizontal-bottom":Ol,"--n-scrollbar-rail-right-horizontal-bottom":Ho,"--n-scrollbar-rail-bottom-horizontal-bottom":Mi,"--n-scrollbar-rail-left-horizontal-bottom":G,"--n-scrollbar-rail-top-vertical-right":be,"--n-scrollbar-rail-right-vertical-right":it,"--n-scrollbar-rail-bottom-vertical-right":Zt,"--n-scrollbar-rail-left-vertical-right":wn,"--n-scrollbar-rail-top-vertical-left":Kt,"--n-scrollbar-rail-right-vertical-left":Ei,"--n-scrollbar-rail-bottom-vertical-left":Ci,"--n-scrollbar-rail-left-vertical-left":xi,"--n-scrollbar-rail-color":$o}}),$r=n?Es("scrollbar",void 0,Qt,e):void 0;return Object.assign(Object.assign({},{scrollTo:ft,scrollBy:ar,sync:ye,syncUnifiedContainer:Pe,handleMouseEnterWrapper:E,handleMouseLeaveWrapper:de}),{mergedClsPrefix:t,rtlEnabled:s,containerScrollTop:p,wrapperRef:i,containerRef:a,contentRef:o,yRailRef:c,xRailRef:l,needYBar:K,needXBar:Qe,yBarSizePx:Z,xBarSizePx:re,yBarTopPx:he,xBarLeftPx:Q,isShowXBar:De,isShowYBar:Be,isIos:N,handleScroll:q,handleContentResize:Ot,handleContainerResize:Ft,handleYScrollMouseDown:$s,handleXScrollMouseDown:It,cssVars:n?void 0:Qt,themeClass:$r?.themeClass,onRender:$r?.onRender})},render(){var e;const{$slots:t,mergedClsPrefix:n,triggerDisplayManually:r,rtlEnabled:s,internalHoistYRail:i,yPlacement:a,xPlacement:o,xScrollable:c}=this;if(!this.scrollable)return(e=t.default)===null||e===void 0?void 0:e.call(t);const l=this.trigger==="none",d=(h,g)=>R("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,`${n}-scrollbar-rail--vertical--${a}`,h],"data-scrollbar-rail":!0,style:[g||"",this.verticalRailStyle],"aria-hidden":!0},R(l?fE:Tf,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?R("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),f=()=>{var h,g;return(h=this.onRender)===null||h===void 0||h.call(this),R("div",Eb(this.$attrs,{role:"none",ref:"wrapperRef",class:[`${n}-scrollbar`,this.themeClass,s&&`${n}-scrollbar--rtl`],style:this.cssVars,onMouseenter:r?void 0:this.handleMouseEnterWrapper,onMouseleave:r?void 0:this.handleMouseLeaveWrapper}),[this.container?(g=t.default)===null||g===void 0?void 0:g.call(t):R("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},R(cc,{onResize:this.handleContentResize},{default:()=>R("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),i?null:d(void 0,void 0),c&&R("div",{ref:"xRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--horizontal`,`${n}-scrollbar-rail--horizontal--${o}`],style:this.horizontalRailStyle,"data-scrollbar-rail":!0,"aria-hidden":!0},R(l?fE:Tf,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?R("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{width:this.xBarSizePx,right:s?this.xBarLeftPx:void 0,left:s?void 0:this.xBarLeftPx},onMousedown:this.handleXScrollMouseDown}):null}))])},m=this.container?f():R(cc,{onResize:this.handleContainerResize},{default:f});return i?R(ma,null,m,d(this.themeClass,this.cssVars)):m}}),{cubicBezierEaseIn:pE,cubicBezierEaseOut:yE}=yb;function gI({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:s=""}={}){return[ce("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${pE}, transform ${t} ${pE} ${s&&`,${s}`}`}),ce("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${yE}, transform ${t} ${yE} ${s&&`,${s}`}`}),ce("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),ce("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const bI=mt({name:"InternalSelectionSuffix",props:{clsPrefix:{type:String,required:!0},showArrow:{type:Boolean,default:void 0},showClear:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},onClear:Function},setup(e,{slots:t}){return()=>{const{clsPrefix:n}=e;return R(rv,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?R(W0,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>R(Vs,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>li(t.default,()=>[R(sI,null)])})}):null})}}}),{cubicBezierEaseInOut:Fi}=yb;function pI({duration:e=".2s",delay:t=".1s"}={}){return[ce("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),ce("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
99
+ opacity: 0!important;
100
+ margin-left: 0!important;
101
+ margin-right: 0!important;
102
+ `),ce("&.fade-in-width-expand-transition-leave-active",`
103
+ overflow: hidden;
104
+ transition:
105
+ opacity ${e} ${Fi},
106
+ max-width ${e} ${Fi} ${t},
107
+ margin-left ${e} ${Fi} ${t},
108
+ margin-right ${e} ${Fi} ${t};
109
+ `),ce("&.fade-in-width-expand-transition-enter-active",`
110
+ overflow: hidden;
111
+ transition:
112
+ opacity ${e} ${Fi} ${t},
113
+ max-width ${e} ${Fi},
114
+ margin-left ${e} ${Fi},
115
+ margin-right ${e} ${Fi};
116
+ `)]}const yI=j("base-wave",`
117
+ position: absolute;
118
+ left: 0;
119
+ right: 0;
120
+ top: 0;
121
+ bottom: 0;
122
+ border-radius: inherit;
123
+ `),EI=mt({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){bh("-base-wave",yI,on(e,"clsPrefix"));const t=Me(null),n=Me(!1);let r=null;return pi(()=>{r!==null&&window.clearTimeout(r)}),{active:n,selfRef:t,play(){r!==null&&(window.clearTimeout(r),n.value=!1,r=null),Zi(()=>{var s;(s=t.value)===null||s===void 0||s.offsetHeight,n.value=!0,r=window.setTimeout(()=>{n.value=!1,r=null},1e3)})}}},render(){const{clsPrefix:e}=this;return R("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),CI=il&&"chrome"in window;il&&navigator.userAgent.includes("Firefox");const Mv=il&&navigator.userAgent.includes("Safari")&&!CI,xI={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};function vI(e){const{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:s,primaryColorHover:i,inputColor:a,inputColorDisabled:o,borderColor:c,warningColor:l,warningColorHover:d,errorColor:f,errorColorHover:m,borderRadius:h,lineHeight:g,fontSizeTiny:b,fontSizeSmall:p,fontSizeMedium:y,fontSizeLarge:C,heightTiny:A,heightSmall:T,heightMedium:S,heightLarge:w,actionColor:v,clearColor:O,clearColorHover:F,clearColorPressed:X,placeholderColor:me,placeholderColorDisabled:N,iconColor:Y,iconColorDisabled:x,iconColorHover:Z,iconColorPressed:Le,fontWeight:re}=e;return Object.assign(Object.assign({},xI),{fontWeight:re,countTextColorDisabled:r,countTextColor:n,heightTiny:A,heightSmall:T,heightMedium:S,heightLarge:w,fontSizeTiny:b,fontSizeSmall:p,fontSizeMedium:y,fontSizeLarge:C,lineHeight:g,lineHeightTextarea:g,borderRadius:h,iconSize:"16px",groupLabelColor:v,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:s,placeholderColor:me,placeholderColorDisabled:N,color:a,colorDisabled:o,colorFocus:a,groupLabelBorder:`1px solid ${c}`,border:`1px solid ${c}`,borderHover:`1px solid ${i}`,borderDisabled:`1px solid ${c}`,borderFocus:`1px solid ${i}`,boxShadowFocus:`0 0 0 2px ${oi(s,{alpha:.2})}`,loadingColor:s,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${d}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${d}`,boxShadowFocusWarning:`0 0 0 2px ${oi(l,{alpha:.2})}`,caretColorWarning:l,loadingColorError:f,borderError:`1px solid ${f}`,borderHoverError:`1px solid ${m}`,colorFocusError:a,borderFocusError:`1px solid ${m}`,boxShadowFocusError:`0 0 0 2px ${oi(f,{alpha:.2})}`,caretColorError:f,clearColor:O,clearColorHover:F,clearColorPressed:X,iconColor:Y,iconColorDisabled:x,iconColorHover:Z,iconColorPressed:Le,suffixTextColor:t})}const TI={common:ys,self:vI},Fv=ls("n-input"),SI=j("input",`
124
+ max-width: 100%;
125
+ cursor: text;
126
+ line-height: 1.5;
127
+ z-index: auto;
128
+ outline: none;
129
+ box-sizing: border-box;
130
+ position: relative;
131
+ display: inline-flex;
132
+ border-radius: var(--n-border-radius);
133
+ background-color: var(--n-color);
134
+ transition: background-color .3s var(--n-bezier);
135
+ font-size: var(--n-font-size);
136
+ font-weight: var(--n-font-weight);
137
+ --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
138
+ `,[J("input, textarea",`
139
+ overflow: hidden;
140
+ flex-grow: 1;
141
+ position: relative;
142
+ `),J("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",`
143
+ box-sizing: border-box;
144
+ font-size: inherit;
145
+ line-height: 1.5;
146
+ font-family: inherit;
147
+ border: none;
148
+ outline: none;
149
+ background-color: #0000;
150
+ text-align: inherit;
151
+ transition:
152
+ -webkit-text-fill-color .3s var(--n-bezier),
153
+ caret-color .3s var(--n-bezier),
154
+ color .3s var(--n-bezier),
155
+ text-decoration-color .3s var(--n-bezier);
156
+ `),J("input-el, textarea-el",`
157
+ -webkit-appearance: none;
158
+ scrollbar-width: none;
159
+ width: 100%;
160
+ min-width: 0;
161
+ text-decoration-color: var(--n-text-decoration-color);
162
+ color: var(--n-text-color);
163
+ caret-color: var(--n-caret-color);
164
+ background-color: transparent;
165
+ `,[ce("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
166
+ width: 0;
167
+ height: 0;
168
+ display: none;
169
+ `),ce("&::placeholder",`
170
+ color: #0000;
171
+ -webkit-text-fill-color: transparent !important;
172
+ `),ce("&:-webkit-autofill ~",[J("placeholder","display: none;")])]),oe("round",[Gr("textarea","border-radius: calc(var(--n-height) / 2);")]),J("placeholder",`
173
+ pointer-events: none;
174
+ position: absolute;
175
+ left: 0;
176
+ right: 0;
177
+ top: 0;
178
+ bottom: 0;
179
+ overflow: hidden;
180
+ color: var(--n-placeholder-color);
181
+ `,[ce("span",`
182
+ width: 100%;
183
+ display: inline-block;
184
+ `)]),oe("textarea",[J("placeholder","overflow: visible;")]),Gr("autosize","width: 100%;"),oe("autosize",[J("textarea-el, input-el",`
185
+ position: absolute;
186
+ top: 0;
187
+ left: 0;
188
+ height: 100%;
189
+ `)]),j("input-wrapper",`
190
+ overflow: hidden;
191
+ display: inline-flex;
192
+ flex-grow: 1;
193
+ position: relative;
194
+ padding-left: var(--n-padding-left);
195
+ padding-right: var(--n-padding-right);
196
+ `),J("input-mirror",`
197
+ padding: 0;
198
+ height: var(--n-height);
199
+ line-height: var(--n-height);
200
+ overflow: hidden;
201
+ visibility: hidden;
202
+ position: static;
203
+ white-space: pre;
204
+ pointer-events: none;
205
+ `),J("input-el",`
206
+ padding: 0;
207
+ height: var(--n-height);
208
+ line-height: var(--n-height);
209
+ `,[ce("&[type=password]::-ms-reveal","display: none;"),ce("+",[J("placeholder",`
210
+ display: flex;
211
+ align-items: center;
212
+ `)])]),Gr("textarea",[J("placeholder","white-space: nowrap;")]),J("eye",`
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ transition: color .3s var(--n-bezier);
217
+ `),oe("textarea","width: 100%;",[j("input-word-count",`
218
+ position: absolute;
219
+ right: var(--n-padding-right);
220
+ bottom: var(--n-padding-vertical);
221
+ `),oe("resizable",[j("input-wrapper",`
222
+ resize: vertical;
223
+ min-height: var(--n-height);
224
+ `)]),J("textarea-el, textarea-mirror, placeholder",`
225
+ height: 100%;
226
+ padding-left: 0;
227
+ padding-right: 0;
228
+ padding-top: var(--n-padding-vertical);
229
+ padding-bottom: var(--n-padding-vertical);
230
+ word-break: break-word;
231
+ display: inline-block;
232
+ vertical-align: bottom;
233
+ box-sizing: border-box;
234
+ line-height: var(--n-line-height-textarea);
235
+ margin: 0;
236
+ resize: none;
237
+ white-space: pre-wrap;
238
+ scroll-padding-block-end: var(--n-padding-vertical);
239
+ `),J("textarea-mirror",`
240
+ width: 100%;
241
+ pointer-events: none;
242
+ overflow: hidden;
243
+ visibility: hidden;
244
+ position: static;
245
+ white-space: pre-wrap;
246
+ overflow-wrap: break-word;
247
+ `)]),oe("pair",[J("input-el, placeholder","text-align: center;"),J("separator",`
248
+ display: flex;
249
+ align-items: center;
250
+ transition: color .3s var(--n-bezier);
251
+ color: var(--n-text-color);
252
+ white-space: nowrap;
253
+ `,[j("icon",`
254
+ color: var(--n-icon-color);
255
+ `),j("base-icon",`
256
+ color: var(--n-icon-color);
257
+ `)])]),oe("disabled",`
258
+ cursor: not-allowed;
259
+ background-color: var(--n-color-disabled);
260
+ `,[J("border","border: var(--n-border-disabled);"),J("input-el, textarea-el",`
261
+ cursor: not-allowed;
262
+ color: var(--n-text-color-disabled);
263
+ text-decoration-color: var(--n-text-color-disabled);
264
+ `),J("placeholder","color: var(--n-placeholder-color-disabled);"),J("separator","color: var(--n-text-color-disabled);",[j("icon",`
265
+ color: var(--n-icon-color-disabled);
266
+ `),j("base-icon",`
267
+ color: var(--n-icon-color-disabled);
268
+ `)]),j("input-word-count",`
269
+ color: var(--n-count-text-color-disabled);
270
+ `),J("suffix, prefix","color: var(--n-text-color-disabled);",[j("icon",`
271
+ color: var(--n-icon-color-disabled);
272
+ `),j("internal-icon",`
273
+ color: var(--n-icon-color-disabled);
274
+ `)])]),Gr("disabled",[J("eye",`
275
+ color: var(--n-icon-color);
276
+ cursor: pointer;
277
+ `,[ce("&:hover",`
278
+ color: var(--n-icon-color-hover);
279
+ `),ce("&:active",`
280
+ color: var(--n-icon-color-pressed);
281
+ `)]),ce("&:hover",[J("state-border","border: var(--n-border-hover);")]),oe("focus","background-color: var(--n-color-focus);",[J("state-border",`
282
+ border: var(--n-border-focus);
283
+ box-shadow: var(--n-box-shadow-focus);
284
+ `)])]),J("border, state-border",`
285
+ box-sizing: border-box;
286
+ position: absolute;
287
+ left: 0;
288
+ right: 0;
289
+ top: 0;
290
+ bottom: 0;
291
+ pointer-events: none;
292
+ border-radius: inherit;
293
+ border: var(--n-border);
294
+ transition:
295
+ box-shadow .3s var(--n-bezier),
296
+ border-color .3s var(--n-bezier);
297
+ `),J("state-border",`
298
+ border-color: #0000;
299
+ z-index: 1;
300
+ `),J("prefix","margin-right: 4px;"),J("suffix",`
301
+ margin-left: 4px;
302
+ `),J("suffix, prefix",`
303
+ transition: color .3s var(--n-bezier);
304
+ flex-wrap: nowrap;
305
+ flex-shrink: 0;
306
+ line-height: var(--n-height);
307
+ white-space: nowrap;
308
+ display: inline-flex;
309
+ align-items: center;
310
+ justify-content: center;
311
+ color: var(--n-suffix-text-color);
312
+ `,[j("base-loading",`
313
+ font-size: var(--n-icon-size);
314
+ margin: 0 2px;
315
+ color: var(--n-loading-color);
316
+ `),j("base-clear",`
317
+ font-size: var(--n-icon-size);
318
+ `,[J("placeholder",[j("base-icon",`
319
+ transition: color .3s var(--n-bezier);
320
+ color: var(--n-icon-color);
321
+ font-size: var(--n-icon-size);
322
+ `)])]),ce(">",[j("icon",`
323
+ transition: color .3s var(--n-bezier);
324
+ color: var(--n-icon-color);
325
+ font-size: var(--n-icon-size);
326
+ `)]),j("base-icon",`
327
+ font-size: var(--n-icon-size);
328
+ `)]),j("input-word-count",`
329
+ pointer-events: none;
330
+ line-height: 1.5;
331
+ font-size: .85em;
332
+ color: var(--n-count-text-color);
333
+ transition: color .3s var(--n-bezier);
334
+ margin-left: 4px;
335
+ font-variant: tabular-nums;
336
+ `),["warning","error"].map(e=>oe(`${e}-status`,[Gr("disabled",[j("base-loading",`
337
+ color: var(--n-loading-color-${e})
338
+ `),J("input-el, textarea-el",`
339
+ caret-color: var(--n-caret-color-${e});
340
+ `),J("state-border",`
341
+ border: var(--n-border-${e});
342
+ `),ce("&:hover",[J("state-border",`
343
+ border: var(--n-border-hover-${e});
344
+ `)]),ce("&:focus",`
345
+ background-color: var(--n-color-focus-${e});
346
+ `,[J("state-border",`
347
+ box-shadow: var(--n-box-shadow-focus-${e});
348
+ border: var(--n-border-focus-${e});
349
+ `)]),oe("focus",`
350
+ background-color: var(--n-color-focus-${e});
351
+ `,[J("state-border",`
352
+ box-shadow: var(--n-box-shadow-focus-${e});
353
+ border: var(--n-border-focus-${e});
354
+ `)])])]))]),_I=j("input",[oe("disabled",[J("input-el, textarea-el",`
355
+ -webkit-text-fill-color: var(--n-text-color-disabled);
356
+ `)])]);function wI(e){let t=0;for(const n of e)t++;return t}function od(e){return e===""||e==null}function AI(e){const t=Me(null);function n(){const{value:i}=e;if(!i?.focus){s();return}const{selectionStart:a,selectionEnd:o,value:c}=i;if(a==null||o==null){s();return}t.value={start:a,end:o,beforeText:c.slice(0,a),afterText:c.slice(o)}}function r(){var i;const{value:a}=t,{value:o}=e;if(!a||!o)return;const{value:c}=o,{start:l,beforeText:d,afterText:f}=a;let m=c.length;if(c.endsWith(f))m=c.length-f.length;else if(c.startsWith(d))m=d.length;else{const h=d[l-1],g=c.indexOf(h,l-1);g!==-1&&(m=g+1)}(i=o.setSelectionRange)===null||i===void 0||i.call(o,m,m)}function s(){t.value=null}return ss(e,s),{recordCursor:n,restoreCursor:r}}const EE=mt({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:r,mergedClsPrefixRef:s,countGraphemesRef:i}=cs(Fv),a=Fe(()=>{const{value:o}=n;return o===null||Array.isArray(o)?0:(i.value||wI)(o)});return()=>{const{value:o}=r,{value:c}=n;return R("span",{class:`${s.value}-input-word-count`},j0(t.default,{value:c===null||Array.isArray(c)?"":c},()=>[o===void 0?a.value:`${a.value} / ${o}`]))}}}),kI=Object.assign(Object.assign({},rn.props),{bordered:{type:Boolean,default:void 0},type:{type:String,default:"text"},placeholder:[Array,String],defaultValue:{type:[String,Array],default:null},value:[String,Array],disabled:{type:Boolean,default:void 0},size:String,rows:{type:[Number,String],default:3},round:Boolean,minlength:[String,Number],maxlength:[String,Number],clearable:Boolean,autosize:{type:[Boolean,Object],default:!1},pair:Boolean,separator:String,readonly:{type:[String,Boolean],default:!1},passivelyActivated:Boolean,showPasswordOn:String,stateful:{type:Boolean,default:!0},autofocus:Boolean,inputProps:Object,resizable:{type:Boolean,default:!0},showCount:Boolean,loading:{type:Boolean,default:void 0},allowInput:Function,renderCount:Function,onMousedown:Function,onKeydown:Function,onKeyup:[Function,Array],onInput:[Function,Array],onFocus:[Function,Array],onBlur:[Function,Array],onClick:[Function,Array],onChange:[Function,Array],onClear:[Function,Array],countGraphemes:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],textDecoration:[String,Array],attrSize:{type:Number,default:20},onInputBlur:[Function,Array],onInputFocus:[Function,Array],onDeactivate:[Function,Array],onActivate:[Function,Array],onWrapperFocus:[Function,Array],onWrapperBlur:[Function,Array],internalDeactivateOnEnter:Boolean,internalForceFocus:Boolean,internalLoadingBeforeSuffix:{type:Boolean,default:!0},showPasswordToggle:Boolean}),hr=mt({name:"Input",props:kI,slots:Object,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:s}=Er(e),i=rn("Input","-input",SI,TI,e,t);Mv&&bh("-input-safari",_I,t);const a=Me(null),o=Me(null),c=Me(null),l=Me(null),d=Me(null),f=Me(null),m=Me(null),h=AI(m),g=Me(null),{localeRef:b}=tI("Input"),p=Me(e.defaultValue),y=on(e,"value"),C=sl(y,p),A=Ou(e),{mergedSizeRef:T,mergedDisabledRef:S,mergedStatusRef:w}=A,v=Me(!1),O=Me(!1),F=Me(!1),X=Me(!1);let me=null;const N=Fe(()=>{const{placeholder:G,pair:be}=e;return be?Array.isArray(G)?G:G===void 0?["",""]:[G,G]:G===void 0?[b.value.placeholder]:[G]}),Y=Fe(()=>{const{value:G}=F,{value:be}=C,{value:it}=N;return!G&&(od(be)||Array.isArray(be)&&od(be[0]))&&it[0]}),x=Fe(()=>{const{value:G}=F,{value:be}=C,{value:it}=N;return!G&&it[1]&&(od(be)||Array.isArray(be)&&od(be[1]))}),Z=yo(()=>e.internalForceFocus||v.value),Le=yo(()=>{if(S.value||e.readonly||!e.clearable||!Z.value&&!O.value)return!1;const{value:G}=C,{value:be}=Z;return e.pair?!!(Array.isArray(G)&&(G[0]||G[1]))&&(O.value||be):!!G&&(O.value||be)}),re=Fe(()=>{const{showPasswordOn:G}=e;if(G)return G;if(e.showPasswordToggle)return"click"}),He=Me(!1),he=Fe(()=>{const{textDecoration:G}=e;return G?Array.isArray(G)?G.map(be=>({textDecoration:be})):[{textDecoration:G}]:["",""]}),ze=Me(void 0),Q=()=>{var G,be;if(e.type==="textarea"){const{autosize:it}=e;if(it&&(ze.value=(be=(G=g.value)===null||G===void 0?void 0:G.$el)===null||be===void 0?void 0:be.offsetWidth),!o.value||typeof it=="boolean")return;const{paddingTop:Zt,paddingBottom:wn,lineHeight:Kt}=window.getComputedStyle(o.value),Ei=Number(Zt.slice(0,-2)),Ci=Number(wn.slice(0,-2)),xi=Number(Kt.slice(0,-2)),{value:Dl}=c;if(!Dl)return;if(it.minRows){const Ll=Math.max(it.minRows,1),Kh=`${Ei+Ci+xi*Ll}px`;Dl.style.minHeight=Kh}if(it.maxRows){const Ll=`${Ei+Ci+xi*it.maxRows}px`;Dl.style.maxHeight=Ll}}},K=Fe(()=>{const{maxlength:G}=e;return G===void 0?void 0:Number(G)});Ao(()=>{const{value:G}=C;Array.isArray(G)||cr(G)});const Qe=hb().proxy;function De(G,be){const{onUpdateValue:it,"onUpdate:value":Zt,onInput:wn}=e,{nTriggerFormInput:Kt}=A;it&&vt(it,G,be),Zt&&vt(Zt,G,be),wn&&vt(wn,G,be),p.value=G,Kt()}function Be(G,be){const{onChange:it}=e,{nTriggerFormChange:Zt}=A;it&&vt(it,G,be),p.value=G,Zt()}function et(G){const{onBlur:be}=e,{nTriggerFormBlur:it}=A;be&&vt(be,G),it()}function Wt(G){const{onFocus:be}=e,{nTriggerFormFocus:it}=A;be&&vt(be,G),it()}function ft(G){const{onClear:be}=e;be&&vt(be,G)}function Ke(G){const{onInputBlur:be}=e;be&&vt(be,G)}function Ot(G){const{onInputFocus:be}=e;be&&vt(be,G)}function Ft(){const{onDeactivate:G}=e;G&&vt(G)}function ar(){const{onActivate:G}=e;G&&vt(G)}function Sn(G){const{onClick:be}=e;be&&vt(be,G)}function E(G){const{onWrapperFocus:be}=e;be&&vt(be,G)}function de(G){const{onWrapperBlur:be}=e;be&&vt(be,G)}function se(){F.value=!0}function L(G){F.value=!1,G.target===f.value?I(G,1):I(G,0)}function I(G,be=0,it="input"){const Zt=G.target.value;if(cr(Zt),G instanceof InputEvent&&!G.isComposing&&(F.value=!1),e.type==="textarea"){const{value:Kt}=g;Kt&&Kt.syncUnifiedContainer()}if(me=Zt,F.value)return;h.recordCursor();const wn=W(Zt);if(wn)if(!e.pair)it==="input"?De(Zt,{source:be}):Be(Zt,{source:be});else{let{value:Kt}=C;Array.isArray(Kt)?Kt=[Kt[0],Kt[1]]:Kt=["",""],Kt[be]=Zt,it==="input"?De(Kt,{source:be}):Be(Kt,{source:be})}Qe.$forceUpdate(),wn||Zi(h.restoreCursor)}function W(G){const{countGraphemes:be,maxlength:it,minlength:Zt}=e;if(be){let Kt;if(it!==void 0&&(Kt===void 0&&(Kt=be(G)),Kt>Number(it))||Zt!==void 0&&(Kt===void 0&&(Kt=be(G)),Kt<Number(it)))return!1}const{allowInput:wn}=e;return typeof wn=="function"?wn(G):!0}function U(G){Ke(G),G.relatedTarget===a.value&&Ft(),G.relatedTarget!==null&&(G.relatedTarget===d.value||G.relatedTarget===f.value||G.relatedTarget===o.value)||(X.value=!1),Pe(G,"blur"),m.value=null}function q(G,be){Ot(G),v.value=!0,X.value=!0,ar(),Pe(G,"focus"),be===0?m.value=d.value:be===1?m.value=f.value:be===2&&(m.value=o.value)}function $(G){e.passivelyActivated&&(de(G),Pe(G,"blur"))}function ae(G){e.passivelyActivated&&(v.value=!0,E(G),Pe(G,"focus"))}function Pe(G,be){G.relatedTarget!==null&&(G.relatedTarget===d.value||G.relatedTarget===f.value||G.relatedTarget===o.value||G.relatedTarget===a.value)||(be==="focus"?(Wt(G),v.value=!0):be==="blur"&&(et(G),v.value=!1))}function ye(G,be){I(G,be,"change")}function Ye(G){Sn(G)}function It(G){ft(G),ht()}function ht(){e.pair?(De(["",""],{source:"clear"}),Be(["",""],{source:"clear"})):(De("",{source:"clear"}),Be("",{source:"clear"}))}function Zn(G){const{onMousedown:be}=e;be&&be(G);const{tagName:it}=G.target;if(it!=="INPUT"&&it!=="TEXTAREA"){if(e.resizable){const{value:Zt}=a;if(Zt){const{left:wn,top:Kt,width:Ei,height:Ci}=Zt.getBoundingClientRect(),xi=14;if(wn+Ei-xi<G.clientX&&G.clientX<wn+Ei&&Kt+Ci-xi<G.clientY&&G.clientY<Kt+Ci)return}}G.preventDefault(),v.value||ct()}}function $s(){var G;O.value=!0,e.type==="textarea"&&((G=g.value)===null||G===void 0||G.handleMouseEnterWrapper())}function or(){var G;O.value=!1,e.type==="textarea"&&((G=g.value)===null||G===void 0||G.handleMouseLeaveWrapper())}function ds(){S.value||re.value==="click"&&(He.value=!He.value)}function Qt(G){if(S.value)return;G.preventDefault();const be=Zt=>{Zt.preventDefault(),mr("mouseup",document,be)};if(Yn("mouseup",document,be),re.value!=="mousedown")return;He.value=!0;const it=()=>{He.value=!1,mr("mouseup",document,it)};Yn("mouseup",document,it)}function $r(G){e.onKeyup&&vt(e.onKeyup,G)}function Oi(G){switch(e.onKeydown&&vt(e.onKeydown,G),G.key){case"Escape":Xe();break;case"Enter":we(G);break}}function we(G){var be,it;if(e.passivelyActivated){const{value:Zt}=X;if(Zt){e.internalDeactivateOnEnter&&Xe();return}G.preventDefault(),e.type==="textarea"?(be=o.value)===null||be===void 0||be.focus():(it=d.value)===null||it===void 0||it.focus()}}function Xe(){e.passivelyActivated&&(X.value=!1,Zi(()=>{var G;(G=a.value)===null||G===void 0||G.focus()}))}function ct(){var G,be,it;S.value||(e.passivelyActivated?(G=a.value)===null||G===void 0||G.focus():((be=o.value)===null||be===void 0||be.focus(),(it=d.value)===null||it===void 0||it.focus()))}function qt(){var G;!((G=a.value)===null||G===void 0)&&G.contains(document.activeElement)&&document.activeElement.blur()}function vn(){var G,be;(G=o.value)===null||G===void 0||G.select(),(be=d.value)===null||be===void 0||be.select()}function Fn(){S.value||(o.value?o.value.focus():d.value&&d.value.focus())}function _n(){const{value:G}=a;G?.contains(document.activeElement)&&G!==document.activeElement&&Xe()}function Ut(G){if(e.type==="textarea"){const{value:be}=o;be?.scrollTo(G)}else{const{value:be}=d;be?.scrollTo(G)}}function cr(G){const{type:be,pair:it,autosize:Zt}=e;if(!it&&Zt)if(be==="textarea"){const{value:wn}=c;wn&&(wn.textContent=`${G??""}\r
357
+ `)}else{const{value:wn}=l;wn&&(G?wn.textContent=G:wn.innerHTML="&nbsp;")}}function vs(){Q()}const $o=Me({top:"0"});function Pl(G){var be;const{scrollTop:it}=G.target;$o.value.top=`${-it}px`,(be=g.value)===null||be===void 0||be.syncUnifiedContainer()}let Di=null;vf(()=>{const{autosize:G,type:be}=e;G&&be==="textarea"?Di=ss(C,it=>{!Array.isArray(it)&&it!==me&&cr(it)}):Di?.()});let Li=null;vf(()=>{e.type==="textarea"?Li=ss(C,G=>{var be;!Array.isArray(G)&&G!==me&&((be=g.value)===null||be===void 0||be.syncUnifiedContainer())}):Li?.()}),ci(Fv,{mergedValueRef:C,maxlengthRef:K,mergedClsPrefixRef:t,countGraphemesRef:on(e,"countGraphemes")});const Nl={wrapperElRef:a,inputElRef:d,textareaElRef:o,isCompositing:F,clear:ht,focus:ct,blur:qt,select:vn,deactivate:_n,activate:Fn,scrollTo:Ut},Ol=Ks("Input",s,t),Ho=Fe(()=>{const{value:G}=T,{common:{cubicBezierEaseInOut:be},self:{color:it,borderRadius:Zt,textColor:wn,caretColor:Kt,caretColorError:Ei,caretColorWarning:Ci,textDecorationColor:xi,border:Dl,borderDisabled:Ll,borderHover:Kh,borderFocus:V2,placeholderColor:K2,placeholderColorDisabled:Y2,lineHeightTextarea:X2,colorDisabled:Q2,colorFocus:Z2,textColorDisabled:J2,boxShadowFocus:eA,iconSize:tA,colorFocusWarning:nA,boxShadowFocusWarning:rA,borderWarning:sA,borderFocusWarning:iA,borderHoverWarning:aA,colorFocusError:oA,boxShadowFocusError:cA,borderError:lA,borderFocusError:uA,borderHoverError:dA,clearSize:fA,clearColor:hA,clearColorHover:mA,clearColorPressed:gA,iconColor:bA,iconColorDisabled:pA,suffixTextColor:yA,countTextColor:EA,countTextColorDisabled:CA,iconColorHover:xA,iconColorPressed:vA,loadingColor:TA,loadingColorError:SA,loadingColorWarning:_A,fontWeight:wA,[Ge("padding",G)]:AA,[Ge("fontSize",G)]:kA,[Ge("height",G)]:IA}}=i.value,{left:RA,right:BA}=Is(AA);return{"--n-bezier":be,"--n-count-text-color":EA,"--n-count-text-color-disabled":CA,"--n-color":it,"--n-font-size":kA,"--n-font-weight":wA,"--n-border-radius":Zt,"--n-height":IA,"--n-padding-left":RA,"--n-padding-right":BA,"--n-text-color":wn,"--n-caret-color":Kt,"--n-text-decoration-color":xi,"--n-border":Dl,"--n-border-disabled":Ll,"--n-border-hover":Kh,"--n-border-focus":V2,"--n-placeholder-color":K2,"--n-placeholder-color-disabled":Y2,"--n-icon-size":tA,"--n-line-height-textarea":X2,"--n-color-disabled":Q2,"--n-color-focus":Z2,"--n-text-color-disabled":J2,"--n-box-shadow-focus":eA,"--n-loading-color":TA,"--n-caret-color-warning":Ci,"--n-color-focus-warning":nA,"--n-box-shadow-focus-warning":rA,"--n-border-warning":sA,"--n-border-focus-warning":iA,"--n-border-hover-warning":aA,"--n-loading-color-warning":_A,"--n-caret-color-error":Ei,"--n-color-focus-error":oA,"--n-box-shadow-focus-error":cA,"--n-border-error":lA,"--n-border-focus-error":uA,"--n-border-hover-error":dA,"--n-loading-color-error":SA,"--n-clear-color":hA,"--n-clear-size":fA,"--n-clear-color-hover":mA,"--n-clear-color-pressed":gA,"--n-icon-color":bA,"--n-icon-color-hover":xA,"--n-icon-color-pressed":vA,"--n-icon-color-disabled":pA,"--n-suffix-text-color":yA}}),Mi=r?Es("input",Fe(()=>{const{value:G}=T;return G[0]}),Ho,e):void 0;return Object.assign(Object.assign({},Nl),{wrapperElRef:a,inputElRef:d,inputMirrorElRef:l,inputEl2Ref:f,textareaElRef:o,textareaMirrorElRef:c,textareaScrollbarInstRef:g,rtlEnabled:Ol,uncontrolledValue:p,mergedValue:C,passwordVisible:He,mergedPlaceholder:N,showPlaceholder1:Y,showPlaceholder2:x,mergedFocus:Z,isComposing:F,activated:X,showClearButton:Le,mergedSize:T,mergedDisabled:S,textDecorationStyle:he,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:re,placeholderStyle:$o,mergedStatus:w,textAreaScrollContainerWidth:ze,handleTextAreaScroll:Pl,handleCompositionStart:se,handleCompositionEnd:L,handleInput:I,handleInputBlur:U,handleInputFocus:q,handleWrapperBlur:$,handleWrapperFocus:ae,handleMouseEnter:$s,handleMouseLeave:or,handleMouseDown:Zn,handleChange:ye,handleClick:Ye,handleClear:It,handlePasswordToggleClick:ds,handlePasswordToggleMousedown:Qt,handleWrapperKeydown:Oi,handleWrapperKeyup:$r,handleTextAreaMirrorResize:vs,getTextareaScrollContainer:()=>o.value,mergedTheme:i,cssVars:r?void 0:Ho,themeClass:Mi?.themeClass,onRender:Mi?.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:s,type:i,countGraphemes:a,onRender:o}=this,c=this.$slots;return o?.(),R("div",{ref:"wrapperElRef",class:[`${n}-input`,s,r&&`${n}-input--${r}-status`,{[`${n}-input--rtl`]:this.rtlEnabled,[`${n}-input--disabled`]:this.mergedDisabled,[`${n}-input--textarea`]:i==="textarea",[`${n}-input--resizable`]:this.resizable&&!this.autosize,[`${n}-input--autosize`]:this.autosize,[`${n}-input--round`]:this.round&&i!=="textarea",[`${n}-input--pair`]:this.pair,[`${n}-input--focus`]:this.mergedFocus,[`${n}-input--stateful`]:this.stateful}],style:this.cssVars,tabindex:!this.mergedDisabled&&this.passivelyActivated&&!this.activated?0:void 0,onFocus:this.handleWrapperFocus,onBlur:this.handleWrapperBlur,onClick:this.handleClick,onMousedown:this.handleMouseDown,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd,onKeyup:this.handleWrapperKeyup,onKeydown:this.handleWrapperKeydown},R("div",{class:`${n}-input-wrapper`},$n(c.prefix,l=>l&&R("div",{class:`${n}-input__prefix`},l)),i==="textarea"?R(Lv,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var l,d;const{textAreaScrollContainerWidth:f}=this,m={width:this.autosize&&f&&`${f}px`};return R(ma,null,R("textarea",Object.assign({},this.inputProps,{ref:"textareaElRef",class:[`${n}-input__textarea-el`,(l=this.inputProps)===null||l===void 0?void 0:l.class],autofocus:this.autofocus,rows:Number(this.rows),placeholder:this.placeholder,value:this.mergedValue,disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,readonly:this.readonly,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,style:[this.textDecorationStyle[0],(d=this.inputProps)===null||d===void 0?void 0:d.style,m],onBlur:this.handleInputBlur,onFocus:h=>{this.handleInputFocus(h,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?R("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,m],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?R(cc,{onResize:this.handleTextAreaMirrorResize},{default:()=>R("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):R("div",{class:`${n}-input__input`},R("input",Object.assign({type:i==="password"&&this.mergedShowPasswordOn&&this.passwordVisible?"text":i},this.inputProps,{ref:"inputElRef",class:[`${n}-input__input-el`,(e=this.inputProps)===null||e===void 0?void 0:e.class],style:[this.textDecorationStyle[0],(t=this.inputProps)===null||t===void 0?void 0:t.style],tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[0],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[0]:this.mergedValue,readonly:this.readonly,autofocus:this.autofocus,size:this.attrSize,onBlur:this.handleInputBlur,onFocus:l=>{this.handleInputFocus(l,0)},onInput:l=>{this.handleInput(l,0)},onChange:l=>{this.handleChange(l,0)}})),this.showPlaceholder1?R("div",{class:`${n}-input__placeholder`},R("span",null,this.mergedPlaceholder[0])):null,this.autosize?R("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&$n(c.suffix,l=>l||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?R("div",{class:`${n}-input__suffix`},[$n(c["clear-icon-placeholder"],d=>(this.clearable||d)&&R(W0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>d,icon:()=>{var f,m;return(m=(f=this.$slots)["clear-icon"])===null||m===void 0?void 0:m.call(f)}})),this.internalLoadingBeforeSuffix?null:l,this.loading!==void 0?R(bI,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?l:null,this.showCount&&this.type!=="textarea"?R(EE,null,{default:d=>{var f;const{renderCount:m}=this;return m?m(d):(f=c.count)===null||f===void 0?void 0:f.call(c,d)}}):null,this.mergedShowPasswordOn&&this.type==="password"?R("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?li(c["password-visible-icon"],()=>[R(Vs,{clsPrefix:n},{default:()=>R(cI,null)})]):li(c["password-invisible-icon"],()=>[R(Vs,{clsPrefix:n},{default:()=>R(lI,null)})])):null]):null)),this.pair?R("span",{class:`${n}-input__separator`},li(c.separator,()=>[this.separator])):null,this.pair?R("div",{class:`${n}-input-wrapper`},R("div",{class:`${n}-input__input`},R("input",{ref:"inputEl2Ref",type:this.type,class:`${n}-input__input-el`,tabindex:this.passivelyActivated&&!this.activated?-1:void 0,placeholder:this.mergedPlaceholder[1],disabled:this.mergedDisabled,maxlength:a?void 0:this.maxlength,minlength:a?void 0:this.minlength,value:Array.isArray(this.mergedValue)?this.mergedValue[1]:void 0,readonly:this.readonly,style:this.textDecorationStyle[1],onBlur:this.handleInputBlur,onFocus:l=>{this.handleInputFocus(l,1)},onInput:l=>{this.handleInput(l,1)},onChange:l=>{this.handleChange(l,1)}}),this.showPlaceholder2?R("div",{class:`${n}-input__placeholder`},R("span",null,this.mergedPlaceholder[1])):null),$n(c.suffix,l=>(this.clearable||l)&&R("div",{class:`${n}-input__suffix`},[this.clearable&&R(W0,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var d;return(d=c["clear-icon"])===null||d===void 0?void 0:d.call(c)},placeholder:()=>{var d;return(d=c["clear-icon-placeholder"])===null||d===void 0?void 0:d.call(c)}}),l]))):null,this.mergedBordered?R("div",{class:`${n}-input__border`}):null,this.mergedBordered?R("div",{class:`${n}-input__state-border`}):null,this.showCount&&i==="textarea"?R(EE,null,{default:l=>{var d;const{renderCount:f}=this;return f?f(l):(d=c.count)===null||d===void 0?void 0:d.call(c,l)}}):null)}}),II=j("input-group",`
358
+ display: inline-flex;
359
+ width: 100%;
360
+ flex-wrap: nowrap;
361
+ vertical-align: bottom;
362
+ `,[ce(">",[j("input",[ce("&:not(:last-child)",`
363
+ border-top-right-radius: 0!important;
364
+ border-bottom-right-radius: 0!important;
365
+ `),ce("&:not(:first-child)",`
366
+ border-top-left-radius: 0!important;
367
+ border-bottom-left-radius: 0!important;
368
+ margin-left: -1px!important;
369
+ `)]),j("button",[ce("&:not(:last-child)",`
370
+ border-top-right-radius: 0!important;
371
+ border-bottom-right-radius: 0!important;
372
+ `,[J("state-border, border",`
373
+ border-top-right-radius: 0!important;
374
+ border-bottom-right-radius: 0!important;
375
+ `)]),ce("&:not(:first-child)",`
376
+ border-top-left-radius: 0!important;
377
+ border-bottom-left-radius: 0!important;
378
+ `,[J("state-border, border",`
379
+ border-top-left-radius: 0!important;
380
+ border-bottom-left-radius: 0!important;
381
+ `)])]),ce("*",[ce("&:not(:last-child)",`
382
+ border-top-right-radius: 0!important;
383
+ border-bottom-right-radius: 0!important;
384
+ `,[ce(">",[j("input",`
385
+ border-top-right-radius: 0!important;
386
+ border-bottom-right-radius: 0!important;
387
+ `),j("base-selection",[j("base-selection-label",`
388
+ border-top-right-radius: 0!important;
389
+ border-bottom-right-radius: 0!important;
390
+ `),j("base-selection-tags",`
391
+ border-top-right-radius: 0!important;
392
+ border-bottom-right-radius: 0!important;
393
+ `),J("box-shadow, border, state-border",`
394
+ border-top-right-radius: 0!important;
395
+ border-bottom-right-radius: 0!important;
396
+ `)])])]),ce("&:not(:first-child)",`
397
+ margin-left: -1px!important;
398
+ border-top-left-radius: 0!important;
399
+ border-bottom-left-radius: 0!important;
400
+ `,[ce(">",[j("input",`
401
+ border-top-left-radius: 0!important;
402
+ border-bottom-left-radius: 0!important;
403
+ `),j("base-selection",[j("base-selection-label",`
404
+ border-top-left-radius: 0!important;
405
+ border-bottom-left-radius: 0!important;
406
+ `),j("base-selection-tags",`
407
+ border-top-left-radius: 0!important;
408
+ border-bottom-left-radius: 0!important;
409
+ `),J("box-shadow, border, state-border",`
410
+ border-top-left-radius: 0!important;
411
+ border-bottom-left-radius: 0!important;
412
+ `)])])])])])]),RI={},BI=mt({name:"InputGroup",props:RI,setup(e){const{mergedClsPrefixRef:t}=Er(e);return bh("-input-group",II,t),{mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return R("div",{class:`${e}-input-group`},this.$slots)}});function Ca(e){return sv(e,[255,255,255,.16])}function cd(e){return sv(e,[0,0,0,.12])}const PI=ls("n-button-group"),NI={paddingTiny:"0 6px",paddingSmall:"0 10px",paddingMedium:"0 14px",paddingLarge:"0 18px",paddingRoundTiny:"0 10px",paddingRoundSmall:"0 14px",paddingRoundMedium:"0 18px",paddingRoundLarge:"0 22px",iconMarginTiny:"6px",iconMarginSmall:"6px",iconMarginMedium:"6px",iconMarginLarge:"6px",iconSizeTiny:"14px",iconSizeSmall:"18px",iconSizeMedium:"18px",iconSizeLarge:"20px",rippleDuration:".6s"};function OI(e){const{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:s,borderRadius:i,fontSizeTiny:a,fontSizeSmall:o,fontSizeMedium:c,fontSizeLarge:l,opacityDisabled:d,textColor2:f,textColor3:m,primaryColorHover:h,primaryColorPressed:g,borderColor:b,primaryColor:p,baseColor:y,infoColor:C,infoColorHover:A,infoColorPressed:T,successColor:S,successColorHover:w,successColorPressed:v,warningColor:O,warningColorHover:F,warningColorPressed:X,errorColor:me,errorColorHover:N,errorColorPressed:Y,fontWeight:x,buttonColor2:Z,buttonColor2Hover:Le,buttonColor2Pressed:re,fontWeightStrong:He}=e;return Object.assign(Object.assign({},NI),{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:s,borderRadiusTiny:i,borderRadiusSmall:i,borderRadiusMedium:i,borderRadiusLarge:i,fontSizeTiny:a,fontSizeSmall:o,fontSizeMedium:c,fontSizeLarge:l,opacityDisabled:d,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:Z,colorSecondaryHover:Le,colorSecondaryPressed:re,colorTertiary:Z,colorTertiaryHover:Le,colorTertiaryPressed:re,colorQuaternary:"#0000",colorQuaternaryHover:Le,colorQuaternaryPressed:re,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:f,textColorTertiary:m,textColorHover:h,textColorPressed:g,textColorFocus:h,textColorDisabled:f,textColorText:f,textColorTextHover:h,textColorTextPressed:g,textColorTextFocus:h,textColorTextDisabled:f,textColorGhost:f,textColorGhostHover:h,textColorGhostPressed:g,textColorGhostFocus:h,textColorGhostDisabled:f,border:`1px solid ${b}`,borderHover:`1px solid ${h}`,borderPressed:`1px solid ${g}`,borderFocus:`1px solid ${h}`,borderDisabled:`1px solid ${b}`,rippleColor:p,colorPrimary:p,colorHoverPrimary:h,colorPressedPrimary:g,colorFocusPrimary:h,colorDisabledPrimary:p,textColorPrimary:y,textColorHoverPrimary:y,textColorPressedPrimary:y,textColorFocusPrimary:y,textColorDisabledPrimary:y,textColorTextPrimary:p,textColorTextHoverPrimary:h,textColorTextPressedPrimary:g,textColorTextFocusPrimary:h,textColorTextDisabledPrimary:f,textColorGhostPrimary:p,textColorGhostHoverPrimary:h,textColorGhostPressedPrimary:g,textColorGhostFocusPrimary:h,textColorGhostDisabledPrimary:p,borderPrimary:`1px solid ${p}`,borderHoverPrimary:`1px solid ${h}`,borderPressedPrimary:`1px solid ${g}`,borderFocusPrimary:`1px solid ${h}`,borderDisabledPrimary:`1px solid ${p}`,rippleColorPrimary:p,colorInfo:C,colorHoverInfo:A,colorPressedInfo:T,colorFocusInfo:A,colorDisabledInfo:C,textColorInfo:y,textColorHoverInfo:y,textColorPressedInfo:y,textColorFocusInfo:y,textColorDisabledInfo:y,textColorTextInfo:C,textColorTextHoverInfo:A,textColorTextPressedInfo:T,textColorTextFocusInfo:A,textColorTextDisabledInfo:f,textColorGhostInfo:C,textColorGhostHoverInfo:A,textColorGhostPressedInfo:T,textColorGhostFocusInfo:A,textColorGhostDisabledInfo:C,borderInfo:`1px solid ${C}`,borderHoverInfo:`1px solid ${A}`,borderPressedInfo:`1px solid ${T}`,borderFocusInfo:`1px solid ${A}`,borderDisabledInfo:`1px solid ${C}`,rippleColorInfo:C,colorSuccess:S,colorHoverSuccess:w,colorPressedSuccess:v,colorFocusSuccess:w,colorDisabledSuccess:S,textColorSuccess:y,textColorHoverSuccess:y,textColorPressedSuccess:y,textColorFocusSuccess:y,textColorDisabledSuccess:y,textColorTextSuccess:S,textColorTextHoverSuccess:w,textColorTextPressedSuccess:v,textColorTextFocusSuccess:w,textColorTextDisabledSuccess:f,textColorGhostSuccess:S,textColorGhostHoverSuccess:w,textColorGhostPressedSuccess:v,textColorGhostFocusSuccess:w,textColorGhostDisabledSuccess:S,borderSuccess:`1px solid ${S}`,borderHoverSuccess:`1px solid ${w}`,borderPressedSuccess:`1px solid ${v}`,borderFocusSuccess:`1px solid ${w}`,borderDisabledSuccess:`1px solid ${S}`,rippleColorSuccess:S,colorWarning:O,colorHoverWarning:F,colorPressedWarning:X,colorFocusWarning:F,colorDisabledWarning:O,textColorWarning:y,textColorHoverWarning:y,textColorPressedWarning:y,textColorFocusWarning:y,textColorDisabledWarning:y,textColorTextWarning:O,textColorTextHoverWarning:F,textColorTextPressedWarning:X,textColorTextFocusWarning:F,textColorTextDisabledWarning:f,textColorGhostWarning:O,textColorGhostHoverWarning:F,textColorGhostPressedWarning:X,textColorGhostFocusWarning:F,textColorGhostDisabledWarning:O,borderWarning:`1px solid ${O}`,borderHoverWarning:`1px solid ${F}`,borderPressedWarning:`1px solid ${X}`,borderFocusWarning:`1px solid ${F}`,borderDisabledWarning:`1px solid ${O}`,rippleColorWarning:O,colorError:me,colorHoverError:N,colorPressedError:Y,colorFocusError:N,colorDisabledError:me,textColorError:y,textColorHoverError:y,textColorPressedError:y,textColorFocusError:y,textColorDisabledError:y,textColorTextError:me,textColorTextHoverError:N,textColorTextPressedError:Y,textColorTextFocusError:N,textColorTextDisabledError:f,textColorGhostError:me,textColorGhostHoverError:N,textColorGhostPressedError:Y,textColorGhostFocusError:N,textColorGhostDisabledError:me,borderError:`1px solid ${me}`,borderHoverError:`1px solid ${N}`,borderPressedError:`1px solid ${Y}`,borderFocusError:`1px solid ${N}`,borderDisabledError:`1px solid ${me}`,rippleColorError:me,waveOpacity:"0.6",fontWeight:x,fontWeightStrong:He})}const zv={name:"Button",common:ys,self:OI},DI=ce([j("button",`
413
+ margin: 0;
414
+ font-weight: var(--n-font-weight);
415
+ line-height: 1;
416
+ font-family: inherit;
417
+ padding: var(--n-padding);
418
+ height: var(--n-height);
419
+ font-size: var(--n-font-size);
420
+ border-radius: var(--n-border-radius);
421
+ color: var(--n-text-color);
422
+ background-color: var(--n-color);
423
+ width: var(--n-width);
424
+ white-space: nowrap;
425
+ outline: none;
426
+ position: relative;
427
+ z-index: auto;
428
+ border: none;
429
+ display: inline-flex;
430
+ flex-wrap: nowrap;
431
+ flex-shrink: 0;
432
+ align-items: center;
433
+ justify-content: center;
434
+ user-select: none;
435
+ -webkit-user-select: none;
436
+ text-align: center;
437
+ cursor: pointer;
438
+ text-decoration: none;
439
+ transition:
440
+ color .3s var(--n-bezier),
441
+ background-color .3s var(--n-bezier),
442
+ opacity .3s var(--n-bezier),
443
+ border-color .3s var(--n-bezier);
444
+ `,[oe("color",[J("border",{borderColor:"var(--n-border-color)"}),oe("disabled",[J("border",{borderColor:"var(--n-border-color-disabled)"})]),Gr("disabled",[ce("&:focus",[J("state-border",{borderColor:"var(--n-border-color-focus)"})]),ce("&:hover",[J("state-border",{borderColor:"var(--n-border-color-hover)"})]),ce("&:active",[J("state-border",{borderColor:"var(--n-border-color-pressed)"})]),oe("pressed",[J("state-border",{borderColor:"var(--n-border-color-pressed)"})])])]),oe("disabled",{backgroundColor:"var(--n-color-disabled)",color:"var(--n-text-color-disabled)"},[J("border",{border:"var(--n-border-disabled)"})]),Gr("disabled",[ce("&:focus",{backgroundColor:"var(--n-color-focus)",color:"var(--n-text-color-focus)"},[J("state-border",{border:"var(--n-border-focus)"})]),ce("&:hover",{backgroundColor:"var(--n-color-hover)",color:"var(--n-text-color-hover)"},[J("state-border",{border:"var(--n-border-hover)"})]),ce("&:active",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[J("state-border",{border:"var(--n-border-pressed)"})]),oe("pressed",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[J("state-border",{border:"var(--n-border-pressed)"})])]),oe("loading","cursor: wait;"),j("base-wave",`
445
+ pointer-events: none;
446
+ top: 0;
447
+ right: 0;
448
+ bottom: 0;
449
+ left: 0;
450
+ animation-iteration-count: 1;
451
+ animation-duration: var(--n-ripple-duration);
452
+ animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);
453
+ `,[oe("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),il&&"MozBoxSizing"in document.createElement("div").style?ce("&::moz-focus-inner",{border:0}):null,J("border, state-border",`
454
+ position: absolute;
455
+ left: 0;
456
+ top: 0;
457
+ right: 0;
458
+ bottom: 0;
459
+ border-radius: inherit;
460
+ transition: border-color .3s var(--n-bezier);
461
+ pointer-events: none;
462
+ `),J("border",{border:"var(--n-border)"}),J("state-border",{border:"var(--n-border)",borderColor:"#0000",zIndex:1}),J("icon",`
463
+ margin: var(--n-icon-margin);
464
+ margin-left: 0;
465
+ height: var(--n-icon-size);
466
+ width: var(--n-icon-size);
467
+ max-width: var(--n-icon-size);
468
+ font-size: var(--n-icon-size);
469
+ position: relative;
470
+ flex-shrink: 0;
471
+ `,[j("icon-slot",`
472
+ height: var(--n-icon-size);
473
+ width: var(--n-icon-size);
474
+ position: absolute;
475
+ left: 0;
476
+ top: 50%;
477
+ transform: translateY(-50%);
478
+ display: flex;
479
+ align-items: center;
480
+ justify-content: center;
481
+ `,[ic({top:"50%",originalTransform:"translateY(-50%)"})]),pI()]),J("content",`
482
+ display: flex;
483
+ align-items: center;
484
+ flex-wrap: nowrap;
485
+ min-width: 0;
486
+ `,[ce("~",[J("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),oe("block",`
487
+ display: flex;
488
+ width: 100%;
489
+ `),oe("dashed",[J("border, state-border",{borderStyle:"dashed !important"})]),oe("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),ce("@keyframes button-wave-spread",{from:{boxShadow:"0 0 0.5px 0 var(--n-ripple-color)"},to:{boxShadow:"0 0 0.5px 4.5px var(--n-ripple-color)"}}),ce("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),LI=Object.assign(Object.assign({},rn.props),{color:String,textColor:String,text:Boolean,block:Boolean,loading:Boolean,disabled:Boolean,circle:Boolean,size:String,ghost:Boolean,round:Boolean,secondary:Boolean,tertiary:Boolean,quaternary:Boolean,strong:Boolean,focusable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},tag:{type:String,default:"button"},type:{type:String,default:"default"},dashed:Boolean,renderIcon:Function,iconPlacement:{type:String,default:"left"},attrType:{type:String,default:"button"},bordered:{type:Boolean,default:!0},onClick:[Function,Array],nativeFocusBehavior:{type:Boolean,default:!Mv}}),Ji=mt({name:"Button",props:LI,slots:Object,setup(e){const t=Me(null),n=Me(null),r=Me(!1),s=yo(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),i=cs(PI,{}),{mergedSizeRef:a}=Ou({},{defaultSize:"medium",mergedSize:T=>{const{size:S}=e;if(S)return S;const{size:w}=i;if(w)return w;const{mergedSize:v}=T||{};return v?v.value:"medium"}}),o=Fe(()=>e.focusable&&!e.disabled),c=T=>{var S;o.value||T.preventDefault(),!e.nativeFocusBehavior&&(T.preventDefault(),!e.disabled&&o.value&&((S=t.value)===null||S===void 0||S.focus({preventScroll:!0})))},l=T=>{var S;if(!e.disabled&&!e.loading){const{onClick:w}=e;w&&vt(w,T),e.text||(S=n.value)===null||S===void 0||S.play()}},d=T=>{switch(T.key){case"Enter":if(!e.keyboard)return;r.value=!1}},f=T=>{switch(T.key){case"Enter":if(!e.keyboard||e.loading){T.preventDefault();return}r.value=!0}},m=()=>{r.value=!1},{inlineThemeDisabled:h,mergedClsPrefixRef:g,mergedRtlRef:b}=Er(e),p=rn("Button","-button",DI,zv,e,g),y=Ks("Button",b,g),C=Fe(()=>{const T=p.value,{common:{cubicBezierEaseInOut:S,cubicBezierEaseOut:w},self:v}=T,{rippleDuration:O,opacityDisabled:F,fontWeight:X,fontWeightStrong:me}=v,N=a.value,{dashed:Y,type:x,ghost:Z,text:Le,color:re,round:He,circle:he,textColor:ze,secondary:Q,tertiary:K,quaternary:Qe,strong:De}=e,Be={"--n-font-weight":De?me:X};let et={"--n-color":"initial","--n-color-hover":"initial","--n-color-pressed":"initial","--n-color-focus":"initial","--n-color-disabled":"initial","--n-ripple-color":"initial","--n-text-color":"initial","--n-text-color-hover":"initial","--n-text-color-pressed":"initial","--n-text-color-focus":"initial","--n-text-color-disabled":"initial"};const Wt=x==="tertiary",ft=x==="default",Ke=Wt?"default":x;if(Le){const U=ze||re;et={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":"#0000","--n-text-color":U||v[Ge("textColorText",Ke)],"--n-text-color-hover":U?Ca(U):v[Ge("textColorTextHover",Ke)],"--n-text-color-pressed":U?cd(U):v[Ge("textColorTextPressed",Ke)],"--n-text-color-focus":U?Ca(U):v[Ge("textColorTextHover",Ke)],"--n-text-color-disabled":U||v[Ge("textColorTextDisabled",Ke)]}}else if(Z||Y){const U=ze||re;et={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":re||v[Ge("rippleColor",Ke)],"--n-text-color":U||v[Ge("textColorGhost",Ke)],"--n-text-color-hover":U?Ca(U):v[Ge("textColorGhostHover",Ke)],"--n-text-color-pressed":U?cd(U):v[Ge("textColorGhostPressed",Ke)],"--n-text-color-focus":U?Ca(U):v[Ge("textColorGhostHover",Ke)],"--n-text-color-disabled":U||v[Ge("textColorGhostDisabled",Ke)]}}else if(Q){const U=ft?v.textColor:Wt?v.textColorTertiary:v[Ge("color",Ke)],q=re||U,$=x!=="default"&&x!=="tertiary";et={"--n-color":$?oi(q,{alpha:Number(v.colorOpacitySecondary)}):v.colorSecondary,"--n-color-hover":$?oi(q,{alpha:Number(v.colorOpacitySecondaryHover)}):v.colorSecondaryHover,"--n-color-pressed":$?oi(q,{alpha:Number(v.colorOpacitySecondaryPressed)}):v.colorSecondaryPressed,"--n-color-focus":$?oi(q,{alpha:Number(v.colorOpacitySecondaryHover)}):v.colorSecondaryHover,"--n-color-disabled":v.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":q,"--n-text-color-hover":q,"--n-text-color-pressed":q,"--n-text-color-focus":q,"--n-text-color-disabled":q}}else if(K||Qe){const U=ft?v.textColor:Wt?v.textColorTertiary:v[Ge("color",Ke)],q=re||U;K?(et["--n-color"]=v.colorTertiary,et["--n-color-hover"]=v.colorTertiaryHover,et["--n-color-pressed"]=v.colorTertiaryPressed,et["--n-color-focus"]=v.colorSecondaryHover,et["--n-color-disabled"]=v.colorTertiary):(et["--n-color"]=v.colorQuaternary,et["--n-color-hover"]=v.colorQuaternaryHover,et["--n-color-pressed"]=v.colorQuaternaryPressed,et["--n-color-focus"]=v.colorQuaternaryHover,et["--n-color-disabled"]=v.colorQuaternary),et["--n-ripple-color"]="#0000",et["--n-text-color"]=q,et["--n-text-color-hover"]=q,et["--n-text-color-pressed"]=q,et["--n-text-color-focus"]=q,et["--n-text-color-disabled"]=q}else et={"--n-color":re||v[Ge("color",Ke)],"--n-color-hover":re?Ca(re):v[Ge("colorHover",Ke)],"--n-color-pressed":re?cd(re):v[Ge("colorPressed",Ke)],"--n-color-focus":re?Ca(re):v[Ge("colorFocus",Ke)],"--n-color-disabled":re||v[Ge("colorDisabled",Ke)],"--n-ripple-color":re||v[Ge("rippleColor",Ke)],"--n-text-color":ze||(re?v.textColorPrimary:Wt?v.textColorTertiary:v[Ge("textColor",Ke)]),"--n-text-color-hover":ze||(re?v.textColorHoverPrimary:v[Ge("textColorHover",Ke)]),"--n-text-color-pressed":ze||(re?v.textColorPressedPrimary:v[Ge("textColorPressed",Ke)]),"--n-text-color-focus":ze||(re?v.textColorFocusPrimary:v[Ge("textColorFocus",Ke)]),"--n-text-color-disabled":ze||(re?v.textColorDisabledPrimary:v[Ge("textColorDisabled",Ke)])};let Ot={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};Le?Ot={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Ot={"--n-border":v[Ge("border",Ke)],"--n-border-hover":v[Ge("borderHover",Ke)],"--n-border-pressed":v[Ge("borderPressed",Ke)],"--n-border-focus":v[Ge("borderFocus",Ke)],"--n-border-disabled":v[Ge("borderDisabled",Ke)]};const{[Ge("height",N)]:Ft,[Ge("fontSize",N)]:ar,[Ge("padding",N)]:Sn,[Ge("paddingRound",N)]:E,[Ge("iconSize",N)]:de,[Ge("borderRadius",N)]:se,[Ge("iconMargin",N)]:L,waveOpacity:I}=v,W={"--n-width":he&&!Le?Ft:"initial","--n-height":Le?"initial":Ft,"--n-font-size":ar,"--n-padding":he||Le?"initial":He?E:Sn,"--n-icon-size":de,"--n-icon-margin":L,"--n-border-radius":Le?"initial":he||He?Ft:se};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":S,"--n-bezier-ease-out":w,"--n-ripple-duration":O,"--n-opacity-disabled":F,"--n-wave-opacity":I},Be),et),Ot),W)}),A=h?Es("button",Fe(()=>{let T="";const{dashed:S,type:w,ghost:v,text:O,color:F,round:X,circle:me,textColor:N,secondary:Y,tertiary:x,quaternary:Z,strong:Le}=e;S&&(T+="a"),v&&(T+="b"),O&&(T+="c"),X&&(T+="d"),me&&(T+="e"),Y&&(T+="f"),x&&(T+="g"),Z&&(T+="h"),Le&&(T+="i"),F&&(T+=`j${lE(F)}`),N&&(T+=`k${lE(N)}`);const{value:re}=a;return T+=`l${re[0]}`,T+=`m${w[0]}`,T}),C,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:g,mergedFocusable:o,mergedSize:a,showBorder:s,enterPressed:r,rtlEnabled:y,handleMousedown:c,handleKeydown:f,handleBlur:m,handleKeyup:d,handleClick:l,customColorCssVars:Fe(()=>{const{color:T}=e;if(!T)return null;const S=Ca(T);return{"--n-border-color":T,"--n-border-color-hover":S,"--n-border-color-pressed":cd(T),"--n-border-color-focus":S,"--n-border-color-disabled":T}}),cssVars:h?void 0:C,themeClass:A?.themeClass,onRender:A?.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n?.();const r=$n(this.$slots.default,s=>s&&R("span",{class:`${e}-button__content`},s));return R(t,{ref:"selfElRef",class:[this.themeClass,`${e}-button`,`${e}-button--${this.type}-type`,`${e}-button--${this.mergedSize}-type`,this.rtlEnabled&&`${e}-button--rtl`,this.disabled&&`${e}-button--disabled`,this.block&&`${e}-button--block`,this.enterPressed&&`${e}-button--pressed`,!this.text&&this.dashed&&`${e}-button--dashed`,this.color&&`${e}-button--color`,this.secondary&&`${e}-button--secondary`,this.loading&&`${e}-button--loading`,this.ghost&&`${e}-button--ghost`],tabindex:this.mergedFocusable?0:-1,type:this.attrType,style:this.cssVars,disabled:this.disabled,onClick:this.handleClick,onBlur:this.handleBlur,onMousedown:this.handleMousedown,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},this.iconPlacement==="right"&&r,R(iv,{width:!0},{default:()=>$n(this.$slots.icon,s=>(this.loading||this.renderIcon||s)&&R("span",{class:`${e}-button__icon`,style:{margin:ak(this.$slots.default)?"0":""}},R(gh,null,{default:()=>this.loading?R(rv,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):R("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():s)})))}),this.iconPlacement==="left"&&r,this.text?null:R(EI,{ref:"waveElRef",clsPrefix:e}),this.showBorder?R("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?R("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),MI={paddingSmall:"12px 16px 12px",paddingMedium:"19px 24px 20px",paddingLarge:"23px 32px 24px",paddingHuge:"27px 40px 28px",titleFontSizeSmall:"16px",titleFontSizeMedium:"18px",titleFontSizeLarge:"18px",titleFontSizeHuge:"18px",closeIconSize:"18px",closeSize:"22px"};function FI(e){const{primaryColor:t,borderRadius:n,lineHeight:r,fontSize:s,cardColor:i,textColor2:a,textColor1:o,dividerColor:c,fontWeightStrong:l,closeIconColor:d,closeIconColorHover:f,closeIconColorPressed:m,closeColorHover:h,closeColorPressed:g,modalColor:b,boxShadow1:p,popoverColor:y,actionColor:C}=e;return Object.assign(Object.assign({},MI),{lineHeight:r,color:i,colorModal:b,colorPopover:y,colorTarget:t,colorEmbedded:C,colorEmbeddedModal:C,colorEmbeddedPopover:C,textColor:a,titleTextColor:o,borderColor:c,actionColor:C,titleFontWeight:l,closeColorHover:h,closeColorPressed:g,closeBorderRadius:n,closeIconColor:d,closeIconColorHover:f,closeIconColorPressed:m,fontSizeSmall:s,fontSizeMedium:s,fontSizeLarge:s,fontSizeHuge:s,boxShadow:p,borderRadius:n})}const Uv={name:"Card",common:ys,self:FI},zI=ce([j("card",`
490
+ font-size: var(--n-font-size);
491
+ line-height: var(--n-line-height);
492
+ display: flex;
493
+ flex-direction: column;
494
+ width: 100%;
495
+ box-sizing: border-box;
496
+ position: relative;
497
+ border-radius: var(--n-border-radius);
498
+ background-color: var(--n-color);
499
+ color: var(--n-text-color);
500
+ word-break: break-word;
501
+ transition:
502
+ color .3s var(--n-bezier),
503
+ background-color .3s var(--n-bezier),
504
+ box-shadow .3s var(--n-bezier),
505
+ border-color .3s var(--n-bezier);
506
+ `,[ov({background:"var(--n-color-modal)"}),oe("hoverable",[ce("&:hover","box-shadow: var(--n-box-shadow);")]),oe("content-segmented",[ce(">",[J("content",{paddingTop:"var(--n-padding-bottom)"})])]),oe("content-soft-segmented",[ce(">",[J("content",`
507
+ margin: 0 var(--n-padding-left);
508
+ padding: var(--n-padding-bottom) 0;
509
+ `)])]),oe("footer-segmented",[ce(">",[J("footer",{paddingTop:"var(--n-padding-bottom)"})])]),oe("footer-soft-segmented",[ce(">",[J("footer",`
510
+ padding: var(--n-padding-bottom) 0;
511
+ margin: 0 var(--n-padding-left);
512
+ `)])]),ce(">",[j("card-header",`
513
+ box-sizing: border-box;
514
+ display: flex;
515
+ align-items: center;
516
+ font-size: var(--n-title-font-size);
517
+ padding:
518
+ var(--n-padding-top)
519
+ var(--n-padding-left)
520
+ var(--n-padding-bottom)
521
+ var(--n-padding-left);
522
+ `,[J("main",`
523
+ font-weight: var(--n-title-font-weight);
524
+ transition: color .3s var(--n-bezier);
525
+ flex: 1;
526
+ min-width: 0;
527
+ color: var(--n-title-text-color);
528
+ `),J("extra",`
529
+ display: flex;
530
+ align-items: center;
531
+ font-size: var(--n-font-size);
532
+ font-weight: 400;
533
+ transition: color .3s var(--n-bezier);
534
+ color: var(--n-text-color);
535
+ `),J("close",`
536
+ margin: 0 0 0 8px;
537
+ transition:
538
+ background-color .3s var(--n-bezier),
539
+ color .3s var(--n-bezier);
540
+ `)]),J("action",`
541
+ box-sizing: border-box;
542
+ transition:
543
+ background-color .3s var(--n-bezier),
544
+ border-color .3s var(--n-bezier);
545
+ background-clip: padding-box;
546
+ background-color: var(--n-action-color);
547
+ `),J("content","flex: 1; min-width: 0;"),J("content, footer",`
548
+ box-sizing: border-box;
549
+ padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
550
+ font-size: var(--n-font-size);
551
+ `,[ce("&:first-child",{paddingTop:"var(--n-padding-bottom)"})]),J("action",`
552
+ background-color: var(--n-action-color);
553
+ padding: var(--n-padding-bottom) var(--n-padding-left);
554
+ border-bottom-left-radius: var(--n-border-radius);
555
+ border-bottom-right-radius: var(--n-border-radius);
556
+ `)]),j("card-cover",`
557
+ overflow: hidden;
558
+ width: 100%;
559
+ border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;
560
+ `,[ce("img",`
561
+ display: block;
562
+ width: 100%;
563
+ `)]),oe("bordered",`
564
+ border: 1px solid var(--n-border-color);
565
+ `,[ce("&:target","border-color: var(--n-color-target);")]),oe("action-segmented",[ce(">",[J("action",[ce("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),oe("content-segmented, content-soft-segmented",[ce(">",[J("content",{transition:"border-color 0.3s var(--n-bezier)"},[ce("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),oe("footer-segmented, footer-soft-segmented",[ce(">",[J("footer",{transition:"border-color 0.3s var(--n-bezier)"},[ce("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),oe("embedded",`
566
+ background-color: var(--n-color-embedded);
567
+ `)]),Cb(j("card",`
568
+ background: var(--n-color-modal);
569
+ `,[oe("embedded",`
570
+ background-color: var(--n-color-embedded-modal);
571
+ `)])),av(j("card",`
572
+ background: var(--n-color-popover);
573
+ `,[oe("embedded",`
574
+ background-color: var(--n-color-embedded-popover);
575
+ `)]))]),Ob={title:[String,Function],contentClass:String,contentStyle:[Object,String],headerClass:String,headerStyle:[Object,String],headerExtraClass:String,headerExtraStyle:[Object,String],footerClass:String,footerStyle:[Object,String],embedded:Boolean,segmented:{type:[Boolean,Object],default:!1},size:{type:String,default:"medium"},bordered:{type:Boolean,default:!0},closable:Boolean,hoverable:Boolean,role:String,onClose:[Function,Array],tag:{type:String,default:"div"},cover:Function,content:[String,Function],footer:Function,action:Function,headerExtra:Function},UI=Nb(Ob),$I=Object.assign(Object.assign({},rn.props),Ob),$v=mt({name:"Card",props:$I,slots:Object,setup(e){const t=()=>{const{onClose:l}=e;l&&vt(l)},{inlineThemeDisabled:n,mergedClsPrefixRef:r,mergedRtlRef:s}=Er(e),i=rn("Card","-card",zI,Uv,e,r),a=Ks("Card",s,r),o=Fe(()=>{const{size:l}=e,{self:{color:d,colorModal:f,colorTarget:m,textColor:h,titleTextColor:g,titleFontWeight:b,borderColor:p,actionColor:y,borderRadius:C,lineHeight:A,closeIconColor:T,closeIconColorHover:S,closeIconColorPressed:w,closeColorHover:v,closeColorPressed:O,closeBorderRadius:F,closeIconSize:X,closeSize:me,boxShadow:N,colorPopover:Y,colorEmbedded:x,colorEmbeddedModal:Z,colorEmbeddedPopover:Le,[Ge("padding",l)]:re,[Ge("fontSize",l)]:He,[Ge("titleFontSize",l)]:he},common:{cubicBezierEaseInOut:ze}}=i.value,{top:Q,left:K,bottom:Qe}=Is(re);return{"--n-bezier":ze,"--n-border-radius":C,"--n-color":d,"--n-color-modal":f,"--n-color-popover":Y,"--n-color-embedded":x,"--n-color-embedded-modal":Z,"--n-color-embedded-popover":Le,"--n-color-target":m,"--n-text-color":h,"--n-line-height":A,"--n-action-color":y,"--n-title-text-color":g,"--n-title-font-weight":b,"--n-close-icon-color":T,"--n-close-icon-color-hover":S,"--n-close-icon-color-pressed":w,"--n-close-color-hover":v,"--n-close-color-pressed":O,"--n-border-color":p,"--n-box-shadow":N,"--n-padding-top":Q,"--n-padding-bottom":Qe,"--n-padding-left":K,"--n-font-size":He,"--n-title-font-size":he,"--n-close-size":me,"--n-close-icon-size":X,"--n-close-border-radius":F}}),c=n?Es("card",Fe(()=>e.size[0]),o,e):void 0;return{rtlEnabled:a,mergedClsPrefix:r,mergedTheme:i,handleCloseClick:t,cssVars:n?void 0:o,themeClass:c?.themeClass,onRender:c?.onRender}},render(){const{segmented:e,bordered:t,hoverable:n,mergedClsPrefix:r,rtlEnabled:s,onRender:i,embedded:a,tag:o,$slots:c}=this;return i?.(),R(o,{class:[`${r}-card`,this.themeClass,a&&`${r}-card--embedded`,{[`${r}-card--rtl`]:s,[`${r}-card--content${typeof e!="boolean"&&e.content==="soft"?"-soft":""}-segmented`]:e===!0||e!==!1&&e.content,[`${r}-card--footer${typeof e!="boolean"&&e.footer==="soft"?"-soft":""}-segmented`]:e===!0||e!==!1&&e.footer,[`${r}-card--action-segmented`]:e===!0||e!==!1&&e.action,[`${r}-card--bordered`]:t,[`${r}-card--hoverable`]:n}],style:this.cssVars,role:this.role},$n(c.cover,l=>{const d=this.cover?As([this.cover()]):l;return d&&R("div",{class:`${r}-card-cover`,role:"none"},d)}),$n(c.header,l=>{const{title:d}=this,f=d?As(typeof d=="function"?[d()]:[d]):l;return f||this.closable?R("div",{class:[`${r}-card-header`,this.headerClass],style:this.headerStyle,role:"heading"},R("div",{class:`${r}-card-header__main`,role:"heading"},f),$n(c["header-extra"],m=>{const h=this.headerExtra?As([this.headerExtra()]):m;return h&&R("div",{class:[`${r}-card-header__extra`,this.headerExtraClass],style:this.headerExtraStyle},h)}),this.closable&&R(xb,{clsPrefix:r,class:`${r}-card-header__close`,onClick:this.handleCloseClick,absolute:!0})):null}),$n(c.default,l=>{const{content:d}=this,f=d?As(typeof d=="function"?[d()]:[d]):l;return f&&R("div",{class:[`${r}-card__content`,this.contentClass],style:this.contentStyle,role:"none"},f)}),$n(c.footer,l=>{const d=this.footer?As([this.footer()]):l;return d&&R("div",{class:[`${r}-card__footer`,this.footerClass],style:this.footerStyle,role:"none"},d)}),$n(c.action,l=>{const d=this.action?As([this.action()]):l;return d&&R("div",{class:`${r}-card__action`,role:"none"},d)}))}}),HI={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function qI(e){const{baseColor:t,inputColorDisabled:n,cardColor:r,modalColor:s,popoverColor:i,textColorDisabled:a,borderColor:o,primaryColor:c,textColor2:l,fontSizeSmall:d,fontSizeMedium:f,fontSizeLarge:m,borderRadiusSmall:h,lineHeight:g}=e;return Object.assign(Object.assign({},HI),{labelLineHeight:g,fontSizeSmall:d,fontSizeMedium:f,fontSizeLarge:m,borderRadius:h,color:t,colorChecked:c,colorDisabled:n,colorDisabledChecked:n,colorTableHeader:r,colorTableHeaderModal:s,colorTableHeaderPopover:i,checkMarkColor:t,checkMarkColorDisabled:a,checkMarkColorDisabledChecked:a,border:`1px solid ${o}`,borderDisabled:`1px solid ${o}`,borderDisabledChecked:`1px solid ${o}`,borderChecked:`1px solid ${c}`,borderFocus:`1px solid ${c}`,boxShadowFocus:`0 0 0 2px ${oi(c,{alpha:.3})}`,textColor:l,textColorDisabled:a})}const jI={common:ys,self:qI},WI=ls("n-checkbox-group"),GI=()=>R("svg",{viewBox:"0 0 64 64",class:"check-icon"},R("path",{d:"M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z"})),VI=()=>R("svg",{viewBox:"0 0 100 100",class:"line-icon"},R("path",{d:"M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z"})),KI=ce([j("checkbox",`
576
+ font-size: var(--n-font-size);
577
+ outline: none;
578
+ cursor: pointer;
579
+ display: inline-flex;
580
+ flex-wrap: nowrap;
581
+ align-items: flex-start;
582
+ word-break: break-word;
583
+ line-height: var(--n-size);
584
+ --n-merged-color-table: var(--n-color-table);
585
+ `,[oe("show-label","line-height: var(--n-label-line-height);"),ce("&:hover",[j("checkbox-box",[J("border","border: var(--n-border-checked);")])]),ce("&:focus:not(:active)",[j("checkbox-box",[J("border",`
586
+ border: var(--n-border-focus);
587
+ box-shadow: var(--n-box-shadow-focus);
588
+ `)])]),oe("inside-table",[j("checkbox-box",`
589
+ background-color: var(--n-merged-color-table);
590
+ `)]),oe("checked",[j("checkbox-box",`
591
+ background-color: var(--n-color-checked);
592
+ `,[j("checkbox-icon",[ce(".check-icon",`
593
+ opacity: 1;
594
+ transform: scale(1);
595
+ `)])])]),oe("indeterminate",[j("checkbox-box",[j("checkbox-icon",[ce(".check-icon",`
596
+ opacity: 0;
597
+ transform: scale(.5);
598
+ `),ce(".line-icon",`
599
+ opacity: 1;
600
+ transform: scale(1);
601
+ `)])])]),oe("checked, indeterminate",[ce("&:focus:not(:active)",[j("checkbox-box",[J("border",`
602
+ border: var(--n-border-checked);
603
+ box-shadow: var(--n-box-shadow-focus);
604
+ `)])]),j("checkbox-box",`
605
+ background-color: var(--n-color-checked);
606
+ border-left: 0;
607
+ border-top: 0;
608
+ `,[J("border",{border:"var(--n-border-checked)"})])]),oe("disabled",{cursor:"not-allowed"},[oe("checked",[j("checkbox-box",`
609
+ background-color: var(--n-color-disabled-checked);
610
+ `,[J("border",{border:"var(--n-border-disabled-checked)"}),j("checkbox-icon",[ce(".check-icon, .line-icon",{fill:"var(--n-check-mark-color-disabled-checked)"})])])]),j("checkbox-box",`
611
+ background-color: var(--n-color-disabled);
612
+ `,[J("border",`
613
+ border: var(--n-border-disabled);
614
+ `),j("checkbox-icon",[ce(".check-icon, .line-icon",`
615
+ fill: var(--n-check-mark-color-disabled);
616
+ `)])]),J("label",`
617
+ color: var(--n-text-color-disabled);
618
+ `)]),j("checkbox-box-wrapper",`
619
+ position: relative;
620
+ width: var(--n-size);
621
+ flex-shrink: 0;
622
+ flex-grow: 0;
623
+ user-select: none;
624
+ -webkit-user-select: none;
625
+ `),j("checkbox-box",`
626
+ position: absolute;
627
+ left: 0;
628
+ top: 50%;
629
+ transform: translateY(-50%);
630
+ height: var(--n-size);
631
+ width: var(--n-size);
632
+ display: inline-block;
633
+ box-sizing: border-box;
634
+ border-radius: var(--n-border-radius);
635
+ background-color: var(--n-color);
636
+ transition: background-color 0.3s var(--n-bezier);
637
+ `,[J("border",`
638
+ transition:
639
+ border-color .3s var(--n-bezier),
640
+ box-shadow .3s var(--n-bezier);
641
+ border-radius: inherit;
642
+ position: absolute;
643
+ left: 0;
644
+ right: 0;
645
+ top: 0;
646
+ bottom: 0;
647
+ border: var(--n-border);
648
+ `),j("checkbox-icon",`
649
+ display: flex;
650
+ align-items: center;
651
+ justify-content: center;
652
+ position: absolute;
653
+ left: 1px;
654
+ right: 1px;
655
+ top: 1px;
656
+ bottom: 1px;
657
+ `,[ce(".check-icon, .line-icon",`
658
+ width: 100%;
659
+ fill: var(--n-check-mark-color);
660
+ opacity: 0;
661
+ transform: scale(0.5);
662
+ transform-origin: center;
663
+ transition:
664
+ fill 0.3s var(--n-bezier),
665
+ transform 0.3s var(--n-bezier),
666
+ opacity 0.3s var(--n-bezier),
667
+ border-color 0.3s var(--n-bezier);
668
+ `),ic({left:"1px",top:"1px"})])]),J("label",`
669
+ color: var(--n-text-color);
670
+ transition: color .3s var(--n-bezier);
671
+ user-select: none;
672
+ -webkit-user-select: none;
673
+ padding: var(--n-label-padding);
674
+ font-weight: var(--n-label-font-weight);
675
+ `,[ce("&:empty",{display:"none"})])]),Cb(j("checkbox",`
676
+ --n-merged-color-table: var(--n-color-table-modal);
677
+ `)),av(j("checkbox",`
678
+ --n-merged-color-table: var(--n-color-table-popover);
679
+ `))]),YI=Object.assign(Object.assign({},rn.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),zi=mt({name:"Checkbox",props:YI,setup(e){const t=cs(WI,null),n=Me(null),{mergedClsPrefixRef:r,inlineThemeDisabled:s,mergedRtlRef:i}=Er(e),a=Me(e.defaultChecked),o=on(e,"checked"),c=sl(o,a),l=yo(()=>{if(t){const w=t.valueSetRef.value;return w&&e.value!==void 0?w.has(e.value):!1}else return c.value===e.checkedValue}),d=Ou(e,{mergedSize(w){const{size:v}=e;if(v!==void 0)return v;if(t){const{value:O}=t.mergedSizeRef;if(O!==void 0)return O}if(w){const{mergedSize:O}=w;if(O!==void 0)return O.value}return"medium"},mergedDisabled(w){const{disabled:v}=e;if(v!==void 0)return v;if(t){if(t.disabledRef.value)return!0;const{maxRef:{value:O},checkedCountRef:F}=t;if(O!==void 0&&F.value>=O&&!l.value)return!0;const{minRef:{value:X}}=t;if(X!==void 0&&F.value<=X&&l.value)return!0}return w?w.disabled.value:!1}}),{mergedDisabledRef:f,mergedSizeRef:m}=d,h=rn("Checkbox","-checkbox",KI,jI,e,r);function g(w){if(t&&e.value!==void 0)t.toggleCheckbox(!l.value,e.value);else{const{onChange:v,"onUpdate:checked":O,onUpdateChecked:F}=e,{nTriggerFormInput:X,nTriggerFormChange:me}=d,N=l.value?e.uncheckedValue:e.checkedValue;O&&vt(O,N,w),F&&vt(F,N,w),v&&vt(v,N,w),X(),me(),a.value=N}}function b(w){f.value||g(w)}function p(w){if(!f.value)switch(w.key){case" ":case"Enter":g(w)}}function y(w){switch(w.key){case" ":w.preventDefault()}}const C={focus:()=>{var w;(w=n.value)===null||w===void 0||w.focus()},blur:()=>{var w;(w=n.value)===null||w===void 0||w.blur()}},A=Ks("Checkbox",i,r),T=Fe(()=>{const{value:w}=m,{common:{cubicBezierEaseInOut:v},self:{borderRadius:O,color:F,colorChecked:X,colorDisabled:me,colorTableHeader:N,colorTableHeaderModal:Y,colorTableHeaderPopover:x,checkMarkColor:Z,checkMarkColorDisabled:Le,border:re,borderFocus:He,borderDisabled:he,borderChecked:ze,boxShadowFocus:Q,textColor:K,textColorDisabled:Qe,checkMarkColorDisabledChecked:De,colorDisabledChecked:Be,borderDisabledChecked:et,labelPadding:Wt,labelLineHeight:ft,labelFontWeight:Ke,[Ge("fontSize",w)]:Ot,[Ge("size",w)]:Ft}}=h.value;return{"--n-label-line-height":ft,"--n-label-font-weight":Ke,"--n-size":Ft,"--n-bezier":v,"--n-border-radius":O,"--n-border":re,"--n-border-checked":ze,"--n-border-focus":He,"--n-border-disabled":he,"--n-border-disabled-checked":et,"--n-box-shadow-focus":Q,"--n-color":F,"--n-color-checked":X,"--n-color-table":N,"--n-color-table-modal":Y,"--n-color-table-popover":x,"--n-color-disabled":me,"--n-color-disabled-checked":Be,"--n-text-color":K,"--n-text-color-disabled":Qe,"--n-check-mark-color":Z,"--n-check-mark-color-disabled":Le,"--n-check-mark-color-disabled-checked":De,"--n-font-size":Ot,"--n-label-padding":Wt}}),S=s?Es("checkbox",Fe(()=>m.value[0]),T,e):void 0;return Object.assign(d,C,{rtlEnabled:A,selfRef:n,mergedClsPrefix:r,mergedDisabled:f,renderedChecked:l,mergedTheme:h,labelId:gb(),handleClick:b,handleKeyUp:p,handleKeyDown:y,cssVars:s?void 0:T,themeClass:S?.themeClass,onRender:S?.onRender})},render(){var e;const{$slots:t,renderedChecked:n,mergedDisabled:r,indeterminate:s,privateInsideTable:i,cssVars:a,labelId:o,label:c,mergedClsPrefix:l,focusable:d,handleKeyUp:f,handleKeyDown:m,handleClick:h}=this;(e=this.onRender)===null||e===void 0||e.call(this);const g=$n(t.default,b=>c||b?R("span",{class:`${l}-checkbox__label`,id:o},c||b):null);return R("div",{ref:"selfRef",class:[`${l}-checkbox`,this.themeClass,this.rtlEnabled&&`${l}-checkbox--rtl`,n&&`${l}-checkbox--checked`,r&&`${l}-checkbox--disabled`,s&&`${l}-checkbox--indeterminate`,i&&`${l}-checkbox--inside-table`,g&&`${l}-checkbox--show-label`],tabindex:r||!d?void 0:0,role:"checkbox","aria-checked":s?"mixed":n,"aria-labelledby":o,style:a,onKeyup:f,onKeydown:m,onClick:h,onMousedown:()=>{Yn("selectstart",window,b=>{b.preventDefault()},{once:!0})}},R("div",{class:`${l}-checkbox-box-wrapper`}," ",R("div",{class:`${l}-checkbox-box`},R(gh,null,{default:()=>this.indeterminate?R("div",{key:"indeterminate",class:`${l}-checkbox-icon`},VI()):R("div",{key:"check",class:`${l}-checkbox-icon`},GI())}),R("div",{class:`${l}-checkbox-box__border`}))),g)}});function XI(e){const{fontWeight:t,textColor1:n,textColor2:r,textColorDisabled:s,dividerColor:i,fontSize:a}=e;return{titleFontSize:a,titleFontWeight:t,dividerColor:i,titleTextColor:n,titleTextColorDisabled:s,fontSize:a,textColor:r,arrowColor:r,arrowColorDisabled:s,itemMargin:"16px 0 0 0",titlePadding:"16px 0 0 0"}}const QI={common:ys,self:XI},ZI=j("collapse","width: 100%;",[j("collapse-item",`
680
+ font-size: var(--n-font-size);
681
+ color: var(--n-text-color);
682
+ transition:
683
+ color .3s var(--n-bezier),
684
+ border-color .3s var(--n-bezier);
685
+ margin: var(--n-item-margin);
686
+ `,[oe("disabled",[J("header","cursor: not-allowed;",[J("header-main",`
687
+ color: var(--n-title-text-color-disabled);
688
+ `),j("collapse-item-arrow",`
689
+ color: var(--n-arrow-color-disabled);
690
+ `)])]),j("collapse-item","margin-left: 32px;"),ce("&:first-child","margin-top: 0;"),ce("&:first-child >",[J("header","padding-top: 0;")]),oe("left-arrow-placement",[J("header",[j("collapse-item-arrow","margin-right: 4px;")])]),oe("right-arrow-placement",[J("header",[j("collapse-item-arrow","margin-left: 4px;")])]),J("content-wrapper",[J("content-inner","padding-top: 16px;"),HA({duration:"0.15s"})]),oe("active",[J("header",[oe("active",[j("collapse-item-arrow","transform: rotate(90deg);")])])]),ce("&:not(:first-child)","border-top: 1px solid var(--n-divider-color);"),Gr("disabled",[oe("trigger-area-main",[J("header",[J("header-main","cursor: pointer;"),j("collapse-item-arrow","cursor: default;")])]),oe("trigger-area-arrow",[J("header",[j("collapse-item-arrow","cursor: pointer;")])]),oe("trigger-area-extra",[J("header",[J("header-extra","cursor: pointer;")])])]),J("header",`
691
+ font-size: var(--n-title-font-size);
692
+ display: flex;
693
+ flex-wrap: nowrap;
694
+ align-items: center;
695
+ transition: color .3s var(--n-bezier);
696
+ position: relative;
697
+ padding: var(--n-title-padding);
698
+ color: var(--n-title-text-color);
699
+ `,[J("header-main",`
700
+ display: flex;
701
+ flex-wrap: nowrap;
702
+ align-items: center;
703
+ font-weight: var(--n-title-font-weight);
704
+ transition: color .3s var(--n-bezier);
705
+ flex: 1;
706
+ color: var(--n-title-text-color);
707
+ `),J("header-extra",`
708
+ display: flex;
709
+ align-items: center;
710
+ transition: color .3s var(--n-bezier);
711
+ color: var(--n-text-color);
712
+ `),j("collapse-item-arrow",`
713
+ display: flex;
714
+ transition:
715
+ transform .15s var(--n-bezier),
716
+ color .3s var(--n-bezier);
717
+ font-size: 18px;
718
+ color: var(--n-arrow-color);
719
+ `)])])]),JI=Object.assign(Object.assign({},rn.props),{defaultExpandedNames:{type:[Array,String],default:null},expandedNames:[Array,String],arrowPlacement:{type:String,default:"left"},accordion:{type:Boolean,default:!1},displayDirective:{type:String,default:"if"},triggerAreas:{type:Array,default:()=>["main","extra","arrow"]},onItemHeaderClick:[Function,Array],"onUpdate:expandedNames":[Function,Array],onUpdateExpandedNames:[Function,Array],onExpandedNamesChange:{type:[Function,Array],validator:()=>!0,default:void 0}}),Hv=ls("n-collapse"),eR=mt({name:"Collapse",props:JI,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:s}=Er(e),i=Me(e.defaultExpandedNames),a=Fe(()=>e.expandedNames),o=sl(a,i),c=rn("Collapse","-collapse",ZI,QI,e,n);function l(b){const{"onUpdate:expandedNames":p,onUpdateExpandedNames:y,onExpandedNamesChange:C}=e;y&&vt(y,b),p&&vt(p,b),C&&vt(C,b),i.value=b}function d(b){const{onItemHeaderClick:p}=e;p&&vt(p,b)}function f(b,p,y){const{accordion:C}=e,{value:A}=o;if(C)b?(l([p]),d({name:p,expanded:!0,event:y})):(l([]),d({name:p,expanded:!1,event:y}));else if(!Array.isArray(A))l([p]),d({name:p,expanded:!0,event:y});else{const T=A.slice(),S=T.findIndex(w=>p===w);~S?(T.splice(S,1),l(T),d({name:p,expanded:!1,event:y})):(T.push(p),l(T),d({name:p,expanded:!0,event:y}))}}ci(Hv,{props:e,mergedClsPrefixRef:n,expandedNamesRef:o,slots:t,toggleItem:f});const m=Ks("Collapse",s,n),h=Fe(()=>{const{common:{cubicBezierEaseInOut:b},self:{titleFontWeight:p,dividerColor:y,titlePadding:C,titleTextColor:A,titleTextColorDisabled:T,textColor:S,arrowColor:w,fontSize:v,titleFontSize:O,arrowColorDisabled:F,itemMargin:X}}=c.value;return{"--n-font-size":v,"--n-bezier":b,"--n-text-color":S,"--n-divider-color":y,"--n-title-padding":C,"--n-title-font-size":O,"--n-title-text-color":A,"--n-title-text-color-disabled":T,"--n-title-font-weight":p,"--n-arrow-color":w,"--n-arrow-color-disabled":F,"--n-item-margin":X}}),g=r?Es("collapse",void 0,h,e):void 0;return{rtlEnabled:m,mergedTheme:c,mergedClsPrefix:n,cssVars:r?void 0:h,themeClass:g?.themeClass,onRender:g?.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),R("div",{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),tR=mt({name:"CollapseItemContent",props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){return{onceTrue:xv(on(e,"show"))}},render(){return R(iv,null,{default:()=>{const{show:e,displayDirective:t,onceTrue:n,clsPrefix:r}=this,s=t==="show"&&n,i=R("div",{class:`${r}-collapse-item__content-wrapper`},R("div",{class:`${r}-collapse-item__content-inner`},this.$slots));return s?mu(i,[[Sf,e]]):e?i:null}})}}),nR={title:String,name:[String,Number],disabled:Boolean,displayDirective:String},ld=mt({name:"CollapseItem",props:nR,setup(e){const{mergedRtlRef:t}=Er(e),n=gb(),r=yo(()=>{var f;return(f=e.name)!==null&&f!==void 0?f:n}),s=cs(Hv);s||ph("collapse-item","`n-collapse-item` must be placed inside `n-collapse`.");const{expandedNamesRef:i,props:a,mergedClsPrefixRef:o,slots:c}=s,l=Fe(()=>{const{value:f}=i;if(Array.isArray(f)){const{value:m}=r;return!~f.findIndex(h=>h===m)}else if(f){const{value:m}=r;return m!==f}return!0});return{rtlEnabled:Ks("Collapse",t,o),collapseSlots:c,randomName:n,mergedClsPrefix:o,collapsed:l,triggerAreas:on(a,"triggerAreas"),mergedDisplayDirective:Fe(()=>{const{displayDirective:f}=e;return f||a.displayDirective}),arrowPlacement:Fe(()=>a.arrowPlacement),handleClick(f){let m="main";Ly(f,"arrow")&&(m="arrow"),Ly(f,"extra")&&(m="extra"),a.triggerAreas.includes(m)&&s&&!e.disabled&&s.toggleItem(l.value,r.value,f)}}},render(){const{collapseSlots:e,$slots:t,arrowPlacement:n,collapsed:r,mergedDisplayDirective:s,mergedClsPrefix:i,disabled:a,triggerAreas:o}=this,c=j0(t.header,{collapsed:r},()=>[this.title]),l=t["header-extra"]||e["header-extra"],d=t.arrow||e.arrow;return R("div",{class:[`${i}-collapse-item`,`${i}-collapse-item--${n}-arrow-placement`,a&&`${i}-collapse-item--disabled`,!r&&`${i}-collapse-item--active`,o.map(f=>`${i}-collapse-item--trigger-area-${f}`)]},R("div",{class:[`${i}-collapse-item__header`,!r&&`${i}-collapse-item__header--active`]},R("div",{class:`${i}-collapse-item__header-main`,onClick:this.handleClick},n==="right"&&c,R("div",{class:`${i}-collapse-item-arrow`,key:this.rtlEnabled?0:1,"data-arrow":!0},j0(d,{collapsed:r},()=>[R(Vs,{clsPrefix:i},{default:()=>this.rtlEnabled?R(iI,null):R(aI,null)})])),n==="left"&&c),ik(l,{collapsed:r},f=>R("div",{class:`${i}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},f))),R(tR,{clsPrefix:i,displayDirective:s,show:!r},t))}}),rR={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function sR(e){const{borderColor:t,primaryColor:n,baseColor:r,textColorDisabled:s,inputColorDisabled:i,textColor2:a,opacityDisabled:o,borderRadius:c,fontSizeSmall:l,fontSizeMedium:d,fontSizeLarge:f,heightSmall:m,heightMedium:h,heightLarge:g,lineHeight:b}=e;return Object.assign(Object.assign({},rR),{labelLineHeight:b,buttonHeightSmall:m,buttonHeightMedium:h,buttonHeightLarge:g,fontSizeSmall:l,fontSizeMedium:d,fontSizeLarge:f,boxShadow:`inset 0 0 0 1px ${t}`,boxShadowActive:`inset 0 0 0 1px ${n}`,boxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${oi(n,{alpha:.2})}`,boxShadowHover:`inset 0 0 0 1px ${n}`,boxShadowDisabled:`inset 0 0 0 1px ${t}`,color:r,colorDisabled:i,colorActive:"#0000",textColor:a,textColorDisabled:s,dotColorActive:n,dotColorDisabled:t,buttonBorderColor:t,buttonBorderColorActive:n,buttonBorderColorHover:t,buttonColor:r,buttonColorActive:r,buttonTextColor:a,buttonTextColorActive:n,buttonTextColorHover:n,opacityDisabled:o,buttonBoxShadowFocus:`inset 0 0 0 1px ${n}, 0 0 0 2px ${oi(n,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:c})}const iR={common:ys,self:sR},aR={name:String,value:{type:[String,Number,Boolean],default:"on"},checked:{type:Boolean,default:void 0},defaultChecked:Boolean,disabled:{type:Boolean,default:void 0},label:String,size:String,onUpdateChecked:[Function,Array],"onUpdate:checked":[Function,Array],checkedValue:{type:Boolean,default:void 0}},qv=ls("n-radio-group");function oR(e){const t=cs(qv,null),n=Ou(e,{mergedSize(C){const{size:A}=e;if(A!==void 0)return A;if(t){const{mergedSizeRef:{value:T}}=t;if(T!==void 0)return T}return C?C.mergedSize.value:"medium"},mergedDisabled(C){return!!(e.disabled||t?.disabledRef.value||C?.disabled.value)}}),{mergedSizeRef:r,mergedDisabledRef:s}=n,i=Me(null),a=Me(null),o=Me(e.defaultChecked),c=on(e,"checked"),l=sl(c,o),d=yo(()=>t?t.valueRef.value===e.value:l.value),f=yo(()=>{const{name:C}=e;if(C!==void 0)return C;if(t)return t.nameRef.value}),m=Me(!1);function h(){if(t){const{doUpdateValue:C}=t,{value:A}=e;vt(C,A)}else{const{onUpdateChecked:C,"onUpdate:checked":A}=e,{nTriggerFormInput:T,nTriggerFormChange:S}=n;C&&vt(C,!0),A&&vt(A,!0),T(),S(),o.value=!0}}function g(){s.value||d.value||h()}function b(){g(),i.value&&(i.value.checked=d.value)}function p(){m.value=!1}function y(){m.value=!0}return{mergedClsPrefix:t?t.mergedClsPrefixRef:Er(e).mergedClsPrefixRef,inputRef:i,labelRef:a,mergedName:f,mergedDisabled:s,renderSafeChecked:d,focus:m,mergedSize:r,handleRadioInputChange:b,handleRadioInputBlur:p,handleRadioInputFocus:y}}const cR=mt({name:"RadioButton",props:aR,setup:oR,render(){const{mergedClsPrefix:e}=this;return R("label",{class:[`${e}-radio-button`,this.mergedDisabled&&`${e}-radio-button--disabled`,this.renderSafeChecked&&`${e}-radio-button--checked`,this.focus&&[`${e}-radio-button--focus`]]},R("input",{ref:"inputRef",type:"radio",class:`${e}-radio-input`,value:this.value,name:this.mergedName,checked:this.renderSafeChecked,disabled:this.mergedDisabled,onChange:this.handleRadioInputChange,onFocus:this.handleRadioInputFocus,onBlur:this.handleRadioInputBlur}),R("div",{class:`${e}-radio-button__state-border`}),$n(this.$slots.default,t=>!t&&!this.label?null:R("div",{ref:"labelRef",class:`${e}-radio__label`},t||this.label)))}}),lR=j("radio-group",`
720
+ display: inline-block;
721
+ font-size: var(--n-font-size);
722
+ `,[J("splitor",`
723
+ display: inline-block;
724
+ vertical-align: bottom;
725
+ width: 1px;
726
+ transition:
727
+ background-color .3s var(--n-bezier),
728
+ opacity .3s var(--n-bezier);
729
+ background: var(--n-button-border-color);
730
+ `,[oe("checked",{backgroundColor:"var(--n-button-border-color-active)"}),oe("disabled",{opacity:"var(--n-opacity-disabled)"})]),oe("button-group",`
731
+ white-space: nowrap;
732
+ height: var(--n-height);
733
+ line-height: var(--n-height);
734
+ `,[j("radio-button",{height:"var(--n-height)",lineHeight:"var(--n-height)"}),J("splitor",{height:"var(--n-height)"})]),j("radio-button",`
735
+ vertical-align: bottom;
736
+ outline: none;
737
+ position: relative;
738
+ user-select: none;
739
+ -webkit-user-select: none;
740
+ display: inline-block;
741
+ box-sizing: border-box;
742
+ padding-left: 14px;
743
+ padding-right: 14px;
744
+ white-space: nowrap;
745
+ transition:
746
+ background-color .3s var(--n-bezier),
747
+ opacity .3s var(--n-bezier),
748
+ border-color .3s var(--n-bezier),
749
+ color .3s var(--n-bezier);
750
+ background: var(--n-button-color);
751
+ color: var(--n-button-text-color);
752
+ border-top: 1px solid var(--n-button-border-color);
753
+ border-bottom: 1px solid var(--n-button-border-color);
754
+ `,[j("radio-input",`
755
+ pointer-events: none;
756
+ position: absolute;
757
+ border: 0;
758
+ border-radius: inherit;
759
+ left: 0;
760
+ right: 0;
761
+ top: 0;
762
+ bottom: 0;
763
+ opacity: 0;
764
+ z-index: 1;
765
+ `),J("state-border",`
766
+ z-index: 1;
767
+ pointer-events: none;
768
+ position: absolute;
769
+ box-shadow: var(--n-button-box-shadow);
770
+ transition: box-shadow .3s var(--n-bezier);
771
+ left: -1px;
772
+ bottom: -1px;
773
+ right: -1px;
774
+ top: -1px;
775
+ `),ce("&:first-child",`
776
+ border-top-left-radius: var(--n-button-border-radius);
777
+ border-bottom-left-radius: var(--n-button-border-radius);
778
+ border-left: 1px solid var(--n-button-border-color);
779
+ `,[J("state-border",`
780
+ border-top-left-radius: var(--n-button-border-radius);
781
+ border-bottom-left-radius: var(--n-button-border-radius);
782
+ `)]),ce("&:last-child",`
783
+ border-top-right-radius: var(--n-button-border-radius);
784
+ border-bottom-right-radius: var(--n-button-border-radius);
785
+ border-right: 1px solid var(--n-button-border-color);
786
+ `,[J("state-border",`
787
+ border-top-right-radius: var(--n-button-border-radius);
788
+ border-bottom-right-radius: var(--n-button-border-radius);
789
+ `)]),Gr("disabled",`
790
+ cursor: pointer;
791
+ `,[ce("&:hover",[J("state-border",`
792
+ transition: box-shadow .3s var(--n-bezier);
793
+ box-shadow: var(--n-button-box-shadow-hover);
794
+ `),Gr("checked",{color:"var(--n-button-text-color-hover)"})]),oe("focus",[ce("&:not(:active)",[J("state-border",{boxShadow:"var(--n-button-box-shadow-focus)"})])])]),oe("checked",`
795
+ background: var(--n-button-color-active);
796
+ color: var(--n-button-text-color-active);
797
+ border-color: var(--n-button-border-color-active);
798
+ `),oe("disabled",`
799
+ cursor: not-allowed;
800
+ opacity: var(--n-opacity-disabled);
801
+ `)])]);function uR(e,t,n){var r;const s=[];let i=!1;for(let a=0;a<e.length;++a){const o=e[a],c=(r=o.type)===null||r===void 0?void 0:r.name;c==="RadioButton"&&(i=!0);const l=o.props;if(c!=="RadioButton"){s.push(o);continue}if(a===0)s.push(o);else{const d=s[s.length-1].props,f=t===d.value,m=d.disabled,h=t===l.value,g=l.disabled,b=(f?2:0)+(m?0:1),p=(h?2:0)+(g?0:1),y={[`${n}-radio-group__splitor--disabled`]:m,[`${n}-radio-group__splitor--checked`]:f},C={[`${n}-radio-group__splitor--disabled`]:g,[`${n}-radio-group__splitor--checked`]:h},A=b<p?C:y;s.push(R("div",{class:[`${n}-radio-group__splitor`,A]}),o)}}return{children:s,isButtonGroup:i}}const dR=Object.assign(Object.assign({},rn.props),{name:String,value:[String,Number,Boolean],defaultValue:{type:[String,Number,Boolean],default:null},size:String,disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array]}),fR=mt({name:"RadioGroup",props:dR,setup(e){const t=Me(null),{mergedSizeRef:n,mergedDisabledRef:r,nTriggerFormChange:s,nTriggerFormInput:i,nTriggerFormBlur:a,nTriggerFormFocus:o}=Ou(e),{mergedClsPrefixRef:c,inlineThemeDisabled:l,mergedRtlRef:d}=Er(e),f=rn("Radio","-radio-group",lR,iR,e,c),m=Me(e.defaultValue),h=on(e,"value"),g=sl(h,m);function b(S){const{onUpdateValue:w,"onUpdate:value":v}=e;w&&vt(w,S),v&&vt(v,S),m.value=S,s(),i()}function p(S){const{value:w}=t;w&&(w.contains(S.relatedTarget)||o())}function y(S){const{value:w}=t;w&&(w.contains(S.relatedTarget)||a())}ci(qv,{mergedClsPrefixRef:c,nameRef:on(e,"name"),valueRef:g,disabledRef:r,mergedSizeRef:n,doUpdateValue:b});const C=Ks("Radio",d,c),A=Fe(()=>{const{value:S}=n,{common:{cubicBezierEaseInOut:w},self:{buttonBorderColor:v,buttonBorderColorActive:O,buttonBorderRadius:F,buttonBoxShadow:X,buttonBoxShadowFocus:me,buttonBoxShadowHover:N,buttonColor:Y,buttonColorActive:x,buttonTextColor:Z,buttonTextColorActive:Le,buttonTextColorHover:re,opacityDisabled:He,[Ge("buttonHeight",S)]:he,[Ge("fontSize",S)]:ze}}=f.value;return{"--n-font-size":ze,"--n-bezier":w,"--n-button-border-color":v,"--n-button-border-color-active":O,"--n-button-border-radius":F,"--n-button-box-shadow":X,"--n-button-box-shadow-focus":me,"--n-button-box-shadow-hover":N,"--n-button-color":Y,"--n-button-color-active":x,"--n-button-text-color":Z,"--n-button-text-color-hover":re,"--n-button-text-color-active":Le,"--n-height":he,"--n-opacity-disabled":He}}),T=l?Es("radio-group",Fe(()=>n.value[0]),A,e):void 0;return{selfElRef:t,rtlEnabled:C,mergedClsPrefix:c,mergedValue:g,handleFocusout:y,handleFocusin:p,cssVars:l?void 0:A,themeClass:T?.themeClass,onRender:T?.onRender}},render(){var e;const{mergedValue:t,mergedClsPrefix:n,handleFocusin:r,handleFocusout:s}=this,{children:i,isButtonGroup:a}=uR(Si(Pb(this)),t,n);return(e=this.onRender)===null||e===void 0||e.call(this),R("div",{onFocusin:r,onFocusout:s,ref:"selfElRef",class:[`${n}-radio-group`,this.rtlEnabled&&`${n}-radio-group--rtl`,this.themeClass,a&&`${n}-radio-group--button-group`],style:this.cssVars},i)}}),hR=ls("n-dialog-provider"),mR={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"22px",closeIconSize:"18px",closeMargin:"20px 26px 0 0",closeMarginIconTop:"10px 16px 0 0"};function gR(e){const{textColor1:t,textColor2:n,modalColor:r,closeIconColor:s,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:o,closeColorPressed:c,infoColor:l,successColor:d,warningColor:f,errorColor:m,primaryColor:h,dividerColor:g,borderRadius:b,fontWeightStrong:p,lineHeight:y,fontSize:C}=e;return Object.assign(Object.assign({},mR),{fontSize:C,lineHeight:y,border:`1px solid ${g}`,titleTextColor:t,textColor:n,color:r,closeColorHover:o,closeColorPressed:c,closeIconColor:s,closeIconColorHover:i,closeIconColorPressed:a,closeBorderRadius:b,iconColor:h,iconColorInfo:l,iconColorSuccess:d,iconColorWarning:f,iconColorError:m,borderRadius:b,titleFontWeight:p})}const jv=cv({name:"Dialog",common:ys,peers:{Button:zv},self:gR}),Db={icon:Function,type:{type:String,default:"default"},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function},bR=Nb(Db),pR=ce([j("dialog",`
802
+ --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);
803
+ word-break: break-word;
804
+ line-height: var(--n-line-height);
805
+ position: relative;
806
+ background: var(--n-color);
807
+ color: var(--n-text-color);
808
+ box-sizing: border-box;
809
+ margin: auto;
810
+ border-radius: var(--n-border-radius);
811
+ padding: var(--n-padding);
812
+ transition:
813
+ border-color .3s var(--n-bezier),
814
+ background-color .3s var(--n-bezier),
815
+ color .3s var(--n-bezier);
816
+ `,[J("icon",{color:"var(--n-icon-color)"}),oe("bordered",{border:"var(--n-border)"}),oe("icon-top",[J("close",{margin:"var(--n-close-margin)"}),J("icon",{margin:"var(--n-icon-margin)"}),J("content",{textAlign:"center"}),J("title",{justifyContent:"center"}),J("action",{justifyContent:"center"})]),oe("icon-left",[J("icon",{margin:"var(--n-icon-margin)"}),oe("closable",[J("title",`
817
+ padding-right: calc(var(--n-close-size) + 6px);
818
+ `)])]),J("close",`
819
+ position: absolute;
820
+ right: 0;
821
+ top: 0;
822
+ margin: var(--n-close-margin);
823
+ transition:
824
+ background-color .3s var(--n-bezier),
825
+ color .3s var(--n-bezier);
826
+ z-index: 1;
827
+ `),J("content",`
828
+ font-size: var(--n-font-size);
829
+ margin: var(--n-content-margin);
830
+ position: relative;
831
+ word-break: break-word;
832
+ `,[oe("last","margin-bottom: 0;")]),J("action",`
833
+ display: flex;
834
+ justify-content: flex-end;
835
+ `,[ce("> *:not(:last-child)",`
836
+ margin-right: var(--n-action-space);
837
+ `)]),J("icon",`
838
+ font-size: var(--n-icon-size);
839
+ transition: color .3s var(--n-bezier);
840
+ `),J("title",`
841
+ transition: color .3s var(--n-bezier);
842
+ display: flex;
843
+ align-items: center;
844
+ font-size: var(--n-title-font-size);
845
+ font-weight: var(--n-title-font-weight);
846
+ color: var(--n-title-text-color);
847
+ `),j("dialog-icon-container",`
848
+ display: flex;
849
+ justify-content: center;
850
+ `)]),Cb(j("dialog",`
851
+ width: 446px;
852
+ max-width: calc(100vw - 32px);
853
+ `)),j("dialog",[ov(`
854
+ width: 446px;
855
+ max-width: calc(100vw - 32px);
856
+ `)])]),yR={default:()=>R(_f,null),info:()=>R(_f,null),success:()=>R(Sb,null),warning:()=>R(Tb,null),error:()=>R(vb,null)},ER=mt({name:"Dialog",alias:["NimbusConfirmCard","Confirm"],props:Object.assign(Object.assign({},rn.props),Db),slots:Object,setup(e){const{mergedComponentPropsRef:t,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:s}=Er(e),i=Ks("Dialog",s,n),a=Fe(()=>{var h,g;const{iconPlacement:b}=e;return b||((g=(h=t?.value)===null||h===void 0?void 0:h.Dialog)===null||g===void 0?void 0:g.iconPlacement)||"left"});function o(h){const{onPositiveClick:g}=e;g&&g(h)}function c(h){const{onNegativeClick:g}=e;g&&g(h)}function l(){const{onClose:h}=e;h&&h()}const d=rn("Dialog","-dialog",pR,jv,e,n),f=Fe(()=>{const{type:h}=e,g=a.value,{common:{cubicBezierEaseInOut:b},self:{fontSize:p,lineHeight:y,border:C,titleTextColor:A,textColor:T,color:S,closeBorderRadius:w,closeColorHover:v,closeColorPressed:O,closeIconColor:F,closeIconColorHover:X,closeIconColorPressed:me,closeIconSize:N,borderRadius:Y,titleFontWeight:x,titleFontSize:Z,padding:Le,iconSize:re,actionSpace:He,contentMargin:he,closeSize:ze,[g==="top"?"iconMarginIconTop":"iconMargin"]:Q,[g==="top"?"closeMarginIconTop":"closeMargin"]:K,[Ge("iconColor",h)]:Qe}}=d.value,De=Is(Q);return{"--n-font-size":p,"--n-icon-color":Qe,"--n-bezier":b,"--n-close-margin":K,"--n-icon-margin-top":De.top,"--n-icon-margin-right":De.right,"--n-icon-margin-bottom":De.bottom,"--n-icon-margin-left":De.left,"--n-icon-size":re,"--n-close-size":ze,"--n-close-icon-size":N,"--n-close-border-radius":w,"--n-close-color-hover":v,"--n-close-color-pressed":O,"--n-close-icon-color":F,"--n-close-icon-color-hover":X,"--n-close-icon-color-pressed":me,"--n-color":S,"--n-text-color":T,"--n-border-radius":Y,"--n-padding":Le,"--n-line-height":y,"--n-border":C,"--n-content-margin":he,"--n-title-font-size":Z,"--n-title-font-weight":x,"--n-title-text-color":A,"--n-action-space":He}}),m=r?Es("dialog",Fe(()=>`${e.type[0]}${a.value[0]}`),f,e):void 0;return{mergedClsPrefix:n,rtlEnabled:i,mergedIconPlacement:a,mergedTheme:d,handlePositiveClick:o,handleNegativeClick:c,handleCloseClick:l,cssVars:r?void 0:f,themeClass:m?.themeClass,onRender:m?.onRender}},render(){var e;const{bordered:t,mergedIconPlacement:n,cssVars:r,closable:s,showIcon:i,title:a,content:o,action:c,negativeText:l,positiveText:d,positiveButtonProps:f,negativeButtonProps:m,handlePositiveClick:h,handleNegativeClick:g,mergedTheme:b,loading:p,type:y,mergedClsPrefix:C}=this;(e=this.onRender)===null||e===void 0||e.call(this);const A=i?R(Vs,{clsPrefix:C,class:`${C}-dialog__icon`},{default:()=>$n(this.$slots.icon,S=>S||(this.icon?Sa(this.icon):yR[this.type]()))}):null,T=$n(this.$slots.action,S=>S||d||l||c?R("div",{class:[`${C}-dialog__action`,this.actionClass],style:this.actionStyle},S||(c?[Sa(c)]:[this.negativeText&&R(Ji,Object.assign({theme:b.peers.Button,themeOverrides:b.peerOverrides.Button,ghost:!0,size:"small",onClick:g},m),{default:()=>Sa(this.negativeText)}),this.positiveText&&R(Ji,Object.assign({theme:b.peers.Button,themeOverrides:b.peerOverrides.Button,size:"small",type:y==="default"?"primary":y,disabled:p,loading:p,onClick:h},f),{default:()=>Sa(this.positiveText)})])):null);return R("div",{class:[`${C}-dialog`,this.themeClass,this.closable&&`${C}-dialog--closable`,`${C}-dialog--icon-${n}`,t&&`${C}-dialog--bordered`,this.rtlEnabled&&`${C}-dialog--rtl`],style:r,role:"dialog"},s?$n(this.$slots.close,S=>{const w=[`${C}-dialog__close`,this.rtlEnabled&&`${C}-dialog--rtl`];return S?R("div",{class:w},S):R(xb,{clsPrefix:C,class:w,onClick:this.handleCloseClick})}):null,i&&n==="top"?R("div",{class:`${C}-dialog-icon-container`},A):null,R("div",{class:[`${C}-dialog__title`,this.titleClass],style:this.titleStyle},i&&n==="left"?A:null,li(this.$slots.header,()=>[Sa(a)])),R("div",{class:[`${C}-dialog__content`,T?"":`${C}-dialog__content--last`,this.contentClass],style:this.contentStyle},li(this.$slots.default,()=>[Sa(o)])),T)}});function CR(e){const{modalColor:t,textColor2:n,boxShadow3:r}=e;return{color:t,textColor:n,boxShadow:r}}const xR=cv({name:"Modal",common:ys,peers:{Scrollbar:Dv,Dialog:jv,Card:Uv},self:CR}),G0="n-draggable";function vR(e,t){let n;const r=Fe(()=>e.value!==!1),s=Fe(()=>r.value?G0:""),i=Fe(()=>{const c=e.value;return c===!0||c===!1?!0:c?c.bounds!=="none":!0});function a(c){const l=c.querySelector(`.${G0}`);if(!l||!s.value)return;let d=0,f=0,m=0,h=0,g=0,b=0,p;function y(T){T.preventDefault(),p=T;const{x:S,y:w,right:v,bottom:O}=c.getBoundingClientRect();f=S,h=w,d=window.innerWidth-v,m=window.innerHeight-O;const{left:F,top:X}=c.style;g=+X.slice(0,-2),b=+F.slice(0,-2)}function C(T){if(!p)return;const{clientX:S,clientY:w}=p;let v=T.clientX-S,O=T.clientY-w;i.value&&(v>d?v=d:-v>f&&(v=-f),O>m?O=m:-O>h&&(O=-h));const F=v+b,X=O+g;c.style.top=`${X}px`,c.style.left=`${F}px`}function A(){p=void 0,t.onEnd(c)}Yn("mousedown",l,y),Yn("mousemove",window,C),Yn("mouseup",window,A),n=()=>{mr("mousedown",l,y),Yn("mousemove",window,C),Yn("mouseup",window,A)}}function o(){n&&(n(),n=void 0)}return qA(o),{stopDrag:o,startDrag:a,draggableRef:r,draggableClassRef:s}}const Lb=Object.assign(Object.assign({},Ob),Db),TR=Nb(Lb),SR=mt({name:"ModalBody",inheritAttrs:!1,slots:Object,props:Object.assign(Object.assign({show:{type:Boolean,required:!0},preset:String,displayDirective:{type:String,required:!0},trapFocus:{type:Boolean,default:!0},autoFocus:{type:Boolean,default:!0},blockScroll:Boolean,draggable:{type:[Boolean,Object],default:!1}},Lb),{renderMask:Function,onClickoutside:Function,onBeforeLeave:{type:Function,required:!0},onAfterLeave:{type:Function,required:!0},onPositiveClick:{type:Function,required:!0},onNegativeClick:{type:Function,required:!0},onClose:{type:Function,required:!0},onAfterEnter:Function,onEsc:Function}),setup(e){const t=Me(null),n=Me(null),r=Me(e.show),s=Me(null),i=Me(null),a=cs(Tv);let o=null;ss(on(e,"show"),O=>{O&&(o=a.getMousePosition())},{immediate:!0});const{stopDrag:c,startDrag:l,draggableRef:d,draggableClassRef:f}=vR(on(e,"draggable"),{onEnd:O=>{b(O)}}),m=Fe(()=>Ny([e.titleClass,f.value])),h=Fe(()=>Ny([e.headerClass,f.value]));ss(on(e,"show"),O=>{O&&(r.value=!0)}),x3(Fe(()=>e.blockScroll&&r.value));function g(){if(a.transformOriginRef.value==="center")return"";const{value:O}=s,{value:F}=i;if(O===null||F===null)return"";if(n.value){const X=n.value.containerScrollTop;return`${O}px ${F+X}px`}return""}function b(O){if(a.transformOriginRef.value==="center"||!o||!n.value)return;const F=n.value.containerScrollTop,{offsetLeft:X,offsetTop:me}=O,N=o.y,Y=o.x;s.value=-(X-Y),i.value=-(me-N-F),O.style.transformOrigin=g()}function p(O){Zi(()=>{b(O)})}function y(O){O.style.transformOrigin=g(),e.onBeforeLeave()}function C(O){const F=O;d.value&&l(F),e.onAfterEnter&&e.onAfterEnter(F)}function A(){r.value=!1,s.value=null,i.value=null,c(),e.onAfterLeave()}function T(){const{onClose:O}=e;O&&O()}function S(){e.onNegativeClick()}function w(){e.onPositiveClick()}const v=Me(null);return ss(v,O=>{O&&Zi(()=>{const F=O.el;F&&t.value!==F&&(t.value=F)})}),ci(p3,t),ci(b3,null),ci(E3,null),{mergedTheme:a.mergedThemeRef,appear:a.appearRef,isMounted:a.isMountedRef,mergedClsPrefix:a.mergedClsPrefixRef,bodyRef:t,scrollbarRef:n,draggableClass:f,displayed:r,childNodeRef:v,cardHeaderClass:h,dialogTitleClass:m,handlePositiveClick:w,handleNegativeClick:S,handleCloseClick:T,handleAfterEnter:C,handleAfterLeave:A,handleBeforeLeave:y,handleEnter:p}},render(){const{$slots:e,$attrs:t,handleEnter:n,handleAfterEnter:r,handleAfterLeave:s,handleBeforeLeave:i,preset:a,mergedClsPrefix:o}=this;let c=null;if(!a){if(c=sk("default",e.default,{draggableClass:this.draggableClass}),!c){nv("modal","default slot is empty");return}c=lv(c),c.props=Eb({class:`${o}-modal`},t,c.props||{})}return this.displayDirective==="show"||this.displayed||this.show?mu(R("div",{role:"none",class:`${o}-modal-body-wrapper`},R(Lv,{ref:"scrollbarRef",theme:this.mergedTheme.peers.Scrollbar,themeOverrides:this.mergedTheme.peerOverrides.Scrollbar,contentClass:`${o}-modal-scroll-content`},{default:()=>{var l;return[(l=this.renderMask)===null||l===void 0?void 0:l.call(this),R(ek,{disabled:!this.trapFocus,active:this.show,onEsc:this.onEsc,autoFocus:this.autoFocus},{default:()=>{var d;return R(Tf,{name:"fade-in-scale-up-transition",appear:(d=this.appear)!==null&&d!==void 0?d:this.isMounted,onEnter:n,onAfterEnter:r,onAfterLeave:s,onBeforeLeave:i},{default:()=>{const f=[[Sf,this.show]],{onClickoutside:m}=this;return m&&f.push([T3,this.onClickoutside,void 0,{capture:!0}]),mu(this.preset==="confirm"||this.preset==="dialog"?R(ER,Object.assign({},this.$attrs,{class:[`${o}-modal`,this.$attrs.class],ref:"bodyRef",theme:this.mergedTheme.peers.Dialog,themeOverrides:this.mergedTheme.peerOverrides.Dialog},q0(this.$props,bR),{titleClass:this.dialogTitleClass,"aria-modal":"true"}),e):this.preset==="card"?R($v,Object.assign({},this.$attrs,{ref:"bodyRef",class:[`${o}-modal`,this.$attrs.class],theme:this.mergedTheme.peers.Card,themeOverrides:this.mergedTheme.peerOverrides.Card},q0(this.$props,UI),{headerClass:this.cardHeaderClass,"aria-modal":"true",role:"dialog"}),e):this.childNodeRef=c,f)}})}})]}})),[[Sf,this.displayDirective==="if"||this.displayed||this.show]]):null}}),_R=ce([j("modal-container",`
857
+ position: fixed;
858
+ left: 0;
859
+ top: 0;
860
+ height: 0;
861
+ width: 0;
862
+ display: flex;
863
+ `),j("modal-mask",`
864
+ position: fixed;
865
+ left: 0;
866
+ right: 0;
867
+ top: 0;
868
+ bottom: 0;
869
+ background-color: rgba(0, 0, 0, .4);
870
+ `,[Ov({enterDuration:".25s",leaveDuration:".25s",enterCubicBezier:"var(--n-bezier-ease-out)",leaveCubicBezier:"var(--n-bezier-ease-out)"})]),j("modal-body-wrapper",`
871
+ position: fixed;
872
+ left: 0;
873
+ right: 0;
874
+ top: 0;
875
+ bottom: 0;
876
+ overflow: visible;
877
+ `,[j("modal-scroll-content",`
878
+ min-height: 100%;
879
+ display: flex;
880
+ position: relative;
881
+ `)]),j("modal",`
882
+ position: relative;
883
+ align-self: center;
884
+ color: var(--n-text-color);
885
+ margin: auto;
886
+ box-shadow: var(--n-box-shadow);
887
+ `,[gI({duration:".25s",enterScale:".5"}),ce(`.${G0}`,`
888
+ cursor: move;
889
+ user-select: none;
890
+ `)])]),wR=Object.assign(Object.assign(Object.assign(Object.assign({},rn.props),{show:Boolean,unstableShowMask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},preset:String,to:[String,Object],displayDirective:{type:String,default:"if"},transformOrigin:{type:String,default:"mouse"},zIndex:Number,autoFocus:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!0}}),Lb),{draggable:[Boolean,Object],onEsc:Function,"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onAfterEnter:Function,onBeforeLeave:Function,onAfterLeave:Function,onClose:Function,onPositiveClick:Function,onNegativeClick:Function,onMaskClick:Function,internalDialog:Boolean,internalModal:Boolean,internalAppear:{type:Boolean,default:void 0},overlayStyle:[String,Object],onBeforeHide:Function,onAfterHide:Function,onHide:Function}),AR=mt({name:"Modal",inheritAttrs:!1,props:wR,slots:Object,setup(e){const t=Me(null),{mergedClsPrefixRef:n,namespaceRef:r,inlineThemeDisabled:s}=Er(e),i=rn("Modal","-modal",_R,xR,e,n),a=h3(64),o=d3(),c=jA(),l=e.internalDialog?cs(hR,null):null,d=e.internalModal?cs(y3,null):null,f=C3();function m(w){const{onUpdateShow:v,"onUpdate:show":O,onHide:F}=e;v&&vt(v,w),O&&vt(O,w),F&&!w&&F(w)}function h(){const{onClose:w}=e;w?Promise.resolve(w()).then(v=>{v!==!1&&m(!1)}):m(!1)}function g(){const{onPositiveClick:w}=e;w?Promise.resolve(w()).then(v=>{v!==!1&&m(!1)}):m(!1)}function b(){const{onNegativeClick:w}=e;w?Promise.resolve(w()).then(v=>{v!==!1&&m(!1)}):m(!1)}function p(){const{onBeforeLeave:w,onBeforeHide:v}=e;w&&vt(w),v&&v()}function y(){const{onAfterLeave:w,onAfterHide:v}=e;w&&vt(w),v&&v()}function C(w){var v;const{onMaskClick:O}=e;O&&O(w),e.maskClosable&&!((v=t.value)===null||v===void 0)&&v.contains(kb(w))&&m(!1)}function A(w){var v;(v=e.onEsc)===null||v===void 0||v.call(e),e.show&&e.closeOnEsc&&rk(w)&&(f.value||m(!1))}ci(Tv,{getMousePosition:()=>{const w=l||d;if(w){const{clickedRef:v,clickedPositionRef:O}=w;if(v.value&&O.value)return O.value}return a.value?o.value:null},mergedClsPrefixRef:n,mergedThemeRef:i,isMountedRef:c,appearRef:on(e,"internalAppear"),transformOriginRef:on(e,"transformOrigin")});const T=Fe(()=>{const{common:{cubicBezierEaseOut:w},self:{boxShadow:v,color:O,textColor:F}}=i.value;return{"--n-bezier-ease-out":w,"--n-box-shadow":v,"--n-color":O,"--n-text-color":F}}),S=s?Es("theme-class",void 0,T,e):void 0;return{mergedClsPrefix:n,namespace:r,isMounted:c,containerRef:t,presetProps:Fe(()=>q0(e,TR)),handleEsc:A,handleAfterLeave:y,handleClickoutside:C,handleBeforeLeave:p,doUpdateShow:m,handleNegativeClick:b,handlePositiveClick:g,handleCloseClick:h,cssVars:s?void 0:T,themeClass:S?.themeClass,onRender:S?.onRender}},render(){const{mergedClsPrefix:e}=this;return R(k3,{to:this.to,show:this.show},{default:()=>{var t;(t=this.onRender)===null||t===void 0||t.call(this);const{unstableShowMask:n}=this;return mu(R("div",{role:"none",ref:"containerRef",class:[`${e}-modal-container`,this.themeClass,this.namespace],style:this.cssVars},R(SR,Object.assign({style:this.overlayStyle},this.$attrs,{ref:"bodyWrapper",displayDirective:this.displayDirective,show:this.show,preset:this.preset,autoFocus:this.autoFocus,trapFocus:this.trapFocus,draggable:this.draggable,blockScroll:this.blockScroll},this.presetProps,{onEsc:this.handleEsc,onClose:this.handleCloseClick,onNegativeClick:this.handleNegativeClick,onPositiveClick:this.handlePositiveClick,onBeforeLeave:this.handleBeforeLeave,onAfterEnter:this.onAfterEnter,onAfterLeave:this.handleAfterLeave,onClickoutside:n?void 0:this.handleClickoutside,renderMask:n?()=>{var r;return R(Tf,{name:"fade-in-transition",key:"mask",appear:(r=this.internalAppear)!==null&&r!==void 0?r:this.isMounted},{default:()=>this.show?R("div",{"aria-hidden":!0,ref:"containerRef",class:`${e}-modal-mask`,onClick:this.handleClickoutside}):null})}:void 0}),this.$slots)),[[w3,{zIndex:this.zIndex,enabled:this.show}]])}})}});function kR(){const e=cs(WA,null);return e===null&&ph("use-message","No outer <n-message-provider /> founded. See prerequisite in https://www.naiveui.com/en-US/os-theme/components/message for more details. If you want to use `useMessage` outside setup, please check https://www.naiveui.com/zh-CN/os-theme/components/message#Q-&-A."),e}function IR(e){const{textColor1:t,dividerColor:n,fontWeightStrong:r}=e;return{textColor:t,color:n,fontWeight:r}}const RR={common:ys,self:IR},BR=j("divider",`
891
+ position: relative;
892
+ display: flex;
893
+ width: 100%;
894
+ box-sizing: border-box;
895
+ font-size: 16px;
896
+ color: var(--n-text-color);
897
+ transition:
898
+ color .3s var(--n-bezier),
899
+ background-color .3s var(--n-bezier);
900
+ `,[Gr("vertical",`
901
+ margin-top: 24px;
902
+ margin-bottom: 24px;
903
+ `,[Gr("no-title",`
904
+ display: flex;
905
+ align-items: center;
906
+ `)]),J("title",`
907
+ display: flex;
908
+ align-items: center;
909
+ margin-left: 12px;
910
+ margin-right: 12px;
911
+ white-space: nowrap;
912
+ font-weight: var(--n-font-weight);
913
+ `),oe("title-position-left",[J("line",[oe("left",{width:"28px"})])]),oe("title-position-right",[J("line",[oe("right",{width:"28px"})])]),oe("dashed",[J("line",`
914
+ background-color: #0000;
915
+ height: 0px;
916
+ width: 100%;
917
+ border-style: dashed;
918
+ border-width: 1px 0 0;
919
+ `)]),oe("vertical",`
920
+ display: inline-block;
921
+ height: 1em;
922
+ margin: 0 8px;
923
+ vertical-align: middle;
924
+ width: 1px;
925
+ `),J("line",`
926
+ border: none;
927
+ transition: background-color .3s var(--n-bezier), border-color .3s var(--n-bezier);
928
+ height: 1px;
929
+ width: 100%;
930
+ margin: 0;
931
+ `),Gr("dashed",[J("line",{backgroundColor:"var(--n-color)"})]),oe("dashed",[J("line",{borderColor:"var(--n-color)"})]),oe("vertical",{backgroundColor:"var(--n-color)"})]),PR=Object.assign(Object.assign({},rn.props),{titlePlacement:{type:String,default:"center"},dashed:Boolean,vertical:Boolean}),Hr=mt({name:"Divider",props:PR,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=Er(e),r=rn("Divider","-divider",BR,RR,e,t),s=Fe(()=>{const{common:{cubicBezierEaseInOut:a},self:{color:o,textColor:c,fontWeight:l}}=r.value;return{"--n-bezier":a,"--n-color":o,"--n-text-color":c,"--n-font-weight":l}}),i=n?Es("divider",void 0,s,e):void 0;return{mergedClsPrefix:t,cssVars:n?void 0:s,themeClass:i?.themeClass,onRender:i?.onRender}},render(){var e;const{$slots:t,titlePlacement:n,vertical:r,dashed:s,cssVars:i,mergedClsPrefix:a}=this;return(e=this.onRender)===null||e===void 0||e.call(this),R("div",{role:"separator",class:[`${a}-divider`,this.themeClass,{[`${a}-divider--vertical`]:r,[`${a}-divider--no-title`]:!t.default,[`${a}-divider--dashed`]:s,[`${a}-divider--title-position-${n}`]:t.default&&n}],style:i},r?null:R("div",{class:`${a}-divider__line ${a}-divider__line--left`}),!r&&t.default?R(ma,null,R("div",{class:`${a}-divider__title`},this.$slots),R("div",{class:`${a}-divider__line ${a}-divider__line--right`})):null)}}),NR={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"};function OR(){return NR}const DR={self:OR};let rm;function LR(){if(!il)return!0;if(rm===void 0){const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const t=e.scrollHeight===1;return document.body.removeChild(e),rm=t}return rm}const MR=Object.assign(Object.assign({},rn.props),{align:String,justify:{type:String,default:"start"},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:"medium"},wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),FR=mt({name:"Space",props:MR,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=Er(e),r=rn("Space","-space",void 0,DR,e,t),s=Ks("Space",n,t);return{useGap:LR(),rtlEnabled:s,mergedClsPrefix:t,margin:Fe(()=>{const{size:i}=e;if(Array.isArray(i))return{horizontal:i[0],vertical:i[1]};if(typeof i=="number")return{horizontal:i,vertical:i};const{self:{[Ge("gap",i)]:a}}=r.value,{row:o,col:c}=r3(a);return{horizontal:bu(c),vertical:bu(o)}})}},render(){const{vertical:e,reverse:t,align:n,inline:r,justify:s,itemClass:i,itemStyle:a,margin:o,wrap:c,mergedClsPrefix:l,rtlEnabled:d,useGap:f,wrapItem:m,internalUseGap:h}=this,g=Si(Pb(this),!1);if(!g.length)return null;const b=`${o.horizontal}px`,p=`${o.horizontal/2}px`,y=`${o.vertical}px`,C=`${o.vertical/2}px`,A=g.length-1,T=s.startsWith("space-");return R("div",{role:"none",class:[`${l}-space`,d&&`${l}-space--rtl`],style:{display:r?"inline-flex":"flex",flexDirection:e&&!t?"column":e&&t?"column-reverse":!e&&t?"row-reverse":"row",justifyContent:["start","end"].includes(s)?`flex-${s}`:s,flexWrap:!c||e?"nowrap":"wrap",marginTop:f||e?"":`-${C}`,marginBottom:f||e?"":`-${C}`,alignItems:n,gap:f?`${o.vertical}px ${o.horizontal}px`:""}},!m&&(f||h)?g:g.map((S,w)=>S.type===bb?S:R("div",{role:"none",class:i,style:[a,{maxWidth:"100%"},f?"":e?{marginBottom:w!==A?y:""}:d?{marginLeft:T?s==="space-between"&&w===A?"":p:w!==A?b:"",marginRight:T?s==="space-between"&&w===0?"":p:"",paddingTop:C,paddingBottom:C}:{marginRight:T?s==="space-between"&&w===A?"":p:w!==A?b:"",marginLeft:T?s==="space-between"&&w===0?"":p:"",paddingTop:C,paddingBottom:C}]},S)))}});function zR(e){const{infoColor:t,successColor:n,warningColor:r,errorColor:s,textColor2:i,progressRailColor:a,fontSize:o,fontWeight:c}=e;return{fontSize:o,fontSizeCircle:"28px",fontWeightCircle:c,railColor:a,railHeight:"8px",iconSizeCircle:"36px",iconSizeLine:"18px",iconColor:t,iconColorInfo:t,iconColorSuccess:n,iconColorWarning:r,iconColorError:s,textColorCircle:i,textColorLineInner:"rgb(255, 255, 255)",textColorLineOuter:i,fillColor:t,fillColorInfo:t,fillColorSuccess:n,fillColorWarning:r,fillColorError:s,lineBgProcessing:"linear-gradient(90deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .5) 100%)"}}const UR={common:ys,self:zR},$R={stepHeaderFontSizeSmall:"14px",stepHeaderFontSizeMedium:"16px",indicatorIndexFontSizeSmall:"14px",indicatorIndexFontSizeMedium:"16px",indicatorSizeSmall:"22px",indicatorSizeMedium:"28px",indicatorIconSizeSmall:"14px",indicatorIconSizeMedium:"18px"};function HR(e){const{fontWeightStrong:t,baseColor:n,textColorDisabled:r,primaryColor:s,errorColor:i,textColor1:a,textColor2:o}=e;return Object.assign(Object.assign({},$R),{stepHeaderFontWeight:t,indicatorTextColorProcess:n,indicatorTextColorWait:r,indicatorTextColorFinish:s,indicatorTextColorError:i,indicatorBorderColorProcess:s,indicatorBorderColorWait:r,indicatorBorderColorFinish:s,indicatorBorderColorError:i,indicatorColorProcess:s,indicatorColorWait:"#0000",indicatorColorFinish:"#0000",indicatorColorError:"#0000",splitorColorProcess:r,splitorColorWait:r,splitorColorFinish:s,splitorColorError:r,headerTextColorProcess:a,headerTextColorWait:r,headerTextColorFinish:r,headerTextColorError:i,descriptionTextColorProcess:o,descriptionTextColorWait:r,descriptionTextColorFinish:r,descriptionTextColorError:i})}const qR={common:ys,self:HR},jR={tabFontSizeSmall:"14px",tabFontSizeMedium:"14px",tabFontSizeLarge:"16px",tabGapSmallLine:"36px",tabGapMediumLine:"36px",tabGapLargeLine:"36px",tabGapSmallLineVertical:"8px",tabGapMediumLineVertical:"8px",tabGapLargeLineVertical:"8px",tabPaddingSmallLine:"6px 0",tabPaddingMediumLine:"10px 0",tabPaddingLargeLine:"14px 0",tabPaddingVerticalSmallLine:"6px 12px",tabPaddingVerticalMediumLine:"8px 16px",tabPaddingVerticalLargeLine:"10px 20px",tabGapSmallBar:"36px",tabGapMediumBar:"36px",tabGapLargeBar:"36px",tabGapSmallBarVertical:"8px",tabGapMediumBarVertical:"8px",tabGapLargeBarVertical:"8px",tabPaddingSmallBar:"4px 0",tabPaddingMediumBar:"6px 0",tabPaddingLargeBar:"10px 0",tabPaddingVerticalSmallBar:"6px 12px",tabPaddingVerticalMediumBar:"8px 16px",tabPaddingVerticalLargeBar:"10px 20px",tabGapSmallCard:"4px",tabGapMediumCard:"4px",tabGapLargeCard:"4px",tabGapSmallCardVertical:"4px",tabGapMediumCardVertical:"4px",tabGapLargeCardVertical:"4px",tabPaddingSmallCard:"8px 16px",tabPaddingMediumCard:"10px 20px",tabPaddingLargeCard:"12px 24px",tabPaddingSmallSegment:"4px 0",tabPaddingMediumSegment:"6px 0",tabPaddingLargeSegment:"8px 0",tabPaddingVerticalLargeSegment:"0 8px",tabPaddingVerticalSmallCard:"8px 12px",tabPaddingVerticalMediumCard:"10px 16px",tabPaddingVerticalLargeCard:"12px 20px",tabPaddingVerticalSmallSegment:"0 4px",tabPaddingVerticalMediumSegment:"0 6px",tabGapSmallSegment:"0",tabGapMediumSegment:"0",tabGapLargeSegment:"0",tabGapSmallSegmentVertical:"0",tabGapMediumSegmentVertical:"0",tabGapLargeSegmentVertical:"0",panePaddingSmall:"8px 0 0 0",panePaddingMedium:"12px 0 0 0",panePaddingLarge:"16px 0 0 0",closeSize:"18px",closeIconSize:"14px"};function WR(e){const{textColor2:t,primaryColor:n,textColorDisabled:r,closeIconColor:s,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:o,closeColorPressed:c,tabColor:l,baseColor:d,dividerColor:f,fontWeight:m,textColor1:h,borderRadius:g,fontSize:b,fontWeightStrong:p}=e;return Object.assign(Object.assign({},jR),{colorSegment:l,tabFontSizeCard:b,tabTextColorLine:h,tabTextColorActiveLine:n,tabTextColorHoverLine:n,tabTextColorDisabledLine:r,tabTextColorSegment:h,tabTextColorActiveSegment:t,tabTextColorHoverSegment:t,tabTextColorDisabledSegment:r,tabTextColorBar:h,tabTextColorActiveBar:n,tabTextColorHoverBar:n,tabTextColorDisabledBar:r,tabTextColorCard:h,tabTextColorHoverCard:h,tabTextColorActiveCard:n,tabTextColorDisabledCard:r,barColor:n,closeIconColor:s,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:o,closeColorPressed:c,closeBorderRadius:g,tabColor:l,tabColorSegment:d,tabBorderColor:f,tabFontWeightActive:m,tabFontWeight:m,tabBorderRadius:g,paneTextColor:t,fontWeightStrong:p})}const GR={common:ys,self:WR},VR={success:R(Sb,null),error:R(vb,null),warning:R(Tb,null),info:R(_f,null)},KR=mt({name:"ProgressCircle",props:{clsPrefix:{type:String,required:!0},status:{type:String,required:!0},strokeWidth:{type:Number,required:!0},fillColor:[String,Object],railColor:String,railStyle:[String,Object],percentage:{type:Number,default:0},offsetDegree:{type:Number,default:0},showIndicator:{type:Boolean,required:!0},indicatorTextColor:String,unit:String,viewBoxWidth:{type:Number,required:!0},gapDegree:{type:Number,required:!0},gapOffsetDegree:{type:Number,default:0}},setup(e,{slots:t}){function n(s,i,a,o){const{gapDegree:c,viewBoxWidth:l,strokeWidth:d}=e,f=50,m=0,h=f,g=0,b=2*f,p=50+d/2,y=`M ${p},${p} m ${m},${h}
932
+ a ${f},${f} 0 1 1 ${g},${-b}
933
+ a ${f},${f} 0 1 1 ${-g},${b}`,C=Math.PI*2*f,A={stroke:o==="rail"?a:typeof e.fillColor=="object"?"url(#gradient)":a,strokeDasharray:`${s/100*(C-c)}px ${l*8}px`,strokeDashoffset:`-${c/2}px`,transformOrigin:i?"center":void 0,transform:i?`rotate(${i}deg)`:void 0};return{pathString:y,pathStyle:A}}const r=()=>{const s=typeof e.fillColor=="object",i=s?e.fillColor.stops[0]:"",a=s?e.fillColor.stops[1]:"";return s&&R("defs",null,R("linearGradient",{id:"gradient",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},R("stop",{offset:"0%","stop-color":i}),R("stop",{offset:"100%","stop-color":a})))};return()=>{const{fillColor:s,railColor:i,strokeWidth:a,offsetDegree:o,status:c,percentage:l,showIndicator:d,indicatorTextColor:f,unit:m,gapOffsetDegree:h,clsPrefix:g}=e,{pathString:b,pathStyle:p}=n(100,0,i,"rail"),{pathString:y,pathStyle:C}=n(l,o,s,"fill"),A=100+a;return R("div",{class:`${g}-progress-content`,role:"none"},R("div",{class:`${g}-progress-graph`,"aria-hidden":!0},R("div",{class:`${g}-progress-graph-circle`,style:{transform:h?`rotate(${h}deg)`:void 0}},R("svg",{viewBox:`0 0 ${A} ${A}`},r(),R("g",null,R("path",{class:`${g}-progress-graph-circle-rail`,d:b,"stroke-width":a,"stroke-linecap":"round",fill:"none",style:p})),R("g",null,R("path",{class:[`${g}-progress-graph-circle-fill`,l===0&&`${g}-progress-graph-circle-fill--empty`],d:y,"stroke-width":a,"stroke-linecap":"round",fill:"none",style:C}))))),d?R("div",null,t.default?R("div",{class:`${g}-progress-custom-content`,role:"none"},t.default()):c!=="default"?R("div",{class:`${g}-progress-icon`,"aria-hidden":!0},R(Vs,{clsPrefix:g},{default:()=>VR[c]})):R("div",{class:`${g}-progress-text`,style:{color:f},role:"none"},R("span",{class:`${g}-progress-text__percentage`},l),R("span",{class:`${g}-progress-text__unit`},m))):null)}}}),YR={success:R(Sb,null),error:R(vb,null),warning:R(Tb,null),info:R(_f,null)},XR=mt({name:"ProgressLine",props:{clsPrefix:{type:String,required:!0},percentage:{type:Number,default:0},railColor:String,railStyle:[String,Object],fillColor:[String,Object],status:{type:String,required:!0},indicatorPlacement:{type:String,required:!0},indicatorTextColor:String,unit:{type:String,default:"%"},processing:{type:Boolean,required:!0},showIndicator:{type:Boolean,required:!0},height:[String,Number],railBorderRadius:[String,Number],fillBorderRadius:[String,Number]},setup(e,{slots:t}){const n=Fe(()=>Vo(e.height)),r=Fe(()=>{var a,o;return typeof e.fillColor=="object"?`linear-gradient(to right, ${(a=e.fillColor)===null||a===void 0?void 0:a.stops[0]} , ${(o=e.fillColor)===null||o===void 0?void 0:o.stops[1]})`:e.fillColor}),s=Fe(()=>e.railBorderRadius!==void 0?Vo(e.railBorderRadius):e.height!==void 0?Vo(e.height,{c:.5}):""),i=Fe(()=>e.fillBorderRadius!==void 0?Vo(e.fillBorderRadius):e.railBorderRadius!==void 0?Vo(e.railBorderRadius):e.height!==void 0?Vo(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:a,railColor:o,railStyle:c,percentage:l,unit:d,indicatorTextColor:f,status:m,showIndicator:h,processing:g,clsPrefix:b}=e;return R("div",{class:`${b}-progress-content`,role:"none"},R("div",{class:`${b}-progress-graph`,"aria-hidden":!0},R("div",{class:[`${b}-progress-graph-line`,{[`${b}-progress-graph-line--indicator-${a}`]:!0}]},R("div",{class:`${b}-progress-graph-line-rail`,style:[{backgroundColor:o,height:n.value,borderRadius:s.value},c]},R("div",{class:[`${b}-progress-graph-line-fill`,g&&`${b}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,background:r.value,height:n.value,lineHeight:n.value,borderRadius:i.value}},a==="inside"?R("div",{class:`${b}-progress-graph-line-indicator`,style:{color:f}},t.default?t.default():`${l}${d}`):null)))),h&&a==="outside"?R("div",null,t.default?R("div",{class:`${b}-progress-custom-content`,style:{color:f},role:"none"},t.default()):m==="default"?R("div",{role:"none",class:`${b}-progress-icon ${b}-progress-icon--as-text`,style:{color:f}},l,d):R("div",{class:`${b}-progress-icon`,"aria-hidden":!0},R(Vs,{clsPrefix:b},{default:()=>YR[m]}))):null)}}});function CE(e,t,n=100){return`m ${n/2} ${n/2-e} a ${e} ${e} 0 1 1 0 ${2*e} a ${e} ${e} 0 1 1 0 -${2*e}`}const QR=mt({name:"ProgressMultipleCircle",props:{clsPrefix:{type:String,required:!0},viewBoxWidth:{type:Number,required:!0},percentage:{type:Array,default:[0]},strokeWidth:{type:Number,required:!0},circleGap:{type:Number,required:!0},showIndicator:{type:Boolean,required:!0},fillColor:{type:Array,default:()=>[]},railColor:{type:Array,default:()=>[]},railStyle:{type:Array,default:()=>[]}},setup(e,{slots:t}){const n=Fe(()=>e.percentage.map((i,a)=>`${Math.PI*i/100*(e.viewBoxWidth/2-e.strokeWidth/2*(1+2*a)-e.circleGap*a)*2}, ${e.viewBoxWidth*8}`)),r=(s,i)=>{const a=e.fillColor[i],o=typeof a=="object"?a.stops[0]:"",c=typeof a=="object"?a.stops[1]:"";return typeof e.fillColor[i]=="object"&&R("linearGradient",{id:`gradient-${i}`,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},R("stop",{offset:"0%","stop-color":o}),R("stop",{offset:"100%","stop-color":c}))};return()=>{const{viewBoxWidth:s,strokeWidth:i,circleGap:a,showIndicator:o,fillColor:c,railColor:l,railStyle:d,percentage:f,clsPrefix:m}=e;return R("div",{class:`${m}-progress-content`,role:"none"},R("div",{class:`${m}-progress-graph`,"aria-hidden":!0},R("div",{class:`${m}-progress-graph-circle`},R("svg",{viewBox:`0 0 ${s} ${s}`},R("defs",null,f.map((h,g)=>r(h,g))),f.map((h,g)=>R("g",{key:g},R("path",{class:`${m}-progress-graph-circle-rail`,d:CE(s/2-i/2*(1+2*g)-a*g,i,s),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:l[g]},d[g]]}),R("path",{class:[`${m}-progress-graph-circle-fill`,h===0&&`${m}-progress-graph-circle-fill--empty`],d:CE(s/2-i/2*(1+2*g)-a*g,i,s),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:n.value[g],strokeDashoffset:0,stroke:typeof c[g]=="object"?`url(#gradient-${g})`:c[g]}})))))),o&&t.default?R("div",null,R("div",{class:`${m}-progress-text`},t.default())):null)}}}),ZR=ce([j("progress",{display:"inline-block"},[j("progress-icon",`
934
+ color: var(--n-icon-color);
935
+ transition: color .3s var(--n-bezier);
936
+ `),oe("line",`
937
+ width: 100%;
938
+ display: block;
939
+ `,[j("progress-content",`
940
+ display: flex;
941
+ align-items: center;
942
+ `,[j("progress-graph",{flex:1})]),j("progress-custom-content",{marginLeft:"14px"}),j("progress-icon",`
943
+ width: 30px;
944
+ padding-left: 14px;
945
+ height: var(--n-icon-size-line);
946
+ line-height: var(--n-icon-size-line);
947
+ font-size: var(--n-icon-size-line);
948
+ `,[oe("as-text",`
949
+ color: var(--n-text-color-line-outer);
950
+ text-align: center;
951
+ width: 40px;
952
+ font-size: var(--n-font-size);
953
+ padding-left: 4px;
954
+ transition: color .3s var(--n-bezier);
955
+ `)])]),oe("circle, dashboard",{width:"120px"},[j("progress-custom-content",`
956
+ position: absolute;
957
+ left: 50%;
958
+ top: 50%;
959
+ transform: translateX(-50%) translateY(-50%);
960
+ display: flex;
961
+ align-items: center;
962
+ justify-content: center;
963
+ `),j("progress-text",`
964
+ position: absolute;
965
+ left: 50%;
966
+ top: 50%;
967
+ transform: translateX(-50%) translateY(-50%);
968
+ display: flex;
969
+ align-items: center;
970
+ color: inherit;
971
+ font-size: var(--n-font-size-circle);
972
+ color: var(--n-text-color-circle);
973
+ font-weight: var(--n-font-weight-circle);
974
+ transition: color .3s var(--n-bezier);
975
+ white-space: nowrap;
976
+ `),j("progress-icon",`
977
+ position: absolute;
978
+ left: 50%;
979
+ top: 50%;
980
+ transform: translateX(-50%) translateY(-50%);
981
+ display: flex;
982
+ align-items: center;
983
+ color: var(--n-icon-color);
984
+ font-size: var(--n-icon-size-circle);
985
+ `)]),oe("multiple-circle",`
986
+ width: 200px;
987
+ color: inherit;
988
+ `,[j("progress-text",`
989
+ font-weight: var(--n-font-weight-circle);
990
+ color: var(--n-text-color-circle);
991
+ position: absolute;
992
+ left: 50%;
993
+ top: 50%;
994
+ transform: translateX(-50%) translateY(-50%);
995
+ display: flex;
996
+ align-items: center;
997
+ justify-content: center;
998
+ transition: color .3s var(--n-bezier);
999
+ `)]),j("progress-content",{position:"relative"}),j("progress-graph",{position:"relative"},[j("progress-graph-circle",[ce("svg",{verticalAlign:"bottom"}),j("progress-graph-circle-fill",`
1000
+ stroke: var(--n-fill-color);
1001
+ transition:
1002
+ opacity .3s var(--n-bezier),
1003
+ stroke .3s var(--n-bezier),
1004
+ stroke-dasharray .3s var(--n-bezier);
1005
+ `,[oe("empty",{opacity:0})]),j("progress-graph-circle-rail",`
1006
+ transition: stroke .3s var(--n-bezier);
1007
+ overflow: hidden;
1008
+ stroke: var(--n-rail-color);
1009
+ `)]),j("progress-graph-line",[oe("indicator-inside",[j("progress-graph-line-rail",`
1010
+ height: 16px;
1011
+ line-height: 16px;
1012
+ border-radius: 10px;
1013
+ `,[j("progress-graph-line-fill",`
1014
+ height: inherit;
1015
+ border-radius: 10px;
1016
+ `),j("progress-graph-line-indicator",`
1017
+ background: #0000;
1018
+ white-space: nowrap;
1019
+ text-align: right;
1020
+ margin-left: 14px;
1021
+ margin-right: 14px;
1022
+ height: inherit;
1023
+ font-size: 12px;
1024
+ color: var(--n-text-color-line-inner);
1025
+ transition: color .3s var(--n-bezier);
1026
+ `)])]),oe("indicator-inside-label",`
1027
+ height: 16px;
1028
+ display: flex;
1029
+ align-items: center;
1030
+ `,[j("progress-graph-line-rail",`
1031
+ flex: 1;
1032
+ transition: background-color .3s var(--n-bezier);
1033
+ `),j("progress-graph-line-indicator",`
1034
+ background: var(--n-fill-color);
1035
+ font-size: 12px;
1036
+ transform: translateZ(0);
1037
+ display: flex;
1038
+ vertical-align: middle;
1039
+ height: 16px;
1040
+ line-height: 16px;
1041
+ padding: 0 10px;
1042
+ border-radius: 10px;
1043
+ position: absolute;
1044
+ white-space: nowrap;
1045
+ color: var(--n-text-color-line-inner);
1046
+ transition:
1047
+ right .2s var(--n-bezier),
1048
+ color .3s var(--n-bezier),
1049
+ background-color .3s var(--n-bezier);
1050
+ `)]),j("progress-graph-line-rail",`
1051
+ position: relative;
1052
+ overflow: hidden;
1053
+ height: var(--n-rail-height);
1054
+ border-radius: 5px;
1055
+ background-color: var(--n-rail-color);
1056
+ transition: background-color .3s var(--n-bezier);
1057
+ `,[j("progress-graph-line-fill",`
1058
+ background: var(--n-fill-color);
1059
+ position: relative;
1060
+ border-radius: 5px;
1061
+ height: inherit;
1062
+ width: 100%;
1063
+ max-width: 0%;
1064
+ transition:
1065
+ background-color .3s var(--n-bezier),
1066
+ max-width .2s var(--n-bezier);
1067
+ `,[oe("processing",[ce("&::after",`
1068
+ content: "";
1069
+ background-image: var(--n-line-bg-processing);
1070
+ animation: progress-processing-animation 2s var(--n-bezier) infinite;
1071
+ `)])])])])])]),ce("@keyframes progress-processing-animation",`
1072
+ 0% {
1073
+ position: absolute;
1074
+ left: 0;
1075
+ top: 0;
1076
+ bottom: 0;
1077
+ right: 100%;
1078
+ opacity: 1;
1079
+ }
1080
+ 66% {
1081
+ position: absolute;
1082
+ left: 0;
1083
+ top: 0;
1084
+ bottom: 0;
1085
+ right: 0;
1086
+ opacity: 0;
1087
+ }
1088
+ 100% {
1089
+ position: absolute;
1090
+ left: 0;
1091
+ top: 0;
1092
+ bottom: 0;
1093
+ right: 0;
1094
+ opacity: 0;
1095
+ }
1096
+ `)]),JR=Object.assign(Object.assign({},rn.props),{processing:Boolean,type:{type:String,default:"line"},gapDegree:Number,gapOffsetDegree:Number,status:{type:String,default:"default"},railColor:[String,Array],railStyle:[String,Array],color:[String,Array,Object],viewBoxWidth:{type:Number,default:100},strokeWidth:{type:Number,default:7},percentage:[Number,Array],unit:{type:String,default:"%"},showIndicator:{type:Boolean,default:!0},indicatorPosition:{type:String,default:"outside"},indicatorPlacement:{type:String,default:"outside"},indicatorTextColor:String,circleGap:{type:Number,default:1},height:Number,borderRadius:[String,Number],fillBorderRadius:[String,Number],offsetDegree:Number}),eB=mt({name:"Progress",props:JR,setup(e){const t=Fe(()=>e.indicatorPlacement||e.indicatorPosition),n=Fe(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:r,inlineThemeDisabled:s}=Er(e),i=rn("Progress","-progress",ZR,UR,e,r),a=Fe(()=>{const{status:c}=e,{common:{cubicBezierEaseInOut:l},self:{fontSize:d,fontSizeCircle:f,railColor:m,railHeight:h,iconSizeCircle:g,iconSizeLine:b,textColorCircle:p,textColorLineInner:y,textColorLineOuter:C,lineBgProcessing:A,fontWeightCircle:T,[Ge("iconColor",c)]:S,[Ge("fillColor",c)]:w}}=i.value;return{"--n-bezier":l,"--n-fill-color":w,"--n-font-size":d,"--n-font-size-circle":f,"--n-font-weight-circle":T,"--n-icon-color":S,"--n-icon-size-circle":g,"--n-icon-size-line":b,"--n-line-bg-processing":A,"--n-rail-color":m,"--n-rail-height":h,"--n-text-color-circle":p,"--n-text-color-line-inner":y,"--n-text-color-line-outer":C}}),o=s?Es("progress",Fe(()=>e.status[0]),a,e):void 0;return{mergedClsPrefix:r,mergedIndicatorPlacement:t,gapDeg:n,cssVars:s?void 0:a,themeClass:o?.themeClass,onRender:o?.onRender}},render(){const{type:e,cssVars:t,indicatorTextColor:n,showIndicator:r,status:s,railColor:i,railStyle:a,color:o,percentage:c,viewBoxWidth:l,strokeWidth:d,mergedIndicatorPlacement:f,unit:m,borderRadius:h,fillBorderRadius:g,height:b,processing:p,circleGap:y,mergedClsPrefix:C,gapDeg:A,gapOffsetDegree:T,themeClass:S,$slots:w,onRender:v}=this;return v?.(),R("div",{class:[S,`${C}-progress`,`${C}-progress--${e}`,`${C}-progress--${s}`],style:t,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,role:e==="circle"||e==="line"||e==="dashboard"?"progressbar":"none"},e==="circle"||e==="dashboard"?R(KR,{clsPrefix:C,status:s,showIndicator:r,indicatorTextColor:n,railColor:i,fillColor:o,railStyle:a,offsetDegree:this.offsetDegree,percentage:c,viewBoxWidth:l,strokeWidth:d,gapDegree:A===void 0?e==="dashboard"?75:0:A,gapOffsetDegree:T,unit:m},w):e==="line"?R(XR,{clsPrefix:C,status:s,showIndicator:r,indicatorTextColor:n,railColor:i,fillColor:o,railStyle:a,percentage:c,processing:p,indicatorPlacement:f,unit:m,fillBorderRadius:g,railBorderRadius:h,height:b},w):e==="multiple-circle"?R(QR,{clsPrefix:C,strokeWidth:d,railColor:i,fillColor:o,railStyle:a,viewBoxWidth:l,percentage:c,showIndicator:r,circleGap:y},w):null)}}),tB=j("steps",`
1097
+ width: 100%;
1098
+ display: flex;
1099
+ `,[j("step",`
1100
+ position: relative;
1101
+ display: flex;
1102
+ flex: 1;
1103
+ `,[oe("disabled","cursor: not-allowed"),oe("clickable",`
1104
+ cursor: pointer;
1105
+ `),ce("&:last-child",[j("step-splitor","display: none;")])]),j("step-splitor",`
1106
+ background-color: var(--n-splitor-color);
1107
+ margin-top: calc(var(--n-step-header-font-size) / 2);
1108
+ height: 1px;
1109
+ flex: 1;
1110
+ align-self: flex-start;
1111
+ margin-left: 12px;
1112
+ margin-right: 12px;
1113
+ transition:
1114
+ color .3s var(--n-bezier),
1115
+ background-color .3s var(--n-bezier);
1116
+ `),j("step-content","flex: 1;",[j("step-content-header",`
1117
+ color: var(--n-header-text-color);
1118
+ margin-top: calc(var(--n-indicator-size) / 2 - var(--n-step-header-font-size) / 2);
1119
+ line-height: var(--n-step-header-font-size);
1120
+ font-size: var(--n-step-header-font-size);
1121
+ position: relative;
1122
+ display: flex;
1123
+ font-weight: var(--n-step-header-font-weight);
1124
+ margin-left: 9px;
1125
+ transition:
1126
+ color .3s var(--n-bezier),
1127
+ background-color .3s var(--n-bezier);
1128
+ `,[J("title",`
1129
+ white-space: nowrap;
1130
+ flex: 0;
1131
+ `)]),J("description",`
1132
+ color: var(--n-description-text-color);
1133
+ margin-top: 12px;
1134
+ margin-left: 9px;
1135
+ transition:
1136
+ color .3s var(--n-bezier),
1137
+ background-color .3s var(--n-bezier);
1138
+ `)]),j("step-indicator",`
1139
+ background-color: var(--n-indicator-color);
1140
+ box-shadow: 0 0 0 1px var(--n-indicator-border-color);
1141
+ height: var(--n-indicator-size);
1142
+ width: var(--n-indicator-size);
1143
+ border-radius: 50%;
1144
+ display: flex;
1145
+ align-items: center;
1146
+ justify-content: center;
1147
+ transition:
1148
+ background-color .3s var(--n-bezier),
1149
+ box-shadow .3s var(--n-bezier);
1150
+ `,[j("step-indicator-slot",`
1151
+ position: relative;
1152
+ width: var(--n-indicator-icon-size);
1153
+ height: var(--n-indicator-icon-size);
1154
+ font-size: var(--n-indicator-icon-size);
1155
+ line-height: var(--n-indicator-icon-size);
1156
+ `,[J("index",`
1157
+ display: inline-block;
1158
+ text-align: center;
1159
+ position: absolute;
1160
+ left: 0;
1161
+ top: 0;
1162
+ white-space: nowrap;
1163
+ font-size: var(--n-indicator-index-font-size);
1164
+ width: var(--n-indicator-icon-size);
1165
+ height: var(--n-indicator-icon-size);
1166
+ line-height: var(--n-indicator-icon-size);
1167
+ color: var(--n-indicator-text-color);
1168
+ transition: color .3s var(--n-bezier);
1169
+ `,[ic()]),j("icon",`
1170
+ color: var(--n-indicator-text-color);
1171
+ transition: color .3s var(--n-bezier);
1172
+ `,[ic()]),j("base-icon",`
1173
+ color: var(--n-indicator-text-color);
1174
+ transition: color .3s var(--n-bezier);
1175
+ `,[ic()])])]),oe("vertical","flex-direction: column;",[Gr("show-description",[ce(">",[j("step","padding-bottom: 8px;")])]),ce(">",[j("step","margin-bottom: 16px;",[ce("&:last-child","margin-bottom: 0;"),ce(">",[j("step-indicator",[ce(">",[j("step-splitor",`
1176
+ position: absolute;
1177
+ bottom: -8px;
1178
+ width: 1px;
1179
+ margin: 0 !important;
1180
+ left: calc(var(--n-indicator-size) / 2);
1181
+ height: calc(100% - var(--n-indicator-size));
1182
+ `)])]),j("step-content",[J("description","margin-top: 8px;")])])])])])]);function nB(e,t){return typeof e!="object"||e===null||Array.isArray(e)?null:(e.props||(e.props={}),e.props.internalIndex=t+1,e)}function rB(e){return e.map((t,n)=>nB(t,n))}const sB=Object.assign(Object.assign({},rn.props),{current:Number,status:{type:String,default:"process"},size:{type:String,default:"medium"},vertical:Boolean,"onUpdate:current":[Function,Array],onUpdateCurrent:[Function,Array]}),Wv=ls("n-steps"),iB=mt({name:"Steps",props:sB,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,mergedRtlRef:r}=Er(e),s=Ks("Steps",r,n),i=rn("Steps","-steps",tB,qR,e,n);return ci(Wv,{props:e,mergedThemeRef:i,mergedClsPrefixRef:n,stepsSlots:t}),{mergedClsPrefix:n,rtlEnabled:s}},render(){const{mergedClsPrefix:e}=this;return R("div",{class:[`${e}-steps`,this.rtlEnabled&&`${e}-steps--rtl`,this.vertical&&`${e}-steps--vertical`]},rB(Si(Pb(this))))}}),aB={status:String,title:String,description:String,disabled:Boolean,internalIndex:{type:Number,default:0}},yh=mt({name:"Step",props:aB,slots:Object,setup(e){const t=cs(Wv,null);t||ph("step","`n-step` must be placed inside `n-steps`.");const{inlineThemeDisabled:n}=Er(),{props:r,mergedThemeRef:s,mergedClsPrefixRef:i,stepsSlots:a}=t,o=Fe(()=>r.vertical),c=Fe(()=>{const{status:m}=e;if(m)return m;{const{internalIndex:h}=e,{current:g}=r;if(g===void 0)return"process";if(h<g)return"finish";if(h===g)return r.status||"process";if(h>g)return"wait"}return"process"}),l=Fe(()=>{const{value:m}=c,{size:h}=r,{common:{cubicBezierEaseInOut:g},self:{stepHeaderFontWeight:b,[Ge("stepHeaderFontSize",h)]:p,[Ge("indicatorIndexFontSize",h)]:y,[Ge("indicatorSize",h)]:C,[Ge("indicatorIconSize",h)]:A,[Ge("indicatorTextColor",m)]:T,[Ge("indicatorBorderColor",m)]:S,[Ge("headerTextColor",m)]:w,[Ge("splitorColor",m)]:v,[Ge("indicatorColor",m)]:O,[Ge("descriptionTextColor",m)]:F}}=s.value;return{"--n-bezier":g,"--n-description-text-color":F,"--n-header-text-color":w,"--n-indicator-border-color":S,"--n-indicator-color":O,"--n-indicator-icon-size":A,"--n-indicator-index-font-size":y,"--n-indicator-size":C,"--n-indicator-text-color":T,"--n-splitor-color":v,"--n-step-header-font-size":p,"--n-step-header-font-weight":b}}),d=n?Es("step",Fe(()=>{const{value:m}=c,{size:h}=r;return`${m[0]}${h[0]}`}),l,r):void 0,f=Fe(()=>{if(e.disabled)return;const{onUpdateCurrent:m,"onUpdate:current":h}=r;return m||h?()=>{m&&vt(m,e.internalIndex),h&&vt(h,e.internalIndex)}:void 0});return{stepsSlots:a,mergedClsPrefix:i,vertical:o,mergedStatus:c,handleStepClick:f,cssVars:n?void 0:l,themeClass:d?.themeClass,onRender:d?.onRender}},render(){const{mergedClsPrefix:e,onRender:t,handleStepClick:n,disabled:r}=this,s=$n(this.$slots.default,i=>{const a=i||this.description;return a?R("div",{class:`${e}-step-content__description`},a):null});return t?.(),R("div",{class:[`${e}-step`,r&&`${e}-step--disabled`,!r&&n&&`${e}-step--clickable`,this.themeClass,s&&`${e}-step--show-description`,`${e}-step--${this.mergedStatus}-status`],style:this.cssVars,onClick:n},R("div",{class:`${e}-step-indicator`},R("div",{class:`${e}-step-indicator-slot`},R(gh,null,{default:()=>$n(this.$slots.icon,i=>{const{mergedStatus:a,stepsSlots:o}=this;return a==="finish"||a==="error"?a==="finish"?R(Vs,{clsPrefix:e,key:"finish"},{default:()=>li(o["finish-icon"],()=>[R(rI,null)])}):a==="error"?R(Vs,{clsPrefix:e,key:"error"},{default:()=>li(o["error-icon"],()=>[R(GA,null)])}):null:i||R("div",{key:this.internalIndex,class:`${e}-step-indicator-slot__index`},this.internalIndex)})})),this.vertical?R("div",{class:`${e}-step-splitor`}):null),R("div",{class:`${e}-step-content`},R("div",{class:`${e}-step-content-header`},R("div",{class:`${e}-step-content-header__title`},li(this.$slots.title,()=>[this.title])),this.vertical?null:R("div",{class:`${e}-step-splitor`})),s))}}),Mb=ls("n-tabs"),Gv={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:"if"},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},oB=mt({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:Gv,slots:Object,setup(e){const t=cs(Mb,null);return t||ph("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return R("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),cB=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},VA(Gv,["displayDirective"])),V0=mt({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:cB,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:s,tabStyleRef:i,addTabStyleRef:a,tabClassRef:o,addTabClassRef:c,tabChangeIdRef:l,onBeforeLeaveRef:d,triggerRef:f,handleAdd:m,activateTab:h,handleClose:g}=cs(Mb);return{trigger:f,mergedClosable:Fe(()=>{if(e.internalAddable)return!1;const{closable:b}=e;return b===void 0?s.value:b}),style:i,addStyle:a,tabClass:o,addTabClass:c,clsPrefix:t,value:n,type:r,handleClose(b){b.stopPropagation(),!e.disabled&&g(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){m();return}const{name:b}=e,p=++l.id;if(b!==n.value){const{value:y}=d;y?Promise.resolve(y(e.name,n.value)).then(C=>{C&&l.id===p&&h(b)}):h(b)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:s,tab:i,value:a,mergedClosable:o,trigger:c,$slots:{default:l}}=this,d=s??i;return R("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?R("div",{class:`${t}-tabs-tab-pad`}):null,R("div",Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},Eb({class:[`${t}-tabs-tab`,a===n&&`${t}-tabs-tab--active`,r&&`${t}-tabs-tab--disabled`,o&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:c==="click"?this.activateTab:void 0,onMouseenter:c==="hover"?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),R("span",{class:`${t}-tabs-tab__label`},e?R(ma,null,R("div",{class:`${t}-tabs-tab__height-placeholder`}," "),R(Vs,{clsPrefix:t},{default:()=>R(nI,null)})):l?l():typeof d=="object"?d:Sa(d??n)),o&&this.type==="card"?R(xb,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),lB=j("tabs",`
1183
+ box-sizing: border-box;
1184
+ width: 100%;
1185
+ display: flex;
1186
+ flex-direction: column;
1187
+ transition:
1188
+ background-color .3s var(--n-bezier),
1189
+ border-color .3s var(--n-bezier);
1190
+ `,[oe("segment-type",[j("tabs-rail",[ce("&.transition-disabled",[j("tabs-capsule",`
1191
+ transition: none;
1192
+ `)])])]),oe("top",[j("tab-pane",`
1193
+ padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
1194
+ `)]),oe("left",[j("tab-pane",`
1195
+ padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);
1196
+ `)]),oe("left, right",`
1197
+ flex-direction: row;
1198
+ `,[j("tabs-bar",`
1199
+ width: 2px;
1200
+ right: 0;
1201
+ transition:
1202
+ top .2s var(--n-bezier),
1203
+ max-height .2s var(--n-bezier),
1204
+ background-color .3s var(--n-bezier);
1205
+ `),j("tabs-tab",`
1206
+ padding: var(--n-tab-padding-vertical);
1207
+ `)]),oe("right",`
1208
+ flex-direction: row-reverse;
1209
+ `,[j("tab-pane",`
1210
+ padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);
1211
+ `),j("tabs-bar",`
1212
+ left: 0;
1213
+ `)]),oe("bottom",`
1214
+ flex-direction: column-reverse;
1215
+ justify-content: flex-end;
1216
+ `,[j("tab-pane",`
1217
+ padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);
1218
+ `),j("tabs-bar",`
1219
+ top: 0;
1220
+ `)]),j("tabs-rail",`
1221
+ position: relative;
1222
+ padding: 3px;
1223
+ border-radius: var(--n-tab-border-radius);
1224
+ width: 100%;
1225
+ background-color: var(--n-color-segment);
1226
+ transition: background-color .3s var(--n-bezier);
1227
+ display: flex;
1228
+ align-items: center;
1229
+ `,[j("tabs-capsule",`
1230
+ border-radius: var(--n-tab-border-radius);
1231
+ position: absolute;
1232
+ pointer-events: none;
1233
+ background-color: var(--n-tab-color-segment);
1234
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
1235
+ transition: transform 0.3s var(--n-bezier);
1236
+ `),j("tabs-tab-wrapper",`
1237
+ flex-basis: 0;
1238
+ flex-grow: 1;
1239
+ display: flex;
1240
+ align-items: center;
1241
+ justify-content: center;
1242
+ `,[j("tabs-tab",`
1243
+ overflow: hidden;
1244
+ border-radius: var(--n-tab-border-radius);
1245
+ width: 100%;
1246
+ display: flex;
1247
+ align-items: center;
1248
+ justify-content: center;
1249
+ `,[oe("active",`
1250
+ font-weight: var(--n-font-weight-strong);
1251
+ color: var(--n-tab-text-color-active);
1252
+ `),ce("&:hover",`
1253
+ color: var(--n-tab-text-color-hover);
1254
+ `)])])]),oe("flex",[j("tabs-nav",`
1255
+ width: 100%;
1256
+ position: relative;
1257
+ `,[j("tabs-wrapper",`
1258
+ width: 100%;
1259
+ `,[j("tabs-tab",`
1260
+ margin-right: 0;
1261
+ `)])])]),j("tabs-nav",`
1262
+ box-sizing: border-box;
1263
+ line-height: 1.5;
1264
+ display: flex;
1265
+ transition: border-color .3s var(--n-bezier);
1266
+ `,[J("prefix, suffix",`
1267
+ display: flex;
1268
+ align-items: center;
1269
+ `),J("prefix","padding-right: 16px;"),J("suffix","padding-left: 16px;")]),oe("top, bottom",[j("tabs-nav-scroll-wrapper",[ce("&::before",`
1270
+ top: 0;
1271
+ bottom: 0;
1272
+ left: 0;
1273
+ width: 20px;
1274
+ `),ce("&::after",`
1275
+ top: 0;
1276
+ bottom: 0;
1277
+ right: 0;
1278
+ width: 20px;
1279
+ `),oe("shadow-start",[ce("&::before",`
1280
+ box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
1281
+ `)]),oe("shadow-end",[ce("&::after",`
1282
+ box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
1283
+ `)])])]),oe("left, right",[j("tabs-nav-scroll-content",`
1284
+ flex-direction: column;
1285
+ `),j("tabs-nav-scroll-wrapper",[ce("&::before",`
1286
+ top: 0;
1287
+ left: 0;
1288
+ right: 0;
1289
+ height: 20px;
1290
+ `),ce("&::after",`
1291
+ bottom: 0;
1292
+ left: 0;
1293
+ right: 0;
1294
+ height: 20px;
1295
+ `),oe("shadow-start",[ce("&::before",`
1296
+ box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
1297
+ `)]),oe("shadow-end",[ce("&::after",`
1298
+ box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
1299
+ `)])])]),j("tabs-nav-scroll-wrapper",`
1300
+ flex: 1;
1301
+ position: relative;
1302
+ overflow: hidden;
1303
+ `,[j("tabs-nav-y-scroll",`
1304
+ height: 100%;
1305
+ width: 100%;
1306
+ overflow-y: auto;
1307
+ scrollbar-width: none;
1308
+ `,[ce("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
1309
+ width: 0;
1310
+ height: 0;
1311
+ display: none;
1312
+ `)]),ce("&::before, &::after",`
1313
+ transition: box-shadow .3s var(--n-bezier);
1314
+ pointer-events: none;
1315
+ content: "";
1316
+ position: absolute;
1317
+ z-index: 1;
1318
+ `)]),j("tabs-nav-scroll-content",`
1319
+ display: flex;
1320
+ position: relative;
1321
+ min-width: 100%;
1322
+ min-height: 100%;
1323
+ width: fit-content;
1324
+ box-sizing: border-box;
1325
+ `),j("tabs-wrapper",`
1326
+ display: inline-flex;
1327
+ flex-wrap: nowrap;
1328
+ position: relative;
1329
+ `),j("tabs-tab-wrapper",`
1330
+ display: flex;
1331
+ flex-wrap: nowrap;
1332
+ flex-shrink: 0;
1333
+ flex-grow: 0;
1334
+ `),j("tabs-tab",`
1335
+ cursor: pointer;
1336
+ white-space: nowrap;
1337
+ flex-wrap: nowrap;
1338
+ display: inline-flex;
1339
+ align-items: center;
1340
+ color: var(--n-tab-text-color);
1341
+ font-size: var(--n-tab-font-size);
1342
+ background-clip: padding-box;
1343
+ padding: var(--n-tab-padding);
1344
+ transition:
1345
+ box-shadow .3s var(--n-bezier),
1346
+ color .3s var(--n-bezier),
1347
+ background-color .3s var(--n-bezier),
1348
+ border-color .3s var(--n-bezier);
1349
+ `,[oe("disabled",{cursor:"not-allowed"}),J("close",`
1350
+ margin-left: 6px;
1351
+ transition:
1352
+ background-color .3s var(--n-bezier),
1353
+ color .3s var(--n-bezier);
1354
+ `),J("label",`
1355
+ display: flex;
1356
+ align-items: center;
1357
+ z-index: 1;
1358
+ `)]),j("tabs-bar",`
1359
+ position: absolute;
1360
+ bottom: 0;
1361
+ height: 2px;
1362
+ border-radius: 1px;
1363
+ background-color: var(--n-bar-color);
1364
+ transition:
1365
+ left .2s var(--n-bezier),
1366
+ max-width .2s var(--n-bezier),
1367
+ opacity .3s var(--n-bezier),
1368
+ background-color .3s var(--n-bezier);
1369
+ `,[ce("&.transition-disabled",`
1370
+ transition: none;
1371
+ `),oe("disabled",`
1372
+ background-color: var(--n-tab-text-color-disabled)
1373
+ `)]),j("tabs-pane-wrapper",`
1374
+ position: relative;
1375
+ overflow: hidden;
1376
+ transition: max-height .2s var(--n-bezier);
1377
+ `),j("tab-pane",`
1378
+ color: var(--n-pane-text-color);
1379
+ width: 100%;
1380
+ transition:
1381
+ color .3s var(--n-bezier),
1382
+ background-color .3s var(--n-bezier),
1383
+ opacity .2s var(--n-bezier);
1384
+ left: 0;
1385
+ right: 0;
1386
+ top: 0;
1387
+ `,[ce("&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active",`
1388
+ transition:
1389
+ color .3s var(--n-bezier),
1390
+ background-color .3s var(--n-bezier),
1391
+ transform .2s var(--n-bezier),
1392
+ opacity .2s var(--n-bezier);
1393
+ `),ce("&.next-transition-leave-active, &.prev-transition-leave-active",`
1394
+ position: absolute;
1395
+ `),ce("&.next-transition-enter-from, &.prev-transition-leave-to",`
1396
+ transform: translateX(32px);
1397
+ opacity: 0;
1398
+ `),ce("&.next-transition-leave-to, &.prev-transition-enter-from",`
1399
+ transform: translateX(-32px);
1400
+ opacity: 0;
1401
+ `),ce("&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to",`
1402
+ transform: translateX(0);
1403
+ opacity: 1;
1404
+ `)]),j("tabs-tab-pad",`
1405
+ box-sizing: border-box;
1406
+ width: var(--n-tab-gap);
1407
+ flex-grow: 0;
1408
+ flex-shrink: 0;
1409
+ `),oe("line-type, bar-type",[j("tabs-tab",`
1410
+ font-weight: var(--n-tab-font-weight);
1411
+ box-sizing: border-box;
1412
+ vertical-align: bottom;
1413
+ `,[ce("&:hover",{color:"var(--n-tab-text-color-hover)"}),oe("active",`
1414
+ color: var(--n-tab-text-color-active);
1415
+ font-weight: var(--n-tab-font-weight-active);
1416
+ `),oe("disabled",{color:"var(--n-tab-text-color-disabled)"})])]),j("tabs-nav",[oe("line-type",[oe("top",[J("prefix, suffix",`
1417
+ border-bottom: 1px solid var(--n-tab-border-color);
1418
+ `),j("tabs-nav-scroll-content",`
1419
+ border-bottom: 1px solid var(--n-tab-border-color);
1420
+ `),j("tabs-bar",`
1421
+ bottom: -1px;
1422
+ `)]),oe("left",[J("prefix, suffix",`
1423
+ border-right: 1px solid var(--n-tab-border-color);
1424
+ `),j("tabs-nav-scroll-content",`
1425
+ border-right: 1px solid var(--n-tab-border-color);
1426
+ `),j("tabs-bar",`
1427
+ right: -1px;
1428
+ `)]),oe("right",[J("prefix, suffix",`
1429
+ border-left: 1px solid var(--n-tab-border-color);
1430
+ `),j("tabs-nav-scroll-content",`
1431
+ border-left: 1px solid var(--n-tab-border-color);
1432
+ `),j("tabs-bar",`
1433
+ left: -1px;
1434
+ `)]),oe("bottom",[J("prefix, suffix",`
1435
+ border-top: 1px solid var(--n-tab-border-color);
1436
+ `),j("tabs-nav-scroll-content",`
1437
+ border-top: 1px solid var(--n-tab-border-color);
1438
+ `),j("tabs-bar",`
1439
+ top: -1px;
1440
+ `)]),J("prefix, suffix",`
1441
+ transition: border-color .3s var(--n-bezier);
1442
+ `),j("tabs-nav-scroll-content",`
1443
+ transition: border-color .3s var(--n-bezier);
1444
+ `),j("tabs-bar",`
1445
+ border-radius: 0;
1446
+ `)]),oe("card-type",[J("prefix, suffix",`
1447
+ transition: border-color .3s var(--n-bezier);
1448
+ `),j("tabs-pad",`
1449
+ flex-grow: 1;
1450
+ transition: border-color .3s var(--n-bezier);
1451
+ `),j("tabs-tab-pad",`
1452
+ transition: border-color .3s var(--n-bezier);
1453
+ `),j("tabs-tab",`
1454
+ font-weight: var(--n-tab-font-weight);
1455
+ border: 1px solid var(--n-tab-border-color);
1456
+ background-color: var(--n-tab-color);
1457
+ box-sizing: border-box;
1458
+ position: relative;
1459
+ vertical-align: bottom;
1460
+ display: flex;
1461
+ justify-content: space-between;
1462
+ font-size: var(--n-tab-font-size);
1463
+ color: var(--n-tab-text-color);
1464
+ `,[oe("addable",`
1465
+ padding-left: 8px;
1466
+ padding-right: 8px;
1467
+ font-size: 16px;
1468
+ justify-content: center;
1469
+ `,[J("height-placeholder",`
1470
+ width: 0;
1471
+ font-size: var(--n-tab-font-size);
1472
+ `),Gr("disabled",[ce("&:hover",`
1473
+ color: var(--n-tab-text-color-hover);
1474
+ `)])]),oe("closable","padding-right: 8px;"),oe("active",`
1475
+ background-color: #0000;
1476
+ font-weight: var(--n-tab-font-weight-active);
1477
+ color: var(--n-tab-text-color-active);
1478
+ `),oe("disabled","color: var(--n-tab-text-color-disabled);")])]),oe("left, right",`
1479
+ flex-direction: column;
1480
+ `,[J("prefix, suffix",`
1481
+ padding: var(--n-tab-padding-vertical);
1482
+ `),j("tabs-wrapper",`
1483
+ flex-direction: column;
1484
+ `),j("tabs-tab-wrapper",`
1485
+ flex-direction: column;
1486
+ `,[j("tabs-tab-pad",`
1487
+ height: var(--n-tab-gap-vertical);
1488
+ width: 100%;
1489
+ `)])]),oe("top",[oe("card-type",[j("tabs-scroll-padding","border-bottom: 1px solid var(--n-tab-border-color);"),J("prefix, suffix",`
1490
+ border-bottom: 1px solid var(--n-tab-border-color);
1491
+ `),j("tabs-tab",`
1492
+ border-top-left-radius: var(--n-tab-border-radius);
1493
+ border-top-right-radius: var(--n-tab-border-radius);
1494
+ `,[oe("active",`
1495
+ border-bottom: 1px solid #0000;
1496
+ `)]),j("tabs-tab-pad",`
1497
+ border-bottom: 1px solid var(--n-tab-border-color);
1498
+ `),j("tabs-pad",`
1499
+ border-bottom: 1px solid var(--n-tab-border-color);
1500
+ `)])]),oe("left",[oe("card-type",[j("tabs-scroll-padding","border-right: 1px solid var(--n-tab-border-color);"),J("prefix, suffix",`
1501
+ border-right: 1px solid var(--n-tab-border-color);
1502
+ `),j("tabs-tab",`
1503
+ border-top-left-radius: var(--n-tab-border-radius);
1504
+ border-bottom-left-radius: var(--n-tab-border-radius);
1505
+ `,[oe("active",`
1506
+ border-right: 1px solid #0000;
1507
+ `)]),j("tabs-tab-pad",`
1508
+ border-right: 1px solid var(--n-tab-border-color);
1509
+ `),j("tabs-pad",`
1510
+ border-right: 1px solid var(--n-tab-border-color);
1511
+ `)])]),oe("right",[oe("card-type",[j("tabs-scroll-padding","border-left: 1px solid var(--n-tab-border-color);"),J("prefix, suffix",`
1512
+ border-left: 1px solid var(--n-tab-border-color);
1513
+ `),j("tabs-tab",`
1514
+ border-top-right-radius: var(--n-tab-border-radius);
1515
+ border-bottom-right-radius: var(--n-tab-border-radius);
1516
+ `,[oe("active",`
1517
+ border-left: 1px solid #0000;
1518
+ `)]),j("tabs-tab-pad",`
1519
+ border-left: 1px solid var(--n-tab-border-color);
1520
+ `),j("tabs-pad",`
1521
+ border-left: 1px solid var(--n-tab-border-color);
1522
+ `)])]),oe("bottom",[oe("card-type",[j("tabs-scroll-padding","border-top: 1px solid var(--n-tab-border-color);"),J("prefix, suffix",`
1523
+ border-top: 1px solid var(--n-tab-border-color);
1524
+ `),j("tabs-tab",`
1525
+ border-bottom-left-radius: var(--n-tab-border-radius);
1526
+ border-bottom-right-radius: var(--n-tab-border-radius);
1527
+ `,[oe("active",`
1528
+ border-top: 1px solid #0000;
1529
+ `)]),j("tabs-tab-pad",`
1530
+ border-top: 1px solid var(--n-tab-border-color);
1531
+ `),j("tabs-pad",`
1532
+ border-top: 1px solid var(--n-tab-border-color);
1533
+ `)])])])]),uB=Object.assign(Object.assign({},rn.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),dB=mt({name:"Tabs",props:uB,slots:Object,setup(e,{slots:t}){var n,r,s,i;const{mergedClsPrefixRef:a,inlineThemeDisabled:o}=Er(e),c=rn("Tabs","-tabs",lB,GR,e,a),l=Me(null),d=Me(null),f=Me(null),m=Me(null),h=Me(null),g=Me(null),b=Me(!0),p=Me(!0),y=$y(e,["labelSize","size"]),C=$y(e,["activeName","value"]),A=Me((r=(n=C.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(i=(s=Si(t.default())[0])===null||s===void 0?void 0:s.props)===null||i===void 0?void 0:i.name:null),T=sl(C,A),S={id:0},w=Fe(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});ss(T,()=>{S.id=0,me(),N()});function v(){var U;const{value:q}=T;return q===null?null:(U=l.value)===null||U===void 0?void 0:U.querySelector(`[data-name="${q}"]`)}function O(U){if(e.type==="card")return;const{value:q}=d;if(!q)return;const $=q.style.opacity==="0";if(U){const ae=`${a.value}-tabs-bar--disabled`,{barWidth:Pe,placement:ye}=e;if(U.dataset.disabled==="true"?q.classList.add(ae):q.classList.remove(ae),["top","bottom"].includes(ye)){if(X(["top","maxHeight","height"]),typeof Pe=="number"&&U.offsetWidth>=Pe){const Ye=Math.floor((U.offsetWidth-Pe)/2)+U.offsetLeft;q.style.left=`${Ye}px`,q.style.maxWidth=`${Pe}px`}else q.style.left=`${U.offsetLeft}px`,q.style.maxWidth=`${U.offsetWidth}px`;q.style.width="8192px",$&&(q.style.transition="none"),q.offsetWidth,$&&(q.style.transition="",q.style.opacity="1")}else{if(X(["left","maxWidth","width"]),typeof Pe=="number"&&U.offsetHeight>=Pe){const Ye=Math.floor((U.offsetHeight-Pe)/2)+U.offsetTop;q.style.top=`${Ye}px`,q.style.maxHeight=`${Pe}px`}else q.style.top=`${U.offsetTop}px`,q.style.maxHeight=`${U.offsetHeight}px`;q.style.height="8192px",$&&(q.style.transition="none"),q.offsetHeight,$&&(q.style.transition="",q.style.opacity="1")}}}function F(){if(e.type==="card")return;const{value:U}=d;U&&(U.style.opacity="0")}function X(U){const{value:q}=d;if(q)for(const $ of U)q.style[$]=""}function me(){if(e.type==="card")return;const U=v();U?O(U):F()}function N(){var U;const q=(U=h.value)===null||U===void 0?void 0:U.$el;if(!q)return;const $=v();if(!$)return;const{scrollLeft:ae,offsetWidth:Pe}=q,{offsetLeft:ye,offsetWidth:Ye}=$;ae>ye?q.scrollTo({top:0,left:ye,behavior:"smooth"}):ye+Ye>ae+Pe&&q.scrollTo({top:0,left:ye+Ye-Pe,behavior:"smooth"})}const Y=Me(null);let x=0,Z=null;function Le(U){const q=Y.value;if(q){x=U.getBoundingClientRect().height;const $=`${x}px`,ae=()=>{q.style.height=$,q.style.maxHeight=$};Z?(ae(),Z(),Z=null):Z=ae}}function re(U){const q=Y.value;if(q){const $=U.getBoundingClientRect().height,ae=()=>{document.body.offsetHeight,q.style.maxHeight=`${$}px`,q.style.height=`${Math.max(x,$)}px`};Z?(Z(),Z=null,ae()):Z=ae}}function He(){const U=Y.value;if(U){U.style.maxHeight="",U.style.height="";const{paneWrapperStyle:q}=e;if(typeof q=="string")U.style.cssText=q;else if(q){const{maxHeight:$,height:ae}=q;$!==void 0&&(U.style.maxHeight=$),ae!==void 0&&(U.style.height=ae)}}}const he={value:[]},ze=Me("next");function Q(U){const q=T.value;let $="next";for(const ae of he.value){if(ae===q)break;if(ae===U){$="prev";break}}ze.value=$,K(U)}function K(U){const{onActiveNameChange:q,onUpdateValue:$,"onUpdate:value":ae}=e;q&&vt(q,U),$&&vt($,U),ae&&vt(ae,U),A.value=U}function Qe(U){const{onClose:q}=e;q&&vt(q,U)}function De(){const{value:U}=d;if(!U)return;const q="transition-disabled";U.classList.add(q),me(),U.classList.remove(q)}const Be=Me(null);function et({transitionDisabled:U}){const q=l.value;if(!q)return;U&&q.classList.add("transition-disabled");const $=v();$&&Be.value&&(Be.value.style.width=`${$.offsetWidth}px`,Be.value.style.height=`${$.offsetHeight}px`,Be.value.style.transform=`translateX(${$.offsetLeft-bu(getComputedStyle(q).paddingLeft)}px)`,U&&Be.value.offsetWidth),U&&q.classList.remove("transition-disabled")}ss([T],()=>{e.type==="segment"&&Zi(()=>{et({transitionDisabled:!1})})}),Ao(()=>{e.type==="segment"&&et({transitionDisabled:!0})});let Wt=0;function ft(U){var q;if(U.contentRect.width===0&&U.contentRect.height===0||Wt===U.contentRect.width)return;Wt=U.contentRect.width;const{type:$}=e;if(($==="line"||$==="bar")&&De(),$!=="segment"){const{placement:ae}=e;E((ae==="top"||ae==="bottom"?(q=h.value)===null||q===void 0?void 0:q.$el:g.value)||null)}}const Ke=nm(ft,64);ss([()=>e.justifyContent,()=>e.size],()=>{Zi(()=>{const{type:U}=e;(U==="line"||U==="bar")&&De()})});const Ot=Me(!1);function Ft(U){var q;const{target:$,contentRect:{width:ae,height:Pe}}=U,ye=$.parentElement.parentElement.offsetWidth,Ye=$.parentElement.parentElement.offsetHeight,{placement:It}=e;if(!Ot.value)It==="top"||It==="bottom"?ye<ae&&(Ot.value=!0):Ye<Pe&&(Ot.value=!0);else{const{value:ht}=m;if(!ht)return;It==="top"||It==="bottom"?ye-ae>ht.$el.offsetWidth&&(Ot.value=!1):Ye-Pe>ht.$el.offsetHeight&&(Ot.value=!1)}E(((q=h.value)===null||q===void 0?void 0:q.$el)||null)}const ar=nm(Ft,64);function Sn(){const{onAdd:U}=e;U&&U(),Zi(()=>{const q=v(),{value:$}=h;!q||!$||$.scrollTo({left:q.offsetLeft,top:0,behavior:"smooth"})})}function E(U){if(!U)return;const{placement:q}=e;if(q==="top"||q==="bottom"){const{scrollLeft:$,scrollWidth:ae,offsetWidth:Pe}=U;b.value=$<=0,p.value=$+Pe>=ae}else{const{scrollTop:$,scrollHeight:ae,offsetHeight:Pe}=U;b.value=$<=0,p.value=$+Pe>=ae}}const de=nm(U=>{E(U.target)},64);ci(Mb,{triggerRef:on(e,"trigger"),tabStyleRef:on(e,"tabStyle"),tabClassRef:on(e,"tabClass"),addTabStyleRef:on(e,"addTabStyle"),addTabClassRef:on(e,"addTabClass"),paneClassRef:on(e,"paneClass"),paneStyleRef:on(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:on(e,"type"),closableRef:on(e,"closable"),valueRef:T,tabChangeIdRef:S,onBeforeLeaveRef:on(e,"onBeforeLeave"),activateTab:Q,handleClose:Qe,handleAdd:Sn}),u3(()=>{me(),N()}),vf(()=>{const{value:U}=f;if(!U)return;const{value:q}=a,$=`${q}-tabs-nav-scroll-wrapper--shadow-start`,ae=`${q}-tabs-nav-scroll-wrapper--shadow-end`;b.value?U.classList.remove($):U.classList.add($),p.value?U.classList.remove(ae):U.classList.add(ae)});const se={syncBarPosition:()=>{me()}},L=()=>{et({transitionDisabled:!0})},I=Fe(()=>{const{value:U}=y,{type:q}=e,$={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[q],ae=`${U}${$}`,{self:{barColor:Pe,closeIconColor:ye,closeIconColorHover:Ye,closeIconColorPressed:It,tabColor:ht,tabBorderColor:Zn,paneTextColor:$s,tabFontWeight:or,tabBorderRadius:ds,tabFontWeightActive:Qt,colorSegment:$r,fontWeightStrong:Oi,tabColorSegment:we,closeSize:Xe,closeIconSize:ct,closeColorHover:qt,closeColorPressed:vn,closeBorderRadius:Fn,[Ge("panePadding",U)]:_n,[Ge("tabPadding",ae)]:Ut,[Ge("tabPaddingVertical",ae)]:cr,[Ge("tabGap",ae)]:vs,[Ge("tabGap",`${ae}Vertical`)]:$o,[Ge("tabTextColor",q)]:Pl,[Ge("tabTextColorActive",q)]:Di,[Ge("tabTextColorHover",q)]:Li,[Ge("tabTextColorDisabled",q)]:Nl,[Ge("tabFontSize",U)]:Ol},common:{cubicBezierEaseInOut:Ho}}=c.value;return{"--n-bezier":Ho,"--n-color-segment":$r,"--n-bar-color":Pe,"--n-tab-font-size":Ol,"--n-tab-text-color":Pl,"--n-tab-text-color-active":Di,"--n-tab-text-color-disabled":Nl,"--n-tab-text-color-hover":Li,"--n-pane-text-color":$s,"--n-tab-border-color":Zn,"--n-tab-border-radius":ds,"--n-close-size":Xe,"--n-close-icon-size":ct,"--n-close-color-hover":qt,"--n-close-color-pressed":vn,"--n-close-border-radius":Fn,"--n-close-icon-color":ye,"--n-close-icon-color-hover":Ye,"--n-close-icon-color-pressed":It,"--n-tab-color":ht,"--n-tab-font-weight":or,"--n-tab-font-weight-active":Qt,"--n-tab-padding":Ut,"--n-tab-padding-vertical":cr,"--n-tab-gap":vs,"--n-tab-gap-vertical":$o,"--n-pane-padding-left":Is(_n,"left"),"--n-pane-padding-right":Is(_n,"right"),"--n-pane-padding-top":Is(_n,"top"),"--n-pane-padding-bottom":Is(_n,"bottom"),"--n-font-weight-strong":Oi,"--n-tab-color-segment":we}}),W=o?Es("tabs",Fe(()=>`${y.value[0]}${e.type[0]}`),I,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:T,renderedNames:new Set,segmentCapsuleElRef:Be,tabsPaneWrapperRef:Y,tabsElRef:l,barElRef:d,addTabInstRef:m,xScrollInstRef:h,scrollWrapperElRef:f,addTabFixed:Ot,tabWrapperStyle:w,handleNavResize:Ke,mergedSize:y,handleScroll:de,handleTabsResize:ar,cssVars:o?void 0:I,themeClass:W?.themeClass,animationDirection:ze,renderNameListRef:he,yScrollElRef:g,handleSegmentResize:L,onAnimationBeforeLeave:Le,onAnimationEnter:re,onAnimationAfterEnter:He,onRender:W?.onRender},se)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:s,mergedSize:i,renderNameListRef:a,onRender:o,paneWrapperClass:c,paneWrapperStyle:l,$slots:{default:d,prefix:f,suffix:m}}=this;o?.();const h=d?Si(d()).filter(S=>S.type.__TAB_PANE__===!0):[],g=d?Si(d()).filter(S=>S.type.__TAB__===!0):[],b=!g.length,p=t==="card",y=t==="segment",C=!p&&!y&&this.justifyContent;a.value=[];const A=()=>{const S=R("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},C?null:R("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),b?h.map((w,v)=>(a.value.push(w.props.name),sm(R(V0,Object.assign({},w.props,{internalCreatedByPane:!0,internalLeftPadded:v!==0&&(!C||C==="center"||C==="start"||C==="end")}),w.children?{default:w.children.tab}:void 0)))):g.map((w,v)=>(a.value.push(w.props.name),sm(v!==0&&!C?TE(w):w))),!r&&s&&p?vE(s,(b?h.length:g.length)!==0):null,C?null:R("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return R("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},p&&s?R(cc,{onResize:this.handleTabsResize},{default:()=>S}):S,p?R("div",{class:`${e}-tabs-pad`}):null,p?null:R("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},T=y?"top":n;return R("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${i}-size`,C&&`${e}-tabs--flex`,`${e}-tabs--${T}`],style:this.cssVars},R("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${T}`,`${e}-tabs-nav`]},$n(f,S=>S&&R("div",{class:`${e}-tabs-nav__prefix`},S)),y?R(cc,{onResize:this.handleSegmentResize},{default:()=>R("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},R("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},R("div",{class:`${e}-tabs-wrapper`},R("div",{class:`${e}-tabs-tab`}))),b?h.map((S,w)=>(a.value.push(S.props.name),R(V0,Object.assign({},S.props,{internalCreatedByPane:!0,internalLeftPadded:w!==0}),S.children?{default:S.children.tab}:void 0))):g.map((S,w)=>(a.value.push(S.props.name),w===0?S:TE(S))))}):R(cc,{onResize:this.handleNavResize},{default:()=>R("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(T)?R(Z3,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:A}):R("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},A()))}),r&&s&&p?vE(s,!0):null,$n(m,S=>S&&R("div",{class:`${e}-tabs-nav__suffix`},S))),b&&(this.animated&&(T==="top"||T==="bottom")?R("div",{ref:"tabsPaneWrapperRef",style:l,class:[`${e}-tabs-pane-wrapper`,c]},xE(h,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):xE(h,this.mergedValue,this.renderedNames)))}});function xE(e,t,n,r,s,i,a){const o=[];return e.forEach(c=>{const{name:l,displayDirective:d,"display-directive":f}=c.props,m=g=>d===g||f===g,h=t===l;if(c.key!==void 0&&(c.key=l),h||m("show")||m("show:lazy")&&n.has(l)){n.has(l)||n.add(l);const g=!m("if");o.push(g?mu(c,[[Sf,h]]):c)}}),a?R(KA,{name:`${a}-transition`,onBeforeLeave:r,onEnter:s,onAfterEnter:i},{default:()=>o}):o}function vE(e,t){return R(V0,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function TE(e){const t=lv(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function sm(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}const fB={INDEX_NOT_FOUND:"index_not_found"};class ea extends Error{name="MeiliSearchError"}class SE extends ea{name="MeiliSearchApiError";cause;response;constructor(t,n){super(n?.message??`${t.status}: ${t.statusText}`),this.response=t,n!==void 0&&(this.cause=n)}}class _E extends ea{name="MeiliSearchRequestError";constructor(t,n){super(`Request to ${t} has failed`,{cause:n})}}class wE extends ea{name="MeiliSearchRequestTimeOutError";cause;constructor(t,n){super(`request timed out after ${t}ms`),this.cause={timeout:t,requestInit:n}}}class hB extends ea{name="MeiliSearchTaskTimeOutError";cause;constructor(t,n){super(`timeout of ${n}ms has exceeded on task ${t} when waiting for it to be resolved.`),this.cause={taskUid:t,timeout:n}}}const mB="0.52.0";function gB(e){return e.startsWith("https://")||e.startsWith("http://")?e:`http://${e}`}function bB(e){return e.endsWith("/")||(e+="/"),e}function pB(e,t){for(const[n,r]of Object.entries(t))r!=null&&e.set(n,Array.isArray(r)?r.join():r instanceof Date?r.toISOString():String(r))}function yB(e,t){const n="X-Meilisearch-Client",r=`Meilisearch JavaScript (v${mB})`,s="Content-Type",i="Authorization",a=new Headers(t);if(e.apiKey&&!a.has(i)&&a.set(i,`Bearer ${e.apiKey}`),a.has(s)||a.set(s,"application/json"),e.clientAgents!==void 0){const o=e.clientAgents.concat(r);a.set(n,o.join(" ; "))}else a.set(n,r);return a}const kf=Symbol("<timeout>");function AE(e,t){const{signal:n}=e,r=new AbortController;if(n!=null){let s=null;if(n.aborted)r.abort(n.reason);else{const i=()=>r.abort(n.reason);n.addEventListener("abort",i,{once:!0}),s=()=>n.removeEventListener("abort",i),r.signal.addEventListener("abort",s,{once:!0})}return()=>{if(n.aborted)return;const i=setTimeout(()=>r.abort(kf),t),a=()=>{clearTimeout(i),s!==null&&r.signal.removeEventListener("abort",s)};return n.addEventListener("abort",a,{once:!0}),()=>{n.removeEventListener("abort",a),a()}}}return e.signal=r.signal,()=>{const s=setTimeout(()=>r.abort(kf),t);return()=>clearTimeout(s)}}class K0{#e;#t;#n;#r;constructor(t){const n=bB(gB(t.host));try{this.#e=new URL(n)}catch(r){throw new ea("The provided host is not valid",{cause:r})}this.#t={...t.requestInit,headers:yB(t,t.requestInit?.headers)},this.#n=t.httpClient,this.#r=t.timeout}#a(t,n){if(t===void 0&&n===void 0)return this.#t.headers;const r=new Headers(t);n!==void 0&&!r.has("Content-Type")&&r.set("Content-Type",n);for(const[s,i]of this.#t.headers)r.has(s)||r.set(s,i);return r}#i({path:t,method:n,params:r,contentType:s,body:i,extraRequestInit:a}){const o=new URL(t,this.#e);r!==void 0&&pB(o.searchParams,r);const c={method:n,body:s===void 0||typeof i!="string"?JSON.stringify(i):i,...a,...this.#t,headers:this.#a(a?.headers,s)};return{url:o,init:c}}async#s(t){const{url:n,init:r}=this.#i(t),i=(this.#r!==void 0?AE(r,this.#r):null)?.();let a,o;try{if(this.#n!==void 0)return await this.#n(n,r);a=await fetch(n,r),o=await a.text()}catch(l){throw new _E(n.toString(),Object.is(l,kf)?new wE(this.#r,r):l)}finally{i?.()}const c=o===""?void 0:JSON.parse(o);if(!a.ok)throw new SE(a,c);return c}get(t){return this.#s(t)}post(t){return this.#s({...t,method:"POST"})}put(t){return this.#s({...t,method:"PUT"})}patch(t){return this.#s({...t,method:"PATCH"})}delete(t){return this.#s({...t,method:"DELETE"})}postStream(t){return this.#o({...t,method:"POST"})}async#o(t){const{url:n,init:r}=this.#i(t),i=(this.#r!==void 0?AE(r,this.#r):null)?.();let a;try{if(this.#n!==void 0){const o=await this.#n(n,r);if(!(o instanceof ReadableStream))throw new ea("Custom HTTP client must return a ReadableStream for streaming requests");return o}a=await fetch(n,r)}catch(o){throw new _E(n.toString(),Object.is(o,kf)?new wE(this.#r,r):o)}finally{i?.()}if(!a.ok){const o=await a.text(),c=o===""?void 0:JSON.parse(o);throw new SE(a,c)}if(!a.body)throw new ea("Response body is null - server did not return a readable stream");return a.body}}const kE=Symbol("<task timeout>");function Vv(e){return function(t){return Object.defineProperty(t,"waitTask",{async value(n){return await e.waitForTask(await t,n)}})}}const EB=e=>typeof e=="number"?e:e.taskUid;class Y0{#e;#t;#n;#r;constructor(t,n){this.#e=t,this.#t=n?.timeout??5e3,this.#n=n?.interval??50,this.#r=Vv(this)}async getTask(t,n){return await this.#e.get({path:`tasks/${t}`,extraRequestInit:n})}async getTasks(t){return await this.#e.get({path:"tasks",params:t})}async waitForTask(t,n){const r=EB(t),s=n?.timeout??this.#t,i=n?.interval??this.#n,a=s>0?new AbortController:null,o=a!==null?setTimeout(()=>void a.abort(kE),s):void 0;try{for(;;){const c=await this.getTask(r,{signal:a?.signal});if(c.status!=="enqueued"&&c.status!=="processing")return clearTimeout(o),c;i>0&&await new Promise(l=>setTimeout(l,i))}}catch(c){throw Object.is(c.cause,kE)?new hB(r,s):c}}async*waitForTasksIter(t,n){for await(const r of t)yield await this.waitForTask(r,n)}async waitForTasks(...t){const n=[];for await(const r of this.waitForTasksIter(...t))n.push(r);return n}cancelTasks(t){return this.#r(this.#e.post({path:"tasks/cancel",params:t}))}deleteTasks(t){return this.#r(this.#e.delete({path:"tasks",params:t}))}}function X0(e,t){const n=Vv(t);return{post:(...r)=>n(e.post(...r)),put:(...r)=>n(e.put(...r)),patch:(...r)=>n(e.patch(...r)),delete:(...r)=>n(e.delete(...r))}}class xa{uid;primaryKey;createdAt;updatedAt;httpRequest;tasks;#e;constructor(t,n,r){this.uid=n,this.primaryKey=r,this.httpRequest=new K0(t),this.tasks=new Y0(this.httpRequest,t.defaultWaitOptions),this.#e=X0(this.httpRequest,this.tasks)}async search(t,n,r){return await this.httpRequest.post({path:`indexes/${this.uid}/search`,body:{q:t,...n},extraRequestInit:r})}async searchGet(t,n,r){const i={q:t,...n,filter:(a=>{if(typeof a=="string")return a;if(Array.isArray(a))throw new ea("The filter query parameter should be in string format when using searchGet")})(n?.filter),sort:n?.sort?.join(","),facets:n?.facets?.join(","),attributesToRetrieve:n?.attributesToRetrieve?.join(","),attributesToCrop:n?.attributesToCrop?.join(","),attributesToHighlight:n?.attributesToHighlight?.join(","),vector:n?.vector?.join(","),attributesToSearchOn:n?.attributesToSearchOn?.join(",")};return await this.httpRequest.get({path:`indexes/${this.uid}/search`,params:i,extraRequestInit:r})}async searchForFacetValues(t,n){return await this.httpRequest.post({path:`indexes/${this.uid}/facet-search`,body:t,extraRequestInit:n})}async searchSimilarDocuments(t){return await this.httpRequest.post({path:`indexes/${this.uid}/similar`,body:t})}async getRawInfo(){const t=await this.httpRequest.get({path:`indexes/${this.uid}`});return this.primaryKey=t.primaryKey,this.updatedAt=new Date(t.updatedAt),this.createdAt=new Date(t.createdAt),t}async fetchInfo(){return await this.getRawInfo(),this}async fetchPrimaryKey(){return this.primaryKey=(await this.getRawInfo()).primaryKey,this.primaryKey}static create(t,n={},r){const s=new K0(r);return X0(s,new Y0(s)).post({path:"indexes",body:{...n,uid:t}})}update(t){return this.#e.patch({path:`indexes/${this.uid}`,body:t})}delete(){return this.#e.delete({path:`indexes/${this.uid}`})}async getStats(){return await this.httpRequest.get({path:`indexes/${this.uid}/stats`})}async getDocuments(t){const n=`indexes/${this.uid}/documents`;return t?.filter!==void 0?await this.httpRequest.post({path:`${n}/fetch`,body:t}):await this.httpRequest.get({path:n,params:t})}async getDocument(t,n){const r=Array.isArray(n?.fields)?n.fields.join():void 0;return await this.httpRequest.get({path:`indexes/${this.uid}/documents/${t}`,params:{...n,fields:r}})}addDocuments(t,n){return this.#e.post({path:`indexes/${this.uid}/documents`,params:n,body:t})}addDocumentsFromString(t,n,r){return this.#e.post({path:`indexes/${this.uid}/documents`,body:t,params:r,contentType:n})}addDocumentsInBatches(t,n=1e3,r){const s=[];for(let i=0;i<t.length;i+=n)s.push(this.addDocuments(t.slice(i,i+n),r));return s}updateDocuments(t,n){return this.#e.put({path:`indexes/${this.uid}/documents`,params:n,body:t})}updateDocumentsInBatches(t,n=1e3,r){const s=[];for(let i=0;i<t.length;i+=n)s.push(this.updateDocuments(t.slice(i,i+n),r));return s}updateDocumentsFromString(t,n,r){return this.#e.put({path:`indexes/${this.uid}/documents`,body:t,params:r,contentType:n})}deleteDocument(t){return this.#e.delete({path:`indexes/${this.uid}/documents/${t}`})}deleteDocuments(t){const r=!Array.isArray(t)&&typeof t=="object"?"documents/delete":"documents/delete-batch";return this.#e.post({path:`indexes/${this.uid}/${r}`,body:t})}deleteAllDocuments(){return this.#e.delete({path:`indexes/${this.uid}/documents`})}updateDocumentsByFunction(t){return this.#e.post({path:`indexes/${this.uid}/documents/edit`,body:t})}async getSettings(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings`})}updateSettings(t){return this.#e.patch({path:`indexes/${this.uid}/settings`,body:t})}resetSettings(){return this.#e.delete({path:`indexes/${this.uid}/settings`})}async getPagination(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/pagination`})}updatePagination(t){return this.#e.patch({path:`indexes/${this.uid}/settings/pagination`,body:t})}resetPagination(){return this.#e.delete({path:`indexes/${this.uid}/settings/pagination`})}async getSynonyms(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/synonyms`})}updateSynonyms(t){return this.#e.put({path:`indexes/${this.uid}/settings/synonyms`,body:t})}resetSynonyms(){return this.#e.delete({path:`indexes/${this.uid}/settings/synonyms`})}async getStopWords(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/stop-words`})}updateStopWords(t){return this.#e.put({path:`indexes/${this.uid}/settings/stop-words`,body:t})}resetStopWords(){return this.#e.delete({path:`indexes/${this.uid}/settings/stop-words`})}async getRankingRules(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/ranking-rules`})}updateRankingRules(t){return this.#e.put({path:`indexes/${this.uid}/settings/ranking-rules`,body:t})}resetRankingRules(){return this.#e.delete({path:`indexes/${this.uid}/settings/ranking-rules`})}async getDistinctAttribute(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/distinct-attribute`})}updateDistinctAttribute(t){return this.#e.put({path:`indexes/${this.uid}/settings/distinct-attribute`,body:t})}resetDistinctAttribute(){return this.#e.delete({path:`indexes/${this.uid}/settings/distinct-attribute`})}async getFilterableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/filterable-attributes`})}updateFilterableAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/filterable-attributes`,body:t})}resetFilterableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/filterable-attributes`})}async getSortableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/sortable-attributes`})}updateSortableAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/sortable-attributes`,body:t})}resetSortableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/sortable-attributes`})}async getSearchableAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/searchable-attributes`})}updateSearchableAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/searchable-attributes`,body:t})}resetSearchableAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/searchable-attributes`})}async getDisplayedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/displayed-attributes`})}updateDisplayedAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/displayed-attributes`,body:t})}resetDisplayedAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/displayed-attributes`})}async getTypoTolerance(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/typo-tolerance`})}updateTypoTolerance(t){return this.#e.patch({path:`indexes/${this.uid}/settings/typo-tolerance`,body:t})}resetTypoTolerance(){return this.#e.delete({path:`indexes/${this.uid}/settings/typo-tolerance`})}async getFaceting(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/faceting`})}updateFaceting(t){return this.#e.patch({path:`indexes/${this.uid}/settings/faceting`,body:t})}resetFaceting(){return this.#e.delete({path:`indexes/${this.uid}/settings/faceting`})}async getSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/separator-tokens`})}updateSeparatorTokens(t){return this.#e.put({path:`indexes/${this.uid}/settings/separator-tokens`,body:t})}resetSeparatorTokens(){return this.#e.delete({path:`indexes/${this.uid}/settings/separator-tokens`})}async getNonSeparatorTokens(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/non-separator-tokens`})}updateNonSeparatorTokens(t){return this.#e.put({path:`indexes/${this.uid}/settings/non-separator-tokens`,body:t})}resetNonSeparatorTokens(){return this.#e.delete({path:`indexes/${this.uid}/settings/non-separator-tokens`})}async getDictionary(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/dictionary`})}updateDictionary(t){return this.#e.put({path:`indexes/${this.uid}/settings/dictionary`,body:t})}resetDictionary(){return this.#e.delete({path:`indexes/${this.uid}/settings/dictionary`})}async getProximityPrecision(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/proximity-precision`})}updateProximityPrecision(t){return this.#e.put({path:`indexes/${this.uid}/settings/proximity-precision`,body:t})}resetProximityPrecision(){return this.#e.delete({path:`indexes/${this.uid}/settings/proximity-precision`})}async getEmbedders(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/embedders`})}updateEmbedders(t){return this.#e.patch({path:`indexes/${this.uid}/settings/embedders`,body:t})}resetEmbedders(){return this.#e.delete({path:`indexes/${this.uid}/settings/embedders`})}async getSearchCutoffMs(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}updateSearchCutoffMs(t){return this.#e.put({path:`indexes/${this.uid}/settings/search-cutoff-ms`,body:t})}resetSearchCutoffMs(){return this.#e.delete({path:`indexes/${this.uid}/settings/search-cutoff-ms`})}async getLocalizedAttributes(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/localized-attributes`})}updateLocalizedAttributes(t){return this.#e.put({path:`indexes/${this.uid}/settings/localized-attributes`,body:t})}resetLocalizedAttributes(){return this.#e.delete({path:`indexes/${this.uid}/settings/localized-attributes`})}async getFacetSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/facet-search`})}updateFacetSearch(t){return this.#e.put({path:`indexes/${this.uid}/settings/facet-search`,body:t})}resetFacetSearch(){return this.#e.delete({path:`indexes/${this.uid}/settings/facet-search`})}async getPrefixSearch(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/prefix-search`})}updatePrefixSearch(t){return this.#e.put({path:`indexes/${this.uid}/settings/prefix-search`,body:t})}resetPrefixSearch(){return this.#e.delete({path:`indexes/${this.uid}/settings/prefix-search`})}async getChat(){return await this.httpRequest.get({path:`indexes/${this.uid}/settings/chat`})}updateChat(t){return this.#e.patch({path:`indexes/${this.uid}/settings/chat`,body:t})}}class CB{#e;constructor(t){this.#e=t}async getBatch(t){return await this.#e.get({path:`batches/${t}`})}async getBatches(t){return await this.#e.get({path:"batches",params:t})}}class xB{#e;#t;constructor(t,n){this.#e=t,this.#t=n}async get(){return await this.#e.get({path:`chats/${this.#t}/settings`})}async update(t){return await this.#e.patch({path:`chats/${this.#t}/settings`,body:t})}async reset(){await this.#e.delete({path:`chats/${this.#t}/settings`})}async streamCompletion(t){if(!t.stream)throw new Error("The SDK only supports streaming");return await this.#e.postStream({path:`chats/${this.#t}/chat/completions`,body:t})}}class vB{config;httpRequest;#e;get tasks(){return this.#e}#t;get batches(){return this.#t}#n;constructor(t){this.config=t,this.httpRequest=new K0(t),this.#e=new Y0(this.httpRequest,t.defaultWaitOptions),this.#t=new CB(this.httpRequest),this.#n=X0(this.httpRequest,this.tasks)}index(t){return new xa(this.config,t)}async getIndex(t){return new xa(this.config,t).fetchInfo()}async getRawIndex(t){return new xa(this.config,t).getRawInfo()}async getIndexes(t){const n=await this.getRawIndexes(t),r=n.results.map(s=>new xa(this.config,s.uid,s.primaryKey));return{...n,results:r}}async getRawIndexes(t){return await this.httpRequest.get({path:"indexes",params:t})}createIndex(t,n){return xa.create(t,n,this.config)}updateIndex(t,n){return new xa(this.config,t).update(n)}deleteIndex(t){return new xa(this.config,t).delete()}async deleteIndexIfExists(t){try{return await this.deleteIndex(t),!0}catch(n){if(n?.cause?.code===fB.INDEX_NOT_FOUND)return!1;throw n}}swapIndexes(t){return this.#n.post({path:"/swap-indexes",body:t})}async multiSearch(t,n){return await this.httpRequest.post({path:"multi-search",body:t,extraRequestInit:n})}chat(t){return new xB(this.httpRequest,t)}async getChatWorkspaces(){return await this.httpRequest.get({path:"chats"})}async getWebhooks(){return await this.httpRequest.get({path:"webhooks"})}async getWebhook(t){return await this.httpRequest.get({path:`webhooks/${t}`})}async createWebhook(t){return await this.httpRequest.post({path:"webhooks",body:t})}async updateWebhook(t,n){return await this.httpRequest.patch({path:`webhooks/${t}`,body:n})}async deleteWebhook(t){await this.httpRequest.delete({path:`webhooks/${t}`})}async getNetwork(){return await this.httpRequest.get({path:"network"})}async updateNetwork(t){return await this.httpRequest.patch({path:"network",body:t})}async getKeys(t){const n=await this.httpRequest.get({path:"keys",params:t});return n.results=n.results.map(r=>({...r,createdAt:new Date(r.createdAt),updatedAt:new Date(r.updatedAt)})),n}async getKey(t){return await this.httpRequest.get({path:`keys/${t}`})}async createKey(t){return await this.httpRequest.post({path:"keys",body:t})}async updateKey(t,n){return await this.httpRequest.patch({path:`keys/${t}`,body:n})}async deleteKey(t){await this.httpRequest.delete({path:`keys/${t}`})}async health(){return await this.httpRequest.get({path:"health"})}async isHealthy(){try{const{status:t}=await this.health();return t==="available"}catch{return!1}}async getStats(){return await this.httpRequest.get({path:"stats"})}async getVersion(){return await this.httpRequest.get({path:"version"})}createDump(){return this.#n.post({path:"dumps"})}createSnapshot(){return this.#n.post({path:"snapshots"})}async getExperimentalFeatures(){return await this.httpRequest.get({path:"experimental-features"})}async updateExperimentalFeatures(t){return await this.httpRequest.patch({path:"experimental-features",body:t})}}var jt;(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(jt||(jt={}));function TB(e){return e.type===jt.Tag||e.type===jt.Script||e.type===jt.Style}const Fb=jt.Root,Kv=jt.Text,SB=jt.Directive,Yv=jt.Comment,_B=jt.Script,wB=jt.Style,Q0=jt.Tag,AB=jt.CDATA,kB=jt.Doctype;let Xv=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Eu(this,t)}};class zb extends Xv{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class yu extends zb{constructor(){super(...arguments),this.type=jt.Text}get nodeType(){return 3}}class Ub extends zb{constructor(){super(...arguments),this.type=jt.Comment}get nodeType(){return 8}}class $b extends zb{constructor(t,n){super(n),this.name=t,this.type=jt.Directive}get nodeType(){return 1}}class Hb extends Xv{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}}class Qv extends Hb{constructor(){super(...arguments),this.type=jt.CDATA}get nodeType(){return 4}}class Eo extends Hb{constructor(){super(...arguments),this.type=jt.Root}get nodeType(){return 9}}let qb=class extends Hb{constructor(t,n,r=[],s=t==="script"?jt.Script:t==="style"?jt.Style:jt.Tag){super(r),this.name=t,this.attribs=n,this.type=s}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var n,r;return{name:t,value:this.attribs[t],namespace:(n=this["x-attribsNamespace"])===null||n===void 0?void 0:n[t],prefix:(r=this["x-attribsPrefix"])===null||r===void 0?void 0:r[t]}})}};function dt(e){return TB(e)}function Eh(e){return e.type===jt.CDATA}function ui(e){return e.type===jt.Text}function Ch(e){return e.type===jt.Comment}function Z0(e){return e.type===jt.Directive}function ga(e){return e.type===jt.Root}function Wn(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Eu(e,t=!1){let n;if(ui(e))n=new yu(e.data);else if(Ch(e))n=new Ub(e.data);else if(dt(e)){const r=t?im(e.children):[],s=new qb(e.name,{...e.attribs},r);r.forEach(i=>i.parent=s),e.namespace!=null&&(s.namespace=e.namespace),e["x-attribsNamespace"]&&(s["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(s["x-attribsPrefix"]={...e["x-attribsPrefix"]}),n=s}else if(Eh(e)){const r=t?im(e.children):[],s=new Qv(r);r.forEach(i=>i.parent=s),n=s}else if(ga(e)){const r=t?im(e.children):[],s=new Eo(r);r.forEach(i=>i.parent=s),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else if(Z0(e)){const r=new $b(e.name,e.data);e["x-name"]!=null&&(r["x-name"]=e["x-name"],r["x-publicId"]=e["x-publicId"],r["x-systemId"]=e["x-systemId"]),n=r}else throw new Error(`Not implemented yet: ${e.type}`);return n.startIndex=e.startIndex,n.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function im(e){const t=e.map(n=>Eu(n,!0));for(let n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}const IE={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class IB{constructor(t,n,r){this.dom=[],this.root=new Eo(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof n=="function"&&(r=n,n=IE),typeof t=="object"&&(n=t,t=void 0),this.callback=t??null,this.options=n??IE,this.elementCB=r??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new Eo(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null}onend(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))}onerror(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;const t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,n){const r=this.options.xmlMode?jt.Tag:void 0,s=new qb(t,n,void 0,r);this.addNode(s),this.tagStack.push(s)}ontext(t){const{lastNode:n}=this;if(n&&n.type===jt.Text)n.data+=t,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{const r=new yu(t);this.addNode(r),this.lastNode=r}}oncomment(t){if(this.lastNode&&this.lastNode.type===jt.Comment){this.lastNode.data+=t;return}const n=new Ub(t);this.addNode(n),this.lastNode=n}oncommentend(){this.lastNode=null}oncdatastart(){const t=new yu(""),n=new Qv([t]);this.addNode(n),t.parent=n,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,n){const r=new $b(t,n);this.addNode(r)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){const n=this.tagStack[this.tagStack.length-1],r=n.children[n.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),n.children.push(t),r&&(t.prev=r,r.next=t),t.parent=n,this.lastNode=null}}const RE=/["&'<>$\x80-\uFFFF]/g,RB=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),BB=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function Zv(e){let t="",n=0,r;for(;(r=RE.exec(e))!==null;){const s=r.index,i=e.charCodeAt(s),a=RB.get(i);a!==void 0?(t+=e.substring(n,s)+a,n=s+1):(t+=`${e.substring(n,s)}&#x${BB(e,s).toString(16)};`,n=RE.lastIndex+=+((i&64512)===55296))}return t+e.substr(n)}function Jv(e,t){return function(r){let s,i=0,a="";for(;s=e.exec(r);)i!==s.index&&(a+=r.substring(i,s.index)),a+=t.get(s[0].charCodeAt(0)),i=s.index+1;return a+r.substring(i)}}const PB=Jv(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),NB=Jv(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),OB=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),DB=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),LB=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function MB(e){return e.replace(/"/g,"&quot;")}function FB(e,t){var n;if(!e)return;const r=((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)===!1?MB:t.xmlMode||t.encodeEntities!=="utf8"?Zv:PB;return Object.keys(e).map(s=>{var i,a;const o=(i=e[s])!==null&&i!==void 0?i:"";return t.xmlMode==="foreign"&&(s=(a=DB.get(s))!==null&&a!==void 0?a:s),!t.emptyAttrs&&!t.xmlMode&&o===""?s:`${s}="${r(o)}"`}).join(" ")}const BE=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function xh(e,t={}){const n="length"in e?e:[e];let r="";for(let s=0;s<n.length;s++)r+=zB(n[s],t);return r}function zB(e,t){switch(e.type){case Fb:return xh(e.children,t);case kB:case SB:return qB(e);case Yv:return GB(e);case AB:return WB(e);case _B:case wB:case Q0:return HB(e,t);case Kv:return jB(e,t)}}const UB=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),$B=new Set(["svg","math"]);function HB(e,t){var n;t.xmlMode==="foreign"&&(e.name=(n=OB.get(e.name))!==null&&n!==void 0?n:e.name,e.parent&&UB.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&$B.has(e.name)&&(t={...t,xmlMode:"foreign"});let r=`<${e.name}`;const s=FB(e.attribs,t);return s&&(r+=` ${s}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&BE.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=xh(e.children,t)),(t.xmlMode||!BE.has(e.name))&&(r+=`</${e.name}>`)),r}function qB(e){return`<${e.data}>`}function jB(e,t){var n;let r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&LB.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?Zv(r):NB(r)),r}function WB(e){return`<![CDATA[${e.children[0].data}]]>`}function GB(e){return`<!--${e.data}-->`}function eT(e,t){return xh(e,t)}function VB(e,t){return Wn(e)?e.children.map(n=>eT(n,t)).join(""):""}function Nd(e){return Array.isArray(e)?e.map(Nd).join(""):dt(e)?e.name==="br"?`
1534
+ `:Nd(e.children):Eh(e)?Nd(e.children):ui(e)?e.data:""}function Vc(e){return Array.isArray(e)?e.map(Vc).join(""):Wn(e)&&!Ch(e)?Vc(e.children):ui(e)?e.data:""}function If(e){return Array.isArray(e)?e.map(If).join(""):Wn(e)&&(e.type===jt.Tag||Eh(e))?If(e.children):ui(e)?e.data:""}function vh(e){return Wn(e)?e.children:[]}function tT(e){return e.parent||null}function nT(e){const t=tT(e);if(t!=null)return vh(t);const n=[e];let{prev:r,next:s}=e;for(;r!=null;)n.unshift(r),{prev:r}=r;for(;s!=null;)n.push(s),{next:s}=s;return n}function KB(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}function YB(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function XB(e){return e.name}function jb(e){let{next:t}=e;for(;t!==null&&!dt(t);)({next:t}=t);return t}function Wb(e){let{prev:t}=e;for(;t!==null&&!dt(t);)({prev:t}=t);return t}function ko(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function QB(e,t){const n=t.prev=e.prev;n&&(n.next=t);const r=t.next=e.next;r&&(r.prev=t);const s=t.parent=e.parent;if(s){const i=s.children;i[i.lastIndexOf(e)]=t,e.parent=null}}function ZB(e,t){if(ko(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function JB(e,t){ko(t);const{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){const s=n.children;s.splice(s.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function e6(e,t){if(ko(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function t6(e,t){ko(t);const{parent:n}=e;if(n){const r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function Du(e,t,n=!0,r=1/0){return Gb(e,Array.isArray(t)?t:[t],n,r)}function Gb(e,t,n,r){const s=[],i=[Array.isArray(t)?t:[t]],a=[0];for(;;){if(a[0]>=i[0].length){if(a.length===1)return s;i.shift(),a.shift();continue}const o=i[0][a[0]++];if(e(o)&&(s.push(o),--r<=0))return s;n&&Wn(o)&&o.children.length>0&&(a.unshift(0),i.unshift(o.children))}}function n6(e,t){return t.find(e)}function Vb(e,t,n=!0){const r=Array.isArray(t)?t:[t];for(let s=0;s<r.length;s++){const i=r[s];if(dt(i)&&e(i))return i;if(n&&Wn(i)&&i.children.length>0){const a=Vb(e,i.children,!0);if(a)return a}}return null}function rT(e,t){return(Array.isArray(t)?t:[t]).some(n=>dt(n)&&e(n)||Wn(n)&&rT(e,n.children))}function r6(e,t){const n=[],r=[Array.isArray(t)?t:[t]],s=[0];for(;;){if(s[0]>=r[0].length){if(r.length===1)return n;r.shift(),s.shift();continue}const i=r[0][s[0]++];dt(i)&&e(i)&&n.push(i),Wn(i)&&i.children.length>0&&(s.unshift(0),r.unshift(i.children))}}const Rf={tag_name(e){return typeof e=="function"?t=>dt(t)&&e(t.name):e==="*"?dt:t=>dt(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>ui(t)&&e(t.data):t=>ui(t)&&t.data===e}};function Kb(e,t){return typeof t=="function"?n=>dt(n)&&t(n.attribs[e]):n=>dt(n)&&n.attribs[e]===t}function s6(e,t){return n=>e(n)||t(n)}function sT(e){const t=Object.keys(e).map(n=>{const r=e[n];return Object.prototype.hasOwnProperty.call(Rf,n)?Rf[n](r):Kb(n,r)});return t.length===0?null:t.reduce(s6)}function i6(e,t){const n=sT(e);return n?n(t):!0}function a6(e,t,n,r=1/0){const s=sT(e);return s?Du(s,t,n,r):[]}function o6(e,t,n=!0){return Array.isArray(t)||(t=[t]),Vb(Kb("id",e),t,n)}function al(e,t,n=!0,r=1/0){return Du(Rf.tag_name(e),t,n,r)}function c6(e,t,n=!0,r=1/0){return Du(Kb("class",e),t,n,r)}function l6(e,t,n=!0,r=1/0){return Du(Rf.tag_type(e),t,n,r)}function u6(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0){e.splice(t,1);continue}for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var ws;(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})(ws||(ws={}));function iT(e,t){const n=[],r=[];if(e===t)return 0;let s=Wn(e)?e:e.parent;for(;s;)n.unshift(s),s=s.parent;for(s=Wn(t)?t:t.parent;s;)r.unshift(s),s=s.parent;const i=Math.min(n.length,r.length);let a=0;for(;a<i&&n[a]===r[a];)a++;if(a===0)return ws.DISCONNECTED;const o=n[a-1],c=o.children,l=n[a],d=r[a];return c.indexOf(l)>c.indexOf(d)?o===t?ws.FOLLOWING|ws.CONTAINED_BY:ws.FOLLOWING:o===e?ws.PRECEDING|ws.CONTAINS:ws.PRECEDING}function ol(e){return e=e.filter((t,n,r)=>!r.includes(t,n+1)),e.sort((t,n)=>{const r=iT(t,n);return r&ws.PRECEDING?-1:r&ws.FOLLOWING?1:0}),e}function d6(e){const t=Bf(b6,e);return t?t.name==="feed"?f6(t):h6(t):null}function f6(e){var t;const n=e.children,r={type:"atom",items:al("entry",n).map(a=>{var o;const{children:c}=a,l={media:aT(c)};Jr(l,"id","id",c),Jr(l,"title","title",c);const d=(o=Bf("link",c))===null||o===void 0?void 0:o.attribs.href;d&&(l.link=d);const f=Ki("summary",c)||Ki("content",c);f&&(l.description=f);const m=Ki("updated",c);return m&&(l.pubDate=new Date(m)),l})};Jr(r,"id","id",n),Jr(r,"title","title",n);const s=(t=Bf("link",n))===null||t===void 0?void 0:t.attribs.href;s&&(r.link=s),Jr(r,"description","subtitle",n);const i=Ki("updated",n);return i&&(r.updated=new Date(i)),Jr(r,"author","email",n,!0),r}function h6(e){var t,n;const r=(n=(t=Bf("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&n!==void 0?n:[],s={type:e.name.substr(0,3),id:"",items:al("item",e.children).map(a=>{const{children:o}=a,c={media:aT(o)};Jr(c,"id","guid",o),Jr(c,"title","title",o),Jr(c,"link","link",o),Jr(c,"description","description",o);const l=Ki("pubDate",o)||Ki("dc:date",o);return l&&(c.pubDate=new Date(l)),c})};Jr(s,"title","title",r),Jr(s,"link","link",r),Jr(s,"description","description",r);const i=Ki("lastBuildDate",r);return i&&(s.updated=new Date(i)),Jr(s,"author","managingEditor",r,!0),s}const m6=["url","type","lang"],g6=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function aT(e){return al("media:content",e).map(t=>{const{attribs:n}=t,r={medium:n.medium,isDefault:!!n.isDefault};for(const s of m6)n[s]&&(r[s]=n[s]);for(const s of g6)n[s]&&(r[s]=parseInt(n[s],10));return n.expression&&(r.expression=n.expression),r})}function Bf(e,t){return al(e,t,!0,1)[0]}function Ki(e,t,n=!1){return Vc(al(e,t,n,1)).trim()}function Jr(e,t,n,r,s=!1){const i=Ki(n,r,s);i&&(e[t]=i)}function b6(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const Th=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return ws},append:JB,appendChild:ZB,compareDocumentPosition:iT,existsOne:rT,filter:Du,find:Gb,findAll:r6,findOne:Vb,findOneChild:n6,getAttributeValue:KB,getChildren:vh,getElementById:o6,getElements:a6,getElementsByClassName:c6,getElementsByTagName:al,getElementsByTagType:l6,getFeed:d6,getInnerHTML:VB,getName:XB,getOuterHTML:eT,getParent:tT,getSiblings:nT,getText:Nd,hasAttrib:YB,hasChildren:Wn,innerText:If,isCDATA:Eh,isComment:Ch,isDocument:ga,isTag:dt,isText:ui,nextElementSibling:jb,prepend:t6,prependChild:e6,prevElementSibling:Wb,removeElement:ko,removeSubsets:u6,replaceElement:QB,testElement:i6,textContent:Vc,uniqueSort:ol},Symbol.toStringTag,{value:"Module"})),p6={_useHtmlParser2:!1};function J0(e,t){if(!e)return t??p6;const n={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(n._useHtmlParser2=!0,n.xmlMode=!0,e.xml!==!0&&Object.assign(n,e.xml)):e.xmlMode&&(n._useHtmlParser2=!0),n}function oT(e,t,n){return e?e(t??e._root.children,null,void 0,n).toString():""}function y6(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function E6(e,t){const n=y6(e)?(t=e,void 0):e,r={...this===null||this===void 0?void 0:this._options,...J0(t)};return oT(this,n,r)}function C6(e){const t={...this._options,xmlMode:!0};return oT(this,e,t)}function Cu(e){const t=e??(this?this.root():[]);let n="";for(let r=0;r<t.length;r++)n+=Vc(t[r]);return n}function x6(e,t,n=typeof t=="boolean"?t:!1){if(!e||typeof e!="string")return null;typeof t=="boolean"&&(n=t);const r=this.load(e,this._options,!1);return n||r("script").remove(),[...r.root()[0].children]}function v6(){return this(this._root)}function cT(e,t){if(t===e)return!1;let n=t;for(;n&&n!==n.parent;)if(n=n.parent,n===e)return!0;return!1}function T6(e){return this.root().extract(e)}function S6(e,t){if(!PE(e)||!PE(t))return;let n=e.length;const r=+t.length;for(let s=0;s<r;s++)e[n++]=t[s];return e.length=n,e}function PE(e){if(Array.isArray(e))return!0;if(typeof e!="object"||e===null||!("length"in e)||typeof e.length!="number"||e.length<0)return!1;for(let t=0;t<e.length;t++)if(!(t in e))return!1;return!0}const _6=Object.freeze(Object.defineProperty({__proto__:null,contains:cT,extract:T6,html:E6,merge:S6,parseHTML:x6,root:v6,text:Cu,xml:C6},Symbol.toStringTag,{value:"Module"}));function _i(e){return e.cheerio!=null}function w6(e){return e.replace(/[._-](\w|$)/g,(t,n)=>n.toUpperCase())}function A6(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Nn(e,t){const n=e.length;for(let r=0;r<n;r++)t(e[r],r);return e}var wa;(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(wa||(wa={}));function eg(e){const t=e.indexOf("<");if(t===-1||t>e.length-3)return!1;const n=e.charCodeAt(t+1);return(n>=wa.LowerA&&n<=wa.LowerZ||n>=wa.UpperA&&n<=wa.UpperZ||n===wa.Exclamation)&&e.includes(">",t+2)}const lT=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),k6=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var am;const I6=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),NE=(am=String.fromCodePoint)!==null&&am!==void 0?am:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function R6(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=I6.get(e))!==null&&t!==void 0?t:e}var gr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(gr||(gr={}));const B6=32;var Yi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Yi||(Yi={}));function tg(e){return e>=gr.ZERO&&e<=gr.NINE}function P6(e){return e>=gr.UPPER_A&&e<=gr.UPPER_F||e>=gr.LOWER_A&&e<=gr.LOWER_F}function N6(e){return e>=gr.UPPER_A&&e<=gr.UPPER_Z||e>=gr.LOWER_A&&e<=gr.LOWER_Z||tg(e)}function O6(e){return e===gr.EQUALS||N6(e)}var fr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(fr||(fr={}));var ks;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ks||(ks={}));class uT{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=fr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ks.Strict}startEntity(t){this.decodeMode=t,this.state=fr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case fr.EntityStart:return t.charCodeAt(n)===gr.NUM?(this.state=fr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=fr.NamedEntity,this.stateNamedEntity(t,n));case fr.NumericStart:return this.stateNumericStart(t,n);case fr.NumericDecimal:return this.stateNumericDecimal(t,n);case fr.NumericHex:return this.stateNumericHex(t,n);case fr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|B6)===gr.LOWER_X?(this.state=fr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=fr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const i=r-n;this.result=this.result*Math.pow(s,i)+Number.parseInt(t.substr(n,i),s),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(tg(s)||P6(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(tg(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===gr.SEMI)this.consumed+=1;else if(this.decodeMode===ks.Strict)return 0;return this.emitCodePoint(R6(this.result),this.consumed),this.errors&&(t!==gr.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],i=(s&Yi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=D6(r,s,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===ks.Attribute&&(i===0||O6(a))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],i=(s&Yi.VALUE_LENGTH)>>14,i!==0){if(a===gr.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==ks.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&Yi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~Yi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case fr.NamedEntity:return this.result!==0&&(this.decodeMode!==ks.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case fr.NumericDecimal:return this.emitNumericEntity(0,2);case fr.NumericHex:return this.emitNumericEntity(0,3);case fr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case fr.EntityStart:return 0}}}function D6(e,t,n,r){const s=(t&Yi.BRANCH_LENGTH)>>7,i=t&Yi.JUMP_TABLE;if(s===0)return i!==0&&r===i?n:-1;if(i){const c=r-i;return c<0||c>=s?-1:e[n+c]-1}let a=n,o=a+s-1;for(;a<=o;){const c=a+o>>>1,l=e[c];if(l<r)a=c+1;else if(l>r)o=c-1;else return e[c+s]}return-1}var lt;(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(lt||(lt={}));var Ae;(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(Ae||(Ae={}));function vi(e){return e===lt.Space||e===lt.NewLine||e===lt.Tab||e===lt.FormFeed||e===lt.CarriageReturn}function ud(e){return e===lt.Slash||e===lt.Gt||vi(e)}function L6(e){return e>=lt.LowerA&&e<=lt.LowerZ||e>=lt.UpperA&&e<=lt.UpperZ}var ii;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(ii||(ii={}));const Gn={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97]),XmpEnd:new Uint8Array([60,47,120,109,112])};let M6=class{constructor({xmlMode:t=!1,decodeEntities:n=!0},r){this.cbs=r,this.state=Ae.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=Ae.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=n,this.entityDecoder=new uT(t?k6:lT,(s,i)=>this.emitCodePoint(s,i))}reset(){this.state=Ae.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=Ae.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()}stateText(t){t===lt.Lt||!this.decodeEntities&&this.fastForwardTo(lt.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=Ae.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===lt.Amp&&this.startEntity()}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?ud(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=Ae.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===lt.Gt||vi(t)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const r=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=r}this.isSpecial=!1,this.sectionStart=n+2,this.stateInClosingTagName(t);return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===Gn.TitleEnd?this.decodeEntities&&t===lt.Amp&&this.startEntity():this.fastForwardTo(lt.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===lt.Lt)}stateCDATASequence(t){t===Gn.Cdata[this.sequenceIndex]?++this.sequenceIndex===Gn.Cdata.length&&(this.state=Ae.InCommentLike,this.currentSequence=Gn.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=Ae.InDeclaration,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===t)return!0;return this.index=this.buffer.length+this.offset-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Gn.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=Ae.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}isTagStartChar(t){return this.xmlMode?!ud(t):L6(t)}startSpecial(t,n){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=n,this.state=Ae.SpecialStartSequence}stateBeforeTagName(t){if(t===lt.ExclamationMark)this.state=Ae.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===lt.Questionmark)this.state=Ae.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const n=t|32;this.sectionStart=this.index,this.xmlMode?this.state=Ae.InTagName:n===Gn.ScriptEnd[2]?this.state=Ae.BeforeSpecialS:n===Gn.TitleEnd[2]||n===Gn.XmpEnd[2]?this.state=Ae.BeforeSpecialT:this.state=Ae.InTagName}else t===lt.Slash?this.state=Ae.BeforeClosingTagName:(this.state=Ae.Text,this.stateText(t))}stateInTagName(t){ud(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=Ae.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){vi(t)||(t===lt.Gt?this.state=Ae.Text:(this.state=this.isTagStartChar(t)?Ae.InClosingTagName:Ae.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===lt.Gt||vi(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=Ae.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.state=Ae.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===lt.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=Ae.InSpecialTag,this.sequenceIndex=0):this.state=Ae.Text,this.sectionStart=this.index+1):t===lt.Slash?this.state=Ae.InSelfClosingTag:vi(t)||(this.state=Ae.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===lt.Gt?(this.cbs.onselfclosingtag(this.index),this.state=Ae.Text,this.sectionStart=this.index+1,this.isSpecial=!1):vi(t)||(this.state=Ae.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===lt.Eq||ud(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=Ae.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===lt.Eq?this.state=Ae.BeforeAttributeValue:t===lt.Slash||t===lt.Gt?(this.cbs.onattribend(ii.NoValue,this.sectionStart),this.sectionStart=-1,this.state=Ae.BeforeAttributeName,this.stateBeforeAttributeName(t)):vi(t)||(this.cbs.onattribend(ii.NoValue,this.sectionStart),this.state=Ae.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===lt.DoubleQuote?(this.state=Ae.InAttributeValueDq,this.sectionStart=this.index+1):t===lt.SingleQuote?(this.state=Ae.InAttributeValueSq,this.sectionStart=this.index+1):vi(t)||(this.sectionStart=this.index,this.state=Ae.InAttributeValueNq,this.stateInAttributeValueNoQuotes(t))}handleInAttributeValue(t,n){t===n||!this.decodeEntities&&this.fastForwardTo(n)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===lt.DoubleQuote?ii.Double:ii.Single,this.index+1),this.state=Ae.BeforeAttributeName):this.decodeEntities&&t===lt.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,lt.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,lt.SingleQuote)}stateInAttributeValueNoQuotes(t){vi(t)||t===lt.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(ii.Unquoted,this.index),this.state=Ae.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===lt.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===lt.OpeningSquareBracket?(this.state=Ae.CDATASequence,this.sequenceIndex=0):this.state=t===lt.Dash?Ae.BeforeComment:Ae.InDeclaration}stateInDeclaration(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=Ae.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=Ae.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===lt.Dash?(this.state=Ae.InCommentLike,this.currentSequence=Gn.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=Ae.InDeclaration}stateInSpecialComment(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=Ae.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const n=t|32;n===Gn.ScriptEnd[3]?this.startSpecial(Gn.ScriptEnd,4):n===Gn.StyleEnd[3]?this.startSpecial(Gn.StyleEnd,4):(this.state=Ae.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){switch(t|32){case Gn.TitleEnd[3]:{this.startSpecial(Gn.TitleEnd,4);break}case Gn.TextareaEnd[3]:{this.startSpecial(Gn.TextareaEnd,4);break}case Gn.XmpEnd[3]:{this.startSpecial(Gn.XmpEnd,4);break}default:this.state=Ae.InTagName,this.stateInTagName(t)}}startEntity(){this.baseState=this.state,this.state=Ae.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?ks.Strict:this.baseState===Ae.Text||this.baseState===Ae.InSpecialTag?ks.Legacy:ks.Attribute)}stateInEntity(){const t=this.entityDecoder.write(this.buffer,this.index-this.offset);t>=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===Ae.Text||this.state===Ae.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===Ae.InAttributeValueDq||this.state===Ae.InAttributeValueSq||this.state===Ae.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index<this.buffer.length+this.offset&&this.running}parse(){for(;this.shouldContinue();){const t=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case Ae.Text:{this.stateText(t);break}case Ae.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case Ae.InSpecialTag:{this.stateInSpecialTag(t);break}case Ae.CDATASequence:{this.stateCDATASequence(t);break}case Ae.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case Ae.InAttributeName:{this.stateInAttributeName(t);break}case Ae.InCommentLike:{this.stateInCommentLike(t);break}case Ae.InSpecialComment:{this.stateInSpecialComment(t);break}case Ae.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case Ae.InTagName:{this.stateInTagName(t);break}case Ae.InClosingTagName:{this.stateInClosingTagName(t);break}case Ae.BeforeTagName:{this.stateBeforeTagName(t);break}case Ae.AfterAttributeName:{this.stateAfterAttributeName(t);break}case Ae.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case Ae.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case Ae.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case Ae.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case Ae.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case Ae.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case Ae.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case Ae.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case Ae.InDeclaration:{this.stateInDeclaration(t);break}case Ae.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case Ae.BeforeComment:{this.stateBeforeComment(t);break}case Ae.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case Ae.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===Ae.InEntity&&(this.entityDecoder.end(),this.state=this.baseState),this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length+this.offset;this.sectionStart>=t||(this.state===Ae.InCommentLike?this.currentSequence===Gn.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===Ae.InTagName||this.state===Ae.BeforeAttributeName||this.state===Ae.BeforeAttributeValue||this.state===Ae.AfterAttributeName||this.state===Ae.InAttributeName||this.state===Ae.InAttributeValueSq||this.state===Ae.InAttributeValueDq||this.state===Ae.InAttributeValueNq||this.state===Ae.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){this.baseState!==Ae.Text&&this.baseState!==Ae.InSpecialTag?(this.sectionStart<this.entityStart&&this.cbs.onattribdata(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.onattribentity(t)):(this.sectionStart<this.entityStart&&this.cbs.ontext(this.sectionStart,this.entityStart),this.sectionStart=this.entityStart+n,this.index=this.sectionStart-1,this.cbs.ontextentity(t,this.sectionStart))}};const Ko=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Jt=new Set(["p"]),OE=new Set(["thead","tbody"]),DE=new Set(["dd","dt"]),LE=new Set(["rt","rp"]),F6=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Jt],["h1",Jt],["h2",Jt],["h3",Jt],["h4",Jt],["h5",Jt],["h6",Jt],["select",Ko],["input",Ko],["output",Ko],["button",Ko],["datalist",Ko],["textarea",Ko],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",DE],["dt",DE],["address",Jt],["article",Jt],["aside",Jt],["blockquote",Jt],["details",Jt],["div",Jt],["dl",Jt],["fieldset",Jt],["figcaption",Jt],["figure",Jt],["footer",Jt],["form",Jt],["header",Jt],["hr",Jt],["main",Jt],["nav",Jt],["ol",Jt],["pre",Jt],["section",Jt],["table",Jt],["ul",Jt],["rt",LE],["rp",LE],["tbody",OE],["tfoot",OE]]),z6=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),ME=new Set(["math","svg"]),FE=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),U6=/\s|\//;let $6=class{constructor(t,n={}){var r,s,i,a,o,c;this.options=n,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(r=n.lowerCaseTags)!==null&&r!==void 0?r:this.htmlMode,this.lowerCaseAttributeNames=(s=n.lowerCaseAttributeNames)!==null&&s!==void 0?s:this.htmlMode,this.recognizeSelfClosing=(i=n.recognizeSelfClosing)!==null&&i!==void 0?i:!this.htmlMode,this.tokenizer=new((a=n.Tokenizer)!==null&&a!==void 0?a:M6)(this.options,this),this.foreignContext=[!this.htmlMode],(c=(o=this.cbs).onparserinit)===null||c===void 0||c.call(o,this)}ontext(t,n){var r,s;const i=this.getSlice(t,n);this.endIndex=n-1,(s=(r=this.cbs).ontext)===null||s===void 0||s.call(r,i),this.startIndex=n}ontextentity(t,n){var r,s;this.endIndex=n-1,(s=(r=this.cbs).ontext)===null||s===void 0||s.call(r,NE(t)),this.startIndex=n}isVoidElement(t){return this.htmlMode&&z6.has(t)}onopentagname(t,n){this.endIndex=n;let r=this.getSlice(t,n);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)}emitOpenTag(t){var n,r,s,i;this.openTagStart=this.startIndex,this.tagname=t;const a=this.htmlMode&&F6.get(t);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){const o=this.stack.shift();(r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,o,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(ME.has(t)?this.foreignContext.unshift(!0):FE.has(t)&&this.foreignContext.unshift(!1))),(i=(s=this.cbs).onopentagname)===null||i===void 0||i.call(s,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var n,r;this.startIndex=this.openTagStart,this.attribs&&((r=(n=this.cbs).onopentag)===null||r===void 0||r.call(n,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,n){var r,s,i,a,o,c,l,d;this.endIndex=n;let f=this.getSlice(t,n);if(this.lowerCaseTagNames&&(f=f.toLowerCase()),this.htmlMode&&(ME.has(f)||FE.has(f))&&this.foreignContext.shift(),this.isVoidElement(f))this.htmlMode&&f==="br"&&((a=(i=this.cbs).onopentagname)===null||a===void 0||a.call(i,"br"),(c=(o=this.cbs).onopentag)===null||c===void 0||c.call(o,"br",{},!0),(d=(l=this.cbs).onclosetag)===null||d===void 0||d.call(l,"br",!1));else{const m=this.stack.indexOf(f);if(m!==-1)for(let h=0;h<=m;h++){const g=this.stack.shift();(s=(r=this.cbs).onclosetag)===null||s===void 0||s.call(r,g,h!==m)}else this.htmlMode&&f==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=n+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var n,r;const s=this.tagname;this.endOpenTag(t),this.stack[0]===s&&((r=(n=this.cbs).onclosetag)===null||r===void 0||r.call(n,s,!t),this.stack.shift())}onattribname(t,n){this.startIndex=t;const r=this.getSlice(t,n);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r}onattribdata(t,n){this.attribvalue+=this.getSlice(t,n)}onattribentity(t){this.attribvalue+=NE(t)}onattribend(t,n){var r,s;this.endIndex=n,(s=(r=this.cbs).onattribute)===null||s===void 0||s.call(r,this.attribname,this.attribvalue,t===ii.Double?'"':t===ii.Single?"'":t===ii.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){const n=t.search(U6);let r=n<0?t:t.substr(0,n);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r}ondeclaration(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const s=this.getInstructionName(r);this.cbs.onprocessinginstruction(`!${s}`,`!${r}`)}this.startIndex=n+1}onprocessinginstruction(t,n){this.endIndex=n;const r=this.getSlice(t,n);if(this.cbs.onprocessinginstruction){const s=this.getInstructionName(r);this.cbs.onprocessinginstruction(`?${s}`,`?${r}`)}this.startIndex=n+1}oncomment(t,n,r){var s,i,a,o;this.endIndex=n,(i=(s=this.cbs).oncomment)===null||i===void 0||i.call(s,this.getSlice(t,n-r)),(o=(a=this.cbs).oncommentend)===null||o===void 0||o.call(a),this.startIndex=n+1}oncdata(t,n,r){var s,i,a,o,c,l,d,f,m,h;this.endIndex=n;const g=this.getSlice(t,n-r);!this.htmlMode||this.options.recognizeCDATA?((i=(s=this.cbs).oncdatastart)===null||i===void 0||i.call(s),(o=(a=this.cbs).ontext)===null||o===void 0||o.call(a,g),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,`[CDATA[${g}]]`),(h=(m=this.cbs).oncommentend)===null||h===void 0||h.call(m)),this.startIndex=n+1}onend(){var t,n;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let r=0;r<this.stack.length;r++)this.cbs.onclosetag(this.stack[r],!0)}(n=(t=this.cbs).onend)===null||n===void 0||n.call(t)}reset(){var t,n,r,s;(n=(t=this.cbs).onreset)===null||n===void 0||n.call(t),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(s=(r=this.cbs).onparserinit)===null||s===void 0||s.call(r,this),this.buffers.length=0,this.foreignContext.length=0,this.foreignContext.unshift(!this.htmlMode),this.bufferOffset=0,this.writeIndex=0,this.ended=!1}parseComplete(t){this.reset(),this.end(t)}getSlice(t,n){for(;t-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();let r=this.buffers[0].slice(t-this.bufferOffset,n-this.bufferOffset);for(;n-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,n-this.bufferOffset);return r}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var n,r;if(this.ended){(r=(n=this.cbs).onerror)===null||r===void 0||r.call(n,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()}parseChunk(t){this.write(t)}done(t){this.end(t)}};function H6(e,t){const n=new IB(void 0,t);return new $6(n,t).end(e),n.root}var om;const xu=(om=Object.hasOwn)!==null&&om!==void 0?om:((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),vu=/\s+/,ng="data-",Yb=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,q6=/^{[^]*}$|^\[[^]*]$/;function Pf(e,t,n){var r;if(!(!e||!dt(e))){if((r=e.attribs)!==null&&r!==void 0||(e.attribs={}),!t)return e.attribs;if(xu(e.attribs,t))return!n&&Yb.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Cu(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function lc(e,t,n){n===null?fT(e,t):e.attribs[t]=`${n}`}function j6(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return Nn(this,(n,r)=>{dt(n)&&lc(n,e,t.call(n,r,n.attribs[e]))})}return Nn(this,n=>{if(dt(n))if(typeof e=="object")for(const r of Object.keys(e)){const s=e[r];lc(n,r,s)}else lc(n,e,t)})}return arguments.length>1?this:Pf(this[0],e,this.options.xmlMode)}function zE(e,t,n){return t in e?e[t]:!n&&Yb.test(t)?Pf(e,t,!1)!==void 0:Pf(e,t,n)}function cm(e,t,n,r){t in e?e[t]=n:lc(e,t,!r&&Yb.test(t)?n?"":null:`${n}`)}function W6(e,t){var n;if(typeof e=="string"&&t===void 0){const r=this[0];if(!r)return;switch(e){case"style":{const s=this.css(),i=Object.keys(s);for(let a=0;a<i.length;a++)s[a]=i[a];return s.length=i.length,s}case"tagName":case"nodeName":return dt(r)?r.name.toUpperCase():void 0;case"href":case"src":{if(!dt(r))return;const s=(n=r.attribs)===null||n===void 0?void 0:n[e];return typeof URL<"u"&&(e==="href"&&(r.tagName==="a"||r.tagName==="link")||e==="src"&&(r.tagName==="img"||r.tagName==="iframe"||r.tagName==="audio"||r.tagName==="video"||r.tagName==="source"))&&s!==void 0&&this.options.baseURI?new URL(s,this.options.baseURI).href:s}case"innerText":return If(r);case"textContent":return Vc(r);case"outerHTML":return r.type===Fb?this.html():this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return dt(r)?zE(r,e,this.options.xmlMode):void 0}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return Nn(this,(r,s)=>{dt(r)&&cm(r,e,t.call(r,s,zE(r,e,this.options.xmlMode)),this.options.xmlMode)})}return Nn(this,r=>{if(dt(r))if(typeof e=="object")for(const s of Object.keys(e)){const i=e[s];cm(r,s,i,this.options.xmlMode)}else cm(r,e,t,this.options.xmlMode)})}}function UE(e,t,n){var r;(r=e.data)!==null&&r!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&n!==void 0&&(e.data[t]=n)}function G6(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(ng))continue;const n=w6(t.slice(ng.length));xu(e.data,n)||(e.data[n]=dT(e.attribs[t]))}return e.data}function V6(e,t){const n=ng+A6(t),r=e.data;if(xu(r,t))return r[t];if(xu(e.attribs,n))return r[t]=dT(e.attribs[n])}function dT(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;const t=Number(e);if(e===String(t))return t;if(q6.test(e))try{return JSON.parse(e)}catch{}return e}function K6(e,t){var n;const r=this[0];if(!r||!dt(r))return;const s=r;return(n=s.data)!==null&&n!==void 0||(s.data={}),e==null?G6(s):typeof e=="object"||t!==void 0?(Nn(this,i=>{dt(i)&&(typeof e=="object"?UE(i,e):UE(i,e,t))}),this):V6(s,e)}function Y6(e){const t=arguments.length===0,n=this[0];if(!n||!dt(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":{const r=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");const s=typeof e=="object"?e:[e];for(const i of s)this.find(`option[value="${i}"]`).attr("selected","");return this}return this.attr("multiple")?r.toArray().map(s=>Cu(s.children)):r.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function fT(e,t){!e.attribs||!xu(e.attribs,t)||delete e.attribs[t]}function Nf(e){return e?e.trim().split(vu):[]}function X6(e){const t=Nf(e);for(const n of t)Nn(this,r=>{dt(r)&&fT(r,n)});return this}function Q6(e){return this.toArray().some(t=>{const n=dt(t)&&t.attribs.class;let r=-1;if(n&&e.length>0)for(;(r=n.indexOf(e,r+1))>-1;){const s=r+e.length;if((r===0||vu.test(n[r-1]))&&(s===n.length||vu.test(n[s])))return!0}return!1})}function hT(e){if(typeof e=="function")return Nn(this,(r,s)=>{if(dt(r)){const i=r.attribs.class||"";hT.call([r],e.call(r,s,i))}});if(!e||typeof e!="string")return this;const t=e.split(vu),n=this.length;for(let r=0;r<n;r++){const s=this[r];if(!dt(s))continue;const i=Pf(s,"class",!1);if(i){let a=` ${i} `;for(const o of t){const c=`${o} `;a.includes(` ${c}`)||(a+=c)}lc(s,"class",a.trim())}else lc(s,"class",t.join(" ").trim())}return this}function mT(e){if(typeof e=="function")return Nn(this,(s,i)=>{dt(s)&&mT.call([s],e.call(s,i,s.attribs.class||""))});const t=Nf(e),n=t.length,r=arguments.length===0;return Nn(this,s=>{if(dt(s))if(r)s.attribs.class="";else{const i=Nf(s.attribs.class);let a=!1;for(let o=0;o<n;o++){const c=i.indexOf(t[o]);c!==-1&&(i.splice(c,1),a=!0,o--)}a&&(s.attribs.class=i.join(" "))}})}function gT(e,t){if(typeof e=="function")return Nn(this,(a,o)=>{dt(a)&&gT.call([a],e.call(a,o,a.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const n=e.split(vu),r=n.length,s=typeof t=="boolean"?t?1:-1:0,i=this.length;for(let a=0;a<i;a++){const o=this[a];if(!dt(o))continue;const c=Nf(o.attribs.class);for(let l=0;l<r;l++){const d=c.indexOf(n[l]);s>=0&&d===-1?c.push(n[l]):s<=0&&d!==-1&&c.splice(d,1)}o.attribs.class=c.join(" ")}return this}const Z6=Object.freeze(Object.defineProperty({__proto__:null,addClass:hT,attr:j6,data:K6,hasClass:Q6,prop:W6,removeAttr:X6,removeClass:mT,toggleClass:gT,val:Y6},Symbol.toStringTag,{value:"Module"}));var at;(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(at||(at={}));var tr;(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(tr||(tr={}));const $E=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,J6=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,eP=new Map([[126,tr.Element],[94,tr.Start],[36,tr.End],[42,tr.Any],[33,tr.Not],[124,tr.Hyphen]]),tP=new Set(["has","not","matches","is","where","host","host-context"]);function Zl(e){switch(e.type){case at.Adjacent:case at.Child:case at.Descendant:case at.Parent:case at.Sibling:case at.ColumnCombinator:return!0;default:return!1}}const nP=new Set(["contains","icontains"]);function rP(e,t,n){const r=parseInt(t,16)-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function $l(e){return e.replace(J6,rP)}function lm(e){return e===39||e===34}function HE(e){return e===32||e===9||e===10||e===12||e===13}function Sh(e){const t=[],n=bT(t,`${e}`,0);if(n<e.length)throw new Error(`Unmatched selector: ${e.slice(n)}`);return t}function bT(e,t,n){let r=[];function s(m){const h=t.slice(n+m).match($E);if(!h)throw new Error(`Expected name, found ${t.slice(n)}`);const[g]=h;return n+=m+g.length,$l(g)}function i(m){for(n+=m;n<t.length&&HE(t.charCodeAt(n));)n++}function a(){n+=1;const m=n;let h=1;for(;h>0&&n<t.length;n++)t.charCodeAt(n)===40&&!o(n)?h++:t.charCodeAt(n)===41&&!o(n)&&h--;if(h)throw new Error("Parenthesis not matched");return $l(t.slice(m,n-1))}function o(m){let h=0;for(;t.charCodeAt(--m)===92;)h++;return(h&1)===1}function c(){if(r.length>0&&Zl(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(m){if(r.length>0&&r[r.length-1].type===at.Descendant){r[r.length-1].type=m;return}c(),r.push({type:m})}function d(m,h){r.push({type:at.Attribute,name:m,action:h,value:s(1),namespace:null,ignoreCase:"quirks"})}function f(){if(r.length&&r[r.length-1].type===at.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");e.push(r)}if(i(0),t.length===n)return n;e:for(;n<t.length;){const m=t.charCodeAt(n);switch(m){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==at.Descendant)&&(c(),r.push({type:at.Descendant})),i(1);break}case 62:{l(at.Child),i(1);break}case 60:{l(at.Parent),i(1);break}case 126:{l(at.Sibling),i(1);break}case 43:{l(at.Adjacent),i(1);break}case 46:{d("class",tr.Element);break}case 35:{d("id",tr.Equals);break}case 91:{i(1);let h,g=null;t.charCodeAt(n)===124?h=s(1):t.startsWith("*|",n)?(g="*",h=s(2)):(h=s(0),t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==61&&(g=h,h=s(1))),i(0);let b=tr.Exists;const p=eP.get(t.charCodeAt(n));if(p){if(b=p,t.charCodeAt(n+1)!==61)throw new Error("Expected `=`");i(2)}else t.charCodeAt(n)===61&&(b=tr.Equals,i(1));let y="",C=null;if(b!=="exists"){if(lm(t.charCodeAt(n))){const S=t.charCodeAt(n);let w=n+1;for(;w<t.length&&(t.charCodeAt(w)!==S||o(w));)w+=1;if(t.charCodeAt(w)!==S)throw new Error("Attribute value didn't end");y=$l(t.slice(n+1,w)),n=w+1}else{const S=n;for(;n<t.length&&(!HE(t.charCodeAt(n))&&t.charCodeAt(n)!==93||o(n));)n+=1;y=$l(t.slice(S,n))}i(0);const T=t.charCodeAt(n)|32;T===115?(C=!1,i(1)):T===105&&(C=!0,i(1))}if(t.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const A={type:at.Attribute,name:h,action:b,value:y,namespace:g,ignoreCase:C};r.push(A);break}case 58:{if(t.charCodeAt(n+1)===58){r.push({type:at.PseudoElement,name:s(2).toLowerCase(),data:t.charCodeAt(n)===40?a():null});continue}const h=s(1).toLowerCase();let g=null;if(t.charCodeAt(n)===40)if(tP.has(h)){if(lm(t.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${h} cannot be quoted`);if(g=[],n=bT(g,t,n+1),t.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${h} (${t})`);n+=1}else{if(g=a(),nP.has(h)){const b=g.charCodeAt(0);b===g.charCodeAt(g.length-1)&&lm(b)&&(g=g.slice(1,-1))}g=$l(g)}r.push({type:at.Pseudo,name:h,data:g});break}case 44:{f(),r=[],i(1);break}default:{if(t.startsWith("/*",n)){const b=t.indexOf("*/",n+2);if(b<0)throw new Error("Comment was not terminated");n=b+2,r.length===0&&i(0);break}let h=null,g;if(m===42)n+=1,g="*";else if(m===124){if(g="",t.charCodeAt(n+1)===124){l(at.ColumnCombinator),i(2);break}}else if($E.test(t.slice(n)))g=s(0);else break e;t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==124&&(h=g,t.charCodeAt(n+1)===42?(g="*",n+=2):g=s(1)),r.push(g==="*"?{type:at.Universal,namespace:h}:{type:at.Tag,name:g,namespace:h})}}}return f(),n}var dd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var um,qE;function sP(){return qE||(qE=1,um={trueFunc:function(){return!0},falseFunc:function(){return!1}}),um}var Of=sP();const kt=pT(Of),yT=new Map([[at.Universal,50],[at.Tag,30],[at.Attribute,1],[at.Pseudo,0]]);function Xb(e){return!yT.has(e.type)}const iP=new Map([[tr.Exists,10],[tr.Equals,8],[tr.Not,7],[tr.Start,6],[tr.End,6],[tr.Any,5]]);function aP(e){const t=e.map(ET);for(let n=1;n<e.length;n++){const r=t[n];if(!(r<0))for(let s=n-1;s>=0&&r<t[s];s--){const i=e[s+1];e[s+1]=e[s],e[s]=i,t[s+1]=t[s],t[s]=r}}}function ET(e){var t,n;let r=(t=yT.get(e.type))!==null&&t!==void 0?t:-1;return e.type===at.Attribute?(r=(n=iP.get(e.action))!==null&&n!==void 0?n:4,e.action===tr.Equals&&e.name==="id"&&(r=9),e.ignoreCase&&(r>>=1)):e.type===at.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?r=0:Array.isArray(e.data)?(r=Math.min(...e.data.map(s=>Math.min(...s.map(ET)))),r<0&&(r=0)):r=2:r=3),r}const oP=/[-[\]{}()*+?.,\\^$|#\s]/g;function jE(e){return e.replace(oP,"\\$&")}const cP=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function va(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&cP.has(e.name)}const lP={equals(e,t,n){const{adapter:r}=n,{name:s}=t;let{value:i}=t;return va(t,n)?(i=i.toLowerCase(),a=>{const o=r.getAttributeValue(a,s);return o!=null&&o.length===i.length&&o.toLowerCase()===i&&e(a)}):a=>r.getAttributeValue(a,s)===i&&e(a)},hyphen(e,t,n){const{adapter:r}=n,{name:s}=t;let{value:i}=t;const a=i.length;return va(t,n)?(i=i.toLowerCase(),function(c){const l=r.getAttributeValue(c,s);return l!=null&&(l.length===a||l.charAt(a)==="-")&&l.substr(0,a).toLowerCase()===i&&e(c)}):function(c){const l=r.getAttributeValue(c,s);return l!=null&&(l.length===a||l.charAt(a)==="-")&&l.substr(0,a)===i&&e(c)}},element(e,t,n){const{adapter:r}=n,{name:s,value:i}=t;if(/\s/.test(i))return kt.falseFunc;const a=new RegExp(`(?:^|\\s)${jE(i)}(?:$|\\s)`,va(t,n)?"i":"");return function(c){const l=r.getAttributeValue(c,s);return l!=null&&l.length>=i.length&&a.test(l)&&e(c)}},exists(e,{name:t},{adapter:n}){return r=>n.hasAttrib(r,t)&&e(r)},start(e,t,n){const{adapter:r}=n,{name:s}=t;let{value:i}=t;const a=i.length;return a===0?kt.falseFunc:va(t,n)?(i=i.toLowerCase(),o=>{const c=r.getAttributeValue(o,s);return c!=null&&c.length>=a&&c.substr(0,a).toLowerCase()===i&&e(o)}):o=>{var c;return!!(!((c=r.getAttributeValue(o,s))===null||c===void 0)&&c.startsWith(i))&&e(o)}},end(e,t,n){const{adapter:r}=n,{name:s}=t;let{value:i}=t;const a=-i.length;return a===0?kt.falseFunc:va(t,n)?(i=i.toLowerCase(),o=>{var c;return((c=r.getAttributeValue(o,s))===null||c===void 0?void 0:c.substr(a).toLowerCase())===i&&e(o)}):o=>{var c;return!!(!((c=r.getAttributeValue(o,s))===null||c===void 0)&&c.endsWith(i))&&e(o)}},any(e,t,n){const{adapter:r}=n,{name:s,value:i}=t;if(i==="")return kt.falseFunc;if(va(t,n)){const a=new RegExp(jE(i),"i");return function(c){const l=r.getAttributeValue(c,s);return l!=null&&l.length>=i.length&&a.test(l)&&e(c)}}return a=>{var o;return!!(!((o=r.getAttributeValue(a,s))===null||o===void 0)&&o.includes(i))&&e(a)}},not(e,t,n){const{adapter:r}=n,{name:s}=t;let{value:i}=t;return i===""?a=>!!r.getAttributeValue(a,s)&&e(a):va(t,n)?(i=i.toLowerCase(),a=>{const o=r.getAttributeValue(a,s);return(o==null||o.length!==i.length||o.toLowerCase()!==i)&&e(a)}):a=>r.getAttributeValue(a,s)!==i&&e(a)}},uP=new Set([9,10,12,13,32]),WE=48,dP=57;function fP(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=i(),s=a();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(s??1),o(),t<e.length?(r=i(),o(),s=a()):r=s=0),s===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*s];function i(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function a(){const c=t;let l=0;for(;t<e.length&&e.charCodeAt(t)>=WE&&e.charCodeAt(t)<=dP;)l=l*10+(e.charCodeAt(t)-WE),t++;return t===c?null:l}function o(){for(;t<e.length&&uP.has(e.charCodeAt(t));)t++}}function hP(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return kt.falseFunc;if(t===-1)return i=>i<=n;if(t===0)return i=>i===n;if(t===1)return n<0?kt.trueFunc:i=>i>=n;const r=Math.abs(t),s=(n%r+r)%r;return t>1?i=>i>=n&&i%r===s:i=>i<=n&&i%r===s}function fd(e){return hP(fP(e))}function hd(e,t){return n=>{const r=t.getParent(n);return r!=null&&t.isTag(r)&&e(n)}}const rg={contains(e,t,{adapter:n}){return function(s){return e(s)&&n.getText(s).includes(t)}},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(i){return e(i)&&n.getText(i).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const s=fd(t);return s===kt.falseFunc?kt.falseFunc:s===kt.trueFunc?hd(e,n):function(a){const o=n.getSiblings(a);let c=0;for(let l=0;l<o.length&&!r(a,o[l]);l++)n.isTag(o[l])&&c++;return s(c)&&e(a)}},"nth-last-child"(e,t,{adapter:n,equals:r}){const s=fd(t);return s===kt.falseFunc?kt.falseFunc:s===kt.trueFunc?hd(e,n):function(a){const o=n.getSiblings(a);let c=0;for(let l=o.length-1;l>=0&&!r(a,o[l]);l--)n.isTag(o[l])&&c++;return s(c)&&e(a)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const s=fd(t);return s===kt.falseFunc?kt.falseFunc:s===kt.trueFunc?hd(e,n):function(a){const o=n.getSiblings(a);let c=0;for(let l=0;l<o.length;l++){const d=o[l];if(r(a,d))break;n.isTag(d)&&n.getName(d)===n.getName(a)&&c++}return s(c)&&e(a)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const s=fd(t);return s===kt.falseFunc?kt.falseFunc:s===kt.trueFunc?hd(e,n):function(a){const o=n.getSiblings(a);let c=0;for(let l=o.length-1;l>=0;l--){const d=o[l];if(r(a,d))break;n.isTag(d)&&n.getName(d)===n.getName(a)&&c++}return s(c)&&e(a)}},root(e,t,{adapter:n}){return r=>{const s=n.getParent(r);return(s==null||!n.isTag(s))&&e(r)}},scope(e,t,n,r){const{equals:s}=n;return!r||r.length===0?rg.root(e,t,n):r.length===1?i=>s(r[0],i)&&e(i):i=>r.includes(i)&&e(i)},hover:dm("isHovered"),visited:dm("isVisited"),active:dm("isActive")};function dm(e){return function(n,r,{adapter:s}){const i=s[e];return typeof i!="function"?kt.falseFunc:function(o){return i(o)&&n(o)}}}const GE={empty(e,{adapter:t}){return!t.getChildren(e).some(n=>t.isTag(n)||t.getText(n)!=="")},"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;const r=t.getSiblings(e).find(s=>t.isTag(s));return r!=null&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){const r=t.getSiblings(e);for(let s=r.length-1;s>=0;s--){if(n(e,r[s]))return!0;if(t.isTag(r[s]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),s=t.getName(e);for(let i=0;i<r.length;i++){const a=r[i];if(n(e,a))return!0;if(t.isTag(a)&&t.getName(a)===s)break}return!1},"last-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),s=t.getName(e);for(let i=r.length-1;i>=0;i--){const a=r[i];if(n(e,a))return!0;if(t.isTag(a)&&t.getName(a)===s)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every(s=>n(e,s)||!t.isTag(s)||t.getName(s)!==r)},"only-child"(e,{adapter:t,equals:n}){return t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))}};function VE(e,t,n,r){if(n===null){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const mP={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
1535
+ :is(button, input, select, textarea, optgroup, option)[disabled],
1536
+ optgroup[disabled] > option,
1537
+ fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
1538
+ )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},CT={};function gP(e,t){return e===kt.falseFunc?kt.falseFunc:n=>t.isTag(n)&&e(n)}function xT(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function sg(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const fm=(e,t,n,r,s)=>{const i=s(t,sg(n),r);return i===kt.trueFunc?e:i===kt.falseFunc?kt.falseFunc:a=>i(a)&&e(a)},hm={is:fm,matches:fm,where:fm,not(e,t,n,r,s){const i=s(t,sg(n),r);return i===kt.falseFunc?e:i===kt.trueFunc?kt.falseFunc:a=>!i(a)&&e(a)},has(e,t,n,r,s){const{adapter:i}=n,a=sg(n);a.relativeSelector=!0;const o=t.some(d=>d.some(Xb))?[CT]:void 0,c=s(t,a,o);if(c===kt.falseFunc)return kt.falseFunc;const l=gP(c,i);if(o&&c!==kt.trueFunc){const{shouldTestNextSiblings:d=!1}=c;return f=>{if(!e(f))return!1;o[0]=f;const m=i.getChildren(f),h=d?[...m,...xT(f,i)]:m;return i.existsOne(l,h)}}return d=>e(d)&&i.existsOne(l,i.getChildren(d))}};function bP(e,t,n,r,s){var i;const{name:a,data:o}=t;if(Array.isArray(o)){if(!(a in hm))throw new Error(`Unknown pseudo-class :${a}(${o})`);return hm[a](e,o,n,r,s)}const c=(i=n.pseudos)===null||i===void 0?void 0:i[a],l=typeof c=="string"?c:mP[a];if(typeof l=="string"){if(o!=null)throw new Error(`Pseudo ${a} doesn't have any arguments`);const d=Sh(l);return hm.is(e,d,n,r,s)}if(typeof c=="function")return VE(c,a,o,1),d=>c(d,o)&&e(d);if(a in rg)return rg[a](e,o,n,r);if(a in GE){const d=GE[a];return VE(d,a,o,2),f=>d(f,n,o)&&e(f)}throw new Error(`Unknown pseudo-class :${a}`)}function mm(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function pP(e,t,n,r,s){const{adapter:i,equals:a}=n;switch(t.type){case at.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case at.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case at.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!n.xmlMode||n.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),lP[t.action](e,t,n)}case at.Pseudo:return bP(e,t,n,r,s);case at.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:o}=t;return(!n.xmlMode||n.lowerCaseTags)&&(o=o.toLowerCase()),function(l){return i.getName(l)===o&&e(l)}}case at.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(l){let d=l;for(;d=mm(d,i);)if(e(d))return!0;return!1};const o=new WeakSet;return function(l){let d=l;for(;d=mm(d,i);)if(!o.has(d)){if(i.isTag(d)&&e(d))return!0;o.add(d)}return!1}}case"_flexibleDescendant":return function(c){let l=c;do if(e(l))return!0;while(l=mm(l,i));return!1};case at.Parent:return function(c){return i.getChildren(c).some(l=>i.isTag(l)&&e(l))};case at.Child:return function(c){const l=i.getParent(c);return l!=null&&i.isTag(l)&&e(l)};case at.Sibling:return function(c){const l=i.getSiblings(c);for(let d=0;d<l.length;d++){const f=l[d];if(a(c,f))break;if(i.isTag(f)&&e(f))return!0}return!1};case at.Adjacent:return i.prevElementSibling?function(c){const l=i.prevElementSibling(c);return l!=null&&e(l)}:function(c){const l=i.getSiblings(c);let d;for(let f=0;f<l.length;f++){const m=l[f];if(a(c,m))break;i.isTag(m)&&(d=m)}return!!d&&e(d)};case at.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function vT(e){return e.type===at.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(vT)))}const yP={type:at.Descendant},EP={type:"_flexibleDescendant"},CP={type:at.Pseudo,name:"scope",data:null};function xP(e,{adapter:t},n){const r=!!n?.every(s=>{const i=t.isTag(s)&&t.getParent(s);return s===CT||i&&t.isTag(i)});for(const s of e){if(!(s.length>0&&Xb(s[0])&&s[0].type!==at.Descendant))if(r&&!s.some(vT))s.unshift(yP);else continue;s.unshift(CP)}}function TT(e,t,n){var r;e.forEach(aP),n=(r=t.context)!==null&&r!==void 0?r:n;const s=Array.isArray(n),i=n&&(Array.isArray(n)?n:[n]);if(t.relativeSelector!==!1)xP(e,t,i);else if(e.some(c=>c.length>0&&Xb(c[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let a=!1;const o=e.map(c=>{if(c.length>=2){const[l,d]=c;l.type!==at.Pseudo||l.name!=="scope"||(s&&d.type===at.Descendant?c[1]=EP:(d.type===at.Adjacent||d.type===at.Sibling)&&(a=!0))}return vP(c,t,i)}).reduce(TP,kt.falseFunc);return o.shouldTestNextSiblings=a,o}function vP(e,t,n){var r;return e.reduce((s,i)=>s===kt.falseFunc?kt.falseFunc:pP(s,i,t,n,TT),(r=t.rootFunc)!==null&&r!==void 0?r:kt.trueFunc)}function TP(e,t){return t===kt.falseFunc||e===kt.trueFunc?e:e===kt.falseFunc||t===kt.trueFunc?t:function(r){return e(r)||t(r)}}const ST=(e,t)=>e===t,SP={adapter:Th,equals:ST};function _P(e){var t,n,r,s;const i=e??SP;return(t=i.adapter)!==null&&t!==void 0||(i.adapter=Th),(n=i.equals)!==null&&n!==void 0||(i.equals=(s=(r=i.adapter)===null||r===void 0?void 0:r.equals)!==null&&s!==void 0?s:ST),i}function wP(e){return function(n,r,s){const i=_P(r);return e(n,i,s)}}const Qb=wP(TT);function _T(e,t,n=!1){return n&&(e=AP(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function AP(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let s=0;s<r;s++){const i=xT(n[s],t);n.push(...i)}return n}const kP=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function Df(e){return e.type!=="pseudo"?!1:kP.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(Df)):!1}function IP(e,t,n){const r=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(r)?r>=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}function RP(e){for(;e.parent;)e=e.parent;return e}function Zb(e){const t=[],n=[];for(const r of e)r.some(Df)?t.push(r):n.push(r);return[n,t]}const BP={type:at.Universal,namespace:null},PP={type:at.Pseudo,name:"scope",data:null};function wT(e,t,n={}){return AT([e],t,n)}function AT(e,t,n={}){if(typeof t=="function")return e.some(t);const[r,s]=Zb(Sh(t));return r.length>0&&e.some(Qb(r,n))||s.some(i=>RT(i,e,n).length>0)}function NP(e,t,n,r){const s=typeof n=="string"?parseInt(n,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(s)&&Math.abs(s)<t.length?[s<0?t[t.length+s]:t[s]]:[];case"gt":return isFinite(s)?t.slice(s+1):[];case"even":return t.filter((i,a)=>a%2===0);case"odd":return t.filter((i,a)=>a%2===1);case"not":{const i=new Set(IT(n,t,r));return t.filter(a=>!i.has(a))}}}function kT(e,t,n={}){return IT(Sh(e),t,n)}function IT(e,t,n){if(t.length===0)return[];const[r,s]=Zb(e);let i;if(r.length){const a=ag(t,r,n);if(s.length===0)return a;a.length&&(i=new Set(a))}for(let a=0;a<s.length&&i?.size!==t.length;a++){const o=s[a];if((i?t.filter(d=>dt(d)&&!i.has(d)):t).length===0)break;const l=RT(o,t,n);if(l.length)if(i)l.forEach(d=>i.add(d));else{if(a===s.length-1)return l;i=new Set(l)}}return typeof i<"u"?i.size===t.length?t:t.filter(a=>i.has(a)):[]}function RT(e,t,n){var r;if(e.some(Zl)){const s=(r=n.root)!==null&&r!==void 0?r:RP(t[0]),i={...n,context:t,relativeSelector:!1};return e.push(PP),Lf(s,e,i,!0,t.length)}return Lf(t,e,n,!1,t.length)}function OP(e,t,n={},r=1/0){if(typeof e=="function")return BT(t,e);const[s,i]=Zb(Sh(e)),a=i.map(o=>Lf(t,o,n,!0,r));return s.length&&a.push(ig(t,s,n,r)),a.length===0?[]:a.length===1?a[0]:ol(a.reduce((o,c)=>[...o,...c]))}function Lf(e,t,n,r,s){const i=t.findIndex(Df),a=t.slice(0,i),o=t[i],c=t.length-1===i?s:1/0,l=IP(o.name,o.data,c);if(l===0)return[];const f=(a.length===0&&!Array.isArray(e)?vh(e).filter(dt):a.length===0?(Array.isArray(e)?e:[e]).filter(dt):r||a.some(Zl)?ig(e,[a],n,l):ag(e,[a],n)).slice(0,l);let m=NP(o.name,f,o.data,n);if(m.length===0||t.length===i+1)return m;const h=t.slice(i+1),g=h.some(Zl);if(g){if(Zl(h[0])){const{type:b}=h[0];(b===at.Sibling||b===at.Adjacent)&&(m=_T(m,Th,!0)),h.unshift(BP)}n={...n,relativeSelector:!1,rootFunc:b=>m.includes(b)}}else n.rootFunc&&n.rootFunc!==Of.trueFunc&&(n={...n,rootFunc:Of.trueFunc});return h.some(Df)?Lf(m,h,n,!1,s):g?ig(m,[h],n,s):ag(m,[h],n)}function ig(e,t,n,r){const s=Qb(t,n,e);return BT(e,s,r)}function BT(e,t,n=1/0){const r=_T(e,Th,t.shouldTestNextSiblings);return Gb(s=>dt(s)&&t(s),r,!0,n)}function ag(e,t,n){const r=(Array.isArray(e)?e:[e]).filter(dt);if(r.length===0)return r;const s=Qb(t,n);return s===Of.trueFunc?r:r.filter(s)}const DP=/^\s*[+~]/;function LP(e){if(!e)return this._make([]);if(typeof e!="string"){const t=_i(e)?e.toArray():[e],n=this.toArray();return this._make(t.filter(r=>n.some(s=>cT(s,r))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function MP(e,t){var n;const r=this.toArray(),s=DP.test(e)?r:this.children().toArray(),i={context:r,root:(n=this._root)===null||n===void 0?void 0:n[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(OP(e,s,i,t))}function Jb(e){return function(t,...n){return function(r){var s;let i=e(t,this);return r&&(i=np(i,r,this.options.xmlMode,(s=this._root)===null||s===void 0?void 0:s[0])),this._make(this.length>1&&i.length>1?n.reduce((a,o)=>o(a),i):i)}}}const Lu=Jb((e,t)=>{let n=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s.length>0&&(n=n.concat(s))}return n}),ep=Jb((e,t)=>{const n=[];for(let r=0;r<t.length;r++){const s=e(t[r]);s!==null&&n.push(s)}return n});function tp(e,...t){let n=null;const r=Jb((s,i)=>{const a=[];return Nn(i,o=>{for(let c;(c=s(o))&&!n?.(c,a.length);o=c)a.push(c)}),a})(e,...t);return function(s,i){n=typeof s=="string"?o=>wT(o,s,this.options):s?Mu(s):null;const a=r.call(this,i);return n=null,a}}function cl(e){return e.length>1?Array.from(new Set(e)):e}const FP=ep(({parent:e})=>e&&!ga(e)?e:null,cl),zP=Lu(e=>{const t=[];for(;e.parent&&!ga(e.parent);)t.push(e.parent),e=e.parent;return t},ol,e=>e.reverse()),UP=tp(({parent:e})=>e&&!ga(e)?e:null,ol,e=>e.reverse());function $P(e){var t;const n=[];if(!e)return this._make(n);const r={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},s=typeof e=="string"?i=>wT(i,e,r):Mu(e);return Nn(this,i=>{for(i&&!ga(i)&&!dt(i)&&(i=i.parent);i&&dt(i);){if(s(i,0)){n.includes(i)||n.push(i);break}i=i.parent}}),this._make(n)}const HP=ep(e=>jb(e)),qP=Lu(e=>{const t=[];for(;e.next;)e=e.next,dt(e)&&t.push(e);return t},cl),jP=tp(e=>jb(e),cl),WP=ep(e=>Wb(e)),GP=Lu(e=>{const t=[];for(;e.prev;)e=e.prev,dt(e)&&t.push(e);return t},cl),VP=tp(e=>Wb(e),cl),KP=Lu(e=>nT(e).filter(t=>dt(t)&&t!==e),ol),YP=Lu(e=>vh(e).filter(dt),cl);function XP(){const e=this.toArray().reduce((t,n)=>Wn(n)?t.concat(n.children):t,[]);return this._make(e)}function QP(e){let t=0;const n=this.length;for(;t<n&&e.call(this[t],t,this[t])!==!1;)++t;return this}function ZP(e){let t=[];for(let n=0;n<this.length;n++){const r=this[n],s=e.call(r,n,r);s!=null&&(t=t.concat(s))}return this._make(t)}function Mu(e){return typeof e=="function"?(t,n)=>e.call(t,n,t):_i(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function JP(e){var t;return this._make(np(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function np(e,t,n,r){return typeof t=="string"?kT(t,e,{xmlMode:n,root:r}):e.filter(Mu(t))}function eN(e){const t=this.toArray();return typeof e=="string"?AT(t.filter(dt),e,this.options):e?t.some(Mu(e)):!1}function tN(e){let t=this.toArray();if(typeof e=="string"){const n=new Set(kT(e,t,this.options));t=t.filter(r=>!n.has(r))}else{const n=Mu(e);t=t.filter((r,s)=>!n(r,s))}return this._make(t)}function nN(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,n)=>this._make(n).find(e).length>0)}function rN(){return this.length>1?this._make(this[0]):this}function sN(){return this.length>0?this._make(this[this.length-1]):this}function iN(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function aN(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function oN(){return Array.prototype.slice.call(this)}function cN(e){let t,n;return e==null?(t=this.parent().children(),n=this[0]):typeof e=="string"?(t=this._make(e),n=this[0]):(t=this,n=_i(e)?e[0]:e),Array.prototype.indexOf.call(t,n)}function lN(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function uN(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function dN(e,t){const n=this._make(e,t),r=ol([...this.get(),...n.get()]);return this._make(r)}function fN(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const hN=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:MP,add:dN,addBack:fN,children:YP,closest:$P,contents:XP,each:QP,end:uN,eq:iN,filter:JP,filterArray:np,find:LP,first:rN,get:aN,has:nN,index:cN,is:eN,last:sN,map:ZP,next:HP,nextAll:qP,nextUntil:jP,not:tN,parent:FP,parents:zP,parentsUntil:UP,prev:WP,prevAll:GP,prevUntil:VP,siblings:KP,slice:lN,toArray:oN},Symbol.toStringTag,{value:"Module"}));function mN(e){return function(n,r,s,i){if(typeof Buffer<"u"&&Buffer.isBuffer(n)&&(n=n.toString()),typeof n=="string")return e(n,r,s,i);const a=n;if(!Array.isArray(a)&&ga(a))return a;const o=new Eo([]);return Co(a,o),o}}function Co(e,t){const n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(let r=0;r<n.length;r++){const s=n[r];s.parent&&s.parent.children!==n&&ko(s),t?(s.prev=n[r-1]||null,s.next=n[r+1]||null):s.prev=s.next=null,s.parent=t}return t}function gN(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);const n=[];for(let r=0;r<e.length;r++){const s=e[r];if(typeof s=="object"){if(s==null)continue;if(!("length"in s)){n.push(t?Eu(s,!0):s);continue}}n.push(...this._makeDomArray(s,t))}return n}return[t?Eu(e,!0):e]}function PT(e){return function(...t){const n=this.length-1;return Nn(this,(r,s)=>{if(!Wn(r))return;const i=typeof t[0]=="function"?t[0].call(r,s,this._render(r.children)):t,a=this._makeDomArray(i,s<n);e(a,r.children,r)})}}function ba(e,t,n,r,s){var i,a;const o=[t,n,...r],c=t===0?null:e[t-1],l=t+n>=e.length?null:e[t+n];for(let d=0;d<r.length;++d){const f=r[d],m=f.parent;if(m){const g=m.children.indexOf(f);g!==-1&&(m.children.splice(g,1),s===m&&t>g&&o[0]--)}f.parent=s,f.prev&&(f.prev.next=(i=f.next)!==null&&i!==void 0?i:null),f.next&&(f.next.prev=(a=f.prev)!==null&&a!==void 0?a:null),f.prev=d===0?c:r[d-1],f.next=d===r.length-1?l:r[d+1]}return c&&(c.next=r[0]),l&&(l.prev=r[r.length-1]),e.splice(...o)}function bN(e){return(_i(e)?e:this._make(e)).append(this),this}function pN(e){return(_i(e)?e:this._make(e)).prepend(this),this}const yN=PT((e,t,n)=>{ba(t,t.length,0,e,n)}),EN=PT((e,t,n)=>{ba(t,0,0,e,n)});function NT(e){return function(t){const n=this.length-1,r=this.parents().last();for(let s=0;s<this.length;s++){const i=this[s],a=typeof t=="function"?t.call(i,s,i):typeof t=="string"&&!eg(t)?r.find(t).clone():t,[o]=this._makeDomArray(a,s<n);if(!o||!Wn(o))continue;let c=o,l=0;for(;l<c.children.length;){const d=c.children[l];dt(d)?(c=d,l=0):l++}e(i,c,[o])}return this}}const CN=NT((e,t,n)=>{const{parent:r}=e;if(!r)return;const s=r.children,i=s.indexOf(e);Co([e],t),ba(s,i,0,n,r)}),xN=NT((e,t,n)=>{Wn(e)&&(Co(e.children,t),Co(n,e))});function vN(e){return this.parent(e).not("body").each((t,n)=>{this._make(n).replaceWith(n.children)}),this}function TN(e){const t=this[0];if(t){const n=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t);let r;for(let i=0;i<n.length;i++)n[i].type===Q0&&(r=n[i]);let s=0;for(;r&&s<r.children.length;){const i=r.children[s];i.type===Q0?(r=i,s=0):s++}r&&this._make(r).append(this)}return this}function SN(...e){const t=this.length-1;return Nn(this,(n,r)=>{if(!Wn(n)||!n.parent)return;const s=n.parent.children,i=s.indexOf(n);if(i===-1)return;const a=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,o=this._makeDomArray(a,r<t);ba(s,i+1,0,o,n.parent)})}function _N(e){typeof e=="string"&&(e=this._make(e)),this.remove();const t=[];for(const n of this._makeDomArray(e)){const r=this.clone().toArray(),{parent:s}=n;if(!s)continue;const i=s.children,a=i.indexOf(n);a!==-1&&(ba(i,a+1,0,r,s),t.push(...r))}return this._make(t)}function wN(...e){const t=this.length-1;return Nn(this,(n,r)=>{if(!Wn(n)||!n.parent)return;const s=n.parent.children,i=s.indexOf(n);if(i===-1)return;const a=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,o=this._makeDomArray(a,r<t);ba(s,i,0,o,n.parent)})}function AN(e){const t=this._make(e);this.remove();const n=[];return Nn(t,r=>{const s=this.clone().toArray(),{parent:i}=r;if(!i)return;const a=i.children,o=a.indexOf(r);o!==-1&&(ba(a,o,0,s,i),n.push(...s))}),this._make(n)}function kN(e){const t=e?this.filter(e):this;return Nn(t,n=>{ko(n),n.prev=n.next=n.parent=null}),this}function IN(e){return Nn(this,(t,n)=>{const{parent:r}=t;if(!r)return;const s=r.children,i=typeof e=="function"?e.call(t,n,t):e,a=this._makeDomArray(i);Co(a,null);const o=s.indexOf(t);ba(s,o,1,a,r),a.includes(t)||(t.parent=t.prev=t.next=null)})}function RN(){return Nn(this,e=>{if(Wn(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function BN(e){if(e===void 0){const t=this[0];return!t||!Wn(t)?null:this._render(t.children)}return Nn(this,t=>{if(!Wn(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=_i(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;Co(n,t)})}function PN(){return this._render(this)}function NN(e){return e===void 0?Cu(this):typeof e=="function"?Nn(this,(t,n)=>this._make(t).text(e.call(t,n,Cu([t])))):Nn(this,t=>{if(!Wn(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=new yu(`${e}`);Co(n,t)})}function ON(){const e=Array.prototype.map.call(this.get(),n=>Eu(n,!0)),t=new Eo(e);for(const n of e)n.parent=t;return this._make(e)}const DN=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:gN,after:SN,append:yN,appendTo:bN,before:wN,clone:ON,empty:RN,html:BN,insertAfter:_N,insertBefore:AN,prepend:EN,prependTo:pN,remove:kN,replaceWith:IN,text:NN,toString:PN,unwrap:vN,wrap:CN,wrapAll:TN,wrapInner:xN},Symbol.toStringTag,{value:"Module"}));function LN(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Nn(this,(n,r)=>{dt(n)&&OT(n,e,t,r)});if(this.length!==0)return DT(this[0],e)}function OT(e,t,n,r){if(typeof t=="string"){const s=DT(e),i=typeof n=="function"?n.call(e,r,s[t]):n;i===""?delete s[t]:i!=null&&(s[t]=i),e.attribs.style=MN(s)}else if(typeof t=="object"){const s=Object.keys(t);for(let i=0;i<s.length;i++){const a=s[i];OT(e,a,t[a],i)}}}function DT(e,t){if(!e||!dt(e))return;const n=FN(e.attribs.style);if(typeof t=="string")return n[t];if(Array.isArray(t)){const r={};for(const s of t)n[s]!=null&&(r[s]=n[s]);return r}return n}function MN(e){return Object.keys(e).reduce((t,n)=>`${t}${t?" ":""}${n}: ${e[n]};`,"")}function FN(e){if(e=(e||"").trim(),!e)return{};const t={};let n;for(const r of e.split(";")){const s=r.indexOf(":");if(s<1||s===r.length-1){const i=r.trimEnd();i.length>0&&n!==void 0&&(t[n]+=`;${i}`)}else n=r.slice(0,s).trim(),t[n]=r.slice(s+1).trim()}return t}const zN=Object.freeze(Object.defineProperty({__proto__:null,css:LN},Symbol.toStringTag,{value:"Module"})),KE="input,select,textarea,keygen",UN=/%20/g,YE=/\r?\n/g;function $N(){return this.serializeArray().map(n=>`${encodeURIComponent(n.name)}=${encodeURIComponent(n.value)}`).join("&").replace(UN,"+")}function HN(){return this.map((e,t)=>{const n=this._make(t);return dt(t)&&t.name==="form"?n.find(KE).toArray():n.filter(KE).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var n;const r=this._make(t),s=r.attr("name"),i=(n=r.val())!==null&&n!==void 0?n:"";return Array.isArray(i)?i.map(a=>({name:s,value:a.replace(YE,`\r
1539
+ `)})):{name:s,value:i.replace(YE,`\r
1540
+ `)}}).toArray()}const qN=Object.freeze(Object.defineProperty({__proto__:null,serialize:$N,serializeArray:HN},Symbol.toStringTag,{value:"Module"}));function jN(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function WN(e){const t={};for(const n in e){const r=e[n],s=Array.isArray(r),{selector:i,value:a}=jN(s?r[0]:r),o=typeof a=="function"?a:typeof a=="string"?c=>this._make(c).prop(a):c=>this._make(c).extract(a);if(s)t[n]=this._findBySelector(i,Number.POSITIVE_INFINITY).map((c,l)=>o(l,n,t)).get();else{const c=this._findBySelector(i,1);t[n]=c.length>0?o(c[0],n,t):void 0}}return t}const GN=Object.freeze(Object.defineProperty({__proto__:null,extract:WN},Symbol.toStringTag,{value:"Module"}));class Fu{constructor(t,n,r){if(this.length=0,this.options=r,this._root=n,t){for(let s=0;s<t.length;s++)this[s]=t[s];this.length=t.length}}}Fu.prototype.cheerio="[cheerio object]";Fu.prototype.splice=Array.prototype.splice;Fu.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(Fu.prototype,Z6,hN,DN,zN,qN,GN);function VN(e,t){return function n(r,s,i=!0){if(r==null)throw new Error("cheerio.load() expects a string");const a=J0(s),o=e(r,a,i,null);class c extends Fu{_make(f,m){const h=l(f,m);return h.prevObject=this,h}_parse(f,m,h,g){return e(f,m,h,g)}_render(f){return t(f,this.options)}}function l(d,f,m=o,h){if(d&&_i(d))return d;const g=J0(h,a),b=typeof m=="string"?[e(m,g,!1,null)]:"length"in m?m:[m],p=_i(b)?b:new c(b,null,g);if(p._root=p,!d)return new c(void 0,p,g);const y=typeof d=="string"&&eg(d)?e(d,g,!1,null).children:KN(d)?[d]:Array.isArray(d)?d:void 0,C=new c(y,p,g);if(y)return C;if(typeof d!="string")throw new TypeError("Unexpected type of selector");let A=d;const T=f?typeof f=="string"?eg(f)?new c([e(f,g,!1,null)],p,g):(A=`${f} ${A}`,p):_i(f)?f:new c(Array.isArray(f)?f:[f],p,g):p;return T?T.find(A):C}return Object.assign(l,_6,{load:n,_root:o,_options:a,fn:c.prototype,prototype:c.prototype}),l}}function KN(e){return!!e.name||e.type===Fb||e.type===Kv||e.type===Yv}const YN=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),An="�";var k;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(k||(k={}));const Zr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function LT(e){return e>=55296&&e<=57343}function XN(e){return e>=56320&&e<=57343}function QN(e,t){return(e-55296)*1024+9216+t}function MT(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function FT(e){return e>=64976&&e<=65007||YN.has(e)}var ie;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ie||(ie={}));const ZN=65536;class JN{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ZN,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:i}=this,a=s+n,o=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(XN(n))return this.pos++,this._addGap(),QN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err(ie.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;const r=this.html.charCodeAt(n);return r===k.CARRIAGE_RETURN?k.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,LT(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){MT(t)?this._err(ie.controlCharacterInInputStream):FT(t)&&this._err(ie.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var zt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(zt||(zt={}));function zT(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var pe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(pe||(pe={}));var $a;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})($a||($a={}));var hs;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(hs||(hs={}));var V;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(V||(V={}));var u;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(u||(u={}));const eO=new Map([[V.A,u.A],[V.ADDRESS,u.ADDRESS],[V.ANNOTATION_XML,u.ANNOTATION_XML],[V.APPLET,u.APPLET],[V.AREA,u.AREA],[V.ARTICLE,u.ARTICLE],[V.ASIDE,u.ASIDE],[V.B,u.B],[V.BASE,u.BASE],[V.BASEFONT,u.BASEFONT],[V.BGSOUND,u.BGSOUND],[V.BIG,u.BIG],[V.BLOCKQUOTE,u.BLOCKQUOTE],[V.BODY,u.BODY],[V.BR,u.BR],[V.BUTTON,u.BUTTON],[V.CAPTION,u.CAPTION],[V.CENTER,u.CENTER],[V.CODE,u.CODE],[V.COL,u.COL],[V.COLGROUP,u.COLGROUP],[V.DD,u.DD],[V.DESC,u.DESC],[V.DETAILS,u.DETAILS],[V.DIALOG,u.DIALOG],[V.DIR,u.DIR],[V.DIV,u.DIV],[V.DL,u.DL],[V.DT,u.DT],[V.EM,u.EM],[V.EMBED,u.EMBED],[V.FIELDSET,u.FIELDSET],[V.FIGCAPTION,u.FIGCAPTION],[V.FIGURE,u.FIGURE],[V.FONT,u.FONT],[V.FOOTER,u.FOOTER],[V.FOREIGN_OBJECT,u.FOREIGN_OBJECT],[V.FORM,u.FORM],[V.FRAME,u.FRAME],[V.FRAMESET,u.FRAMESET],[V.H1,u.H1],[V.H2,u.H2],[V.H3,u.H3],[V.H4,u.H4],[V.H5,u.H5],[V.H6,u.H6],[V.HEAD,u.HEAD],[V.HEADER,u.HEADER],[V.HGROUP,u.HGROUP],[V.HR,u.HR],[V.HTML,u.HTML],[V.I,u.I],[V.IMG,u.IMG],[V.IMAGE,u.IMAGE],[V.INPUT,u.INPUT],[V.IFRAME,u.IFRAME],[V.KEYGEN,u.KEYGEN],[V.LABEL,u.LABEL],[V.LI,u.LI],[V.LINK,u.LINK],[V.LISTING,u.LISTING],[V.MAIN,u.MAIN],[V.MALIGNMARK,u.MALIGNMARK],[V.MARQUEE,u.MARQUEE],[V.MATH,u.MATH],[V.MENU,u.MENU],[V.META,u.META],[V.MGLYPH,u.MGLYPH],[V.MI,u.MI],[V.MO,u.MO],[V.MN,u.MN],[V.MS,u.MS],[V.MTEXT,u.MTEXT],[V.NAV,u.NAV],[V.NOBR,u.NOBR],[V.NOFRAMES,u.NOFRAMES],[V.NOEMBED,u.NOEMBED],[V.NOSCRIPT,u.NOSCRIPT],[V.OBJECT,u.OBJECT],[V.OL,u.OL],[V.OPTGROUP,u.OPTGROUP],[V.OPTION,u.OPTION],[V.P,u.P],[V.PARAM,u.PARAM],[V.PLAINTEXT,u.PLAINTEXT],[V.PRE,u.PRE],[V.RB,u.RB],[V.RP,u.RP],[V.RT,u.RT],[V.RTC,u.RTC],[V.RUBY,u.RUBY],[V.S,u.S],[V.SCRIPT,u.SCRIPT],[V.SEARCH,u.SEARCH],[V.SECTION,u.SECTION],[V.SELECT,u.SELECT],[V.SOURCE,u.SOURCE],[V.SMALL,u.SMALL],[V.SPAN,u.SPAN],[V.STRIKE,u.STRIKE],[V.STRONG,u.STRONG],[V.STYLE,u.STYLE],[V.SUB,u.SUB],[V.SUMMARY,u.SUMMARY],[V.SUP,u.SUP],[V.TABLE,u.TABLE],[V.TBODY,u.TBODY],[V.TEMPLATE,u.TEMPLATE],[V.TEXTAREA,u.TEXTAREA],[V.TFOOT,u.TFOOT],[V.TD,u.TD],[V.TH,u.TH],[V.THEAD,u.THEAD],[V.TITLE,u.TITLE],[V.TR,u.TR],[V.TRACK,u.TRACK],[V.TT,u.TT],[V.U,u.U],[V.UL,u.UL],[V.SVG,u.SVG],[V.VAR,u.VAR],[V.WBR,u.WBR],[V.XMP,u.XMP]]);function _h(e){var t;return(t=eO.get(e))!==null&&t!==void 0?t:u.UNKNOWN}const Re=u,tO={[pe.HTML]:new Set([Re.ADDRESS,Re.APPLET,Re.AREA,Re.ARTICLE,Re.ASIDE,Re.BASE,Re.BASEFONT,Re.BGSOUND,Re.BLOCKQUOTE,Re.BODY,Re.BR,Re.BUTTON,Re.CAPTION,Re.CENTER,Re.COL,Re.COLGROUP,Re.DD,Re.DETAILS,Re.DIR,Re.DIV,Re.DL,Re.DT,Re.EMBED,Re.FIELDSET,Re.FIGCAPTION,Re.FIGURE,Re.FOOTER,Re.FORM,Re.FRAME,Re.FRAMESET,Re.H1,Re.H2,Re.H3,Re.H4,Re.H5,Re.H6,Re.HEAD,Re.HEADER,Re.HGROUP,Re.HR,Re.HTML,Re.IFRAME,Re.IMG,Re.INPUT,Re.LI,Re.LINK,Re.LISTING,Re.MAIN,Re.MARQUEE,Re.MENU,Re.META,Re.NAV,Re.NOEMBED,Re.NOFRAMES,Re.NOSCRIPT,Re.OBJECT,Re.OL,Re.P,Re.PARAM,Re.PLAINTEXT,Re.PRE,Re.SCRIPT,Re.SECTION,Re.SELECT,Re.SOURCE,Re.STYLE,Re.SUMMARY,Re.TABLE,Re.TBODY,Re.TD,Re.TEMPLATE,Re.TEXTAREA,Re.TFOOT,Re.TH,Re.THEAD,Re.TITLE,Re.TR,Re.TRACK,Re.UL,Re.WBR,Re.XMP]),[pe.MATHML]:new Set([Re.MI,Re.MO,Re.MN,Re.MS,Re.MTEXT,Re.ANNOTATION_XML]),[pe.SVG]:new Set([Re.TITLE,Re.FOREIGN_OBJECT,Re.DESC]),[pe.XLINK]:new Set,[pe.XML]:new Set,[pe.XMLNS]:new Set},og=new Set([Re.H1,Re.H2,Re.H3,Re.H4,Re.H5,Re.H6]),nO=new Set([V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.PLAINTEXT]);function rO(e,t){return nO.has(e)||t&&e===V.NOSCRIPT}var P;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(P||(P={}));const es={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function sO(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function Kl(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function iO(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function qi(e){return iO(e)||Kl(e)}function XE(e){return qi(e)||sO(e)}function md(e){return e+32}function UT(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function QE(e){return UT(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function aO(e){return e===k.NULL?ie.nullCharacterReference:e>1114111?ie.characterReferenceOutsideUnicodeRange:LT(e)?ie.surrogateCharacterReference:FT(e)?ie.noncharacterCharacterReference:MT(e)||e===k.CARRIAGE_RETURN?ie.controlCharacterReference:null}class oO{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=P.DATA,this.returnState=P.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new JN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new uT(lT,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ie.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ie.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=aO(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:zt.START_TAG,tagName:"",tagID:u.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:zt.END_TAG,tagName:"",tagID:u.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:zt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:zt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(zT(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ie.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=_h(t.tagName),t.type===zt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ie.endTagWithAttributes),t.selfClosing&&this._err(ie.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case zt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case zt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case zt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:zt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=UT(t)?zt.WHITESPACE_CHARACTER:t===k.NULL?zt.NULL_CHARACTER:zt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(zt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=P.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ks.Attribute:ks.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case P.DATA:{this._stateData(t);break}case P.RCDATA:{this._stateRcdata(t);break}case P.RAWTEXT:{this._stateRawtext(t);break}case P.SCRIPT_DATA:{this._stateScriptData(t);break}case P.PLAINTEXT:{this._statePlaintext(t);break}case P.TAG_OPEN:{this._stateTagOpen(t);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case P.TAG_NAME:{this._stateTagName(t);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case P.BOGUS_COMMENT:{this._stateBogusComment(t);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case P.COMMENT_START:{this._stateCommentStart(t);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case P.COMMENT:{this._stateComment(t);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case P.COMMENT_END:{this._stateCommentEnd(t);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case P.DOCTYPE:{this._stateDoctype(t);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case P.CDATA_SECTION:{this._stateCdataSection(t);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=P.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(An);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(An);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(An);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(An);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(qi(t))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err(ie.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(qi(t))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err(ie.missingEndTagName),this.state=P.DATA;break}case k.EOF:{this._err(ie.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ie.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.tagName+=An;break}case k.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Kl(t)?md(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=P.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){qi(t)?(this.state=P.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=P.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=P.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=P.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=P.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){qi(t)?(this.state=P.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=P.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=P.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=P.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){qi(t)?(this.state=P.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(An);break}case k.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(An);break}case k.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(An);break}case k.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:qi(t)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){qi(t)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Zr.SCRIPT,!1)&&QE(this.preprocessor.peek(Zr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Zr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this._emitChars(An);break}case k.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(An);break}case k.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(An);break}case k.EOF:{this._err(ie.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Zr.SCRIPT,!1)&&QE(this.preprocessor.peek(Zr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Zr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err(ie.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=P.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err(ie.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.name+=An;break}default:this.currentAttr.name+=String.fromCodePoint(Kl(t)?md(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=P.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=P.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ie.missingAttributeValue),this.state=P.DATA,this.emitCurrentTagToken();break}default:this.state=P.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=An;break}case k.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=An;break}case k.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err(ie.unexpectedNullCharacter),this.currentAttr.value+=An;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err(ie.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=P.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBetweenAttributes),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=P.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err(ie.eofInTag),this._emitEOFToken();break}default:this._err(ie.unexpectedSolidusInTag),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=An;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Zr.DASH_DASH,!0)?(this._createCommentToken(Zr.DASH_DASH.length+1),this.state=P.COMMENT_START):this._consumeSequenceIfMatch(Zr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Zr.DOCTYPE.length+1),this.state=P.DOCTYPE):this._consumeSequenceIfMatch(Zr.CDATA_START,!0)?this.inForeignNode?this.state=P.CDATA_SECTION:(this._err(ie.cdataInHtmlContent),this._createCommentToken(Zr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=P.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ie.incorrectlyOpenedComment),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ie.abruptClosingOfEmptyComment),this.state=P.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err(ie.abruptClosingOfEmptyComment),this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{n.data+="<",this.state=P.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.data+=An;break}case k.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{n.data+="!",this.state=P.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=P.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=P.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err(ie.nestedComment),this.state=P.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case k.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case k.EXCLAMATION_MARK:{this.state=P.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{n.data+="-";break}case k.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case k.HYPHEN_MINUS:{n.data+="--!",this.state=P.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err(ie.incorrectlyClosedComment),this.state=P.DATA,this.emitCurrentComment(n);break}case k.EOF:{this._err(ie.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=P.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err(ie.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingWhitespaceBeforeDoctypeName),this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Kl(t))this._createDoctypeToken(String.fromCharCode(md(t))),this.state=P.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err(ie.unexpectedNullCharacter),this._createDoctypeToken(An),this.state=P.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ie.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=P.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.name+=An;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Kl(t)?md(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Zr.PUBLIC,!1)?this.state=P.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Zr.SYSTEM,!1)?this.state=P.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ie.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ie.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=An;break}case k.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.publicId+=An;break}case k.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.QUOTATION_MARK:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ie.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err(ie.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err(ie.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=An;break}case k.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err(ie.unexpectedNullCharacter),n.systemId+=An;break}case k.GREATER_THAN_SIGN:{this._err(ie.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.EOF:{this._err(ie.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ie.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case k.NULL:{this._err(ie.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=P.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err(ie.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=P.CDATA_SECTION_END:(this._emitChars("]"),this.state=P.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=P.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=P.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&XE(this.preprocessor.peek(1))?P.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){XE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err(ie.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const $T=new Set([u.DD,u.DT,u.LI,u.OPTGROUP,u.OPTION,u.P,u.RB,u.RP,u.RT,u.RTC]),ZE=new Set([...$T,u.CAPTION,u.COLGROUP,u.TBODY,u.TD,u.TFOOT,u.TH,u.THEAD,u.TR]),Mf=new Set([u.APPLET,u.CAPTION,u.HTML,u.MARQUEE,u.OBJECT,u.TABLE,u.TD,u.TEMPLATE,u.TH]),cO=new Set([...Mf,u.OL,u.UL]),lO=new Set([...Mf,u.BUTTON]),JE=new Set([u.ANNOTATION_XML,u.MI,u.MN,u.MO,u.MS,u.MTEXT]),e1=new Set([u.DESC,u.FOREIGN_OBJECT,u.TITLE]),uO=new Set([u.TR,u.TEMPLATE,u.HTML]),dO=new Set([u.TBODY,u.TFOOT,u.THEAD,u.TEMPLATE,u.HTML]),fO=new Set([u.TABLE,u.TEMPLATE,u.HTML]),hO=new Set([u.TD,u.TH]);class mO{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=u.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===u.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===pe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==pe.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(og,pe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(hO,pe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(fO,pe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(dO,pe.HTML)}clearBackToTableRowContext(){this.clearBackTo(uO,pe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===u.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===u.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case pe.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case pe.SVG:{if(e1.has(s))return!1;break}case pe.MATHML:{if(JE.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Mf)}hasInListItemScope(t){return this.hasInDynamicScope(t,cO)}hasInButtonScope(t){return this.hasInDynamicScope(t,lO)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case pe.HTML:{if(og.has(n))return!0;if(Mf.has(n))return!1;break}case pe.SVG:{if(e1.has(n))return!1;break}case pe.MATHML:{if(JE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case u.TABLE:case u.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===pe.HTML)switch(this.tagIDs[t]){case u.TBODY:case u.THEAD:case u.TFOOT:return!0;case u.TABLE:case u.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===pe.HTML)switch(this.tagIDs[n]){case t:return!0;case u.OPTION:case u.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&$T.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ZE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ZE.has(this.currentTagId);)this.pop()}}const gm=3;var si;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(si||(si={}));const t1={type:si.Marker};class gO{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const c=this.entries[o];if(c.type===si.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===a){const d=this.treeAdapter.getAttrList(l);d.length===s&&r.push({idx:o,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<gm)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<gm)return;const s=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(c=>s.get(c.name)===c.value)&&(i+=1,i>=gm&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(t1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:si.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:si.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(t1);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===si.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===si.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===si.Element&&n.element===t)}}const Ti={createDocument(){return{nodeName:"#document",mode:hs.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(i=>i.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ti.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ti.isTextNode(n)){n.value+=t;return}}Ti.appendChild(e,Ti.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ti.isTextNode(r)?r.value+=t:Ti.insertBefore(e,Ti.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},HT="html",bO="about:legacy-compat",pO="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",qT=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],yO=[...qT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],EO=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),jT=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],CO=[...jT,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function n1(e,t){return t.some(n=>e.startsWith(n))}function xO(e){return e.name===HT&&e.publicId===null&&(e.systemId===null||e.systemId===bO)}function vO(e){if(e.name!==HT)return hs.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===pO)return hs.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),EO.has(n))return hs.QUIRKS;let r=t===null?yO:qT;if(n1(n,r))return hs.QUIRKS;if(r=t===null?jT:CO,n1(n,r))return hs.LIMITED_QUIRKS}return hs.NO_QUIRKS}const r1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},TO="definitionurl",SO="definitionURL",_O=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),wO=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:pe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:pe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:pe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:pe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:pe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:pe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:pe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:pe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:pe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:pe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:pe.XMLNS}]]),AO=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),kO=new Set([u.B,u.BIG,u.BLOCKQUOTE,u.BODY,u.BR,u.CENTER,u.CODE,u.DD,u.DIV,u.DL,u.DT,u.EM,u.EMBED,u.H1,u.H2,u.H3,u.H4,u.H5,u.H6,u.HEAD,u.HR,u.I,u.IMG,u.LI,u.LISTING,u.MENU,u.META,u.NOBR,u.OL,u.P,u.PRE,u.RUBY,u.S,u.SMALL,u.SPAN,u.STRONG,u.STRIKE,u.SUB,u.SUP,u.TABLE,u.TT,u.U,u.UL,u.VAR]);function IO(e){const t=e.tagID;return t===u.FONT&&e.attrs.some(({name:r})=>r===$a.COLOR||r===$a.SIZE||r===$a.FACE)||kO.has(t)}function WT(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===TO){e.attrs[t].name=SO;break}}function GT(e){for(let t=0;t<e.attrs.length;t++){const n=_O.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function rp(e){for(let t=0;t<e.attrs.length;t++){const n=wO.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function RO(e){const t=AO.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=_h(e.tagName))}function BO(e,t){return t===pe.MATHML&&(e===u.MI||e===u.MO||e===u.MN||e===u.MS||e===u.MTEXT)}function PO(e,t,n){if(t===pe.MATHML&&e===u.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===$a.ENCODING){const s=n[r].value.toLowerCase();return s===r1.TEXT_HTML||s===r1.APPLICATION_XML}}return t===pe.SVG&&(e===u.FOREIGN_OBJECT||e===u.DESC||e===u.TITLE)}function NO(e,t,n,r){return(!r||r===pe.HTML)&&PO(e,t,n)||(!r||r===pe.MATHML)&&BO(e,t)}const OO="hidden",DO=8,LO=3;var z;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(z||(z={}));const MO={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},VT=new Set([u.TABLE,u.TBODY,u.TFOOT,u.THEAD,u.TR]),s1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ti,onParseError:null};let KT=class{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=z.INITIAL,this.originalInsertionMode=z.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...s1,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new oO(this.options,this),this.activeFormattingElements=new gO(this.treeAdapter),this.fragmentContextID=r?_h(this.treeAdapter.getTagName(r)):u.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new mO(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...s1,...n};t??(t=r.treeAdapter.createElement(V.TEMPLATE,pe.HTML,[]));const s=r.treeAdapter.createElement("documentmock",pe.HTML,[]),i=new this(r,s,t);return i.fragmentContextID===u.TEMPLATE&&i.tmplInsertionModeStack.unshift(z.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const i=(s=t.location)!==null&&s!==void 0?s:MO,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var s,i;(i=(s=this.treeAdapter).onItemPush)===null||i===void 0||i.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===pe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,pe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=z.TEXT}switchToPlaintextParsing(){this.insertionMode=z.TEXT,this.originalInsertionMode=z.IN_BODY,this.tokenizer.state=es.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===V.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==pe.HTML))switch(this.fragmentContextID){case u.TITLE:case u.TEXTAREA:{this.tokenizer.state=es.RCDATA;break}case u.STYLE:case u.XMP:case u.IFRAME:case u.NOEMBED:case u.NOFRAMES:case u.NOSCRIPT:{this.tokenizer.state=es.RAWTEXT;break}case u.SCRIPT:{this.tokenizer.state=es.SCRIPT_DATA;break}case u.PLAINTEXT:{this.tokenizer.state=es.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,pe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,pe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(V.HTML,pe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,u.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),i=r?s.lastIndexOf(r):s.length,a=s[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:c,endCol:l,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:l,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),i=n.type===zt.END_TAG&&s===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===u.SVG&&this.treeAdapter.getTagName(n)===V.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===pe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===u.MGLYPH||t.tagID===u.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,pe.HTML)}_processToken(t){switch(t.type){case zt.CHARACTER:{this.onCharacter(t);break}case zt.NULL_CHARACTER:{this.onNullCharacter(t);break}case zt.COMMENT:{this.onComment(t);break}case zt.DOCTYPE:{this.onDoctype(t);break}case zt.START_TAG:{this._processStartTag(t);break}case zt.END_TAG:{this.onEndTag(t);break}case zt.EOF:{this.onEof(t);break}case zt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return NO(t,s,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===si.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const i=this.activeFormattingElements.entries[s];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(u.P),this.openElements.popUntilTagNamePopped(u.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case u.TR:{this.insertionMode=z.IN_ROW;return}case u.TBODY:case u.THEAD:case u.TFOOT:{this.insertionMode=z.IN_TABLE_BODY;return}case u.CAPTION:{this.insertionMode=z.IN_CAPTION;return}case u.COLGROUP:{this.insertionMode=z.IN_COLUMN_GROUP;return}case u.TABLE:{this.insertionMode=z.IN_TABLE;return}case u.BODY:{this.insertionMode=z.IN_BODY;return}case u.FRAMESET:{this.insertionMode=z.IN_FRAMESET;return}case u.SELECT:{this._resetInsertionModeForSelect(t);return}case u.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case u.HTML:{this.insertionMode=this.headElement?z.AFTER_HEAD:z.BEFORE_HEAD;return}case u.TD:case u.TH:{if(t>0){this.insertionMode=z.IN_CELL;return}break}case u.HEAD:{if(t>0){this.insertionMode=z.IN_HEAD;return}break}}this.insertionMode=z.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===u.TEMPLATE)break;if(r===u.TABLE){this.insertionMode=z.IN_SELECT_IN_TABLE;return}}this.insertionMode=z.IN_SELECT}_isElementCausesFosterParenting(t){return VT.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case u.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===pe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case u.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return tO[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){h4(this,t);return}switch(this.insertionMode){case z.INITIAL:{Hl(this,t);break}case z.BEFORE_HTML:{Jl(this,t);break}case z.BEFORE_HEAD:{eu(this,t);break}case z.IN_HEAD:{tu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{nu(this,t);break}case z.AFTER_HEAD:{ru(this,t);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:{XT(this,t);break}case z.TEXT:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{bm(this,t);break}case z.IN_TABLE_TEXT:{nS(this,t);break}case z.IN_COLUMN_GROUP:{Ff(this,t);break}case z.AFTER_BODY:{zf(this,t);break}case z.AFTER_AFTER_BODY:{Od(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){f4(this,t);return}switch(this.insertionMode){case z.INITIAL:{Hl(this,t);break}case z.BEFORE_HTML:{Jl(this,t);break}case z.BEFORE_HEAD:{eu(this,t);break}case z.IN_HEAD:{tu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{nu(this,t);break}case z.AFTER_HEAD:{ru(this,t);break}case z.TEXT:{this._insertCharacters(t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{bm(this,t);break}case z.IN_COLUMN_GROUP:{Ff(this,t);break}case z.AFTER_BODY:{zf(this,t);break}case z.AFTER_AFTER_BODY:{Od(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){cg(this,t);return}switch(this.insertionMode){case z.INITIAL:case z.BEFORE_HTML:case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_TEMPLATE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{cg(this,t);break}case z.IN_TABLE_TEXT:{ql(this,t);break}case z.AFTER_BODY:{jO(this,t);break}case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{WO(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case z.INITIAL:{GO(this,t);break}case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:{this._err(t,ie.misplacedDoctype);break}case z.IN_TABLE_TEXT:{ql(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ie.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?m4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case z.INITIAL:{Hl(this,t);break}case z.BEFORE_HTML:{VO(this,t);break}case z.BEFORE_HEAD:{YO(this,t);break}case z.IN_HEAD:{Ys(this,t);break}case z.IN_HEAD_NO_SCRIPT:{ZO(this,t);break}case z.AFTER_HEAD:{eD(this,t);break}case z.IN_BODY:{Fr(this,t);break}case z.IN_TABLE:{Kc(this,t);break}case z.IN_TABLE_TEXT:{ql(this,t);break}case z.IN_CAPTION:{XD(this,t);break}case z.IN_COLUMN_GROUP:{ap(this,t);break}case z.IN_TABLE_BODY:{kh(this,t);break}case z.IN_ROW:{Ih(this,t);break}case z.IN_CELL:{JD(this,t);break}case z.IN_SELECT:{iS(this,t);break}case z.IN_SELECT_IN_TABLE:{t4(this,t);break}case z.IN_TEMPLATE:{r4(this,t);break}case z.AFTER_BODY:{i4(this,t);break}case z.IN_FRAMESET:{a4(this,t);break}case z.AFTER_FRAMESET:{c4(this,t);break}case z.AFTER_AFTER_BODY:{u4(this,t);break}case z.AFTER_AFTER_FRAMESET:{d4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?g4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case z.INITIAL:{Hl(this,t);break}case z.BEFORE_HTML:{KO(this,t);break}case z.BEFORE_HEAD:{XO(this,t);break}case z.IN_HEAD:{QO(this,t);break}case z.IN_HEAD_NO_SCRIPT:{JO(this,t);break}case z.AFTER_HEAD:{tD(this,t);break}case z.IN_BODY:{Ah(this,t);break}case z.TEXT:{UD(this,t);break}case z.IN_TABLE:{Tu(this,t);break}case z.IN_TABLE_TEXT:{ql(this,t);break}case z.IN_CAPTION:{QD(this,t);break}case z.IN_COLUMN_GROUP:{ZD(this,t);break}case z.IN_TABLE_BODY:{lg(this,t);break}case z.IN_ROW:{sS(this,t);break}case z.IN_CELL:{e4(this,t);break}case z.IN_SELECT:{aS(this,t);break}case z.IN_SELECT_IN_TABLE:{n4(this,t);break}case z.IN_TEMPLATE:{s4(this,t);break}case z.AFTER_BODY:{cS(this,t);break}case z.IN_FRAMESET:{o4(this,t);break}case z.AFTER_FRAMESET:{l4(this,t);break}case z.AFTER_AFTER_BODY:{Od(this,t);break}}}onEof(t){switch(this.insertionMode){case z.INITIAL:{Hl(this,t);break}case z.BEFORE_HTML:{Jl(this,t);break}case z.BEFORE_HEAD:{eu(this,t);break}case z.IN_HEAD:{tu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{nu(this,t);break}case z.AFTER_HEAD:{ru(this,t);break}case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{eS(this,t);break}case z.TEXT:{$D(this,t);break}case z.IN_TABLE_TEXT:{ql(this,t);break}case z.IN_TEMPLATE:{oS(this,t);break}case z.AFTER_BODY:case z.IN_FRAMESET:case z.AFTER_FRAMESET:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{ip(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.TEXT:case z.IN_COLUMN_GROUP:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{this._insertCharacters(t);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:case z.AFTER_BODY:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{YT(this,t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{bm(this,t);break}case z.IN_TABLE_TEXT:{tS(this,t);break}}}};function FO(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):JT(e,t),n}function zO(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function UO(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let i=0,a=s;a!==n;i++,a=s){s=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),c=o&&i>=LO;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=$O(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function $O(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function HO(e,t,n){const r=e.treeAdapter.getTagName(t),s=_h(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);s===u.TEMPLATE&&i===pe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function qO(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,i=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,s.tagID)}function sp(e,t){for(let n=0;n<DO;n++){const r=FO(e,t);if(!r)break;const s=zO(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const i=UO(e,s,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&HO(e,a,i),qO(e,s,r)}}function cg(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function jO(e,t){e._appendCommentNode(t,e.openElements.items[0])}function WO(e,t){e._appendCommentNode(t,e.document)}function ip(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function GO(e,t){e._setDocumentType(t);const n=t.forceQuirks?hs.QUIRKS:vO(t);xO(t)||e._err(t,ie.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=z.BEFORE_HTML}function Hl(e,t){e._err(t,ie.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,hs.QUIRKS),e.insertionMode=z.BEFORE_HTML,e._processToken(t)}function VO(e,t){t.tagID===u.HTML?(e._insertElement(t,pe.HTML),e.insertionMode=z.BEFORE_HEAD):Jl(e,t)}function KO(e,t){const n=t.tagID;(n===u.HTML||n===u.HEAD||n===u.BODY||n===u.BR)&&Jl(e,t)}function Jl(e,t){e._insertFakeRootElement(),e.insertionMode=z.BEFORE_HEAD,e._processToken(t)}function YO(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.HEAD:{e._insertElement(t,pe.HTML),e.headElement=e.openElements.current,e.insertionMode=z.IN_HEAD;break}default:eu(e,t)}}function XO(e,t){const n=t.tagID;n===u.HEAD||n===u.BODY||n===u.HTML||n===u.BR?eu(e,t):e._err(t,ie.endTagWithoutMatchingOpenElement)}function eu(e,t){e._insertFakeElement(V.HEAD,u.HEAD),e.headElement=e.openElements.current,e.insertionMode=z.IN_HEAD,e._processToken(t)}function Ys(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case u.TITLE:{e._switchToTextParsing(t,es.RCDATA);break}case u.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,es.RAWTEXT):(e._insertElement(t,pe.HTML),e.insertionMode=z.IN_HEAD_NO_SCRIPT);break}case u.NOFRAMES:case u.STYLE:{e._switchToTextParsing(t,es.RAWTEXT);break}case u.SCRIPT:{e._switchToTextParsing(t,es.SCRIPT_DATA);break}case u.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(z.IN_TEMPLATE);break}case u.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:tu(e,t)}}function QO(e,t){switch(t.tagID){case u.HEAD:{e.openElements.pop(),e.insertionMode=z.AFTER_HEAD;break}case u.BODY:case u.BR:case u.HTML:{tu(e,t);break}case u.TEMPLATE:{Io(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function Io(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==u.TEMPLATE&&e._err(t,ie.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(u.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ie.endTagWithoutMatchingOpenElement)}function tu(e,t){e.openElements.pop(),e.insertionMode=z.AFTER_HEAD,e._processToken(t)}function ZO(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.BASEFONT:case u.BGSOUND:case u.HEAD:case u.LINK:case u.META:case u.NOFRAMES:case u.STYLE:{Ys(e,t);break}case u.NOSCRIPT:{e._err(t,ie.nestedNoscriptInHead);break}default:nu(e,t)}}function JO(e,t){switch(t.tagID){case u.NOSCRIPT:{e.openElements.pop(),e.insertionMode=z.IN_HEAD;break}case u.BR:{nu(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function nu(e,t){const n=t.type===zt.EOF?ie.openElementsLeftAfterEof:ie.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=z.IN_HEAD,e._processToken(t)}function eD(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.BODY:{e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=z.IN_BODY;break}case u.FRAMESET:{e._insertElement(t,pe.HTML),e.insertionMode=z.IN_FRAMESET;break}case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:case u.NOFRAMES:case u.SCRIPT:case u.STYLE:case u.TEMPLATE:case u.TITLE:{e._err(t,ie.abandonedHeadElementChild),e.openElements.push(e.headElement,u.HEAD),Ys(e,t),e.openElements.remove(e.headElement);break}case u.HEAD:{e._err(t,ie.misplacedStartTagForHeadElement);break}default:ru(e,t)}}function tD(e,t){switch(t.tagID){case u.BODY:case u.HTML:case u.BR:{ru(e,t);break}case u.TEMPLATE:{Io(e,t);break}default:e._err(t,ie.endTagWithoutMatchingOpenElement)}}function ru(e,t){e._insertFakeElement(V.BODY,u.BODY),e.insertionMode=z.IN_BODY,wh(e,t)}function wh(e,t){switch(t.type){case zt.CHARACTER:{XT(e,t);break}case zt.WHITESPACE_CHARACTER:{YT(e,t);break}case zt.COMMENT:{cg(e,t);break}case zt.START_TAG:{Fr(e,t);break}case zt.END_TAG:{Ah(e,t);break}case zt.EOF:{eS(e,t);break}}}function YT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function XT(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function nD(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function rD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function sD(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,pe.HTML),e.insertionMode=z.IN_FRAMESET)}function iD(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function aD(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&og.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,pe.HTML)}function oD(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function cD(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,pe.HTML),n||(e.formElement=e.openElements.current))}function lD(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===u.LI&&s===u.LI||(n===u.DD||n===u.DT)&&(s===u.DD||s===u.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==u.ADDRESS&&s!==u.DIV&&s!==u.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,pe.HTML)}function uD(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.tokenizer.state=es.PLAINTEXT}function dD(e,t){e.openElements.hasInScope(u.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(u.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1}function fD(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A);n&&(sp(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function hD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function mD(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(u.NOBR)&&(sp(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,pe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function gD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function bD(e,t){e.treeAdapter.getDocumentMode(e.document)!==hs.QUIRKS&&e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=z.IN_TABLE}function QT(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ZT(e){const t=zT(e,$a.TYPE);return t!=null&&t.toLowerCase()===OO}function pD(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,pe.HTML),ZT(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function yD(e,t){e._appendElement(t,pe.HTML),t.ackSelfClosing=!0}function ED(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._appendElement(t,pe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function CD(e,t){t.tagName=V.IMG,t.tagID=u.IMG,QT(e,t)}function xD(e,t){e._insertElement(t,pe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=es.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=z.TEXT}function vD(e,t){e.openElements.hasInButtonScope(u.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,es.RAWTEXT)}function TD(e,t){e.framesetOk=!1,e._switchToTextParsing(t,es.RAWTEXT)}function i1(e,t){e._switchToTextParsing(t,es.RAWTEXT)}function SD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===z.IN_TABLE||e.insertionMode===z.IN_CAPTION||e.insertionMode===z.IN_TABLE_BODY||e.insertionMode===z.IN_ROW||e.insertionMode===z.IN_CELL?z.IN_SELECT_IN_TABLE:z.IN_SELECT}function _D(e,t){e.openElements.currentTagId===u.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function wD(e,t){e.openElements.hasInScope(u.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,pe.HTML)}function AD(e,t){e.openElements.hasInScope(u.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(u.RTC),e._insertElement(t,pe.HTML)}function kD(e,t){e._reconstructActiveFormattingElements(),WT(t),rp(t),t.selfClosing?e._appendElement(t,pe.MATHML):e._insertElement(t,pe.MATHML),t.ackSelfClosing=!0}function ID(e,t){e._reconstructActiveFormattingElements(),GT(t),rp(t),t.selfClosing?e._appendElement(t,pe.SVG):e._insertElement(t,pe.SVG),t.ackSelfClosing=!0}function a1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,pe.HTML)}function Fr(e,t){switch(t.tagID){case u.I:case u.S:case u.B:case u.U:case u.EM:case u.TT:case u.BIG:case u.CODE:case u.FONT:case u.SMALL:case u.STRIKE:case u.STRONG:{hD(e,t);break}case u.A:{fD(e,t);break}case u.H1:case u.H2:case u.H3:case u.H4:case u.H5:case u.H6:{aD(e,t);break}case u.P:case u.DL:case u.OL:case u.UL:case u.DIV:case u.DIR:case u.NAV:case u.MAIN:case u.MENU:case u.ASIDE:case u.CENTER:case u.FIGURE:case u.FOOTER:case u.HEADER:case u.HGROUP:case u.DIALOG:case u.DETAILS:case u.ADDRESS:case u.ARTICLE:case u.SEARCH:case u.SECTION:case u.SUMMARY:case u.FIELDSET:case u.BLOCKQUOTE:case u.FIGCAPTION:{iD(e,t);break}case u.LI:case u.DD:case u.DT:{lD(e,t);break}case u.BR:case u.IMG:case u.WBR:case u.AREA:case u.EMBED:case u.KEYGEN:{QT(e,t);break}case u.HR:{ED(e,t);break}case u.RB:case u.RTC:{wD(e,t);break}case u.RT:case u.RP:{AD(e,t);break}case u.PRE:case u.LISTING:{oD(e,t);break}case u.XMP:{vD(e,t);break}case u.SVG:{ID(e,t);break}case u.HTML:{nD(e,t);break}case u.BASE:case u.LINK:case u.META:case u.STYLE:case u.TITLE:case u.SCRIPT:case u.BGSOUND:case u.BASEFONT:case u.TEMPLATE:{Ys(e,t);break}case u.BODY:{rD(e,t);break}case u.FORM:{cD(e,t);break}case u.NOBR:{mD(e,t);break}case u.MATH:{kD(e,t);break}case u.TABLE:{bD(e,t);break}case u.INPUT:{pD(e,t);break}case u.PARAM:case u.TRACK:case u.SOURCE:{yD(e,t);break}case u.IMAGE:{CD(e,t);break}case u.BUTTON:{dD(e,t);break}case u.APPLET:case u.OBJECT:case u.MARQUEE:{gD(e,t);break}case u.IFRAME:{TD(e,t);break}case u.SELECT:{SD(e,t);break}case u.OPTION:case u.OPTGROUP:{_D(e,t);break}case u.NOEMBED:case u.NOFRAMES:{i1(e,t);break}case u.FRAMESET:{sD(e,t);break}case u.TEXTAREA:{xD(e,t);break}case u.NOSCRIPT:{e.options.scriptingEnabled?i1(e,t):a1(e,t);break}case u.PLAINTEXT:{uD(e,t);break}case u.COL:case u.TH:case u.TD:case u.TR:case u.HEAD:case u.FRAME:case u.TBODY:case u.TFOOT:case u.THEAD:case u.CAPTION:case u.COLGROUP:break;default:a1(e,t)}}function RD(e,t){if(e.openElements.hasInScope(u.BODY)&&(e.insertionMode=z.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function BD(e,t){e.openElements.hasInScope(u.BODY)&&(e.insertionMode=z.AFTER_BODY,cS(e,t))}function PD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ND(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(u.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(u.FORM):n&&e.openElements.remove(n))}function OD(e){e.openElements.hasInButtonScope(u.P)||e._insertFakeElement(V.P,u.P),e._closePElement()}function DD(e){e.openElements.hasInListItemScope(u.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(u.LI),e.openElements.popUntilTagNamePopped(u.LI))}function LD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function MD(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function FD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function zD(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,u.BR),e.openElements.pop(),e.framesetOk=!1}function JT(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const i=e.openElements.items[s],a=e.openElements.tagIDs[s];if(r===a&&(r!==u.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(i,a))break}}function Ah(e,t){switch(t.tagID){case u.A:case u.B:case u.I:case u.S:case u.U:case u.EM:case u.TT:case u.BIG:case u.CODE:case u.FONT:case u.NOBR:case u.SMALL:case u.STRIKE:case u.STRONG:{sp(e,t);break}case u.P:{OD(e);break}case u.DL:case u.UL:case u.OL:case u.DIR:case u.DIV:case u.NAV:case u.PRE:case u.MAIN:case u.MENU:case u.ASIDE:case u.BUTTON:case u.CENTER:case u.FIGURE:case u.FOOTER:case u.HEADER:case u.HGROUP:case u.DIALOG:case u.ADDRESS:case u.ARTICLE:case u.DETAILS:case u.SEARCH:case u.SECTION:case u.SUMMARY:case u.LISTING:case u.FIELDSET:case u.BLOCKQUOTE:case u.FIGCAPTION:{PD(e,t);break}case u.LI:{DD(e);break}case u.DD:case u.DT:{LD(e,t);break}case u.H1:case u.H2:case u.H3:case u.H4:case u.H5:case u.H6:{MD(e);break}case u.BR:{zD(e);break}case u.BODY:{RD(e,t);break}case u.HTML:{BD(e,t);break}case u.FORM:{ND(e);break}case u.APPLET:case u.OBJECT:case u.MARQUEE:{FD(e,t);break}case u.TEMPLATE:{Io(e,t);break}default:JT(e,t)}}function eS(e,t){e.tmplInsertionModeStack.length>0?oS(e,t):ip(e,t)}function UD(e,t){var n;t.tagID===u.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function $D(e,t){e._err(t,ie.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function bm(e,t){if(e.openElements.currentTagId!==void 0&&VT.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=z.IN_TABLE_TEXT,t.type){case zt.CHARACTER:{nS(e,t);break}case zt.WHITESPACE_CHARACTER:{tS(e,t);break}}else zu(e,t)}function HD(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,pe.HTML),e.insertionMode=z.IN_CAPTION}function qD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=z.IN_COLUMN_GROUP}function jD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,u.COLGROUP),e.insertionMode=z.IN_COLUMN_GROUP,ap(e,t)}function WD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,pe.HTML),e.insertionMode=z.IN_TABLE_BODY}function GD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,u.TBODY),e.insertionMode=z.IN_TABLE_BODY,kh(e,t)}function VD(e,t){e.openElements.hasInTableScope(u.TABLE)&&(e.openElements.popUntilTagNamePopped(u.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function KD(e,t){ZT(t)?e._appendElement(t,pe.HTML):zu(e,t),t.ackSelfClosing=!0}function YD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,pe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Kc(e,t){switch(t.tagID){case u.TD:case u.TH:case u.TR:{GD(e,t);break}case u.STYLE:case u.SCRIPT:case u.TEMPLATE:{Ys(e,t);break}case u.COL:{jD(e,t);break}case u.FORM:{YD(e,t);break}case u.TABLE:{VD(e,t);break}case u.TBODY:case u.TFOOT:case u.THEAD:{WD(e,t);break}case u.INPUT:{KD(e,t);break}case u.CAPTION:{HD(e,t);break}case u.COLGROUP:{qD(e,t);break}default:zu(e,t)}}function Tu(e,t){switch(t.tagID){case u.TABLE:{e.openElements.hasInTableScope(u.TABLE)&&(e.openElements.popUntilTagNamePopped(u.TABLE),e._resetInsertionMode());break}case u.TEMPLATE:{Io(e,t);break}case u.BODY:case u.CAPTION:case u.COL:case u.COLGROUP:case u.HTML:case u.TBODY:case u.TD:case u.TFOOT:case u.TH:case u.THEAD:case u.TR:break;default:zu(e,t)}}function zu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,wh(e,t),e.fosterParentingEnabled=n}function tS(e,t){e.pendingCharacterTokens.push(t)}function nS(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ql(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)zu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const rS=new Set([u.CAPTION,u.COL,u.COLGROUP,u.TBODY,u.TD,u.TFOOT,u.TH,u.THEAD,u.TR]);function XD(e,t){const n=t.tagID;rS.has(n)?e.openElements.hasInTableScope(u.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(u.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=z.IN_TABLE,Kc(e,t)):Fr(e,t)}function QD(e,t){const n=t.tagID;switch(n){case u.CAPTION:case u.TABLE:{e.openElements.hasInTableScope(u.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(u.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=z.IN_TABLE,n===u.TABLE&&Tu(e,t));break}case u.BODY:case u.COL:case u.COLGROUP:case u.HTML:case u.TBODY:case u.TD:case u.TFOOT:case u.TH:case u.THEAD:case u.TR:break;default:Ah(e,t)}}function ap(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.COL:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case u.TEMPLATE:{Ys(e,t);break}default:Ff(e,t)}}function ZD(e,t){switch(t.tagID){case u.COLGROUP:{e.openElements.currentTagId===u.COLGROUP&&(e.openElements.pop(),e.insertionMode=z.IN_TABLE);break}case u.TEMPLATE:{Io(e,t);break}case u.COL:break;default:Ff(e,t)}}function Ff(e,t){e.openElements.currentTagId===u.COLGROUP&&(e.openElements.pop(),e.insertionMode=z.IN_TABLE,e._processToken(t))}function kh(e,t){switch(t.tagID){case u.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,pe.HTML),e.insertionMode=z.IN_ROW;break}case u.TH:case u.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,u.TR),e.insertionMode=z.IN_ROW,Ih(e,t);break}case u.CAPTION:case u.COL:case u.COLGROUP:case u.TBODY:case u.TFOOT:case u.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE,Kc(e,t));break}default:Kc(e,t)}}function lg(e,t){const n=t.tagID;switch(t.tagID){case u.TBODY:case u.TFOOT:case u.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE);break}case u.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE,Tu(e,t));break}case u.BODY:case u.CAPTION:case u.COL:case u.COLGROUP:case u.HTML:case u.TD:case u.TH:case u.TR:break;default:Tu(e,t)}}function Ih(e,t){switch(t.tagID){case u.TH:case u.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,pe.HTML),e.insertionMode=z.IN_CELL,e.activeFormattingElements.insertMarker();break}case u.CAPTION:case u.COL:case u.COLGROUP:case u.TBODY:case u.TFOOT:case u.THEAD:case u.TR:{e.openElements.hasInTableScope(u.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY,kh(e,t));break}default:Kc(e,t)}}function sS(e,t){switch(t.tagID){case u.TR:{e.openElements.hasInTableScope(u.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY);break}case u.TABLE:{e.openElements.hasInTableScope(u.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY,lg(e,t));break}case u.TBODY:case u.TFOOT:case u.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(u.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY,lg(e,t));break}case u.BODY:case u.CAPTION:case u.COL:case u.COLGROUP:case u.HTML:case u.TD:case u.TH:break;default:Tu(e,t)}}function JD(e,t){const n=t.tagID;rS.has(n)?(e.openElements.hasInTableScope(u.TD)||e.openElements.hasInTableScope(u.TH))&&(e._closeTableCell(),Ih(e,t)):Fr(e,t)}function e4(e,t){const n=t.tagID;switch(n){case u.TD:case u.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=z.IN_ROW);break}case u.TABLE:case u.TBODY:case u.TFOOT:case u.THEAD:case u.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),sS(e,t));break}case u.BODY:case u.CAPTION:case u.COL:case u.COLGROUP:case u.HTML:break;default:Ah(e,t)}}function iS(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.OPTION:{e.openElements.currentTagId===u.OPTION&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case u.OPTGROUP:{e.openElements.currentTagId===u.OPTION&&e.openElements.pop(),e.openElements.currentTagId===u.OPTGROUP&&e.openElements.pop(),e._insertElement(t,pe.HTML);break}case u.HR:{e.openElements.currentTagId===u.OPTION&&e.openElements.pop(),e.openElements.currentTagId===u.OPTGROUP&&e.openElements.pop(),e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case u.INPUT:case u.KEYGEN:case u.TEXTAREA:case u.SELECT:{e.openElements.hasInSelectScope(u.SELECT)&&(e.openElements.popUntilTagNamePopped(u.SELECT),e._resetInsertionMode(),t.tagID!==u.SELECT&&e._processStartTag(t));break}case u.SCRIPT:case u.TEMPLATE:{Ys(e,t);break}}}function aS(e,t){switch(t.tagID){case u.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===u.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===u.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===u.OPTGROUP&&e.openElements.pop();break}case u.OPTION:{e.openElements.currentTagId===u.OPTION&&e.openElements.pop();break}case u.SELECT:{e.openElements.hasInSelectScope(u.SELECT)&&(e.openElements.popUntilTagNamePopped(u.SELECT),e._resetInsertionMode());break}case u.TEMPLATE:{Io(e,t);break}}}function t4(e,t){const n=t.tagID;n===u.CAPTION||n===u.TABLE||n===u.TBODY||n===u.TFOOT||n===u.THEAD||n===u.TR||n===u.TD||n===u.TH?(e.openElements.popUntilTagNamePopped(u.SELECT),e._resetInsertionMode(),e._processStartTag(t)):iS(e,t)}function n4(e,t){const n=t.tagID;n===u.CAPTION||n===u.TABLE||n===u.TBODY||n===u.TFOOT||n===u.THEAD||n===u.TR||n===u.TD||n===u.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(u.SELECT),e._resetInsertionMode(),e.onEndTag(t)):aS(e,t)}function r4(e,t){switch(t.tagID){case u.BASE:case u.BASEFONT:case u.BGSOUND:case u.LINK:case u.META:case u.NOFRAMES:case u.SCRIPT:case u.STYLE:case u.TEMPLATE:case u.TITLE:{Ys(e,t);break}case u.CAPTION:case u.COLGROUP:case u.TBODY:case u.TFOOT:case u.THEAD:{e.tmplInsertionModeStack[0]=z.IN_TABLE,e.insertionMode=z.IN_TABLE,Kc(e,t);break}case u.COL:{e.tmplInsertionModeStack[0]=z.IN_COLUMN_GROUP,e.insertionMode=z.IN_COLUMN_GROUP,ap(e,t);break}case u.TR:{e.tmplInsertionModeStack[0]=z.IN_TABLE_BODY,e.insertionMode=z.IN_TABLE_BODY,kh(e,t);break}case u.TD:case u.TH:{e.tmplInsertionModeStack[0]=z.IN_ROW,e.insertionMode=z.IN_ROW,Ih(e,t);break}default:e.tmplInsertionModeStack[0]=z.IN_BODY,e.insertionMode=z.IN_BODY,Fr(e,t)}}function s4(e,t){t.tagID===u.TEMPLATE&&Io(e,t)}function oS(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(u.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ip(e,t)}function i4(e,t){t.tagID===u.HTML?Fr(e,t):zf(e,t)}function cS(e,t){var n;if(t.tagID===u.HTML){if(e.fragmentContext||(e.insertionMode=z.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===u.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else zf(e,t)}function zf(e,t){e.insertionMode=z.IN_BODY,wh(e,t)}function a4(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.FRAMESET:{e._insertElement(t,pe.HTML);break}case u.FRAME:{e._appendElement(t,pe.HTML),t.ackSelfClosing=!0;break}case u.NOFRAMES:{Ys(e,t);break}}}function o4(e,t){t.tagID===u.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==u.FRAMESET&&(e.insertionMode=z.AFTER_FRAMESET))}function c4(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.NOFRAMES:{Ys(e,t);break}}}function l4(e,t){t.tagID===u.HTML&&(e.insertionMode=z.AFTER_AFTER_FRAMESET)}function u4(e,t){t.tagID===u.HTML?Fr(e,t):Od(e,t)}function Od(e,t){e.insertionMode=z.IN_BODY,wh(e,t)}function d4(e,t){switch(t.tagID){case u.HTML:{Fr(e,t);break}case u.NOFRAMES:{Ys(e,t);break}}}function f4(e,t){t.chars=An,e._insertCharacters(t)}function h4(e,t){e._insertCharacters(t),e.framesetOk=!1}function lS(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==pe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function m4(e,t){if(IO(t))lS(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===pe.MATHML?WT(t):r===pe.SVG&&(RO(t),GT(t)),rp(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function g4(e,t){if(t.tagID===u.P||t.tagID===u.BR){lS(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===pe.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}function uS(e,t){return function(r){let s,i=0,a="";for(;s=e.exec(r);)i!==s.index&&(a+=r.substring(i,s.index)),a+=t.get(s[0].charCodeAt(0)),i=s.index+1;return a+r.substring(i)}}const b4=uS(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),p4=uS(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),y4=new Set([V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR]);function E4(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===pe.HTML&&y4.has(t.treeAdapter.getTagName(e))}const C4={treeAdapter:Ti,scriptingEnabled:!0};function x4(e,t){const n={...C4,...t};return dS(e,n)}function v4(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===V.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===pe.HTML?t.treeAdapter.getTemplateContent(e):e,s=t.treeAdapter.getChildNodes(r);if(s)for(const i of s)n+=dS(i,t);return n}function dS(e,t){return t.treeAdapter.isElementNode(e)?T4(e,t):t.treeAdapter.isTextNode(e)?_4(e,t):t.treeAdapter.isCommentNode(e)?w4(e,t):t.treeAdapter.isDocumentTypeNode(e)?A4(e,t):""}function T4(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${S4(e,t)}>${E4(e,t)?"":`${v4(e,t)}</${n}>`}`}function S4(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case pe.XML:{n+=`xml:${r.name}`;break}case pe.XMLNS:{r.name!=="xmlns"&&(n+="xmlns:"),n+=r.name;break}case pe.XLINK:{n+=`xlink:${r.name}`;break}default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${b4(r.value)}"`}return n}function _4(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),s=n.getParentNode(e),i=s&&n.isElementNode(s)&&n.getTagName(s);return i&&n.getNamespaceURI(s)===pe.HTML&&rO(i,t.scriptingEnabled)?r:p4(r)}function w4(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function A4(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function k4(e,t){return KT.parse(e,t)}function I4(e,t,n){typeof e=="string"&&(n=t,t=e,e=null);const r=KT.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function o1(e){const t=e.includes('"')?"'":'"';return t+e+t}function R4(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${o1(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${o1(n)}`),r}const Gi={isCommentNode:Ch,isElementNode:dt,isTextNode:ui,createDocument(){const e=new Eo([]);return e["x-mode"]=hs.NO_QUIRKS,e},createDocumentFragment(){return new Eo([])},createElement(e,t,n){const r=Object.create(null),s=Object.create(null),i=Object.create(null);for(let o=0;o<n.length;o++){const c=n[o].name;r[c]=n[o].value,s[c]=n[o].namespace,i[c]=n[o].prefix}const a=new qb(e,r,[]);return a.namespace=t,a["x-attribsNamespace"]=s,a["x-attribsPrefix"]=i,a},createCommentNode(e){return new Ub(e)},createTextNode(e){return new yu(e)},appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:s}=n;s&&(s.next=t,t.prev=s),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(e,t){Gi.appendChild(e,t)},getTemplateContent(e){return e.children[0]},setDocumentType(e,t,n,r){const s=R4(t,n,r);let i=e.children.find(a=>Z0(a)&&a.name==="!doctype");i?i.data=s??null:(i=new $b("!doctype",s),Gi.appendChild(e,i)),i["x-name"]=t,i["x-publicId"]=n,i["x-systemId"]=r},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){const n=e.children[e.children.length-1];n&&ui(n)?n.data+=t:Gi.appendChild(e,Gi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&ui(r)?r.data+=t:Gi.insertBefore(e,Gi.createTextNode(t),n)},adoptAttributes(e,t){for(let n=0;n<t.length;n++){const r=t[n].name;e.attribs[r]===void 0&&(e.attribs[r]=t[n].value,e["x-attribsNamespace"][r]=t[n].namespace,e["x-attribsPrefix"][r]=t[n].prefix)}},getFirstChild(e){return e.children[0]},getChildNodes(e){return e.children},getParentNode(e){return e.parent},getAttrList(e){return e.attributes},getTagName(e){return e.name},getNamespaceURI(e){return e.namespace},getTextNodeContent(e){return e.data},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){var t;return(t=e["x-name"])!==null&&t!==void 0?t:""},getDocumentTypeNodePublicId(e){var t;return(t=e["x-publicId"])!==null&&t!==void 0?t:""},getDocumentTypeNodeSystemId(e){var t;return(t=e["x-systemId"])!==null&&t!==void 0?t:""},isDocumentTypeNode(e){return Z0(e)&&e.name==="!doctype"},setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){t.endOffset!=null&&(e.endIndex=t.endOffset),e.sourceCodeLocation={...e.sourceCodeLocation,...t}}};function B4(e,t,n,r){var s;return(s=t.treeAdapter)!==null&&s!==void 0||(t.treeAdapter=Gi),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),n?k4(e,t):I4(r,e,t)}const P4={treeAdapter:Gi};function N4(e){const t="length"in e?e:[e];for(let r=0;r<t.length;r+=1){const s=t[r];ga(s)&&Array.prototype.splice.call(t,r,1,...s.children)}let n="";for(let r=0;r<t.length;r+=1){const s=t[r];n+=x4(s,P4)}return n}const O4=mN((e,t,n,r)=>t._useHtmlParser2?H6(e,t):B4(e,t,n,r)),D4=VN(O4,(e,t)=>t._useHtmlParser2?xh(e,t):N4(e));class L4{_melisearch;_index;_indexName;host;apiKey;constructor(t){this.host=t.host,this.apiKey=t.apiKey,this._indexName=t.indexName}async _getMeliSearch(){return this._melisearch===void 0&&(this._melisearch=new vB({host:this.host,apiKey:this.apiKey})),this._melisearch}async _getIndex(){if(this._index===void 0){const t=await this._getMeliSearch();this._index=t.index(this._indexName)}return this._index}docs={};async addDocument(t){this.docs[t.id]=t}async updateDocument(){console.log(`开始上传数据到 ${this.host}`);const n=await(await this._getIndex()).addDocuments(Object.values(this.docs));console.log("上传结果",n)}build_onFileTree=(t,n)=>{const[r]=t;console.log("开始生成 meilisearch 所需数据结构");const s=Object.keys(r).filter(i=>i.endsWith(".html")).map(i=>[i,r[i]]);for(const[i,a]of s){const o=D4(a.toString()),c=o(".h1,.h2,.h3,.h4,.h5,.h6,.p").toArray(),l={lvl0:o("title").text()};for(const d of c){const f=d.attribs.class;f!=="p"&&(Object.keys(l).forEach(m=>{m.substring(3,4)>f.substring(1,2)&&delete l[m]}),l[`lvl${f.substring(1,2)}`]=o(d).text()),this.addDocument({id:d.attribs.id,content:o(d).text(),url:`${i}#${d.attribs.id}`,...l})}if(i.endsWith("index.html"))break}return this.updateDocument(),n(...t)}}async function M4(...[e,t]){const n=e==="apiProvider"?await t.genApiModule():void 0,r=e==="apiConsumer"?t.remoteCall:void 0;async function s(o,c){async function l(f){return t.middleware&&f<t.middleware.length?t.middleware[f](o,c,()=>l(f+1)):d()}async function d(){try{if(e==="apiProvider"){const f=o.split(".");let m=n;for(const h of f)if(m&&typeof m=="object"&&h in m)m=m[h];else throw new Error(`Method ${o} not found`);if(typeof m=="function")return await m(...c);throw new Error(`${o} is not a function`)}else return await r(o,c)}catch(f){throw console.error("API call failed:",f),f}}return await l(0)}function i(o=[]){return{get(c,l){if(l==="then")return;const d=[...o,l];return new Proxy(function(...f){const m=d.join(".");return s(m,f)},i(d))},apply(c,l,d){const f=o.join(".");return s(f,d)}}}return{API:new Proxy(function(){},i()),RC:s}}class F4{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,n){this.keyToValue.set(t,n),this.valueToKey.set(n,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class fS{constructor(t){this.generateIdentifier=t,this.kv=new F4}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}}class z4 extends fS{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,n){typeof n=="object"?(n.allowProps&&this.classToAllowedProps.set(t,n.allowProps),super.register(t,n.identifier)):super.register(t,n)}getAllowedProps(t){return this.classToAllowedProps.get(t)}}function U4(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function $4(e,t){const n=U4(e);if("find"in n)return n.find(t);const r=n;for(let s=0;s<r.length;s++){const i=r[s];if(t(i))return i}}function Yc(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Dd(e,t){return e.indexOf(t)!==-1}function c1(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class H4{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return $4(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const q4=e=>Object.prototype.toString.call(e).slice(8,-1),hS=e=>typeof e>"u",j4=e=>e===null,Su=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,ug=e=>Su(e)&&Object.keys(e).length===0,oa=e=>Array.isArray(e),W4=e=>typeof e=="string",G4=e=>typeof e=="number"&&!isNaN(e),V4=e=>typeof e=="boolean",K4=e=>e instanceof RegExp,_u=e=>e instanceof Map,wu=e=>e instanceof Set,mS=e=>q4(e)==="Symbol",Y4=e=>e instanceof Date&&!isNaN(e.valueOf()),X4=e=>e instanceof Error,l1=e=>typeof e=="number"&&isNaN(e),Q4=e=>V4(e)||j4(e)||hS(e)||G4(e)||W4(e)||mS(e),Z4=e=>typeof e=="bigint",J4=e=>e===1/0||e===-1/0,e5=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),t5=e=>e instanceof URL,gS=e=>e.replace(/\./g,"\\."),pm=e=>e.map(String).map(gS).join("."),su=e=>{const t=[];let n="";for(let s=0;s<e.length;s++){let i=e.charAt(s);if(i==="\\"&&e.charAt(s+1)==="."){n+=".",s++;continue}if(i==="."){t.push(n),n="";continue}n+=i}const r=n;return t.push(r),t};function ei(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const bS=[ei(hS,"undefined",()=>null,()=>{}),ei(Z4,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),ei(Y4,"Date",e=>e.toISOString(),e=>new Date(e)),ei(X4,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),ei(K4,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),ei(wu,"set",e=>[...e.values()],e=>new Set(e)),ei(_u,"map",e=>[...e.entries()],e=>new Map(e)),ei(e=>l1(e)||J4(e),"number",e=>l1(e)?"NaN":e>0?"Infinity":"-Infinity",Number),ei(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),ei(t5,"URL",e=>e.toString(),e=>new URL(e))];function Rh(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const pS=Rh((e,t)=>mS(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),n5=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),yS=Rh(e5,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=n5[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function ES(e,t){return e?.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const CS=Rh(ES,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(s=>{r[s]=e[s]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),xS=Rh((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),r5=[CS,pS,xS,yS],u1=(e,t)=>{const n=c1(r5,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=c1(bS,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},vS={};bS.forEach(e=>{vS[e.annotation]=e});const s5=(e,t,n)=>{if(oa(t))switch(t[0]){case"symbol":return pS.untransform(e,t,n);case"class":return CS.untransform(e,t,n);case"custom":return xS.untransform(e,t,n);case"typed-array":return yS.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=vS[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},rc=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function TS(e){if(Dd(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Dd(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Dd(e,"constructor"))throw new Error("constructor is not allowed as a property")}const i5=(e,t)=>{TS(t);for(let n=0;n<t.length;n++){const r=t[n];if(wu(e))e=rc(e,+r);else if(_u(e)){const s=+r,i=+t[++n]==0?"key":"value",a=rc(e,s);switch(i){case"key":e=a;break;case"value":e=e.get(a);break}}else e=e[r]}return e},dg=(e,t,n)=>{if(TS(t),t.length===0)return n(e);let r=e;for(let i=0;i<t.length-1;i++){const a=t[i];if(oa(r)){const o=+a;r=r[o]}else if(Su(r))r=r[a];else if(wu(r)){const o=+a;r=rc(r,o)}else if(_u(r)){if(i===t.length-2)break;const c=+a,l=+t[++i]==0?"key":"value",d=rc(r,c);switch(l){case"key":r=d;break;case"value":r=r.get(d);break}}}const s=t[t.length-1];if(oa(r)?r[+s]=n(r[+s]):Su(r)&&(r[s]=n(r[s])),wu(r)){const i=rc(r,+s),a=n(i);i!==a&&(r.delete(i),r.add(a))}if(_u(r)){const i=+t[t.length-2],a=rc(r,i);switch(+s==0?"key":"value"){case"key":{const c=n(a);r.set(c,r.get(a)),c!==a&&r.delete(a);break}case"value":{r.set(a,n(r.get(a)));break}}}return e};function fg(e,t,n=[]){if(!e)return;if(!oa(e)){Yc(e,(i,a)=>fg(i,t,[...n,...su(a)]));return}const[r,s]=e;s&&Yc(s,(i,a)=>{fg(i,t,[...n,...su(a)])}),t(r,n)}function a5(e,t,n){return fg(t,(r,s)=>{e=dg(e,s,i=>s5(i,r,n))}),e}function o5(e,t){function n(r,s){const i=i5(e,su(s));r.map(su).forEach(a=>{e=dg(e,a,()=>i)})}if(oa(t)){const[r,s]=t;r.forEach(i=>{e=dg(e,su(i),()=>e)}),s&&Yc(s,n)}else Yc(t,n);return e}const c5=(e,t)=>Su(e)||oa(e)||_u(e)||wu(e)||ES(e,t);function l5(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function u5(e,t){const n={};let r;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(o=>o.map(String)).sort((o,c)=>o.length-c.length));const[i,...a]=s;i.length===0?r=a.map(pm):n[pm(i)]=a.map(pm)}),r?ug(n)?[r]:[r,n]:ug(n)?void 0:n}const SS=(e,t,n,r,s=[],i=[],a=new Map)=>{const o=Q4(e);if(!o){l5(e,s,t);const h=a.get(e);if(h)return r?{transformedValue:null}:h}if(!c5(e,n)){const h=u1(e,n),g=h?{transformedValue:h.value,annotations:[h.type]}:{transformedValue:e};return o||a.set(e,g),g}if(Dd(i,e))return{transformedValue:null};const c=u1(e,n),l=c?.value??e,d=oa(l)?[]:{},f={};Yc(l,(h,g)=>{if(g==="__proto__"||g==="constructor"||g==="prototype")throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);const b=SS(h,t,n,r,[...s,g],[...i,e],a);d[g]=b.transformedValue,oa(b.annotations)?f[g]=b.annotations:Su(b.annotations)&&Yc(b.annotations,(p,y)=>{f[gS(g)+"."+y]=p})});const m=ug(f)?{transformedValue:d,annotations:c?[c.type]:void 0}:{transformedValue:d,annotations:c?[c.type,f]:f};return o||a.set(e,m),m};function _S(e){return Object.prototype.toString.call(e).slice(8,-1)}function d1(e){return _S(e)==="Array"}function d5(e){if(_S(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function f5(e,t,n,r,s){const i={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=n),s&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function hg(e,t={}){if(d1(e))return e.map(s=>hg(s,t));if(!d5(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((s,i)=>{if(d1(t.props)&&!t.props.includes(i))return s;const a=e[i],o=hg(a,t);return f5(s,i,o,e,t.nonenumerable),s},{})}class un{constructor({dedupe:t=!1}={}){this.classRegistry=new z4,this.symbolRegistry=new fS(n=>n.description??""),this.customTransformerRegistry=new H4,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=SS(t,n,this,this.dedupe),s={json:r.transformedValue};r.annotations&&(s.meta={...s.meta,values:r.annotations});const i=u5(n,this.dedupe);return i&&(s.meta={...s.meta,referentialEqualities:i}),s}deserialize(t){const{json:n,meta:r}=t;let s=hg(n);return r?.values&&(s=a5(s,r.values,this)),r?.referentialEqualities&&(s=o5(s,r.referentialEqualities)),s}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t))}registerClass(t,n){this.classRegistry.register(t,n)}registerSymbol(t,n){this.symbolRegistry.register(t,n)}registerCustom(t,n){this.customTransformerRegistry.register({name:n,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}}un.defaultInstance=new un;un.serialize=un.defaultInstance.serialize.bind(un.defaultInstance);un.deserialize=un.defaultInstance.deserialize.bind(un.defaultInstance);un.stringify=un.defaultInstance.stringify.bind(un.defaultInstance);un.parse=un.defaultInstance.parse.bind(un.defaultInstance);un.registerClass=un.defaultInstance.registerClass.bind(un.defaultInstance);un.registerSymbol=un.defaultInstance.registerSymbol.bind(un.defaultInstance);un.registerCustom=un.defaultInstance.registerCustom.bind(un.defaultInstance);un.allowErrorProps=un.defaultInstance.allowErrorProps.bind(un.defaultInstance);const h5=un.stringify;function gd(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ym={exports:{}};/*!
1541
+
1542
+ JSZip v3.10.1 - A JavaScript class for generating and reading zip files
1543
+ <http://stuartk.com/jszip>
1544
+
1545
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
1546
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
1547
+
1548
+ JSZip uses the library pako released under the MIT license :
1549
+ https://github.com/nodeca/pako/blob/main/LICENSE
1550
+ */var f1;function m5(){return f1||(f1=1,(function(e,t){(function(n){e.exports=n()})(function(){return(function n(r,s,i){function a(l,d){if(!s[l]){if(!r[l]){var f=typeof gd=="function"&&gd;if(!d&&f)return f(l,!0);if(o)return o(l,!0);var m=new Error("Cannot find module '"+l+"'");throw m.code="MODULE_NOT_FOUND",m}var h=s[l]={exports:{}};r[l][0].call(h.exports,function(g){var b=r[l][1][g];return a(b||g)},h,h.exports,n,r,s,i)}return s[l].exports}for(var o=typeof gd=="function"&&gd,c=0;c<i.length;c++)a(i[c]);return a})({1:[function(n,r,s){var i=n("./utils"),a=n("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";s.encode=function(c){for(var l,d,f,m,h,g,b,p=[],y=0,C=c.length,A=C,T=i.getTypeOf(c)!=="string";y<c.length;)A=C-y,f=T?(l=c[y++],d=y<C?c[y++]:0,y<C?c[y++]:0):(l=c.charCodeAt(y++),d=y<C?c.charCodeAt(y++):0,y<C?c.charCodeAt(y++):0),m=l>>2,h=(3&l)<<4|d>>4,g=1<A?(15&d)<<2|f>>6:64,b=2<A?63&f:64,p.push(o.charAt(m)+o.charAt(h)+o.charAt(g)+o.charAt(b));return p.join("")},s.decode=function(c){var l,d,f,m,h,g,b=0,p=0,y="data:";if(c.substr(0,y.length)===y)throw new Error("Invalid base64 input, it looks like a data url.");var C,A=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===o.charAt(64)&&A--,c.charAt(c.length-2)===o.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(C=a.uint8array?new Uint8Array(0|A):new Array(0|A);b<c.length;)l=o.indexOf(c.charAt(b++))<<2|(m=o.indexOf(c.charAt(b++)))>>4,d=(15&m)<<4|(h=o.indexOf(c.charAt(b++)))>>2,f=(3&h)<<6|(g=o.indexOf(c.charAt(b++))),C[p++]=l,h!==64&&(C[p++]=d),g!==64&&(C[p++]=f);return C}},{"./support":30,"./utils":32}],2:[function(n,r,s){var i=n("./external"),a=n("./stream/DataWorker"),o=n("./stream/Crc32Probe"),c=n("./stream/DataLengthProbe");function l(d,f,m,h,g){this.compressedSize=d,this.uncompressedSize=f,this.crc32=m,this.compression=h,this.compressedContent=g}l.prototype={getContentWorker:function(){var d=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return d.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),d},getCompressedWorker:function(){return new a(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},l.createWorkerFrom=function(d,f,m){return d.pipe(new o).pipe(new c("uncompressedSize")).pipe(f.compressWorker(m)).pipe(new c("compressedSize")).withStreamInfo("compression",f)},r.exports=l},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(n,r,s){var i=n("./stream/GenericWorker");s.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},s.DEFLATE=n("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(n,r,s){var i=n("./utils"),a=(function(){for(var o,c=[],l=0;l<256;l++){o=l;for(var d=0;d<8;d++)o=1&o?3988292384^o>>>1:o>>>1;c[l]=o}return c})();r.exports=function(o,c){return o!==void 0&&o.length?i.getTypeOf(o)!=="string"?(function(l,d,f,m){var h=a,g=m+f;l^=-1;for(var b=m;b<g;b++)l=l>>>8^h[255&(l^d[b])];return-1^l})(0|c,o,o.length,0):(function(l,d,f,m){var h=a,g=m+f;l^=-1;for(var b=m;b<g;b++)l=l>>>8^h[255&(l^d.charCodeAt(b))];return-1^l})(0|c,o,o.length,0):0}},{"./utils":32}],5:[function(n,r,s){s.base64=!1,s.binary=!1,s.dir=!1,s.createFolders=!0,s.date=null,s.compression=null,s.compressionOptions=null,s.comment=null,s.unixPermissions=null,s.dosPermissions=null},{}],6:[function(n,r,s){var i=null;i=typeof Promise<"u"?Promise:n("lie"),r.exports={Promise:i}},{lie:37}],7:[function(n,r,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",a=n("pako"),o=n("./utils"),c=n("./stream/GenericWorker"),l=i?"uint8array":"array";function d(f,m){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",o.inherits(d,c),d.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,f.data),!1)},d.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},d.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},d.prototype._createPako=function(){this._pako=new a[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(m){f.push({data:m,meta:f.meta})}},s.compressWorker=function(f){return new d("Deflate",f)},s.uncompressWorker=function(){return new d("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,s){function i(h,g){var b,p="";for(b=0;b<g;b++)p+=String.fromCharCode(255&h),h>>>=8;return p}function a(h,g,b,p,y,C){var A,T,S=h.file,w=h.compression,v=C!==l.utf8encode,O=o.transformTo("string",C(S.name)),F=o.transformTo("string",l.utf8encode(S.name)),X=S.comment,me=o.transformTo("string",C(X)),N=o.transformTo("string",l.utf8encode(X)),Y=F.length!==S.name.length,x=N.length!==X.length,Z="",Le="",re="",He=S.dir,he=S.date,ze={crc32:0,compressedSize:0,uncompressedSize:0};g&&!b||(ze.crc32=h.crc32,ze.compressedSize=h.compressedSize,ze.uncompressedSize=h.uncompressedSize);var Q=0;g&&(Q|=8),v||!Y&&!x||(Q|=2048);var K=0,Qe=0;He&&(K|=16),y==="UNIX"?(Qe=798,K|=(function(Be,et){var Wt=Be;return Be||(Wt=et?16893:33204),(65535&Wt)<<16})(S.unixPermissions,He)):(Qe=20,K|=(function(Be){return 63&(Be||0)})(S.dosPermissions)),A=he.getUTCHours(),A<<=6,A|=he.getUTCMinutes(),A<<=5,A|=he.getUTCSeconds()/2,T=he.getUTCFullYear()-1980,T<<=4,T|=he.getUTCMonth()+1,T<<=5,T|=he.getUTCDate(),Y&&(Le=i(1,1)+i(d(O),4)+F,Z+="up"+i(Le.length,2)+Le),x&&(re=i(1,1)+i(d(me),4)+N,Z+="uc"+i(re.length,2)+re);var De="";return De+=`
1551
+ \0`,De+=i(Q,2),De+=w.magic,De+=i(A,2),De+=i(T,2),De+=i(ze.crc32,4),De+=i(ze.compressedSize,4),De+=i(ze.uncompressedSize,4),De+=i(O.length,2),De+=i(Z.length,2),{fileRecord:f.LOCAL_FILE_HEADER+De+O+Z,dirRecord:f.CENTRAL_FILE_HEADER+i(Qe,2)+De+i(me.length,2)+"\0\0\0\0"+i(K,4)+i(p,4)+O+Z+me}}var o=n("../utils"),c=n("../stream/GenericWorker"),l=n("../utf8"),d=n("../crc32"),f=n("../signature");function m(h,g,b,p){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=b,this.encodeFileName=p,this.streamFiles=h,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(m,c),m.prototype.push=function(h){var g=h.meta.percent||0,b=this.entriesCount,p=this._sources.length;this.accumulate?this.contentBuffer.push(h):(this.bytesWritten+=h.data.length,c.prototype.push.call(this,{data:h.data,meta:{currentFile:this.currentFile,percent:b?(g+100*(b-p-1))/b:100}}))},m.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var g=this.streamFiles&&!h.file.dir;if(g){var b=a(h,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:b.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(h){this.accumulate=!1;var g=this.streamFiles&&!h.file.dir,b=a(h,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(b.dirRecord),g)this.push({data:(function(p){return f.DATA_DESCRIPTOR+i(p.crc32,4)+i(p.compressedSize,4)+i(p.uncompressedSize,4)})(h),meta:{percent:100}});else for(this.push({data:b.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var h=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var b=this.bytesWritten-h,p=(function(y,C,A,T,S){var w=o.transformTo("string",S(T));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(y,2)+i(y,2)+i(C,4)+i(A,4)+i(w.length,2)+w})(this.dirRecords.length,b,h,this.zipComment,this.encodeFileName);this.push({data:p,meta:{percent:100}})},m.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},m.prototype.registerPrevious=function(h){this._sources.push(h);var g=this;return h.on("data",function(b){g.processChunk(b)}),h.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),h.on("error",function(b){g.error(b)}),this},m.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},m.prototype.error=function(h){var g=this._sources;if(!c.prototype.error.call(this,h))return!1;for(var b=0;b<g.length;b++)try{g[b].error(h)}catch{}return!0},m.prototype.lock=function(){c.prototype.lock.call(this);for(var h=this._sources,g=0;g<h.length;g++)h[g].lock()},r.exports=m},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,s){var i=n("../compressions"),a=n("./ZipFileWorker");s.generateWorker=function(o,c,l){var d=new a(c.streamFiles,l,c.platform,c.encodeFileName),f=0;try{o.forEach(function(m,h){f++;var g=(function(C,A){var T=C||A,S=i[T];if(!S)throw new Error(T+" is not a valid compression method !");return S})(h.options.compression,c.compression),b=h.options.compressionOptions||c.compressionOptions||{},p=h.dir,y=h.date;h._compressWorker(g,b).withStreamInfo("file",{name:m,dir:p,date:y,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(d)}),d.entriesCount=f}catch(m){d.error(m)}return d}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,s){function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var a=new i;for(var o in this)typeof this[o]!="function"&&(a[o]=this[o]);return a}}(i.prototype=n("./object")).loadAsync=n("./load"),i.support=n("./support"),i.defaults=n("./defaults"),i.version="3.10.1",i.loadAsync=function(a,o){return new i().loadAsync(a,o)},i.external=n("./external"),r.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,s){var i=n("./utils"),a=n("./external"),o=n("./utf8"),c=n("./zipEntries"),l=n("./stream/Crc32Probe"),d=n("./nodejsUtils");function f(m){return new a.Promise(function(h,g){var b=m.decompressed.getContentWorker().pipe(new l);b.on("error",function(p){g(p)}).on("end",function(){b.streamInfo.crc32!==m.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}r.exports=function(m,h){var g=this;return h=i.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),d.isNode&&d.isStream(m)?a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",m,!0,h.optimizedBinaryString,h.base64).then(function(b){var p=new c(h);return p.load(b),p}).then(function(b){var p=[a.Promise.resolve(b)],y=b.files;if(h.checkCRC32)for(var C=0;C<y.length;C++)p.push(f(y[C]));return a.Promise.all(p)}).then(function(b){for(var p=b.shift(),y=p.files,C=0;C<y.length;C++){var A=y[C],T=A.fileNameStr,S=i.resolve(A.fileNameStr);g.file(S,A.decompressed,{binary:!0,optimizedBinaryString:!0,date:A.date,dir:A.dir,comment:A.fileCommentStr.length?A.fileCommentStr:null,unixPermissions:A.unixPermissions,dosPermissions:A.dosPermissions,createFolders:h.createFolders}),A.dir||(g.file(S).unsafeOriginalName=T)}return p.zipComment.length&&(g.comment=p.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,s){var i=n("../utils"),a=n("../stream/GenericWorker");function o(c,l){a.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(l)}i.inherits(o,a),o.prototype._bindStream=function(c){var l=this;(this._stream=c).pause(),c.on("data",function(d){l.push({data:d,meta:{percent:0}})}).on("error",function(d){l.isPaused?this.generatedError=d:l.error(d)}).on("end",function(){l.isPaused?l._upstreamEnded=!0:l.end()})},o.prototype.pause=function(){return!!a.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,s){var i=n("readable-stream").Readable;function a(o,c,l){i.call(this,c),this._helper=o;var d=this;o.on("data",function(f,m){d.push(f)||d._helper.pause(),l&&l(m)}).on("error",function(f){d.emit("error",f)}).on("end",function(){d.push(null)})}n("../utils").inherits(a,i),a.prototype._read=function(){this._helper.resume()},r.exports=a},{"../utils":32,"readable-stream":16}],14:[function(n,r,s){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,a){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,a);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,a)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var a=new Buffer(i);return a.fill(0),a},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(n,r,s){function i(S,w,v){var O,F=o.getTypeOf(w),X=o.extend(v||{},d);X.date=X.date||new Date,X.compression!==null&&(X.compression=X.compression.toUpperCase()),typeof X.unixPermissions=="string"&&(X.unixPermissions=parseInt(X.unixPermissions,8)),X.unixPermissions&&16384&X.unixPermissions&&(X.dir=!0),X.dosPermissions&&16&X.dosPermissions&&(X.dir=!0),X.dir&&(S=y(S)),X.createFolders&&(O=p(S))&&C.call(this,O,!0);var me=F==="string"&&X.binary===!1&&X.base64===!1;v&&v.binary!==void 0||(X.binary=!me),(w instanceof f&&w.uncompressedSize===0||X.dir||!w||w.length===0)&&(X.base64=!1,X.binary=!0,w="",X.compression="STORE",F="string");var N=null;N=w instanceof f||w instanceof c?w:g.isNode&&g.isStream(w)?new b(S,w):o.prepareContent(S,w,X.binary,X.optimizedBinaryString,X.base64);var Y=new m(S,N,X);this.files[S]=Y}var a=n("./utf8"),o=n("./utils"),c=n("./stream/GenericWorker"),l=n("./stream/StreamHelper"),d=n("./defaults"),f=n("./compressedObject"),m=n("./zipObject"),h=n("./generate"),g=n("./nodejsUtils"),b=n("./nodejs/NodejsStreamInputAdapter"),p=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var w=S.lastIndexOf("/");return 0<w?S.substring(0,w):""},y=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},C=function(S,w){return w=w!==void 0?w:d.createFolders,S=y(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:w}),this.files[S]};function A(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var T={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var w,v,O;for(w in this.files)O=this.files[w],(v=w.slice(this.root.length,w.length))&&w.slice(0,this.root.length)===this.root&&S(v,O)},filter:function(S){var w=[];return this.forEach(function(v,O){S(v,O)&&w.push(O)}),w},file:function(S,w,v){if(arguments.length!==1)return S=this.root+S,i.call(this,S,w,v),this;if(A(S)){var O=S;return this.filter(function(X,me){return!me.dir&&O.test(X)})}var F=this.files[this.root+S];return F&&!F.dir?F:null},folder:function(S){if(!S)return this;if(A(S))return this.filter(function(F,X){return X.dir&&S.test(F)});var w=this.root+S,v=C.call(this,w),O=this.clone();return O.root=v.name,O},remove:function(S){S=this.root+S;var w=this.files[S];if(w||(S.slice(-1)!=="/"&&(S+="/"),w=this.files[S]),w&&!w.dir)delete this.files[S];else for(var v=this.filter(function(F,X){return X.name.slice(0,S.length)===S}),O=0;O<v.length;O++)delete this.files[v[O].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(S){var w,v={};try{if((v=o.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=v.type.toLowerCase(),v.compression=v.compression.toUpperCase(),v.type==="binarystring"&&(v.type="string"),!v.type)throw new Error("No output type specified.");o.checkSupport(v.type),v.platform!=="darwin"&&v.platform!=="freebsd"&&v.platform!=="linux"&&v.platform!=="sunos"||(v.platform="UNIX"),v.platform==="win32"&&(v.platform="DOS");var O=v.comment||this.comment||"";w=h.generateWorker(this,v,O)}catch(F){(w=new c("error")).error(F)}return new l(w,v.type||"string",v.mimeType)},generateAsync:function(S,w){return this.generateInternalStream(S).accumulate(w)},generateNodeStream:function(S,w){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(w)}};r.exports=T},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,s){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,s){var i=n("./DataReader");function a(o){i.call(this,o);for(var c=0;c<this.data.length;c++)o[c]=255&o[c]}n("../utils").inherits(a,i),a.prototype.byteAt=function(o){return this.data[this.zero+o]},a.prototype.lastIndexOfSignature=function(o){for(var c=o.charCodeAt(0),l=o.charCodeAt(1),d=o.charCodeAt(2),f=o.charCodeAt(3),m=this.length-4;0<=m;--m)if(this.data[m]===c&&this.data[m+1]===l&&this.data[m+2]===d&&this.data[m+3]===f)return m-this.zero;return-1},a.prototype.readAndCheckSignature=function(o){var c=o.charCodeAt(0),l=o.charCodeAt(1),d=o.charCodeAt(2),f=o.charCodeAt(3),m=this.readData(4);return c===m[0]&&l===m[1]&&d===m[2]&&f===m[3]},a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=a},{"../utils":32,"./DataReader":18}],18:[function(n,r,s){var i=n("../utils");function a(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}a.prototype={checkOffset:function(o){this.checkIndex(this.index+o)},checkIndex:function(o){if(this.length<this.zero+o||o<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+o+"). Corrupted zip ?")},setIndex:function(o){this.checkIndex(o),this.index=o},skip:function(o){this.setIndex(this.index+o)},byteAt:function(){},readInt:function(o){var c,l=0;for(this.checkOffset(o),c=this.index+o-1;c>=this.index;c--)l=(l<<8)+this.byteAt(c);return this.index+=o,l},readString:function(o){return i.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},r.exports=a},{"../utils":32}],19:[function(n,r,s){var i=n("./Uint8ArrayReader");function a(o){i.call(this,o)}n("../utils").inherits(a,i),a.prototype.readData=function(o){this.checkOffset(o);var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=a},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,s){var i=n("./DataReader");function a(o){i.call(this,o)}n("../utils").inherits(a,i),a.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},a.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},a.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},a.prototype.readData=function(o){this.checkOffset(o);var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=a},{"../utils":32,"./DataReader":18}],21:[function(n,r,s){var i=n("./ArrayReader");function a(o){i.call(this,o)}n("../utils").inherits(a,i),a.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=a},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,s){var i=n("../utils"),a=n("../support"),o=n("./ArrayReader"),c=n("./StringReader"),l=n("./NodeBufferReader"),d=n("./Uint8ArrayReader");r.exports=function(f){var m=i.getTypeOf(f);return i.checkSupport(m),m!=="string"||a.uint8array?m==="nodebuffer"?new l(f):a.uint8array?new d(i.transformTo("uint8array",f)):new o(i.transformTo("array",f)):new c(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,s){s.LOCAL_FILE_HEADER="PK",s.CENTRAL_FILE_HEADER="PK",s.CENTRAL_DIRECTORY_END="PK",s.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",s.ZIP64_CENTRAL_DIRECTORY_END="PK",s.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,s){var i=n("./GenericWorker"),a=n("../utils");function o(c){i.call(this,"ConvertWorker to "+c),this.destType=c}a.inherits(o,i),o.prototype.processChunk=function(c){this.push({data:a.transformTo(this.destType,c.data),meta:c.meta})},r.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,s){var i=n("./GenericWorker"),a=n("../crc32");function o(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(o,i),o.prototype.processChunk=function(c){this.streamInfo.crc32=a(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,s){var i=n("../utils"),a=n("./GenericWorker");function o(c){a.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}i.inherits(o,a),o.prototype.processChunk=function(c){if(c){var l=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=l+c.data.length}a.prototype.processChunk.call(this,c)},r.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,s){var i=n("../utils"),a=n("./GenericWorker");function o(c){a.call(this,"DataWorker");var l=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(d){l.dataIsReady=!0,l.data=d,l.max=d&&d.length||0,l.type=i.getTypeOf(d),l.isPaused||l._tickAndRepeat()},function(d){l.error(d)})}i.inherits(o,a),o.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,l=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,l);break;case"uint8array":c=this.data.subarray(this.index,l);break;case"array":case"nodebuffer":c=this.data.slice(this.index,l)}return this.index=l,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,s){function i(a){this.name=a||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(a){this.emit("data",a)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(a){this.emit("error",a)}return!0},error:function(a){return!this.isFinished&&(this.isPaused?this.generatedError=a:(this.isFinished=!0,this.emit("error",a),this.previous&&this.previous.error(a),this.cleanUp()),!0)},on:function(a,o){return this._listeners[a].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(a,o){if(this._listeners[a])for(var c=0;c<this._listeners[a].length;c++)this._listeners[a][c].call(this,o)},pipe:function(a){return a.registerPrevious(this)},registerPrevious:function(a){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=a.streamInfo,this.mergeStreamInfo(),this.previous=a;var o=this;return a.on("data",function(c){o.processChunk(c)}),a.on("end",function(){o.end()}),a.on("error",function(c){o.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var a=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),a=!0),this.previous&&this.previous.resume(),!a},flush:function(){},processChunk:function(a){this.push(a)},withStreamInfo:function(a,o){return this.extraStreamInfo[a]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var a in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,a)&&(this.streamInfo[a]=this.extraStreamInfo[a])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var a="Worker "+this.name;return this.previous?this.previous+" -> "+a:a}},r.exports=i},{}],29:[function(n,r,s){var i=n("../utils"),a=n("./ConvertWorker"),o=n("./GenericWorker"),c=n("../base64"),l=n("../support"),d=n("../external"),f=null;if(l.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(g,b){return new d.Promise(function(p,y){var C=[],A=g._internalType,T=g._outputType,S=g._mimeType;g.on("data",function(w,v){C.push(w),b&&b(v)}).on("error",function(w){C=[],y(w)}).on("end",function(){try{var w=(function(v,O,F){switch(v){case"blob":return i.newBlob(i.transformTo("arraybuffer",O),F);case"base64":return c.encode(O);default:return i.transformTo(v,O)}})(T,(function(v,O){var F,X=0,me=null,N=0;for(F=0;F<O.length;F++)N+=O[F].length;switch(v){case"string":return O.join("");case"array":return Array.prototype.concat.apply([],O);case"uint8array":for(me=new Uint8Array(N),F=0;F<O.length;F++)me.set(O[F],X),X+=O[F].length;return me;case"nodebuffer":return Buffer.concat(O);default:throw new Error("concat : unsupported type '"+v+"'")}})(A,C),S);p(w)}catch(v){y(v)}C=[]}).resume()})}function h(g,b,p){var y=b;switch(b){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=b,this._mimeType=p,i.checkSupport(y),this._worker=g.pipe(new a(y)),g.lock()}catch(C){this._worker=new o("error"),this._worker.error(C)}}h.prototype={accumulate:function(g){return m(this,g)},on:function(g,b){var p=this;return g==="data"?this._worker.on(g,function(y){b.call(p,y.data,y.meta)}):this._worker.on(g,function(){i.delay(b,arguments,p)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(i.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},g)}},r.exports=h},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,s){if(s.base64=!0,s.array=!0,s.string=!0,s.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",s.nodebuffer=typeof Buffer<"u",s.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")s.blob=!1;else{var i=new ArrayBuffer(0);try{s.blob=new Blob([i],{type:"application/zip"}).size===0}catch{try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);a.append(i),s.blob=a.getBlob("application/zip").size===0}catch{s.blob=!1}}}try{s.nodestream=!!n("readable-stream").Readable}catch{s.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,s){for(var i=n("./utils"),a=n("./support"),o=n("./nodejsUtils"),c=n("./stream/GenericWorker"),l=new Array(256),d=0;d<256;d++)l[d]=252<=d?6:248<=d?5:240<=d?4:224<=d?3:192<=d?2:1;l[254]=l[254]=1;function f(){c.call(this,"utf-8 decode"),this.leftOver=null}function m(){c.call(this,"utf-8 encode")}s.utf8encode=function(h){return a.nodebuffer?o.newBufferFrom(h,"utf-8"):(function(g){var b,p,y,C,A,T=g.length,S=0;for(C=0;C<T;C++)(64512&(p=g.charCodeAt(C)))==55296&&C+1<T&&(64512&(y=g.charCodeAt(C+1)))==56320&&(p=65536+(p-55296<<10)+(y-56320),C++),S+=p<128?1:p<2048?2:p<65536?3:4;for(b=a.uint8array?new Uint8Array(S):new Array(S),C=A=0;A<S;C++)(64512&(p=g.charCodeAt(C)))==55296&&C+1<T&&(64512&(y=g.charCodeAt(C+1)))==56320&&(p=65536+(p-55296<<10)+(y-56320),C++),p<128?b[A++]=p:(p<2048?b[A++]=192|p>>>6:(p<65536?b[A++]=224|p>>>12:(b[A++]=240|p>>>18,b[A++]=128|p>>>12&63),b[A++]=128|p>>>6&63),b[A++]=128|63&p);return b})(h)},s.utf8decode=function(h){return a.nodebuffer?i.transformTo("nodebuffer",h).toString("utf-8"):(function(g){var b,p,y,C,A=g.length,T=new Array(2*A);for(b=p=0;b<A;)if((y=g[b++])<128)T[p++]=y;else if(4<(C=l[y]))T[p++]=65533,b+=C-1;else{for(y&=C===2?31:C===3?15:7;1<C&&b<A;)y=y<<6|63&g[b++],C--;1<C?T[p++]=65533:y<65536?T[p++]=y:(y-=65536,T[p++]=55296|y>>10&1023,T[p++]=56320|1023&y)}return T.length!==p&&(T.subarray?T=T.subarray(0,p):T.length=p),i.applyFromCharCode(T)})(h=i.transformTo(a.uint8array?"uint8array":"array",h))},i.inherits(f,c),f.prototype.processChunk=function(h){var g=i.transformTo(a.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var b=g;(g=new Uint8Array(b.length+this.leftOver.length)).set(this.leftOver,0),g.set(b,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var p=(function(C,A){var T;for((A=A||C.length)>C.length&&(A=C.length),T=A-1;0<=T&&(192&C[T])==128;)T--;return T<0||T===0?A:T+l[C[T]]>A?T:A})(g),y=g;p!==g.length&&(a.uint8array?(y=g.subarray(0,p),this.leftOver=g.subarray(p,g.length)):(y=g.slice(0,p),this.leftOver=g.slice(p,g.length))),this.push({data:s.utf8decode(y),meta:h.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=f,i.inherits(m,c),m.prototype.processChunk=function(h){this.push({data:s.utf8encode(h.data),meta:h.meta})},s.Utf8EncodeWorker=m},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,s){var i=n("./support"),a=n("./base64"),o=n("./nodejsUtils"),c=n("./external");function l(b){return b}function d(b,p){for(var y=0;y<b.length;++y)p[y]=255&b.charCodeAt(y);return p}n("setimmediate"),s.newBlob=function(b,p){s.checkSupport("blob");try{return new Blob([b],{type:p})}catch{try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(b),y.getBlob(p)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(b,p,y){var C=[],A=0,T=b.length;if(T<=y)return String.fromCharCode.apply(null,b);for(;A<T;)p==="array"||p==="nodebuffer"?C.push(String.fromCharCode.apply(null,b.slice(A,Math.min(A+y,T)))):C.push(String.fromCharCode.apply(null,b.subarray(A,Math.min(A+y,T)))),A+=y;return C.join("")},stringifyByChar:function(b){for(var p="",y=0;y<b.length;y++)p+=String.fromCharCode(b[y]);return p},applyCanBeUsed:{uint8array:(function(){try{return i.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return i.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch{return!1}})()}};function m(b){var p=65536,y=s.getTypeOf(b),C=!0;if(y==="uint8array"?C=f.applyCanBeUsed.uint8array:y==="nodebuffer"&&(C=f.applyCanBeUsed.nodebuffer),C)for(;1<p;)try{return f.stringifyByChunk(b,y,p)}catch{p=Math.floor(p/2)}return f.stringifyByChar(b)}function h(b,p){for(var y=0;y<b.length;y++)p[y]=b[y];return p}s.applyFromCharCode=m;var g={};g.string={string:l,array:function(b){return d(b,new Array(b.length))},arraybuffer:function(b){return g.string.uint8array(b).buffer},uint8array:function(b){return d(b,new Uint8Array(b.length))},nodebuffer:function(b){return d(b,o.allocBuffer(b.length))}},g.array={string:m,array:l,arraybuffer:function(b){return new Uint8Array(b).buffer},uint8array:function(b){return new Uint8Array(b)},nodebuffer:function(b){return o.newBufferFrom(b)}},g.arraybuffer={string:function(b){return m(new Uint8Array(b))},array:function(b){return h(new Uint8Array(b),new Array(b.byteLength))},arraybuffer:l,uint8array:function(b){return new Uint8Array(b)},nodebuffer:function(b){return o.newBufferFrom(new Uint8Array(b))}},g.uint8array={string:m,array:function(b){return h(b,new Array(b.length))},arraybuffer:function(b){return b.buffer},uint8array:l,nodebuffer:function(b){return o.newBufferFrom(b)}},g.nodebuffer={string:m,array:function(b){return h(b,new Array(b.length))},arraybuffer:function(b){return g.nodebuffer.uint8array(b).buffer},uint8array:function(b){return h(b,new Uint8Array(b.length))},nodebuffer:l},s.transformTo=function(b,p){if(p=p||"",!b)return p;s.checkSupport(b);var y=s.getTypeOf(p);return g[y][b](p)},s.resolve=function(b){for(var p=b.split("/"),y=[],C=0;C<p.length;C++){var A=p[C];A==="."||A===""&&C!==0&&C!==p.length-1||(A===".."?y.pop():y.push(A))}return y.join("/")},s.getTypeOf=function(b){return typeof b=="string"?"string":Object.prototype.toString.call(b)==="[object Array]"?"array":i.nodebuffer&&o.isBuffer(b)?"nodebuffer":i.uint8array&&b instanceof Uint8Array?"uint8array":i.arraybuffer&&b instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(b){if(!i[b.toLowerCase()])throw new Error(b+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(b){var p,y,C="";for(y=0;y<(b||"").length;y++)C+="\\x"+((p=b.charCodeAt(y))<16?"0":"")+p.toString(16).toUpperCase();return C},s.delay=function(b,p,y){setImmediate(function(){b.apply(y||null,p||[])})},s.inherits=function(b,p){function y(){}y.prototype=p.prototype,b.prototype=new y},s.extend=function(){var b,p,y={};for(b=0;b<arguments.length;b++)for(p in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],p)&&y[p]===void 0&&(y[p]=arguments[b][p]);return y},s.prepareContent=function(b,p,y,C,A){return c.Promise.resolve(p).then(function(T){return i.blob&&(T instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(T))!==-1)&&typeof FileReader<"u"?new c.Promise(function(S,w){var v=new FileReader;v.onload=function(O){S(O.target.result)},v.onerror=function(O){w(O.target.error)},v.readAsArrayBuffer(T)}):T}).then(function(T){var S=s.getTypeOf(T);return S?(S==="arraybuffer"?T=s.transformTo("uint8array",T):S==="string"&&(A?T=a.decode(T):y&&C!==!0&&(T=(function(w){return d(w,i.uint8array?new Uint8Array(w.length):new Array(w.length))})(T))),T):c.Promise.reject(new Error("Can't read the data of '"+b+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,s){var i=n("./reader/readerFor"),a=n("./utils"),o=n("./signature"),c=n("./zipEntry"),l=n("./support");function d(f){this.files=[],this.loadOptions=f}d.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var m=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+a.pretty(m)+", expected "+a.pretty(f)+")")}},isSignature:function(f,m){var h=this.reader.index;this.reader.setIndex(f);var g=this.reader.readString(4)===m;return this.reader.setIndex(h),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),m=l.uint8array?"uint8array":"array",h=a.transformTo(m,f);this.zipComment=this.loadOptions.decodeFileName(h)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,m,h,g=this.zip64EndOfCentralSize-44;0<g;)f=this.reader.readInt(2),m=this.reader.readInt(4),h=this.reader.readData(m),this.zip64ExtensibleData[f]={id:f,length:m,value:h}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,m;for(f=0;f<this.files.length;f++)m=this.files[f],this.reader.setIndex(m.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),m.readLocalPart(this.reader),m.handleUTF8(),m.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(f=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var m=f;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===a.MAX_VALUE_16BITS||this.diskWithCentralDirStart===a.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===a.MAX_VALUE_16BITS||this.centralDirRecords===a.MAX_VALUE_16BITS||this.centralDirSize===a.MAX_VALUE_32BITS||this.centralDirOffset===a.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var h=this.centralDirOffset+this.centralDirSize;this.zip64&&(h+=20,h+=12+this.zip64EndOfCentralSize);var g=m-h;if(0<g)this.isSignature(m,o.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=d},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,s){var i=n("./reader/readerFor"),a=n("./utils"),o=n("./compressedObject"),c=n("./crc32"),l=n("./utf8"),d=n("./compressions"),f=n("./support");function m(h,g){this.options=h,this.loadOptions=g}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var g,b;if(h.skip(22),this.fileNameLength=h.readInt(2),b=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(b),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(p){for(var y in d)if(Object.prototype.hasOwnProperty.call(d,y)&&d[y].magic===p)return d[y];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+a.pretty(this.compressionMethod)+" unknown (inner file : "+a.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,g,h.readData(this.compressedSize))},readCentralPart:function(h){this.versionMadeBy=h.readInt(2),h.skip(2),this.bitFlag=h.readInt(2),this.compressionMethod=h.readString(2),this.date=h.readDate(),this.crc32=h.readInt(4),this.compressedSize=h.readInt(4),this.uncompressedSize=h.readInt(4);var g=h.readInt(2);if(this.extraFieldsLength=h.readInt(2),this.fileCommentLength=h.readInt(2),this.diskNumberStart=h.readInt(2),this.internalFileAttributes=h.readInt(2),this.externalFileAttributes=h.readInt(4),this.localHeaderOffset=h.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");h.skip(g),this.readExtraFields(h),this.parseZIP64ExtraField(h),this.fileComment=h.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var h=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),h==0&&(this.dosPermissions=63&this.externalFileAttributes),h==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var h=i(this.extraFields[1].value);this.uncompressedSize===a.MAX_VALUE_32BITS&&(this.uncompressedSize=h.readInt(8)),this.compressedSize===a.MAX_VALUE_32BITS&&(this.compressedSize=h.readInt(8)),this.localHeaderOffset===a.MAX_VALUE_32BITS&&(this.localHeaderOffset=h.readInt(8)),this.diskNumberStart===a.MAX_VALUE_32BITS&&(this.diskNumberStart=h.readInt(4))}},readExtraFields:function(h){var g,b,p,y=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<y;)g=h.readInt(2),b=h.readInt(2),p=h.readData(b),this.extraFields[g]={id:g,length:b,value:p};h.setIndex(y)},handleUTF8:function(){var h=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=l.utf8decode(this.fileName),this.fileCommentStr=l.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var b=a.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(b)}var p=this.findExtraFieldUnicodeComment();if(p!==null)this.fileCommentStr=p;else{var y=a.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var g=i(h.value);return g.readInt(1)!==1||c(this.fileName)!==g.readInt(4)?null:l.utf8decode(g.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var g=i(h.value);return g.readInt(1)!==1||c(this.fileComment)!==g.readInt(4)?null:l.utf8decode(g.readData(h.length-5))}return null}},r.exports=m},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,s){function i(g,b,p){this.name=g,this.dir=p.dir,this.date=p.date,this.comment=p.comment,this.unixPermissions=p.unixPermissions,this.dosPermissions=p.dosPermissions,this._data=b,this._dataBinary=p.binary,this.options={compression:p.compression,compressionOptions:p.compressionOptions}}var a=n("./stream/StreamHelper"),o=n("./stream/DataWorker"),c=n("./utf8"),l=n("./compressedObject"),d=n("./stream/GenericWorker");i.prototype={internalStream:function(g){var b=null,p="string";try{if(!g)throw new Error("No output type specified.");var y=(p=g.toLowerCase())==="string"||p==="text";p!=="binarystring"&&p!=="text"||(p="string"),b=this._decompressWorker();var C=!this._dataBinary;C&&!y&&(b=b.pipe(new c.Utf8EncodeWorker)),!C&&y&&(b=b.pipe(new c.Utf8DecodeWorker))}catch(A){(b=new d("error")).error(A)}return new a(b,p,"")},async:function(g,b){return this.internalStream(g).accumulate(b)},nodeStream:function(g,b){return this.internalStream(g||"nodebuffer").toNodejsStream(b)},_compressWorker:function(g,b){if(this._data instanceof l&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var p=this._decompressWorker();return this._dataBinary||(p=p.pipe(new c.Utf8EncodeWorker)),l.createWorkerFrom(p,g,b)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof d?this._data:new o(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],m=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<f.length;h++)i.prototype[f[h]]=m;r.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,s){(function(i){var a,o,c=i.MutationObserver||i.WebKitMutationObserver;if(c){var l=0,d=new c(g),f=i.document.createTextNode("");d.observe(f,{characterData:!0}),a=function(){f.data=l=++l%2}}else if(i.setImmediate||i.MessageChannel===void 0)a="document"in i&&"onreadystatechange"in i.document.createElement("script")?function(){var b=i.document.createElement("script");b.onreadystatechange=function(){g(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},i.document.documentElement.appendChild(b)}:function(){setTimeout(g,0)};else{var m=new i.MessageChannel;m.port1.onmessage=g,a=function(){m.port2.postMessage(0)}}var h=[];function g(){var b,p;o=!0;for(var y=h.length;y;){for(p=h,h=[],b=-1;++b<y;)p[b]();y=h.length}o=!1}r.exports=function(b){h.push(b)!==1||o||a()}}).call(this,typeof dd<"u"?dd:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,s){var i=n("immediate");function a(){}var o={},c=["REJECTED"],l=["FULFILLED"],d=["PENDING"];function f(y){if(typeof y!="function")throw new TypeError("resolver must be a function");this.state=d,this.queue=[],this.outcome=void 0,y!==a&&b(this,y)}function m(y,C,A){this.promise=y,typeof C=="function"&&(this.onFulfilled=C,this.callFulfilled=this.otherCallFulfilled),typeof A=="function"&&(this.onRejected=A,this.callRejected=this.otherCallRejected)}function h(y,C,A){i(function(){var T;try{T=C(A)}catch(S){return o.reject(y,S)}T===y?o.reject(y,new TypeError("Cannot resolve promise with itself")):o.resolve(y,T)})}function g(y){var C=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof C=="function")return function(){C.apply(y,arguments)}}function b(y,C){var A=!1;function T(v){A||(A=!0,o.reject(y,v))}function S(v){A||(A=!0,o.resolve(y,v))}var w=p(function(){C(S,T)});w.status==="error"&&T(w.value)}function p(y,C){var A={};try{A.value=y(C),A.status="success"}catch(T){A.status="error",A.value=T}return A}(r.exports=f).prototype.finally=function(y){if(typeof y!="function")return this;var C=this.constructor;return this.then(function(A){return C.resolve(y()).then(function(){return A})},function(A){return C.resolve(y()).then(function(){throw A})})},f.prototype.catch=function(y){return this.then(null,y)},f.prototype.then=function(y,C){if(typeof y!="function"&&this.state===l||typeof C!="function"&&this.state===c)return this;var A=new this.constructor(a);return this.state!==d?h(A,this.state===l?y:C,this.outcome):this.queue.push(new m(A,y,C)),A},m.prototype.callFulfilled=function(y){o.resolve(this.promise,y)},m.prototype.otherCallFulfilled=function(y){h(this.promise,this.onFulfilled,y)},m.prototype.callRejected=function(y){o.reject(this.promise,y)},m.prototype.otherCallRejected=function(y){h(this.promise,this.onRejected,y)},o.resolve=function(y,C){var A=p(g,C);if(A.status==="error")return o.reject(y,A.value);var T=A.value;if(T)b(y,T);else{y.state=l,y.outcome=C;for(var S=-1,w=y.queue.length;++S<w;)y.queue[S].callFulfilled(C)}return y},o.reject=function(y,C){y.state=c,y.outcome=C;for(var A=-1,T=y.queue.length;++A<T;)y.queue[A].callRejected(C);return y},f.resolve=function(y){return y instanceof this?y:o.resolve(new this(a),y)},f.reject=function(y){var C=new this(a);return o.reject(C,y)},f.all=function(y){var C=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=y.length,T=!1;if(!A)return this.resolve([]);for(var S=new Array(A),w=0,v=-1,O=new this(a);++v<A;)F(y[v],v);return O;function F(X,me){C.resolve(X).then(function(N){S[me]=N,++w!==A||T||(T=!0,o.resolve(O,S))},function(N){T||(T=!0,o.reject(O,N))})}},f.race=function(y){var C=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=y.length,T=!1;if(!A)return this.resolve([]);for(var S=-1,w=new this(a);++S<A;)v=y[S],C.resolve(v).then(function(O){T||(T=!0,o.resolve(w,O))},function(O){T||(T=!0,o.reject(w,O))});var v;return w}},{immediate:36}],38:[function(n,r,s){var i={};(0,n("./lib/utils/common").assign)(i,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,s){var i=n("./zlib/deflate"),a=n("./utils/common"),o=n("./utils/strings"),c=n("./zlib/messages"),l=n("./zlib/zstream"),d=Object.prototype.toString,f=0,m=-1,h=0,g=8;function b(y){if(!(this instanceof b))return new b(y);this.options=a.assign({level:m,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},y||{});var C=this.options;C.raw&&0<C.windowBits?C.windowBits=-C.windowBits:C.gzip&&0<C.windowBits&&C.windowBits<16&&(C.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var A=i.deflateInit2(this.strm,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(A!==f)throw new Error(c[A]);if(C.header&&i.deflateSetHeader(this.strm,C.header),C.dictionary){var T;if(T=typeof C.dictionary=="string"?o.string2buf(C.dictionary):d.call(C.dictionary)==="[object ArrayBuffer]"?new Uint8Array(C.dictionary):C.dictionary,(A=i.deflateSetDictionary(this.strm,T))!==f)throw new Error(c[A]);this._dict_set=!0}}function p(y,C){var A=new b(C);if(A.push(y,!0),A.err)throw A.msg||c[A.err];return A.result}b.prototype.push=function(y,C){var A,T,S=this.strm,w=this.options.chunkSize;if(this.ended)return!1;T=C===~~C?C:C===!0?4:0,typeof y=="string"?S.input=o.string2buf(y):d.call(y)==="[object ArrayBuffer]"?S.input=new Uint8Array(y):S.input=y,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new a.Buf8(w),S.next_out=0,S.avail_out=w),(A=i.deflate(S,T))!==1&&A!==f)return this.onEnd(A),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||T!==4&&T!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(a.shrinkBuf(S.output,S.next_out))):this.onData(a.shrinkBuf(S.output,S.next_out)))}while((0<S.avail_in||S.avail_out===0)&&A!==1);return T===4?(A=i.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===f):T!==2||(this.onEnd(f),!(S.avail_out=0))},b.prototype.onData=function(y){this.chunks.push(y)},b.prototype.onEnd=function(y){y===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},s.Deflate=b,s.deflate=p,s.deflateRaw=function(y,C){return(C=C||{}).raw=!0,p(y,C)},s.gzip=function(y,C){return(C=C||{}).gzip=!0,p(y,C)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,s){var i=n("./zlib/inflate"),a=n("./utils/common"),o=n("./utils/strings"),c=n("./zlib/constants"),l=n("./zlib/messages"),d=n("./zlib/zstream"),f=n("./zlib/gzheader"),m=Object.prototype.toString;function h(b){if(!(this instanceof h))return new h(b);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},b||{});var p=this.options;p.raw&&0<=p.windowBits&&p.windowBits<16&&(p.windowBits=-p.windowBits,p.windowBits===0&&(p.windowBits=-15)),!(0<=p.windowBits&&p.windowBits<16)||b&&b.windowBits||(p.windowBits+=32),15<p.windowBits&&p.windowBits<48&&(15&p.windowBits)==0&&(p.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var y=i.inflateInit2(this.strm,p.windowBits);if(y!==c.Z_OK)throw new Error(l[y]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function g(b,p){var y=new h(p);if(y.push(b,!0),y.err)throw y.msg||l[y.err];return y.result}h.prototype.push=function(b,p){var y,C,A,T,S,w,v=this.strm,O=this.options.chunkSize,F=this.options.dictionary,X=!1;if(this.ended)return!1;C=p===~~p?p:p===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof b=="string"?v.input=o.binstring2buf(b):m.call(b)==="[object ArrayBuffer]"?v.input=new Uint8Array(b):v.input=b,v.next_in=0,v.avail_in=v.input.length;do{if(v.avail_out===0&&(v.output=new a.Buf8(O),v.next_out=0,v.avail_out=O),(y=i.inflate(v,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&F&&(w=typeof F=="string"?o.string2buf(F):m.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,y=i.inflateSetDictionary(this.strm,w)),y===c.Z_BUF_ERROR&&X===!0&&(y=c.Z_OK,X=!1),y!==c.Z_STREAM_END&&y!==c.Z_OK)return this.onEnd(y),!(this.ended=!0);v.next_out&&(v.avail_out!==0&&y!==c.Z_STREAM_END&&(v.avail_in!==0||C!==c.Z_FINISH&&C!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(A=o.utf8border(v.output,v.next_out),T=v.next_out-A,S=o.buf2string(v.output,A),v.next_out=T,v.avail_out=O-T,T&&a.arraySet(v.output,v.output,A,T,0),this.onData(S)):this.onData(a.shrinkBuf(v.output,v.next_out)))),v.avail_in===0&&v.avail_out===0&&(X=!0)}while((0<v.avail_in||v.avail_out===0)&&y!==c.Z_STREAM_END);return y===c.Z_STREAM_END&&(C=c.Z_FINISH),C===c.Z_FINISH?(y=i.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===c.Z_OK):C!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(v.avail_out=0))},h.prototype.onData=function(b){this.chunks.push(b)},h.prototype.onEnd=function(b){b===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},s.Inflate=h,s.inflate=g,s.inflateRaw=function(b,p){return(p=p||{}).raw=!0,g(b,p)},s.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,s){var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";s.assign=function(c){for(var l=Array.prototype.slice.call(arguments,1);l.length;){var d=l.shift();if(d){if(typeof d!="object")throw new TypeError(d+"must be non-object");for(var f in d)d.hasOwnProperty(f)&&(c[f]=d[f])}}return c},s.shrinkBuf=function(c,l){return c.length===l?c:c.subarray?c.subarray(0,l):(c.length=l,c)};var a={arraySet:function(c,l,d,f,m){if(l.subarray&&c.subarray)c.set(l.subarray(d,d+f),m);else for(var h=0;h<f;h++)c[m+h]=l[d+h]},flattenChunks:function(c){var l,d,f,m,h,g;for(l=f=0,d=c.length;l<d;l++)f+=c[l].length;for(g=new Uint8Array(f),l=m=0,d=c.length;l<d;l++)h=c[l],g.set(h,m),m+=h.length;return g}},o={arraySet:function(c,l,d,f,m){for(var h=0;h<f;h++)c[m+h]=l[d+h]},flattenChunks:function(c){return[].concat.apply([],c)}};s.setTyped=function(c){c?(s.Buf8=Uint8Array,s.Buf16=Uint16Array,s.Buf32=Int32Array,s.assign(s,a)):(s.Buf8=Array,s.Buf16=Array,s.Buf32=Array,s.assign(s,o))},s.setTyped(i)},{}],42:[function(n,r,s){var i=n("./common"),a=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch{a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{o=!1}for(var c=new i.Buf8(256),l=0;l<256;l++)c[l]=252<=l?6:248<=l?5:240<=l?4:224<=l?3:192<=l?2:1;function d(f,m){if(m<65537&&(f.subarray&&o||!f.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var h="",g=0;g<m;g++)h+=String.fromCharCode(f[g]);return h}c[254]=c[254]=1,s.string2buf=function(f){var m,h,g,b,p,y=f.length,C=0;for(b=0;b<y;b++)(64512&(h=f.charCodeAt(b)))==55296&&b+1<y&&(64512&(g=f.charCodeAt(b+1)))==56320&&(h=65536+(h-55296<<10)+(g-56320),b++),C+=h<128?1:h<2048?2:h<65536?3:4;for(m=new i.Buf8(C),b=p=0;p<C;b++)(64512&(h=f.charCodeAt(b)))==55296&&b+1<y&&(64512&(g=f.charCodeAt(b+1)))==56320&&(h=65536+(h-55296<<10)+(g-56320),b++),h<128?m[p++]=h:(h<2048?m[p++]=192|h>>>6:(h<65536?m[p++]=224|h>>>12:(m[p++]=240|h>>>18,m[p++]=128|h>>>12&63),m[p++]=128|h>>>6&63),m[p++]=128|63&h);return m},s.buf2binstring=function(f){return d(f,f.length)},s.binstring2buf=function(f){for(var m=new i.Buf8(f.length),h=0,g=m.length;h<g;h++)m[h]=f.charCodeAt(h);return m},s.buf2string=function(f,m){var h,g,b,p,y=m||f.length,C=new Array(2*y);for(h=g=0;h<y;)if((b=f[h++])<128)C[g++]=b;else if(4<(p=c[b]))C[g++]=65533,h+=p-1;else{for(b&=p===2?31:p===3?15:7;1<p&&h<y;)b=b<<6|63&f[h++],p--;1<p?C[g++]=65533:b<65536?C[g++]=b:(b-=65536,C[g++]=55296|b>>10&1023,C[g++]=56320|1023&b)}return d(C,g)},s.utf8border=function(f,m){var h;for((m=m||f.length)>f.length&&(m=f.length),h=m-1;0<=h&&(192&f[h])==128;)h--;return h<0||h===0?m:h+c[f[h]]>m?h:m}},{"./common":41}],43:[function(n,r,s){r.exports=function(i,a,o,c){for(var l=65535&i|0,d=i>>>16&65535|0,f=0;o!==0;){for(o-=f=2e3<o?2e3:o;d=d+(l=l+a[c++]|0)|0,--f;);l%=65521,d%=65521}return l|d<<16|0}},{}],44:[function(n,r,s){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,s){var i=(function(){for(var a,o=[],c=0;c<256;c++){a=c;for(var l=0;l<8;l++)a=1&a?3988292384^a>>>1:a>>>1;o[c]=a}return o})();r.exports=function(a,o,c,l){var d=i,f=l+c;a^=-1;for(var m=l;m<f;m++)a=a>>>8^d[255&(a^o[m])];return-1^a}},{}],46:[function(n,r,s){var i,a=n("../utils/common"),o=n("./trees"),c=n("./adler32"),l=n("./crc32"),d=n("./messages"),f=0,m=4,h=0,g=-2,b=-1,p=4,y=2,C=8,A=9,T=286,S=30,w=19,v=2*T+1,O=15,F=3,X=258,me=X+F+1,N=42,Y=113,x=1,Z=2,Le=3,re=4;function He(E,de){return E.msg=d[de],de}function he(E){return(E<<1)-(4<E?9:0)}function ze(E){for(var de=E.length;0<=--de;)E[de]=0}function Q(E){var de=E.state,se=de.pending;se>E.avail_out&&(se=E.avail_out),se!==0&&(a.arraySet(E.output,de.pending_buf,de.pending_out,se,E.next_out),E.next_out+=se,de.pending_out+=se,E.total_out+=se,E.avail_out-=se,de.pending-=se,de.pending===0&&(de.pending_out=0))}function K(E,de){o._tr_flush_block(E,0<=E.block_start?E.block_start:-1,E.strstart-E.block_start,de),E.block_start=E.strstart,Q(E.strm)}function Qe(E,de){E.pending_buf[E.pending++]=de}function De(E,de){E.pending_buf[E.pending++]=de>>>8&255,E.pending_buf[E.pending++]=255&de}function Be(E,de){var se,L,I=E.max_chain_length,W=E.strstart,U=E.prev_length,q=E.nice_match,$=E.strstart>E.w_size-me?E.strstart-(E.w_size-me):0,ae=E.window,Pe=E.w_mask,ye=E.prev,Ye=E.strstart+X,It=ae[W+U-1],ht=ae[W+U];E.prev_length>=E.good_match&&(I>>=2),q>E.lookahead&&(q=E.lookahead);do if(ae[(se=de)+U]===ht&&ae[se+U-1]===It&&ae[se]===ae[W]&&ae[++se]===ae[W+1]){W+=2,se++;do;while(ae[++W]===ae[++se]&&ae[++W]===ae[++se]&&ae[++W]===ae[++se]&&ae[++W]===ae[++se]&&ae[++W]===ae[++se]&&ae[++W]===ae[++se]&&ae[++W]===ae[++se]&&ae[++W]===ae[++se]&&W<Ye);if(L=X-(Ye-W),W=Ye-X,U<L){if(E.match_start=de,q<=(U=L))break;It=ae[W+U-1],ht=ae[W+U]}}while((de=ye[de&Pe])>$&&--I!=0);return U<=E.lookahead?U:E.lookahead}function et(E){var de,se,L,I,W,U,q,$,ae,Pe,ye=E.w_size;do{if(I=E.window_size-E.lookahead-E.strstart,E.strstart>=ye+(ye-me)){for(a.arraySet(E.window,E.window,ye,ye,0),E.match_start-=ye,E.strstart-=ye,E.block_start-=ye,de=se=E.hash_size;L=E.head[--de],E.head[de]=ye<=L?L-ye:0,--se;);for(de=se=ye;L=E.prev[--de],E.prev[de]=ye<=L?L-ye:0,--se;);I+=ye}if(E.strm.avail_in===0)break;if(U=E.strm,q=E.window,$=E.strstart+E.lookahead,ae=I,Pe=void 0,Pe=U.avail_in,ae<Pe&&(Pe=ae),se=Pe===0?0:(U.avail_in-=Pe,a.arraySet(q,U.input,U.next_in,Pe,$),U.state.wrap===1?U.adler=c(U.adler,q,Pe,$):U.state.wrap===2&&(U.adler=l(U.adler,q,Pe,$)),U.next_in+=Pe,U.total_in+=Pe,Pe),E.lookahead+=se,E.lookahead+E.insert>=F)for(W=E.strstart-E.insert,E.ins_h=E.window[W],E.ins_h=(E.ins_h<<E.hash_shift^E.window[W+1])&E.hash_mask;E.insert&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[W+F-1])&E.hash_mask,E.prev[W&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=W,W++,E.insert--,!(E.lookahead+E.insert<F)););}while(E.lookahead<me&&E.strm.avail_in!==0)}function Wt(E,de){for(var se,L;;){if(E.lookahead<me){if(et(E),E.lookahead<me&&de===f)return x;if(E.lookahead===0)break}if(se=0,E.lookahead>=F&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+F-1])&E.hash_mask,se=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),se!==0&&E.strstart-se<=E.w_size-me&&(E.match_length=Be(E,se)),E.match_length>=F)if(L=o._tr_tally(E,E.strstart-E.match_start,E.match_length-F),E.lookahead-=E.match_length,E.match_length<=E.max_lazy_match&&E.lookahead>=F){for(E.match_length--;E.strstart++,E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+F-1])&E.hash_mask,se=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart,--E.match_length!=0;);E.strstart++}else E.strstart+=E.match_length,E.match_length=0,E.ins_h=E.window[E.strstart],E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+1])&E.hash_mask;else L=o._tr_tally(E,0,E.window[E.strstart]),E.lookahead--,E.strstart++;if(L&&(K(E,!1),E.strm.avail_out===0))return x}return E.insert=E.strstart<F-1?E.strstart:F-1,de===m?(K(E,!0),E.strm.avail_out===0?Le:re):E.last_lit&&(K(E,!1),E.strm.avail_out===0)?x:Z}function ft(E,de){for(var se,L,I;;){if(E.lookahead<me){if(et(E),E.lookahead<me&&de===f)return x;if(E.lookahead===0)break}if(se=0,E.lookahead>=F&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+F-1])&E.hash_mask,se=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),E.prev_length=E.match_length,E.prev_match=E.match_start,E.match_length=F-1,se!==0&&E.prev_length<E.max_lazy_match&&E.strstart-se<=E.w_size-me&&(E.match_length=Be(E,se),E.match_length<=5&&(E.strategy===1||E.match_length===F&&4096<E.strstart-E.match_start)&&(E.match_length=F-1)),E.prev_length>=F&&E.match_length<=E.prev_length){for(I=E.strstart+E.lookahead-F,L=o._tr_tally(E,E.strstart-1-E.prev_match,E.prev_length-F),E.lookahead-=E.prev_length-1,E.prev_length-=2;++E.strstart<=I&&(E.ins_h=(E.ins_h<<E.hash_shift^E.window[E.strstart+F-1])&E.hash_mask,se=E.prev[E.strstart&E.w_mask]=E.head[E.ins_h],E.head[E.ins_h]=E.strstart),--E.prev_length!=0;);if(E.match_available=0,E.match_length=F-1,E.strstart++,L&&(K(E,!1),E.strm.avail_out===0))return x}else if(E.match_available){if((L=o._tr_tally(E,0,E.window[E.strstart-1]))&&K(E,!1),E.strstart++,E.lookahead--,E.strm.avail_out===0)return x}else E.match_available=1,E.strstart++,E.lookahead--}return E.match_available&&(L=o._tr_tally(E,0,E.window[E.strstart-1]),E.match_available=0),E.insert=E.strstart<F-1?E.strstart:F-1,de===m?(K(E,!0),E.strm.avail_out===0?Le:re):E.last_lit&&(K(E,!1),E.strm.avail_out===0)?x:Z}function Ke(E,de,se,L,I){this.good_length=E,this.max_lazy=de,this.nice_length=se,this.max_chain=L,this.func=I}function Ot(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=C,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new a.Buf16(2*v),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*w+1)),ze(this.dyn_ltree),ze(this.dyn_dtree),ze(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(O+1),this.heap=new a.Buf16(2*T+1),ze(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*T+1),ze(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ft(E){var de;return E&&E.state?(E.total_in=E.total_out=0,E.data_type=y,(de=E.state).pending=0,de.pending_out=0,de.wrap<0&&(de.wrap=-de.wrap),de.status=de.wrap?N:Y,E.adler=de.wrap===2?0:1,de.last_flush=f,o._tr_init(de),h):He(E,g)}function ar(E){var de=Ft(E);return de===h&&(function(se){se.window_size=2*se.w_size,ze(se.head),se.max_lazy_match=i[se.level].max_lazy,se.good_match=i[se.level].good_length,se.nice_match=i[se.level].nice_length,se.max_chain_length=i[se.level].max_chain,se.strstart=0,se.block_start=0,se.lookahead=0,se.insert=0,se.match_length=se.prev_length=F-1,se.match_available=0,se.ins_h=0})(E.state),de}function Sn(E,de,se,L,I,W){if(!E)return g;var U=1;if(de===b&&(de=6),L<0?(U=0,L=-L):15<L&&(U=2,L-=16),I<1||A<I||se!==C||L<8||15<L||de<0||9<de||W<0||p<W)return He(E,g);L===8&&(L=9);var q=new Ot;return(E.state=q).strm=E,q.wrap=U,q.gzhead=null,q.w_bits=L,q.w_size=1<<q.w_bits,q.w_mask=q.w_size-1,q.hash_bits=I+7,q.hash_size=1<<q.hash_bits,q.hash_mask=q.hash_size-1,q.hash_shift=~~((q.hash_bits+F-1)/F),q.window=new a.Buf8(2*q.w_size),q.head=new a.Buf16(q.hash_size),q.prev=new a.Buf16(q.w_size),q.lit_bufsize=1<<I+6,q.pending_buf_size=4*q.lit_bufsize,q.pending_buf=new a.Buf8(q.pending_buf_size),q.d_buf=1*q.lit_bufsize,q.l_buf=3*q.lit_bufsize,q.level=de,q.strategy=W,q.method=se,ar(E)}i=[new Ke(0,0,0,0,function(E,de){var se=65535;for(se>E.pending_buf_size-5&&(se=E.pending_buf_size-5);;){if(E.lookahead<=1){if(et(E),E.lookahead===0&&de===f)return x;if(E.lookahead===0)break}E.strstart+=E.lookahead,E.lookahead=0;var L=E.block_start+se;if((E.strstart===0||E.strstart>=L)&&(E.lookahead=E.strstart-L,E.strstart=L,K(E,!1),E.strm.avail_out===0)||E.strstart-E.block_start>=E.w_size-me&&(K(E,!1),E.strm.avail_out===0))return x}return E.insert=0,de===m?(K(E,!0),E.strm.avail_out===0?Le:re):(E.strstart>E.block_start&&(K(E,!1),E.strm.avail_out),x)}),new Ke(4,4,8,4,Wt),new Ke(4,5,16,8,Wt),new Ke(4,6,32,32,Wt),new Ke(4,4,16,16,ft),new Ke(8,16,32,32,ft),new Ke(8,16,128,128,ft),new Ke(8,32,128,256,ft),new Ke(32,128,258,1024,ft),new Ke(32,258,258,4096,ft)],s.deflateInit=function(E,de){return Sn(E,de,C,15,8,0)},s.deflateInit2=Sn,s.deflateReset=ar,s.deflateResetKeep=Ft,s.deflateSetHeader=function(E,de){return E&&E.state?E.state.wrap!==2?g:(E.state.gzhead=de,h):g},s.deflate=function(E,de){var se,L,I,W;if(!E||!E.state||5<de||de<0)return E?He(E,g):g;if(L=E.state,!E.output||!E.input&&E.avail_in!==0||L.status===666&&de!==m)return He(E,E.avail_out===0?-5:g);if(L.strm=E,se=L.last_flush,L.last_flush=de,L.status===N)if(L.wrap===2)E.adler=0,Qe(L,31),Qe(L,139),Qe(L,8),L.gzhead?(Qe(L,(L.gzhead.text?1:0)+(L.gzhead.hcrc?2:0)+(L.gzhead.extra?4:0)+(L.gzhead.name?8:0)+(L.gzhead.comment?16:0)),Qe(L,255&L.gzhead.time),Qe(L,L.gzhead.time>>8&255),Qe(L,L.gzhead.time>>16&255),Qe(L,L.gzhead.time>>24&255),Qe(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),Qe(L,255&L.gzhead.os),L.gzhead.extra&&L.gzhead.extra.length&&(Qe(L,255&L.gzhead.extra.length),Qe(L,L.gzhead.extra.length>>8&255)),L.gzhead.hcrc&&(E.adler=l(E.adler,L.pending_buf,L.pending,0)),L.gzindex=0,L.status=69):(Qe(L,0),Qe(L,0),Qe(L,0),Qe(L,0),Qe(L,0),Qe(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),Qe(L,3),L.status=Y);else{var U=C+(L.w_bits-8<<4)<<8;U|=(2<=L.strategy||L.level<2?0:L.level<6?1:L.level===6?2:3)<<6,L.strstart!==0&&(U|=32),U+=31-U%31,L.status=Y,De(L,U),L.strstart!==0&&(De(L,E.adler>>>16),De(L,65535&E.adler)),E.adler=1}if(L.status===69)if(L.gzhead.extra){for(I=L.pending;L.gzindex<(65535&L.gzhead.extra.length)&&(L.pending!==L.pending_buf_size||(L.gzhead.hcrc&&L.pending>I&&(E.adler=l(E.adler,L.pending_buf,L.pending-I,I)),Q(E),I=L.pending,L.pending!==L.pending_buf_size));)Qe(L,255&L.gzhead.extra[L.gzindex]),L.gzindex++;L.gzhead.hcrc&&L.pending>I&&(E.adler=l(E.adler,L.pending_buf,L.pending-I,I)),L.gzindex===L.gzhead.extra.length&&(L.gzindex=0,L.status=73)}else L.status=73;if(L.status===73)if(L.gzhead.name){I=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>I&&(E.adler=l(E.adler,L.pending_buf,L.pending-I,I)),Q(E),I=L.pending,L.pending===L.pending_buf_size)){W=1;break}W=L.gzindex<L.gzhead.name.length?255&L.gzhead.name.charCodeAt(L.gzindex++):0,Qe(L,W)}while(W!==0);L.gzhead.hcrc&&L.pending>I&&(E.adler=l(E.adler,L.pending_buf,L.pending-I,I)),W===0&&(L.gzindex=0,L.status=91)}else L.status=91;if(L.status===91)if(L.gzhead.comment){I=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>I&&(E.adler=l(E.adler,L.pending_buf,L.pending-I,I)),Q(E),I=L.pending,L.pending===L.pending_buf_size)){W=1;break}W=L.gzindex<L.gzhead.comment.length?255&L.gzhead.comment.charCodeAt(L.gzindex++):0,Qe(L,W)}while(W!==0);L.gzhead.hcrc&&L.pending>I&&(E.adler=l(E.adler,L.pending_buf,L.pending-I,I)),W===0&&(L.status=103)}else L.status=103;if(L.status===103&&(L.gzhead.hcrc?(L.pending+2>L.pending_buf_size&&Q(E),L.pending+2<=L.pending_buf_size&&(Qe(L,255&E.adler),Qe(L,E.adler>>8&255),E.adler=0,L.status=Y)):L.status=Y),L.pending!==0){if(Q(E),E.avail_out===0)return L.last_flush=-1,h}else if(E.avail_in===0&&he(de)<=he(se)&&de!==m)return He(E,-5);if(L.status===666&&E.avail_in!==0)return He(E,-5);if(E.avail_in!==0||L.lookahead!==0||de!==f&&L.status!==666){var q=L.strategy===2?(function($,ae){for(var Pe;;){if($.lookahead===0&&(et($),$.lookahead===0)){if(ae===f)return x;break}if($.match_length=0,Pe=o._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,Pe&&(K($,!1),$.strm.avail_out===0))return x}return $.insert=0,ae===m?(K($,!0),$.strm.avail_out===0?Le:re):$.last_lit&&(K($,!1),$.strm.avail_out===0)?x:Z})(L,de):L.strategy===3?(function($,ae){for(var Pe,ye,Ye,It,ht=$.window;;){if($.lookahead<=X){if(et($),$.lookahead<=X&&ae===f)return x;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=F&&0<$.strstart&&(ye=ht[Ye=$.strstart-1])===ht[++Ye]&&ye===ht[++Ye]&&ye===ht[++Ye]){It=$.strstart+X;do;while(ye===ht[++Ye]&&ye===ht[++Ye]&&ye===ht[++Ye]&&ye===ht[++Ye]&&ye===ht[++Ye]&&ye===ht[++Ye]&&ye===ht[++Ye]&&ye===ht[++Ye]&&Ye<It);$.match_length=X-(It-Ye),$.match_length>$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=F?(Pe=o._tr_tally($,1,$.match_length-F),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(Pe=o._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),Pe&&(K($,!1),$.strm.avail_out===0))return x}return $.insert=0,ae===m?(K($,!0),$.strm.avail_out===0?Le:re):$.last_lit&&(K($,!1),$.strm.avail_out===0)?x:Z})(L,de):i[L.level].func(L,de);if(q!==Le&&q!==re||(L.status=666),q===x||q===Le)return E.avail_out===0&&(L.last_flush=-1),h;if(q===Z&&(de===1?o._tr_align(L):de!==5&&(o._tr_stored_block(L,0,0,!1),de===3&&(ze(L.head),L.lookahead===0&&(L.strstart=0,L.block_start=0,L.insert=0))),Q(E),E.avail_out===0))return L.last_flush=-1,h}return de!==m?h:L.wrap<=0?1:(L.wrap===2?(Qe(L,255&E.adler),Qe(L,E.adler>>8&255),Qe(L,E.adler>>16&255),Qe(L,E.adler>>24&255),Qe(L,255&E.total_in),Qe(L,E.total_in>>8&255),Qe(L,E.total_in>>16&255),Qe(L,E.total_in>>24&255)):(De(L,E.adler>>>16),De(L,65535&E.adler)),Q(E),0<L.wrap&&(L.wrap=-L.wrap),L.pending!==0?h:1)},s.deflateEnd=function(E){var de;return E&&E.state?(de=E.state.status)!==N&&de!==69&&de!==73&&de!==91&&de!==103&&de!==Y&&de!==666?He(E,g):(E.state=null,de===Y?He(E,-3):h):g},s.deflateSetDictionary=function(E,de){var se,L,I,W,U,q,$,ae,Pe=de.length;if(!E||!E.state||(W=(se=E.state).wrap)===2||W===1&&se.status!==N||se.lookahead)return g;for(W===1&&(E.adler=c(E.adler,de,Pe,0)),se.wrap=0,Pe>=se.w_size&&(W===0&&(ze(se.head),se.strstart=0,se.block_start=0,se.insert=0),ae=new a.Buf8(se.w_size),a.arraySet(ae,de,Pe-se.w_size,se.w_size,0),de=ae,Pe=se.w_size),U=E.avail_in,q=E.next_in,$=E.input,E.avail_in=Pe,E.next_in=0,E.input=de,et(se);se.lookahead>=F;){for(L=se.strstart,I=se.lookahead-(F-1);se.ins_h=(se.ins_h<<se.hash_shift^se.window[L+F-1])&se.hash_mask,se.prev[L&se.w_mask]=se.head[se.ins_h],se.head[se.ins_h]=L,L++,--I;);se.strstart=L,se.lookahead=F-1,et(se)}return se.strstart+=se.lookahead,se.block_start=se.strstart,se.insert=se.lookahead,se.lookahead=0,se.match_length=se.prev_length=F-1,se.match_available=0,E.next_in=q,E.input=$,E.avail_in=U,se.wrap=W,h},s.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,s){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,s){r.exports=function(i,a){var o,c,l,d,f,m,h,g,b,p,y,C,A,T,S,w,v,O,F,X,me,N,Y,x,Z;o=i.state,c=i.next_in,x=i.input,l=c+(i.avail_in-5),d=i.next_out,Z=i.output,f=d-(a-i.avail_out),m=d+(i.avail_out-257),h=o.dmax,g=o.wsize,b=o.whave,p=o.wnext,y=o.window,C=o.hold,A=o.bits,T=o.lencode,S=o.distcode,w=(1<<o.lenbits)-1,v=(1<<o.distbits)-1;e:do{A<15&&(C+=x[c++]<<A,A+=8,C+=x[c++]<<A,A+=8),O=T[C&w];t:for(;;){if(C>>>=F=O>>>24,A-=F,(F=O>>>16&255)===0)Z[d++]=65535&O;else{if(!(16&F)){if((64&F)==0){O=T[(65535&O)+(C&(1<<F)-1)];continue t}if(32&F){o.mode=12;break e}i.msg="invalid literal/length code",o.mode=30;break e}X=65535&O,(F&=15)&&(A<F&&(C+=x[c++]<<A,A+=8),X+=C&(1<<F)-1,C>>>=F,A-=F),A<15&&(C+=x[c++]<<A,A+=8,C+=x[c++]<<A,A+=8),O=S[C&v];n:for(;;){if(C>>>=F=O>>>24,A-=F,!(16&(F=O>>>16&255))){if((64&F)==0){O=S[(65535&O)+(C&(1<<F)-1)];continue n}i.msg="invalid distance code",o.mode=30;break e}if(me=65535&O,A<(F&=15)&&(C+=x[c++]<<A,(A+=8)<F&&(C+=x[c++]<<A,A+=8)),h<(me+=C&(1<<F)-1)){i.msg="invalid distance too far back",o.mode=30;break e}if(C>>>=F,A-=F,(F=d-f)<me){if(b<(F=me-F)&&o.sane){i.msg="invalid distance too far back",o.mode=30;break e}if(Y=y,(N=0)===p){if(N+=g-F,F<X){for(X-=F;Z[d++]=y[N++],--F;);N=d-me,Y=Z}}else if(p<F){if(N+=g+p-F,(F-=p)<X){for(X-=F;Z[d++]=y[N++],--F;);if(N=0,p<X){for(X-=F=p;Z[d++]=y[N++],--F;);N=d-me,Y=Z}}}else if(N+=p-F,F<X){for(X-=F;Z[d++]=y[N++],--F;);N=d-me,Y=Z}for(;2<X;)Z[d++]=Y[N++],Z[d++]=Y[N++],Z[d++]=Y[N++],X-=3;X&&(Z[d++]=Y[N++],1<X&&(Z[d++]=Y[N++]))}else{for(N=d-me;Z[d++]=Z[N++],Z[d++]=Z[N++],Z[d++]=Z[N++],2<(X-=3););X&&(Z[d++]=Z[N++],1<X&&(Z[d++]=Z[N++]))}break}}break}}while(c<l&&d<m);c-=X=A>>3,C&=(1<<(A-=X<<3))-1,i.next_in=c,i.next_out=d,i.avail_in=c<l?l-c+5:5-(c-l),i.avail_out=d<m?m-d+257:257-(d-m),o.hold=C,o.bits=A}},{}],49:[function(n,r,s){var i=n("../utils/common"),a=n("./adler32"),o=n("./crc32"),c=n("./inffast"),l=n("./inftrees"),d=1,f=2,m=0,h=-2,g=1,b=852,p=592;function y(N){return(N>>>24&255)+(N>>>8&65280)+((65280&N)<<8)+((255&N)<<24)}function C(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function A(N){var Y;return N&&N.state?(Y=N.state,N.total_in=N.total_out=Y.total=0,N.msg="",Y.wrap&&(N.adler=1&Y.wrap),Y.mode=g,Y.last=0,Y.havedict=0,Y.dmax=32768,Y.head=null,Y.hold=0,Y.bits=0,Y.lencode=Y.lendyn=new i.Buf32(b),Y.distcode=Y.distdyn=new i.Buf32(p),Y.sane=1,Y.back=-1,m):h}function T(N){var Y;return N&&N.state?((Y=N.state).wsize=0,Y.whave=0,Y.wnext=0,A(N)):h}function S(N,Y){var x,Z;return N&&N.state?(Z=N.state,Y<0?(x=0,Y=-Y):(x=1+(Y>>4),Y<48&&(Y&=15)),Y&&(Y<8||15<Y)?h:(Z.window!==null&&Z.wbits!==Y&&(Z.window=null),Z.wrap=x,Z.wbits=Y,T(N))):h}function w(N,Y){var x,Z;return N?(Z=new C,(N.state=Z).window=null,(x=S(N,Y))!==m&&(N.state=null),x):h}var v,O,F=!0;function X(N){if(F){var Y;for(v=new i.Buf32(512),O=new i.Buf32(32),Y=0;Y<144;)N.lens[Y++]=8;for(;Y<256;)N.lens[Y++]=9;for(;Y<280;)N.lens[Y++]=7;for(;Y<288;)N.lens[Y++]=8;for(l(d,N.lens,0,288,v,0,N.work,{bits:9}),Y=0;Y<32;)N.lens[Y++]=5;l(f,N.lens,0,32,O,0,N.work,{bits:5}),F=!1}N.lencode=v,N.lenbits=9,N.distcode=O,N.distbits=5}function me(N,Y,x,Z){var Le,re=N.state;return re.window===null&&(re.wsize=1<<re.wbits,re.wnext=0,re.whave=0,re.window=new i.Buf8(re.wsize)),Z>=re.wsize?(i.arraySet(re.window,Y,x-re.wsize,re.wsize,0),re.wnext=0,re.whave=re.wsize):(Z<(Le=re.wsize-re.wnext)&&(Le=Z),i.arraySet(re.window,Y,x-Z,Le,re.wnext),(Z-=Le)?(i.arraySet(re.window,Y,x-Z,Z,0),re.wnext=Z,re.whave=re.wsize):(re.wnext+=Le,re.wnext===re.wsize&&(re.wnext=0),re.whave<re.wsize&&(re.whave+=Le))),0}s.inflateReset=T,s.inflateReset2=S,s.inflateResetKeep=A,s.inflateInit=function(N){return w(N,15)},s.inflateInit2=w,s.inflate=function(N,Y){var x,Z,Le,re,He,he,ze,Q,K,Qe,De,Be,et,Wt,ft,Ke,Ot,Ft,ar,Sn,E,de,se,L,I=0,W=new i.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!N||!N.state||!N.output||!N.input&&N.avail_in!==0)return h;(x=N.state).mode===12&&(x.mode=13),He=N.next_out,Le=N.output,ze=N.avail_out,re=N.next_in,Z=N.input,he=N.avail_in,Q=x.hold,K=x.bits,Qe=he,De=ze,de=m;e:for(;;)switch(x.mode){case g:if(x.wrap===0){x.mode=13;break}for(;K<16;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(2&x.wrap&&Q===35615){W[x.check=0]=255&Q,W[1]=Q>>>8&255,x.check=o(x.check,W,2,0),K=Q=0,x.mode=2;break}if(x.flags=0,x.head&&(x.head.done=!1),!(1&x.wrap)||(((255&Q)<<8)+(Q>>8))%31){N.msg="incorrect header check",x.mode=30;break}if((15&Q)!=8){N.msg="unknown compression method",x.mode=30;break}if(K-=4,E=8+(15&(Q>>>=4)),x.wbits===0)x.wbits=E;else if(E>x.wbits){N.msg="invalid window size",x.mode=30;break}x.dmax=1<<E,N.adler=x.check=1,x.mode=512&Q?10:12,K=Q=0;break;case 2:for(;K<16;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(x.flags=Q,(255&x.flags)!=8){N.msg="unknown compression method",x.mode=30;break}if(57344&x.flags){N.msg="unknown header flags set",x.mode=30;break}x.head&&(x.head.text=Q>>8&1),512&x.flags&&(W[0]=255&Q,W[1]=Q>>>8&255,x.check=o(x.check,W,2,0)),K=Q=0,x.mode=3;case 3:for(;K<32;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}x.head&&(x.head.time=Q),512&x.flags&&(W[0]=255&Q,W[1]=Q>>>8&255,W[2]=Q>>>16&255,W[3]=Q>>>24&255,x.check=o(x.check,W,4,0)),K=Q=0,x.mode=4;case 4:for(;K<16;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}x.head&&(x.head.xflags=255&Q,x.head.os=Q>>8),512&x.flags&&(W[0]=255&Q,W[1]=Q>>>8&255,x.check=o(x.check,W,2,0)),K=Q=0,x.mode=5;case 5:if(1024&x.flags){for(;K<16;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}x.length=Q,x.head&&(x.head.extra_len=Q),512&x.flags&&(W[0]=255&Q,W[1]=Q>>>8&255,x.check=o(x.check,W,2,0)),K=Q=0}else x.head&&(x.head.extra=null);x.mode=6;case 6:if(1024&x.flags&&(he<(Be=x.length)&&(Be=he),Be&&(x.head&&(E=x.head.extra_len-x.length,x.head.extra||(x.head.extra=new Array(x.head.extra_len)),i.arraySet(x.head.extra,Z,re,Be,E)),512&x.flags&&(x.check=o(x.check,Z,Be,re)),he-=Be,re+=Be,x.length-=Be),x.length))break e;x.length=0,x.mode=7;case 7:if(2048&x.flags){if(he===0)break e;for(Be=0;E=Z[re+Be++],x.head&&E&&x.length<65536&&(x.head.name+=String.fromCharCode(E)),E&&Be<he;);if(512&x.flags&&(x.check=o(x.check,Z,Be,re)),he-=Be,re+=Be,E)break e}else x.head&&(x.head.name=null);x.length=0,x.mode=8;case 8:if(4096&x.flags){if(he===0)break e;for(Be=0;E=Z[re+Be++],x.head&&E&&x.length<65536&&(x.head.comment+=String.fromCharCode(E)),E&&Be<he;);if(512&x.flags&&(x.check=o(x.check,Z,Be,re)),he-=Be,re+=Be,E)break e}else x.head&&(x.head.comment=null);x.mode=9;case 9:if(512&x.flags){for(;K<16;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(Q!==(65535&x.check)){N.msg="header crc mismatch",x.mode=30;break}K=Q=0}x.head&&(x.head.hcrc=x.flags>>9&1,x.head.done=!0),N.adler=x.check=0,x.mode=12;break;case 10:for(;K<32;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}N.adler=x.check=y(Q),K=Q=0,x.mode=11;case 11:if(x.havedict===0)return N.next_out=He,N.avail_out=ze,N.next_in=re,N.avail_in=he,x.hold=Q,x.bits=K,2;N.adler=x.check=1,x.mode=12;case 12:if(Y===5||Y===6)break e;case 13:if(x.last){Q>>>=7&K,K-=7&K,x.mode=27;break}for(;K<3;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}switch(x.last=1&Q,K-=1,3&(Q>>>=1)){case 0:x.mode=14;break;case 1:if(X(x),x.mode=20,Y!==6)break;Q>>>=2,K-=2;break e;case 2:x.mode=17;break;case 3:N.msg="invalid block type",x.mode=30}Q>>>=2,K-=2;break;case 14:for(Q>>>=7&K,K-=7&K;K<32;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if((65535&Q)!=(Q>>>16^65535)){N.msg="invalid stored block lengths",x.mode=30;break}if(x.length=65535&Q,K=Q=0,x.mode=15,Y===6)break e;case 15:x.mode=16;case 16:if(Be=x.length){if(he<Be&&(Be=he),ze<Be&&(Be=ze),Be===0)break e;i.arraySet(Le,Z,re,Be,He),he-=Be,re+=Be,ze-=Be,He+=Be,x.length-=Be;break}x.mode=12;break;case 17:for(;K<14;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(x.nlen=257+(31&Q),Q>>>=5,K-=5,x.ndist=1+(31&Q),Q>>>=5,K-=5,x.ncode=4+(15&Q),Q>>>=4,K-=4,286<x.nlen||30<x.ndist){N.msg="too many length or distance symbols",x.mode=30;break}x.have=0,x.mode=18;case 18:for(;x.have<x.ncode;){for(;K<3;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}x.lens[U[x.have++]]=7&Q,Q>>>=3,K-=3}for(;x.have<19;)x.lens[U[x.have++]]=0;if(x.lencode=x.lendyn,x.lenbits=7,se={bits:x.lenbits},de=l(0,x.lens,0,19,x.lencode,0,x.work,se),x.lenbits=se.bits,de){N.msg="invalid code lengths set",x.mode=30;break}x.have=0,x.mode=19;case 19:for(;x.have<x.nlen+x.ndist;){for(;Ke=(I=x.lencode[Q&(1<<x.lenbits)-1])>>>16&255,Ot=65535&I,!((ft=I>>>24)<=K);){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(Ot<16)Q>>>=ft,K-=ft,x.lens[x.have++]=Ot;else{if(Ot===16){for(L=ft+2;K<L;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(Q>>>=ft,K-=ft,x.have===0){N.msg="invalid bit length repeat",x.mode=30;break}E=x.lens[x.have-1],Be=3+(3&Q),Q>>>=2,K-=2}else if(Ot===17){for(L=ft+3;K<L;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}K-=ft,E=0,Be=3+(7&(Q>>>=ft)),Q>>>=3,K-=3}else{for(L=ft+7;K<L;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}K-=ft,E=0,Be=11+(127&(Q>>>=ft)),Q>>>=7,K-=7}if(x.have+Be>x.nlen+x.ndist){N.msg="invalid bit length repeat",x.mode=30;break}for(;Be--;)x.lens[x.have++]=E}}if(x.mode===30)break;if(x.lens[256]===0){N.msg="invalid code -- missing end-of-block",x.mode=30;break}if(x.lenbits=9,se={bits:x.lenbits},de=l(d,x.lens,0,x.nlen,x.lencode,0,x.work,se),x.lenbits=se.bits,de){N.msg="invalid literal/lengths set",x.mode=30;break}if(x.distbits=6,x.distcode=x.distdyn,se={bits:x.distbits},de=l(f,x.lens,x.nlen,x.ndist,x.distcode,0,x.work,se),x.distbits=se.bits,de){N.msg="invalid distances set",x.mode=30;break}if(x.mode=20,Y===6)break e;case 20:x.mode=21;case 21:if(6<=he&&258<=ze){N.next_out=He,N.avail_out=ze,N.next_in=re,N.avail_in=he,x.hold=Q,x.bits=K,c(N,De),He=N.next_out,Le=N.output,ze=N.avail_out,re=N.next_in,Z=N.input,he=N.avail_in,Q=x.hold,K=x.bits,x.mode===12&&(x.back=-1);break}for(x.back=0;Ke=(I=x.lencode[Q&(1<<x.lenbits)-1])>>>16&255,Ot=65535&I,!((ft=I>>>24)<=K);){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(Ke&&(240&Ke)==0){for(Ft=ft,ar=Ke,Sn=Ot;Ke=(I=x.lencode[Sn+((Q&(1<<Ft+ar)-1)>>Ft)])>>>16&255,Ot=65535&I,!(Ft+(ft=I>>>24)<=K);){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}Q>>>=Ft,K-=Ft,x.back+=Ft}if(Q>>>=ft,K-=ft,x.back+=ft,x.length=Ot,Ke===0){x.mode=26;break}if(32&Ke){x.back=-1,x.mode=12;break}if(64&Ke){N.msg="invalid literal/length code",x.mode=30;break}x.extra=15&Ke,x.mode=22;case 22:if(x.extra){for(L=x.extra;K<L;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}x.length+=Q&(1<<x.extra)-1,Q>>>=x.extra,K-=x.extra,x.back+=x.extra}x.was=x.length,x.mode=23;case 23:for(;Ke=(I=x.distcode[Q&(1<<x.distbits)-1])>>>16&255,Ot=65535&I,!((ft=I>>>24)<=K);){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if((240&Ke)==0){for(Ft=ft,ar=Ke,Sn=Ot;Ke=(I=x.distcode[Sn+((Q&(1<<Ft+ar)-1)>>Ft)])>>>16&255,Ot=65535&I,!(Ft+(ft=I>>>24)<=K);){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}Q>>>=Ft,K-=Ft,x.back+=Ft}if(Q>>>=ft,K-=ft,x.back+=ft,64&Ke){N.msg="invalid distance code",x.mode=30;break}x.offset=Ot,x.extra=15&Ke,x.mode=24;case 24:if(x.extra){for(L=x.extra;K<L;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}x.offset+=Q&(1<<x.extra)-1,Q>>>=x.extra,K-=x.extra,x.back+=x.extra}if(x.offset>x.dmax){N.msg="invalid distance too far back",x.mode=30;break}x.mode=25;case 25:if(ze===0)break e;if(Be=De-ze,x.offset>Be){if((Be=x.offset-Be)>x.whave&&x.sane){N.msg="invalid distance too far back",x.mode=30;break}et=Be>x.wnext?(Be-=x.wnext,x.wsize-Be):x.wnext-Be,Be>x.length&&(Be=x.length),Wt=x.window}else Wt=Le,et=He-x.offset,Be=x.length;for(ze<Be&&(Be=ze),ze-=Be,x.length-=Be;Le[He++]=Wt[et++],--Be;);x.length===0&&(x.mode=21);break;case 26:if(ze===0)break e;Le[He++]=x.length,ze--,x.mode=21;break;case 27:if(x.wrap){for(;K<32;){if(he===0)break e;he--,Q|=Z[re++]<<K,K+=8}if(De-=ze,N.total_out+=De,x.total+=De,De&&(N.adler=x.check=x.flags?o(x.check,Le,De,He-De):a(x.check,Le,De,He-De)),De=ze,(x.flags?Q:y(Q))!==x.check){N.msg="incorrect data check",x.mode=30;break}K=Q=0}x.mode=28;case 28:if(x.wrap&&x.flags){for(;K<32;){if(he===0)break e;he--,Q+=Z[re++]<<K,K+=8}if(Q!==(4294967295&x.total)){N.msg="incorrect length check",x.mode=30;break}K=Q=0}x.mode=29;case 29:de=1;break e;case 30:de=-3;break e;case 31:return-4;case 32:default:return h}return N.next_out=He,N.avail_out=ze,N.next_in=re,N.avail_in=he,x.hold=Q,x.bits=K,(x.wsize||De!==N.avail_out&&x.mode<30&&(x.mode<27||Y!==4))&&me(N,N.output,N.next_out,De-N.avail_out)?(x.mode=31,-4):(Qe-=N.avail_in,De-=N.avail_out,N.total_in+=Qe,N.total_out+=De,x.total+=De,x.wrap&&De&&(N.adler=x.check=x.flags?o(x.check,Le,De,N.next_out-De):a(x.check,Le,De,N.next_out-De)),N.data_type=x.bits+(x.last?64:0)+(x.mode===12?128:0)+(x.mode===20||x.mode===15?256:0),(Qe==0&&De===0||Y===4)&&de===m&&(de=-5),de)},s.inflateEnd=function(N){if(!N||!N.state)return h;var Y=N.state;return Y.window&&(Y.window=null),N.state=null,m},s.inflateGetHeader=function(N,Y){var x;return N&&N.state?(2&(x=N.state).wrap)==0?h:((x.head=Y).done=!1,m):h},s.inflateSetDictionary=function(N,Y){var x,Z=Y.length;return N&&N.state?(x=N.state).wrap!==0&&x.mode!==11?h:x.mode===11&&a(1,Y,Z,0)!==x.check?-3:me(N,Y,Z,Z)?(x.mode=31,-4):(x.havedict=1,m):h},s.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,s){var i=n("../utils/common"),a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(d,f,m,h,g,b,p,y){var C,A,T,S,w,v,O,F,X,me=y.bits,N=0,Y=0,x=0,Z=0,Le=0,re=0,He=0,he=0,ze=0,Q=0,K=null,Qe=0,De=new i.Buf16(16),Be=new i.Buf16(16),et=null,Wt=0;for(N=0;N<=15;N++)De[N]=0;for(Y=0;Y<h;Y++)De[f[m+Y]]++;for(Le=me,Z=15;1<=Z&&De[Z]===0;Z--);if(Z<Le&&(Le=Z),Z===0)return g[b++]=20971520,g[b++]=20971520,y.bits=1,0;for(x=1;x<Z&&De[x]===0;x++);for(Le<x&&(Le=x),N=he=1;N<=15;N++)if(he<<=1,(he-=De[N])<0)return-1;if(0<he&&(d===0||Z!==1))return-1;for(Be[1]=0,N=1;N<15;N++)Be[N+1]=Be[N]+De[N];for(Y=0;Y<h;Y++)f[m+Y]!==0&&(p[Be[f[m+Y]]++]=Y);if(v=d===0?(K=et=p,19):d===1?(K=a,Qe-=257,et=o,Wt-=257,256):(K=c,et=l,-1),N=x,w=b,He=Y=Q=0,T=-1,S=(ze=1<<(re=Le))-1,d===1&&852<ze||d===2&&592<ze)return 1;for(;;){for(O=N-He,X=p[Y]<v?(F=0,p[Y]):p[Y]>v?(F=et[Wt+p[Y]],K[Qe+p[Y]]):(F=96,0),C=1<<N-He,x=A=1<<re;g[w+(Q>>He)+(A-=C)]=O<<24|F<<16|X|0,A!==0;);for(C=1<<N-1;Q&C;)C>>=1;if(C!==0?(Q&=C-1,Q+=C):Q=0,Y++,--De[N]==0){if(N===Z)break;N=f[m+p[Y]]}if(Le<N&&(Q&S)!==T){for(He===0&&(He=Le),w+=x,he=1<<(re=N-He);re+He<Z&&!((he-=De[re+He])<=0);)re++,he<<=1;if(ze+=1<<re,d===1&&852<ze||d===2&&592<ze)return 1;g[T=Q&S]=Le<<24|re<<16|w-b|0}}return Q!==0&&(g[w+Q]=N-He<<24|64<<16|0),y.bits=Le,0}},{"../utils/common":41}],51:[function(n,r,s){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,s){var i=n("../utils/common"),a=0,o=1;function c(I){for(var W=I.length;0<=--W;)I[W]=0}var l=0,d=29,f=256,m=f+1+d,h=30,g=19,b=2*m+1,p=15,y=16,C=7,A=256,T=16,S=17,w=18,v=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],O=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],X=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],me=new Array(2*(m+2));c(me);var N=new Array(2*h);c(N);var Y=new Array(512);c(Y);var x=new Array(256);c(x);var Z=new Array(d);c(Z);var Le,re,He,he=new Array(h);function ze(I,W,U,q,$){this.static_tree=I,this.extra_bits=W,this.extra_base=U,this.elems=q,this.max_length=$,this.has_stree=I&&I.length}function Q(I,W){this.dyn_tree=I,this.max_code=0,this.stat_desc=W}function K(I){return I<256?Y[I]:Y[256+(I>>>7)]}function Qe(I,W){I.pending_buf[I.pending++]=255&W,I.pending_buf[I.pending++]=W>>>8&255}function De(I,W,U){I.bi_valid>y-U?(I.bi_buf|=W<<I.bi_valid&65535,Qe(I,I.bi_buf),I.bi_buf=W>>y-I.bi_valid,I.bi_valid+=U-y):(I.bi_buf|=W<<I.bi_valid&65535,I.bi_valid+=U)}function Be(I,W,U){De(I,U[2*W],U[2*W+1])}function et(I,W){for(var U=0;U|=1&I,I>>>=1,U<<=1,0<--W;);return U>>>1}function Wt(I,W,U){var q,$,ae=new Array(p+1),Pe=0;for(q=1;q<=p;q++)ae[q]=Pe=Pe+U[q-1]<<1;for($=0;$<=W;$++){var ye=I[2*$+1];ye!==0&&(I[2*$]=et(ae[ye]++,ye))}}function ft(I){var W;for(W=0;W<m;W++)I.dyn_ltree[2*W]=0;for(W=0;W<h;W++)I.dyn_dtree[2*W]=0;for(W=0;W<g;W++)I.bl_tree[2*W]=0;I.dyn_ltree[2*A]=1,I.opt_len=I.static_len=0,I.last_lit=I.matches=0}function Ke(I){8<I.bi_valid?Qe(I,I.bi_buf):0<I.bi_valid&&(I.pending_buf[I.pending++]=I.bi_buf),I.bi_buf=0,I.bi_valid=0}function Ot(I,W,U,q){var $=2*W,ae=2*U;return I[$]<I[ae]||I[$]===I[ae]&&q[W]<=q[U]}function Ft(I,W,U){for(var q=I.heap[U],$=U<<1;$<=I.heap_len&&($<I.heap_len&&Ot(W,I.heap[$+1],I.heap[$],I.depth)&&$++,!Ot(W,q,I.heap[$],I.depth));)I.heap[U]=I.heap[$],U=$,$<<=1;I.heap[U]=q}function ar(I,W,U){var q,$,ae,Pe,ye=0;if(I.last_lit!==0)for(;q=I.pending_buf[I.d_buf+2*ye]<<8|I.pending_buf[I.d_buf+2*ye+1],$=I.pending_buf[I.l_buf+ye],ye++,q===0?Be(I,$,W):(Be(I,(ae=x[$])+f+1,W),(Pe=v[ae])!==0&&De(I,$-=Z[ae],Pe),Be(I,ae=K(--q),U),(Pe=O[ae])!==0&&De(I,q-=he[ae],Pe)),ye<I.last_lit;);Be(I,A,W)}function Sn(I,W){var U,q,$,ae=W.dyn_tree,Pe=W.stat_desc.static_tree,ye=W.stat_desc.has_stree,Ye=W.stat_desc.elems,It=-1;for(I.heap_len=0,I.heap_max=b,U=0;U<Ye;U++)ae[2*U]!==0?(I.heap[++I.heap_len]=It=U,I.depth[U]=0):ae[2*U+1]=0;for(;I.heap_len<2;)ae[2*($=I.heap[++I.heap_len]=It<2?++It:0)]=1,I.depth[$]=0,I.opt_len--,ye&&(I.static_len-=Pe[2*$+1]);for(W.max_code=It,U=I.heap_len>>1;1<=U;U--)Ft(I,ae,U);for($=Ye;U=I.heap[1],I.heap[1]=I.heap[I.heap_len--],Ft(I,ae,1),q=I.heap[1],I.heap[--I.heap_max]=U,I.heap[--I.heap_max]=q,ae[2*$]=ae[2*U]+ae[2*q],I.depth[$]=(I.depth[U]>=I.depth[q]?I.depth[U]:I.depth[q])+1,ae[2*U+1]=ae[2*q+1]=$,I.heap[1]=$++,Ft(I,ae,1),2<=I.heap_len;);I.heap[--I.heap_max]=I.heap[1],(function(ht,Zn){var $s,or,ds,Qt,$r,Oi,we=Zn.dyn_tree,Xe=Zn.max_code,ct=Zn.stat_desc.static_tree,qt=Zn.stat_desc.has_stree,vn=Zn.stat_desc.extra_bits,Fn=Zn.stat_desc.extra_base,_n=Zn.stat_desc.max_length,Ut=0;for(Qt=0;Qt<=p;Qt++)ht.bl_count[Qt]=0;for(we[2*ht.heap[ht.heap_max]+1]=0,$s=ht.heap_max+1;$s<b;$s++)_n<(Qt=we[2*we[2*(or=ht.heap[$s])+1]+1]+1)&&(Qt=_n,Ut++),we[2*or+1]=Qt,Xe<or||(ht.bl_count[Qt]++,$r=0,Fn<=or&&($r=vn[or-Fn]),Oi=we[2*or],ht.opt_len+=Oi*(Qt+$r),qt&&(ht.static_len+=Oi*(ct[2*or+1]+$r)));if(Ut!==0){do{for(Qt=_n-1;ht.bl_count[Qt]===0;)Qt--;ht.bl_count[Qt]--,ht.bl_count[Qt+1]+=2,ht.bl_count[_n]--,Ut-=2}while(0<Ut);for(Qt=_n;Qt!==0;Qt--)for(or=ht.bl_count[Qt];or!==0;)Xe<(ds=ht.heap[--$s])||(we[2*ds+1]!==Qt&&(ht.opt_len+=(Qt-we[2*ds+1])*we[2*ds],we[2*ds+1]=Qt),or--)}})(I,W),Wt(ae,It,I.bl_count)}function E(I,W,U){var q,$,ae=-1,Pe=W[1],ye=0,Ye=7,It=4;for(Pe===0&&(Ye=138,It=3),W[2*(U+1)+1]=65535,q=0;q<=U;q++)$=Pe,Pe=W[2*(q+1)+1],++ye<Ye&&$===Pe||(ye<It?I.bl_tree[2*$]+=ye:$!==0?($!==ae&&I.bl_tree[2*$]++,I.bl_tree[2*T]++):ye<=10?I.bl_tree[2*S]++:I.bl_tree[2*w]++,ae=$,It=(ye=0)===Pe?(Ye=138,3):$===Pe?(Ye=6,3):(Ye=7,4))}function de(I,W,U){var q,$,ae=-1,Pe=W[1],ye=0,Ye=7,It=4;for(Pe===0&&(Ye=138,It=3),q=0;q<=U;q++)if($=Pe,Pe=W[2*(q+1)+1],!(++ye<Ye&&$===Pe)){if(ye<It)for(;Be(I,$,I.bl_tree),--ye!=0;);else $!==0?($!==ae&&(Be(I,$,I.bl_tree),ye--),Be(I,T,I.bl_tree),De(I,ye-3,2)):ye<=10?(Be(I,S,I.bl_tree),De(I,ye-3,3)):(Be(I,w,I.bl_tree),De(I,ye-11,7));ae=$,It=(ye=0)===Pe?(Ye=138,3):$===Pe?(Ye=6,3):(Ye=7,4)}}c(he);var se=!1;function L(I,W,U,q){De(I,(l<<1)+(q?1:0),3),(function($,ae,Pe,ye){Ke($),Qe($,Pe),Qe($,~Pe),i.arraySet($.pending_buf,$.window,ae,Pe,$.pending),$.pending+=Pe})(I,W,U)}s._tr_init=function(I){se||((function(){var W,U,q,$,ae,Pe=new Array(p+1);for($=q=0;$<d-1;$++)for(Z[$]=q,W=0;W<1<<v[$];W++)x[q++]=$;for(x[q-1]=$,$=ae=0;$<16;$++)for(he[$]=ae,W=0;W<1<<O[$];W++)Y[ae++]=$;for(ae>>=7;$<h;$++)for(he[$]=ae<<7,W=0;W<1<<O[$]-7;W++)Y[256+ae++]=$;for(U=0;U<=p;U++)Pe[U]=0;for(W=0;W<=143;)me[2*W+1]=8,W++,Pe[8]++;for(;W<=255;)me[2*W+1]=9,W++,Pe[9]++;for(;W<=279;)me[2*W+1]=7,W++,Pe[7]++;for(;W<=287;)me[2*W+1]=8,W++,Pe[8]++;for(Wt(me,m+1,Pe),W=0;W<h;W++)N[2*W+1]=5,N[2*W]=et(W,5);Le=new ze(me,v,f+1,m,p),re=new ze(N,O,0,h,p),He=new ze(new Array(0),F,0,g,C)})(),se=!0),I.l_desc=new Q(I.dyn_ltree,Le),I.d_desc=new Q(I.dyn_dtree,re),I.bl_desc=new Q(I.bl_tree,He),I.bi_buf=0,I.bi_valid=0,ft(I)},s._tr_stored_block=L,s._tr_flush_block=function(I,W,U,q){var $,ae,Pe=0;0<I.level?(I.strm.data_type===2&&(I.strm.data_type=(function(ye){var Ye,It=4093624447;for(Ye=0;Ye<=31;Ye++,It>>>=1)if(1&It&&ye.dyn_ltree[2*Ye]!==0)return a;if(ye.dyn_ltree[18]!==0||ye.dyn_ltree[20]!==0||ye.dyn_ltree[26]!==0)return o;for(Ye=32;Ye<f;Ye++)if(ye.dyn_ltree[2*Ye]!==0)return o;return a})(I)),Sn(I,I.l_desc),Sn(I,I.d_desc),Pe=(function(ye){var Ye;for(E(ye,ye.dyn_ltree,ye.l_desc.max_code),E(ye,ye.dyn_dtree,ye.d_desc.max_code),Sn(ye,ye.bl_desc),Ye=g-1;3<=Ye&&ye.bl_tree[2*X[Ye]+1]===0;Ye--);return ye.opt_len+=3*(Ye+1)+5+5+4,Ye})(I),$=I.opt_len+3+7>>>3,(ae=I.static_len+3+7>>>3)<=$&&($=ae)):$=ae=U+5,U+4<=$&&W!==-1?L(I,W,U,q):I.strategy===4||ae===$?(De(I,2+(q?1:0),3),ar(I,me,N)):(De(I,4+(q?1:0),3),(function(ye,Ye,It,ht){var Zn;for(De(ye,Ye-257,5),De(ye,It-1,5),De(ye,ht-4,4),Zn=0;Zn<ht;Zn++)De(ye,ye.bl_tree[2*X[Zn]+1],3);de(ye,ye.dyn_ltree,Ye-1),de(ye,ye.dyn_dtree,It-1)})(I,I.l_desc.max_code+1,I.d_desc.max_code+1,Pe+1),ar(I,I.dyn_ltree,I.dyn_dtree)),ft(I),q&&Ke(I)},s._tr_tally=function(I,W,U){return I.pending_buf[I.d_buf+2*I.last_lit]=W>>>8&255,I.pending_buf[I.d_buf+2*I.last_lit+1]=255&W,I.pending_buf[I.l_buf+I.last_lit]=255&U,I.last_lit++,W===0?I.dyn_ltree[2*U]++:(I.matches++,W--,I.dyn_ltree[2*(x[U]+f+1)]++,I.dyn_dtree[2*K(W)]++),I.last_lit===I.lit_bufsize-1},s._tr_align=function(I){De(I,2,3),Be(I,A,me),(function(W){W.bi_valid===16?(Qe(W,W.bi_buf),W.bi_buf=0,W.bi_valid=0):8<=W.bi_valid&&(W.pending_buf[W.pending++]=255&W.bi_buf,W.bi_buf>>=8,W.bi_valid-=8)})(I)}},{"../utils/common":41}],53:[function(n,r,s){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,s){(function(i){(function(a,o){if(!a.setImmediate){var c,l,d,f,m=1,h={},g=!1,b=a.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(a);p=p&&p.setTimeout?p:a,c={}.toString.call(a.process)==="[object process]"?function(T){process.nextTick(function(){C(T)})}:(function(){if(a.postMessage&&!a.importScripts){var T=!0,S=a.onmessage;return a.onmessage=function(){T=!1},a.postMessage("","*"),a.onmessage=S,T}})()?(f="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",A,!1):a.attachEvent("onmessage",A),function(T){a.postMessage(f+T,"*")}):a.MessageChannel?((d=new MessageChannel).port1.onmessage=function(T){C(T.data)},function(T){d.port2.postMessage(T)}):b&&"onreadystatechange"in b.createElement("script")?(l=b.documentElement,function(T){var S=b.createElement("script");S.onreadystatechange=function(){C(T),S.onreadystatechange=null,l.removeChild(S),S=null},l.appendChild(S)}):function(T){setTimeout(C,0,T)},p.setImmediate=function(T){typeof T!="function"&&(T=new Function(""+T));for(var S=new Array(arguments.length-1),w=0;w<S.length;w++)S[w]=arguments[w+1];var v={callback:T,args:S};return h[m]=v,c(m),m++},p.clearImmediate=y}function y(T){delete h[T]}function C(T){if(g)setTimeout(C,0,T);else{var S=h[T];if(S){g=!0;try{(function(w){var v=w.callback,O=w.args;switch(O.length){case 0:v();break;case 1:v(O[0]);break;case 2:v(O[0],O[1]);break;case 3:v(O[0],O[1],O[2]);break;default:v.apply(o,O)}})(S)}finally{y(T),g=!1}}}}function A(T){T.source===a&&typeof T.data=="string"&&T.data.indexOf(f)===0&&C(+T.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof dd<"u"?dd:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ym)),ym.exports}var g5=m5();const b5=pT(g5);async function p5(e,t){const n=await wS(e,t);if(globalThis.document){const r=document.createElement("a");r.href=URL.createObjectURL(n),r.download="notebook.zip",r.click()}}async function wS(e,t){const n=new b5;if(t?.withoutZip!==!0){const r=await(await fetch(t?.publicZip??"/public.zip")).arrayBuffer();await n.loadAsync(r)}for(const[r,s]of Object.entries(e)){const i=r.startsWith("/")?r.slice(1):r;n.file(i,s)}return await n.generateAsync({type:"blob"})}function y5(e){return{async build_onFileTree([n,r],s){s(n,r);const i=await M4("apiConsumer",{async remoteCall(m,h){let g,b;return h[0]instanceof ReadableStream?(g=await new Response(h[0]).blob(),b="application/octet-stream"):(g=h5(h),console.log("[body]",g),b="application/json"),fetch(`${e.oceanPressServer.apiBase}/api/${m}`,{method:"POST",body:g,headers:{"x-api-key":e.oceanPressServer.apiKey,"Content-Type":b},duplex:"half"}).then(p=>p.json()).then(p=>{if(p.error)throw console.log("[r]",p),new Error;return p.result})}}),a=await wS(n,{withoutZip:!0}),o=a.size/(1024*1024);console.log("[zip.size in MB]",o.toFixed(2));const c=a.stream(),{chunkCount:l,fileId:d}=await i.API.upload(c);console.log("[res]",{chunkCount:l,fileId:d});const f=await i.API.deploy({zipFileId:d});console.log("[deploy res]",f)}}}const E5=e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,n){e.httpHandler?.updateHttpClientConfig(t,n)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),C5=e=>({httpHandler:e.httpHandler()});var h1;(function(e){e.HEADER="header",e.QUERY="query"})(h1||(h1={}));var m1;(function(e){e.HEADER="header",e.QUERY="query"})(m1||(m1={}));var Au;(function(e){e.HTTP="http",e.HTTPS="https"})(Au||(Au={}));var Uf;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(Uf||(Uf={}));var g1;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(g1||(g1={}));const mg="__smithy_context";var b1;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(b1||(b1={}));var p1;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(p1||(p1={}));class Qn{constructor(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?t.protocol.slice(-1)!==":"?`${t.protocol}:`:t.protocol:"https:",this.path=t.path?t.path.charAt(0)!=="/"?`/${t.path}`:t.path:"/",this.username=t.username,this.password=t.password,this.fragment=t.fragment}static clone(t){const n=new Qn({...t,headers:{...t.headers}});return n.query&&(n.query=x5(n.query)),n}static isInstance(t){if(!t)return!1;const n=t;return"method"in n&&"protocol"in n&&"hostname"in n&&"path"in n&&typeof n.query=="object"&&typeof n.headers=="object"}clone(){return Qn.clone(this)}}function x5(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class xo{constructor(t){this.statusCode=t.statusCode,this.reason=t.reason,this.headers=t.headers||{},this.body=t.body}static isInstance(t){if(!t)return!1;const n=t;return typeof n.statusCode=="number"&&typeof n.headers=="object"}}function v5(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}function T5(e){return t=>async n=>{const{request:r}=n;return Qn.isInstance(r)&&r.body&&e.runtime==="node"&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"&&(r.headers={...r.headers,Expect:"100-continue"}),t({...n,request:r})}}const S5={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},_5=e=>({applyToStack:t=>{t.add(T5(e),S5)}}),Xc={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},w5=Xc.WHEN_SUPPORTED,Em={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},A5=Xc.WHEN_SUPPORTED;var ln;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})(ln||(ln={}));var y1;(function(e){e.HEADER="header",e.TRAILER="trailer"})(y1||(y1={}));const gg=ln.CRC32;var E1;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(E1||(E1={}));function k5(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function Kn(e,t,n){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=n}const C1=e=>xo.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,op=e=>new Date(Date.now()+e),I5=(e,t)=>Math.abs(op(t).getTime()-e)>=3e5,x1=(e,t)=>{const n=Date.parse(e);return I5(n,t)?n-Date.now():t},iu=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},AS=async e=>{const t=iu("context",e.context),n=iu("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=await iu("signer",n.signer)(r),a=e?.signingRegion,o=e?.signingRegionSet,c=e?.signingName;return{config:n,signer:i,signingRegion:a,signingRegionSet:o,signingName:c}};class kS{async sign(t,n,r){if(!Qn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await AS(r),{config:i,signer:a}=s;let{signingRegion:o,signingName:c}=s;const l=r.context;if(l?.authSchemes?.length??!1){const[f,m]=l.authSchemes;f?.name==="sigv4a"&&m?.name==="sigv4"&&(o=m?.signingRegion??o,c=m?.signingName??c)}return await a.sign(t,{signingDate:op(i.systemClockOffset),signingRegion:o,signingService:c})}errorHandler(t){return n=>{const r=n.ServerTime??C1(n.$response);if(r){const s=iu("config",t.config),i=s.systemClockOffset;s.systemClockOffset=x1(r,s.systemClockOffset),s.systemClockOffset!==i&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=C1(t);if(r){const s=iu("config",n.config);s.systemClockOffset=x1(r,s.systemClockOffset)}}}class R5 extends kS{async sign(t,n,r){if(!Qn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:s,signer:i,signingRegion:a,signingRegionSet:o,signingName:c}=await AS(r),d=(await s.sigv4aSigningRegionSet?.()??o??[a]).join(",");return await i.sign(t,{signingDate:op(s.systemClockOffset),signingRegion:d,signingService:c})}}const ll=e=>e[mg]||(e[mg]={}),qs=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},B5=(e,t)=>{if(!t||t.length===0)return e;const n=[];for(const r of t)for(const s of e)s.schemeId.split("#")[1]===r&&n.push(s);for(const r of e)n.find(({schemeId:s})=>s===r.schemeId)||n.push(r);return n};function P5(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const N5=(e,t)=>(n,r)=>async s=>{const i=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,s.input)),a=e.authSchemePreference?await e.authSchemePreference():[],o=B5(i,a),c=P5(e.httpAuthSchemes),l=ll(r),d=[];for(const f of o){const m=c.get(f.schemeId);if(!m){d.push(`HttpAuthScheme \`${f.schemeId}\` was not enabled for this service.`);continue}const h=m.identityProvider(await t.identityProviderConfigProvider(e));if(!h){d.push(`HttpAuthScheme \`${f.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:g={},signingProperties:b={}}=f.propertiesExtractor?.(e,r)||{};f.identityProperties=Object.assign(f.identityProperties||{},g),f.signingProperties=Object.assign(f.signingProperties||{},b),l.selectedHttpAuthScheme={httpAuthOption:f,identity:await h(f.identityProperties),signer:m.signer};break}if(!l.selectedHttpAuthScheme)throw new Error(d.join(`
1552
+ `));return n(s)},O5={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},D5=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(N5(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),O5)}}),L5=(e,t)=>(n,r)=>async s=>{const{response:i}=await n(s);try{const a=await t(i,e);return{response:i,output:a}}catch(a){if(Object.defineProperty(a,"$response",{value:i}),!("$metadata"in a)){const o="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{a.message+=`
1553
+ `+o}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(o):r.logger?.warn?.(o)}typeof a.$responseBodyText<"u"&&a.$response&&(a.$response.body=a.$responseBodyText);try{if(xo.isInstance(i)){const{headers:c={}}=i,l=Object.entries(c);a.$metadata={httpStatusCode:i.statusCode,requestId:Cm(/^x-[\w-]+-request-?id$/,l),extendedRequestId:Cm(/^x-[\w-]+-id-2$/,l),cfId:Cm(/^x-[\w-]+-cf-id$/,l)}}}catch{}}throw a}},Cm=(e,t)=>(t.find(([n])=>n.match(e))||[void 0,void 0])[1],M5=(e,t)=>(n,r)=>async s=>{const i=e,a=r.endpointV2?.url&&i.urlParser?async()=>i.urlParser(r.endpointV2.url):i.endpoint;if(!a)throw new Error("No valid endpoint provider available.");const o=await t(s.input,{...e,endpoint:a});return n({...s,request:o})},F5={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},IS={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ce(e,t,n){return{applyToStack:r=>{r.add(L5(e,n),F5),r.add(M5(e,t),IS)}}}const z5=e=>t=>{throw t},U5=(e,t)=>{},$5=e=>(t,n)=>async r=>{if(!Qn.isInstance(r.request))return t(r);const i=ll(n).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:o,signer:c}=i,l=await t({...r,request:await c.sign(r.request,o,a)}).catch((c.errorHandler||z5)(a));return(c.successHandler||U5)(l.response,a),l},RS={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},H5=e=>({applyToStack:t=>{t.addRelativeTo($5(),RS)}}),uc=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},ca={},ul=new Array(64);for(let e=0,t=65,n=90;e+t<=n;e++){const r=String.fromCharCode(e+t);ca[r]=e,ul[e]=r}for(let e=0,t=97,n=122;e+t<=n;e++){const r=String.fromCharCode(e+t),s=e+26;ca[r]=s,ul[s]=r}for(let e=0;e<10;e++){ca[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;ca[t]=n,ul[n]=t}ca["+"]=62;ul[62]="+";ca["/"]=63;ul[63]="/";const dc=6,au=8,q5=63,cp=e=>{let t=e.length/4*3;e.slice(-2)==="=="?t-=2:e.slice(-1)==="="&&t--;const n=new ArrayBuffer(t),r=new DataView(n);for(let s=0;s<e.length;s+=4){let i=0,a=0;for(let l=s,d=s+3;l<=d;l++)if(e[l]!=="="){if(!(e[l]in ca))throw new TypeError(`Invalid character ${e[l]} in base64 string.`);i|=ca[e[l]]<<(d-l)*dc,a+=dc}else i>>=dc;const o=s/4*3;i>>=a%au;const c=Math.floor(a/au);for(let l=0;l<c;l++){const d=(c-l-1)*au;r.setUint8(o+l,(i&255<<d)>>d)}}return new Uint8Array(n)},vo=e=>new TextEncoder().encode(e),Qc=e=>typeof e=="string"?vo(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),lp=e=>{if(typeof e=="string")return e;if(typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(e)};function Bh(e){let t;typeof e=="string"?t=vo(e):t=e;const n=typeof t=="object"&&typeof t.length=="number",r=typeof t=="object"&&typeof t.byteOffset=="number"&&typeof t.byteLength=="number";if(!n&&!r)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let s="";for(let i=0;i<t.length;i+=3){let a=0,o=0;for(let l=i,d=Math.min(i+3,t.length);l<d;l++)a|=t[l]<<(d-l-1)*au,o+=au;const c=Math.ceil(o/dc);a<<=c*dc-o;for(let l=1;l<=c;l++){const d=(c-l)*dc;s+=ul[(a&q5<<d)>>d]}s+="==".slice(0,4-c)}return s}function j5(e,t="utf-8"){return t==="base64"?Bh(e):lp(e)}function W5(e,t){return t==="base64"?Ha.mutate(cp(e)):Ha.mutate(vo(e))}class Ha extends Uint8Array{static fromString(t,n="utf-8"){switch(typeof t){case"string":return W5(t,n);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,Ha.prototype),t}transformToString(t="utf-8"){return j5(this,t)}}const G5=typeof ReadableStream=="function"?ReadableStream:function(){};class V5 extends G5{}const bg=e=>typeof ReadableStream=="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream),K5=({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:r,base64Encoder:s})=>{if(!bg(n))throw new Error(`@smithy/util-stream: unsupported source type ${n?.constructor?.name??n} in ChecksumStream.`);const i=s??Bh;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const a=new TransformStream({start(){},async transform(c,l){t.update(c),l.enqueue(c)},async flush(c){const l=await t.digest(),d=i(l);if(e!==d){const f=new Error(`Checksum mismatch: expected "${e}" but received "${d}" in response header "${r}".`);c.error(f)}else c.terminate()}});n.pipeThrough(a);const o=a.readable;return Object.setPrototypeOf(o,V5.prototype),o};class Y5{constructor(t){this.allocByteArray=t,this.byteLength=0,this.byteArrays=[]}push(t){this.byteArrays.push(t),this.byteLength+=t.byteLength}flush(){if(this.byteArrays.length===1){const r=this.byteArrays[0];return this.reset(),r}const t=this.allocByteArray(this.byteLength);let n=0;for(let r=0;r<this.byteArrays.length;++r){const s=this.byteArrays[r];t.set(s,n),n+=s.byteLength}return this.reset(),t}reset(){this.byteArrays=[],this.byteLength=0}}function X5(e,t,n){const r=e.getReader();let s=!1,i=0;const a=["",new Y5(l=>new Uint8Array(l))];let o=-1;const c=async l=>{const{value:d,done:f}=await r.read(),m=d;if(f){if(o!==-1){const h=xm(a,o);ou(h)>0&&l.enqueue(h)}l.close()}else{const h=J5(m,!1);if(o!==h&&(o>=0&&l.enqueue(xm(a,o)),o=h),o===-1){l.enqueue(m);return}const g=ou(m);i+=g;const b=ou(a[o]);if(g>=t&&b===0)l.enqueue(m);else{const p=Z5(a,o,m);!s&&i>t*2&&(s=!0,n?.warn(`@smithy/util-stream - stream chunk size ${g} is below threshold of ${t}, automatically buffering.`)),p>=t?l.enqueue(xm(a,o)):await c(l)}}};return new ReadableStream({pull:c})}const Q5=X5;function Z5(e,t,n){switch(t){case 0:return e[0]+=n,ou(e[0]);case 1:case 2:return e[t].push(n),ou(e[t])}}function xm(e,t){switch(t){case 0:const n=e[0];return e[0]="",n;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function ou(e){return e?.byteLength??e?.length??0}function J5(e,t=!0){return t&&typeof Buffer<"u"&&e instanceof Buffer?2:e instanceof Uint8Array?1:typeof e=="string"?0:-1}const e8=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:s,checksumLocationName:i,streamHasher:a}=t,o=n!==void 0&&r!==void 0&&s!==void 0&&i!==void 0&&a!==void 0,c=o?a(s,e):void 0,l=e.getReader();return new ReadableStream({async pull(d){const{value:f,done:m}=await l.read();if(m){if(d.enqueue(`0\r
1554
+ `),o){const h=n(await c);d.enqueue(`${i}:${h}\r
1555
+ `),d.enqueue(`\r
1556
+ `)}d.close()}else d.enqueue(`${(r(f)||0).toString(16)}\r
1557
+ ${f}\r
1558
+ `)}})};async function t8(e,t){let n=0;const r=[],s=e.getReader();let i=!1;for(;!i;){const{done:c,value:l}=await s.read();if(l&&(r.push(l),n+=l?.byteLength??0),n>=t)break;i=c}s.releaseLock();const a=new Uint8Array(Math.min(t,n));let o=0;for(const c of r){if(c.byteLength>a.byteLength-o){a.set(c.subarray(0,a.byteLength-o),o);break}else a.set(c,o);o+=c.length}return a}const qa=e=>encodeURIComponent(e).replace(/[!'()*]/g,n8),n8=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function r8(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=qa(n),Array.isArray(r))for(let s=0,i=r.length;s<i;s++)t.push(`${n}=${qa(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${qa(r)}`),t.push(s)}}return t.join("&")}function v1(e,t){return new Request(e,t)}function s8(e=0){return new Promise((t,n)=>{e&&setTimeout(()=>{const r=new Error(`Request did not complete within ${e} ms`);r.name="TimeoutError",n(r)},e)})}const vm={supported:void 0};class up{static create(t){return typeof t?.handle=="function"?t:new up(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),vm.supported===void 0&&(vm.supported=typeof Request<"u"&&"keepalive"in v1("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n,requestTimeout:r}={}){this.config||(this.config=await this.configProvider);const s=r??this.config.requestTimeout,i=this.config.keepAlive===!0,a=this.config.credentials;if(n?.aborted){const C=new Error("Request aborted");return C.name="AbortError",Promise.reject(C)}let o=t.path;const c=r8(t.query||{});c&&(o+=`?${c}`),t.fragment&&(o+=`#${t.fragment}`);let l="";if(t.username!=null||t.password!=null){const C=t.username??"",A=t.password??"";l=`${C}:${A}@`}const{port:d,method:f}=t,m=`${t.protocol}//${l}${t.hostname}${d?`:${d}`:""}${o}`,h=f==="GET"||f==="HEAD"?void 0:t.body,g={body:h,headers:new Headers(t.headers),method:f,credentials:a};this.config?.cache&&(g.cache=this.config.cache),h&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=n),vm.supported&&(g.keepalive=i),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(t));let b=()=>{};const p=v1(m,g),y=[fetch(p).then(C=>{const A=C.headers,T={};for(const w of A.entries())T[w[0]]=w[1];return C.body!=null?{response:new xo({headers:T,reason:C.statusText,statusCode:C.status,body:C.body})}:C.blob().then(w=>({response:new xo({headers:T,reason:C.statusText,statusCode:C.status,body:w})}))}),s8(s)];return n&&y.push(new Promise((C,A)=>{const T=()=>{const S=new Error("Request aborted");S.name="AbortError",A(S)};if(typeof n.addEventListener=="function"){const S=n;S.addEventListener("abort",T,{once:!0}),b=()=>S.removeEventListener("abort",T)}else n.onabort=T})),Promise.race(y).finally(b)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const BS=async e=>typeof Blob=="function"&&e instanceof Blob||e.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):i8(e):a8(e);async function i8(e){const t=await o8(e),n=cp(t);return new Uint8Array(n)}async function a8(e){const t=[],n=e.getReader();let r=!1,s=0;for(;!r;){const{done:o,value:c}=await n.read();c&&(t.push(c),s+=c.length),r=o}const i=new Uint8Array(s);let a=0;for(const o of t)i.set(o,a),a+=o.length;return i}function o8(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return n(new Error("Reader aborted too early"));const s=r.result??"",i=s.indexOf(","),a=i>-1?i+1:s.length;t(s.substring(a))},r.onabort=()=>n(new Error("Read aborted")),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}const PS={},pg={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),PS[e]=t,pg[t]=e}function NS(e){if(e.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(r in pg)t[n/2]=pg[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t}function ts(e){let t="";for(let n=0;n<e.byteLength;n++)t+=PS[e[n]];return t}const T1="The stream has already been transformed.",c8=e=>{if(!S1(e)&&!bg(e)){const s=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${s}`)}let t=!1;const n=async()=>{if(t)throw new Error(T1);return t=!0,await BS(e)},r=s=>{if(typeof s.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
1559
+ If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return s.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async s=>{const i=await n();if(s==="base64")return Bh(i);if(s==="hex")return ts(i);if(s===void 0||s==="utf8"||s==="utf-8")return lp(i);if(typeof TextDecoder=="function")return new TextDecoder(s).decode(i);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(T1);if(t=!0,S1(e))return r(e);if(bg(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},S1=e=>typeof Blob=="function"&&e instanceof Blob;async function l8(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const tt=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return Ha.mutate(e);if(!e)return Ha.mutate(new Uint8Array);const n=t.streamCollector(e);return Ha.mutate(await n)};function _1(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const Nt=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},u8=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&LS.warn(DS(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},d8=Math.ceil(2**127*(2-2**-23)),w1=e=>{const t=u8(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>d8)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},yg=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},A1=e=>dp(e,32),k1=e=>dp(e,16),I1=e=>dp(e,8),dp=(e,t)=>{const n=yg(e);if(n!==void 0&&f8(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},f8=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},Ve=(e,t)=>{if(e==null)throw t?new TypeError(`Expected a non-null value for ${t}`):new TypeError("Expected a non-null value");return e},gt=e=>{if(e==null)return;if(typeof e=="object"&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},D=e=>{if(e!=null){if(typeof e=="string")return e;if(["boolean","number","bigint"].includes(typeof e))return LS.warn(DS(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},OS=e=>{if(e==null)return;const t=gt(e),n=Object.entries(t).filter(([,r])=>r!=null).map(([r])=>r);if(n.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(n.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`);return t},h8=e=>w1(typeof e=="string"?Uu(e):e),m8=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Uu=e=>{const t=e.match(m8);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},yr=e=>yg(typeof e=="string"?Uu(e):e),Gt=e=>A1(typeof e=="string"?Uu(e):e),$f=e=>k1(typeof e=="string"?Uu(e):e),g8=e=>I1(typeof e=="string"?Uu(e):e),DS=e=>String(new TypeError(e).stack||e).split(`
1560
+ `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
1561
+ `),LS={warn:console.warn},b8=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],fp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ln(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),s=e.getUTCDate(),i=e.getUTCHours(),a=e.getUTCMinutes(),o=e.getUTCSeconds(),c=s<10?`0${s}`:`${s}`,l=i<10?`0${i}`:`${i}`,d=a<10?`0${a}`:`${a}`,f=o<10?`0${o}`:`${o}`;return`${b8[r]}, ${c} ${fp[n]} ${t} ${l}:${d}:${f} GMT`}const p8=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Xr=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=p8.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,s,i,a,o,c,l,d]=t,f=$f(ku(r)),m=ta(s,"month",1,12),h=ta(i,"day",1,31),g=Ld(f,m,h,{hours:a,minutes:o,seconds:c,fractionalMilliseconds:l});return d.toUpperCase()!="Z"&&g.setTime(g.getTime()-k8(d)),g},y8=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),E8=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),C8=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),la=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=y8.exec(e);if(t){const[n,r,s,i,a,o,c,l]=t;return Ld($f(ku(i)),Tm(s),ta(r,"day",1,31),{hours:a,minutes:o,seconds:c,fractionalMilliseconds:l})}if(t=E8.exec(e),t){const[n,r,s,i,a,o,c,l]=t;return T8(Ld(x8(i),Tm(s),ta(r,"day",1,31),{hours:a,minutes:o,seconds:c,fractionalMilliseconds:l}))}if(t=C8.exec(e),t){const[n,r,s,i,a,o,c,l]=t;return Ld($f(ku(l)),Tm(r),ta(s.trimLeft(),"day",1,31),{hours:i,minutes:a,seconds:o,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},Ld=(e,t,n,r)=>{const s=t-1;return _8(e,s,n),new Date(Date.UTC(e,s,n,ta(r.hours,"hour",0,23),ta(r.minutes,"minute",0,59),ta(r.seconds,"seconds",0,60),A8(r.fractionalMilliseconds)))},x8=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+$f(ku(e));return n<t?n+100:n},v8=50*365*24*60*60*1e3,T8=e=>e.getTime()-new Date().getTime()>v8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Tm=e=>{const t=fp.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},S8=[31,28,31,30,31,30,31,31,30,31,30,31],_8=(e,t,n)=>{let r=S8[t];if(t===1&&w8(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${fp[t]} in ${e}: ${n}`)},w8=e=>e%4===0&&(e%100!==0||e%400===0),ta=(e,t,n,r)=>{const s=g8(ku(e));if(s<n||s>r)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return s},A8=e=>e==null?0:h8("0."+e)*1e3,k8=e=>{const t=e[0];let n=1;if(t=="+")n=1;else if(t=="-")n=-1;else throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);const r=Number(e.substring(1,3)),s=Number(e.substring(4,6));return n*(r*60+s)*60*1e3},ku=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)};let bd;const I8=new Uint8Array(16);function R8(){if(!bd&&(bd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bd(I8)}const Tr=[];for(let e=0;e<256;++e)Tr.push((e+256).toString(16).slice(1));function B8(e,t=0){return Tr[e[t+0]]+Tr[e[t+1]]+Tr[e[t+2]]+Tr[e[t+3]]+"-"+Tr[e[t+4]]+Tr[e[t+5]]+"-"+Tr[e[t+6]]+Tr[e[t+7]]+"-"+Tr[e[t+8]]+Tr[e[t+9]]+"-"+Tr[e[t+10]]+Tr[e[t+11]]+Tr[e[t+12]]+Tr[e[t+13]]+Tr[e[t+14]]+Tr[e[t+15]]}const P8=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),R1={randomUUID:P8};function MS(e,t,n){if(R1.randomUUID&&!e)return R1.randomUUID();e=e||{};const r=e.random||(e.rng||R8)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,B8(r)}function Ph(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const N8=(e,t,n,r,s,i)=>{if(t!=null&&t[n]!==void 0){const a=r();if(a.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(s,i?a.split("/").map(o=>_1(o)).join("/"):_1(a))}else throw new Error("No value provided for input HTTP label: "+n+".");return e};function xe(e,t){return new O8(e,t)}class O8{constructor(t,n){this.input=t,this.context=n,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:t,protocol:n="https",port:r,path:s}=await this.context.endpoint();this.path=s;for(const i of this.resolvePathStack)i(this.path);return new Qn({protocol:n,hostname:this.hostname||t,port:r,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(t){return this.hostname=t,this}bp(t){return this.resolvePathStack.push(n=>{this.path=`${n?.endsWith("/")?n.slice(0,-1):n||""}`+t}),this}p(t,n,r,s){return this.resolvePathStack.push(i=>{this.path=N8(i,this.input,t,n,r,s)}),this}h(t){return this.headers=t,this}q(t){return this.query=t,this}b(t){return this.body=t,this}m(t){return this.method=t,this}}function D8(e,t,n){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=n}class L8{constructor(t){this.authSchemes=new Map;for(const[n,r]of Object.entries(t))r!==void 0&&this.authSchemes.set(n,r)}getIdentityProvider(t){return this.authSchemes.get(t)}}const M8=e=>t=>FS(t)&&t.expiration.getTime()-Date.now()<e,F8=3e5,z8=M8(F8),FS=e=>e.expiration!==void 0,U8=(e,t,n)=>{if(e===void 0)return;const r=typeof e!="function"?async()=>Promise.resolve(e):e;let s,i,a,o=!1;const c=async l=>{i||(i=r(l));try{s=await i,a=!0,o=!1}finally{i=void 0}return s};return t===void 0?async l=>((!a||l?.forceRefresh)&&(s=await c(l)),s):async l=>((!a||l?.forceRefresh)&&(s=await c(l)),o?s:n(s)?(t(s)&&await c(l),s):(o=!0,s))},$8=(e,t,n)=>{let r,s,i,a=!1;const o=async()=>{s||(s=e());try{r=await s,i=!0,a=!1}finally{s=void 0}return r};return async c=>((!i||c?.forceRefresh)&&(r=await o()),r)},H8=e=>(e.sigv4aSigningRegionSet=uc(e.sigv4aSigningRegionSet),e),q8="X-Amz-Algorithm",j8="X-Amz-Credential",zS="X-Amz-Date",W8="X-Amz-SignedHeaders",G8="X-Amz-Expires",US="X-Amz-Signature",$S="X-Amz-Security-Token",HS="authorization",qS=zS.toLowerCase(),V8="date",K8=[HS,qS,V8],Y8=US.toLowerCase(),Eg="x-amz-content-sha256",X8=$S.toLowerCase(),Q8={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Z8=/^proxy-/,J8=/^sec-/,Sm="AWS4-HMAC-SHA256",eL="AWS4-HMAC-SHA256-PAYLOAD",tL="UNSIGNED-PAYLOAD",nL=50,jS="aws4_request",rL=3600*24*7,pd={},_m=[],wm=(e,t,n)=>`${e}/${t}/${n}/${jS}`,sL=async(e,t,n,r,s)=>{const i=await B1(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${s}:${ts(i)}:${t.sessionToken}`;if(a in pd)return pd[a];for(_m.push(a);_m.length>nL;)delete pd[_m.shift()];let o=`AWS4${t.secretAccessKey}`;for(const c of[n,r,s,jS])o=await B1(e,o,c);return pd[a]=o},B1=(e,t,n)=>{const r=new e(t);return r.update(Qc(n)),r.digest()},P1=({headers:e},t,n)=>{const r={};for(const s of Object.keys(e).sort()){if(e[s]==null)continue;const i=s.toLowerCase();(i in Q8||t?.has(i)||Z8.test(i)||J8.test(i))&&(!n||n&&!n.has(i))||(r[i]=e[s].trim().replace(/\s+/g," "))}return r},WS=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",Am=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===Eg)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||WS(t)){const r=new n;return r.update(Qc(t)),ts(await r.digest())}return tL};class iL{format(t){const n=[];for(const i of Object.keys(t)){const a=vo(i);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[i]))}const r=new Uint8Array(n.reduce((i,a)=>i+a.byteLength,0));let s=0;for(const i of n)r.set(i,s),s+=i.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(t.value.bytes,1),s;case"binary":const i=new DataView(new ArrayBuffer(3+t.value.byteLength));i.setUint8(0,6),i.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(i.buffer);return a.set(t.value,3),a;case"string":const o=vo(t.value),c=new DataView(new ArrayBuffer(3+o.byteLength));c.setUint8(0,7),c.setUint16(1,o.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(o,3),l;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(oL.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!aL.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(NS(t.value.replace(/\-/g,"")),1),f}}}var N1;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(N1||(N1={}));const aL=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let oL=class GS{constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(t));r>-1&&s>0;r--,s/=256)n[r]=s;return t<0&&O1(n),new GS(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&O1(t),parseInt(ts(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function O1(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const cL=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},lL=(e,t={})=>{const{headers:n,query:r={}}=Qn.clone(e);for(const s of Object.keys(n)){const i=s.toLowerCase();(i.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(r[s]=n[s],delete n[s])}return{...e,headers:n,query:r}},D1=e=>{e=Qn.clone(e);for(const t of Object.keys(e.headers))K8.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},uL=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===Y8)continue;const s=qa(r);t.push(s);const i=e[r];typeof i=="string"?n[s]=`${s}=${qa(i)}`:Array.isArray(i)&&(n[s]=i.slice(0).reduce((a,o)=>a.concat([`${s}=${qa(o)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},dL=e=>fL(e).toISOString().replace(/\.\d{3}Z$/,"Z"),fL=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class hL{constructor({applyChecksum:t,credentials:n,region:r,service:s,sha256:i,uriEscapePath:a=!0}){this.service=s,this.sha256=i,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=qs(r),this.credentialProvider=qs(n)}createCanonicalRequest(t,n,r){const s=Object.keys(n).sort();return`${t.method}
1562
+ ${this.getCanonicalPath(t)}
1563
+ ${uL(t)}
1564
+ ${s.map(i=>`${i}:${n[i]}`).join(`
1565
+ `)}
1566
+
1567
+ ${s.join(";")}
1568
+ ${r}`}async createStringToSign(t,n,r,s){const i=new this.sha256;i.update(Qc(r));const a=await i.digest();return`${s}
1569
+ ${t}
1570
+ ${n}
1571
+ ${ts(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const i of t.split("/"))i?.length!==0&&i!=="."&&(i===".."?n.pop():n.push(i));const r=`${t?.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&t?.endsWith("/")?"/":""}`;return qa(r).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){const n=dL(t).replace(/[\-:]/g,"");return{longDate:n,shortDate:n.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}}class Cg extends hL{constructor({applyChecksum:t,credentials:n,region:r,service:s,sha256:i,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:n,region:r,service:s,sha256:i,uriEscapePath:a}),this.headerFormatter=new iL}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:s=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:c,signingRegion:l,signingService:d}=n,f=await this.credentialProvider();this.validateResolvedCredentials(f);const m=l??await this.regionProvider(),{longDate:h,shortDate:g}=this.formatDate(r);if(s>rL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const b=wm(g,m,d??this.service),p=lL(D1(t),{unhoistableHeaders:a,hoistableHeaders:c});f.sessionToken&&(p.query[$S]=f.sessionToken),p.query[q8]=Sm,p.query[j8]=`${f.accessKeyId}/${b}`,p.query[zS]=h,p.query[G8]=s.toString(10);const y=P1(p,i,o);return p.query[W8]=this.getCanonicalHeaderList(y),p.query[US]=await this.getSignature(h,b,this.getSigningKey(f,m,g,d),this.createCanonicalRequest(p,y,await Am(t,this.sha256))),p}async sign(t,n){return typeof t=="string"?this.signString(t,n):t.headers&&t.payload?this.signEvent(t,n):t.message?this.signMessage(t,n):this.signRequest(t,n)}async signEvent({headers:t,payload:n},{signingDate:r=new Date,priorSignature:s,signingRegion:i,signingService:a}){const o=i??await this.regionProvider(),{shortDate:c,longDate:l}=this.formatDate(r),d=wm(c,o,a??this.service),f=await Am({headers:{},body:n},this.sha256),m=new this.sha256;m.update(t);const h=ts(await m.digest()),g=[eL,l,d,s,h,f].join(`
1572
+ `);return this.signString(g,{signingDate:r,signingRegion:o,signingService:a})}async signMessage(t,{signingDate:n=new Date,signingRegion:r,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:n,signingRegion:r,signingService:s,priorSignature:t.priorSignature}).then(a=>({message:t.message,signature:a}))}async signString(t,{signingDate:n=new Date,signingRegion:r,signingService:s}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const a=r??await this.regionProvider(),{shortDate:o}=this.formatDate(n),c=new this.sha256(await this.getSigningKey(i,a,o,s));return c.update(Qc(t)),ts(await c.digest())}async signRequest(t,{signingDate:n=new Date,signableHeaders:r,unsignableHeaders:s,signingRegion:i,signingService:a}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const c=i??await this.regionProvider(),l=D1(t),{longDate:d,shortDate:f}=this.formatDate(n),m=wm(f,c,a??this.service);l.headers[qS]=d,o.sessionToken&&(l.headers[X8]=o.sessionToken);const h=await Am(l,this.sha256);!cL(Eg,l.headers)&&this.applyChecksum&&(l.headers[Eg]=h);const g=P1(l,s,r),b=await this.getSignature(d,m,this.getSigningKey(o,c,f,a),this.createCanonicalRequest(l,g,h));return l.headers[HS]=`${Sm} Credential=${o.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${b}`,l}async getSignature(t,n,r,s){const i=await this.createStringToSign(t,n,s,Sm),a=new this.sha256(await r);return a.update(Qc(i)),ts(await a.digest())}getSigningKey(t,n,r,s){return sL(this.sha256,t,r,n,s||this.service)}}const mL=e=>{let t=e.credentials,n=!!e.credentials,r;Object.defineProperty(e,"credentials",{set(l){l&&l!==t&&l!==r&&(n=!0),t=l;const d=gL(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),f=bL(e,d);n&&!f.attributed?(r=async m=>f(m).then(h=>k5(h,"CREDENTIALS_CODE","e")),r.memoized=f.memoized,r.configBound=f.configBound,r.attributed=!0):r=f},get(){return r},enumerable:!0,configurable:!0}),e.credentials=t;const{signingEscapePath:s=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:a}=e;let o;return e.signer?o=uc(e.signer):e.regionInfoProvider?o=()=>uc(e.region)().then(async l=>[await e.regionInfoProvider(l,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},l]).then(([l,d])=>{const{signingRegion:f,signingService:m}=l;e.signingRegion=e.signingRegion||f||d,e.signingName=e.signingName||m||e.serviceId;const h={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s},g=e.signerConstructor||Cg;return new g(h)}):o=async l=>{l=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await uc(e.region)(),properties:{}},l);const d=l.signingRegion,f=l.signingName;e.signingRegion=e.signingRegion||d,e.signingName=e.signingName||f||e.serviceId;const m={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s},h=e.signerConstructor||Cg;return new h(m)},Object.assign(e,{systemClockOffset:i,signingEscapePath:s,signer:o})};function gL(e,{credentials:t,credentialDefaultProvider:n}){let r;return t?t?.memoized?r=t:r=U8(t,z8,FS):n?r=uc(n(Object.assign({},e,{parentClientConfig:e}))):r=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},r.memoized=!0,r}function bL(e,t){if(t.configBound)return t;const n=async r=>t({...r,callerClientConfig:e});return n.memoized=t.memoized,n.configBound=!0,n}const L1=typeof TextEncoder=="function"?new TextEncoder:null,pL=e=>{if(typeof e=="string"){if(L1)return L1.encode(e).byteLength;let t=e.length;for(let n=t-1;n>=0;n--){const r=e.charCodeAt(n);r>127&&r<=2047?t++:r>2047&&r<=65535&&(t+=2),r>=56320&&r<=57343&&n--}return t}else{if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size}throw new Error(`Body Length computation failed for ${e}`)},Ta=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},Ui=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Hf=()=>{let e=[],t=[],n=!1;const r=new Set,s=f=>f.sort((m,h)=>M1[h.step]-M1[m.step]||F1[h.priority||"normal"]-F1[m.priority||"normal"]),i=f=>{let m=!1;const h=g=>{const b=Ta(g.name,g.aliases);if(b.includes(f)){m=!0;for(const p of b)r.delete(p);return!1}return!0};return e=e.filter(h),t=t.filter(h),m},a=f=>{let m=!1;const h=g=>{if(g.middleware===f){m=!0;for(const b of Ta(g.name,g.aliases))r.delete(b);return!1}return!0};return e=e.filter(h),t=t.filter(h),m},o=f=>(e.forEach(m=>{f.add(m.middleware,{...m})}),t.forEach(m=>{f.addRelativeTo(m.middleware,{...m})}),f.identifyOnResolve?.(d.identifyOnResolve()),f),c=f=>{const m=[];return f.before.forEach(h=>{h.before.length===0&&h.after.length===0?m.push(h):m.push(...c(h))}),m.push(f),f.after.reverse().forEach(h=>{h.before.length===0&&h.after.length===0?m.push(h):m.push(...c(h))}),m},l=(f=!1)=>{const m=[],h=[],g={};return e.forEach(p=>{const y={...p,before:[],after:[]};for(const C of Ta(y.name,y.aliases))g[C]=y;m.push(y)}),t.forEach(p=>{const y={...p,before:[],after:[]};for(const C of Ta(y.name,y.aliases))g[C]=y;h.push(y)}),h.forEach(p=>{if(p.toMiddleware){const y=g[p.toMiddleware];if(y===void 0){if(f)return;throw new Error(`${p.toMiddleware} is not found when adding ${Ui(p.name,p.aliases)} middleware ${p.relation} ${p.toMiddleware}`)}p.relation==="after"&&y.after.push(p),p.relation==="before"&&y.before.push(p)}}),s(m).map(c).reduce((p,y)=>(p.push(...y),p),[])},d={add:(f,m={})=>{const{name:h,override:g,aliases:b}=m,p={step:"initialize",priority:"normal",middleware:f,...m},y=Ta(h,b);if(y.length>0){if(y.some(C=>r.has(C))){if(!g)throw new Error(`Duplicate middleware name '${Ui(h,b)}'`);for(const C of y){const A=e.findIndex(S=>S.name===C||S.aliases?.some(w=>w===C));if(A===-1)continue;const T=e[A];if(T.step!==p.step||p.priority!==T.priority)throw new Error(`"${Ui(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${Ui(h,b)}" middleware with ${p.priority} priority in ${p.step} step.`);e.splice(A,1)}}for(const C of y)r.add(C)}e.push(p)},addRelativeTo:(f,m)=>{const{name:h,override:g,aliases:b}=m,p={middleware:f,...m},y=Ta(h,b);if(y.length>0){if(y.some(C=>r.has(C))){if(!g)throw new Error(`Duplicate middleware name '${Ui(h,b)}'`);for(const C of y){const A=t.findIndex(S=>S.name===C||S.aliases?.some(w=>w===C));if(A===-1)continue;const T=t[A];if(T.toMiddleware!==p.toMiddleware||T.relation!==p.relation)throw new Error(`"${Ui(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${Ui(h,b)}" middleware ${p.relation} "${p.toMiddleware}" middleware.`);t.splice(A,1)}}for(const C of y)r.add(C)}t.push(p)},clone:()=>o(Hf()),use:f=>{f.applyToStack(d)},remove:f=>typeof f=="string"?i(f):a(f),removeByTag:f=>{let m=!1;const h=g=>{const{tags:b,name:p,aliases:y}=g;if(b&&b.includes(f)){const C=Ta(p,y);for(const A of C)r.delete(A);return m=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),m},concat:f=>{const m=o(Hf());return m.use(f),m.identifyOnResolve(n||m.identifyOnResolve()||(f.identifyOnResolve?.()??!1)),m},applyToStack:o,identify:()=>l(!0).map(f=>{const m=f.step??f.relation+" "+f.toMiddleware;return Ui(f.name,f.aliases)+" - "+m}),identifyOnResolve(f){return typeof f=="boolean"&&(n=f),n},resolve:(f,m)=>{for(const h of l().map(g=>g.middleware).reverse())f=h(f,m);return n&&console.log(d.identify()),f}};return d},M1={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},F1={high:3,normal:2,low:1};class yL{constructor(t){this.config=t,this.middlewareStack=Hf()}send(t,n,r){const s=typeof n!="function"?n:void 0,i=typeof n=="function"?n:r,a=s===void 0&&this.config.cacheMiddleware===!0;let o;if(a){this.handlers||(this.handlers=new WeakMap);const c=this.handlers;c.has(t.constructor)?o=c.get(t.constructor):(o=t.resolveMiddleware(this.middlewareStack,this.config,s),c.set(t.constructor,o))}else delete this.handlers,o=t.resolveMiddleware(this.middlewareStack,this.config,s);if(i)o(t).then(c=>i(null,c.output),c=>i(c)).catch(()=>{});else return o(t).then(c=>c.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}class Ee{constructor(){this.middlewareStack=Hf()}static classBuilder(){return new EL}resolveMiddlewareWithContext(t,n,r,{middlewareFn:s,clientName:i,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:c,smithyContext:l,additionalContext:d,CommandCtor:f}){for(const p of s.bind(this)(f,t,n,r))this.middlewareStack.use(p);const m=t.concat(this.middlewareStack),{logger:h}=n,g={logger:h,clientName:i,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:c,[mg]:{commandInstance:this,...l},...d},{requestHandler:b}=n;return m.resolve(p=>b.handle(p.request,r||{}),g)}}class EL{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=t=>t,this._outputFilterSensitiveLog=t=>t,this._serializer=null,this._deserializer=null}init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,n,r={}){return this._smithyContext={service:t,operation:n,...r},this}c(t={}){return this._additionalContext=t,this}n(t,n){return this._clientName=t,this._commandName=n,this}f(t=r=>r,n=r=>r){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=n,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){const t=this;let n;return n=class extends Ee{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super(),this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(r,s,i){return this.resolveMiddlewareWithContext(r,s,i,{CommandCtor:n,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog,outputFilterSensitiveLog:t._outputFilterSensitiveLog,smithyContext:t._smithyContext,additionalContext:t._additionalContext})}}}}const _t="***SensitiveInformation***",CL=(e,t)=>{for(const n of Object.keys(e)){const r=e[n],s=async function(a,o,c){const l=new r(a);if(typeof o=="function")this.send(l,o);else if(typeof c=="function"){if(typeof o!="object")throw new Error(`Expected http options but got ${typeof o}`);this.send(l,o||{},c)}else return this.send(l,o)},i=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[i]=s}};class sc extends Error{constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;const n=t;return sc.prototype.isPrototypeOf(n)||!!n.$fault&&!!n.$metadata&&(n.$fault==="client"||n.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;const n=t;return this===sc?sc.isInstance(t):sc.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const Qr=(e,t={})=>{Object.entries(t).filter(([,r])=>r!==void 0).forEach(([r,s])=>{(e[r]==null||e[r]==="")&&(e[r]=s)});const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},xL=({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const s=TL(e),i=s.httpStatusCode?s.httpStatusCode+"":void 0,a=new n({name:t?.code||t?.Code||r||i||"UnknownError",$fault:"client",$metadata:s});throw Qr(a,t)},vL=e=>({output:t,parsedBody:n,errorCode:r})=>{xL({output:t,parsedBody:n,exceptionCtor:e,errorCode:r})},TL=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),SL=e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},_L=e=>{const t=[];for(const n in Uf){const r=Uf[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{addChecksumAlgorithm(n){t.push(n)},checksumAlgorithms(){return t}}},wL=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},AL=e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),kL=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},IL=e=>Object.assign(_L(e),AL(e)),RL=e=>Object.assign(wL(e),kL(e)),ot=e=>Array.isArray(e)?e:[e],VS=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&e[n][t]!==void 0?e[n]=e[n][t]:typeof e[n]=="object"&&e[n]!==null&&(e[n]=VS(e[n]));return e},ee=e=>e!=null;class hp{trace(){}debug(){}info(){}warn(){}error(){}}function _(e,t,n){let r,s,i;if(typeof t>"u"&&typeof n>"u")r={},i=e;else{if(r=e,typeof t=="function")return s=t,i=n,BL(r,s,i);i=t}for(const a of Object.keys(i)){if(!Array.isArray(i[a])){r[a]=i[a];continue}PL(r,null,i,a)}return r}const BL=(e,t,n)=>_(e,Object.entries(n).reduce((r,[s,i])=>(Array.isArray(i)?r[s]=i:typeof i=="function"?r[s]=[t,i()]:r[s]=[t,i],r),{})),PL=(e,t,n,r)=>{let[s,i]=n[r];if(typeof i=="function"){let a;const o=s===void 0&&(a=i())!=null,c=typeof s=="function"&&!!s(void 0)||typeof s!="function"&&!!s;o?e[r]=a:c&&(e[r]=i())}else{const a=s===void 0&&i!=null,o=typeof s=="function"&&!!s(i)||typeof s!="function"&&!!s;(a||o)&&(e[r]=i)}},Ro=e=>e.toISOString().replace(".000Z","Z"),NL=(e,t)=>tt(e,t).then(n=>t.utf8Encoder(n)),KS=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",OL=KS+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",DL="["+KS+"]["+OL+"]*",LL=new RegExp("^"+DL+"$");function YS(e,t){const n=[];let r=t.exec(e);for(;r;){const s=[];s.startIndex=t.lastIndex-r[0].length;const i=r.length;for(let a=0;a<i;a++)s.push(r[a]);n.push(s),r=t.exec(e)}return n}const mp=function(e){const t=LL.exec(e);return!(t===null||typeof t>"u")};function ML(e){return typeof e<"u"}const FL={allowBooleanAttributes:!1,unpairedTags:[]};function zL(e,t){t=Object.assign({},FL,t);const n=[];let r=!1,s=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let i=0;i<e.length;i++)if(e[i]==="<"&&e[i+1]==="?"){if(i+=2,i=U1(e,i),i.err)return i}else if(e[i]==="<"){let a=i;if(i++,e[i]==="!"){i=$1(e,i);continue}else{let o=!1;e[i]==="/"&&(o=!0,i++);let c="";for(;i<e.length&&e[i]!==">"&&e[i]!==" "&&e[i]!==" "&&e[i]!==`
1573
+ `&&e[i]!=="\r";i++)c+=e[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!VL(c)){let f;return c.trim().length===0?f="Invalid space after '<'.":f="Tag '"+c+"' is an invalid name.",Un("InvalidTag",f,qr(e,i))}const l=HL(e,i);if(l===!1)return Un("InvalidAttr","Attributes for '"+c+"' have open quote.",qr(e,i));let d=l.value;if(i=l.index,d[d.length-1]==="/"){const f=i-d.length;d=d.substring(0,d.length-1);const m=H1(d,t);if(m===!0)r=!0;else return Un(m.err.code,m.err.msg,qr(e,f+m.err.line))}else if(o)if(l.tagClosed){if(d.trim().length>0)return Un("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",qr(e,a));if(n.length===0)return Un("InvalidTag","Closing tag '"+c+"' has not been opened.",qr(e,a));{const f=n.pop();if(c!==f.tagName){let m=qr(e,f.tagStartPos);return Un("InvalidTag","Expected closing tag '"+f.tagName+"' (opened in line "+m.line+", col "+m.col+") instead of closing tag '"+c+"'.",qr(e,a))}n.length==0&&(s=!0)}}else return Un("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",qr(e,i));else{const f=H1(d,t);if(f!==!0)return Un(f.err.code,f.err.msg,qr(e,i-d.length+f.err.line));if(s===!0)return Un("InvalidXml","Multiple possible root nodes found.",qr(e,i));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:a}),r=!0}for(i++;i<e.length;i++)if(e[i]==="<")if(e[i+1]==="!"){i++,i=$1(e,i);continue}else if(e[i+1]==="?"){if(i=U1(e,++i),i.err)return i}else break;else if(e[i]==="&"){const f=WL(e,i);if(f==-1)return Un("InvalidChar","char '&' is not expected.",qr(e,i));i=f}else if(s===!0&&!z1(e[i]))return Un("InvalidXml","Extra text at the end",qr(e,i));e[i]==="<"&&i--}}else{if(z1(e[i]))continue;return Un("InvalidChar","char '"+e[i]+"' is not expected.",qr(e,i))}if(r){if(n.length==1)return Un("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",qr(e,n[0].tagStartPos));if(n.length>0)return Un("InvalidXml","Invalid '"+JSON.stringify(n.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Un("InvalidXml","Start tag expected.",1);return!0}function z1(e){return e===" "||e===" "||e===`
1574
+ `||e==="\r"}function U1(e,t){const n=t;for(;t<e.length;t++)if(e[t]=="?"||e[t]==" "){const r=e.substr(n,t-n);if(t>5&&r==="xml")return Un("InvalidXml","XML declaration allowed only at the start of the document.",qr(e,t));if(e[t]=="?"&&e[t+1]==">"){t++;break}else continue}return t}function $1(e,t){if(e.length>t+5&&e[t+1]==="-"&&e[t+2]==="-"){for(t+=3;t<e.length;t++)if(e[t]==="-"&&e[t+1]==="-"&&e[t+2]===">"){t+=2;break}}else if(e.length>t+8&&e[t+1]==="D"&&e[t+2]==="O"&&e[t+3]==="C"&&e[t+4]==="T"&&e[t+5]==="Y"&&e[t+6]==="P"&&e[t+7]==="E"){let n=1;for(t+=8;t<e.length;t++)if(e[t]==="<")n++;else if(e[t]===">"&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]==="["&&e[t+2]==="C"&&e[t+3]==="D"&&e[t+4]==="A"&&e[t+5]==="T"&&e[t+6]==="A"&&e[t+7]==="["){for(t+=8;t<e.length;t++)if(e[t]==="]"&&e[t+1]==="]"&&e[t+2]===">"){t+=2;break}}return t}const UL='"',$L="'";function HL(e,t){let n="",r="",s=!1;for(;t<e.length;t++){if(e[t]===UL||e[t]===$L)r===""?r=e[t]:r!==e[t]||(r="");else if(e[t]===">"&&r===""){s=!0;break}n+=e[t]}return r!==""?!1:{value:n,index:t,tagClosed:s}}const qL=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function H1(e,t){const n=YS(e,qL),r={};for(let s=0;s<n.length;s++){if(n[s][1].length===0)return Un("InvalidAttr","Attribute '"+n[s][2]+"' has no space in starting.",jl(n[s]));if(n[s][3]!==void 0&&n[s][4]===void 0)return Un("InvalidAttr","Attribute '"+n[s][2]+"' is without value.",jl(n[s]));if(n[s][3]===void 0&&!t.allowBooleanAttributes)return Un("InvalidAttr","boolean attribute '"+n[s][2]+"' is not allowed.",jl(n[s]));const i=n[s][2];if(!GL(i))return Un("InvalidAttr","Attribute '"+i+"' is an invalid name.",jl(n[s]));if(!r.hasOwnProperty(i))r[i]=1;else return Un("InvalidAttr","Attribute '"+i+"' is repeated.",jl(n[s]))}return!0}function jL(e,t){let n=/\d/;for(e[t]==="x"&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(e[t]===";")return t;if(!e[t].match(n))break}return-1}function WL(e,t){if(t++,e[t]===";")return-1;if(e[t]==="#")return t++,jL(e,t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===";")break;return-1}return t}function Un(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function GL(e){return mp(e)}function VL(e){return mp(e)}function qr(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function jl(e){return e.startIndex+e[1].length}const KL={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1},YL=function(e){return Object.assign({},KL,e)};let qf;typeof Symbol!="function"?qf="@@xmlMetadata":qf=Symbol("XML Node Metadata");let Aa=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,n){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:n})}addChild(t,n){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),n!==void 0&&(this.child[this.child.length-1][qf]={startIndex:n})}static getMetaDataSymbol(){return qf}};function XL(e,t){const n={};if(e[t+3]==="O"&&e[t+4]==="C"&&e[t+5]==="T"&&e[t+6]==="Y"&&e[t+7]==="P"&&e[t+8]==="E"){t=t+9;let r=1,s=!1,i=!1,a="";for(;t<e.length;t++)if(e[t]==="<"&&!i){if(s&&ka(e,"!ENTITY",t)){t+=7;let o,c;[o,c,t]=QL(e,t+1),c.indexOf("&")===-1&&(n[o]={regx:RegExp(`&${o};`,"g"),val:c})}else if(s&&ka(e,"!ELEMENT",t)){t+=8;const{index:o}=JL(e,t+1);t=o}else if(s&&ka(e,"!ATTLIST",t))t+=8;else if(s&&ka(e,"!NOTATION",t)){t+=9;const{index:o}=ZL(e,t+1);t=o}else if(ka(e,"!--",t))i=!0;else throw new Error("Invalid DOCTYPE");r++,a=""}else if(e[t]===">"){if(i?e[t-1]==="-"&&e[t-2]==="-"&&(i=!1,r--):r--,r===0)break}else e[t]==="["?s=!0:a+=e[t];if(r!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:t}}const Xi=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function QL(e,t){t=Xi(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t])&&e[t]!=='"'&&e[t]!=="'";)n+=e[t],t++;if(gp(n),t=Xi(e,t),e.substring(t,t+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[t]==="%")throw new Error("Parameter entities are not supported");let r="";return[t,r]=Md(e,t,"entity"),t--,[n,r,t]}function ZL(e,t){t=Xi(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;gp(n),t=Xi(e,t);const r=e.substring(t,t+6).toUpperCase();if(r!=="SYSTEM"&&r!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${r}"`);t+=r.length,t=Xi(e,t);let s=null,i=null;if(r==="PUBLIC")[t,s]=Md(e,t,"publicIdentifier"),t=Xi(e,t),(e[t]==='"'||e[t]==="'")&&([t,i]=Md(e,t,"systemIdentifier"));else if(r==="SYSTEM"&&([t,i]=Md(e,t,"systemIdentifier"),!i))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:i,index:--t}}function Md(e,t,n){let r="";const s=e[t];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);for(t++;t<e.length&&e[t]!==s;)r+=e[t],t++;if(e[t]!==s)throw new Error(`Unterminated ${n} value`);return t++,[t,r]}function JL(e,t){t=Xi(e,t);let n="";for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!gp(n))throw new Error(`Invalid element name: "${n}"`);t=Xi(e,t);let r="";if(e[t]==="E"&&ka(e,"MPTY",t))t+=4;else if(e[t]==="A"&&ka(e,"NY",t))t+=2;else if(e[t]==="("){for(t++;t<e.length&&e[t]!==")";)r+=e[t],t++;if(e[t]!==")")throw new Error("Unterminated content model")}else throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:n,contentModel:r.trim(),index:t}}function ka(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function gp(e){if(mp(e))return e;throw new Error(`Invalid entity name ${e}`)}const eM=/^[-+]?0x[a-fA-F0-9]+$/,tM=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,nM={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function rM(e,t={}){if(t=Object.assign({},nM,t),!e||typeof e!="string")return e;let n=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(n))return e;if(e==="0")return 0;if(t.hex&&eM.test(n))return oM(n,16);if(n.search(/.+[eE].+/)!==-1)return iM(e,n,t);{const r=tM.exec(n);if(r){const s=r[1]||"",i=r[2];let a=aM(r[3]);const o=s?e[i.length+1]===".":e[i.length]===".";if(!t.leadingZeros&&(i.length>1||i.length===1&&!o))return e;{const c=Number(n),l=String(c);if(c===0)return c;if(l.search(/[eE]/)!==-1)return t.eNotation?c:e;if(n.indexOf(".")!==-1)return l==="0"||l===a||l===`${s}${a}`?c:e;let d=i?a:n;return i?d===l||s+d===l?c:e:d===l||d===s+l?c:e}}else return e}}const sM=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function iM(e,t,n){if(!n.eNotation)return e;const r=t.match(sM);if(r){let s=r[1]||"";const i=r[3].indexOf("e")===-1?"E":"e",a=r[2],o=s?e[a.length+1]===i:e[a.length]===i;return a.length>1&&o?e:a.length===1&&(r[3].startsWith(`.${i}`)||r[3][0]===i)?Number(t):n.leadingZeros&&!o?(t=(r[1]||"")+r[3],Number(t)):e}else return e}function aM(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substring(0,e.length-1))),e}function oM(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function cM(e){return typeof e=="function"?e:Array.isArray(e)?t=>{for(const n of e)if(typeof n=="string"&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}class lM{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(n,r)=>String.fromCodePoint(Number.parseInt(r,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(n,r)=>String.fromCodePoint(Number.parseInt(r,16))}},this.addExternalEntities=uM,this.parseXml=gM,this.parseTextData=dM,this.resolveNameSpace=fM,this.buildAttributesMap=mM,this.isItStopNode=EM,this.replaceEntitiesValue=pM,this.readStopNodeData=xM,this.saveTextToParentTag=yM,this.addChild=bM,this.ignoreAttributesFn=cM(this.options.ignoreAttributes)}}function uM(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function dM(e,t,n,r,s,i,a){if(e!==void 0&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));const o=this.options.tagValueProcessor(t,e,n,s,i);return o==null?e:typeof o!=typeof e||o!==e?o:this.options.trimValues?vg(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?vg(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function fM(e){if(this.options.removeNSPrefix){const t=e.split(":"),n=e.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(e=n+t[1])}return e}const hM=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function mM(e,t,n){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){const r=YS(e,hM),s=r.length,i={};for(let a=0;a<s;a++){const o=this.resolveNameSpace(r[a][1]);if(this.ignoreAttributesFn(o,t))continue;let c=r[a][4],l=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),c!==void 0){this.options.trimValues&&(c=c.trim()),c=this.replaceEntitiesValue(c);const d=this.options.attributeValueProcessor(o,c,t);d==null?i[l]=c:typeof d!=typeof c||d!==c?i[l]=d:i[l]=vg(c,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[l]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const a={};return a[this.options.attributesGroupName]=i,a}return i}}const gM=function(e){e=e.replace(/\r\n?/g,`
1575
+ `);const t=new Aa("!xml");let n=t,r="",s="";for(let i=0;i<e.length;i++)if(e[i]==="<")if(e[i+1]==="/"){const o=Ra(e,">",i,"Closing Tag is not closed.");let c=e.substring(i+2,o).trim();if(this.options.removeNSPrefix){const f=c.indexOf(":");f!==-1&&(c=c.substr(f+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&(r=this.saveTextToParentTag(r,n,s));const l=s.substring(s.lastIndexOf(".")+1);if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);let d=0;l&&this.options.unpairedTags.indexOf(l)!==-1?(d=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):d=s.lastIndexOf("."),s=s.substring(0,d),n=this.tagsNodeStack.pop(),r="",i=o}else if(e[i+1]==="?"){let o=xg(e,i,!1,"?>");if(!o)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,s),!(this.options.ignoreDeclaration&&o.tagName==="?xml"||this.options.ignorePiTags)){const c=new Aa(o.tagName);c.add(this.options.textNodeName,""),o.tagName!==o.tagExp&&o.attrExpPresent&&(c[":@"]=this.buildAttributesMap(o.tagExp,s,o.tagName)),this.addChild(n,c,s,i)}i=o.closeIndex+1}else if(e.substr(i+1,3)==="!--"){const o=Ra(e,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){const c=e.substring(i+4,o-2);r=this.saveTextToParentTag(r,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}i=o}else if(e.substr(i+1,2)==="!D"){const o=XL(e,i);this.docTypeEntities=o.entities,i=o.i}else if(e.substr(i+1,2)==="!["){const o=Ra(e,"]]>",i,"CDATA is not closed.")-2,c=e.substring(i+9,o);r=this.saveTextToParentTag(r,n,s);let l=this.parseTextData(c,n.tagname,s,!0,!1,!0,!0);l==null&&(l=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):n.add(this.options.textNodeName,l),i=o+2}else{let o=xg(e,i,this.options.removeNSPrefix),c=o.tagName;const l=o.rawTagName;let d=o.tagExp,f=o.attrExpPresent,m=o.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&r&&n.tagname!=="!xml"&&(r=this.saveTextToParentTag(r,n,s,!1));const h=n;h&&this.options.unpairedTags.indexOf(h.tagname)!==-1&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==t.tagname&&(s+=s?"."+c:c);const g=i;if(this.isItStopNode(this.options.stopNodes,s,c)){let b="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)c[c.length-1]==="/"?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),d=c):d=d.substr(0,d.length-1),i=o.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)i=o.closeIndex;else{const y=this.readStopNodeData(e,l,m+1);if(!y)throw new Error(`Unexpected end of ${l}`);i=y.i,b=y.tagContent}const p=new Aa(c);c!==d&&f&&(p[":@"]=this.buildAttributesMap(d,s,c)),b&&(b=this.parseTextData(b,c,s,!0,f,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),p.add(this.options.textNodeName,b),this.addChild(n,p,s,g)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){c[c.length-1]==="/"?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),d=c):d=d.substr(0,d.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const b=new Aa(c);c!==d&&f&&(b[":@"]=this.buildAttributesMap(d,s,c)),this.addChild(n,b,s,g),s=s.substr(0,s.lastIndexOf("."))}else{const b=new Aa(c);this.tagsNodeStack.push(n),c!==d&&f&&(b[":@"]=this.buildAttributesMap(d,s,c)),this.addChild(n,b,s,g),n=b}r="",i=m}}else r+=e[i];return t.child};function bM(e,t,n,r){this.options.captureMetaData||(r=void 0);const s=this.options.updateTag(t.tagname,n,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),e.addChild(t,r))}const pM=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function yM(e,t,n,r){return e&&(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,r),e!==void 0&&e!==""&&t.add(this.options.textNodeName,e),e=""),e}function EM(e,t,n){const r="*."+n;for(const s in e){const i=e[s];if(r===i||t===i)return!0}return!1}function CM(e,t,n=">"){let r,s="";for(let i=t;i<e.length;i++){let a=e[i];if(r)a===r&&(r="");else if(a==='"'||a==="'")r=a;else if(a===n[0])if(n[1]){if(e[i+1]===n[1])return{data:s,index:i}}else return{data:s,index:i};else a===" "&&(a=" ");s+=a}}function Ra(e,t,n,r){const s=e.indexOf(t,n);if(s===-1)throw new Error(r);return s+t.length-1}function xg(e,t,n,r=">"){const s=CM(e,t+1,r);if(!s)return;let i=s.data;const a=s.index,o=i.search(/\s/);let c=i,l=!0;o!==-1&&(c=i.substring(0,o),i=i.substring(o+1).trimStart());const d=c;if(n){const f=c.indexOf(":");f!==-1&&(c=c.substr(f+1),l=c!==s.data.substr(f+1))}return{tagName:c,tagExp:i,closeIndex:a,attrExpPresent:l,rawTagName:d}}function xM(e,t,n){const r=n;let s=1;for(;n<e.length;n++)if(e[n]==="<")if(e[n+1]==="/"){const i=Ra(e,">",n,`${t} is not closed`);if(e.substring(n+2,i).trim()===t&&(s--,s===0))return{tagContent:e.substring(r,n),i};n=i}else if(e[n+1]==="?")n=Ra(e,"?>",n+1,"StopNode is not closed.");else if(e.substr(n+1,3)==="!--")n=Ra(e,"-->",n+3,"StopNode is not closed.");else if(e.substr(n+1,2)==="![")n=Ra(e,"]]>",n,"StopNode is not closed.")-2;else{const i=xg(e,n,">");i&&((i&&i.tagName)===t&&i.tagExp[i.tagExp.length-1]!=="/"&&s++,n=i.closeIndex)}}function vg(e,t,n){if(t&&typeof e=="string"){const r=e.trim();return r==="true"?!0:r==="false"?!1:rM(e,n)}else return ML(e)?e:""}const km=Aa.getMetaDataSymbol();function vM(e,t){return XS(e,t)}function XS(e,t,n){let r;const s={};for(let i=0;i<e.length;i++){const a=e[i],o=TM(a);let c="";if(n===void 0?c=o:c=n+"."+o,o===t.textNodeName)r===void 0?r=a[o]:r+=""+a[o];else{if(o===void 0)continue;if(a[o]){let l=XS(a[o],t,c);const d=_M(l,t);a[km]!==void 0&&(l[km]=a[km]),a[":@"]?SM(l,a[":@"],c,t):Object.keys(l).length===1&&l[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?l=l[t.textNodeName]:Object.keys(l).length===0&&(t.alwaysCreateTextNode?l[t.textNodeName]="":l=""),s[o]!==void 0&&s.hasOwnProperty(o)?(Array.isArray(s[o])||(s[o]=[s[o]]),s[o].push(l)):t.isArray(o,c,d)?s[o]=[l]:s[o]=l}}}return typeof r=="string"?r.length>0&&(s[t.textNodeName]=r):r!==void 0&&(s[t.textNodeName]=r),s}function TM(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];if(r!==":@")return r}}function SM(e,t,n,r){if(t){const s=Object.keys(t),i=s.length;for(let a=0;a<i;a++){const o=s[a];r.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function _M(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return!!(r===0||r===1&&(e[n]||typeof e[n]=="boolean"||e[n]===0))}class wM{constructor(t){this.externalEntities={},this.options=YL(t)}parse(t,n){if(typeof t!="string")if(t.toString)t=t.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(n){n===!0&&(n={});const i=zL(t,n);if(i!==!0)throw Error(`${i.err.msg}:${i.err.line}:${i.err.col}`)}const r=new lM(this.options);r.addExternalEntities(this.externalEntities);const s=r.parseXml(t);return this.options.preserveOrder||s===void 0?s:vM(s,this.options)}addEntity(t,n){if(n.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(n==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=n}static getMetaDataSymbol(){return Aa.getMetaDataSymbol()}}const ut=(e,t)=>NL(e,t).then(n=>{if(n.length){const r=new wM({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(c,l)=>l.trim()===""&&l.includes(`
1576
+ `)?"":void 0});r.addEntity("#xD","\r"),r.addEntity("#10",`
1577
+ `);let s;try{s=r.parse(n,!0)}catch(c){throw c&&typeof c=="object"&&Object.defineProperty(c,"$responseBodyText",{value:n}),c}const i="#text",a=Object.keys(s)[0],o=s[a];return o[i]&&(o[a]=o[i],delete o[i]),VS(o)}return{}}),AM=async(e,t)=>{const n=await ut(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},kM=(e,t)=>{if(t?.Error?.Code!==void 0)return t.Error.Code;if(t?.Code!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"};function IM(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function RM(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class bp{value;constructor(t){this.value=t}toString(){return RM(""+this.value)}}class M{name;children;attributes={};static of(t,n,r){const s=new M(t);return n!==void 0&&s.addChildNode(new bp(n)),r!==void 0&&s.withName(r),s}constructor(t,n=[]){this.name=t,this.children=n}withName(t){return this.name=t,this}addAttribute(t,n){return this.attributes[t]=n,this}addChildNode(t){return this.children.push(t),this}removeAttribute(t){return delete this.attributes[t],this}n(t){return this.name=t,this}c(t){return this.children.push(t),this}a(t,n){return n!=null&&(this.attributes[t]=n),this}cc(t,n,r=n){if(t[n]!=null){const s=M.of(n,t[n]).withName(r);this.c(s)}}l(t,n,r,s){t[n]!=null&&s().map(a=>{a.withName(r),this.c(a)})}lc(t,n,r,s){if(t[n]!=null){const i=s(),a=new M(r);i.map(o=>{a.c(o)}),this.c(a)}}toString(){const t=!!this.children.length;let n=`<${this.name}`;const r=this.attributes;for(const s of Object.keys(r)){const i=r[s];i!=null&&(n+=` ${s}="${IM(""+i)}"`)}return n+=t?`>${this.children.map(s=>s.toString()).join("")}</${this.name}>`:"/>"}}const Tg=[ln.CRC32,ln.CRC32C,ln.CRC64NVME,ln.SHA1,ln.SHA256],BM=[ln.SHA256,ln.SHA1,ln.CRC32,ln.CRC32C,ln.CRC64NVME],PM=(e,{requestChecksumRequired:t,requestAlgorithmMember:n,requestChecksumCalculation:r})=>{if(!n)return r===Xc.WHEN_SUPPORTED||t?gg:void 0;if(!e[n])return;const s=e[n];if(!Tg.includes(s))throw new Error(`The checksum algorithm "${s}" is not supported by the client. Select one of ${Tg}.`);return s},pp=e=>e===ln.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,NM=(e,t)=>{const n=e.toLowerCase();for(const r of Object.keys(t))if(n===r.toLowerCase())return!0;return!1},OM=(e,t)=>{const n=e.toLowerCase();for(const r of Object.keys(t))if(r.toLowerCase().startsWith(n))return!0;return!1},QS=e=>e!==void 0&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!WS(e);function yp(e,t,n,r){function s(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function o(d){try{l(r.next(d))}catch(f){a(f)}}function c(d){try{l(r.throw(d))}catch(f){a(f)}}function l(d){d.done?i(d.value):s(d.value).then(o,c)}l((r=r.apply(e,t||[])).next())})}function Ep(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,s,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(d){return c([l,d])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(n=0)),n;)try{if(r=1,s&&(i=l[0]&2?s.return:l[0]?s.throw||((i=s.return)&&i.call(s),0):s.next)&&!(i=i.call(s,l[1])).done)return i;switch(s=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,s=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]<i[3])){n.label=l[1];break}if(l[0]===6&&n.label<i[1]){n.label=i[1],i=l;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(l);break}i[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(d){l=[6,d],s=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function ZS(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}const JS=e=>new TextEncoder().encode(e);var DM=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:JS;function ua(e){return e instanceof Uint8Array?e:typeof e=="string"?DM(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function Iu(e){return typeof e=="string"?e.length===0:e.byteLength===0}function e_(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function t_(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}var LM=(function(){function e(){this.crc32c=new q1}return e.prototype.update=function(t){Iu(t)||this.crc32c.update(ua(t))},e.prototype.digest=function(){return yp(this,void 0,void 0,function(){return Ep(this,function(t){return[2,e_(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new q1},e})(),q1=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var s=ZS(t),i=s.next();!i.done;i=s.next()){var a=i.value;this.checksum=this.checksum>>>8^FM[(this.checksum^a)&255]}}catch(o){n={error:o}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),MM=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],FM=t_(MM),zM=(function(){function e(){this.crc32=new jf}return e.prototype.update=function(t){Iu(t)||this.crc32.update(ua(t))},e.prototype.digest=function(){return yp(this,void 0,void 0,function(){return Ep(this,function(t){return[2,e_(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new jf},e})(),jf=(function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var s=ZS(t),i=s.next();!i.done;i=s.next()){var a=i.value;this.checksum=this.checksum>>>8^$M[(this.checksum^a)&255]}}catch(o){n={error:o}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return this},e.prototype.digest=function(){return(this.checksum^4294967295)>>>0},e})(),UM=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],$M=t_(UM);const HM=()=>zM,n_=(e,t)=>{switch(e){case ln.MD5:return t.md5;case ln.CRC32:return HM();case ln.CRC32C:return LM;case ln.CRC64NVME:throw new Error(`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly.
1578
+ You must also register the package by calling [require("@aws-sdk/crc64-nvme-crt");] or an ESM equivalent such as [import "@aws-sdk/crc64-nvme-crt";].
1579
+ For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);case ln.SHA1:return t.sha1;case ln.SHA256:return t.sha256;default:throw new Error(`Unsupported checksum algorithm: ${e}`)}},r_=(e,t)=>{const n=new e;return n.update(Qc(t||"")),n.digest()},qM={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},jM=(e,t)=>(n,r)=>async s=>{if(!Qn.isInstance(s.request)||OM("x-amz-checksum-",s.request.headers))return n(s);const{request:i,input:a}=s,{body:o,headers:c}=i,{base64Encoder:l,streamHasher:d}=e,{requestChecksumRequired:f,requestAlgorithmMember:m}=t,h=await e.requestChecksumCalculation(),g=m?.name,b=m?.httpHeader;g&&!a[g]&&(h===Xc.WHEN_SUPPORTED||f)&&(a[g]=gg,b&&(c[b]=gg));const p=PM(a,{requestChecksumRequired:f,requestAlgorithmMember:m?.name,requestChecksumCalculation:h});let y=o,C=c;if(p){switch(p){case ln.CRC32:Kn(r,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case ln.CRC32C:Kn(r,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case ln.CRC64NVME:Kn(r,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case ln.SHA1:Kn(r,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case ln.SHA256:Kn(r,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const T=pp(p),S=n_(p,e);if(QS(o)){const{getAwsChunkedEncodingStream:w,bodyLengthChecker:v}=e;y=w(typeof e.requestStreamBufferSize=="number"&&e.requestStreamBufferSize>=8*1024?Q5(o,e.requestStreamBufferSize,r.logger):o,{base64Encoder:l,bodyLengthChecker:v,checksumLocationName:T,checksumAlgorithmFn:S,streamHasher:d}),C={...c,"content-encoding":c["content-encoding"]?`${c["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":c["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":T},delete C["content-length"]}else if(!NM(T,c)){const w=await r_(S,o);C={...c,[T]:l(w)}}}return await n({...s,request:{...i,headers:C,body:y}})},WM={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},GM=(e,t)=>(n,r)=>async s=>{const i=s.input,{requestValidationModeMember:a}=t,o=await e.requestChecksumCalculation(),c=await e.responseChecksumValidation();switch(o){case Xc.WHEN_REQUIRED:Kn(r,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Xc.WHEN_SUPPORTED:Kn(r,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(c){case Em.WHEN_REQUIRED:Kn(r,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case Em.WHEN_SUPPORTED:Kn(r,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return a&&!i[a]&&c===Em.WHEN_SUPPORTED&&(i[a]="ENABLED"),n(s)},s_=(e=[])=>{const t=[];for(const n of BM)!e.includes(n)||!Tg.includes(n)||t.push(n);return t},VM=e=>{const t=e.lastIndexOf("-");if(t!==-1){const n=e.slice(t+1);if(!n.startsWith("0")){const r=parseInt(n,10);if(!isNaN(r)&&r>=1&&r<=1e4)return!0}}return!1},KM=async(e,{checksumAlgorithmFn:t,base64Encoder:n})=>n(await r_(t,e)),YM=async(e,{config:t,responseAlgorithms:n,logger:r})=>{const s=s_(n),{body:i,headers:a}=e;for(const o of s){const c=pp(o),l=a[c];if(l){let d;try{d=n_(o,t)}catch(h){if(o===ln.CRC64NVME){r?.warn(`Skipping ${ln.CRC64NVME} checksum validation: ${h.message}`);continue}throw h}const{base64Encoder:f}=t;if(QS(i)){e.body=K5({expectedChecksum:l,checksumSourceLocation:c,checksum:new d,source:i,base64Encoder:f});return}const m=await KM(i,{checksumAlgorithmFn:d,base64Encoder:f});if(m===l)break;throw new Error(`Checksum mismatch: expected "${m}" but received "${l}" in response header "${c}".`)}}},XM={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},QM=(e,t)=>(n,r)=>async s=>{if(!Qn.isInstance(s.request))return n(s);const i=s.input,a=await n(s),o=a.response,{requestValidationModeMember:c,responseAlgorithms:l}=t;if(c&&i[c]==="ENABLED"){const{clientName:d,commandName:f}=r;if(d==="S3Client"&&f==="GetObjectCommand"&&s_(l).every(h=>{const g=pp(h),b=o.headers[g];return!b||VM(b)}))return a;await YM(o,{config:e,responseAlgorithms:l,logger:r.logger})}return a},sn=(e,t)=>({applyToStack:n=>{n.add(jM(e,t),qM),n.addRelativeTo(GM(e,t),WM),n.addRelativeTo(QM(e,t),XM)}}),ZM=e=>{const{requestChecksumCalculation:t,responseChecksumValidation:n,requestStreamBufferSize:r}=e;return Object.assign(e,{requestChecksumCalculation:qs(t??w5),responseChecksumValidation:qs(n??A5),requestStreamBufferSize:Number(r??0)})};const JM=e=>t=>async n=>{if(!Qn.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let i=r.hostname;r.port!=null&&(i+=`:${r.port}`),r.headers.host=i}return t(n)},eF={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},tF=e=>({applyToStack:t=>{t.add(JM(e),eF)}}),nF=()=>(e,t)=>async n=>{try{const r=await e(n),{clientName:s,commandName:i,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=o,d=c??t.inputFilterSensitiveLog,f=l??t.outputFilterSensitiveLog,{$metadata:m,...h}=r.output;return a?.info?.({clientName:s,commandName:i,input:d(n.input),output:f(h),metadata:m}),r}catch(r){const{clientName:s,commandName:i,logger:a,dynamoDbDocumentClientOptions:o={}}=t,{overrideInputFilterSensitiveLog:c}=o,l=c??t.inputFilterSensitiveLog;throw a?.error?.({clientName:s,commandName:i,input:l(n.input),error:r,metadata:r.$metadata}),r}},rF={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},sF=e=>({applyToStack:t=>{t.add(nF(),rF)}});var j1={};const Im="X-Amzn-Trace-Id",iF="AWS_LAMBDA_FUNCTION_NAME",aF="_X_AMZN_TRACE_ID",oF=e=>t=>async n=>{const{request:r}=n;if(!Qn.isInstance(r)||e.runtime!=="node")return t(n);const s=Object.keys(r.headers??{}).find(c=>c.toLowerCase()===Im.toLowerCase())??Im;if(r.headers.hasOwnProperty(s))return t(n);const i=j1[iF],a=j1[aF],o=c=>typeof c=="string"&&c.length>0;return o(i)&&o(a)&&(r.headers[Im]=a),t({...n,request:r})},cF={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},lF=e=>({applyToStack:t=>{t.add(oF(e),cF)}}),uF="content-length",dF="x-amz-decoded-content-length";function fF(){return(e,t)=>async n=>{const{request:r}=n;if(Qn.isInstance(r)&&!(uF in r.headers)&&!(dF in r.headers)){const s="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof t?.logger?.warn=="function"&&!(t.logger instanceof hp)?t.logger.warn(s):console.warn(s)}return e({...n})}}const hF={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},mF=e=>({applyToStack:t=>{t.add(fF(),hF)}}),gF=e=>(t,n)=>async r=>{const s=await e.region(),i=e.region;let a=()=>{};n.__s3RegionRedirect&&(Object.defineProperty(e,"region",{writable:!1,value:async()=>n.__s3RegionRedirect}),a=()=>Object.defineProperty(e,"region",{writable:!0,value:i}));try{const o=await t(r);if(n.__s3RegionRedirect){a();const c=await e.region();if(s!==c)throw new Error("Region was not restored following S3 region redirect.")}return o}catch(o){throw a(),o}},bF={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function pF(e){return(t,n)=>async r=>{try{return await t(r)}catch(s){if(e.followRegionRedirects&&(s?.$metadata?.httpStatusCode===301||s?.$metadata?.httpStatusCode===400&&s?.name==="IllegalLocationConstraintException")){try{const i=s.$response.headers["x-amz-bucket-region"];n.logger?.debug(`Redirecting from ${await e.region()} to ${i}`),n.__s3RegionRedirect=i}catch(i){throw new Error("Region redirect failed: "+i)}return t(r)}throw s}}}const yF={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},EF=e=>({applyToStack:t=>{t.add(pF(e),yF),t.addRelativeTo(gF(e),bF)}}),CF=e=>(t,n)=>async r=>{const s=await t(r),{response:i}=s;if(xo.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{la(i.headers.expires)}catch(a){n.logger?.warn(`AWS SDK Warning for ${n.clientName}::${n.commandName} response parsing (${i.headers.expires}): ${a}`),delete i.headers.expires}}return s},xF={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},i_=e=>({applyToStack:t=>{t.addRelativeTo(CF(),xF)}});class Cp{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(t={}){this.data=t}get(t){const n=this.data[t];if(n)return n}set(t,n){return this.data[t]=n,n}delete(t){delete this.data[t]}async purgeExpired(){const t=Date.now();if(!(this.lastPurgeTime+Cp.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>t))for(const n in this.data){const r=this.data[n];if(!r.isRefreshing){const s=await r.identity;s.expiration&&s.expiration.getTime()<t&&delete this.data[n]}}}}class Rm{_identity;isRefreshing;accessed;constructor(t,n=!1,r=Date.now()){this._identity=t,this.isRefreshing=n,this.accessed=r}get identity(){return this.accessed=Date.now(),this._identity}}class xp{createSessionFn;cache;static REFRESH_WINDOW_MS=6e4;constructor(t,n=new Cp){this.createSessionFn=t,this.cache=n}async getS3ExpressIdentity(t,n){const r=n.Bucket,{cache:s}=this,i=s.get(r);return i?i.identity.then(a=>(a.expiration?.getTime()??0)<Date.now()?s.set(r,new Rm(this.getIdentity(r))).identity:((a.expiration?.getTime()??0)<Date.now()+xp.REFRESH_WINDOW_MS&&!i.isRefreshing&&(i.isRefreshing=!0,this.getIdentity(r).then(l=>{s.set(r,new Rm(Promise.resolve(l)))})),a)):s.set(r,new Rm(this.getIdentity(r))).identity}async getIdentity(t){await this.cache.purgeExpired().catch(s=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
1580
+ `+s)});const n=await this.createSessionFn(t);if(!n.Credentials?.AccessKeyId||!n.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:n.Credentials.AccessKeyId,secretAccessKey:n.Credentials.SecretAccessKey,sessionToken:n.Credentials.SessionToken,expiration:n.Credentials.Expiration?new Date(n.Credentials.Expiration):void 0}}}var W1;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(W1||(W1={}));const vF="Directory",TF="S3Express",SF="sigv4-s3express",Sg="X-Amz-S3session-Token",_g=Sg.toLowerCase();class _F extends Cg{async signWithCredentials(t,n,r){const s=G1(n);t.headers[_g]=n.sessionToken;const i=this;return V1(i,s),i.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const s=G1(n);return delete t.headers[_g],t.headers[Sg]=n.sessionToken,t.query=t.query??{},t.query[Sg]=n.sessionToken,V1(this,s),this.presign(t,r)}}function G1(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function V1(e,t){const n=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),r=e.credentialProvider,s=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t));e.credentialProvider=s}const wF=e=>(t,n)=>async r=>{if(n.endpointV2){const s=n.endpointV2,i=s.properties?.authSchemes?.[0]?.name===SF;if((s.properties?.backend===TF||s.properties?.bucketType===vF)&&(Kn(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),i){const o=r.input.Bucket;if(o){const c=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:o});n.s3ExpressIdentity=c,Qn.isInstance(r.request)&&c.sessionToken&&(r.request.headers[_g]=c.sessionToken)}}}return t(r)},AF={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},kF=e=>({applyToStack:t=>{t.add(wF(e),AF)}}),IF=async(e,t,n,r)=>{const s=await r.signWithCredentials(n,e,{});if(s.headers["X-Amz-Security-Token"]||s.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return s},RF=e=>t=>{throw t},BF=(e,t)=>{},PF=e=>(t,n)=>async r=>{if(!Qn.isInstance(r.request))return t(r);const i=ll(n).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:a={}},identity:o,signer:c}=i;let l;n.s3ExpressIdentity?l=await IF(n.s3ExpressIdentity,a,r.request,await e.signer()):l=await c.sign(r.request,o,a);const d=await t({...r,request:l}).catch((c.errorHandler||RF)(a));return(c.successHandler||BF)(d.response,a),d},NF=e=>({applyToStack:t=>{t.addRelativeTo(PF(e),RS)}}),OF=(e,{session:t})=>{const[n,r]=t,{forcePathStyle:s,useAccelerateEndpoint:i,disableMultiregionAccessPoints:a,followRegionRedirects:o,s3ExpressIdentityProvider:c,bucketEndpoint:l}=e;return Object.assign(e,{forcePathStyle:s??!1,useAccelerateEndpoint:i??!1,disableMultiregionAccessPoints:a??!1,followRegionRedirects:o??!1,s3ExpressIdentityProvider:c??new xp(async d=>n().send(new r({Bucket:d}))),bucketEndpoint:l??!1})},DF={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},LF=3e3,MF=e=>(t,n)=>async r=>{const s=await t(r),{response:i}=s;if(!xo.isInstance(i))return s;const{statusCode:a,body:o}=i;if(a<200||a>=300||!(typeof o?.stream=="function"||typeof o?.pipe=="function"||typeof o?.tee=="function"))return s;let l=o,d=o;o&&typeof o=="object"&&!(o instanceof Uint8Array)&&([l,d]=await l8(o)),i.body=d;const f=await FF(l,{streamCollector:async h=>t8(h,LF)});typeof l?.destroy=="function"&&l.destroy();const m=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&DF[n.commandName]){const h=new Error("S3 aborted request");throw h.name="InternalError",h}return m&&m.endsWith("</Error>")&&(i.statusCode=400),s},FF=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),zF={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},Je=e=>({applyToStack:t=>{t.addRelativeTo(MF(e),zF)}}),UF=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function $F(e){return(t,n)=>async r=>{if(e.bucketEndpoint){const s=n.endpointV2;if(s){const i=r.input.Bucket;if(typeof i=="string")try{const a=new URL(i);n.endpointV2={...s,url:a}}catch(a){const o=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${i} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(o):n.logger?.warn?.(o),a}}}return t(r)}}const HF={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function qF({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!UF(r)&&r.indexOf("/")>=0){const s=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw s.name="InvalidBucketName",s}return t({...n})}}const jF={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},WF=e=>({applyToStack:t=>{t.add(qF(e),jF),t.addRelativeTo($F(e),HF)}}),GF=void 0;function VF(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function KF(e){const t=uc(e.userAgentAppId??GF),{customUserAgent:n}=e;return Object.assign(e,{customUserAgent:typeof n=="string"?[[n]]:n,userAgentAppId:async()=>{const r=await t();if(!VF(r)){const s=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof r!="string"?s?.warn("userAgentAppId must be a string or undefined."):r.length>50&&s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return r}})}class YF{constructor({size:t,params:n}){this.data=new Map,this.parameters=[],this.capacity=t??50,n&&(this.parameters=n)}get(t,n){const r=this.hash(t);if(r===!1)return n();if(!this.data.has(r)){if(this.data.size>this.capacity+10){const s=this.data.keys();let i=0;for(;;){const{value:a,done:o}=s.next();if(this.data.delete(a),o||++i>10)break}}this.data.set(r,n())}return this.data.get(r)}size(){return this.data.size}hash(t){let n="";const{parameters:r}=this;if(r.length===0)return!1;for(const s of r){const i=String(t[s]??"");if(i.includes("|;"))return!1;n+=i+"|;"}return n}}const XF=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),a_=e=>XF.test(e)||e.startsWith("[")&&e.endsWith("]"),QF=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),vp=(e,t=!1)=>{if(!t)return QF.test(e);const n=e.split(".");for(const r of n)if(!vp(r))return!1;return!0},Wf={},Ru="endpoints";function da(e){return typeof e!="object"||e==null?e:"ref"in e?`$${da(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(da).join(", ")})`:JSON.stringify(e,null,2)}class ps extends Error{constructor(t){super(t),this.name="EndpointError"}}const ZF=(e,t)=>e===t,JF=e=>{const t=e.split("."),n=[];for(const r of t){const s=r.indexOf("[");if(s!==-1){if(r.indexOf("]")!==r.length-1)throw new ps(`Path: '${e}' does not end with ']'`);const i=r.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new ps(`Invalid array index: '${i}' in path: '${e}'`);s!==0&&n.push(r.slice(0,s)),n.push(i)}else n.push(r)}return n},o_=(e,t)=>JF(t).reduce((n,r)=>{if(typeof n!="object")throw new ps(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),e9=e=>e!=null,t9=e=>!e,Bm={[Au.HTTP]:80,[Au.HTTPS]:443},n9=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:m,port:h,protocol:g="",path:b="",query:p={}}=e,y=new URL(`${g}//${m}${h?`:${h}`:""}${b}`);return y.search=Object.entries(p).map(([C,A])=>`${C}=${A}`).join("&"),y}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:s,pathname:i,protocol:a,search:o}=t;if(o)return null;const c=a.slice(0,-1);if(!Object.values(Au).includes(c))return null;const l=a_(s),d=n.includes(`${r}:${Bm[c]}`)||typeof e=="string"&&e.includes(`${r}:${Bm[c]}`),f=`${r}${d?`:${Bm[c]}`:""}`;return{scheme:c,authority:f,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:l}},r9=(e,t)=>e===t,s9=(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),i9=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),a9={booleanEquals:ZF,getAttr:o_,isSet:e9,isValidHostLabel:vp,not:t9,parseURL:n9,stringEquals:r9,substring:s9,uriEncode:i9},c_=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let s=0;for(;s<e.length;){const i=e.indexOf("{",s);if(i===-1){n.push(e.slice(s));break}n.push(e.slice(s,i));const a=e.indexOf("}",i);if(a===-1){n.push(e.slice(i));break}e[i+1]==="{"&&e[a+1]==="}"&&(n.push(e.slice(i+1,a)),s=a+2);const o=e.substring(i+1,a);if(o.includes("#")){const[c,l]=o.split("#");n.push(o_(r[c],l))}else n.push(r[o]);s=a+1}return n.join("")},o9=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],Nh=(e,t,n)=>{if(typeof e=="string")return c_(e,n);if(e.fn)return l_(e,n);if(e.ref)return o9(e,n);throw new ps(`'${t}': ${String(e)} is not a string, function or reference.`)},l_=({fn:e,argv:t},n)=>{const r=t.map(i=>["boolean","number"].includes(typeof i)?i:Nh(i,"arg",n)),s=e.split(".");return s[0]in Wf&&s[1]!=null?Wf[s[0]][s[1]](...r):a9[e](...r)},c9=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new ps(`'${e}' is already defined in Reference Record.`);const r=l_(t,n);return n.logger?.debug?.(`${Ru} evaluateCondition: ${da(t)} = ${da(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},Tp=(e=[],t)=>{const n={};for(const r of e){const{result:s,toAssign:i}=c9(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!s)return{result:s};i&&(n[i.name]=i.value,t.logger?.debug?.(`${Ru} assign: ${i.name} := ${da(i.value)}`))}return{result:!0,referenceRecord:n}},l9=(e,t)=>Object.entries(e).reduce((n,[r,s])=>({...n,[r]:s.map(i=>{const a=Nh(i,"Header value entry",t);if(typeof a!="string")throw new ps(`Header '${r}' value '${a}' is not a string`);return a})}),{}),u_=(e,t)=>{if(Array.isArray(e))return e.map(n=>u_(n,t));switch(typeof e){case"string":return c_(e,t);case"object":if(e===null)throw new ps(`Unexpected endpoint property: ${e}`);return d_(e,t);case"boolean":return e;default:throw new ps(`Unexpected endpoint property type: ${typeof e}`)}},d_=(e,t)=>Object.entries(e).reduce((n,[r,s])=>({...n,[r]:u_(s,t)}),{}),u9=(e,t)=>{const n=Nh(e,"Endpoint URL",t);if(typeof n=="string")try{return new URL(n)}catch(r){throw console.error(`Failed to construct URL with ${n}`,r),r}throw new ps(`Endpoint URL must be a string, got ${typeof n}`)},d9=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:s,referenceRecord:i}=Tp(n,t);if(!s)return;const a={...t,referenceRecord:{...t.referenceRecord,...i}},{url:o,properties:c,headers:l}=r;return t.logger?.debug?.(`${Ru} Resolving endpoint from template: ${da(r)}`),{...l!=null&&{headers:l9(l,a)},...c!=null&&{properties:d_(c,a)},url:u9(o,a)}},f9=(e,t)=>{const{conditions:n,error:r}=e,{result:s,referenceRecord:i}=Tp(n,t);if(s)throw new ps(Nh(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},h9=(e,t)=>{const{conditions:n,rules:r}=e,{result:s,referenceRecord:i}=Tp(n,t);if(s)return f_(r,{...t,referenceRecord:{...t.referenceRecord,...i}})},f_=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=d9(n,t);if(r)return r}else if(n.type==="error")f9(n,t);else if(n.type==="tree"){const r=h9(n,t);if(r)return r}else throw new ps(`Unknown endpoint rule: ${n}`);throw new ps("Rules evaluation failed")},m9=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:s,rules:i}=e;t.logger?.debug?.(`${Ru} Initial EndpointParams: ${da(n)}`);const a=Object.entries(s).filter(([,l])=>l.default!=null).map(([l,d])=>[l,d.default]);if(a.length>0)for(const[l,d]of a)n[l]=n[l]??d;const o=Object.entries(s).filter(([,l])=>l.required).map(([l])=>l);for(const l of o)if(n[l]==null)throw new ps(`Missing required parameter: '${l}'`);const c=f_(i,{endpointParams:n,logger:r,referenceRecord:{}});return t.logger?.debug?.(`${Ru} Resolved endpoint: ${da(c)}`),c},h_=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!h_(n))return!1;return!0}return!(!vp(e)||e.length<3||e.length>63||e!==e.toLowerCase()||a_(e))},K1=":",g9="/",b9=e=>{const t=e.split(K1);if(t.length<6)return null;const[n,r,s,i,a,...o]=t;if(n!=="arn"||r===""||s===""||o.join(K1)==="")return null;const c=o.map(l=>l.split(g9)).flat();return{partition:r,service:s,region:i,accountId:a,resourceId:c}},p9=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],y9={partitions:p9};let E9=y9;const C9=e=>{const{partitions:t}=E9;for(const r of t){const{regions:s,outputs:i}=r;for(const[a,o]of Object.entries(s))if(a===e)return{...i,...o}}for(const r of t){const{regionRegex:s,outputs:i}=r;if(new RegExp(s).test(e))return{...i}}const n=t.find(r=>r.id==="aws");if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}},m_={isVirtualHostableS3Bucket:h_,parseArn:b9,partition:C9};Wf.aws=m_;function x9(e){const t={};if(e=e.replace(/^\?/,""),e)for(const n of e.split("&")){let[r,s=null]=n.split("=");r=decodeURIComponent(r),s&&(s=decodeURIComponent(s)),r in t?Array.isArray(t[r])?t[r].push(s):t[r]=[t[r],s]:t[r]=s}return t}const Gf=e=>{if(typeof e=="string")return Gf(new URL(e));const{hostname:t,pathname:n,port:r,protocol:s,search:i}=e;let a;return i&&(a=x9(i)),{hostname:t,port:r?parseInt(r):void 0,protocol:s,path:n,query:a}},v9=/\d{12}\.ddb/;async function T9(e,t,n){if(n.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Kn(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const i=await t.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?Kn(e,"RETRY_MODE_ADAPTIVE","F"):Kn(e,"RETRY_MODE_STANDARD","E"):Kn(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const i=e.endpointV2;switch(String(i?.url?.hostname).match(v9)&&Kn(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":Kn(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Kn(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Kn(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){const i=s;i.accountId&&Kn(e,"RESOLVED_ACCOUNT_ID","T");for(const[a,o]of Object.entries(i.$source??{}))Kn(e,a,o)}}const Y1="user-agent",Pm="x-amz-user-agent",X1=" ",Nm="/",S9=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,_9=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Q1="-",w9=1024;function A9(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=w9){t.length?t+=","+r:t+=r;continue}break}return t}const k9=e=>(t,n)=>async r=>{const{request:s}=r;if(!Qn.isInstance(s))return t(r);const{headers:i}=s,a=n?.userAgent?.map(yd)||[],o=(await e.defaultUserAgentProvider()).map(yd);await T9(n,e,r);const c=n;o.push(`m/${A9(Object.assign({},n.__smithy_context?.features,c.__aws_sdk_context?.features))}`);const l=e?.customUserAgent?.map(yd)||[],d=await e.userAgentAppId();d&&o.push(yd([`app/${d}`]));const f=[].concat([...o,...a,...l]).join(X1),m=[...o.filter(h=>h.startsWith("aws-sdk-")),...l].join(X1);return e.runtime!=="browser"?(m&&(i[Pm]=i[Pm]?`${i[Y1]} ${m}`:m),i[Y1]=f):i[Pm]=f,t({...r,request:s})},yd=e=>{const t=e[0].split(Nm).map(a=>a.replace(S9,Q1)).join(Nm),n=e[1]?.replace(_9,Q1),r=t.indexOf(Nm),s=t.substring(0,r);let i=t.substring(r+1);return s==="api"&&(i=i.toLowerCase()),[s,i,n].filter(a=>a&&a.length>0).reduce((a,o,c)=>{switch(c){case 0:return o;case 1:return`${a}/${o}`;default:return`${a}#${o}`}},"")},I9={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},R9=e=>({applyToStack:t=>{t.add(k9(e),I9)}}),B9=!1,P9=!1,g_=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),Z1=e=>g_(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,N9=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if(typeof t=="string")return Z1(t);const r=await t();return Z1(r)},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return g_(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}})},O9=e=>Object.assign(e,{eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),J1="content-length";function D9(e){return t=>async n=>{const r=n.request;if(Qn.isInstance(r)){const{body:s,headers:i}=r;if(s&&Object.keys(i).map(a=>a.toLowerCase()).indexOf(J1)===-1)try{const a=e(s);r.headers={...r.headers,[J1]:String(a)}}catch{}}return t({...n,request:r})}}const L9={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},M9=e=>({applyToStack:t=>{t.add(D9(e.bodyLengthChecker),L9)}}),F9=async e=>{const t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),q9(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!H9(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},z9=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,U9=/(\d+\.){3}\d+/,$9=/\.\./,H9=e=>z9.test(e)&&!U9.test(e)&&!$9.test(e),q9=e=>{const[t,n,r,,,s]=e.split(":"),i=t==="arn"&&e.split(":").length>=6,a=!!(i&&n&&r&&s);if(i&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},j9=(e,t,n)=>{const r=async()=>{const s=n[e]??n[t];return typeof s=="function"?s():s};return e==="credentialScope"||t==="CredentialScope"?async()=>{const s=typeof n.credentials=="function"?await n.credentials():n.credentials;return s?.credentialScope??s?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{const s=typeof n.credentials=="function"?await n.credentials():n.credentials;return s?.accountId??s?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(n.isCustomEndpoint===!1)return;const s=await r();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){const{protocol:i,hostname:a,port:o,path:c}=s;return`${i}//${a}${o?":"+o:""}${c}`}}return s}:r},b_=async e=>{},p_=e=>typeof e=="object"?"url"in e?Gf(e.url):e:Gf(e),W9=async(e,t,n,r)=>{if(!n.isCustomEndpoint){let a;n.serviceConfiguredEndpoint?a=await n.serviceConfiguredEndpoint():a=await b_(n.serviceId),a&&(n.endpoint=()=>Promise.resolve(p_(a)),n.isCustomEndpoint=!0)}const s=await y_(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(s,r)},y_=async(e,t,n)=>{const r={},s=t?.getEndpointParameterInstructions?.()||{};for(const[i,a]of Object.entries(s))switch(a.type){case"staticContextParams":r[i]=a.value;break;case"contextParams":r[i]=e[a.name];break;case"clientContextParams":case"builtInParams":r[i]=await j9(a.name,i,n)();break;case"operationContextParams":r[i]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(s).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await F9(r),r},G9=({config:e,instructions:t})=>(n,r)=>async s=>{e.isCustomEndpoint&&D8(r,"ENDPOINT_OVERRIDE","N");const i=await W9(s.input,{getEndpointParameterInstructions(){return t}},{...e},r);r.endpointV2=i,r.authSchemes=i.properties?.authSchemes;const a=r.authSchemes?.[0];if(a){r.signing_region=a.signingRegion,r.signing_service=a.signingName;const c=ll(r)?.selectedHttpAuthScheme?.httpAuthOption;c&&(c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return n({...s})},V9={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:IS.name},ve=(e,t)=>({applyToStack:n=>{n.addRelativeTo(G9({config:e,instructions:t}),V9)}}),K9=e=>{const t=e.tls??!0,{endpoint:n,useDualstackEndpoint:r,useFipsEndpoint:s}=e,i=n!=null?async()=>p_(await qs(n)()):void 0,o=Object.assign(e,{endpoint:i,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:qs(r??!1),useFipsEndpoint:qs(s??!1)});let c;return o.serviceConfiguredEndpoint=async()=>(e.serviceId&&!c&&(c=b_(e.serviceId)),c),o};var Zc;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Zc||(Zc={}));const Vf=3,Y9=Zc.STANDARD,X9=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Q9=["TimeoutError","RequestTimeout","RequestTimeoutException"],Z9=[500,502,503,504],J9=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],ez=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],tz=e=>e.$metadata?.clockSkewCorrected,nz=e=>{const t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},E_=e=>e.$metadata?.httpStatusCode===429||X9.includes(e.name)||e.$retryable?.throttling==!0,Sp=(e,t=0)=>tz(e)||Q9.includes(e.name)||J9.includes(e?.code||"")||ez.includes(e?.code||"")||Z9.includes(e.$metadata?.httpStatusCode||0)||nz(e)||e.cause!==void 0&&t<=10&&Sp(e.cause,t+1),rz=e=>{if(e.$metadata?.httpStatusCode!==void 0){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Sp(e)}return!1};class Oh{constructor(t){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;const n=this.getCurrentTimeInSeconds();this.lastThrottleTime=n,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){const n=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(r=>Oh.setTimeoutFn(r,n))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){const t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}const n=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+n),this.lastTimestamp=t}updateClientSendingRate(t){let n;if(this.updateMeasuredRate(),E_(t)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),n=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),n=this.cubicSuccess(this.getCurrentTimeInSeconds());const r=Math.min(n,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const t=this.getCurrentTimeInSeconds(),n=Math.floor(t*2)/2;if(this.requestCount++,n>this.lastTxRateBucket){const r=this.requestCount/(n-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=n}}getPrecise(t){return parseFloat(t.toFixed(8))}}Oh.setTimeoutFn=setTimeout;const wg=100,C_=20*1e3,sz=500,eC=500,iz=5,az=10,oz=1,cz="amz-sdk-invocation-id",lz="amz-sdk-request",uz=()=>{let e=wg;return{computeNextBackoffDelay:r=>Math.floor(Math.min(C_,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},tC=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(C_,e),getRetryCost:()=>n});class x_{constructor(t){this.maxAttempts=t,this.mode=Zc.STANDARD,this.capacity=eC,this.retryBackoffStrategy=uz(),this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return tC({retryDelay:wg,retryCount:0})}async refreshRetryTokenForRetry(t,n){const r=await this.getMaxAttempts();if(this.shouldRetry(t,n,r)){const s=n.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?sz:wg);const i=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),a=n.retryAfterHint?Math.max(n.retryAfterHint.getTime()-Date.now()||0,i):i,o=this.getCapacityCost(s);return this.capacity-=o,tC({retryDelay:a,retryCount:t.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(eC,this.capacity+(t.getRetryCost()??oz))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Vf}`),Vf}}shouldRetry(t,n,r){return t.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?az:iz}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class dz{constructor(t,n){this.maxAttemptsProvider=t,this.mode=Zc.ADAPTIVE;const{rateLimiter:r}=n??{};this.rateLimiter=r??new Oh,this.standardRetryStrategy=new x_(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,n){return this.rateLimiter.updateClientSendingRate(n),this.standardRetryStrategy.refreshRetryTokenForRetry(t,n)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}}const fz=e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),hz=e=>{const{retryStrategy:t,retryMode:n,maxAttempts:r}=e,s=qs(r??Vf);return Object.assign(e,{maxAttempts:s,retryStrategy:async()=>t||(await qs(n)()===Zc.ADAPTIVE?new dz(s):new x_(s))})},mz=e=>e?.body instanceof ReadableStream,gz=e=>(t,n)=>async r=>{let s=await e.retryStrategy();const i=await e.maxAttempts();if(bz(s)){s=s;let a=await s.acquireInitialRetryToken(n.partition_id),o=new Error,c=0,l=0;const{request:d}=r,f=Qn.isInstance(d);for(f&&(d.headers[cz]=MS());;)try{f&&(d.headers[lz]=`attempt=${c+1}; max=${i}`);const{response:m,output:h}=await t(r);return s.recordSuccess(a),h.$metadata.attempts=c+1,h.$metadata.totalRetryDelay=l,{response:m,output:h}}catch(m){const h=pz(m);if(o=fz(m),f&&mz(d))throw(n.logger instanceof hp?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{a=await s.refreshRetryTokenForRetry(a,h)}catch{throw o.$metadata||(o.$metadata={}),o.$metadata.attempts=c+1,o.$metadata.totalRetryDelay=l,o}c=a.getRetryCount();const g=a.getRetryDelay();l+=g,await new Promise(b=>setTimeout(b,g))}}else return s=s,s?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(t,r)},bz=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",pz=e=>{const t={error:e,errorType:yz(e)},n=xz(e.$response);return n&&(t.retryAfterHint=n),t},yz=e=>E_(e)?"THROTTLING":Sp(e)?"TRANSIENT":rz(e)?"SERVER_ERROR":"CLIENT_ERROR",Ez={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Cz=e=>({applyToStack:t=>{t.add(gz(e),Ez)}}),xz=e=>{if(!xo.isInstance(e))return;const t=Object.keys(e.headers).find(i=>i.toLowerCase()==="retry-after");if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(r*1e3)};class v_{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(t){this.sigv4Signer=new _F(t),this.signerOptions=t}async sign(t,n={}){return n.signingRegion==="*"?this.getSigv4aSigner().sign(t,n):this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*")throw this.getSigv4aSigner(),new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);return this.sigv4Signer.presign(t,n)}async presignWithCredentials(t,n,r={}){if(r.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(t,n,r)}getSigv4aSigner(){if(!this.sigv4aSigner)throw this.signerOptions.runtime==="node"?new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"):new Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a");return this.sigv4aSigner}}const _p="required",B="type",le="rules",H="conditions",te="fn",ne="argv",Ze="ref",Ct="assign",qe="url",je="properties",Ba="backend",Pr="authSchemes",br="disableDoubleEncoding",pr="signingName",Vr="signingRegion",We="headers",wp="signingRegionSet",vz=6,Tz=!1,ti=!0,ms="isSet",qn="booleanEquals",$e="error",Kf="aws.partition",Lt="stringEquals",Rn="getAttr",Hn="name",cn="substring",nC="bucketSuffix",Ap="parseURL",_e="endpoint",ue="tree",Yf="aws.isVirtualHostableS3Bucket",Xf="{url#scheme}://{Bucket}.{url#authority}{url#path}",di="not",rC="accessPointSuffix",Fd="{url#scheme}://{url#authority}{url#path}",T_="hardwareType",S_="regionPrefix",sC="bucketAliasSuffix",Ag="outpostId",Bo="isValidHostLabel",kp="sigv4a",Bu="s3-outposts",Jc="s3",__="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",w_="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",iC="https://{Bucket}.s3.{partitionResult#dnsSuffix}",A_="aws.parseArn",k_="bucketArn",I_="arnType",Qf="",Ip="s3-object-lambda",R_="accesspoint",Rp="accessPointName",aC="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",oC="mrapPartition",cC="outpostType",lC="arnPrefix",B_="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",uC="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",dC="https://s3.{partitionResult#dnsSuffix}",Yo={[_p]:!1,[B]:"String"},Xo={[_p]:!0,default:!1,[B]:"Boolean"},Wl={[_p]:!1,[B]:"Boolean"},Ss={[te]:qn,[ne]:[{[Ze]:"Accelerate"},!0]},yn={[te]:qn,[ne]:[{[Ze]:"UseFIPS"},!0]},an={[te]:qn,[ne]:[{[Ze]:"UseDualStack"},!0]},zn={[te]:ms,[ne]:[{[Ze]:"Endpoint"}]},P_={[te]:Kf,[ne]:[{[Ze]:"Region"}],[Ct]:"partitionResult"},fC={[te]:Lt,[ne]:[{[te]:Rn,[ne]:[{[Ze]:"partitionResult"},Hn]},"aws-cn"]},cu={[te]:ms,[ne]:[{[Ze]:"Bucket"}]},Dt={[Ze]:"Bucket"},hC={[H]:[an],[$e]:"S3Express does not support Dual-stack.",[B]:$e},mC={[H]:[Ss],[$e]:"S3Express does not support S3 Accelerate.",[B]:$e},gC={[H]:[zn,{[te]:Ap,[ne]:[{[Ze]:"Endpoint"}],[Ct]:"url"}],[le]:[{[H]:[{[te]:ms,[ne]:[{[Ze]:"DisableS3ExpressSessionAuth"}]},{[te]:qn,[ne]:[{[Ze]:"DisableS3ExpressSessionAuth"},!0]}],[le]:[{[H]:[{[te]:qn,[ne]:[{[te]:Rn,[ne]:[{[Ze]:"url"},"isIp"]},!0]}],[le]:[{[H]:[{[te]:"uriEncode",[ne]:[Dt],[Ct]:"uri_encoded_bucket"}],[le]:[{[_e]:{[qe]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[je]:{[Ba]:"S3Express",[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:"s3express",[Vr]:"{Region}"}]},[We]:{}},[B]:_e}],[B]:ue}],[B]:ue},{[H]:[{[te]:Yf,[ne]:[Dt,!1]}],[le]:[{[_e]:{[qe]:Xf,[je]:{[Ba]:"S3Express",[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:"s3express",[Vr]:"{Region}"}]},[We]:{}},[B]:_e}],[B]:ue},{[$e]:"S3Express bucket name is not a valid virtual hostable name.",[B]:$e}],[B]:ue},{[H]:[{[te]:qn,[ne]:[{[te]:Rn,[ne]:[{[Ze]:"url"},"isIp"]},!0]}],[le]:[{[H]:[{[te]:"uriEncode",[ne]:[Dt],[Ct]:"uri_encoded_bucket"}],[le]:[{[_e]:{[qe]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[je]:{[Ba]:"S3Express",[Pr]:[{[br]:!0,[Hn]:"sigv4-s3express",[pr]:"s3express",[Vr]:"{Region}"}]},[We]:{}},[B]:_e}],[B]:ue}],[B]:ue},{[H]:[{[te]:Yf,[ne]:[Dt,!1]}],[le]:[{[_e]:{[qe]:Xf,[je]:{[Ba]:"S3Express",[Pr]:[{[br]:!0,[Hn]:"sigv4-s3express",[pr]:"s3express",[Vr]:"{Region}"}]},[We]:{}},[B]:_e}],[B]:ue},{[$e]:"S3Express bucket name is not a valid virtual hostable name.",[B]:$e}],[B]:ue},jr={[te]:Ap,[ne]:[{[Ze]:"Endpoint"}],[Ct]:"url"},Om={[te]:qn,[ne]:[{[te]:Rn,[ne]:[{[Ze]:"url"},"isIp"]},!0]},N_={[Ze]:"url"},O_={[te]:"uriEncode",[ne]:[Dt],[Ct]:"uri_encoded_bucket"},Ia={[Ba]:"S3Express",[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:"s3express",[Vr]:"{Region}"}]},pt={},D_={[te]:Yf,[ne]:[Dt,!1]},bC={[$e]:"S3Express bucket name is not a valid virtual hostable name.",[B]:$e},pC={[te]:ms,[ne]:[{[Ze]:"UseS3ExpressControlEndpoint"}]},yC={[te]:qn,[ne]:[{[Ze]:"UseS3ExpressControlEndpoint"},!0]},yt={[te]:di,[ne]:[zn]},Ed={[$e]:"Unrecognized S3Express bucket name format.",[B]:$e},EC={[te]:di,[ne]:[cu]},CC={[Ze]:T_},xC={[H]:[yt],[$e]:"Expected a endpoint to be specified but no endpoint was found",[B]:$e},Cd={[Pr]:[{[br]:!0,[Hn]:kp,[pr]:Bu,[wp]:["*"]},{[br]:!0,[Hn]:"sigv4",[pr]:Bu,[Vr]:"{Region}"}]},Dm={[te]:qn,[ne]:[{[Ze]:"ForcePathStyle"},!1]},Sz={[Ze]:"ForcePathStyle"},Vn={[te]:qn,[ne]:[{[Ze]:"Accelerate"},!1]},er={[te]:Lt,[ne]:[{[Ze]:"Region"},"aws-global"]},lr={[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:Jc,[Vr]:"us-east-1"}]},Pt={[te]:di,[ne]:[er]},ur={[te]:qn,[ne]:[{[Ze]:"UseGlobalEndpoint"},!0]},vC={[qe]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[je]:{[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:Jc,[Vr]:"{Region}"}]},[We]:{}},Xn={[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:Jc,[Vr]:"{Region}"}]},dr={[te]:qn,[ne]:[{[Ze]:"UseGlobalEndpoint"},!1]},Rt={[te]:qn,[ne]:[{[Ze]:"UseDualStack"},!1]},TC={[qe]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},St={[te]:qn,[ne]:[{[Ze]:"UseFIPS"},!1]},SC={[qe]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},_C={[qe]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},Lm={[te]:qn,[ne]:[{[te]:Rn,[ne]:[N_,"isIp"]},!1]},Mm={[qe]:__,[je]:Xn,[We]:{}},kg={[qe]:Xf,[je]:Xn,[We]:{}},wC={[_e]:kg,[B]:_e},Fm={[qe]:w_,[je]:Xn,[We]:{}},AC={[qe]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},xd={[$e]:"Invalid region: region was not a valid DNS name.",[B]:$e},ns={[Ze]:k_},L_={[Ze]:I_},zm={[te]:Rn,[ne]:[ns,"service"]},Bp={[Ze]:Rp},kC={[H]:[an],[$e]:"S3 Object Lambda does not support Dual-stack",[B]:$e},IC={[H]:[Ss],[$e]:"S3 Object Lambda does not support S3 Accelerate",[B]:$e},RC={[H]:[{[te]:ms,[ne]:[{[Ze]:"DisableAccessPoints"}]},{[te]:qn,[ne]:[{[Ze]:"DisableAccessPoints"},!0]}],[$e]:"Access points are not supported for this operation",[B]:$e},Um={[H]:[{[te]:ms,[ne]:[{[Ze]:"UseArnRegion"}]},{[te]:qn,[ne]:[{[Ze]:"UseArnRegion"},!1]},{[te]:di,[ne]:[{[te]:Lt,[ne]:[{[te]:Rn,[ne]:[ns,"region"]},"{Region}"]}]}],[$e]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[B]:$e},M_={[te]:Rn,[ne]:[{[Ze]:"bucketPartition"},Hn]},F_={[te]:Rn,[ne]:[ns,"accountId"]},$m={[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:Ip,[Vr]:"{bucketArn#region}"}]},BC={[$e]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[B]:$e},Hm={[$e]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[B]:$e},qm={[$e]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[B]:$e},jm={[$e]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[B]:$e},PC={[$e]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[B]:$e},NC={[$e]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[B]:$e},Gl={[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:Jc,[Vr]:"{bucketArn#region}"}]},OC={[Pr]:[{[br]:!0,[Hn]:kp,[pr]:Bu,[wp]:["*"]},{[br]:!0,[Hn]:"sigv4",[pr]:Bu,[Vr]:"{bucketArn#region}"}]},DC={[te]:A_,[ne]:[Dt]},LC={[qe]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:Xn,[We]:{}},MC={[qe]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:Xn,[We]:{}},FC={[qe]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:Xn,[We]:{}},Wm={[qe]:B_,[je]:Xn,[We]:{}},zC={[qe]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:Xn,[We]:{}},UC={[Ze]:"UseObjectLambdaEndpoint"},Gm={[Pr]:[{[br]:!0,[Hn]:"sigv4",[pr]:Ip,[Vr]:"{Region}"}]},$C={[qe]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},HC={[qe]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},qC={[qe]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},Vm={[qe]:Fd,[je]:Xn,[We]:{}},jC={[qe]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[je]:Xn,[We]:{}},Km=[{[Ze]:"Region"}],_z=[{[Ze]:"Endpoint"}],wz=[Dt],WC=[an],Ym=[Ss],Qo=[zn,jr],GC=[{[te]:ms,[ne]:[{[Ze]:"DisableS3ExpressSessionAuth"}]},{[te]:qn,[ne]:[{[Ze]:"DisableS3ExpressSessionAuth"},!0]}],Az=[O_],VC=[D_],Ts=[P_],Zo=[yn],KC=[{[te]:cn,[ne]:[Dt,6,14,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,14,16,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],ni=[{[H]:[yn],[_e]:{[qe]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[je]:Ia,[We]:{}},[B]:_e},{[_e]:{[qe]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[je]:Ia,[We]:{}},[B]:_e}],YC=[{[te]:cn,[ne]:[Dt,6,15,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,15,17,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],XC=[{[te]:cn,[ne]:[Dt,6,19,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,19,21,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],QC=[{[te]:cn,[ne]:[Dt,6,20,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,20,22,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],ZC=[{[te]:cn,[ne]:[Dt,6,26,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,26,28,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],ri=[{[H]:[yn],[_e]:{[qe]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[je]:{[Ba]:"S3Express",[Pr]:[{[br]:!0,[Hn]:"sigv4-s3express",[pr]:"s3express",[Vr]:"{Region}"}]},[We]:{}},[B]:_e},{[_e]:{[qe]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[je]:{[Ba]:"S3Express",[Pr]:[{[br]:!0,[Hn]:"sigv4-s3express",[pr]:"s3express",[Vr]:"{Region}"}]},[We]:{}},[B]:_e}],JC=[Dt,0,7,!0],ex=[{[te]:cn,[ne]:[Dt,7,15,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,15,17,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],tx=[{[te]:cn,[ne]:[Dt,7,16,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,16,18,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],nx=[{[te]:cn,[ne]:[Dt,7,20,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,20,22,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],rx=[{[te]:cn,[ne]:[Dt,7,21,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,21,23,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],sx=[{[te]:cn,[ne]:[Dt,7,27,!0],[Ct]:"s3expressAvailabilityZoneId"},{[te]:cn,[ne]:[Dt,27,29,!0],[Ct]:"s3expressAvailabilityZoneDelim"},{[te]:Lt,[ne]:[{[Ze]:"s3expressAvailabilityZoneDelim"},"--"]}],kz=[cu],ix=[{[te]:Bo,[ne]:[{[Ze]:Ag},!1]}],ax=[{[te]:Lt,[ne]:[{[Ze]:S_},"beta"]}],Iz=["*"],ox=[{[te]:Bo,[ne]:[{[Ze]:"Region"},!1]}],$i=[{[te]:Lt,[ne]:[{[Ze]:"Region"},"us-east-1"]}],Xm=[{[te]:Lt,[ne]:[L_,R_]}],cx=[{[te]:Rn,[ne]:[ns,"resourceId[1]"],[Ct]:Rp},{[te]:di,[ne]:[{[te]:Lt,[ne]:[Bp,Qf]}]}],Rz=[ns,"resourceId[1]"],Qm=[{[te]:di,[ne]:[{[te]:Lt,[ne]:[{[te]:Rn,[ne]:[ns,"region"]},Qf]}]}],lx=[{[te]:di,[ne]:[{[te]:ms,[ne]:[{[te]:Rn,[ne]:[ns,"resourceId[2]"]}]}]}],Bz=[ns,"resourceId[2]"],Zm=[{[te]:Kf,[ne]:[{[te]:Rn,[ne]:[ns,"region"]}],[Ct]:"bucketPartition"}],ux=[{[te]:Lt,[ne]:[M_,{[te]:Rn,[ne]:[{[Ze]:"partitionResult"},Hn]}]}],Jm=[{[te]:Bo,[ne]:[{[te]:Rn,[ne]:[ns,"region"]},!0]}],e0=[{[te]:Bo,[ne]:[F_,!1]}],dx=[{[te]:Bo,[ne]:[Bp,!1]}],fx=[{[te]:Bo,[ne]:[{[Ze]:"Region"},!0]}],Pz={parameters:{Bucket:Yo,Region:Yo,UseFIPS:Xo,UseDualStack:Xo,Endpoint:Yo,ForcePathStyle:Xo,Accelerate:Xo,UseGlobalEndpoint:Xo,UseObjectLambdaEndpoint:Wl,Key:Yo,Prefix:Yo,CopySource:Yo,DisableAccessPoints:Wl,DisableMultiRegionAccessPoints:Xo,UseArnRegion:Wl,UseS3ExpressControlEndpoint:Wl,DisableS3ExpressSessionAuth:Wl},[le]:[{[H]:[{[te]:ms,[ne]:Km}],[le]:[{[H]:[Ss,yn],error:"Accelerate cannot be used with FIPS",[B]:$e},{[H]:[an,zn],error:"Cannot set dual-stack in combination with a custom endpoint.",[B]:$e},{[H]:[zn,yn],error:"A custom endpoint cannot be combined with FIPS",[B]:$e},{[H]:[zn,Ss],error:"A custom endpoint cannot be combined with S3 Accelerate",[B]:$e},{[H]:[yn,P_,fC],error:"Partition does not support FIPS",[B]:$e},{[H]:[cu,{[te]:cn,[ne]:[Dt,0,vz,ti],[Ct]:nC},{[te]:Lt,[ne]:[{[Ze]:nC},"--x-s3"]}],[le]:[hC,mC,gC,{[H]:[pC,yC],[le]:[{[H]:Ts,[le]:[{[H]:[O_,yt],[le]:[{[H]:Zo,endpoint:{[qe]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:Ia,[We]:pt},[B]:_e},{endpoint:{[qe]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:Ia,[We]:pt},[B]:_e}],[B]:ue}],[B]:ue}],[B]:ue},{[H]:VC,[le]:[{[H]:Ts,[le]:[{[H]:GC,[le]:[{[H]:KC,[le]:ni,[B]:ue},{[H]:YC,[le]:ni,[B]:ue},{[H]:XC,[le]:ni,[B]:ue},{[H]:QC,[le]:ni,[B]:ue},{[H]:ZC,[le]:ni,[B]:ue},Ed],[B]:ue},{[H]:KC,[le]:ri,[B]:ue},{[H]:YC,[le]:ri,[B]:ue},{[H]:XC,[le]:ri,[B]:ue},{[H]:QC,[le]:ri,[B]:ue},{[H]:ZC,[le]:ri,[B]:ue},Ed],[B]:ue}],[B]:ue},bC],[B]:ue},{[H]:[cu,{[te]:cn,[ne]:JC,[Ct]:rC},{[te]:Lt,[ne]:[{[Ze]:rC},"--xa-s3"]}],[le]:[hC,mC,gC,{[H]:VC,[le]:[{[H]:Ts,[le]:[{[H]:GC,[le]:[{[H]:ex,[le]:ni,[B]:ue},{[H]:tx,[le]:ni,[B]:ue},{[H]:nx,[le]:ni,[B]:ue},{[H]:rx,[le]:ni,[B]:ue},{[H]:sx,[le]:ni,[B]:ue},Ed],[B]:ue},{[H]:ex,[le]:ri,[B]:ue},{[H]:tx,[le]:ri,[B]:ue},{[H]:nx,[le]:ri,[B]:ue},{[H]:rx,[le]:ri,[B]:ue},{[H]:sx,[le]:ri,[B]:ue},Ed],[B]:ue}],[B]:ue},bC],[B]:ue},{[H]:[EC,pC,yC],[le]:[{[H]:Ts,[le]:[{[H]:Qo,endpoint:{[qe]:Fd,[je]:Ia,[We]:pt},[B]:_e},{[H]:Zo,endpoint:{[qe]:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[je]:Ia,[We]:pt},[B]:_e},{endpoint:{[qe]:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[je]:Ia,[We]:pt},[B]:_e}],[B]:ue}],[B]:ue},{[H]:[cu,{[te]:cn,[ne]:[Dt,49,50,ti],[Ct]:T_},{[te]:cn,[ne]:[Dt,8,12,ti],[Ct]:S_},{[te]:cn,[ne]:JC,[Ct]:sC},{[te]:cn,[ne]:[Dt,32,49,ti],[Ct]:Ag},{[te]:Kf,[ne]:Km,[Ct]:"regionPartition"},{[te]:Lt,[ne]:[{[Ze]:sC},"--op-s3"]}],[le]:[{[H]:ix,[le]:[{[H]:[{[te]:Lt,[ne]:[CC,"e"]}],[le]:[{[H]:ax,[le]:[xC,{[H]:Qo,endpoint:{[qe]:"https://{Bucket}.ec2.{url#authority}",[je]:Cd,[We]:pt},[B]:_e}],[B]:ue},{endpoint:{[qe]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[je]:Cd,[We]:pt},[B]:_e}],[B]:ue},{[H]:[{[te]:Lt,[ne]:[CC,"o"]}],[le]:[{[H]:ax,[le]:[xC,{[H]:Qo,endpoint:{[qe]:"https://{Bucket}.op-{outpostId}.{url#authority}",[je]:Cd,[We]:pt},[B]:_e}],[B]:ue},{endpoint:{[qe]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[je]:Cd,[We]:pt},[B]:_e}],[B]:ue},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[B]:$e}],[B]:ue},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[B]:$e}],[B]:ue},{[H]:kz,[le]:[{[H]:[zn,{[te]:di,[ne]:[{[te]:ms,[ne]:[{[te]:Ap,[ne]:_z}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[B]:$e},{[H]:[Dm,D_],[le]:[{[H]:Ts,[le]:[{[H]:ox,[le]:[{[H]:[Ss,fC],error:"S3 Accelerate cannot be used in this region",[B]:$e},{[H]:[an,yn,Vn,yt,er],endpoint:{[qe]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[je]:lr,[We]:pt},[B]:_e},{[H]:[an,yn,Vn,yt,Pt,ur],[le]:[{endpoint:vC,[B]:_e}],[B]:ue},{[H]:[an,yn,Vn,yt,Pt,dr],endpoint:vC,[B]:_e},{[H]:[Rt,yn,Vn,yt,er],endpoint:{[qe]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,yn,Vn,yt,Pt,ur],[le]:[{endpoint:TC,[B]:_e}],[B]:ue},{[H]:[Rt,yn,Vn,yt,Pt,dr],endpoint:TC,[B]:_e},{[H]:[an,St,Ss,yt,er],endpoint:{[qe]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[je]:lr,[We]:pt},[B]:_e},{[H]:[an,St,Ss,yt,Pt,ur],[le]:[{endpoint:SC,[B]:_e}],[B]:ue},{[H]:[an,St,Ss,yt,Pt,dr],endpoint:SC,[B]:_e},{[H]:[an,St,Vn,yt,er],endpoint:{[qe]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[je]:lr,[We]:pt},[B]:_e},{[H]:[an,St,Vn,yt,Pt,ur],[le]:[{endpoint:_C,[B]:_e}],[B]:ue},{[H]:[an,St,Vn,yt,Pt,dr],endpoint:_C,[B]:_e},{[H]:[Rt,St,Vn,zn,jr,Om,er],endpoint:{[qe]:__,[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,St,Vn,zn,jr,Lm,er],endpoint:{[qe]:Xf,[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,St,Vn,zn,jr,Om,Pt,ur],[le]:[{[H]:$i,endpoint:Mm,[B]:_e},{endpoint:Mm,[B]:_e}],[B]:ue},{[H]:[Rt,St,Vn,zn,jr,Lm,Pt,ur],[le]:[{[H]:$i,endpoint:kg,[B]:_e},wC],[B]:ue},{[H]:[Rt,St,Vn,zn,jr,Om,Pt,dr],endpoint:Mm,[B]:_e},{[H]:[Rt,St,Vn,zn,jr,Lm,Pt,dr],endpoint:kg,[B]:_e},{[H]:[Rt,St,Ss,yt,er],endpoint:{[qe]:w_,[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,St,Ss,yt,Pt,ur],[le]:[{[H]:$i,endpoint:Fm,[B]:_e},{endpoint:Fm,[B]:_e}],[B]:ue},{[H]:[Rt,St,Ss,yt,Pt,dr],endpoint:Fm,[B]:_e},{[H]:[Rt,St,Vn,yt,er],endpoint:{[qe]:iC,[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,St,Vn,yt,Pt,ur],[le]:[{[H]:$i,endpoint:{[qe]:iC,[je]:Xn,[We]:pt},[B]:_e},{endpoint:AC,[B]:_e}],[B]:ue},{[H]:[Rt,St,Vn,yt,Pt,dr],endpoint:AC,[B]:_e}],[B]:ue},xd],[B]:ue}],[B]:ue},{[H]:[zn,jr,{[te]:Lt,[ne]:[{[te]:Rn,[ne]:[N_,"scheme"]},"http"]},{[te]:Yf,[ne]:[Dt,ti]},Dm,St,Rt,Vn],[le]:[{[H]:Ts,[le]:[{[H]:ox,[le]:[wC],[B]:ue},xd],[B]:ue}],[B]:ue},{[H]:[Dm,{[te]:A_,[ne]:wz,[Ct]:k_}],[le]:[{[H]:[{[te]:Rn,[ne]:[ns,"resourceId[0]"],[Ct]:I_},{[te]:di,[ne]:[{[te]:Lt,[ne]:[L_,Qf]}]}],[le]:[{[H]:[{[te]:Lt,[ne]:[zm,Ip]}],[le]:[{[H]:Xm,[le]:[{[H]:cx,[le]:[kC,IC,{[H]:Qm,[le]:[RC,{[H]:lx,[le]:[Um,{[H]:Zm,[le]:[{[H]:Ts,[le]:[{[H]:ux,[le]:[{[H]:Jm,[le]:[{[H]:[{[te]:Lt,[ne]:[F_,Qf]}],error:"Invalid ARN: Missing account id",[B]:$e},{[H]:e0,[le]:[{[H]:dx,[le]:[{[H]:Qo,endpoint:{[qe]:aC,[je]:$m,[We]:pt},[B]:_e},{[H]:Zo,endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[je]:$m,[We]:pt},[B]:_e},{endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[je]:$m,[We]:pt},[B]:_e}],[B]:ue},BC],[B]:ue},Hm],[B]:ue},qm],[B]:ue},jm],[B]:ue}],[B]:ue}],[B]:ue},PC],[B]:ue},{error:"Invalid ARN: bucket ARN is missing a region",[B]:$e}],[B]:ue},NC],[B]:ue},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[B]:$e}],[B]:ue},{[H]:Xm,[le]:[{[H]:cx,[le]:[{[H]:Qm,[le]:[{[H]:Xm,[le]:[{[H]:Qm,[le]:[RC,{[H]:lx,[le]:[Um,{[H]:Zm,[le]:[{[H]:Ts,[le]:[{[H]:[{[te]:Lt,[ne]:[M_,"{partitionResult#name}"]}],[le]:[{[H]:Jm,[le]:[{[H]:[{[te]:Lt,[ne]:[zm,Jc]}],[le]:[{[H]:e0,[le]:[{[H]:dx,[le]:[{[H]:Ym,error:"Access Points do not support S3 Accelerate",[B]:$e},{[H]:[yn,an],endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[je]:Gl,[We]:pt},[B]:_e},{[H]:[yn,Rt],endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[je]:Gl,[We]:pt},[B]:_e},{[H]:[St,an],endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[je]:Gl,[We]:pt},[B]:_e},{[H]:[St,Rt,zn,jr],endpoint:{[qe]:aC,[je]:Gl,[We]:pt},[B]:_e},{[H]:[St,Rt],endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[je]:Gl,[We]:pt},[B]:_e}],[B]:ue},BC],[B]:ue},Hm],[B]:ue},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[B]:$e}],[B]:ue},qm],[B]:ue},jm],[B]:ue}],[B]:ue}],[B]:ue},PC],[B]:ue}],[B]:ue}],[B]:ue},{[H]:[{[te]:Bo,[ne]:[Bp,ti]}],[le]:[{[H]:WC,error:"S3 MRAP does not support dual-stack",[B]:$e},{[H]:Zo,error:"S3 MRAP does not support FIPS",[B]:$e},{[H]:Ym,error:"S3 MRAP does not support S3 Accelerate",[B]:$e},{[H]:[{[te]:qn,[ne]:[{[Ze]:"DisableMultiRegionAccessPoints"},ti]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[B]:$e},{[H]:[{[te]:Kf,[ne]:Km,[Ct]:oC}],[le]:[{[H]:[{[te]:Lt,[ne]:[{[te]:Rn,[ne]:[{[Ze]:oC},Hn]},{[te]:Rn,[ne]:[ns,"partition"]}]}],[le]:[{endpoint:{[qe]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[je]:{[Pr]:[{[br]:ti,name:kp,[pr]:Jc,[wp]:Iz}]},[We]:pt},[B]:_e}],[B]:ue},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[B]:$e}],[B]:ue}],[B]:ue},{error:"Invalid Access Point Name",[B]:$e}],[B]:ue},NC],[B]:ue},{[H]:[{[te]:Lt,[ne]:[zm,Bu]}],[le]:[{[H]:WC,error:"S3 Outposts does not support Dual-stack",[B]:$e},{[H]:Zo,error:"S3 Outposts does not support FIPS",[B]:$e},{[H]:Ym,error:"S3 Outposts does not support S3 Accelerate",[B]:$e},{[H]:[{[te]:ms,[ne]:[{[te]:Rn,[ne]:[ns,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[B]:$e},{[H]:[{[te]:Rn,[ne]:Rz,[Ct]:Ag}],[le]:[{[H]:ix,[le]:[Um,{[H]:Zm,[le]:[{[H]:Ts,[le]:[{[H]:ux,[le]:[{[H]:Jm,[le]:[{[H]:e0,[le]:[{[H]:[{[te]:Rn,[ne]:Bz,[Ct]:cC}],[le]:[{[H]:[{[te]:Rn,[ne]:[ns,"resourceId[3]"],[Ct]:Rp}],[le]:[{[H]:[{[te]:Lt,[ne]:[{[Ze]:cC},R_]}],[le]:[{[H]:Qo,endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[je]:OC,[We]:pt},[B]:_e},{endpoint:{[qe]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[je]:OC,[We]:pt},[B]:_e}],[B]:ue},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[B]:$e}],[B]:ue},{error:"Invalid ARN: expected an access point name",[B]:$e}],[B]:ue},{error:"Invalid ARN: Expected a 4-component resource",[B]:$e}],[B]:ue},Hm],[B]:ue},qm],[B]:ue},jm],[B]:ue}],[B]:ue}],[B]:ue},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[B]:$e}],[B]:ue},{error:"Invalid ARN: The Outpost Id was not set",[B]:$e}],[B]:ue},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[B]:$e}],[B]:ue},{error:"Invalid ARN: No ARN type specified",[B]:$e}],[B]:ue},{[H]:[{[te]:cn,[ne]:[Dt,0,4,Tz],[Ct]:lC},{[te]:Lt,[ne]:[{[Ze]:lC},"arn:"]},{[te]:di,[ne]:[{[te]:ms,[ne]:[DC]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[B]:$e},{[H]:[{[te]:qn,[ne]:[Sz,ti]},DC],error:"Path-style addressing cannot be used with ARN buckets",[B]:$e},{[H]:Az,[le]:[{[H]:Ts,[le]:[{[H]:[Vn],[le]:[{[H]:[an,yt,yn,er],endpoint:{[qe]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:lr,[We]:pt},[B]:_e},{[H]:[an,yt,yn,Pt,ur],[le]:[{endpoint:LC,[B]:_e}],[B]:ue},{[H]:[an,yt,yn,Pt,dr],endpoint:LC,[B]:_e},{[H]:[Rt,yt,yn,er],endpoint:{[qe]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,yt,yn,Pt,ur],[le]:[{endpoint:MC,[B]:_e}],[B]:ue},{[H]:[Rt,yt,yn,Pt,dr],endpoint:MC,[B]:_e},{[H]:[an,yt,St,er],endpoint:{[qe]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[je]:lr,[We]:pt},[B]:_e},{[H]:[an,yt,St,Pt,ur],[le]:[{endpoint:FC,[B]:_e}],[B]:ue},{[H]:[an,yt,St,Pt,dr],endpoint:FC,[B]:_e},{[H]:[Rt,zn,jr,St,er],endpoint:{[qe]:B_,[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,zn,jr,St,Pt,ur],[le]:[{[H]:$i,endpoint:Wm,[B]:_e},{endpoint:Wm,[B]:_e}],[B]:ue},{[H]:[Rt,zn,jr,St,Pt,dr],endpoint:Wm,[B]:_e},{[H]:[Rt,yt,St,er],endpoint:{[qe]:uC,[je]:lr,[We]:pt},[B]:_e},{[H]:[Rt,yt,St,Pt,ur],[le]:[{[H]:$i,endpoint:{[qe]:uC,[je]:Xn,[We]:pt},[B]:_e},{endpoint:zC,[B]:_e}],[B]:ue},{[H]:[Rt,yt,St,Pt,dr],endpoint:zC,[B]:_e}],[B]:ue},{error:"Path-style addressing cannot be used with S3 Accelerate",[B]:$e}],[B]:ue}],[B]:ue}],[B]:ue},{[H]:[{[te]:ms,[ne]:[UC]},{[te]:qn,[ne]:[UC,ti]}],[le]:[{[H]:Ts,[le]:[{[H]:fx,[le]:[kC,IC,{[H]:Qo,endpoint:{[qe]:Fd,[je]:Gm,[We]:pt},[B]:_e},{[H]:Zo,endpoint:{[qe]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[je]:Gm,[We]:pt},[B]:_e},{endpoint:{[qe]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[je]:Gm,[We]:pt},[B]:_e}],[B]:ue},xd],[B]:ue}],[B]:ue},{[H]:[EC],[le]:[{[H]:Ts,[le]:[{[H]:fx,[le]:[{[H]:[yn,an,yt,er],endpoint:{[qe]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[je]:lr,[We]:pt},[B]:_e},{[H]:[yn,an,yt,Pt,ur],[le]:[{endpoint:$C,[B]:_e}],[B]:ue},{[H]:[yn,an,yt,Pt,dr],endpoint:$C,[B]:_e},{[H]:[yn,Rt,yt,er],endpoint:{[qe]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[je]:lr,[We]:pt},[B]:_e},{[H]:[yn,Rt,yt,Pt,ur],[le]:[{endpoint:HC,[B]:_e}],[B]:ue},{[H]:[yn,Rt,yt,Pt,dr],endpoint:HC,[B]:_e},{[H]:[St,an,yt,er],endpoint:{[qe]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[je]:lr,[We]:pt},[B]:_e},{[H]:[St,an,yt,Pt,ur],[le]:[{endpoint:qC,[B]:_e}],[B]:ue},{[H]:[St,an,yt,Pt,dr],endpoint:qC,[B]:_e},{[H]:[St,Rt,zn,jr,er],endpoint:{[qe]:Fd,[je]:lr,[We]:pt},[B]:_e},{[H]:[St,Rt,zn,jr,Pt,ur],[le]:[{[H]:$i,endpoint:Vm,[B]:_e},{endpoint:Vm,[B]:_e}],[B]:ue},{[H]:[St,Rt,zn,jr,Pt,dr],endpoint:Vm,[B]:_e},{[H]:[St,Rt,yt,er],endpoint:{[qe]:dC,[je]:lr,[We]:pt},[B]:_e},{[H]:[St,Rt,yt,Pt,ur],[le]:[{[H]:$i,endpoint:{[qe]:dC,[je]:Xn,[We]:pt},[B]:_e},{endpoint:jC,[B]:_e}],[B]:ue},{[H]:[St,Rt,yt,Pt,dr],endpoint:jC,[B]:_e}],[B]:ue},xd],[B]:ue}],[B]:ue}],[B]:ue},{error:"A region must be set when sending requests to S3.",[B]:$e}]},Nz=Pz,Oz=new YF({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),z_=(e,t={})=>Oz.get(e,()=>m9(Nz,{endpointParams:e,logger:t.logger}));Wf.aws=m_;const Dz=e=>async(t,n,r)=>{if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const s=await e(t,n,r),i=ll(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!i)throw new Error(`getEndpointParameterInstructions() is not defined on \`${n.commandName}\``);const a=await y_(r,{getEndpointParameterInstructions:i},t);return Object.assign(s,a)},Lz=async(e,t,n)=>({operation:ll(t).operation,region:await qs(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),Mz=Dz(Lz);function U_(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function $_(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const Fz=(e,t,n)=>s=>{const a=e(s).properties?.authSchemes;if(!a)return t(s);const o=[];for(const c of a){const{name:l,properties:d={},...f}=c,m=l.toLowerCase();l!==m&&console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${l}\` to \`${m}\``);let h;if(m==="sigv4a"){h="aws.auth#sigv4a";const p=a.find(y=>{const C=y.name.toLowerCase();return C!=="sigv4a"&&C.startsWith("sigv4")});if(v_.sigv4aDependency()==="none"&&p)continue}else if(m.startsWith("sigv4"))h="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${m}\``);const g=n[h];if(!g)throw new Error(`Could not find HttpAuthOption create function for \`${h}\``);const b=g(s);b.schemeId=h,b.signingProperties={...b.signingProperties||{},...f,...d},o.push(b)}return o},zz=e=>{const t=[];switch(e.operation){default:t.push(U_(e)),t.push($_(e))}return t},Uz=Fz(z_,zz,{"aws.auth#sigv4":U_,"aws.auth#sigv4a":$_}),$z=e=>{const t=mL(e),n=H8(t);return Object.assign(n,{authSchemePreference:qs(e.authSchemePreference??[])})},Hz=e=>Object.assign(e,{useFipsEndpoint:e.useFipsEndpoint??!1,useDualstackEndpoint:e.useDualstackEndpoint??!1,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"}),Te={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class _r extends sc{constructor(t){super(t),Object.setPrototypeOf(this,_r.prototype)}}class Pp extends _r{name="NoSuchUpload";$fault="client";constructor(t){super({name:"NoSuchUpload",$fault:"client",...t}),Object.setPrototypeOf(this,Pp.prototype)}}class Np extends _r{name="ObjectNotInActiveTierError";$fault="client";constructor(t){super({name:"ObjectNotInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,Np.prototype)}}class Op extends _r{name="BucketAlreadyExists";$fault="client";constructor(t){super({name:"BucketAlreadyExists",$fault:"client",...t}),Object.setPrototypeOf(this,Op.prototype)}}class Dp extends _r{name="BucketAlreadyOwnedByYou";$fault="client";constructor(t){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...t}),Object.setPrototypeOf(this,Dp.prototype)}}class Lp extends _r{name="NoSuchBucket";$fault="client";constructor(t){super({name:"NoSuchBucket",$fault:"client",...t}),Object.setPrototypeOf(this,Lp.prototype)}}var Ig;(function(e){e.visit=(t,n)=>t.Prefix!==void 0?n.Prefix(t.Prefix):t.Tag!==void 0?n.Tag(t.Tag):t.And!==void 0?n.And(t.And):n._(t.$unknown[0],t.$unknown[1])})(Ig||(Ig={}));var Rg;(function(e){e.visit=(t,n)=>t.Prefix!==void 0?n.Prefix(t.Prefix):t.Tag!==void 0?n.Tag(t.Tag):t.AccessPointArn!==void 0?n.AccessPointArn(t.AccessPointArn):t.And!==void 0?n.And(t.And):n._(t.$unknown[0],t.$unknown[1])})(Rg||(Rg={}));class Mp extends _r{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(t){super({name:"InvalidObjectState",$fault:"client",...t}),Object.setPrototypeOf(this,Mp.prototype),this.StorageClass=t.StorageClass,this.AccessTier=t.AccessTier}}class Fp extends _r{name="NoSuchKey";$fault="client";constructor(t){super({name:"NoSuchKey",$fault:"client",...t}),Object.setPrototypeOf(this,Fp.prototype)}}class zp extends _r{name="NotFound";$fault="client";constructor(t){super({name:"NotFound",$fault:"client",...t}),Object.setPrototypeOf(this,zp.prototype)}}const qz=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),jz=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),Wz=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),Gz=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:_t}}),Vz=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),Kz=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),Yz=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:_t},...e.SessionToken&&{SessionToken:_t}}),Xz=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t},...e.Credentials&&{Credentials:Yz(e.Credentials)}}),Qz=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),Zz=e=>({...e,...e.KMSMasterKeyID&&{KMSMasterKeyID:_t}}),Jz=e=>({...e,...e.ApplyServerSideEncryptionByDefault&&{ApplyServerSideEncryptionByDefault:Zz(e.ApplyServerSideEncryptionByDefault)}}),H_=e=>({...e,...e.Rules&&{Rules:e.Rules.map(t=>Jz(t))}}),eU=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:H_(e.ServerSideEncryptionConfiguration)}}),tU=e=>({...e,...e.KeyId&&{KeyId:_t}}),nU=e=>({...e,...e.SSEKMS&&{SSEKMS:tU(e.SSEKMS)}}),rU=e=>({...e,...e.Encryption&&{Encryption:nU(e.Encryption)}}),sU=e=>({...e,...e.S3BucketDestination&&{S3BucketDestination:rU(e.S3BucketDestination)}}),Up=e=>({...e,...e.Destination&&{Destination:sU(e.Destination)}}),iU=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:Up(e.InventoryConfiguration)}}),aU=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),oU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),cU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),lU=e=>({...e}),uU=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),dU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),fU=e=>({...e,...e.InventoryConfigurationList&&{InventoryConfigurationList:e.InventoryConfigurationList.map(t=>Up(t))}});class $p extends _r{name="EncryptionTypeMismatch";$fault="client";constructor(t){super({name:"EncryptionTypeMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,$p.prototype)}}class Hp extends _r{name="InvalidRequest";$fault="client";constructor(t){super({name:"InvalidRequest",$fault:"client",...t}),Object.setPrototypeOf(this,Hp.prototype)}}class qp extends _r{name="InvalidWriteOffset";$fault="client";constructor(t){super({name:"InvalidWriteOffset",$fault:"client",...t}),Object.setPrototypeOf(this,qp.prototype)}}class jp extends _r{name="TooManyParts";$fault="client";constructor(t){super({name:"TooManyParts",$fault:"client",...t}),Object.setPrototypeOf(this,jp.prototype)}}class Wp extends _r{name="IdempotencyParameterMismatch";$fault="client";constructor(t){super({name:"IdempotencyParameterMismatch",$fault:"client",...t}),Object.setPrototypeOf(this,Wp.prototype)}}class Gp extends _r{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(t){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...t}),Object.setPrototypeOf(this,Gp.prototype)}}var hx;(function(e){e.visit=(t,n)=>t.Records!==void 0?n.Records(t.Records):t.Stats!==void 0?n.Stats(t.Stats):t.Progress!==void 0?n.Progress(t.Progress):t.Cont!==void 0?n.Cont(t.Cont):t.End!==void 0?n.End(t.End):n._(t.$unknown[0],t.$unknown[1])})(hx||(hx={}));const hU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),mU=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:H_(e.ServerSideEncryptionConfiguration)}}),gU=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:Up(e.InventoryConfiguration)}}),bU=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),pU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),yU=e=>({...e,...e.KMSKeyId&&{KMSKeyId:_t}}),EU=e=>({...e,...e.Encryption&&{Encryption:yU(e.Encryption)}}),CU=e=>({...e,...e.S3&&{S3:EU(e.S3)}}),xU=e=>({...e,...e.OutputLocation&&{OutputLocation:CU(e.OutputLocation)}}),vU=e=>({...e,...e.RestoreRequest&&{RestoreRequest:xU(e.RestoreRequest)}}),TU=e=>({...e,...e.Payload&&{Payload:"STREAMING_CONTENT"}}),SU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),_U=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),wU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),AU=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),kU=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:_t}}),IU=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),RU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke],[RZ]:[()=>ee(e[vx]),()=>Ln(e[vx]).toString()]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"AbortMultipartUpload"],[Xu]:[,Ve(e[os],"UploadId")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},BU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Lo]:e[dn],[Mo]:e[fn],[Fo]:e[hn],[zo]:e[mn],[Uo]:e[gn],[Al]:e[bn],[OZ]:[()=>ee(e[Ax]),()=>e[Ax].toString()],[Xt]:e[Yt],[Ie]:e[ke],[Sl]:e[$u],[Ku]:e[Mh],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[Xu]:[,Ve(e[os],"UploadId")]});let i,a;return e.MultipartUpload!==void 0&&(a=rj(e.MultipartUpload),a=a.n("CompleteMultipartUpload"),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("POST").h(r).q(s).b(i),n.build()},PU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((a,o)=>(a[`x-amz-meta-${o.toLowerCase()}`]=e.Metadata[o],a),{}),[wl]:e[hl],[qu]:e[ml],[Sy]:e[Et],[ju]:e[gl],[Wu]:e[bl],[Gu]:e[pl],[Vu]:e[yl],[f2]:e[dw],[h2]:e[fw],[m2]:[()=>ee(e[Zf]),()=>Ln(e[Zf]).toString()],[g2]:e[hw],[b2]:[()=>ee(e[Jf]),()=>Ln(e[Jf]).toString()],[_o]:[()=>ee(e[gi]),()=>Ln(e[gi]).toString()],[kl]:e[El],[Il]:e[Cl],[Rl]:e[xl],[Bl]:e[vl],[NZ]:e[oX],[KZ]:e[cQ],[Cs]:e[zr],[ed]:e[Tt],[td]:e[Hu],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[xs]:e[wr],[Ea]:e[ya],[Mn]:[()=>ee(e[En]),()=>e[En].toString()],[p2]:e[mw],[y2]:e[gw],[E2]:e[bw],[Xt]:e[Yt],[ky]:e[bo],[Ju]:e[Tl],[wo]:[()=>ee(e[bi]),()=>Ro(e[bi]).toString()],[Zu]:e[Oo],[Ie]:e[ke],[T2]:e[Ew]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"CopyObject"]});return n.m("PUT").h(r).q(s).b(void 0),n.build()},NU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[wl]:e[hl],[kl]:e[El],[Il]:e[Cl],[Rl]:e[xl],[_y]:e[ny],[Bl]:e[vl],[HQ]:[()=>ee(e[Ix]),()=>e[Ix].toString()],[MZ]:e[du]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);let s,i;return e.CreateBucketConfiguration!==void 0&&(i=uj(e.CreateBucketConfiguration),s=Ht,i.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),s+=i.toString()),n.m("PUT").h(r).b(s),n.build()},OU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[gy]:[,""]});let i,a;return e.MetadataConfiguration!==void 0&&(a=Jj(e.MetadataConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("POST").h(r).q(s).b(i),n.build()},DU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[by]:[,""]});let i,a;return e.MetadataTableConfiguration!==void 0&&(a=tW(e.MetadataTableConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("POST").h(r).q(s).b(i),n.build()},LU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((a,o)=>(a[`x-amz-meta-${o.toLowerCase()}`]=e.Metadata[o],a),{}),[wl]:e[hl],[qu]:e[ml],[ju]:e[gl],[Wu]:e[bl],[Gu]:e[pl],[Vu]:e[yl],[_o]:[()=>ee(e[gi]),()=>Ln(e[gi]).toString()],[kl]:e[El],[Il]:e[Cl],[Rl]:e[xl],[Bl]:e[vl],[Cs]:e[zr],[ed]:e[Tt],[td]:e[Hu],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[xs]:e[wr],[Ea]:e[ya],[Mn]:[()=>ee(e[En]),()=>e[En].toString()],[Xt]:e[Yt],[ky]:e[bo],[Ju]:e[Tl],[wo]:[()=>ee(e[bi]),()=>Ro(e[bi]).toString()],[Zu]:e[Oo],[Ie]:e[ke],[Sy]:e[Et],[Al]:e[bn]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[a2]:[,""]});return n.m("POST").h(r).q(s).b(void 0),n.build()},MU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[WQ]:e[tQ],[Cs]:e[zr],[xs]:e[wr],[Ea]:e[ya],[Mn]:[()=>ee(e[En]),()=>e[En].toString()]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[BQ]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},FU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});return n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.m("DELETE").h(r).b(void 0),n.build()},zU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Fh]:[,""],[Us]:[,Ve(e[st],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},UU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[uy]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},$U=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[dy]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},HU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[jh]:[,""],[Us]:[,Ve(e[st],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},qU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[qh]:[,""],[Us]:[,Ve(e[st],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},jU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[my]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},WU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[gy]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},GU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[by]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},VU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Wh]:[,""],[Us]:[,Ve(e[st],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},KU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[yy]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},YU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Ey]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},XU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[xy]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},QU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[_l]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},ZU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[vy]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},JU=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[wy]:e[ry],[Xt]:e[Yt],[Ty]:[()=>ee(e[el]),()=>e[el].toString()],[Ie]:e[ke],[Sl]:e[$u],[BZ]:[()=>ee(e[Tx]),()=>Ln(e[Tx]).toString()],[PZ]:[()=>ee(e[Sx]),()=>e[Sx].toString()]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"DeleteObject"],[us]:[,e[wt]]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},e7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[wy]:e[ry],[Xt]:e[Yt],[Ty]:[()=>ee(e[el]),()=>e[el].toString()],[Ie]:e[ke],[pn]:e[Et]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[pQ]:[,""]});let i,a;return e.Delete!==void 0&&(a=mj(e.Delete),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("POST").h(r).q(s).b(i),n.build()},t7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[_l]:[,""],[us]:[,e[wt]]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},n7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Cy]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},r7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke],[Xt]:e[Yt]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[$w]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},s7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[zh]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},i7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Fh]:[,""],[vr]:[,"GetBucketAnalyticsConfiguration"],[Us]:[,Ve(e[st],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},a7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[uy]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},o7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[dy]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},c7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[jh]:[,""],[vr]:[,"GetBucketIntelligentTieringConfiguration"],[Us]:[,Ve(e[st],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},l7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[qh]:[,""],[vr]:[,"GetBucketInventoryConfiguration"],[Us]:[,Ve(e[st],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},u7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[my]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},d7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Vw]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},f7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Kw]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},h7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[gy]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},m7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[by]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},g7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Wh]:[,""],[vr]:[,"GetBucketMetricsConfiguration"],[Us]:[,Ve(e[st],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},b7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Yw]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},p7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[yy]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},y7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Ey]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},E7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[AQ]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},C7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[xy]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},x7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Qw]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},v7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[_l]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},T7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[o2]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},S7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[vy]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},_7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Sl]:e[$u],[fy]:[()=>ee(e[eh]),()=>Ln(e[eh]).toString()],[Ku]:e[Mh],[hy]:[()=>ee(e[th]),()=>Ln(e[th]).toString()],[Zw]:e[Rw],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[Xt]:e[Yt],[Ie]:e[ke],[d2]:e[uw]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"GetObject"],[Jw]:[,e[Bw]],[e2]:[,e[Pw]],[t2]:[,e[Nw]],[n2]:[,e[Ow]],[r2]:[,e[Dw]],[s2]:[()=>e.ResponseExpires!==void 0,()=>Ln(e[Lw]).toString()],[us]:[,e[wt]],[Gh]:[()=>e.PartNumber!==void 0,()=>e[rs].toString()]});return n.m("GET").h(r).q(s).b(void 0),n.build()},w7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[zh]:[,""],[us]:[,e[wt]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},A7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[DZ]:[()=>ee(e[Ii]),()=>e[Ii].toString()],[FZ]:e[sa],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[Xt]:e[Yt],[Ie]:e[ke],[LZ]:[()=>ee(e[kx]),()=>(e[kx]||[]).map(Ph).join(", ")]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[gQ]:[,""],[us]:[,e[wt]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},k7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[Gw]:[,""],[us]:[,e[wt]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},I7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Xw]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},R7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[i2]:[,""],[us]:[,e[wt]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},B7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke],[Xt]:e[Yt]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[_l]:[,""],[us]:[,e[wt]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},P7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[DQ]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},N7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Cy]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},O7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});return n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.m("HEAD").h(r).b(void 0),n.build()},D7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Sl]:e[$u],[fy]:[()=>ee(e[eh]),()=>Ln(e[eh]).toString()],[Ku]:e[Mh],[hy]:[()=>ee(e[th]),()=>Ln(e[th]).toString()],[Zw]:e[Rw],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[Xt]:e[Yt],[Ie]:e[ke],[d2]:e[uw]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[Jw]:[,e[Bw]],[e2]:[,e[Pw]],[t2]:[,e[Nw]],[n2]:[,e[Ow]],[r2]:[,e[Dw]],[s2]:[()=>e.ResponseExpires!==void 0,()=>Ln(e[Lw]).toString()],[us]:[,e[wt]],[Gh]:[()=>e.PartNumber!==void 0,()=>e[rs].toString()]});return n.m("HEAD").h(r).q(s).b(void 0),n.build()},L7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Fh]:[,""],[vr]:[,"ListBucketAnalyticsConfigurations"],[Do]:[,e[tn]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},M7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[jh]:[,""],[vr]:[,"ListBucketIntelligentTieringConfigurations"],[Do]:[,e[tn]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},F7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[qh]:[,""],[vr]:[,"ListBucketInventoryConfigurations"],[Do]:[,e[tn]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},z7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Wh]:[,""],[vr]:[,"ListBucketMetricsConfigurations"],[Do]:[,e[tn]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},U7=async(e,t)=>{const n=xe(e,t),r={};n.bp("/");const s=_({[vr]:[,"ListBuckets"],[TQ]:[()=>e.MaxBuckets!==void 0,()=>e[iX].toString()],[Do]:[,e[tn]],[Yu]:[,e[Oe]],[bQ]:[,e[uu]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},$7=async(e,t)=>{const n=xe(e,t),r={};n.bp("/");const s=_({[vr]:[,"ListDirectoryBuckets"],[Do]:[,e[tn]],[SQ]:[()=>e.MaxDirectoryBuckets!==void 0,()=>e[cX].toString()]});return n.m("GET").h(r).q(s).b(void 0),n.build()},H7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke],[Xt]:e[Yt]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[a2]:[,""],[Uh]:[,e[Or]],[$h]:[,e[Lr]],[Ww]:[,e[ra]],[wQ]:[()=>e.MaxUploads!==void 0,()=>e[Qd].toString()],[Yu]:[,e[Oe]],[LQ]:[,e[pf]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},q7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke],[Ay]:[()=>ee(e[tl]),()=>(e[tl]||[]).map(Ph).join(", ")]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Uh]:[,e[Or]],[$h]:[,e[Lr]],[vQ]:[,e[Yd]],[py]:[()=>e.MaxKeys!==void 0,()=>e[Bs].toString()],[Yu]:[,e[Oe]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},j7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke],[Ay]:[()=>ee(e[tl]),()=>(e[tl]||[]).map(Ph).join(", ")]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[EQ]:[,"2"],[Uh]:[,e[Or]],[$h]:[,e[Lr]],[py]:[()=>e.MaxKeys!==void 0,()=>e[Bs].toString()],[Yu]:[,e[Oe]],[Do]:[,e[tn]],[yQ]:[()=>e.FetchOwner!==void 0,()=>e[TY].toString()],[PQ]:[,e[lf]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},W7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Ie]:e[ke],[Xt]:e[Yt],[Ay]:[()=>ee(e[tl]),()=>(e[tl]||[]).map(Ph).join(", ")]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[MQ]:[,""],[Uh]:[,e[Or]],[$h]:[,e[Lr]],[Ww]:[,e[ra]],[py]:[()=>e.MaxKeys!==void 0,()=>e[Bs].toString()],[Yu]:[,e[Oe]],[FQ]:[,e[Ef]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},G7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[Xt]:e[Yt],[Ie]:e[ke],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"ListParts"],[_Q]:[()=>e.MaxParts!==void 0,()=>e[Ii].toString()],[kQ]:[,e[sa]],[Xu]:[,Ve(e[os],"UploadId")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},V7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Ie]:e[ke],[pn]:e[Et]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[$w]:[,""]});let i,a;return e.AccelerateConfiguration!==void 0&&(a=jq(e.AccelerateConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},K7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[wl]:e[hl],[Dn]:e[On],[pn]:e[Et],[kl]:e[El],[Il]:e[Cl],[Rl]:e[xl],[_y]:e[ny],[Bl]:e[vl],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[zh]:[,""]});let i,a;return e.AccessControlPolicy!==void 0&&(a=q_(e.AccessControlPolicy),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},Y7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Fh]:[,""],[Us]:[,Ve(e[st],"Id")]});let i,a;return e.AnalyticsConfiguration!==void 0&&(a=Xq(e.AnalyticsConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},X7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[uy]:[,""]});let i,a;return e.CORSConfiguration!==void 0&&(a=oj(e.CORSConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},Q7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[dy]:[,""]});let i,a;return e.ServerSideEncryptionConfiguration!==void 0&&(a=GW(e.ServerSideEncryptionConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},Z7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[jh]:[,""],[Us]:[,Ve(e[st],"Id")]});let i,a;return e.IntelligentTieringConfiguration!==void 0&&(a=Ij(e.IntelligentTieringConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},J7=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[qh]:[,""],[Us]:[,Ve(e[st],"Id")]});let i,a;return e.InventoryConfiguration!==void 0&&(a=Bj(e.InventoryConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},e$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[pn]:e[Et],[Ie]:e[ke],[Iy]:e[ly]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[my]:[,""]});let i,a;return e.LifecycleConfiguration!==void 0&&(a=tj(e.LifecycleConfiguration),a=a.n("LifecycleConfiguration"),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},t$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Kw]:[,""]});let i,a;return e.BucketLoggingStatus!==void 0&&(a=nj(e.BucketLoggingStatus),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},n$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Wh]:[,""],[Us]:[,Ve(e[st],"Id")]});let i,a;return e.MetricsConfiguration!==void 0&&(a=sW(e.MetricsConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},r$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Ie]:e[ke],[VZ]:[()=>ee(e[Bx]),()=>e[Bx].toString()]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Yw]:[,""]});let i,a;return e.NotificationConfiguration!==void 0&&(a=lW(e.NotificationConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},s$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[Ie]:e[ke],[pn]:e[Et]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[yy]:[,""]});let i,a;return e.OwnershipControls!==void 0&&(a=yW(e.OwnershipControls),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},i$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"text/plain",[Dn]:e[On],[pn]:e[Et],[jQ]:[()=>ee(e[bx]),()=>e[bx].toString()],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Ey]:[,""]});let i,a;return e.Policy!==void 0&&(a=e.Policy,i=a),n.m("PUT").h(r).q(s).b(i),n.build()},a$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[u2]:e[zw],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[xy]:[,""]});let i,a;return e.ReplicationConfiguration!==void 0&&(a=IW(e.ReplicationConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},o$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Qw]:[,""]});let i,a;return e.RequestPaymentConfiguration!==void 0&&(a=DW(e.RequestPaymentConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},c$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[_l]:[,""]});let i,a;return e.Tagging!==void 0&&(a=Xp(e.Tagging),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},l$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[wy]:e[ry],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[o2]:[,""]});let i,a;return e.VersioningConfiguration!==void 0&&(a=fG(e.VersioningConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},u$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[vy]:[,""]});let i,a;return e.WebsiteConfiguration!==void 0&&(a=hG(e.WebsiteConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},d$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((o,c)=>(o[`x-amz-meta-${c.toLowerCase()}`]=e.Metadata[c],o),{}),[Vu]:e[yl]||"application/octet-stream",[wl]:e[hl],[qu]:e[ml],[ju]:e[gl],[Wu]:e[bl],[Gu]:e[pl],[So]:[()=>ee(e[fa]),()=>e[fa].toString()],[Dn]:e[On],[pn]:e[Et],[Lo]:e[dn],[Mo]:e[fn],[Fo]:e[hn],[zo]:e[mn],[Uo]:e[gn],[_o]:[()=>ee(e[gi]),()=>Ln(e[gi]).toString()],[Sl]:e[$u],[Ku]:e[Mh],[kl]:e[El],[Il]:e[Cl],[Rl]:e[xl],[Bl]:e[vl],[YZ]:[()=>ee(e[Fx]),()=>e[Fx].toString()],[Cs]:e[zr],[ed]:e[Tt],[td]:e[Hu],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[xs]:e[wr],[Ea]:e[ya],[Mn]:[()=>ee(e[En]),()=>e[En].toString()],[Xt]:e[Yt],[ky]:e[bo],[Ju]:e[Tl],[wo]:[()=>ee(e[bi]),()=>Ro(e[bi]).toString()],[Zu]:e[Oo],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"PutObject"]});let i,a;return e.Body!==void 0&&(a=e.Body,i=a),n.m("PUT").h(r).q(s).b(i),n.build()},f$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[wl]:e[hl],[Dn]:e[On],[pn]:e[Et],[kl]:e[El],[Il]:e[Cl],[Rl]:e[xl],[_y]:e[ny],[Bl]:e[vl],[Xt]:e[Yt],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[zh]:[,""],[us]:[,e[wt]]});let i,a;return e.AccessControlPolicy!==void 0&&(a=q_(e.AccessControlPolicy),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},h$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Xt]:e[Yt],[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[Gw]:[,""],[us]:[,e[wt]]});let i,a;return e.LegalHold!==void 0&&(a=hW(e.LegalHold),a=a.n("LegalHold"),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},m$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Xt]:e[Yt],[u2]:e[zw],[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Xw]:[,""]});let i,a;return e.ObjectLockConfiguration!==void 0&&(a=fW(e.ObjectLockConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},g$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Xt]:e[Yt],[Ty]:[()=>ee(e[el]),()=>e[el].toString()],[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[i2]:[,""],[us]:[,e[wt]]});let i,a;return e.Retention!==void 0&&(a=mW(e.Retention),a=a.n("Retention"),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},b$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke],[Xt]:e[Yt]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[_l]:[,""],[us]:[,e[wt]]});let i,a;return e.Tagging!==void 0&&(a=Xp(e.Tagging),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},p$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[Cy]:[,""]});let i,a;return e.PublicAccessBlockConfiguration!==void 0&&(a=TW(e.PublicAccessBlockConfiguration),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},y$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[$Z]:e[jX],[Sl]:e[fY],[Ku]:e[hY],[fy]:[()=>ee(e[px]),()=>Ln(e[px]).toString()],[hy]:[()=>ee(e[yx]),()=>Ln(e[yx]).toString()],[HZ]:e[XX],[jZ]:e[QX],[qZ]:[()=>ee(e[Px]),()=>Ln(e[Px]).toString()],[WZ]:[()=>ee(e[Nx]),()=>Ln(e[Nx]).toString()],[VQ]:e[lY]??MS()});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[IQ]:[,""]});return n.m("PUT").h(r).q(s).b(void 0),n.build()},E$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Xt]:e[Yt],[pn]:e[Et],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[RQ]:[,""],[us]:[,e[wt]]});let i,a;return e.RestoreRequest!==void 0&&(a=MW(e.RestoreRequest),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("POST").h(r).q(s).b(i),n.build()},C$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[NQ]:[,""],[OQ]:[,"2"]});let i;i=Ht;const a=new M(nQ);return a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),a.cc(e,xw),a.cc(e,Cw),e[eo]!=null&&a.c(G_(e[eo]).n(eo)),e[io]!=null&&a.c(V_(e[io]).n(io)),e[of]!=null&&a.c(LW(e[of]).n(of)),e[df]!=null&&a.c(qW(e[df]).n(df)),i+=a.toString(),n.m("POST").h(r).q(s).b(i),n.build()},x$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[CQ]:[,""]});let i,a;return e.InventoryTableConfiguration!==void 0&&(a=zj(e.InventoryTableConfiguration),a=a.n("InventoryTableConfiguration"),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},v$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/xml",[Dn]:e[On],[pn]:e[Et],[Ie]:e[ke]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=_({[xQ]:[,""]});let i,a;return e.JournalTableConfiguration!==void 0&&(a=$j(e.JournalTableConfiguration),a=a.n("JournalTableConfiguration"),i=Ht,a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=a.toString()),n.m("PUT").h(r).q(s).b(i),n.build()},T$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"content-type":"application/octet-stream",[So]:[()=>ee(e[fa]),()=>e[fa].toString()],[Dn]:e[On],[pn]:e[Et],[Lo]:e[dn],[Mo]:e[fn],[Fo]:e[hn],[zo]:e[mn],[Uo]:e[gn],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[Xt]:e[Yt],[Ie]:e[ke]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"UploadPart"],[Gh]:[Ve(e.PartNumber,"PartNumber")!=null,()=>e[rs].toString()],[Xu]:[,Ve(e[os],"UploadId")]});let i,a;return e.Body!==void 0&&(a=e.Body,i=a),n.m("PUT").h(r).q(s).b(i),n.build()},S$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{[f2]:e[dw],[h2]:e[fw],[m2]:[()=>ee(e[Zf]),()=>Ln(e[Zf]).toString()],[g2]:e[hw],[b2]:[()=>ee(e[Jf]),()=>Ln(e[Jf]).toString()],[GQ]:e[aY],[Cr]:e[rr],[Qs]:e[Xs],[xr]:e[sr],[p2]:e[mw],[y2]:e[gw],[E2]:e[bw],[Xt]:e[Yt],[Ie]:e[ke],[T2]:e[Ew]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=_({[vr]:[,"UploadPartCopy"],[Gh]:[Ve(e.PartNumber,"PartNumber")!=null,()=>e[rs].toString()],[Xu]:[,Ve(e[os],"UploadId")]});return n.m("PUT").h(r).q(s).b(void 0),n.build()},_$=async(e,t)=>{const n=xe(e,t),r=_({},ee,{"x-amz-content-sha256":"UNSIGNED-PAYLOAD",...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((o,c)=>(o[`x-amz-meta-${c.toLowerCase()}`]=e.Metadata[c],o),{}),"content-type":"application/octet-stream",[UZ]:e[MX],[GZ]:e[WX],[IZ]:[()=>ee(e[Rx]),()=>e[Rx].toString()],[KQ]:e[Ud],[YQ]:e[$d],[XQ]:e[ey],[QQ]:e[ml],[ZQ]:e[gl],[JQ]:e[bl],[eZ]:e[pl],[So]:[()=>ee(e[fa]),()=>e[fa].toString()],[tZ]:e[ty],[nZ]:e[yl],[aZ]:e[dn],[oZ]:e[fn],[cZ]:e[hn],[lZ]:e[mn],[uZ]:e[gn],[dZ]:[()=>ee(e[js]),()=>e[js].toString()],[rZ]:e[nn],[sZ]:[()=>ee(e[gi]),()=>Ln(e[gi]).toString()],[fZ]:e[jn],[iZ]:[()=>ee(e[Pn]),()=>Ln(e[Pn]).toString()],[hZ]:[()=>ee(e[nh]),()=>e[nh].toString()],[bZ]:e[Tl],[gZ]:e[Oo],[pZ]:[()=>ee(e[bi]),()=>Ro(e[bi]).toString()],[mZ]:[()=>ee(e[nl]),()=>e[nl].toString()],[CZ]:e[oy],[EZ]:e[xn],[yZ]:e[cy],[vZ]:e[zr],[_Z]:e[rr],[TZ]:e[wr],[wZ]:e[sr],[xZ]:e[Tt],[AZ]:[()=>ee(e[oh]),()=>e[oh].toString()],[kZ]:e[wt],[SZ]:[()=>ee(e[En]),()=>e[En].toString()]});n.bp("/WriteGetObjectResponse");let s,i;e.Body!==void 0&&(i=e.Body,s=i);let{hostname:a}=await t.endpoint();if(t.disableHostPrefix!==!0){if(a="{RequestRoute}."+a,e.RequestRoute===void 0)throw new Error("Empty value provided for input host prefix: RequestRoute.");if(a=a.replace("{RequestRoute}",e.RequestRoute),!v5(a))throw new Error("ValidationError: prefixed hostname must be hostname compatible.")}return n.hn(a),n.m("POST").h(r).b(s),n.build()},w$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},A$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[jn]:[,e.headers[Qu]],[zr]:[,e.headers[Cs]],[wt]:[,e.headers[yi]],[wr]:[,e.headers[xs]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r[Bt]!=null&&(n[Bt]=D(r[Bt])),r[dn]!=null&&(n[dn]=D(r[dn])),r[fn]!=null&&(n[fn]=D(r[fn])),r[hn]!=null&&(n[hn]=D(r[hn])),r[mn]!=null&&(n[mn]=D(r[mn])),r[gn]!=null&&(n[gn]=D(r[gn])),r[bn]!=null&&(n[bn]=D(r[bn])),r[nn]!=null&&(n[nn]=D(r[nn])),r[bt]!=null&&(n[bt]=D(r[bt])),r[to]!=null&&(n[to]=D(r[to])),n},k$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[jn]:[,e.headers[Qu]],[pw]:[,e.headers[C2]],[wt]:[,e.headers[yi]],[zr]:[,e.headers[Cs]],[rr]:[,e.headers[Cr]],[sr]:[,e.headers[xr]],[wr]:[,e.headers[xs]],[ya]:[,e.headers[Ea]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[xn]:[,e.headers[Tn]]}),r=gt(await ut(e.body,t));return n.CopyObjectResult=IG(r),n},I$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[to]:[,e.headers[Vw]],[lu]:[,e.headers[l2]]});return await tt(e.body,t),n},R$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},B$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},P$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[cw]:[()=>e.headers[ch]!==void 0,()=>Ve(la(e.headers[ch]))],[lw]:[,e.headers[c2]],[zr]:[,e.headers[Cs]],[rr]:[,e.headers[Cr]],[sr]:[,e.headers[xr]],[wr]:[,e.headers[xs]],[ya]:[,e.headers[Ea]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[xn]:[,e.headers[Tn]],[Et]:[,e.headers[Sy]],[bn]:[,e.headers[Al]]}),r=Ve(gt(await ut(e.body,t)),"body");return r[Bt]!=null&&(n[Bt]=D(r[Bt])),r[bt]!=null&&(n[bt]=D(r[bt])),r[os]!=null&&(n[os]=D(r[os])),n},N$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[zr]:[,e.headers[Cs]],[wr]:[,e.headers[xs]],[ya]:[,e.headers[Ea]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])]}),r=Ve(gt(await ut(e.body,t)),"body");return r[n0]!=null&&(n[n0]=pK(r[n0])),n},O$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},D$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},L$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},M$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},F$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},z$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},U$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},$$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},H$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},q$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},j$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},W$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},G$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},V$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},K$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},Y$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[js]:[()=>e.headers[ha]!==void 0,()=>Nt(e.headers[ha])],[wt]:[,e.headers[yi]],[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},X$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r.Deleted===""?n[Td]=[]:r[Td]!=null&&(n[Td]=DG(ot(r[Td]))),r.Error===""?n[Cx]=[]:r[Gs]!=null&&(n[Cx]=WG(ot(r[Gs]))),n},Q$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[wt]:[,e.headers[yi]]});return await tt(e.body,t),n},Z$=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},J$=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r[Ue]!=null&&(n[Ue]=D(r[Ue])),n},eH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r.AccessControlList===""?n[Pu]=[]:r[ja]!=null&&r[ja][Ni]!=null&&(n[Pu]=ew(ot(r[ja][Ni]))),r[Mt]!=null&&(n[Mt]=pa(r[Mt])),n},tH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.AnalyticsConfiguration=X_(r),n},nH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r.CORSRule===""?n[Ug]=[]:r[zg]!=null&&(n[Ug]=PG(ot(r[zg]))),n},rH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.ServerSideEncryptionConfiguration=mK(r),n},sH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.IntelligentTieringConfiguration=nw(r),n},iH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.InventoryConfiguration=rw(r),n},aH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[ly]:[,e.headers[Iy]]}),r=Ve(gt(await ut(e.body,t)),"body");return r.Rule===""?n[zs]=[]:r[is]!=null&&(n[zs]=CV(ot(r[is]))),n},oH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[Pc]!=null&&(n[Pc]=D(r[Pc])),n},cH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[no]!=null&&(n[no]=xV(r[no])),n},lH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.GetBucketMetadataConfigurationResult=QG(r),n},uH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.GetBucketMetadataTableConfigurationResult=ZG(r),n},dH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.MetricsConfiguration=sw(r),n},fH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[Xa]!=null&&(n[Xa]=GG(r[Xa])),r.CloudFunctionConfiguration===""?n[Kg]=[]:r[gx]!=null&&(n[Kg]=gV(ot(r[gx]))),r.QueueConfiguration===""?n[eb]=[]:r[Jg]!=null&&(n[eb]=ZV(ot(r[Jg]))),r.TopicConfiguration===""?n[ab]=[]:r[ib]!=null&&(n[ab]=PK(ot(r[ib]))),n},hH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.OwnershipControls=$V(r),n},mH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=await DK(e.body,t);return n.Policy=D(r),n},gH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.PolicyStatus=KV(r),n},bH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.ReplicationConfiguration=rK(r),n},pH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[tf]!=null&&(n[tf]=D(r[tf])),n},yH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r.TagSet===""?n[Hs]=[]:r[Hs]!=null&&r[Hs][xt]!=null&&(n[Hs]=No(ot(r[Hs][xt]))),n},EH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[Xg]!=null&&(n[Xd]=D(r[Xg])),r[Ue]!=null&&(n[Ue]=D(r[Ue])),n},CH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[Qa]!=null&&(n[Qa]=jG(r[Qa])),r[Ja]!=null&&(n[Ja]=tV(r[Ja])),r[oo]!=null&&(n[oo]=tK(r[oo])),r.RoutingRules===""?n[ec]=[]:r[ec]!=null&&r[ec][sh]!=null&&(n[ec]=uK(ot(r[ec][sh]))),n},xH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[js]:[()=>e.headers[ha]!==void 0,()=>Nt(e.headers[ha])],[ey]:[,e.headers[Hw]],[jn]:[,e.headers[Qu]],[cy]:[,e.headers[x2]],[Pn]:[()=>e.headers[rl]!==void 0,()=>Ve(la(e.headers[rl]))],[fa]:[()=>e.headers[So]!==void 0,()=>yr(e.headers[So])],[nn]:[,e.headers[Hh]],[dn]:[,e.headers[Lo]],[fn]:[,e.headers[Mo]],[hn]:[,e.headers[Fo]],[mn]:[,e.headers[zo]],[gn]:[,e.headers[Uo]],[bn]:[,e.headers[Al]],[nh]:[()=>e.headers[lh]!==void 0,()=>Gt(e.headers[lh])],[wt]:[,e.headers[yi]],[ml]:[,e.headers[qu]],[gl]:[,e.headers[ju]],[bl]:[,e.headers[Wu]],[pl]:[,e.headers[Gu]],[ty]:[,e.headers[qw]],[yl]:[,e.headers[Vu]],[gi]:[()=>e.headers[_o]!==void 0,()=>Ve(la(e.headers[_o]))],[yw]:[,e.headers[jw]],[Hu]:[,e.headers[td]],[zr]:[,e.headers[Cs]],[rr]:[,e.headers[Cr]],[sr]:[,e.headers[xr]],[wr]:[,e.headers[xs]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[Tt]:[,e.headers[ed]],[xn]:[,e.headers[Tn]],[oy]:[,e.headers[v2]],[nl]:[()=>e.headers[uh]!==void 0,()=>Gt(e.headers[uh])],[oh]:[()=>e.headers[dh]!==void 0,()=>Gt(e.headers[dh])],[Tl]:[,e.headers[Ju]],[bi]:[()=>e.headers[wo]!==void 0,()=>Ve(Xr(e.headers[wo]))],[Oo]:[,e.headers[Zu]],Metadata:[,Object.keys(e.headers).filter(s=>s.startsWith("x-amz-meta-")).reduce((s,i)=>(s[i.substring(11)]=e.headers[i],s),{})]}),r=e.body;return t.sdkStreamMixin(r),n.Body=r,n},vH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r.AccessControlList===""?n[Pu]=[]:r[ja]!=null&&r[ja][Ni]!=null&&(n[Pu]=ew(ot(r[ja][Ni]))),r[Mt]!=null&&(n[Mt]=pa(r[Mt])),n},TH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[js]:[()=>e.headers[ha]!==void 0,()=>Nt(e.headers[ha])],[Pn]:[()=>e.headers[rl]!==void 0,()=>Ve(la(e.headers[rl]))],[wt]:[,e.headers[yi]],[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r[i0]!=null&&(n[i0]=_G(r[i0])),r[nn]!=null&&(n[nn]=D(r[nn])),r[S0]!=null&&(n[S0]=JG(r[S0])),r[_0]!=null&&(n[_0]=yr(r[_0])),r[Tt]!=null&&(n[Tt]=D(r[Tt])),n},SH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.LegalHold=DV(r),n},_H=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.ObjectLockConfiguration=OV(r),n},wH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.Retention=LV(r),n},AH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[wt]:[,e.headers[yi]]}),r=Ve(gt(await ut(e.body,t)),"body");return r.TagSet===""?n[Hs]=[]:r[Hs]!=null&&r[Hs][xt]!=null&&(n[Hs]=No(ot(r[Hs][xt]))),n},kH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=e.body;return t.sdkStreamMixin(r),n.Body=r,n},IH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=gt(await ut(e.body,t));return n.PublicAccessBlockConfiguration=XV(r),n},RH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[lu]:[,e.headers[l2]],[JK]:[,e.headers[$Q]],[XK]:[,e.headers[UQ]],[uu]:[,e.headers[qQ]],[HK]:[()=>e.headers[Ux]!==void 0,()=>Nt(e.headers[Ux])]});return await tt(e.body,t),n},BH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[js]:[()=>e.headers[ha]!==void 0,()=>Nt(e.headers[ha])],[ey]:[,e.headers[Hw]],[jn]:[,e.headers[Qu]],[cy]:[,e.headers[x2]],[qK]:[,e.headers[zQ]],[Pn]:[()=>e.headers[rl]!==void 0,()=>Ve(la(e.headers[rl]))],[fa]:[()=>e.headers[So]!==void 0,()=>yr(e.headers[So])],[dn]:[,e.headers[Lo]],[fn]:[,e.headers[Mo]],[hn]:[,e.headers[Fo]],[mn]:[,e.headers[zo]],[gn]:[,e.headers[Uo]],[bn]:[,e.headers[Al]],[nn]:[,e.headers[Hh]],[nh]:[()=>e.headers[lh]!==void 0,()=>Gt(e.headers[lh])],[wt]:[,e.headers[yi]],[ml]:[,e.headers[qu]],[gl]:[,e.headers[ju]],[bl]:[,e.headers[Wu]],[pl]:[,e.headers[Gu]],[yl]:[,e.headers[Vu]],[ty]:[,e.headers[qw]],[gi]:[()=>e.headers[_o]!==void 0,()=>Ve(la(e.headers[_o]))],[yw]:[,e.headers[jw]],[Hu]:[,e.headers[td]],[zr]:[,e.headers[Cs]],[rr]:[,e.headers[Cr]],[sr]:[,e.headers[xr]],[wr]:[,e.headers[xs]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[Tt]:[,e.headers[ed]],[xn]:[,e.headers[Tn]],[oy]:[,e.headers[v2]],[nl]:[()=>e.headers[uh]!==void 0,()=>Gt(e.headers[uh])],[oh]:[()=>e.headers[dh]!==void 0,()=>Gt(e.headers[dh])],[Tl]:[,e.headers[Ju]],[bi]:[()=>e.headers[wo]!==void 0,()=>Ve(Xr(e.headers[wo]))],[Oo]:[,e.headers[Zu]],Metadata:[,Object.keys(e.headers).filter(r=>r.startsWith("x-amz-meta-")).reduce((r,s)=>(r[s.substring(11)]=e.headers[s],r),{})]});return await tt(e.body,t),n},PH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r.AnalyticsConfiguration===""?n[mx]=[]:r[Bg]!=null&&(n[mx]=CG(ot(r[Bg]))),r[tn]!=null&&(n[tn]=D(r[tn])),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[Yr]!=null&&(n[Yr]=D(r[Yr])),n},NH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[tn]!=null&&(n[tn]=D(r[tn])),r.IntelligentTieringConfiguration===""?n[_x]=[]:r[Vg]!=null&&(n[_x]=rV(ot(r[Vg]))),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[Yr]!=null&&(n[Yr]=D(r[Yr])),n},OH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[tn]!=null&&(n[tn]=D(r[tn])),r.InventoryConfiguration===""?n[xx]=[]:r[Gg]!=null&&(n[xx]=iV(ot(r[Gg]))),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[Yr]!=null&&(n[Yr]=D(r[Yr])),n},DH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r[tn]!=null&&(n[tn]=D(r[tn])),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r.MetricsConfiguration===""?n[wx]=[]:r[Yg]!=null&&(n[wx]=wV(ot(r[Yg]))),r[Yr]!=null&&(n[Yr]=D(r[Yr])),n},LH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r.Buckets===""?n[ai]=[]:r[ai]!=null&&r[ai][Bt]!=null&&(n[ai]=Q_(ot(r[ai][Bt]))),r[tn]!=null&&(n[tn]=D(r[tn])),r[Mt]!=null&&(n[Mt]=pa(r[Mt])),r[Oe]!=null&&(n[Oe]=D(r[Oe])),n},MH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=Ve(gt(await ut(e.body,t)),"body");return r.Buckets===""?n[ai]=[]:r[ai]!=null&&r[ai][Bt]!=null&&(n[ai]=Q_(ot(r[ai][Bt]))),r[tn]!=null&&(n[tn]=D(r[tn])),n},FH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r[Bt]!=null&&(n[Bt]=D(r[Bt])),r.CommonPrefixes===""?n[Nr]=[]:r[Nr]!=null&&(n[Nr]=Dh(ot(r[Nr]))),r[Or]!=null&&(n[Or]=D(r[Or])),r[Lr]!=null&&(n[Lr]=D(r[Lr])),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[ra]!=null&&(n[ra]=D(r[ra])),r[Qd]!=null&&(n[Qd]=Gt(r[Qd])),r[Nc]!=null&&(n[Nc]=D(r[Nc])),r[v0]!=null&&(n[v0]=D(r[v0])),r[Oe]!=null&&(n[Oe]=D(r[Oe])),r[pf]!=null&&(n[pf]=D(r[pf])),r.Upload===""?n[Dx]=[]:r[Ox]!=null&&(n[Dx]=IV(ot(r[Ox]))),n},zH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r.CommonPrefixes===""?n[Nr]=[]:r[Nr]!=null&&(n[Nr]=Dh(ot(r[Nr]))),r.Contents===""?n[Qi]=[]:r[Qi]!=null&&(n[Qi]=iw(ot(r[Qi]))),r[Or]!=null&&(n[Or]=D(r[Or])),r[Lr]!=null&&(n[Lr]=D(r[Lr])),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[Yd]!=null&&(n[Yd]=D(r[Yd])),r[Bs]!=null&&(n[Bs]=Gt(r[Bs])),r[kn]!=null&&(n[kn]=D(r[kn])),r[x0]!=null&&(n[x0]=D(r[x0])),r[Oe]!=null&&(n[Oe]=D(r[Oe])),n},UH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r.CommonPrefixes===""?n[Nr]=[]:r[Nr]!=null&&(n[Nr]=Dh(ot(r[Nr]))),r.Contents===""?n[Qi]=[]:r[Qi]!=null&&(n[Qi]=iw(ot(r[Qi]))),r[tn]!=null&&(n[tn]=D(r[tn])),r[Or]!=null&&(n[Or]=D(r[Or])),r[Lr]!=null&&(n[Lr]=D(r[Lr])),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[b0]!=null&&(n[b0]=Gt(r[b0])),r[Bs]!=null&&(n[Bs]=Gt(r[Bs])),r[kn]!=null&&(n[kn]=D(r[kn])),r[Yr]!=null&&(n[Yr]=D(r[Yr])),r[Oe]!=null&&(n[Oe]=D(r[Oe])),r[lf]!=null&&(n[lf]=D(r[lf])),n},$H=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r.CommonPrefixes===""?n[Nr]=[]:r[Nr]!=null&&(n[Nr]=Dh(ot(r[Nr]))),r.DeleteMarker===""?n[Ex]=[]:r[js]!=null&&(n[Ex]=FG(ot(r[js]))),r[Or]!=null&&(n[Or]=D(r[Or])),r[Lr]!=null&&(n[Lr]=D(r[Lr])),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[ra]!=null&&(n[ra]=D(r[ra])),r[Bs]!=null&&(n[Bs]=Gt(r[Bs])),r[kn]!=null&&(n[kn]=D(r[kn])),r[Nc]!=null&&(n[Nc]=D(r[Nc])),r[T0]!=null&&(n[T0]=D(r[T0])),r[Oe]!=null&&(n[Oe]=D(r[Oe])),r[Ef]!=null&&(n[Ef]=D(r[Ef])),r.Version===""?n[Mx]=[]:r[Lx]!=null&&(n[Mx]=UV(ot(r[Lx]))),n},HH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[cw]:[()=>e.headers[ch]!==void 0,()=>Ve(la(e.headers[ch]))],[lw]:[,e.headers[c2]],[xn]:[,e.headers[Tn]]}),r=Ve(gt(await ut(e.body,t)),"body");return r[Bt]!=null&&(n[Bt]=D(r[Bt])),r[Et]!=null&&(n[Et]=D(r[Et])),r[bn]!=null&&(n[bn]=D(r[bn])),r[kc]!=null&&(n[kc]=tw(r[kc])),r[Vt]!=null&&(n[Vt]=Nt(r[Vt])),r[bt]!=null&&(n[bt]=D(r[bt])),r[Ii]!=null&&(n[Ii]=Gt(r[Ii])),r[Oc]!=null&&(n[Oc]=D(r[Oc])),r[Mt]!=null&&(n[Mt]=pa(r[Mt])),r[sa]!=null&&(n[sa]=D(r[sa])),r.Part===""?n[Nu]=[]:r[rh]!=null&&(n[Nu]=GV(ot(r[rh]))),r[Tt]!=null&&(n[Tt]=D(r[Tt])),r[os]!=null&&(n[os]=D(r[os])),n},qH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},jH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},WH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},GH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},VH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},KH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},YH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},XH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[ly]:[,e.headers[Iy]]});return await tt(e.body,t),n},QH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},ZH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},JH=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},eq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},tq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},nq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},rq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},sq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},iq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},aq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},oq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[jn]:[,e.headers[Qu]],[nn]:[,e.headers[Hh]],[dn]:[,e.headers[Lo]],[fn]:[,e.headers[Mo]],[hn]:[,e.headers[Fo]],[mn]:[,e.headers[zo]],[gn]:[,e.headers[Uo]],[bn]:[,e.headers[Al]],[zr]:[,e.headers[Cs]],[wt]:[,e.headers[yi]],[rr]:[,e.headers[Cr]],[sr]:[,e.headers[xr]],[wr]:[,e.headers[xs]],[ya]:[,e.headers[Ea]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[Sr]:[()=>e.headers[$x]!==void 0,()=>yr(e.headers[$x])],[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},cq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},lq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},uq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},dq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},fq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[wt]:[,e.headers[yi]]});return await tt(e.body,t),n},hq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},mq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},gq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[xn]:[,e.headers[Tn]],[DX]:[,e.headers[zZ]]});return await tt(e.body,t),n},bq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)}),r=e.body;return n.Payload=Mq(r,t),n},pq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},yq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},Eq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[zr]:[,e.headers[Cs]],[nn]:[,e.headers[Hh]],[dn]:[,e.headers[Lo]],[fn]:[,e.headers[Mo]],[hn]:[,e.headers[Fo]],[mn]:[,e.headers[zo]],[gn]:[,e.headers[Uo]],[rr]:[,e.headers[Cr]],[sr]:[,e.headers[xr]],[wr]:[,e.headers[xs]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[xn]:[,e.headers[Tn]]});return await tt(e.body,t),n},Cq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e),[pw]:[,e.headers[C2]],[zr]:[,e.headers[Cs]],[rr]:[,e.headers[Cr]],[sr]:[,e.headers[xr]],[wr]:[,e.headers[xs]],[En]:[()=>e.headers[Mn]!==void 0,()=>Nt(e.headers[Mn])],[xn]:[,e.headers[Tn]]}),r=gt(await ut(e.body,t));return n.CopyPartResult=RG(r),n},xq=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Se(e,t);const n=_({$metadata:fe(e)});return await tt(e.body,t),n},Se=async(e,t)=>{const n={...e,body:await AM(e.body,t)},r=kM(e,n.body);switch(r){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await Pq(n);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await Dq(n);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await Tq(n);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await Sq(n);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await Rq(n);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await Aq(n);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await Bq(n);case"NotFound":case"com.amazonaws.s3#NotFound":throw await Nq(n);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await _q(n);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await kq(n);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await Iq(n);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await Lq(n);case"IdempotencyParameterMismatch":case"com.amazonaws.s3#IdempotencyParameterMismatch":throw await wq(n);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await Oq(n);default:const s=n.body;return vq({output:e,parsedBody:s,errorCode:r})}},vq=vL(_r),Tq=async(e,t)=>{const n=_({});e.body;const r=new Op({$metadata:fe(e),...n});return Qr(r,e.body)},Sq=async(e,t)=>{const n=_({});e.body;const r=new Dp({$metadata:fe(e),...n});return Qr(r,e.body)},_q=async(e,t)=>{const n=_({});e.body;const r=new $p({$metadata:fe(e),...n});return Qr(r,e.body)},wq=async(e,t)=>{const n=_({});e.body;const r=new Wp({$metadata:fe(e),...n});return Qr(r,e.body)},Aq=async(e,t)=>{const n=_({}),r=e.body;r[Ai]!=null&&(n[Ai]=D(r[Ai])),r[Tt]!=null&&(n[Tt]=D(r[Tt]));const s=new Mp({$metadata:fe(e),...n});return Qr(s,e.body)},kq=async(e,t)=>{const n=_({});e.body;const r=new Hp({$metadata:fe(e),...n});return Qr(r,e.body)},Iq=async(e,t)=>{const n=_({});e.body;const r=new qp({$metadata:fe(e),...n});return Qr(r,e.body)},Rq=async(e,t)=>{const n=_({});e.body;const r=new Lp({$metadata:fe(e),...n});return Qr(r,e.body)},Bq=async(e,t)=>{const n=_({});e.body;const r=new Fp({$metadata:fe(e),...n});return Qr(r,e.body)},Pq=async(e,t)=>{const n=_({});e.body;const r=new Pp({$metadata:fe(e),...n});return Qr(r,e.body)},Nq=async(e,t)=>{const n=_({});e.body;const r=new zp({$metadata:fe(e),...n});return Qr(r,e.body)},Oq=async(e,t)=>{const n=_({});e.body;const r=new Gp({$metadata:fe(e),...n});return Qr(r,e.body)},Dq=async(e,t)=>{const n=_({});e.body;const r=new Np({$metadata:fe(e),...n});return Qr(r,e.body)},Lq=async(e,t)=>{const n=_({});e.body;const r=new jp({$metadata:fe(e),...n});return Qr(r,e.body)},Mq=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>n.Records!=null?{Records:await $q(n.Records)}:n.Stats!=null?{Stats:await Hq(n.Stats,t)}:n.Progress!=null?{Progress:await Uq(n.Progress,t)}:n.Cont!=null?{Cont:await Fq(n.Cont,t)}:n.End!=null?{End:await zq(n.End,t)}:{$unknown:n}),Fq=async(e,t)=>{const n={};return await ut(e.body,t),Object.assign(n,kG()),n},zq=async(e,t)=>{const n={};return await ut(e.body,t),Object.assign(n,HG()),n},Uq=async(e,t)=>{const n={},r=await ut(e.body,t);return n.Details=YV(r),n},$q=async(e,t)=>{const n={};return n.Payload=e.body,n},Hq=async(e,t)=>{const n={},r=await ut(e.body,t);return n.Details=TK(r),n},qq=(e,t)=>{const n=new M(Ga);return e[Pa]!=null&&n.c(M.of(Pa,String(e[Pa])).n(Pa)),n},jq=(e,t)=>{const n=new M(FK);return e[Ue]!=null&&n.c(M.of(GK,e[Ue]).n(Ue)),n},q_=(e,t)=>{const n=new M(MK);return n.lc(e,"Grants","AccessControlList",()=>W_(e[Pu])),e[Mt]!=null&&n.c(pW(e[Mt]).n(Mt)),n},Wq=(e,t)=>{const n=new M(Wa);return e[Mt]!=null&&n.c(M.of(wX,e[Mt]).n(Mt)),n},Gq=(e,t)=>e.filter(n=>n!=null).map(n=>M.of(Pg,n).n(ir)),Vq=(e,t)=>e.filter(n=>n!=null).map(n=>M.of(Og,n).n(ir)),Kq=(e,t)=>e.filter(n=>n!=null).map(n=>M.of(Lg,n).n(ir)),Yq=(e,t)=>{const n=new M(LK);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Po(e[Mr])),n},Xq=(e,t)=>{const n=new M(Bg);return e[st]!=null&&n.c(M.of($K,e[st]).n(st)),e[rt]!=null&&n.c(Zq(e[rt]).n(rt)),e[fo]!=null&&n.c(eG(e[fo]).n(fo)),n},Qq=(e,t)=>{const n=new M(zK);return e[Ms]!=null&&n.c(Jq(e[Ms]).n(Ms)),n},Zq=(e,t)=>{const n=new M(UK);return Ig.visit(e,{Prefix:r=>{e[Oe]!=null&&n.c(M.of(Oe,r).n(Oe))},Tag:r=>{e[xt]!=null&&n.c(dl(r).n(xt))},And:r=>{e[Cn]!=null&&n.c(Yq(r).n(Cn))},_:(r,s)=>{if(!(s instanceof M||s instanceof bp))throw new Error("Unable to serialize unknown union members in XML.");n.c(new M(r).c(s))}}),n},Jq=(e,t)=>{const n=new M(jK);return e[Rs]!=null&&n.c(M.of(WK,e[Rs]).n(Rs)),e[gc]!=null&&n.c(M.of(fc,e[gc]).n(gc)),e[Bt]!=null&&n.c(M.of(Lh,e[Bt]).n(Bt)),n.cc(e,Oe),n},ej=(e,t)=>{const n=new M(VK);return n.cc(e,gY),e[as]!=null&&n.c(M.of(eY,e[as]).n(as)),n},tj=(e,t)=>{const n=new M(KK);return n.l(e,"Rules","Rule",()=>Xj(e[zs])),n},nj=(e,t)=>{const n=new M(ZK);return e[no]!=null&&n.c(Zj(e[no]).n(no)),n},rj=(e,t)=>{const n=new M(rY);return n.l(e,"Parts","Part",()=>ij(e[Nu])),n},sj=(e,t)=>{const n=new M(iY);return n.cc(e,nn),n.cc(e,dn),n.cc(e,fn),n.cc(e,hn),n.cc(e,mn),n.cc(e,gn),e[rs]!=null&&n.c(M.of(rs,String(e[rs])).n(rs)),n},ij=(e,t)=>e.filter(n=>n!=null).map(n=>sj(n).n(ir)),aj=(e,t)=>{const n=new M(Va);return n.cc(e,qd),n.cc(e,Vd),n},oj=(e,t)=>{const n=new M(sY);return n.l(e,"CORSRules","CORSRule",()=>lj(e[Ug])),n},cj=(e,t)=>{const n=new M(zg);return n.cc(e,Bn),n.l(e,"AllowedHeaders","AllowedHeader",()=>Gq(e[Ng])),n.l(e,"AllowedMethods","AllowedMethod",()=>Vq(e[Dg])),n.l(e,"AllowedOrigins","AllowedOrigin",()=>Kq(e[Mg])),n.l(e,"ExposeHeaders","ExposeHeader",()=>vj(e[$g])),e[Da]!=null&&n.c(M.of(Da,String(e[Da])).n(Da)),n},lj=(e,t)=>e.filter(n=>n!=null).map(n=>cj(n).n(ir)),uj=(e,t)=>{const n=new M(nY);return e[Pc]!=null&&n.c(M.of(YK,e[Pc]).n(Pc)),e[to]!=null&&n.c(Qj(e[to]).n(to)),e[Bt]!=null&&n.c(ej(e[Bt]).n(Bt)),n.lc(e,"Tags","Tags",()=>Po(e[Mr])),n},dj=(e,t)=>{const n=new M(oY);return n.cc(e,vY),n.cc(e,dY),n.cc(e,Iw),n.cc(e,ay),n.cc(e,vw),n.cc(e,kw),e[vd]!=null&&n.c(M.of(vd,String(e[vd])).n(vd)),n},fj=(e,t)=>{const n=new M(cY);return n.cc(e,BX),n.cc(e,Iw),n.cc(e,ay),n.cc(e,vw),n.cc(e,kw),n},hj=(e,t)=>{const n=new M(Ya);return e[Ps]!=null&&n.c(M.of(_w,e[Ps]).n(Ps)),e[At]!=null&&n.c(M.of(At,String(e[At])).n(At)),e[Fa]!=null&&n.c(M.of(Fa,String(e[Fa])).n(Fa)),n},mj=(e,t)=>{const n=new M(bY);return n.l(e,"Objects","Object",()=>dW(e[kX])),e[wd]!=null&&n.c(M.of(wd,String(e[wd])).n(wd)),n},gj=(e,t)=>{const n=new M(Ka);return e[Ue]!=null&&n.c(M.of(mY,e[Ue]).n(Ue)),n},bj=(e,t)=>{const n=new M(nr);return e[Bt]!=null&&n.c(M.of(Lh,e[Bt]).n(Bt)),e[mc]!=null&&n.c(M.of(fc,e[mc]).n(mc)),n.cc(e,Tt),e[Wa]!=null&&n.c(Wq(e[Wa]).n(Wa)),e[Dr]!=null&&n.c(yj(e[Dr]).n(Dr)),e[lo]!=null&&n.c(OW(e[lo]).n(lo)),e[ro]!=null&&n.c(nW(e[ro]).n(ro)),n},pj=(e,t)=>{const n=new M(fi);return e[l0]!=null&&n.c(M.of(zr,e[l0]).n(l0)),e[p0]!=null&&n.c(M.of(wr,e[p0]).n(p0)),n.cc(e,KY),n},yj=(e,t)=>{const n=new M(Dr);return n.cc(e,rf),n},Ej=(e,t)=>{const n=new M(Qa);return e[bt]!=null&&n.c(M.of(iy,e[bt]).n(bt)),n},Cj=(e,t)=>new M(Xa),Vp=(e,t)=>e.filter(n=>n!=null).map(n=>M.of(To,n).n(ir)),xj=(e,t)=>{const n=new M(Za);return e[Ue]!=null&&n.c(M.of(yY,e[Ue]).n(Ue)),n},vj=(e,t)=>e.filter(n=>n!=null).map(n=>M.of(Hg,n).n(ir)),Tj=(e,t)=>{const n=new M(qg);return e[kn]!=null&&n.c(M.of(SY,e[kn]).n(kn)),e[bs]!=null&&n.c(M.of(_Y,e[bs]).n(bs)),n},Sj=(e,t)=>e.filter(n=>n!=null).map(n=>Tj(n).n(ir)),_j=(e,t)=>{const n=new M(Hd);return n.cc(e,Fw),n},wj=(e,t)=>{const n=new M(Ni);if(e[gs]!=null){const r=j_(e[gs]).n(gs);r.a("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),n.c(r)}return n.cc(e,hi),n},j_=(e,t)=>{const n=new M(gs);return n.cc(e,Ws),n.cc(e,zd),n.cc(e,Bn),n.cc(e,yf),n.a("xsi:type",e[as]),n},W_=(e,t)=>e.filter(n=>n!=null).map(n=>wj(n).n(Ni)),Aj=(e,t)=>{const n=new M(Ja);return n.cc(e,hf),n},G_=(e,t)=>{const n=new M(eo);return e[xc]!=null&&n.c(dj(e[xc]).n(xc)),n.cc(e,uY),e[Ic]!=null&&n.c(Hj(e[Ic]).n(Ic)),e[w0]!=null&&n.c(xW(e[w0]).n(w0)),n},kj=(e,t)=>{const n=new M(LY);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Po(e[Mr])),n},Ij=(e,t)=>{const n=new M(Vg);return e[st]!=null&&n.c(M.of($Y,e[st]).n(st)),e[rt]!=null&&n.c(Rj(e[rt]).n(rt)),e[Ue]!=null&&n.c(M.of(HY,e[Ue]).n(Ue)),n.l(e,"Tierings","Tiering",()=>aG(e[ob])),n},Rj=(e,t)=>{const n=new M(UY);return n.cc(e,Oe),e[xt]!=null&&n.c(dl(e[xt]).n(xt)),e[Cn]!=null&&n.c(kj(e[Cn]).n(Cn)),n},Bj=(e,t)=>{const n=new M(Gg);return e[nr]!=null&&n.c(Pj(e[nr]).n(nr)),e[Oa]!=null&&n.c(M.of(Oa,String(e[Oa])).n(Oa)),e[rt]!=null&&n.c(Oj(e[rt]).n(rt)),e[st]!=null&&n.c(M.of(BY,e[st]).n(st)),e[wc]!=null&&n.c(M.of(PY,e[wc]).n(wc)),n.lc(e,"OptionalFields","OptionalFields",()=>Dj(e[Jo])),e[Uc]!=null&&n.c(Mj(e[Uc]).n(Uc)),n},Pj=(e,t)=>{const n=new M(wY);return e[Ms]!=null&&n.c(Lj(e[Ms]).n(Ms)),n},Nj=(e,t)=>{const n=new M(AY);return e[sb]!=null&&n.c(JW(e[sb]).n(ah)),e[rb]!=null&&n.c(QW(e[rb]).n(ih)),n},Oj=(e,t)=>{const n=new M(kY);return n.cc(e,Oe),n},Dj=(e,t)=>e.filter(n=>n!=null).map(n=>M.of(NY,n).n(Wg)),Lj=(e,t)=>{const n=new M(OY);return n.cc(e,fc),e[Bt]!=null&&n.c(M.of(Lh,e[Bt]).n(Bt)),e[Rs]!=null&&n.c(M.of(IY,e[Rs]).n(Rs)),n.cc(e,Oe),e[fi]!=null&&n.c(Nj(e[fi]).n(fi)),n},Mj=(e,t)=>{const n=new M(DY);return e[Sc]!=null&&n.c(M.of(RY,e[Sc]).n(Sc)),n},Fj=(e,t)=>{const n=new M(Wd);return e[ki]!=null&&n.c(M.of(Tw,e[ki]).n(ki)),e[Dr]!=null&&n.c(Kp(e[Dr]).n(Dr)),n},zj=(e,t)=>{const n=new M(FY);return e[ki]!=null&&n.c(M.of(Tw,e[ki]).n(ki)),e[Dr]!=null&&n.c(Kp(e[Dr]).n(Dr)),n},Uj=(e,t)=>{const n=new M(Gd);return e[mi]!=null&&n.c(K_(e[mi]).n(mi)),e[Dr]!=null&&n.c(Kp(e[Dr]).n(Dr)),n},$j=(e,t)=>{const n=new M(GY);return e[mi]!=null&&n.c(K_(e[mi]).n(mi)),n},Hj=(e,t)=>{const n=new M(qY);return e[as]!=null&&n.c(M.of(WY,e[as]).n(as)),n},qj=(e,t)=>{const n=new M(jY);return n.cc(e,ay),n},jj=(e,t)=>{const n=new M(XY);return e[st]!=null&&n.c(M.of(sy,e[st]).n(st)),e[Kd]!=null&&n.c(M.of(Kd,e[Kd]).n(Fg)),n.l(e,"Events","Event",()=>Vp(e[Pi])),e[rt]!=null&&n.c(Yp(e[rt]).n(rt)),n},Wj=(e,t)=>e.filter(n=>n!=null).map(n=>jj(n).n(ir)),Gj=(e,t)=>{const n=new M(YY);return e[Kr]!=null&&n.c(M.of(Kr,Ro(e[Kr]).toString()).n(Kr)),e[At]!=null&&n.c(M.of(At,String(e[At])).n(At)),e[Na]!=null&&n.c(M.of(Na,String(e[Na])).n(Na)),n},Vj=(e,t)=>{const n=new M(eX);return e[jn]!=null&&n.c(Gj(e[jn]).n(jn)),n.cc(e,Bn),n.cc(e,Oe),e[rt]!=null&&n.c(Yj(e[rt]).n(rt)),e[Ue]!=null&&n.c(M.of(CY,e[Ue]).n(Ue)),n.l(e,"Transitions","Transition",()=>uG(e[ub])),n.l(e,"NoncurrentVersionTransitions","NoncurrentVersionTransition",()=>cW(e[Qg])),e[so]!=null&&n.c(aW(e[so]).n(so)),e[Ga]!=null&&n.c(qq(e[Ga]).n(Ga)),n},Kj=(e,t)=>{const n=new M(tX);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Po(e[Mr])),e[Ds]!=null&&n.c(M.of(ww,String(e[Ds])).n(Ds)),e[Ls]!=null&&n.c(M.of(Aw,String(e[Ls])).n(Ls)),n},Yj=(e,t)=>{const n=new M(nX);return n.cc(e,Oe),e[xt]!=null&&n.c(dl(e[xt]).n(xt)),e[Ds]!=null&&n.c(M.of(ww,String(e[Ds])).n(Ds)),e[Ls]!=null&&n.c(M.of(Aw,String(e[Ls])).n(Ls)),e[Cn]!=null&&n.c(Kj(e[Cn]).n(Cn)),n},Xj=(e,t)=>e.filter(n=>n!=null).map(n=>Vj(n).n(ir)),Qj=(e,t)=>{const n=new M(QY);return e[as]!=null&&n.c(M.of(rX,e[as]).n(as)),e[kn]!=null&&n.c(M.of(ZY,e[kn]).n(kn)),n},Zj=(e,t)=>{const n=new M(no);return n.cc(e,gf),n.lc(e,"TargetGrants","TargetGrants",()=>rG(e[tc])),n.cc(e,bf),e[po]!=null&&n.c(sG(e[po]).n(po)),n},Jj=(e,t)=>{const n=new M(aX);return e[Gd]!=null&&n.c(Uj(e[Gd]).n(Gd)),e[Wd]!=null&&n.c(Fj(e[Wd]).n(Wd)),n},eW=(e,t)=>{const n=new M(Sw);return e[kn]!=null&&n.c(M.of(dX,e[kn]).n(kn)),e[bs]!=null&&n.c(M.of(gX,e[bs]).n(bs)),n},tW=(e,t)=>{const n=new M(hX);return e[ff]!=null&&n.c(HW(e[ff]).n(ff)),n},Kp=(e,t)=>{const n=new M(mX);return e[I0]!=null&&n.c(M.of(dQ,e[I0]).n(I0)),n.cc(e,VY),n},nW=(e,t)=>{const n=new M(ro);return e[Ue]!=null&&n.c(M.of(fX,e[Ue]).n(Ue)),e[Tc]!=null&&n.c(Y_(e[Tc]).n(Tc)),n},rW=(e,t)=>{const n=new M(sX);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Po(e[Mr])),n.cc(e,wi),n},sW=(e,t)=>{const n=new M(Yg);return e[st]!=null&&n.c(M.of(uX,e[st]).n(st)),e[rt]!=null&&n.c(iW(e[rt]).n(rt)),n},iW=(e,t)=>{const n=new M(lX);return Rg.visit(e,{Prefix:r=>{e[Oe]!=null&&n.c(M.of(Oe,r).n(Oe))},Tag:r=>{e[xt]!=null&&n.c(dl(r).n(xt))},AccessPointArn:r=>{e[wi]!=null&&n.c(M.of(wi,r).n(wi))},And:r=>{e[Cn]!=null&&n.c(rW(r).n(Cn))},_:(r,s)=>{if(!(s instanceof M||s instanceof bp))throw new Error("Unable to serialize unknown union members in XML.");n.c(new M(r).c(s))}}),n},aW=(e,t)=>{const n=new M(so);return e[Ns]!=null&&n.c(M.of(At,String(e[Ns])).n(Ns)),e[Os]!=null&&n.c(M.of(Uw,String(e[Os])).n(Os)),n},oW=(e,t)=>{const n=new M(Zg);return e[Ns]!=null&&n.c(M.of(At,String(e[Ns])).n(Ns)),e[Tt]!=null&&n.c(M.of(Mw,e[Tt]).n(Tt)),e[Os]!=null&&n.c(M.of(Uw,String(e[Os])).n(Os)),n},cW=(e,t)=>e.filter(n=>n!=null).map(n=>oW(n).n(ir)),lW=(e,t)=>{const n=new M(bX);return n.l(e,"TopicConfigurations","TopicConfiguration",()=>cG(e[ab])),n.l(e,"QueueConfigurations","QueueConfiguration",()=>_W(e[eb])),n.l(e,"LambdaFunctionConfigurations","CloudFunctionConfiguration",()=>Wj(e[Kg])),e[Xa]!=null&&n.c(Cj(e[Xa]).n(Xa)),n},Yp=(e,t)=>{const n=new M(pX);return e[bt]!=null&&n.c(UW(e[bt]).n(nb)),n},uW=(e,t)=>{const n=new M(xX);return e[bt]!=null&&n.c(M.of(iy,e[bt]).n(bt)),e[wt]!=null&&n.c(M.of(AX,e[wt]).n(wt)),n.cc(e,nn),e[_d]!=null&&n.c(M.of(_d,Ln(e[_d]).toString()).n(_d)),e[Sr]!=null&&n.c(M.of(Sr,String(e[Sr])).n(Sr)),n},dW=(e,t)=>e.filter(n=>n!=null).map(n=>uW(n).n(ir)),fW=(e,t)=>{const n=new M(vX);return n.cc(e,Jd),e[is]!=null&&n.c(gW(e[is]).n(is)),n},hW=(e,t)=>{const n=new M(TX);return e[Ue]!=null&&n.c(M.of(Oo,e[Ue]).n(Ue)),n},mW=(e,t)=>{const n=new M(SX);return e[Ps]!=null&&n.c(M.of(_w,e[Ps]).n(Ps)),e[Fc]!=null&&n.c(M.of(Kr,Ro(e[Fc]).toString()).n(Fc)),n},gW=(e,t)=>{const n=new M(_X);return e[Ya]!=null&&n.c(hj(e[Ya]).n(Ya)),n},bW=(e,t)=>{const n=new M(Zd);return e[P0]!=null&&n.c($W(e[P0]).n(P0)),n},V_=(e,t)=>{const n=new M(io);return e[xc]!=null&&n.c(fj(e[xc]).n(xc)),e[Ic]!=null&&n.c(qj(e[Ic]).n(Ic)),n},pW=(e,t)=>{const n=new M(Mt);return n.cc(e,Ws),n.cc(e,Bn),n},yW=(e,t)=>{const n=new M(yX);return n.l(e,"Rules","Rule",()=>CW(e[zs])),n},EW=(e,t)=>{const n=new M(CX);return n.cc(e,du),n},CW=(e,t)=>e.filter(n=>n!=null).map(n=>EW(n).n(ir)),xW=(e,t)=>new M(RX),vW=(e,t)=>{const n=new M(ao);return n.cc(e,ef),n},TW=(e,t)=>{const n=new M(IX);return e[pc]!=null&&n.c(M.of(Ad,String(e[pc])).n(pc)),e[Ac]!=null&&n.c(M.of(Ad,String(e[Ac])).n(Ac)),e[yc]!=null&&n.c(M.of(Ad,String(e[yc])).n(yc)),e[Lc]!=null&&n.c(M.of(Ad,String(e[Lc])).n(Lc)),n},SW=(e,t)=>{const n=new M(Jg);return e[st]!=null&&n.c(M.of(sy,e[st]).n(st)),e[nf]!=null&&n.c(M.of(nf,e[nf]).n(tb)),n.l(e,"Events","Event",()=>Vp(e[Pi])),e[rt]!=null&&n.c(Yp(e[rt]).n(rt)),n},_W=(e,t)=>e.filter(n=>n!=null).map(n=>SW(n).n(ir)),K_=(e,t)=>{const n=new M(mi);return e[jn]!=null&&n.c(M.of(xY,e[jn]).n(jn)),e[At]!=null&&n.c(M.of(NX,String(e[At])).n(At)),n},wW=(e,t)=>{const n=new M(uo);return n.cc(e,na),n.cc(e,jd),n.cc(e,ia),n.cc(e,sf),n.cc(e,af),n},AW=(e,t)=>{const n=new M(oo);return n.cc(e,na),n.cc(e,ia),n},kW=(e,t)=>{const n=new M(co);return e[Ue]!=null&&n.c(M.of(OX,e[Ue]).n(Ue)),n},IW=(e,t)=>{const n=new M(PX);return n.cc(e,cf),n.l(e,"Rules","Rule",()=>NW(e[zs])),n},RW=(e,t)=>{const n=new M(HX);return n.cc(e,Bn),e[Ma]!=null&&n.c(M.of(Ma,String(e[Ma])).n(Ma)),n.cc(e,Oe),e[rt]!=null&&n.c(PW(e[rt]).n(rt)),e[Ue]!=null&&n.c(M.of(UX,e[Ue]).n(Ue)),e[go]!=null&&n.c(XW(e[go]).n(go)),e[Za]!=null&&n.c(xj(e[Za]).n(Za)),e[nr]!=null&&n.c(bj(e[nr]).n(nr)),e[Ka]!=null&&n.c(gj(e[Ka]).n(Ka)),n},BW=(e,t)=>{const n=new M(FX);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Po(e[Mr])),n},PW=(e,t)=>{const n=new M(zX);return n.cc(e,Oe),e[xt]!=null&&n.c(dl(e[xt]).n(xt)),e[Cn]!=null&&n.c(BW(e[Cn]).n(Cn)),n},NW=(e,t)=>e.filter(n=>n!=null).map(n=>RW(n).n(ir)),OW=(e,t)=>{const n=new M(lo);return e[Ue]!=null&&n.c(M.of(GX,e[Ue]).n(Ue)),e[qc]!=null&&n.c(Y_(e[qc]).n(qc)),n},Y_=(e,t)=>{const n=new M(VX);return e[La]!=null&&n.c(M.of(La,String(e[La])).n(La)),n},DW=(e,t)=>{const n=new M(LX);return n.cc(e,tf),n},LW=(e,t)=>{const n=new M(of);return e[u0]!=null&&n.c(M.of(EY,String(e[u0])).n(u0)),n},MW=(e,t)=>{const n=new M(qX);return e[At]!=null&&n.c(M.of(At,String(e[At])).n(At)),e[Hd]!=null&&n.c(_j(e[Hd]).n(Hd)),e[as]!=null&&n.c(M.of($X,e[as]).n(as)),n.cc(e,Fw),n.cc(e,pY),e[uf]!=null&&n.c(jW(e[uf]).n(uf)),e[Zd]!=null&&n.c(bW(e[Zd]).n(Zd)),n},FW=(e,t)=>{const n=new M(sh);return e[Va]!=null&&n.c(aj(e[Va]).n(Va)),e[uo]!=null&&n.c(wW(e[uo]).n(uo)),n},zW=(e,t)=>e.filter(n=>n!=null).map(n=>FW(n).n(sh)),UW=(e,t)=>{const n=new M(JX);return n.l(e,"FilterRules","FilterRule",()=>Sj(e[jg])),n},$W=(e,t)=>{const n=new M(eQ);return n.cc(e,Lh),e[Oe]!=null&&n.c(M.of(JY,e[Oe]).n(Oe)),e[fi]!=null&&n.c(pj(e[fi]).n(fi)),e[r0]!=null&&n.c(M.of(EX,e[r0]).n(r0)),n.lc(e,"AccessControlList","AccessControlList",()=>W_(e[ja])),e[bo]!=null&&n.c(Xp(e[bo]).n(bo)),n.lc(e,"UserMetadata","UserMetadata",()=>dG(e[fQ])),n.cc(e,Tt),n},HW=(e,t)=>{const n=new M(ff);return e[Bi]!=null&&n.c(M.of(aQ,e[Bi]).n(Bi)),e[Fs]!=null&&n.c(M.of(oQ,e[Fs]).n(Fs)),n},qW=(e,t)=>{const n=new M(df);return e[kd]!=null&&n.c(M.of(kd,String(e[kd])).n(kd)),e[Sd]!=null&&n.c(M.of(Sd,String(e[Sd])).n(Sd)),n},jW=(e,t)=>{const n=new M(uf);return e[eo]!=null&&n.c(G_(e[eo]).n(eo)),n.cc(e,Cw),n.cc(e,xw),e[io]!=null&&n.c(V_(e[io]).n(io)),n},WW=(e,t)=>{const n=new M(rQ);return e[zc]!=null&&n.c(M.of(zr,e[zc]).n(zc)),e[Bc]!=null&&n.c(M.of(wr,e[Bc]).n(Bc)),n},GW=(e,t)=>{const n=new M(sQ);return n.l(e,"Rules","Rule",()=>KW(e[zs])),n},VW=(e,t)=>{const n=new M(iQ);return e[hc]!=null&&n.c(WW(e[hc]).n(hc)),e[En]!=null&&n.c(M.of(En,String(e[En])).n(En)),n},KW=(e,t)=>e.filter(n=>n!=null).map(n=>VW(n).n(ir)),YW=(e,t)=>new M(mo),XW=(e,t)=>{const n=new M(go);return e[ho]!=null&&n.c(ZW(e[ho]).n(ho)),e[co]!=null&&n.c(kW(e[co]).n(co)),n},QW=(e,t)=>{const n=new M(ih);return e[Rc]!=null&&n.c(M.of(wr,e[Rc]).n(Rc)),n},ZW=(e,t)=>{const n=new M(ho);return e[Ue]!=null&&n.c(M.of(ZX,e[Ue]).n(Ue)),n},JW=(e,t)=>new M(ah),eG=(e,t)=>{const n=new M(fo);return e[vc]!=null&&n.c(tG(e[vc]).n(vc)),n},tG=(e,t)=>{const n=new M(KX);return e[Dc]!=null&&n.c(M.of(YX,e[Dc]).n(Dc)),e[nr]!=null&&n.c(Qq(e[nr]).n(nr)),n},dl=(e,t)=>{const n=new M(xt);return e[bt]!=null&&n.c(M.of(iy,e[bt]).n(bt)),n.cc(e,bs),n},Xp=(e,t)=>{const n=new M(bo);return n.lc(e,"TagSet","TagSet",()=>Po(e[Hs])),n},Po=(e,t)=>e.filter(n=>n!=null).map(n=>dl(n).n(xt)),nG=(e,t)=>{const n=new M(lQ);if(e[gs]!=null){const r=j_(e[gs]).n(gs);r.a("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),n.c(r)}return e[hi]!=null&&n.c(M.of(QK,e[hi]).n(hi)),n},rG=(e,t)=>e.filter(n=>n!=null).map(n=>nG(n).n(Ni)),sG=(e,t)=>{const n=new M(po);return e[mo]!=null&&n.c(YW(e[mo]).n(mo)),e[ao]!=null&&n.c(vW(e[ao]).n(ao)),n},iG=(e,t)=>{const n=new M(cb);return e[At]!=null&&n.c(M.of(zY,String(e[At])).n(At)),e[Ai]!=null&&n.c(M.of(MY,e[Ai]).n(Ai)),n},aG=(e,t)=>e.filter(n=>n!=null).map(n=>iG(n).n(ir)),oG=(e,t)=>{const n=new M(ib);return e[st]!=null&&n.c(M.of(sy,e[st]).n(st)),e[mf]!=null&&n.c(M.of(mf,e[mf]).n(lb)),n.l(e,"Events","Event",()=>Vp(e[Pi])),e[rt]!=null&&n.c(Yp(e[rt]).n(rt)),n},cG=(e,t)=>e.filter(n=>n!=null).map(n=>oG(n).n(ir)),lG=(e,t)=>{const n=new M(db);return e[Kr]!=null&&n.c(M.of(Kr,Ro(e[Kr]).toString()).n(Kr)),e[At]!=null&&n.c(M.of(At,String(e[At])).n(At)),e[Tt]!=null&&n.c(M.of(Mw,e[Tt]).n(Tt)),n},uG=(e,t)=>e.filter(n=>n!=null).map(n=>lG(n).n(ir)),dG=(e,t)=>e.filter(n=>n!=null).map(n=>eW(n).n(Sw)),fG=(e,t)=>{const n=new M(hQ);return e[Xd]!=null&&n.c(M.of(Xd,e[Xd]).n(Xg)),e[Ue]!=null&&n.c(M.of(tY,e[Ue]).n(Ue)),n},hG=(e,t)=>{const n=new M(mQ);return e[Qa]!=null&&n.c(Ej(e[Qa]).n(Qa)),e[Ja]!=null&&n.c(Aj(e[Ja]).n(Ja)),e[oo]!=null&&n.c(AW(e[oo]).n(oo)),n.lc(e,"RoutingRules","RoutingRules",()=>zW(e[ec])),n},mG=(e,t)=>{const n={};return e[Pa]!=null&&(n[Pa]=Gt(e[Pa])),n},gG=(e,t)=>{const n={};return e[Mt]!=null&&(n[Mt]=D(e[Mt])),n},bG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>D(n)),pG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>D(n)),yG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>D(n)),EG=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e.Tag===""?n[Mr]=[]:e[xt]!=null&&(n[Mr]=No(ot(e[xt]))),n},X_=(e,t)=>{const n={};return e[st]!=null&&(n[st]=D(e[st])),e.Filter===""||e[rt]!=null&&(n[rt]=vG(OS(e[rt]))),e[fo]!=null&&(n[fo]=SK(e[fo])),n},CG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>X_(n)),xG=(e,t)=>{const n={};return e[Ms]!=null&&(n[Ms]=TG(e[Ms])),n},vG=(e,t)=>e[Oe]!=null?{Prefix:D(e[Oe])}:e[xt]!=null?{Tag:fl(e[xt])}:e[Cn]!=null?{And:EG(e[Cn])}:{$unknown:Object.entries(e)[0]},TG=(e,t)=>{const n={};return e[Rs]!=null&&(n[Rs]=D(e[Rs])),e[gc]!=null&&(n[gc]=D(e[gc])),e[Bt]!=null&&(n[Bt]=D(e[Bt])),e[Oe]!=null&&(n[Oe]=D(e[Oe])),n},SG=(e,t)=>{const n={};return e[kn]!=null&&(n[kn]=D(e[kn])),e[s0]!=null&&(n[s0]=Ve(Xr(e[s0]))),e[uu]!=null&&(n[uu]=D(e[uu])),e[lu]!=null&&(n[lu]=D(e[lu])),n},Q_=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>SG(n)),_G=(e,t)=>{const n={};return e[dn]!=null&&(n[dn]=D(e[dn])),e[fn]!=null&&(n[fn]=D(e[fn])),e[hn]!=null&&(n[hn]=D(e[hn])),e[mn]!=null&&(n[mn]=D(e[mn])),e[gn]!=null&&(n[gn]=D(e[gn])),e[bn]!=null&&(n[bn]=D(e[bn])),n},Z_=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>D(n)),wG=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),n},Dh=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>wG(n)),AG=(e,t)=>{const n={};return e[qd]!=null&&(n[qd]=D(e[qd])),e[Vd]!=null&&(n[Vd]=D(e[Vd])),n},kG=(e,t)=>({}),IG=(e,t)=>{const n={};return e[nn]!=null&&(n[nn]=D(e[nn])),e[Pn]!=null&&(n[Pn]=Ve(Xr(e[Pn]))),e[bn]!=null&&(n[bn]=D(e[bn])),e[dn]!=null&&(n[dn]=D(e[dn])),e[fn]!=null&&(n[fn]=D(e[fn])),e[hn]!=null&&(n[hn]=D(e[hn])),e[mn]!=null&&(n[mn]=D(e[mn])),e[gn]!=null&&(n[gn]=D(e[gn])),n},RG=(e,t)=>{const n={};return e[nn]!=null&&(n[nn]=D(e[nn])),e[Pn]!=null&&(n[Pn]=Ve(Xr(e[Pn]))),e[dn]!=null&&(n[dn]=D(e[dn])),e[fn]!=null&&(n[fn]=D(e[fn])),e[hn]!=null&&(n[hn]=D(e[hn])),e[mn]!=null&&(n[mn]=D(e[mn])),e[gn]!=null&&(n[gn]=D(e[gn])),n},BG=(e,t)=>{const n={};return e[Bn]!=null&&(n[Bn]=D(e[Bn])),e.AllowedHeader===""?n[Ng]=[]:e[Pg]!=null&&(n[Ng]=bG(ot(e[Pg]))),e.AllowedMethod===""?n[Dg]=[]:e[Og]!=null&&(n[Dg]=pG(ot(e[Og]))),e.AllowedOrigin===""?n[Mg]=[]:e[Lg]!=null&&(n[Mg]=yG(ot(e[Lg]))),e.ExposeHeader===""?n[$g]=[]:e[Hg]!=null&&(n[$g]=KG(ot(e[Hg]))),e[Da]!=null&&(n[Da]=Gt(e[Da])),n},PG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>BG(n)),NG=(e,t)=>{const n={};return e[Ps]!=null&&(n[Ps]=D(e[Ps])),e[At]!=null&&(n[At]=Gt(e[At])),e[Fa]!=null&&(n[Fa]=Gt(e[Fa])),n},OG=(e,t)=>{const n={};return e[bt]!=null&&(n[bt]=D(e[bt])),e[wt]!=null&&(n[wt]=D(e[wt])),e[js]!=null&&(n[js]=Nt(e[js])),e[o0]!=null&&(n[o0]=D(e[o0])),n},DG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>OG(n)),LG=(e,t)=>{const n={};return e[Mt]!=null&&(n[Mt]=pa(e[Mt])),e[bt]!=null&&(n[bt]=D(e[bt])),e[wt]!=null&&(n[wt]=D(e[wt])),e[_c]!=null&&(n[_c]=Nt(e[_c])),e[Pn]!=null&&(n[Pn]=Ve(Xr(e[Pn]))),n},MG=(e,t)=>{const n={};return e[Ue]!=null&&(n[Ue]=D(e[Ue])),n},FG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>LG(n)),zG=(e,t)=>{const n={};return e[Bt]!=null&&(n[Bt]=D(e[Bt])),e[mc]!=null&&(n[mc]=D(e[mc])),e[Tt]!=null&&(n[Tt]=D(e[Tt])),e[Wa]!=null&&(n[Wa]=gG(e[Wa])),e[Dr]!=null&&(n[Dr]=$G(e[Dr])),e[lo]!=null&&(n[lo]=cK(e[lo])),e[ro]!=null&&(n[ro]=SV(e[ro])),n},UG=(e,t)=>{const n={};return e[N0]!=null&&(n[N0]=D(e[N0])),e[Bi]!=null&&(n[Bi]=D(e[Bi])),e[$c]!=null&&(n[$c]=D(e[$c])),n},$G=(e,t)=>{const n={};return e[rf]!=null&&(n[rf]=D(e[rf])),n},HG=(e,t)=>({}),qG=(e,t)=>{const n={};return e[bt]!=null&&(n[bt]=D(e[bt])),e[wt]!=null&&(n[wt]=D(e[wt])),e[a0]!=null&&(n[a0]=D(e[a0])),e[C0]!=null&&(n[C0]=D(e[C0])),n},Qp=(e,t)=>{const n={};return e[Ud]!=null&&(n[Ud]=D(e[Ud])),e[$d]!=null&&(n[$d]=D(e[$d])),n},jG=(e,t)=>{const n={};return e[bt]!=null&&(n[bt]=D(e[bt])),n},WG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>qG(n)),GG=(e,t)=>({}),Zp=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>D(n)),VG=(e,t)=>{const n={};return e[Ue]!=null&&(n[Ue]=D(e[Ue])),n},KG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>D(n)),YG=(e,t)=>{const n={};return e[kn]!=null&&(n[kn]=D(e[kn])),e[bs]!=null&&(n[bs]=D(e[bs])),n},XG=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>YG(n)),QG=(e,t)=>{const n={};return e[y0]!=null&&(n[y0]=vV(e[y0])),n},ZG=(e,t)=>{const n={};return e[E0]!=null&&(n[E0]=TV(e[E0])),e[Ue]!=null&&(n[Ue]=D(e[Ue])),e[Gs]!=null&&(n[Gs]=Qp(e[Gs])),n},JG=(e,t)=>{const n={};return e[nl]!=null&&(n[uQ]=Gt(e[nl])),e[sa]!=null&&(n[sa]=D(e[sa])),e[Oc]!=null&&(n[Oc]=D(e[Oc])),e[Ii]!=null&&(n[Ii]=Gt(e[Ii])),e[Vt]!=null&&(n[Vt]=Nt(e[Vt])),e.Part===""?n[Nu]=[]:e[rh]!=null&&(n[Nu]=VV(ot(e[rh]))),n},eV=(e,t)=>{const n={};return e[gs]!=null&&(n[gs]=J_(e[gs])),e[hi]!=null&&(n[hi]=D(e[hi])),n},J_=(e,t)=>{const n={};return e[Ws]!=null&&(n[Ws]=D(e[Ws])),e[zd]!=null&&(n[zd]=D(e[zd])),e[Bn]!=null&&(n[Bn]=D(e[Bn])),e[yf]!=null&&(n[yf]=D(e[yf])),e[zx]!=null&&(n[as]=D(e[zx])),n},ew=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>eV(n)),tV=(e,t)=>{const n={};return e[hf]!=null&&(n[hf]=D(e[hf])),n},tw=(e,t)=>{const n={};return e[Bn]!=null&&(n[Bn]=D(e[Bn])),e[Ws]!=null&&(n[Ws]=D(e[Ws])),n},nV=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e.Tag===""?n[Mr]=[]:e[xt]!=null&&(n[Mr]=No(ot(e[xt]))),n},nw=(e,t)=>{const n={};return e[st]!=null&&(n[st]=D(e[st])),e[rt]!=null&&(n[rt]=sV(e[rt])),e[Ue]!=null&&(n[Ue]=D(e[Ue])),e.Tiering===""?n[ob]=[]:e[cb]!=null&&(n[ob]=RK(ot(e[cb]))),n},rV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>nw(n)),sV=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e[xt]!=null&&(n[xt]=fl(e[xt])),e[Cn]!=null&&(n[Cn]=nV(e[Cn])),n},rw=(e,t)=>{const n={};return e[nr]!=null&&(n[nr]=aV(e[nr])),e[Oa]!=null&&(n[Oa]=Nt(e[Oa])),e[rt]!=null&&(n[rt]=cV(e[rt])),e[st]!=null&&(n[st]=D(e[st])),e[wc]!=null&&(n[wc]=D(e[wc])),e.OptionalFields===""?n[Jo]=[]:e[Jo]!=null&&e[Jo][Wg]!=null&&(n[Jo]=lV(ot(e[Jo][Wg]))),e[Uc]!=null&&(n[Uc]=dV(e[Uc])),n},iV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>rw(n)),aV=(e,t)=>{const n={};return e[Ms]!=null&&(n[Ms]=uV(e[Ms])),n},oV=(e,t)=>{const n={};return e[ah]!=null&&(n[sb]=vK(e[ah])),e[ih]!=null&&(n[rb]=CK(e[ih])),n},cV=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),n},lV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>D(n)),uV=(e,t)=>{const n={};return e[fc]!=null&&(n[fc]=D(e[fc])),e[Bt]!=null&&(n[Bt]=D(e[Bt])),e[Rs]!=null&&(n[Rs]=D(e[Rs])),e[Oe]!=null&&(n[Oe]=D(e[Oe])),e[fi]!=null&&(n[fi]=oV(e[fi])),n},dV=(e,t)=>{const n={};return e[Sc]!=null&&(n[Sc]=D(e[Sc])),n},fV=(e,t)=>{const n={};return e[ki]!=null&&(n[ki]=D(e[ki])),e[Hc]!=null&&(n[Hc]=D(e[Hc])),e[Gs]!=null&&(n[Gs]=Qp(e[Gs])),e[Fs]!=null&&(n[Fs]=D(e[Fs])),e[Ri]!=null&&(n[Ri]=D(e[Ri])),n},hV=(e,t)=>{const n={};return e[Hc]!=null&&(n[Hc]=D(e[Hc])),e[Gs]!=null&&(n[Gs]=Qp(e[Gs])),e[Fs]!=null&&(n[Fs]=D(e[Fs])),e[Ri]!=null&&(n[Ri]=D(e[Ri])),e[mi]!=null&&(n[mi]=JV(e[mi])),n},mV=(e,t)=>{const n={};return e[st]!=null&&(n[st]=D(e[st])),e[Fg]!=null&&(n[Kd]=D(e[Fg])),e.Event===""?n[Pi]=[]:e[To]!=null&&(n[Pi]=Zp(ot(e[To]))),e[rt]!=null&&(n[rt]=Jp(e[rt])),n},gV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>mV(n)),bV=(e,t)=>{const n={};return e[Kr]!=null&&(n[Kr]=Ve(Xr(e[Kr]))),e[At]!=null&&(n[At]=Gt(e[At])),e[Na]!=null&&(n[Na]=Nt(e[Na])),n},pV=(e,t)=>{const n={};return e[jn]!=null&&(n[jn]=bV(e[jn])),e[Bn]!=null&&(n[Bn]=D(e[Bn])),e[Oe]!=null&&(n[Oe]=D(e[Oe])),e[rt]!=null&&(n[rt]=EV(e[rt])),e[Ue]!=null&&(n[Ue]=D(e[Ue])),e.Transition===""?n[ub]=[]:e[db]!=null&&(n[ub]=OK(ot(e[db]))),e.NoncurrentVersionTransition===""?n[Qg]=[]:e[Zg]!=null&&(n[Qg]=PV(ot(e[Zg]))),e[so]!=null&&(n[so]=RV(e[so])),e[Ga]!=null&&(n[Ga]=mG(e[Ga])),n},yV=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e.Tag===""?n[Mr]=[]:e[xt]!=null&&(n[Mr]=No(ot(e[xt]))),e[Ds]!=null&&(n[Ds]=yr(e[Ds])),e[Ls]!=null&&(n[Ls]=yr(e[Ls])),n},EV=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e[xt]!=null&&(n[xt]=fl(e[xt])),e[Ds]!=null&&(n[Ds]=yr(e[Ds])),e[Ls]!=null&&(n[Ls]=yr(e[Ls])),e[Cn]!=null&&(n[Cn]=yV(e[Cn])),n},CV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>pV(n)),xV=(e,t)=>{const n={};return e[gf]!=null&&(n[gf]=D(e[gf])),e.TargetGrants===""?n[tc]=[]:e[tc]!=null&&e[tc][Ni]!=null&&(n[tc]=AK(ot(e[tc][Ni]))),e[bf]!=null&&(n[bf]=D(e[bf])),e[po]!=null&&(n[po]=kK(e[po])),n},vV=(e,t)=>{const n={};return e[c0]!=null&&(n[c0]=UG(e[c0])),e[g0]!=null&&(n[g0]=hV(e[g0])),e[h0]!=null&&(n[h0]=fV(e[h0])),n},TV=(e,t)=>{const n={};return e[B0]!=null&&(n[B0]=fK(e[B0])),n},SV=(e,t)=>{const n={};return e[Ue]!=null&&(n[Ue]=D(e[Ue])),e[Tc]!=null&&(n[Tc]=aw(e[Tc])),n},_V=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e.Tag===""?n[Mr]=[]:e[xt]!=null&&(n[Mr]=No(ot(e[xt]))),e[wi]!=null&&(n[wi]=D(e[wi])),n},sw=(e,t)=>{const n={};return e[st]!=null&&(n[st]=D(e[st])),e.Filter===""||e[rt]!=null&&(n[rt]=AV(OS(e[rt]))),n},wV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>sw(n)),AV=(e,t)=>e[Oe]!=null?{Prefix:D(e[Oe])}:e[xt]!=null?{Tag:fl(e[xt])}:e[wi]!=null?{AccessPointArn:D(e[wi])}:e[Cn]!=null?{And:_V(e[Cn])}:{$unknown:Object.entries(e)[0]},kV=(e,t)=>{const n={};return e[os]!=null&&(n[os]=D(e[os])),e[bt]!=null&&(n[bt]=D(e[bt])),e[m0]!=null&&(n[m0]=Ve(Xr(e[m0]))),e[Tt]!=null&&(n[Tt]=D(e[Tt])),e[Mt]!=null&&(n[Mt]=pa(e[Mt])),e[kc]!=null&&(n[kc]=tw(e[kc])),e[Et]!=null&&(n[Et]=D(e[Et])),e[bn]!=null&&(n[bn]=D(e[bn])),n},IV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>kV(n)),RV=(e,t)=>{const n={};return e[Ns]!=null&&(n[Ns]=Gt(e[Ns])),e[Os]!=null&&(n[Os]=Gt(e[Os])),n},BV=(e,t)=>{const n={};return e[Ns]!=null&&(n[Ns]=Gt(e[Ns])),e[Tt]!=null&&(n[Tt]=D(e[Tt])),e[Os]!=null&&(n[Os]=Gt(e[Os])),n},PV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>BV(n)),Jp=(e,t)=>{const n={};return e[nb]!=null&&(n[bt]=dK(e[nb])),n},NV=(e,t)=>{const n={};return e[bt]!=null&&(n[bt]=D(e[bt])),e[Pn]!=null&&(n[Pn]=Ve(Xr(e[Pn]))),e[nn]!=null&&(n[nn]=D(e[nn])),e.ChecksumAlgorithm===""?n[Et]=[]:e[Et]!=null&&(n[Et]=Z_(ot(e[Et]))),e[bn]!=null&&(n[bn]=D(e[bn])),e[Sr]!=null&&(n[Sr]=yr(e[Sr])),e[Tt]!=null&&(n[Tt]=D(e[Tt])),e[Mt]!=null&&(n[Mt]=pa(e[Mt])),e[Mc]!=null&&(n[Mc]=ow(e[Mc])),n},iw=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>NV(n)),OV=(e,t)=>{const n={};return e[Jd]!=null&&(n[Jd]=D(e[Jd])),e[is]!=null&&(n[is]=MV(e[is])),n},DV=(e,t)=>{const n={};return e[Ue]!=null&&(n[Ue]=D(e[Ue])),n},LV=(e,t)=>{const n={};return e[Ps]!=null&&(n[Ps]=D(e[Ps])),e[Fc]!=null&&(n[Fc]=Ve(Xr(e[Fc]))),n},MV=(e,t)=>{const n={};return e[Ya]!=null&&(n[Ya]=NG(e[Ya])),n},FV=(e,t)=>{const n={};return e[rs]!=null&&(n[rs]=Gt(e[rs])),e[Sr]!=null&&(n[Sr]=yr(e[Sr])),e[dn]!=null&&(n[dn]=D(e[dn])),e[fn]!=null&&(n[fn]=D(e[fn])),e[hn]!=null&&(n[hn]=D(e[hn])),e[mn]!=null&&(n[mn]=D(e[mn])),e[gn]!=null&&(n[gn]=D(e[gn])),n},zV=(e,t)=>{const n={};return e[nn]!=null&&(n[nn]=D(e[nn])),e.ChecksumAlgorithm===""?n[Et]=[]:e[Et]!=null&&(n[Et]=Z_(ot(e[Et]))),e[bn]!=null&&(n[bn]=D(e[bn])),e[Sr]!=null&&(n[Sr]=yr(e[Sr])),e[Tt]!=null&&(n[Tt]=D(e[Tt])),e[bt]!=null&&(n[bt]=D(e[bt])),e[wt]!=null&&(n[wt]=D(e[wt])),e[_c]!=null&&(n[_c]=Nt(e[_c])),e[Pn]!=null&&(n[Pn]=Ve(Xr(e[Pn]))),e[Mt]!=null&&(n[Mt]=pa(e[Mt])),e[Mc]!=null&&(n[Mc]=ow(e[Mc])),n},UV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>zV(n)),pa=(e,t)=>{const n={};return e[Ws]!=null&&(n[Ws]=D(e[Ws])),e[Bn]!=null&&(n[Bn]=D(e[Bn])),n},$V=(e,t)=>{const n={};return e.Rule===""?n[zs]=[]:e[is]!=null&&(n[zs]=qV(ot(e[is]))),n},HV=(e,t)=>{const n={};return e[du]!=null&&(n[du]=D(e[du])),n},qV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>HV(n)),jV=(e,t)=>{const n={};return e[rs]!=null&&(n[rs]=Gt(e[rs])),e[Pn]!=null&&(n[Pn]=Ve(Xr(e[Pn]))),e[nn]!=null&&(n[nn]=D(e[nn])),e[Sr]!=null&&(n[Sr]=yr(e[Sr])),e[dn]!=null&&(n[dn]=D(e[dn])),e[fn]!=null&&(n[fn]=D(e[fn])),e[hn]!=null&&(n[hn]=D(e[hn])),e[mn]!=null&&(n[mn]=D(e[mn])),e[gn]!=null&&(n[gn]=D(e[gn])),n},WV=(e,t)=>{const n={};return e[ef]!=null&&(n[ef]=D(e[ef])),n},GV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>jV(n)),VV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>FV(n)),KV=(e,t)=>{const n={};return e[d0]!=null&&(n[d0]=Nt(e[d0])),n},YV=(e,t)=>{const n={};return e[Cc]!=null&&(n[Cc]=yr(e[Cc])),e[bc]!=null&&(n[bc]=yr(e[bc])),e[Ec]!=null&&(n[Ec]=yr(e[Ec])),n},XV=(e,t)=>{const n={};return e[pc]!=null&&(n[pc]=Nt(e[pc])),e[Ac]!=null&&(n[Ac]=Nt(e[Ac])),e[yc]!=null&&(n[yc]=Nt(e[yc])),e[Lc]!=null&&(n[Lc]=Nt(e[Lc])),n},QV=(e,t)=>{const n={};return e[st]!=null&&(n[st]=D(e[st])),e[tb]!=null&&(n[nf]=D(e[tb])),e.Event===""?n[Pi]=[]:e[To]!=null&&(n[Pi]=Zp(ot(e[To]))),e[rt]!=null&&(n[rt]=Jp(e[rt])),n},ZV=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>QV(n)),JV=(e,t)=>{const n={};return e[jn]!=null&&(n[jn]=D(e[jn])),e[At]!=null&&(n[At]=Gt(e[At])),n},eK=(e,t)=>{const n={};return e[na]!=null&&(n[na]=D(e[na])),e[jd]!=null&&(n[jd]=D(e[jd])),e[ia]!=null&&(n[ia]=D(e[ia])),e[sf]!=null&&(n[sf]=D(e[sf])),e[af]!=null&&(n[af]=D(e[af])),n},tK=(e,t)=>{const n={};return e[na]!=null&&(n[na]=D(e[na])),e[ia]!=null&&(n[ia]=D(e[ia])),n},nK=(e,t)=>{const n={};return e[Ue]!=null&&(n[Ue]=D(e[Ue])),n},rK=(e,t)=>{const n={};return e[cf]!=null&&(n[cf]=D(e[cf])),e.Rule===""?n[zs]=[]:e[is]!=null&&(n[zs]=oK(ot(e[is]))),n},sK=(e,t)=>{const n={};return e[Bn]!=null&&(n[Bn]=D(e[Bn])),e[Ma]!=null&&(n[Ma]=Gt(e[Ma])),e[Oe]!=null&&(n[Oe]=D(e[Oe])),e[rt]!=null&&(n[rt]=aK(e[rt])),e[Ue]!=null&&(n[Ue]=D(e[Ue])),e[go]!=null&&(n[go]=EK(e[go])),e[Za]!=null&&(n[Za]=VG(e[Za])),e[nr]!=null&&(n[nr]=zG(e[nr])),e[Ka]!=null&&(n[Ka]=MG(e[Ka])),n},iK=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e.Tag===""?n[Mr]=[]:e[xt]!=null&&(n[Mr]=No(ot(e[xt]))),n},aK=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=D(e[Oe])),e[xt]!=null&&(n[xt]=fl(e[xt])),e[Cn]!=null&&(n[Cn]=iK(e[Cn])),n},oK=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>sK(n)),cK=(e,t)=>{const n={};return e[Ue]!=null&&(n[Ue]=D(e[Ue])),e[qc]!=null&&(n[qc]=aw(e[qc])),n},aw=(e,t)=>{const n={};return e[La]!=null&&(n[La]=Gt(e[La])),n},ow=(e,t)=>{const n={};return e[f0]!=null&&(n[f0]=Nt(e[f0])),e[A0]!=null&&(n[A0]=Ve(Xr(e[A0]))),n},lK=(e,t)=>{const n={};return e[Va]!=null&&(n[Va]=AG(e[Va])),e[uo]!=null&&(n[uo]=eK(e[uo])),n},uK=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>lK(n)),dK=(e,t)=>{const n={};return e.FilterRule===""?n[jg]=[]:e[qg]!=null&&(n[jg]=XG(ot(e[qg]))),n},fK=(e,t)=>{const n={};return e[Bi]!=null&&(n[Bi]=D(e[Bi])),e[Fs]!=null&&(n[Fs]=D(e[Fs])),e[Ri]!=null&&(n[Ri]=D(e[Ri])),e[$c]!=null&&(n[$c]=D(e[$c])),n},hK=(e,t)=>{const n={};return e[zc]!=null&&(n[zc]=D(e[zc])),e[Bc]!=null&&(n[Bc]=D(e[Bc])),n},mK=(e,t)=>{const n={};return e.Rule===""?n[zs]=[]:e[is]!=null&&(n[zs]=bK(ot(e[is]))),n},gK=(e,t)=>{const n={};return e[hc]!=null&&(n[hc]=hK(e[hc])),e[En]!=null&&(n[En]=Nt(e[En])),n},bK=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>gK(n)),pK=(e,t)=>{const n={};return e[t0]!=null&&(n[t0]=D(e[t0])),e[k0]!=null&&(n[k0]=D(e[k0])),e[R0]!=null&&(n[R0]=D(e[R0])),e[jn]!=null&&(n[jn]=Ve(Xr(e[jn]))),n},yK=(e,t)=>({}),EK=(e,t)=>{const n={};return e[ho]!=null&&(n[ho]=xK(e[ho])),e[co]!=null&&(n[co]=nK(e[co])),n},CK=(e,t)=>{const n={};return e[Rc]!=null&&(n[Rc]=D(e[Rc])),n},xK=(e,t)=>{const n={};return e[Ue]!=null&&(n[Ue]=D(e[Ue])),n},vK=(e,t)=>({}),TK=(e,t)=>{const n={};return e[Cc]!=null&&(n[Cc]=yr(e[Cc])),e[bc]!=null&&(n[bc]=yr(e[bc])),e[Ec]!=null&&(n[Ec]=yr(e[Ec])),n},SK=(e,t)=>{const n={};return e[vc]!=null&&(n[vc]=_K(e[vc])),n},_K=(e,t)=>{const n={};return e[Dc]!=null&&(n[Dc]=D(e[Dc])),e[nr]!=null&&(n[nr]=xG(e[nr])),n},fl=(e,t)=>{const n={};return e[bt]!=null&&(n[bt]=D(e[bt])),e[bs]!=null&&(n[bs]=D(e[bs])),n},No=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>fl(n)),wK=(e,t)=>{const n={};return e[gs]!=null&&(n[gs]=J_(e[gs])),e[hi]!=null&&(n[hi]=D(e[hi])),n},AK=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>wK(n)),kK=(e,t)=>{const n={};return e[mo]!=null&&(n[mo]=yK(e[mo])),e[ao]!=null&&(n[ao]=WV(e[ao])),n},IK=(e,t)=>{const n={};return e[At]!=null&&(n[At]=Gt(e[At])),e[Ai]!=null&&(n[Ai]=D(e[Ai])),n},RK=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>IK(n)),BK=(e,t)=>{const n={};return e[st]!=null&&(n[st]=D(e[st])),e[lb]!=null&&(n[mf]=D(e[lb])),e.Event===""?n[Pi]=[]:e[To]!=null&&(n[Pi]=Zp(ot(e[To]))),e[rt]!=null&&(n[rt]=Jp(e[rt])),n},PK=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>BK(n)),NK=(e,t)=>{const n={};return e[Kr]!=null&&(n[Kr]=Ve(Xr(e[Kr]))),e[At]!=null&&(n[At]=Gt(e[At])),e[Tt]!=null&&(n[Tt]=D(e[Tt])),n},OK=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>NK(n)),fe=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),DK=(e,t)=>tt(e,t).then(n=>t.utf8Encoder(n)),Cn="And",LK="AnalyticsAndOperator",Bg="AnalyticsConfiguration",hl="ACL",ja="AccessControlList",mx="AnalyticsConfigurationList",MK="AccessControlPolicy",Wa="AccessControlTranslation",FK="AccelerateConfiguration",cw="AbortDate",zK="AnalyticsExportDestination",UK="AnalyticsFilter",Pg="AllowedHeader",Ng="AllowedHeaders",$K="AnalyticsId",Ga="AbortIncompleteMultipartUpload",fc="AccountId",t0="AccessKeyId",Og="AllowedMethod",Dg="AllowedMethods",Lg="AllowedOrigin",Mg="AllowedOrigins",HK="AccessPointAlias",wi="AccessPointArn",vd="AllowQuotedRecordDelimiter",ey="AcceptRanges",lw="AbortRuleId",qK="ArchiveStatus",jK="AnalyticsS3BucketDestination",WK="AnalyticsS3ExportFileFormat",hc="ApplyServerSideEncryptionByDefault",Ai="AccessTier",mc="Account",Bt="Bucket",lu="BucketArn",gc="BucketAccountId",GK="BucketAccelerateStatus",el="BypassGovernanceRetention",VK="BucketInfo",En="BucketKeyEnabled",KK="BucketLifecycleConfiguration",YK="BucketLocationConstraint",XK="BucketLocationName",QK="BucketLogsPermission",ZK="BucketLoggingStatus",JK="BucketLocationType",Lh="BucketName",bc="BytesProcessed",pc="BlockPublicAcls",yc="BlockPublicPolicy",uu="BucketRegion",Ec="BytesReturned",Cc="BytesScanned",eY="BucketType",tY="BucketVersioningStatus",ai="Buckets",n0="Credentials",Et="ChecksumAlgorithm",r0="CannedACL",nY="CreateBucketConfiguration",ml="CacheControl",dn="ChecksumCRC32",fn="ChecksumCRC32C",hn="ChecksumCRC64NVME",gl="ContentDisposition",s0="CreationDate",bl="ContentEncoding",Fg="CloudFunction",gx="CloudFunctionConfiguration",pl="ContentLanguage",fa="ContentLength",uw="ChecksumMode",On="ContentMD5",rY="CompletedMultipartUpload",sY="CORSConfiguration",zg="CORSRule",Ug="CORSRules",Nr="CommonPrefixes",iY="CompletedPart",ty="ContentRange",bx="ConfirmRemoveSelfBucketAccess",dw="CopySource",mn="ChecksumSHA1",gn="ChecksumSHA256",fw="CopySourceIfMatch",Zf="CopySourceIfModifiedSince",hw="CopySourceIfNoneMatch",Jf="CopySourceIfUnmodifiedSince",aY="CopySourceRange",mw="CopySourceSSECustomerAlgorithm",gw="CopySourceSSECustomerKey",bw="CopySourceSSECustomerKeyMD5",xc="CSV",pw="CopySourceVersionId",oY="CSVInput",cY="CSVOutput",ki="ConfigurationState",bn="ChecksumType",lY="ClientToken",yl="ContentType",uY="CompressionType",tn="ContinuationToken",i0="Checksum",Qi="Contents",a0="Code",dY="Comments",Va="Condition",Or="Delimiter",Pa="DaysAfterInitiation",vc="DataExport",fY="DestinationIfMatch",px="DestinationIfModifiedSince",hY="DestinationIfNoneMatch",yx="DestinationIfUnmodifiedSince",js="DeleteMarker",Ka="DeleteMarkerReplication",mY="DeleteMarkerReplicationStatus",o0="DeleteMarkerVersionId",Ex="DeleteMarkers",Ws="DisplayName",gY="DataRedundancy",Ya="DefaultRetention",c0="DestinationResult",At="Days",Kr="Date",Td="Deleted",bY="Delete",nr="Destination",pY="Description",gi="Expires",zd="EmailAddress",Xa="EventBridgeConfiguration",ke="ExpectedBucketOwner",Ud="ErrorCode",Dr="EncryptionConfiguration",Qa="ErrorDocument",$g="ExposeHeaders",Hg="ExposeHeader",$d="ErrorMessage",Na="ExpiredObjectDeleteMarker",Za="ExistingObjectReplication",yY="ExistingObjectReplicationStatus",EY="EnableRequestProgress",yw="ExpiresString",Ew="ExpectedSourceBucketOwner",CY="ExpirationStatus",xY="ExpirationState",Lr="EncodingType",nn="ETag",l0="EncryptionType",Tc="EventThreshold",Cw="ExpressionType",fi="Encryption",u0="Enabled",Sd="End",Gs="Error",Cx="Errors",To="Event",Pi="Events",xw="Expression",jn="Expiration",rt="Filter",vw="FieldDelimiter",vY="FileHeaderInfo",TY="FetchOwner",qg="FilterRule",SY="FilterRuleName",_Y="FilterRuleValue",jg="FilterRules",Wg="Field",Rs="Format",Sc="Frequency",Ni="Grant",El="GrantFullControl",Hd="GlacierJobParameters",Cl="GrantRead",xl="GrantReadACP",ny="GrantWrite",vl="GrantWriteACP",Pu="Grants",gs="Grantee",qd="HttpErrorCodeReturnedEquals",na="HostName",jd="HttpRedirectCode",st="Id",Gg="InventoryConfiguration",xx="InventoryConfigurationList",Tw="InventoryConfigurationState",Ja="IndexDocument",Bn="ID",wY="InventoryDestination",Oa="IsEnabled",AY="InventoryEncryption",kY="InventoryFilter",IY="InventoryFormat",RY="InventoryFrequency",BY="InventoryId",PY="InventoryIncludedObjectVersions",_c="IsLatest",$u="IfMatch",vx="IfMatchInitiatedTime",Tx="IfMatchLastModifiedTime",Sx="IfMatchSize",eh="IfModifiedSince",Mh="IfNoneMatch",NY="InventoryOptionalField",wc="IncludedObjectVersions",d0="IsPublic",Ac="IgnorePublicAcls",f0="IsRestoreInProgress",eo="InputSerialization",OY="InventoryS3BucketDestination",DY="InventorySchedule",Vt="IsTruncated",LY="IntelligentTieringAndOperator",MY="IntelligentTieringAccessTier",Vg="IntelligentTieringConfiguration",_x="IntelligentTieringConfigurationList",h0="InventoryTableConfigurationResult",FY="InventoryTableConfigurationUpdates",Wd="InventoryTableConfiguration",zY="IntelligentTieringDays",UY="IntelligentTieringFilter",$Y="IntelligentTieringId",HY="IntelligentTieringStatus",th="IfUnmodifiedSince",kc="Initiator",m0="Initiated",Ic="JSON",qY="JSONInput",jY="JSONOutput",WY="JSONType",Gd="JournalTableConfiguration",g0="JournalTableConfigurationResult",GY="JournalTableConfigurationUpdates",bt="Key",b0="KeyCount",Rc="KeyId",VY="KmsKeyArn",ra="KeyMarker",KY="KMSContext",p0="KMSKeyId",Bc="KMSMasterKeyID",Vd="KeyPrefixEquals",to="Location",Pc="LocationConstraint",no="LoggingEnabled",YY="LifecycleExpiration",Kd="LambdaFunctionArn",Kg="LambdaFunctionConfigurations",XY="LambdaFunctionConfiguration",QY="LocationInfo",Pn="LastModified",_d="LastModifiedTime",ZY="LocationNameAsString",JY="LocationPrefix",eX="LifecycleRule",tX="LifecycleRuleAndOperator",nX="LifecycleRuleFilter",rX="LocationType",Yd="Marker",sX="MetricsAndOperator",Da="MaxAgeSeconds",iX="MaxBuckets",Yg="MetricsConfiguration",wx="MetricsConfigurationList",y0="MetadataConfigurationResult",aX="MetadataConfiguration",oX="MetadataDirective",cX="MaxDirectoryBuckets",Xg="MfaDelete",Sw="MetadataEntry",lX="MetricsFilter",ry="MFA",Xd="MFADelete",uX="MetricsId",Bs="MaxKeys",dX="MetadataKey",nh="MissingMeta",Ax="MpuObjectSize",Ii="MaxParts",fX="MetricsStatus",hX="MetadataTableConfiguration",E0="MetadataTableConfigurationResult",mX="MetadataTableEncryptionConfiguration",Qd="MaxUploads",gX="MetadataValue",ro="Metrics",C0="Message",La="Minutes",Ps="Mode",kn="Name",bX="NotificationConfiguration",pX="NotificationConfigurationFilter",Yr="NextContinuationToken",Ns="NoncurrentDays",sy="NotificationId",Nc="NextKeyMarker",x0="NextMarker",Os="NewerNoncurrentVersions",Oc="NextPartNumberMarker",v0="NextUploadIdMarker",so="NoncurrentVersionExpiration",T0="NextVersionIdMarker",Qg="NoncurrentVersionTransitions",Zg="NoncurrentVersionTransition",Mt="Owner",kx="ObjectAttributes",yX="OwnershipControls",EX="ObjectCannedACL",CX="OwnershipControlsRule",Jo="OptionalFields",xX="ObjectIdentifier",iy="ObjectKey",Zd="OutputLocation",vX="ObjectLockConfiguration",Jd="ObjectLockEnabled",Ix="ObjectLockEnabledForBucket",TX="ObjectLockLegalHold",Oo="ObjectLockLegalHoldStatus",Tl="ObjectLockMode",SX="ObjectLockRetention",_w="ObjectLockRetentionMode",bi="ObjectLockRetainUntilDate",_X="ObjectLockRule",du="ObjectOwnership",tl="OptionalObjectAttributes",wX="OwnerOverride",S0="ObjectParts",io="OutputSerialization",Ds="ObjectSizeGreaterThan",ww="ObjectSizeGreaterThanBytes",Ls="ObjectSizeLessThan",Aw="ObjectSizeLessThanBytes",Dc="OutputSchemaVersion",_0="ObjectSize",AX="ObjectVersionId",kX="Objects",Oe="Prefix",IX="PublicAccessBlockConfiguration",nl="PartsCount",ef="PartitionDateSource",RX="ParquetInput",rs="PartNumber",sa="PartNumberMarker",ao="PartitionedPrefix",tf="Payer",rh="Part",w0="Parquet",Nu="Parts",hi="Permission",ia="Protocol",Ma="Priority",wd="Quiet",nf="QueueArn",Jg="QueueConfiguration",eb="QueueConfigurations",kw="QuoteCharacter",Iw="QuoteEscapeCharacter",BX="QuoteFields",tb="Queue",Rw="Range",oo="RedirectAllRequestsTo",xn="RequestCharged",Bw="ResponseCacheControl",Pw="ResponseContentDisposition",Nw="ResponseContentEncoding",Ow="ResponseContentLanguage",Dw="ResponseContentType",PX="ReplicationConfiguration",ay="RecordDelimiter",Lw="ResponseExpires",NX="RecordExpirationDays",A0="RestoreExpiryDate",mi="RecordExpiration",rf="ReplicaKmsKeyID",sf="ReplaceKeyPrefixWith",af="ReplaceKeyWith",co="ReplicaModifications",OX="ReplicaModificationsStatus",DX="RestoreOutputPath",Yt="RequestPayer",Lc="RestrictPublicBuckets",LX="RequestPaymentConfiguration",of="RequestProgress",MX="RequestRoute",FX="ReplicationRuleAndOperator",zX="ReplicationRuleFilter",UX="ReplicationRuleStatus",$X="RestoreRequestType",HX="ReplicationRule",qX="RestoreRequest",ec="RoutingRules",sh="RoutingRule",jX="RenameSource",oy="ReplicationStatus",Mc="RestoreStatus",WX="RequestToken",GX="ReplicationTimeStatus",VX="ReplicationTimeValue",lo="ReplicationTime",Fc="RetainUntilDate",cy="Restore",uo="Redirect",cf="Role",is="Rule",zs="Rules",Ue="Status",lf="StartAfter",k0="SecretAccessKey",I0="SseAlgorithm",Ms="S3BucketDestination",Tt="StorageClass",fo="StorageClassAnalysis",KX="StorageClassAnalysisDataExport",YX="StorageClassAnalysisSchemaVersion",Rx="StatusCode",Bx="SkipDestinationValidation",XX="SourceIfMatch",Px="SourceIfModifiedSince",QX="SourceIfNoneMatch",Nx="SourceIfUnmodifiedSince",ih="SSE-KMS",ho="SseKmsEncryptedObjects",ZX="SseKmsEncryptedObjectsStatus",JX="S3KeyFilter",nb="S3Key",eQ="S3Location",tQ="SessionMode",nQ="SelectObjectContentRequest",uf="SelectParameters",mo="SimplePrefix",df="ScanRange",ah="SSE-S3",go="SourceSelectionCriteria",zr="ServerSideEncryption",zc="SSEAlgorithm",rQ="ServerSideEncryptionByDefault",sQ="ServerSideEncryptionConfiguration",rr="SSECustomerAlgorithm",Xs="SSECustomerKey",sr="SSECustomerKeyMD5",rb="SSEKMS",ya="SSEKMSEncryptionContext",wr="SSEKMSKeyId",iQ="ServerSideEncryptionRule",sb="SSES3",R0="SessionToken",aQ="S3TablesBucketArn",ff="S3TablesDestination",B0="S3TablesDestinationResult",oQ="S3TablesName",P0="S3",Uc="Schedule",Ad="Setting",Sr="Size",kd="Start",hf="Suffix",bo="Tagging",mf="TopicArn",Ri="TableArn",gf="TargetBucket",Bi="TableBucketArn",N0="TableBucketType",oh="TagCount",ib="TopicConfiguration",ab="TopicConfigurations",cQ="TaggingDirective",ly="TransitionDefaultMinimumObjectSize",tc="TargetGrants",lQ="TargetGrant",Fs="TableName",$c="TableNamespace",po="TargetObjectKeyFormat",bf="TargetPrefix",uQ="TotalPartsCount",Hs="TagSet",dQ="TableSseAlgorithm",Mw="TransitionStorageClass",Hc="TableStatus",xt="Tag",Mr="Tags",Fw="Tier",ob="Tierings",cb="Tiering",qc="Time",zw="Token",lb="Topic",ub="Transitions",db="Transition",as="Type",Ox="Upload",os="UploadId",pf="UploadIdMarker",fQ="UserMetadata",yf="URI",Dx="Uploads",Lx="Version",Uw="VersionCount",hQ="VersioningConfiguration",wt="VersionId",Ef="VersionIdMarker",bs="Value",Mx="Versions",mQ="WebsiteConfiguration",Fx="WriteOffsetBytes",Hu="WebsiteRedirectLocation",Fa="Years",Fh="analytics",$w="accelerate",zh="acl",Hw="accept-ranges",gQ="attributes",bQ="bucket-region",uy="cors",qu="cache-control",ju="content-disposition",Wu="content-encoding",Gu="content-language",So="content-length",Dn="content-md5",qw="content-range",Vu="content-type",Do="continuation-token",pQ="delete",Uh="delimiter",_o="expires",dy="encryption",$h="encoding-type",Hh="etag",jw="expiresstring",yQ="fetch-owner",Us="id",Sl="if-match",fy="if-modified-since",qh="inventory",Ku="if-none-match",jh="intelligent-tiering",hy="if-unmodified-since",Ww="key-marker",my="lifecycle",Gw="legal-hold",rl="last-modified",Vw="location",Kw="logging",EQ="list-type",Wh="metrics",gy="metadataConfiguration",CQ="metadataInventoryTable",xQ="metadataJournalTable",by="metadataTable",vQ="marker",TQ="max-buckets",SQ="max-directory-buckets",ir="member",py="max-keys",_Q="max-parts",wQ="max-uploads",Yw="notification",yy="ownershipControls",Xw="object-lock",Ey="policy",Cy="publicAccessBlock",Gh="partNumber",AQ="policyStatus",kQ="part-number-marker",Yu="prefix",xy="replication",IQ="renameObject",Qw="requestPayment",Zw="range",Jw="response-cache-control",e2="response-content-disposition",t2="response-content-encoding",n2="response-content-language",r2="response-content-type",s2="response-expires",RQ="restore",i2="retention",BQ="session",PQ="start-after",NQ="select",OQ="select-type",_l="tagging",DQ="torrent",a2="uploads",Xu="uploadId",LQ="upload-id-marker",o2="versioning",us="versionId",Ht='<?xml version="1.0" encoding="UTF-8"?>',MQ="versions",FQ="version-id-marker",vy="website",zx="xsi:type",wl="x-amz-acl",ch="x-amz-abort-date",Ux="x-amz-access-point-alias",c2="x-amz-abort-rule-id",zQ="x-amz-archive-status",l2="x-amz-bucket-arn",Ty="x-amz-bypass-governance-retention",UQ="x-amz-bucket-location-name",$Q="x-amz-bucket-location-type",HQ="x-amz-bucket-object-lock-enabled",u2="x-amz-bucket-object-lock-token",qQ="x-amz-bucket-region",Sy="x-amz-checksum-algorithm",Lo="x-amz-checksum-crc32",Mo="x-amz-checksum-crc32c",Fo="x-amz-checksum-crc64nvme",d2="x-amz-checksum-mode",jQ="x-amz-confirm-remove-self-bucket-access",zo="x-amz-checksum-sha1",Uo="x-amz-checksum-sha256",f2="x-amz-copy-source",h2="x-amz-copy-source-if-match",m2="x-amz-copy-source-if-modified-since",g2="x-amz-copy-source-if-none-match",b2="x-amz-copy-source-if-unmodified-since",WQ="x-amz-create-session-mode",GQ="x-amz-copy-source-range",p2="x-amz-copy-source-server-side-encryption-customer-algorithm",y2="x-amz-copy-source-server-side-encryption-customer-key",E2="x-amz-copy-source-server-side-encryption-customer-key-md5",C2="x-amz-copy-source-version-id",Al="x-amz-checksum-type",VQ="x-amz-client-token",ha="x-amz-delete-marker",Qu="x-amz-expiration",Ie="x-amz-expected-bucket-owner",KQ="x-amz-fwd-error-code",YQ="x-amz-fwd-error-message",XQ="x-amz-fwd-header-accept-ranges",QQ="x-amz-fwd-header-cache-control",ZQ="x-amz-fwd-header-content-disposition",JQ="x-amz-fwd-header-content-encoding",eZ="x-amz-fwd-header-content-language",tZ="x-amz-fwd-header-content-range",nZ="x-amz-fwd-header-content-type",rZ="x-amz-fwd-header-etag",sZ="x-amz-fwd-header-expires",iZ="x-amz-fwd-header-last-modified",aZ="x-amz-fwd-header-x-amz-checksum-crc32",oZ="x-amz-fwd-header-x-amz-checksum-crc32c",cZ="x-amz-fwd-header-x-amz-checksum-crc64nvme",lZ="x-amz-fwd-header-x-amz-checksum-sha1",uZ="x-amz-fwd-header-x-amz-checksum-sha256",dZ="x-amz-fwd-header-x-amz-delete-marker",fZ="x-amz-fwd-header-x-amz-expiration",hZ="x-amz-fwd-header-x-amz-missing-meta",mZ="x-amz-fwd-header-x-amz-mp-parts-count",gZ="x-amz-fwd-header-x-amz-object-lock-legal-hold",bZ="x-amz-fwd-header-x-amz-object-lock-mode",pZ="x-amz-fwd-header-x-amz-object-lock-retain-until-date",yZ="x-amz-fwd-header-x-amz-restore",EZ="x-amz-fwd-header-x-amz-request-charged",CZ="x-amz-fwd-header-x-amz-replication-status",xZ="x-amz-fwd-header-x-amz-storage-class",vZ="x-amz-fwd-header-x-amz-server-side-encryption",TZ="x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id",SZ="x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled",_Z="x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm",wZ="x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5",AZ="x-amz-fwd-header-x-amz-tagging-count",kZ="x-amz-fwd-header-x-amz-version-id",IZ="x-amz-fwd-status",kl="x-amz-grant-full-control",Il="x-amz-grant-read",Rl="x-amz-grant-read-acp",_y="x-amz-grant-write",Bl="x-amz-grant-write-acp",RZ="x-amz-if-match-initiated-time",BZ="x-amz-if-match-last-modified-time",PZ="x-amz-if-match-size",wy="x-amz-mfa",NZ="x-amz-metadata-directive",lh="x-amz-missing-meta",OZ="x-amz-mp-object-size",DZ="x-amz-max-parts",uh="x-amz-mp-parts-count",LZ="x-amz-object-attributes",Zu="x-amz-object-lock-legal-hold",Ju="x-amz-object-lock-mode",wo="x-amz-object-lock-retain-until-date",MZ="x-amz-object-ownership",Ay="x-amz-optional-object-attributes",$x="x-amz-object-size",FZ="x-amz-part-number-marker",x2="x-amz-restore",Tn="x-amz-request-charged",zZ="x-amz-restore-output-path",Xt="x-amz-request-payer",UZ="x-amz-request-route",$Z="x-amz-rename-source",v2="x-amz-replication-status",HZ="x-amz-rename-source-if-match",qZ="x-amz-rename-source-if-modified-since",jZ="x-amz-rename-source-if-none-match",WZ="x-amz-rename-source-if-unmodified-since",GZ="x-amz-request-token",ed="x-amz-storage-class",pn="x-amz-sdk-checksum-algorithm",VZ="x-amz-skip-destination-validation",T2="x-amz-source-expected-bucket-owner",Cs="x-amz-server-side-encryption",xs="x-amz-server-side-encryption-aws-kms-key-id",Mn="x-amz-server-side-encryption-bucket-key-enabled",Ea="x-amz-server-side-encryption-context",Cr="x-amz-server-side-encryption-customer-algorithm",Qs="x-amz-server-side-encryption-customer-key",xr="x-amz-server-side-encryption-customer-key-md5",ky="x-amz-tagging",dh="x-amz-tagging-count",KZ="x-amz-tagging-directive",Iy="x-amz-transition-default-minimum-object-size",yi="x-amz-version-id",YZ="x-amz-write-offset-bytes",td="x-amz-website-redirect-location",vr="x-id";class S2 extends Ee.classBuilder().ep({...Te,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(Qz,Xz).ser(MU).de(N$).build(){}const XZ="3.873.0",QZ={version:XZ};function Hx(e){return typeof e=="string"?e.length===0:e.byteLength===0}var _2={name:"SHA-1"},qx={name:"HMAC",hash:_2},ZZ=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const JZ={};function aa(){return typeof window<"u"?window:typeof self<"u"?self:JZ}var eJ=(function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){aa().crypto.subtle.importKey("raw",jx(t),qx,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!Hx(t)){var n=jx(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return aa().crypto.subtle.sign(qx,n,t.toHash).then(function(r){return new Uint8Array(r)})}):Hx(this.toHash)?Promise.resolve(ZZ):Promise.resolve().then(function(){return aa().crypto.subtle.digest(_2,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e})();function jx(e){return typeof e=="string"?JS(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var tJ=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function w2(e){if(nJ(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return rJ(t)}return!1}function nJ(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function rJ(e){return e&&tJ.every(function(t){return typeof e[t]=="function"})}var sJ=(function(){function e(t){if(w2(aa()))this.hash=new eJ(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(ua(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})(),A2={name:"SHA-256"},Wx={name:"HMAC",hash:A2},iJ=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]),aJ=(function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!Iu(t)){var n=ua(t),r=new Uint8Array(this.toHash.byteLength+n.byteLength);r.set(this.toHash,0),r.set(n,this.toHash.byteLength),this.toHash=r}},e.prototype.digest=function(){var t=this;return this.key?this.key.then(function(n){return aa().crypto.subtle.sign(Wx,n,t.toHash).then(function(r){return new Uint8Array(r)})}):Iu(this.toHash)?Promise.resolve(iJ):Promise.resolve().then(function(){return aa().crypto.subtle.digest(A2,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){var t=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(n,r){aa().crypto.subtle.importKey("raw",ua(t.secret),Wx,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))},e})(),_s=64,oJ=32,cJ=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),lJ=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],uJ=Math.pow(2,53)-1,Cf=(function(){function e(){this.state=Int32Array.from(lJ),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return e.prototype.update=function(t){if(this.finished)throw new Error("Attempted to update an already finished hash.");var n=0,r=t.byteLength;if(this.bytesHashed+=r,this.bytesHashed*8>uJ)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===_s&&(this.hashBuffer(),this.bufferLength=0)},e.prototype.digest=function(){if(!this.finished){var t=this.bytesHashed*8,n=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),r=this.bufferLength;if(n.setUint8(this.bufferLength++,128),r%_s>=_s-8){for(var s=this.bufferLength;s<_s;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<_s-8;s++)n.setUint8(s,0);n.setUint32(_s-8,Math.floor(t/4294967296),!0),n.setUint32(_s-4,t),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(oJ),s=0;s<8;s++)i[s*4]=this.state[s]>>>24&255,i[s*4+1]=this.state[s]>>>16&255,i[s*4+2]=this.state[s]>>>8&255,i[s*4+3]=this.state[s]>>>0&255;return i},e.prototype.hashBuffer=function(){for(var t=this,n=t.buffer,r=t.state,s=r[0],i=r[1],a=r[2],o=r[3],c=r[4],l=r[5],d=r[6],f=r[7],m=0;m<_s;m++){if(m<16)this.temp[m]=(n[m*4]&255)<<24|(n[m*4+1]&255)<<16|(n[m*4+2]&255)<<8|n[m*4+3]&255;else{var h=this.temp[m-2],g=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[m-15];var b=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[m]=(g+this.temp[m-7]|0)+(b+this.temp[m-16]|0)}var p=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&l^~c&d)|0)+(f+(cJ[m]+this.temp[m]|0)|0)|0,y=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&a^i&a)|0;f=d,d=l,l=c,c=o+p|0,o=a,a=i,i=s,s=p+y|0}r[0]+=s,r[1]+=i,r[2]+=a,r[3]+=o,r[4]+=c,r[5]+=l,r[6]+=d,r[7]+=f},e})(),dJ=(function(){function e(t){this.secret=t,this.hash=new Cf,this.reset()}return e.prototype.update=function(t){if(!(Iu(t)||this.error))try{this.hash.update(ua(t))}catch(n){this.error=n}},e.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},e.prototype.digest=function(){return yp(this,void 0,void 0,function(){return Ep(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new Cf,this.secret){this.outer=new Cf;var t=fJ(this.secret),n=new Uint8Array(_s);n.set(t);for(var r=0;r<_s;r++)t[r]^=54,n[r]^=92;this.hash.update(t),this.outer.update(n);for(var r=0;r<t.byteLength;r++)t[r]=0}},e})();function fJ(e){var t=ua(e);if(t.byteLength>_s){var n=new Cf;n.update(t),t=n.digest()}var r=new Uint8Array(_s);return r.set(t),r}var hJ=(function(){function e(t){w2(aa())?this.hash=new aJ(t):this.hash=new dJ(t)}return e.prototype.update=function(t,n){this.hash.update(ua(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e})();const mJ={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},k2={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},In={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},Wr={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ji={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class ge{static getFirstMatch(t,n){const r=n.match(t);return r&&r.length>0&&r[1]||""}static getSecondMatch(t,n){const r=n.match(t);return r&&r.length>1&&r[2]||""}static matchAndReturnConst(t,n,r){if(t.test(n))return r}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),n[0]===10)switch(n[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){const n=t.split(".").splice(0,2).map(r=>parseInt(r,10)||0);if(n.push(0),!(n[0]===1&&n[1]<5)){if(n[0]===1&&n[1]<6)return"Cupcake";if(n[0]===1&&n[1]>=6)return"Donut";if(n[0]===2&&n[1]<2)return"Eclair";if(n[0]===2&&n[1]===2)return"Froyo";if(n[0]===2&&n[1]>2)return"Gingerbread";if(n[0]===3)return"Honeycomb";if(n[0]===4&&n[1]<1)return"Ice Cream Sandwich";if(n[0]===4&&n[1]<4)return"Jelly Bean";if(n[0]===4&&n[1]>=4)return"KitKat";if(n[0]===5)return"Lollipop";if(n[0]===6)return"Marshmallow";if(n[0]===7)return"Nougat";if(n[0]===8)return"Oreo";if(n[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,n,r=!1){const s=ge.getVersionPrecision(t),i=ge.getVersionPrecision(n);let a=Math.max(s,i),o=0;const c=ge.map([t,n],l=>{const d=a-ge.getVersionPrecision(l),f=l+new Array(d+1).join(".0");return ge.map(f.split("."),m=>new Array(20-m.length).join("0")+m).reverse()});for(r&&(o=a-Math.min(s,i)),a-=1;a>=o;){if(c[0][a]>c[1][a])return 1;if(c[0][a]===c[1][a]){if(a===o)return 0;a-=1}else if(c[0][a]<c[1][a])return-1}}static map(t,n){const r=[];let s;if(Array.prototype.map)return Array.prototype.map.call(t,n);for(s=0;s<t.length;s+=1)r.push(n(t[s]));return r}static find(t,n){let r,s;if(Array.prototype.find)return Array.prototype.find.call(t,n);for(r=0,s=t.length;r<s;r+=1){const i=t[r];if(n(i,r))return i}}static assign(t,...n){const r=t;let s,i;if(Object.assign)return Object.assign(t,...n);for(s=0,i=n.length;s<i;s+=1){const a=n[s];typeof a=="object"&&a!==null&&Object.keys(a).forEach(c=>{r[c]=a[c]})}return t}static getBrowserAlias(t){return mJ[t]}static getBrowserTypeByAlias(t){return k2[t]||""}}const en=/version\/(\d+(\.?_?\d+)+)/i,gJ=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=ge.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=ge.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){const t={name:"NAVER Whale Browser"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe(e){const t={name:"Pale Moon"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=ge.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=ge.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=ge.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){const t={name:"Opera Touch"},n=ge.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=ge.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){const t={name:"K-Meleon"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=ge.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){const t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=ge.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=ge.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=ge.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){const t={name:"Microsoft Edge"},n=ge.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=ge.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=ge.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=ge.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){const t={name:"Amazon Silk"},n=ge.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=ge.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=ge.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t={name:"BlackBerry"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){const t={name:"WebOS Browser"},n=ge.getFirstMatch(en,e)||ge.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){const t={name:"Bada"},n=ge.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=ge.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=ge.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=ge.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){const t={name:"Electron"},n=ge.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=ge.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=ge.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=ge.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){const t={name:"Google Search"},n=ge.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t={name:"Android Browser"},n=ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=ge.getFirstMatch(en,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,s=e.search("\\(")!==-1?n:t;return{name:ge.getFirstMatch(s,e),version:ge.getSecondMatch(s,e)}}}],bJ=[{test:[/Roku\/DVP/],describe(e){const t=ge.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Wr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=ge.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Wr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=ge.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=ge.getWindowsVersionName(t);return{name:Wr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Wr.iOS},n=ge.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=ge.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=ge.getMacOSVersionName(t),r={name:Wr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=ge.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Wr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=ge.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=ge.getAndroidVersionName(t),r={name:Wr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=ge.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Wr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=ge.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||ge.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||ge.getFirstMatch(/\bbb(\d+)/i,e);return{name:Wr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=ge.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Wr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=ge.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Wr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Wr.Linux}}},{test:[/CrOS/],describe(){return{name:Wr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=ge.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Wr.PlayStation4,version:t}}}],pJ=[{test:[/googlebot/i],describe(){return{type:In.bot,vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=ge.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:In.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:In.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:In.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:In.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:In.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:In.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:In.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=ge.getFirstMatch(/(ipod|iphone)/i,e);return{type:In.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:In.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe(e){const t=ge.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:In.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe(){return{type:In.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:In.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:In.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:In.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:In.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:In.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:In.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:In.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:In.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:In.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:In.tv}}}],yJ=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:ji.Blink};const n=ge.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ji.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:ji.Trident},n=ge.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:ji.Presto},n=ge.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){const t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){const t={name:ji.Gecko},n=ge.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ji.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:ji.WebKit},n=ge.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class Gx{constructor(t,n=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},n!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const t=ge.find(gJ,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const t=ge.find(bJ,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){const{name:n}=this.getOS();return t?String(n).toLowerCase()||"":n||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){const{type:n}=this.getPlatform();return t?String(n).toLowerCase()||"":n||""}parsePlatform(){this.parsedResult.platform={};const t=ge.find(pJ,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const t=ge.find(yJ,n=>{if(typeof n.test=="function")return n.test(this);if(Array.isArray(n.test))return n.test.some(r=>this.test(r));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return ge.assign({},this.parsedResult)}satisfies(t){const n={};let r=0;const s={};let i=0;if(Object.keys(t).forEach(o=>{const c=t[o];typeof c=="string"?(s[o]=c,i+=1):typeof c=="object"&&(n[o]=c,r+=1)}),r>0){const o=Object.keys(n),c=ge.find(o,d=>this.isOS(d));if(c){const d=this.satisfies(n[c]);if(d!==void 0)return d}const l=ge.find(o,d=>this.isPlatform(d));if(l){const d=this.satisfies(n[l]);if(d!==void 0)return d}}if(i>0){const o=Object.keys(s),c=ge.find(o,l=>this.isBrowser(l,!0));if(c!==void 0)return this.compareVersion(s[c])}}isBrowser(t,n=!1){const r=this.getBrowserName().toLowerCase();let s=t.toLowerCase();const i=ge.getBrowserTypeByAlias(s);return n&&i&&(s=i.toLowerCase()),s===r}compareVersion(t){let n=[0],r=t,s=!1;const i=this.getBrowserVersion();if(typeof i=="string")return t[0]===">"||t[0]==="<"?(r=t.substr(1),t[1]==="="?(s=!0,r=t.substr(2)):n=[],t[0]===">"?n.push(1):n.push(-1)):t[0]==="="?r=t.substr(1):t[0]==="~"&&(s=!0,r=t.substr(1)),n.indexOf(ge.compareVersions(i,r,s))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,n=!1){return this.isBrowser(t,n)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(n=>this.is(n))}}/*!
1581
+ * Bowser - a browser detector
1582
+ * https://github.com/lancedikson/bowser
1583
+ * MIT License | (c) Dustin Diaz 2012-2015
1584
+ * MIT License | (c) Denis Demchenko 2015-2019
1585
+ */class I2{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Gx(t,n)}static parse(t){return new Gx(t).getResult()}static get BROWSER_MAP(){return k2}static get ENGINE_MAP(){return ji}static get OS_MAP(){return Wr}static get PLATFORMS_MAP(){return In}}const EJ=({serviceId:e,clientVersion:t})=>async n=>{const r=typeof window<"u"&&window?.navigator?.userAgent?I2.parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",t],["ua","2.1"],[`os/${r?.os?.name||"other"}`,r?.os?.version],["lang/js"],["md/browser",`${r?.browser?.name??"unknown"}_${r?.browser?.version??"unknown"}`]];e&&s.push([`api/${e}`,t]);const i=await n?.userAgentAppId?.();return i&&s.push([`app/${i}`]),s};class fu{constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);const n=new Uint8Array(8);for(let r=7,s=Math.abs(Math.round(t));r>-1&&s>0;r--,s/=256)n[r]=s;return t<0&&Vx(n),new fu(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&Vx(t),parseInt(ts(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function Vx(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class CJ{constructor(t,n){this.toUtf8=t,this.fromUtf8=n}format(t){const n=[];for(const i of Object.keys(t)){const a=this.fromUtf8(i);n.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[i]))}const r=new Uint8Array(n.reduce((i,a)=>i+a.byteLength,0));let s=0;for(const i of n)r.set(i,s),s+=i.byteLength;return r}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":const n=new DataView(new ArrayBuffer(3));return n.setUint8(0,3),n.setInt16(1,t.value,!1),new Uint8Array(n.buffer);case"integer":const r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,t.value,!1),new Uint8Array(r.buffer);case"long":const s=new Uint8Array(9);return s[0]=5,s.set(t.value.bytes,1),s;case"binary":const i=new DataView(new ArrayBuffer(3+t.value.byteLength));i.setUint8(0,6),i.setUint16(1,t.value.byteLength,!1);const a=new Uint8Array(i.buffer);return a.set(t.value,3),a;case"string":const o=this.fromUtf8(t.value),c=new DataView(new ArrayBuffer(3+o.byteLength));c.setUint8(0,7),c.setUint16(1,o.byteLength,!1);const l=new Uint8Array(c.buffer);return l.set(o,3),l;case"timestamp":const d=new Uint8Array(9);return d[0]=8,d.set(fu.fromNumber(t.value.valueOf()).bytes,1),d;case"uuid":if(!IJ.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(NS(t.value.replace(/\-/g,"")),1),f}}parse(t){const n={};let r=0;for(;r<t.byteLength;){const s=t.getUint8(r++),i=this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+r,s));switch(r+=s,t.getUint8(r++)){case 0:n[i]={type:Yx,value:!0};break;case 1:n[i]={type:Yx,value:!1};break;case 2:n[i]={type:xJ,value:t.getInt8(r++)};break;case 3:n[i]={type:vJ,value:t.getInt16(r,!1)},r+=2;break;case 4:n[i]={type:TJ,value:t.getInt32(r,!1)},r+=4;break;case 5:n[i]={type:SJ,value:new fu(new Uint8Array(t.buffer,t.byteOffset+r,8))},r+=8;break;case 6:const a=t.getUint16(r,!1);r+=2,n[i]={type:_J,value:new Uint8Array(t.buffer,t.byteOffset+r,a)},r+=a;break;case 7:const o=t.getUint16(r,!1);r+=2,n[i]={type:wJ,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+r,o))},r+=o;break;case 8:n[i]={type:AJ,value:new Date(new fu(new Uint8Array(t.buffer,t.byteOffset+r,8)).valueOf())},r+=8;break;case 9:const c=new Uint8Array(t.buffer,t.byteOffset+r,16);r+=16,n[i]={type:kJ,value:`${ts(c.subarray(0,4))}-${ts(c.subarray(4,6))}-${ts(c.subarray(6,8))}-${ts(c.subarray(8,10))}-${ts(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return n}}var Kx;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(Kx||(Kx={}));const Yx="boolean",xJ="byte",vJ="short",TJ="integer",SJ="long",_J="binary",wJ="string",AJ="timestamp",kJ="uuid",IJ=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,R2=4,Wi=R2*2,_a=4,RJ=Wi+_a*2;function BJ({byteLength:e,byteOffset:t,buffer:n}){if(e<RJ)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),s=r.getUint32(0,!1);if(e!==s)throw new Error("Reported message length does not match received message length");const i=r.getUint32(R2,!1),a=r.getUint32(Wi,!1),o=r.getUint32(e-_a,!1),c=new jf().update(new Uint8Array(n,t,Wi));if(a!==c.digest())throw new Error(`The prelude checksum specified in the message (${a}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+Wi,e-(Wi+_a))),o!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${o}`);return{headers:new DataView(n,t+Wi+_a,i),body:new Uint8Array(n,t+Wi+_a+i,s-i-(Wi+_a+_a))}}class PJ{constructor(t,n){this.headerMarshaller=new CJ(t,n),this.messageBuffer=[],this.isEndOfStream=!1}feed(t){this.messageBuffer.push(this.decode(t))}endOfStream(){this.isEndOfStream=!0}getMessage(){const t=this.messageBuffer.pop(),n=this.isEndOfStream;return{getMessage(){return t},isEndOfStream(){return n}}}getAvailableMessages(){const t=this.messageBuffer;this.messageBuffer=[];const n=this.isEndOfStream;return{getMessages(){return t},isEndOfStream(){return n}}}encode({headers:t,body:n}){const r=this.headerMarshaller.format(t),s=r.byteLength+n.byteLength+16,i=new Uint8Array(s),a=new DataView(i.buffer,i.byteOffset,i.byteLength),o=new jf;return a.setUint32(0,s,!1),a.setUint32(4,r.byteLength,!1),a.setUint32(8,o.update(i.subarray(0,8)).digest(),!1),i.set(r,12),i.set(n,r.byteLength+12),a.setUint32(s-4,o.update(i.subarray(8,s-4)).digest(),!1),i}decode(t){const{headers:n,body:r}=BJ(t);return{headers:this.headerMarshaller.parse(n),body:r}}formatHeaders(t){return this.headerMarshaller.format(t)}}class NJ{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.decoder.decode(t)}}class OJ{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream)yield this.options.encoder.encode(t);this.options.includeEndFrame&&(yield new Uint8Array(0))}}class DJ{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.messageStream){const n=await this.options.deserializer(t);n!==void 0&&(yield n)}}}class LJ{constructor(t){this.options=t}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const t of this.options.inputStream)yield this.options.serializer(t)}}function MJ(e){let t=0,n=0,r=null,s=null;const i=o=>{if(typeof o!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+o);t=o,n=4,r=new Uint8Array(o),new DataView(r.buffer).setUint32(0,o,!1)},a=async function*(){const o=e[Symbol.asyncIterator]();for(;;){const{value:c,done:l}=await o.next();if(l){if(t)if(t===n)yield r;else throw new Error("Truncated event message received.");else return;return}const d=c.length;let f=0;for(;f<d;){if(!r){const h=d-f;s||(s=new Uint8Array(4));const g=Math.min(4-n,h);if(s.set(c.slice(f,f+g),n),n+=g,f+=g,n<4)break;i(new DataView(s.buffer).getUint32(0,!1)),s=null}const m=Math.min(t-n,d-f);r.set(c.slice(f,f+m),n),n+=m,f+=m,t&&t===n&&(yield r,r=null,t=0,n=0)}}};return{[Symbol.asyncIterator]:a}}function FJ(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if(r==="error"){const s=new Error(n.headers[":error-message"].value||"UnknownError");throw s.name=n.headers[":error-code"].value,s}else if(r==="exception"){const s=n.headers[":exception-type"].value,i={[s]:n},a=await e(i);if(a.$unknown){const o=new Error(t(n.body));throw o.name=s,o}throw a[s]}else if(r==="event"){const s={[n.headers[":event-type"].value]:n},i=await e(s);return i.$unknown?void 0:i}else throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}let zJ=class{constructor({utf8Encoder:t,utf8Decoder:n}){this.eventStreamCodec=new PJ(t,n),this.utfEncoder=t}deserialize(t,n){const r=MJ(t);return new DJ({messageStream:new NJ({inputStream:r,decoder:this.eventStreamCodec}),deserializer:FJ(n,this.utfEncoder)})}serialize(t,n){return new OJ({messageStream:new LJ({inputStream:t,serializer:n}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const UJ=e=>({[Symbol.asyncIterator]:async function*(){const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}}),$J=e=>{const t=e[Symbol.asyncIterator]();return new ReadableStream({async pull(n){const{done:r,value:s}=await t.next();if(r)return n.close();n.enqueue(s)}})};class HJ{constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new zJ({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=qJ(t)?UJ(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?$J(r):r}}const qJ=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,jJ=e=>new HJ(e);async function WJ(e,t,n=1024*1024){const r=e.size;let s=0;for(;s<r;){const i=e.slice(s,Math.min(r,s+n));t(new Uint8Array(await i.arrayBuffer())),s+=i.size}}const GJ=async function(t,n){const r=new t;return await WJ(n,s=>{r.update(s)}),r.digest()},VJ=e=>()=>Promise.reject(e),Hi=64,KJ=16,YJ=[1732584193,4023233417,2562383102,271733878];class XJ{constructor(){this.reset()}update(t){if(QJ(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=ZJ(t);let r=0,{byteLength:s}=n;for(this.bytesHashed+=s;s>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),s--,this.bufferLength===Hi&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:n,bufferLength:r,bytesHashed:s}=this,i=s*8;if(n.setUint8(this.bufferLength++,128),r%Hi>=Hi-8){for(let a=this.bufferLength;a<Hi;a++)n.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(let a=this.bufferLength;a<Hi-8;a++)n.setUint8(a,0);n.setUint32(Hi-8,i>>>0,!0),n.setUint32(Hi-4,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(KJ));for(let n=0;n<4;n++)t.setUint32(n*4,this.state[n],!0);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}hashBuffer(){const{buffer:t,state:n}=this;let r=n[0],s=n[1],i=n[2],a=n[3];r=Ar(r,s,i,a,t.getUint32(0,!0),7,3614090360),a=Ar(a,r,s,i,t.getUint32(4,!0),12,3905402710),i=Ar(i,a,r,s,t.getUint32(8,!0),17,606105819),s=Ar(s,i,a,r,t.getUint32(12,!0),22,3250441966),r=Ar(r,s,i,a,t.getUint32(16,!0),7,4118548399),a=Ar(a,r,s,i,t.getUint32(20,!0),12,1200080426),i=Ar(i,a,r,s,t.getUint32(24,!0),17,2821735955),s=Ar(s,i,a,r,t.getUint32(28,!0),22,4249261313),r=Ar(r,s,i,a,t.getUint32(32,!0),7,1770035416),a=Ar(a,r,s,i,t.getUint32(36,!0),12,2336552879),i=Ar(i,a,r,s,t.getUint32(40,!0),17,4294925233),s=Ar(s,i,a,r,t.getUint32(44,!0),22,2304563134),r=Ar(r,s,i,a,t.getUint32(48,!0),7,1804603682),a=Ar(a,r,s,i,t.getUint32(52,!0),12,4254626195),i=Ar(i,a,r,s,t.getUint32(56,!0),17,2792965006),s=Ar(s,i,a,r,t.getUint32(60,!0),22,1236535329),r=kr(r,s,i,a,t.getUint32(4,!0),5,4129170786),a=kr(a,r,s,i,t.getUint32(24,!0),9,3225465664),i=kr(i,a,r,s,t.getUint32(44,!0),14,643717713),s=kr(s,i,a,r,t.getUint32(0,!0),20,3921069994),r=kr(r,s,i,a,t.getUint32(20,!0),5,3593408605),a=kr(a,r,s,i,t.getUint32(40,!0),9,38016083),i=kr(i,a,r,s,t.getUint32(60,!0),14,3634488961),s=kr(s,i,a,r,t.getUint32(16,!0),20,3889429448),r=kr(r,s,i,a,t.getUint32(36,!0),5,568446438),a=kr(a,r,s,i,t.getUint32(56,!0),9,3275163606),i=kr(i,a,r,s,t.getUint32(12,!0),14,4107603335),s=kr(s,i,a,r,t.getUint32(32,!0),20,1163531501),r=kr(r,s,i,a,t.getUint32(52,!0),5,2850285829),a=kr(a,r,s,i,t.getUint32(8,!0),9,4243563512),i=kr(i,a,r,s,t.getUint32(28,!0),14,1735328473),s=kr(s,i,a,r,t.getUint32(48,!0),20,2368359562),r=Ir(r,s,i,a,t.getUint32(20,!0),4,4294588738),a=Ir(a,r,s,i,t.getUint32(32,!0),11,2272392833),i=Ir(i,a,r,s,t.getUint32(44,!0),16,1839030562),s=Ir(s,i,a,r,t.getUint32(56,!0),23,4259657740),r=Ir(r,s,i,a,t.getUint32(4,!0),4,2763975236),a=Ir(a,r,s,i,t.getUint32(16,!0),11,1272893353),i=Ir(i,a,r,s,t.getUint32(28,!0),16,4139469664),s=Ir(s,i,a,r,t.getUint32(40,!0),23,3200236656),r=Ir(r,s,i,a,t.getUint32(52,!0),4,681279174),a=Ir(a,r,s,i,t.getUint32(0,!0),11,3936430074),i=Ir(i,a,r,s,t.getUint32(12,!0),16,3572445317),s=Ir(s,i,a,r,t.getUint32(24,!0),23,76029189),r=Ir(r,s,i,a,t.getUint32(36,!0),4,3654602809),a=Ir(a,r,s,i,t.getUint32(48,!0),11,3873151461),i=Ir(i,a,r,s,t.getUint32(60,!0),16,530742520),s=Ir(s,i,a,r,t.getUint32(8,!0),23,3299628645),r=Rr(r,s,i,a,t.getUint32(0,!0),6,4096336452),a=Rr(a,r,s,i,t.getUint32(28,!0),10,1126891415),i=Rr(i,a,r,s,t.getUint32(56,!0),15,2878612391),s=Rr(s,i,a,r,t.getUint32(20,!0),21,4237533241),r=Rr(r,s,i,a,t.getUint32(48,!0),6,1700485571),a=Rr(a,r,s,i,t.getUint32(12,!0),10,2399980690),i=Rr(i,a,r,s,t.getUint32(40,!0),15,4293915773),s=Rr(s,i,a,r,t.getUint32(4,!0),21,2240044497),r=Rr(r,s,i,a,t.getUint32(32,!0),6,1873313359),a=Rr(a,r,s,i,t.getUint32(60,!0),10,4264355552),i=Rr(i,a,r,s,t.getUint32(24,!0),15,2734768916),s=Rr(s,i,a,r,t.getUint32(52,!0),21,1309151649),r=Rr(r,s,i,a,t.getUint32(16,!0),6,4149444226),a=Rr(a,r,s,i,t.getUint32(44,!0),10,3174756917),i=Rr(i,a,r,s,t.getUint32(8,!0),15,718787259),s=Rr(s,i,a,r,t.getUint32(36,!0),21,3951481745),n[0]=r+n[0]&4294967295,n[1]=s+n[1]&4294967295,n[2]=i+n[2]&4294967295,n[3]=a+n[3]&4294967295}reset(){this.state=Uint32Array.from(YJ),this.buffer=new DataView(new ArrayBuffer(Hi)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function Vh(e,t,n,r,s,i){return t=(t+e&4294967295)+(r+i&4294967295)&4294967295,(t<<s|t>>>32-s)+n&4294967295}function Ar(e,t,n,r,s,i,a){return Vh(t&n|~t&r,e,t,s,i,a)}function kr(e,t,n,r,s,i,a){return Vh(t&r|n&~r,e,t,s,i,a)}function Ir(e,t,n,r,s,i,a){return Vh(t^n^r,e,t,s,i,a)}function Rr(e,t,n,r,s,i,a){return Vh(n^(t|~r),e,t,s,i,a)}function QJ(e){return typeof e=="string"?e.length===0:e.byteLength===0}function ZJ(e){return typeof e=="string"?vo(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const JJ=e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??cp,base64Encoder:e?.base64Encoder??Bh,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??z_,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??e8,httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Uz,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new kS},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new R5}],logger:e?.logger??new hp,sdkStreamMixin:e?.sdkStreamMixin??c8,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??v_,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??Gf,useArnRegion:e?.useArnRegion??void 0,utf8Decoder:e?.utf8Decoder??vo,utf8Encoder:e?.utf8Encoder??lp}),eee=["in-region","cross-region","mobile","standard","legacy"],tee=({defaultsMode:e}={})=>$8(async()=>{const t=typeof e=="function"?await e():e;switch(t?.toLowerCase()){case"auto":return Promise.resolve(nee()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${eee.join(", ")}, got ${t}`)}}),nee=()=>{const t=(typeof window<"u"&&window?.navigator?.userAgent?I2.parse(window.navigator.userAgent):void 0)?.platform?.type;return t==="tablet"||t==="mobile"},ree=e=>{const t=tee(e),n=()=>t().then(SL),r=JJ(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??pL,credentialDefaultProvider:e?.credentialDefaultProvider??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:e?.defaultUserAgentProvider??EJ({serviceId:r.serviceId,clientVersion:QZ.version}),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??jJ,maxAttempts:e?.maxAttempts??Vf,md5:e?.md5??XJ,region:e?.region??VJ("Region is missing"),requestHandler:up.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||Y9),sha1:e?.sha1??sJ,sha256:e?.sha256??hJ,streamCollector:e?.streamCollector??BS,streamHasher:e?.streamHasher??GJ,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(B9)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(P9))}},see=e=>({setRegion(t){e.region=t},region(){return e.region}}),iee=e=>({region:e.region()}),aee=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(s){const i=t.findIndex(a=>a.schemeId===s.schemeId);i===-1?t.push(s):t.splice(i,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){n=s},httpAuthSchemeProvider(){return n},setCredentials(s){r=s},credentials(){return r}}},oee=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),cee=(e,t)=>{const n=Object.assign(see(e),IL(e),E5(e),aee(e));return t.forEach(r=>r.configure(n)),Object.assign(e,iee(n),RL(n),C5(n),oee(n))};class lee extends yL{config;constructor(...[t]){const n=ree(t||{});super(n),this.initConfig=n;const r=Hz(n),s=KF(r),i=ZM(s),a=hz(i),o=N9(a),c=o,l=K9(c),d=O9(l),f=$z(d),m=OF(f,{session:[()=>this,S2]}),h=cee(m,t?.extensions||[]);this.config=h,this.middlewareStack.use(R9(this.config)),this.middlewareStack.use(Cz(this.config)),this.middlewareStack.use(M9(this.config)),this.middlewareStack.use(tF(this.config)),this.middlewareStack.use(sF(this.config)),this.middlewareStack.use(lF(this.config)),this.middlewareStack.use(D5(this.config,{httpAuthSchemeParametersProvider:Mz,identityProviderConfigProvider:async g=>new L8({"aws.auth#sigv4":g.credentials,"aws.auth#sigv4a":g.credentials})})),this.middlewareStack.use(H5(this.config)),this.middlewareStack.use(WF(this.config)),this.middlewareStack.use(_5(this.config)),this.middlewareStack.use(EF(this.config)),this.middlewareStack.use(kF(this.config)),this.middlewareStack.use(NF(this.config))}destroy(){super.destroy()}}class uee extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").f(void 0,void 0).ser(RU).de(w$).build(){}function dee(e){return t=>async n=>{const r={...n.input},s=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const i of s){const a=r[i.target];if(a){let o;typeof a=="string"?hee(a,e)?o=e.base64Decoder(a):(o=e.utf8Decoder(a),r[i.target]=e.base64Encoder(o)):(o=ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a),r[i.target]=e.base64Encoder(o));const c=new e.md5;c.update(o),r[i.hash]=e.base64Encoder(await c.digest())}}return t({...n,input:r})}}const fee={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Zs=e=>({applyToStack:t=>{t.add(dee(e),fee)}});function hee(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return t.base64Decoder(e).length===32}catch{return!1}}class mee extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").f(jz,qz).ser(BU).de(A$).build(){}class gee extends Ee.classBuilder().ep({...Te,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"},CopySource:{type:"contextParams",name:"CopySource"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r)]}).s("AmazonS3","CopyObject",{}).n("S3Client","CopyObjectCommand").f(Gz,Wz).ser(PU).de(k$).build(){}function bee(e){return t=>async n=>{const{CreateBucketConfiguration:r}=n.input,s=await e.region();return!r?.LocationConstraint&&!r?.Location&&(n={...n,input:{...n.input,CreateBucketConfiguration:s==="us-east-1"?void 0:{LocationConstraint:s}}}),t(n)}}const pee={step:"initialize",tags:["LOCATION_CONSTRAINT","CREATE_BUCKET_CONFIGURATION"],name:"locationConstraintMiddleware",override:!0},yee=e=>({applyToStack:t=>{t.add(bee(e),pee)}});class Eee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},DisableAccessPoints:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),yee(r)]}).s("AmazonS3","CreateBucket",{}).n("S3Client","CreateBucketCommand").f(void 0,void 0).ser(NU).de(I$).build(){}class Cee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","CreateBucketMetadataConfiguration",{}).n("S3Client","CreateBucketMetadataConfigurationCommand").f(void 0,void 0).ser(OU).de(R$).build(){}class xee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","CreateBucketMetadataTableConfiguration",{}).n("S3Client","CreateBucketMetadataTableConfigurationCommand").f(void 0,void 0).ser(DU).de(B$).build(){}class vee extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").f(Kz,Vz).ser(LU).de(P$).build(){}class Tee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketAnalyticsConfiguration",{}).n("S3Client","DeleteBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(zU).de(D$).build(){}class See extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucket",{}).n("S3Client","DeleteBucketCommand").f(void 0,void 0).ser(FU).de(O$).build(){}class _ee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketCors",{}).n("S3Client","DeleteBucketCorsCommand").f(void 0,void 0).ser(UU).de(L$).build(){}class wee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketEncryption",{}).n("S3Client","DeleteBucketEncryptionCommand").f(void 0,void 0).ser($U).de(M$).build(){}class Aee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketIntelligentTieringConfiguration",{}).n("S3Client","DeleteBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(HU).de(F$).build(){}class kee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketInventoryConfiguration",{}).n("S3Client","DeleteBucketInventoryConfigurationCommand").f(void 0,void 0).ser(qU).de(z$).build(){}class Iee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketLifecycle",{}).n("S3Client","DeleteBucketLifecycleCommand").f(void 0,void 0).ser(jU).de(U$).build(){}class Ree extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketMetadataConfiguration",{}).n("S3Client","DeleteBucketMetadataConfigurationCommand").f(void 0,void 0).ser(WU).de($$).build(){}class Bee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketMetadataTableConfiguration",{}).n("S3Client","DeleteBucketMetadataTableConfigurationCommand").f(void 0,void 0).ser(GU).de(H$).build(){}class Pee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketMetricsConfiguration",{}).n("S3Client","DeleteBucketMetricsConfigurationCommand").f(void 0,void 0).ser(VU).de(q$).build(){}class Nee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketOwnershipControls",{}).n("S3Client","DeleteBucketOwnershipControlsCommand").f(void 0,void 0).ser(KU).de(j$).build(){}class Oee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketPolicy",{}).n("S3Client","DeleteBucketPolicyCommand").f(void 0,void 0).ser(YU).de(W$).build(){}class Dee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketReplication",{}).n("S3Client","DeleteBucketReplicationCommand").f(void 0,void 0).ser(XU).de(G$).build(){}class Lee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketTagging",{}).n("S3Client","DeleteBucketTaggingCommand").f(void 0,void 0).ser(QU).de(V$).build(){}class Mee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketWebsite",{}).n("S3Client","DeleteBucketWebsiteCommand").f(void 0,void 0).ser(ZU).de(K$).build(){}class Fee extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").f(void 0,void 0).ser(JU).de(Y$).build(){}class zee extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Je(r)]}).s("AmazonS3","DeleteObjects",{}).n("S3Client","DeleteObjectsCommand").f(void 0,void 0).ser(e7).de(X$).build(){}class Uee extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","DeleteObjectTagging",{}).n("S3Client","DeleteObjectTaggingCommand").f(void 0,void 0).ser(t7).de(Q$).build(){}class $ee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeletePublicAccessBlock",{}).n("S3Client","DeletePublicAccessBlockCommand").f(void 0,void 0).ser(n7).de(Z$).build(){}class Hee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketAccelerateConfiguration",{}).n("S3Client","GetBucketAccelerateConfigurationCommand").f(void 0,void 0).ser(r7).de(J$).build(){}class qee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketAcl",{}).n("S3Client","GetBucketAclCommand").f(void 0,void 0).ser(s7).de(eH).build(){}class jee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketAnalyticsConfiguration",{}).n("S3Client","GetBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(i7).de(tH).build(){}class Wee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketCors",{}).n("S3Client","GetBucketCorsCommand").f(void 0,void 0).ser(a7).de(nH).build(){}class Gee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketEncryption",{}).n("S3Client","GetBucketEncryptionCommand").f(void 0,eU).ser(o7).de(rH).build(){}class Vee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketIntelligentTieringConfiguration",{}).n("S3Client","GetBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(c7).de(sH).build(){}class Kee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketInventoryConfiguration",{}).n("S3Client","GetBucketInventoryConfigurationCommand").f(void 0,iU).ser(l7).de(iH).build(){}class Yee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketLifecycleConfiguration",{}).n("S3Client","GetBucketLifecycleConfigurationCommand").f(void 0,void 0).ser(u7).de(aH).build(){}class Xee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketLocation",{}).n("S3Client","GetBucketLocationCommand").f(void 0,void 0).ser(d7).de(oH).build(){}class Qee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketLogging",{}).n("S3Client","GetBucketLoggingCommand").f(void 0,void 0).ser(f7).de(cH).build(){}class Zee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketMetadataConfiguration",{}).n("S3Client","GetBucketMetadataConfigurationCommand").f(void 0,void 0).ser(h7).de(lH).build(){}class Jee extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketMetadataTableConfiguration",{}).n("S3Client","GetBucketMetadataTableConfigurationCommand").f(void 0,void 0).ser(m7).de(uH).build(){}class ete extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketMetricsConfiguration",{}).n("S3Client","GetBucketMetricsConfigurationCommand").f(void 0,void 0).ser(g7).de(dH).build(){}class tte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketNotificationConfiguration",{}).n("S3Client","GetBucketNotificationConfigurationCommand").f(void 0,void 0).ser(b7).de(fH).build(){}class nte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketOwnershipControls",{}).n("S3Client","GetBucketOwnershipControlsCommand").f(void 0,void 0).ser(p7).de(hH).build(){}class rte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketPolicy",{}).n("S3Client","GetBucketPolicyCommand").f(void 0,void 0).ser(y7).de(mH).build(){}class ste extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketPolicyStatus",{}).n("S3Client","GetBucketPolicyStatusCommand").f(void 0,void 0).ser(E7).de(gH).build(){}class ite extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketReplication",{}).n("S3Client","GetBucketReplicationCommand").f(void 0,void 0).ser(C7).de(bH).build(){}class ate extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketRequestPayment",{}).n("S3Client","GetBucketRequestPaymentCommand").f(void 0,void 0).ser(x7).de(pH).build(){}class ote extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketTagging",{}).n("S3Client","GetBucketTaggingCommand").f(void 0,void 0).ser(v7).de(yH).build(){}class cte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketVersioning",{}).n("S3Client","GetBucketVersioningCommand").f(void 0,void 0).ser(T7).de(EH).build(){}class lte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetBucketWebsite",{}).n("S3Client","GetBucketWebsiteCommand").f(void 0,void 0).ser(S7).de(CH).build(){}class ute extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetObjectAcl",{}).n("S3Client","GetObjectAclCommand").f(void 0,void 0).ser(w7).de(vH).build(){}class dte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r)]}).s("AmazonS3","GetObjectAttributes",{}).n("S3Client","GetObjectAttributesCommand").f(cU,void 0).ser(A7).de(TH).build(){}class fte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),Zs(r),i_()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(oU,aU).ser(_7).de(xH).build(){}class hte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetObjectLegalHold",{}).n("S3Client","GetObjectLegalHoldCommand").f(void 0,void 0).ser(k7).de(SH).build(){}class mte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetObjectLockConfiguration",{}).n("S3Client","GetObjectLockConfigurationCommand").f(void 0,void 0).ser(I7).de(_H).build(){}class gte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetObjectRetention",{}).n("S3Client","GetObjectRetentionCommand").f(void 0,void 0).ser(R7).de(wH).build(){}class bte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetObjectTagging",{}).n("S3Client","GetObjectTaggingCommand").f(void 0,void 0).ser(B7).de(AH).build(){}class pte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","GetObjectTorrent",{}).n("S3Client","GetObjectTorrentCommand").f(void 0,lU).ser(P7).de(kH).build(){}class yte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","GetPublicAccessBlock",{}).n("S3Client","GetPublicAccessBlockCommand").f(void 0,void 0).ser(N7).de(IH).build(){}class Ete extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","HeadBucket",{}).n("S3Client","HeadBucketCommand").f(void 0,void 0).ser(O7).de(RH).build(){}class Cte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r),i_()]}).s("AmazonS3","HeadObject",{}).n("S3Client","HeadObjectCommand").f(dU,uU).ser(D7).de(BH).build(){}class xte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListBucketAnalyticsConfigurations",{}).n("S3Client","ListBucketAnalyticsConfigurationsCommand").f(void 0,void 0).ser(L7).de(PH).build(){}class vte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListBucketIntelligentTieringConfigurations",{}).n("S3Client","ListBucketIntelligentTieringConfigurationsCommand").f(void 0,void 0).ser(M7).de(NH).build(){}class Tte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListBucketInventoryConfigurations",{}).n("S3Client","ListBucketInventoryConfigurationsCommand").f(void 0,fU).ser(F7).de(OH).build(){}class Ste extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListBucketMetricsConfigurations",{}).n("S3Client","ListBucketMetricsConfigurationsCommand").f(void 0,void 0).ser(z7).de(DH).build(){}class _te extends Ee.classBuilder().ep(Te).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").f(void 0,void 0).ser(U7).de(LH).build(){}class wte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListDirectoryBuckets",{}).n("S3Client","ListDirectoryBucketsCommand").f(void 0,void 0).ser($7).de(MH).build(){}class Ate extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListMultipartUploads",{}).n("S3Client","ListMultipartUploadsCommand").f(void 0,void 0).ser(H7).de(FH).build(){}class kte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListObjects",{}).n("S3Client","ListObjectsCommand").f(void 0,void 0).ser(q7).de(zH).build(){}class Ite extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(j7).de(UH).build(){}class Rte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","ListObjectVersions",{}).n("S3Client","ListObjectVersionsCommand").f(void 0,void 0).ser(W7).de($H).build(){}class Bte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r)]}).s("AmazonS3","ListParts",{}).n("S3Client","ListPartsCommand").f(hU,void 0).ser(G7).de(HH).build(){}class Pte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1})]}).s("AmazonS3","PutBucketAccelerateConfiguration",{}).n("S3Client","PutBucketAccelerateConfigurationCommand").f(void 0,void 0).ser(V7).de(qH).build(){}class Nte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketAcl",{}).n("S3Client","PutBucketAclCommand").f(void 0,void 0).ser(K7).de(jH).build(){}class Ote extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketAnalyticsConfiguration",{}).n("S3Client","PutBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(Y7).de(WH).build(){}class Dte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketCors",{}).n("S3Client","PutBucketCorsCommand").f(void 0,void 0).ser(X7).de(GH).build(){}class Lte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketEncryption",{}).n("S3Client","PutBucketEncryptionCommand").f(mU,void 0).ser(Q7).de(VH).build(){}class Mte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketIntelligentTieringConfiguration",{}).n("S3Client","PutBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(Z7).de(KH).build(){}class Fte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketInventoryConfiguration",{}).n("S3Client","PutBucketInventoryConfigurationCommand").f(gU,void 0).ser(J7).de(YH).build(){}class zte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Je(r)]}).s("AmazonS3","PutBucketLifecycleConfiguration",{}).n("S3Client","PutBucketLifecycleConfigurationCommand").f(void 0,void 0).ser(e$).de(XH).build(){}class Ute extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketLogging",{}).n("S3Client","PutBucketLoggingCommand").f(void 0,void 0).ser(t$).de(QH).build(){}class $te extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketMetricsConfiguration",{}).n("S3Client","PutBucketMetricsConfigurationCommand").f(void 0,void 0).ser(n$).de(ZH).build(){}class Hte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketNotificationConfiguration",{}).n("S3Client","PutBucketNotificationConfigurationCommand").f(void 0,void 0).ser(r$).de(JH).build(){}class qte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketOwnershipControls",{}).n("S3Client","PutBucketOwnershipControlsCommand").f(void 0,void 0).ser(s$).de(eq).build(){}class jte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketPolicy",{}).n("S3Client","PutBucketPolicyCommand").f(void 0,void 0).ser(i$).de(tq).build(){}class Wte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketReplication",{}).n("S3Client","PutBucketReplicationCommand").f(void 0,void 0).ser(a$).de(nq).build(){}class Gte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketRequestPayment",{}).n("S3Client","PutBucketRequestPaymentCommand").f(void 0,void 0).ser(o$).de(rq).build(){}class Vte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketTagging",{}).n("S3Client","PutBucketTaggingCommand").f(void 0,void 0).ser(c$).de(sq).build(){}class Kte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketVersioning",{}).n("S3Client","PutBucketVersioningCommand").f(void 0,void 0).ser(l$).de(iq).build(){}class Yte extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketWebsite",{}).n("S3Client","PutBucketWebsiteCommand").f(void 0,void 0).ser(u$).de(aq).build(){}class Xte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Je(r)]}).s("AmazonS3","PutObjectAcl",{}).n("S3Client","PutObjectAclCommand").f(void 0,void 0).ser(f$).de(cq).build(){}class Qte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),mF(),Je(r),Zs(r)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(pU,bU).ser(d$).de(oq).build(){}class Zte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Je(r)]}).s("AmazonS3","PutObjectLegalHold",{}).n("S3Client","PutObjectLegalHoldCommand").f(void 0,void 0).ser(h$).de(lq).build(){}class Jte extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Je(r)]}).s("AmazonS3","PutObjectLockConfiguration",{}).n("S3Client","PutObjectLockConfigurationCommand").f(void 0,void 0).ser(m$).de(uq).build(){}class ene extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Je(r)]}).s("AmazonS3","PutObjectRetention",{}).n("S3Client","PutObjectRetentionCommand").f(void 0,void 0).ser(g$).de(dq).build(){}class tne extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Je(r)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").f(void 0,void 0).ser(b$).de(fq).build(){}class nne extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutPublicAccessBlock",{}).n("S3Client","PutPublicAccessBlockCommand").f(void 0,void 0).ser(p$).de(hq).build(){}class rne extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r)]}).s("AmazonS3","RenameObject",{}).n("S3Client","RenameObjectCommand").f(void 0,void 0).ser(y$).de(mq).build(){}class sne extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Je(r)]}).s("AmazonS3","RestoreObject",{}).n("S3Client","RestoreObjectCommand").f(vU,void 0).ser(E$).de(gq).build(){}class ine extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r)]}).s("AmazonS3","SelectObjectContent",{eventStream:{output:!0}}).n("S3Client","SelectObjectContentCommand").f(SU,TU).ser(C$).de(bq).build(){}class ane extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","UpdateBucketMetadataInventoryTableConfiguration",{}).n("S3Client","UpdateBucketMetadataInventoryTableConfigurationCommand").f(void 0,void 0).ser(x$).de(pq).build(){}class one extends Ee.classBuilder().ep({...Te,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","UpdateBucketMetadataJournalTableConfiguration",{}).n("S3Client","UpdateBucketMetadataJournalTableConfigurationCommand").f(void 0,void 0).ser(v$).de(yq).build(){}class cne extends Ee.classBuilder().ep({...Te,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),sn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Je(r),Zs(r)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").f(wU,_U).ser(T$).de(Eq).build(){}class lne extends Ee.classBuilder().ep({...Te,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions()),Je(r),Zs(r)]}).s("AmazonS3","UploadPartCopy",{}).n("S3Client","UploadPartCopyCommand").f(kU,AU).ser(S$).de(Cq).build(){}class une extends Ee.classBuilder().ep({...Te,UseObjectLambdaEndpoint:{type:"staticContextParams",value:!0}}).m(function(t,n,r,s){return[Ce(r,this.serialize,this.deserialize),ve(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","WriteGetObjectResponse",{}).n("S3Client","WriteGetObjectResponseCommand").f(IU,void 0).ser(_$).de(xq).build(){}const dne={AbortMultipartUploadCommand:uee,CompleteMultipartUploadCommand:mee,CopyObjectCommand:gee,CreateBucketCommand:Eee,CreateBucketMetadataConfigurationCommand:Cee,CreateBucketMetadataTableConfigurationCommand:xee,CreateMultipartUploadCommand:vee,CreateSessionCommand:S2,DeleteBucketCommand:See,DeleteBucketAnalyticsConfigurationCommand:Tee,DeleteBucketCorsCommand:_ee,DeleteBucketEncryptionCommand:wee,DeleteBucketIntelligentTieringConfigurationCommand:Aee,DeleteBucketInventoryConfigurationCommand:kee,DeleteBucketLifecycleCommand:Iee,DeleteBucketMetadataConfigurationCommand:Ree,DeleteBucketMetadataTableConfigurationCommand:Bee,DeleteBucketMetricsConfigurationCommand:Pee,DeleteBucketOwnershipControlsCommand:Nee,DeleteBucketPolicyCommand:Oee,DeleteBucketReplicationCommand:Dee,DeleteBucketTaggingCommand:Lee,DeleteBucketWebsiteCommand:Mee,DeleteObjectCommand:Fee,DeleteObjectsCommand:zee,DeleteObjectTaggingCommand:Uee,DeletePublicAccessBlockCommand:$ee,GetBucketAccelerateConfigurationCommand:Hee,GetBucketAclCommand:qee,GetBucketAnalyticsConfigurationCommand:jee,GetBucketCorsCommand:Wee,GetBucketEncryptionCommand:Gee,GetBucketIntelligentTieringConfigurationCommand:Vee,GetBucketInventoryConfigurationCommand:Kee,GetBucketLifecycleConfigurationCommand:Yee,GetBucketLocationCommand:Xee,GetBucketLoggingCommand:Qee,GetBucketMetadataConfigurationCommand:Zee,GetBucketMetadataTableConfigurationCommand:Jee,GetBucketMetricsConfigurationCommand:ete,GetBucketNotificationConfigurationCommand:tte,GetBucketOwnershipControlsCommand:nte,GetBucketPolicyCommand:rte,GetBucketPolicyStatusCommand:ste,GetBucketReplicationCommand:ite,GetBucketRequestPaymentCommand:ate,GetBucketTaggingCommand:ote,GetBucketVersioningCommand:cte,GetBucketWebsiteCommand:lte,GetObjectCommand:fte,GetObjectAclCommand:ute,GetObjectAttributesCommand:dte,GetObjectLegalHoldCommand:hte,GetObjectLockConfigurationCommand:mte,GetObjectRetentionCommand:gte,GetObjectTaggingCommand:bte,GetObjectTorrentCommand:pte,GetPublicAccessBlockCommand:yte,HeadBucketCommand:Ete,HeadObjectCommand:Cte,ListBucketAnalyticsConfigurationsCommand:xte,ListBucketIntelligentTieringConfigurationsCommand:vte,ListBucketInventoryConfigurationsCommand:Tte,ListBucketMetricsConfigurationsCommand:Ste,ListBucketsCommand:_te,ListDirectoryBucketsCommand:wte,ListMultipartUploadsCommand:Ate,ListObjectsCommand:kte,ListObjectsV2Command:Ite,ListObjectVersionsCommand:Rte,ListPartsCommand:Bte,PutBucketAccelerateConfigurationCommand:Pte,PutBucketAclCommand:Nte,PutBucketAnalyticsConfigurationCommand:Ote,PutBucketCorsCommand:Dte,PutBucketEncryptionCommand:Lte,PutBucketIntelligentTieringConfigurationCommand:Mte,PutBucketInventoryConfigurationCommand:Fte,PutBucketLifecycleConfigurationCommand:zte,PutBucketLoggingCommand:Ute,PutBucketMetricsConfigurationCommand:$te,PutBucketNotificationConfigurationCommand:Hte,PutBucketOwnershipControlsCommand:qte,PutBucketPolicyCommand:jte,PutBucketReplicationCommand:Wte,PutBucketRequestPaymentCommand:Gte,PutBucketTaggingCommand:Vte,PutBucketVersioningCommand:Kte,PutBucketWebsiteCommand:Yte,PutObjectCommand:Qte,PutObjectAclCommand:Xte,PutObjectLegalHoldCommand:Zte,PutObjectLockConfigurationCommand:Jte,PutObjectRetentionCommand:ene,PutObjectTaggingCommand:tne,PutPublicAccessBlockCommand:nne,RenameObjectCommand:rne,RestoreObjectCommand:sne,SelectObjectContentCommand:ine,UpdateBucketMetadataInventoryTableConfigurationCommand:ane,UpdateBucketMetadataJournalTableConfigurationCommand:one,UploadPartCommand:cne,UploadPartCopyCommand:lne,WriteGetObjectResponseCommand:une};class B2 extends lee{}CL(dne,B2);const fne={build:function([e,t],n){return n(e,{...t,onFileTree:async(r,s)=>{t?.onFileTree&&await t.onFileTree(r,s);for await(const[i,a]of hne(r,e))s.log(`上传: ${i} ${a}`);s.log("s3 上传完毕")}})}},hne=async function*(e,t){const n=new B2({region:t.s3.region,endpoint:t.s3.endpoint,credentials:{accessKeyId:t.s3.accessKeyId,secretAccessKey:t.s3.secretAccessKey}}),r=new TextEncoder;for(const[s,i]of Object.entries(e)){let a;typeof i=="string"?a=r.encode(i):a=new Uint8Array(i);const o=await n.putObject({Bucket:t.s3.bucket,Key:(t.s3.pathPrefix+s).replace(/\/\//g,"/"),Body:a});yield[s,o.ETag]}};function mne(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}function fb(e,t){return Array(t+1).join(e)}function P2(e){return e.replace(/^\n*/,"")}function N2(e){for(var t=e.length;t>0&&e[t-1]===`
1586
+ `;)t--;return e.substring(0,t)}function O2(e){return N2(P2(e))}var gne=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function Ry(e){return By(e,gne)}var D2=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function L2(e){return By(e,D2)}function bne(e){return F2(e,D2)}var M2=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function pne(e){return By(e,M2)}function yne(e){return F2(e,M2)}function By(e,t){return t.indexOf(e.nodeName)>=0}function F2(e,t){return e.getElementsByTagName&&t.some(function(n){return e.getElementsByTagName(n).length})}var Ur={};Ur.paragraph={filter:"p",replacement:function(e){return`
1587
+
1588
+ `+e+`
1589
+
1590
+ `}};Ur.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+`
1591
+ `}};Ur.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,n){var r=Number(t.nodeName.charAt(1));if(n.headingStyle==="setext"&&r<3){var s=fb(r===1?"=":"-",e.length);return`
1592
+
1593
+ `+e+`
1594
+ `+s+`
1595
+
1596
+ `}else return`
1597
+
1598
+ `+fb("#",r)+" "+e+`
1599
+
1600
+ `}};Ur.blockquote={filter:"blockquote",replacement:function(e){return e=O2(e).replace(/^/gm,"> "),`
1601
+
1602
+ `+e+`
1603
+
1604
+ `}};Ur.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return n.nodeName==="LI"&&n.lastElementChild===t?`
1605
+ `+e:`
1606
+
1607
+ `+e+`
1608
+
1609
+ `}};Ur.listItem={filter:"li",replacement:function(e,t,n){var r=n.bulletListMarker+" ",s=t.parentNode;if(s.nodeName==="OL"){var i=s.getAttribute("start"),a=Array.prototype.indexOf.call(s.children,t);r=(i?Number(i)+a:a+1)+". "}var o=/\n$/.test(e);return e=O2(e)+(o?`
1610
+ `:""),e=e.replace(/\n/gm,`
1611
+ `+" ".repeat(r.length)),r+e+(t.nextSibling?`
1612
+ `:"")}};Ur.indentedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="indented"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,n){return`
1613
+
1614
+ `+t.firstChild.textContent.replace(/\n/g,`
1615
+ `)+`
1616
+
1617
+ `}};Ur.fencedCodeBlock={filter:function(e,t){return t.codeBlockStyle==="fenced"&&e.nodeName==="PRE"&&e.firstChild&&e.firstChild.nodeName==="CODE"},replacement:function(e,t,n){for(var r=t.firstChild.getAttribute("class")||"",s=(r.match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,a=n.fence.charAt(0),o=3,c=new RegExp("^"+a+"{3,}","gm"),l;l=c.exec(i);)l[0].length>=o&&(o=l[0].length+1);var d=fb(a,o);return`
1618
+
1619
+ `+d+s+`
1620
+ `+i.replace(/\n$/,"")+`
1621
+ `+d+`
1622
+
1623
+ `}};Ur.horizontalRule={filter:"hr",replacement:function(e,t,n){return`
1624
+
1625
+ `+n.hr+`
1626
+
1627
+ `}};Ur.inlineLink={filter:function(e,t){return t.linkStyle==="inlined"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href");n&&(n=n.replace(/([()])/g,"\\$1"));var r=fh(t.getAttribute("title"));return r&&(r=' "'+r.replace(/"/g,'\\"')+'"'),"["+e+"]("+n+r+")"}};Ur.referenceLink={filter:function(e,t){return t.linkStyle==="referenced"&&e.nodeName==="A"&&e.getAttribute("href")},replacement:function(e,t,n){var r=t.getAttribute("href"),s=fh(t.getAttribute("title"));s&&(s=' "'+s+'"');var i,a;switch(n.linkReferenceStyle){case"collapsed":i="["+e+"][]",a="["+e+"]: "+r+s;break;case"shortcut":i="["+e+"]",a="["+e+"]: "+r+s;break;default:var o=this.references.length+1;i="["+e+"]["+o+"]",a="["+o+"]: "+r+s}return this.references.push(a),i},references:[],append:function(e){var t="";return this.references.length&&(t=`
1628
+
1629
+ `+this.references.join(`
1630
+ `)+`
1631
+
1632
+ `,this.references=[]),t}};Ur.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}};Ur.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}};Ur.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n=e.parentNode.nodeName==="PRE"&&!t;return e.nodeName==="CODE"&&!n},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",n="`",r=e.match(/`+/gm)||[];r.indexOf(n)!==-1;)n=n+"`";return n+t+e+t+n}};Ur.image={filter:"img",replacement:function(e,t){var n=fh(t.getAttribute("alt")),r=t.getAttribute("src")||"",s=fh(t.getAttribute("title")),i=s?' "'+s+'"':"";return r?"!["+n+"]("+r+i+")":""}};function fh(e){return e?e.replace(/(\n+\s*)+/g,`
1633
+ `):""}function z2(e){this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[];for(var t in e.rules)this.array.push(e.rules[t])}z2.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){if(e.isBlank)return this.blankRule;var t;return(t=O0(this.array,e,this.options))||(t=O0(this._keep,e,this.options))||(t=O0(this._remove,e,this.options))?t:this.defaultRule},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};function O0(e,t,n){for(var r=0;r<e.length;r++){var s=e[r];if(Ene(s,t,n))return s}}function Ene(e,t,n){var r=e.filter;if(typeof r=="string"){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else if(typeof r=="function"){if(r.call(e,t,n))return!0}else throw new TypeError("`filter` needs to be a string, array, or function")}function Cne(e){var t=e.element,n=e.isBlock,r=e.isVoid,s=e.isPre||function(f){return f.nodeName==="PRE"};if(!(!t.firstChild||s(t))){for(var i=null,a=!1,o=null,c=Xx(o,t,s);c!==t;){if(c.nodeType===3||c.nodeType===4){var l=c.data.replace(/[ \r\n\t]+/g," ");if((!i||/ $/.test(i.data))&&!a&&l[0]===" "&&(l=l.substr(1)),!l){c=D0(c);continue}c.data=l,i=c}else if(c.nodeType===1)n(c)||c.nodeName==="BR"?(i&&(i.data=i.data.replace(/ $/,"")),i=null,a=!1):r(c)||s(c)?(i=null,a=!0):i&&(a=!1);else{c=D0(c);continue}var d=Xx(o,c,s);o=c,c=d}i&&(i.data=i.data.replace(/ $/,""),i.data||D0(i))}}function D0(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function Xx(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}var Py=typeof window<"u"?window:{};function xne(){var e=Py.DOMParser,t=!1;try{new e().parseFromString("","text/html")&&(t=!0)}catch{}return t}function vne(){var e=function(){};return Tne()?e.prototype.parseFromString=function(t){var n=new window.ActiveXObject("htmlfile");return n.designMode="on",n.open(),n.write(t),n.close(),n}:e.prototype.parseFromString=function(t){var n=document.implementation.createHTMLDocument("");return n.open(),n.write(t),n.close(),n},e}function Tne(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch{Py.ActiveXObject&&(e=!0)}return e}var Sne=xne()?Py.DOMParser:vne();function _ne(e,t){var n;if(typeof e=="string"){var r=wne().parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html");n=r.getElementById("turndown-root")}else n=e.cloneNode(!0);return Cne({element:n,isBlock:Ry,isVoid:L2,isPre:t.preformattedCode?Ane:null}),n}var L0;function wne(){return L0=L0||new Sne,L0}function Ane(e){return e.nodeName==="PRE"||e.nodeName==="CODE"}function kne(e,t){return e.isBlock=Ry(e),e.isCode=e.nodeName==="CODE"||e.parentNode.isCode,e.isBlank=Ine(e),e.flankingWhitespace=Rne(e,t),e}function Ine(e){return!L2(e)&&!pne(e)&&/^\s*$/i.test(e.textContent)&&!bne(e)&&!yne(e)}function Rne(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var n=Bne(e.textContent);return n.leadingAscii&&Qx("left",e,t)&&(n.leading=n.leadingNonAscii),n.trailingAscii&&Qx("right",e,t)&&(n.trailing=n.trailingNonAscii),{leading:n.leading,trailing:n.trailing}}function Bne(e){var t=e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);return{leading:t[1],leadingAscii:t[2],leadingNonAscii:t[3],trailing:t[4],trailingNonAscii:t[5],trailingAscii:t[6]}}function Qx(e,t,n){var r,s,i;return e==="left"?(r=t.previousSibling,s=/ $/):(r=t.nextSibling,s=/^ /),r&&(r.nodeType===3?i=s.test(r.nodeValue):n.preformattedCode&&r.nodeName==="CODE"?i=!1:r.nodeType===1&&!Ry(r)&&(i=s.test(r.textContent))),i}var Pne=Array.prototype.reduce,Nne=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function hh(e){if(!(this instanceof hh))return new hh(e);var t={rules:Ur,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(n,r){return r.isBlock?`
1634
+
1635
+ `:""},keepReplacement:function(n,r){return r.isBlock?`
1636
+
1637
+ `+r.outerHTML+`
1638
+
1639
+ `:r.outerHTML},defaultReplacement:function(n,r){return r.isBlock?`
1640
+
1641
+ `+n+`
1642
+
1643
+ `:n}};this.options=mne({},t,e),this.rules=new z2(this.options)}hh.prototype={turndown:function(e){if(!Lne(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var t=U2.call(this,new _ne(e,this.options));return One.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else if(typeof e=="function")e(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return Nne.reduce(function(t,n){return t.replace(n[0],n[1])},e)}};function U2(e){var t=this;return Pne.call(e.childNodes,function(n,r){r=new kne(r,t.options);var s="";return r.nodeType===3?s=r.isCode?r.nodeValue:t.escape(r.nodeValue):r.nodeType===1&&(s=Dne.call(t,r)),$2(n,s)},"")}function One(e){var t=this;return this.rules.forEach(function(n){typeof n.append=="function"&&(e=$2(e,n.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function Dne(e){var t=this.rules.forNode(e),n=U2.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function $2(e,t){var n=N2(e),r=P2(t),s=Math.max(e.length-n.length,t.length-r.length),i=`
1644
+
1645
+ `.substring(0,s);return n+i+r}function Lne(e){return e!=null&&(typeof e=="string"||e.nodeType&&(e.nodeType===1||e.nodeType===9||e.nodeType===11))}class Mne{constructor(t){this.config=t}name="MarkdownMirrorPlugin";build=function([t,n],r){const s=t.markdownMirror?.enable&&t.markdownMirror.removeTemplate?{...t,sidebarCode:{...t.sidebarCode,enableDocTree:!1,leftCode:"",rightCode:""},embedCode:{...t.embedCode,head:"",beforeBody:"",afterBody:""}}:t;return r(s,{...n,beforeFileTree:async(i,a)=>{if(n?.beforeFileTree&&await n.beforeFileTree(i,a),s.markdownMirror?.enable){a.log(`
1646
+ === 开始 Markdown 镜像导出 ===`);try{$ne(i,s.markdownMirror.includeAssets),a.log(`=== Markdown 镜像导出完成 ===
1647
+ `)}catch(o){a.log("❌ Markdown 镜像导出失败: "+o)}}},onFileTree:async(i,a)=>{n?.onFileTree&&await n.onFileTree(i,a)}})}}function Fne(e){const t=new Map,n=/<h([1-6])\s+id="([^"]+)"[^>]*>(.*?)<\/h\1>/gi;let r;for(;(r=n.exec(e))!==null;){const s=r[2],i=r[3].replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&#39;/g,"'").trim();t.set(s,i)}return t}function zne(e){return e.toLowerCase().replace(/[^\p{L}\p{N}\s-]/gu,"").replace(/[\s_]+/g,"-").replace(/^-+|-+$/g,"")}function Une(e){let t=e.replace(/^\.\//,"");for(;t.startsWith("../");)t=t.slice(3);return t}function $ne(e,t=!1){const n=new Map,r=Object.entries(e).filter(([a])=>a.endsWith(".html"));console.log("📖 正在扫描 HTML 文件以建立标题映射...");for(const[a,o]of r){const c=o.toString(),l=Fne(c);for(const[d,f]of l.entries()){const m=a.replace(/\.html$/,".md");n.set(`${m}:${d}`,f),n.set(`${a}:${d}`,f),n.set(`./${m}:${d}`,f),n.set(`./${a}:${d}`,f)}}console.log(`✅ 建立了 ${n.size} 个标题映射
1648
+ `);const s=new hh({headingStyle:"atx",codeBlockStyle:"fenced",bulletListMarker:"-"});s.addRule("remove-sidebars",{filter:a=>a.id==="oceanpress-left-sidebar"||a.id==="oceanpress-right-sidebar",replacement:()=>""}),s.addRule("remove-html-metadata",{filter:a=>["head","style","script","noscript","link","meta","title"].includes(a.nodeName?.toLowerCase()),replacement:()=>""}),s.addRule("remove-json-ld",{filter:a=>a.nodeName==="SCRIPT"&&a.getAttribute("type")==="application/ld+json",replacement:()=>""}),s.addRule("remove-siyuan-config",{filter:a=>a.nodeName==="SCRIPT"&&a.textContent?.includes("window.siyuan"),replacement:()=>""}),s.addRule("remove-footer",{filter:a=>a.nodeName==="FOOTER"||a.nodeName==="DIV"&&a.classList?.contains("theme-aware-footer"),replacement:()=>""}),s.addRule("remove-home-link",{filter:a=>a.nodeName==="A"&&a.getAttribute("href")==="/",replacement:()=>""}),s.addRule("convert-internal-links",{filter:a=>a.nodeName==="A"&&a.getAttribute("href")?.includes(".html"),replacement:(a,o)=>{const c=o.getAttribute("href");if(!c)return a;const l=c.match(/^(.+?\.html)(#.+)?$/);if(!l)return`[${a}](${c})`;const d=l[1],f=l[2]||"",m=Une(d),h=m.replace(/\.html$/,".md");if(f){const b=f.slice(1);let p;const y=[`/${h}:${b}`,`${h}:${b}`,`/${m}:${b}`,`${m}:${b}`];for(const C of y)if(n.has(C)){p=n.get(C);break}if(p){const C=zne(p),A=c.startsWith("../")?"../":c.startsWith("./")?"./":"";return`[${a}](${A}${h}#${C})`}else Math.random()<.05&&(console.warn(`⚠️ 未找到标题映射: ${c}`),console.warn(" 尝试的路径:",y.slice(0,2)))}const g=c.startsWith("../")?"../":c.startsWith("./")?"./":"";return`[${a}](${g}${h})`}}),s.addRule("convert-code-blocks",{filter:a=>a.nodeName==="DIV"&&a.classList?.contains("hljs"),replacement:(a,o)=>{const c=o.textContent||"";let l="";const d=o.previousSibling;if(d&&d.nodeName==="DIV"){const f=d.querySelector(".protyle-action--first");if(f){const m=f.textContent?.trim();m&&m!=="Copy"&&(l=m.toLowerCase())}}return l||(c.includes("function ")||c.includes("const ")||c.includes("let ")||c.includes("=>")||c.includes("interface ")?l="typescript":c.includes("def ")||c.includes("import ")||c.includes("class ")?l="python":(c.includes("SELECT ")||c.includes("INSERT ")||c.includes("UPDATE "))&&(l="sql")),`
1649
+ \`\`\`${l}
1650
+ ${c.trim()}
1651
+ \`\`\`
1652
+ `}}),console.log(`📄 找到 ${r.length} 个 HTML 文件
1653
+ `);let i=0;for(const[a,o]of r)try{const c=a.replace(/\.html$/,".md"),l=o.toString();let d=s.turndown(l);d=d.trimStart(),d=d.replace(/\n([a-z]+)\n\n(```[a-z]+\n)/g,`
1654
+ $2`),e[c]=d,delete e[a],i++,console.log(`✅ [${i}] ${a} → ${c}`)}catch(c){console.error(`❌ 转换失败: ${a}`,c)}if(console.log(`
1655
+ 🎉 成功转换 ${i} 个 HTML 文件为 Markdown`),!t){const a=Object.keys(e).filter(o=>o.startsWith("assets/"));a.forEach(o=>{delete e[o]}),a.length>0&&console.log(`🗑️ 已从文件树中移除 ${a.length} 个资源文件`)}}async function Hne(e,t,n,r){const s=(await Promise.all([...t.refs.values()].map(mv))).filter(i=>i);return`<?xml version="1.0" encoding="UTF-8"?>
1656
+ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
1657
+ <channel>
1658
+ <title>${n.sitemap.title}</title>
1659
+ <link>${n.sitemap.siteLink}</link>
1660
+ <description>${n.sitemap.description}</description>
1661
+ <atom:link href="${n.sitemap.sitePrefix}${e}" rel="self" type="application/rss+xml"/>
1662
+ <lastBuildDate>${new Date().toISOString()}</lastBuildDate>
1663
+ ${(await Promise.all(s.map(async i=>`<item>
1664
+ <title>${i?.Properties?.title}</title>
1665
+ <link>${n.sitemap.sitePrefix}${i?.ID?await r(i?.ID)+".html":""}</link>
1666
+ <description></description>
1667
+ <pubDate>${i?.Properties?.updated?new Date(i.Properties.updated.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/,"$1/$2/$3 $4:$5:$6")).toISOString():""}</pubDate>
1668
+ </item>`))).join(`
1669
+ `)}
1670
+ </channel>
1671
+ </rss>`}function qne(e,t){return`<?xml version="1.0" encoding="UTF-8"?>
1672
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
1673
+ ${e.map(r=>{let s="";const i=r.ial.match(/updated=\"(\d+)\"/)?.[1]??r.created;return i&&(s=`
1674
+ <lastmod>${i.slice(0,4)}-${i.slice(4,6)}-${i.slice(6,8)}</lastmod>`),`<url>
1675
+ <loc>${t.sitePrefix}${r.hpath}.html</loc>${s}
1676
+ </url>
1677
+ `}).join("")}
1678
+ </urlset>`}const Zx=new Set(["的","了","在","是","我","有","和","就","不","人","都","一","个","上","也","很","到","说","要","去","你","会","着","没有","看","好","自己","这","那","现在","可以","但是","还是","因为","什么","如果","所以","the","a","an","and","or","but","in","on","at","to","for","of","with","by","is","are","was","were","be","been","being","have","has","had","do","does","did","will","would","could","should","may","might","must","can","this","that","these","those","i","you","he","she","it","we","they"]),jc=new Map,jne=500;function Wne(){if(jc.size>jne){const e=jc.keys().next().value;e&&jc.delete(e)}}function H2(e){if(!e||e.length<14)return new Date().toISOString();try{const t=e.slice(0,14);if(t.length===14){const n=t.slice(0,4),r=t.slice(4,6),s=t.slice(6,8),i=t.slice(8,10),a=t.slice(10,12),o=t.slice(12,14);return`${n}-${r}-${s}T${i}:${a}:${o}Z`}}catch{}return new Date().toISOString()}function q2(e){if(!e)return new Date().toISOString();try{if(e.length===14){const n=e.slice(0,4),r=e.slice(4,6),s=e.slice(6,8),i=e.slice(8,10),a=e.slice(10,12),o=e.slice(12,14);return`${n}-${r}-${s}T${i}:${a}:${o}Z`}const t=parseInt(e);return isNaN(t)?new Date(e).toISOString():new Date(t).toISOString()}catch{return new Date().toISOString()}}function Gne(e){const t=e;if(jc.has(t))return jc.get(t);const n=e.replace(/<[^>]*>/g," ").replace(/&[^;]+;/g," ").replace(/\s+/g," ").trim();return jc.set(t,n),Wne(),n}function Vne(e,t=8){const n=new Map,r=e.match(/[a-zA-Z]{3,}/g)||[];for(const i of r){const a=i.toLowerCase();!Zx.has(a)&&a.length>=3&&n.set(a,(n.get(a)||0)+1)}const s=e.match(/[\u4e00-\u9fa5]{2,4}/g)||[];for(const i of s)Zx.has(i)||n.set(i,(n.get(i)||0)+1);return Array.from(n.entries()).sort((i,a)=>a[1]-i[1]).slice(0,t).map(([i])=>i)}function Kne(e){const n={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((r,s)=>({"@type":"ListItem",position:s+1,name:r.name,item:r.url}))};return`<script type="application/ld+json">
1679
+ ${JSON.stringify(n,null,2)}
1680
+ <\/script>`}function Jx(e){const t=Gne(e.content),n=Qne(t),r=Vne(t,8),s=Yne(e.doc,e.config,e.pageUrl,{description:n,keywords:r});let i=Xne(e.doc,e.config,e.pageUrl,{plainText:t,description:n,keywords:r});return e.breadcrumbs&&e.breadcrumbs.length>0&&(i+=`
1681
+ `+Kne(e.breadcrumbs)),{metaTags:s,jsonLd:i}}function Yne(e,t,n,r){const s=e.Properties?.title||"未命名文档",{description:i,keywords:a}=r;let o="";if(o+=` <meta name="description" content="${i.replace(/"/g,"&quot;")}" />
1682
+ `,o+=` <meta name="keywords" content="${a.join(", ")}" />
1683
+ `,o+=` <meta name="author" content="${t.sitemap?.title||"崮生"}" />
1684
+ `,o+=` <meta property="og:title" content="${s.replace(/"/g,"&quot;")}" />
1685
+ `,o+=` <meta property="og:description" content="${i.replace(/"/g,"&quot;")}" />
1686
+ `,o+=` <meta property="og:type" content="article" />
1687
+ `,o+=` <meta property="og:url" content="${n}" />
1688
+ `,o+=` <meta property="og:site_name" content="${t.sitemap?.title||"OceanPress"}" />
1689
+ `,e.Properties?.["title-img"]){const d=`${t.sitemap?.siteLink||""}${e.Properties["title-img"].replace("assets","/assets")}`;o+=` <meta property="og:image" content="${d}" />
1690
+ `,o+=` <meta property="og:image:width" content="1200" />
1691
+ `,o+=` <meta property="og:image:height" content="630" />
1692
+ `}const c=H2(e.ID),l=q2(e.Properties?.updated);if(o+=` <meta property="article:published_time" content="${c}" />
1693
+ `,o+=` <meta property="article:modified_time" content="${l}" />
1694
+ `,o+=` <meta name="twitter:card" content="summary_large_image" />
1695
+ `,o+=` <meta name="twitter:title" content="${s.replace(/"/g,"&quot;")}" />
1696
+ `,o+=` <meta name="twitter:description" content="${i.replace(/"/g,"&quot;")}" />
1697
+ `,e.Properties?.["title-img"]){const d=`${t.sitemap?.siteLink||""}${e.Properties["title-img"].replace("assets","/assets")}`;o+=` <meta name="twitter:image" content="${d}" />
1698
+ `}return o+=` <meta name="robots" content="index, follow" />
1699
+ `,o+=` <link rel="canonical" href="${n}" />
1700
+ `,o}function Xne(e,t,n,r){const s=e.Properties?.title||"未命名文档",{description:i,keywords:a}=r,o=H2(e.ID),c=q2(e.Properties?.updated),l={"@context":"https://schema.org","@type":"Article",headline:s,description:i,keywords:a.join(", "),datePublished:o,dateModified:c,author:{"@type":"Person",name:t.sitemap?.title||"崮生",url:t.sitemap?.siteLink||""},publisher:{"@type":"Organization",name:t.sitemap?.title||"OceanPress",logo:{"@type":"ImageObject",url:`${t.sitemap?.siteLink||""}/assets/logo.png`}},mainEntityOfPage:{"@type":"WebPage","@id":n},image:e.Properties?.["title-img"]?{"@type":"ImageObject",url:`${t.sitemap?.siteLink||""}${e.Properties["title-img"].replace("assets","/assets")}`,width:1200,height:630}:void 0,wordCount:r.plainText.length,articleSection:"技术文档",inLanguage:"zh-CN"};return`<script type="application/ld+json">
1701
+ ${JSON.stringify(l,null,2)}
1702
+ <\/script>`}function Qne(e,t=160){if(e.length<=t)return e;const n=e.substring(0,t),r=Math.max(n.lastIndexOf("。"),n.lastIndexOf("!"),n.lastIndexOf("?"),n.lastIndexOf("."),n.lastIndexOf("!"),n.lastIndexOf("?"));return r>t*.7?n.substring(0,r+1):n+"..."}async function Zne(e,t){let n="";if(t?.siyuanPrefix)n=t.siyuanPrefix;else for(let s=0;s<e.level;s++)n+="../";const r="2.10.5";return`<!DOCTYPE html>
1703
+ <html lang="zh_CN" data-theme-mode="light" data-light-theme="daylight" data-dark-theme="midnight">
1704
+ <head>
1705
+ ${t?.embedCode?.head??""}
1706
+ <meta charset="utf-8" />
1707
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
1708
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
1709
+ <meta name="apple-mobile-web-app-capable" content="yes" />
1710
+ <meta name="mobile-web-app-capable" content="yes" />
1711
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
1712
+ ${e.seoData?Jx({doc:e.seoData.doc,config:e.seoData.config,pageUrl:e.seoData.pageUrl,content:e.htmlContent,breadcrumbs:e.seoData.breadcrumbs}).metaTags:""}
1713
+ <link rel="stylesheet" type="text/css" id="baseStyle" href="${n}stage/build/export/base.css?${r}"/>
1714
+ <script>
1715
+ // 更好的主题切换方案
1716
+ (function() {
1717
+ // 主题配置
1718
+ const themes = {
1719
+ light: {
1720
+ name: 'daylight',
1721
+ mode: 'light',
1722
+ icon: '☀️'
1723
+ },
1724
+ dark: {
1725
+ name: 'midnight',
1726
+ mode: 'dark',
1727
+ icon: '🌙'
1728
+ },
1729
+ auto: {
1730
+ name: 'auto',
1731
+ mode: 'auto',
1732
+ icon: '🌗',
1733
+ getTheme: function() {
1734
+ const currentHour = new Date().getHours();
1735
+ return currentHour >= 18 || currentHour < 6 ? 'dark' : 'light';
1736
+ }
1737
+ }
1738
+ };
1739
+
1740
+ // 获取当前主题设置
1741
+ function getCurrentTheme() {
1742
+ // 优先级:localStorage > 系统偏好 > auto
1743
+ const savedTheme = localStorage.getItem('oceanpress-theme');
1744
+ if (savedTheme && themes[savedTheme]) {
1745
+ return savedTheme;
1746
+ }
1747
+
1748
+ // 检测系统偏好
1749
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
1750
+ return 'dark';
1751
+ }
1752
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
1753
+ return 'light';
1754
+ }
1755
+
1756
+ return 'auto';
1757
+ }
1758
+
1759
+ // 应用主题
1760
+ function applyTheme(themeName) {
1761
+ const theme = themes[themeName] || themes.auto;
1762
+ const actualTheme = themeName === 'auto' ? theme.getTheme() : themeName;
1763
+ const themeConfig = themes[actualTheme];
1764
+
1765
+ // 设置 CSS 变量
1766
+ document.documentElement.setAttribute('data-theme-mode', themeConfig.mode);
1767
+ document.documentElement.setAttribute('data-light-theme', 'daylight');
1768
+ document.documentElement.setAttribute('data-dark-theme', 'midnight');
1769
+
1770
+ // 加载对应的 CSS
1771
+ const themeStyle = document.getElementById('themeDefaultStyle');
1772
+ if (themeStyle) {
1773
+ themeStyle.href = '${n}appearance/themes/' + themeConfig.name + '/theme.css?${r}';
1774
+ } else {
1775
+ // 如果元素不存在,创建它
1776
+ const link = document.createElement('link');
1777
+ link.id = 'themeDefaultStyle';
1778
+ link.rel = 'stylesheet';
1779
+ link.type = 'text/css';
1780
+ link.href = '${n}appearance/themes/' + themeConfig.name + '/theme.css?${r}';
1781
+ document.head.appendChild(link);
1782
+ }
1783
+
1784
+ // 更新主题切换按钮
1785
+ updateThemeToggle(themeName);
1786
+
1787
+ // 保存到 localStorage
1788
+ localStorage.setItem('oceanpress-theme', themeName);
1789
+
1790
+ // 触发自定义事件
1791
+ window.dispatchEvent(new CustomEvent('oceanpress-theme-changed', {
1792
+ detail: { theme: themeName, actualTheme: actualTheme }
1793
+ }));
1794
+ }
1795
+
1796
+ // 创建主题切换按钮
1797
+ function createThemeToggle() {
1798
+ const toggle = document.createElement('div');
1799
+ toggle.id = 'oceanpress-theme-toggle';
1800
+ toggle.innerHTML = '<span class="theme-icon">🌗</span><span class="theme-text">自动</span>';
1801
+ toggle.addEventListener('click', toggleTheme);
1802
+ (document.querySelector('[data-type="NodeDocument"]')||document.body).appendChild(toggle);
1803
+ }
1804
+
1805
+ // 更新主题切换按钮
1806
+ function updateThemeToggle(themeName) {
1807
+ const toggle = document.getElementById('oceanpress-theme-toggle');
1808
+ if (!toggle) return;
1809
+
1810
+ const theme = themes[themeName] || themes.auto;
1811
+ toggle.innerHTML = '<span class="theme-icon">' + theme.icon + '</span><span class="theme-text">' +
1812
+ (themeName === 'auto' ? '自动' : (themeName === 'dark' ? '深色' : '浅色')) + '</span>';
1813
+ }
1814
+
1815
+ // 切换主题
1816
+ function toggleTheme() {
1817
+ const currentTheme = getCurrentTheme();
1818
+ const themeOrder = ['auto', 'light', 'dark'];
1819
+ const currentIndex = themeOrder.indexOf(currentTheme);
1820
+ const nextIndex = (currentIndex + 1) % themeOrder.length;
1821
+ const nextTheme = themeOrder[nextIndex];
1822
+
1823
+ applyTheme(nextTheme);
1824
+ }
1825
+
1826
+ // 监听系统主题变化
1827
+ if (window.matchMedia) {
1828
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
1829
+ const currentTheme = getCurrentTheme();
1830
+ if (currentTheme === 'auto') {
1831
+ applyTheme('auto');
1832
+ }
1833
+ });
1834
+ }
1835
+
1836
+ // 监听自定义主题变化事件(用于侧边栏等组件)
1837
+ window.addEventListener('oceanpress-theme-changed', function(e) {
1838
+ // 这里可以添加其他组件需要响应主题变化的逻辑
1839
+ console.log('Theme changed to:', e.detail);
1840
+ });
1841
+
1842
+ // 初始化主题
1843
+ function initTheme() {
1844
+ const themeName = getCurrentTheme();
1845
+ const theme = themes[themeName] || themes.auto;
1846
+ const actualTheme = themeName === 'auto' ? theme.getTheme() : themeName;
1847
+ const themeConfig = themes[actualTheme];
1848
+
1849
+ // 立即设置基础主题,避免闪烁
1850
+ document.documentElement.setAttribute('data-theme-mode', themeConfig.mode);
1851
+ document.documentElement.setAttribute('data-light-theme', 'daylight');
1852
+ document.documentElement.setAttribute('data-dark-theme', 'midnight');
1853
+
1854
+ // 创建主题切换按钮
1855
+ createThemeToggle();
1856
+
1857
+ // 应用完整主题
1858
+ applyTheme(themeName);
1859
+ }
1860
+
1861
+ // 页面加载完成后初始化
1862
+ if (document.readyState === 'loading') {
1863
+ document.addEventListener('DOMContentLoaded', initTheme);
1864
+ } else {
1865
+ initTheme();
1866
+ }
1867
+ })();
1868
+ <\/script>
1869
+ <link rel="stylesheet" type="text/css" href="${n}appearance/oceanpress.css"/>
1870
+ <title>${e.title}</title>
1871
+ ${e.seoData?Jx({doc:e.seoData.doc,config:e.seoData.config,pageUrl:e.seoData.pageUrl,content:e.htmlContent,breadcrumbs:e.seoData.breadcrumbs}).jsonLd:""}
1872
+ </head>
1873
+ <body>
1874
+ ${t?.embedCode?.beforeBody??""}
1875
+ ${e.htmlContent}
1876
+ <script src="${n}appearance/icons/material/icon.js?${r}"><\/script>
1877
+ <script src="${n}stage/build/export/protyle-method.js?${r}"><\/script>
1878
+ <script src="${n}stage/protyle/js/lute/lute.min.js?${r}"><\/script>
1879
+ <script>
1880
+ window.siyuan = {
1881
+ config: {
1882
+ appearance: {
1883
+ mode: document.documentElement.getAttribute('data-theme-mode') === 'dark' ? 1 : 0,//主题 明亮=0 暗黑=1
1884
+ codeBlockThemeDark: "base16/dracula",
1885
+ codeBlockThemeLight: "github",
1886
+ },
1887
+ editor: {
1888
+ codeLineWrap: true,
1889
+ codeLigatures: false,
1890
+ plantUMLServePath: "https://www.plantuml.com/plantuml/svg/~1",
1891
+ codeSyntaxHighlightLineNum: true,
1892
+ katexMacros: JSON.stringify({}),
1893
+ },
1894
+ },
1895
+ languages: { copy: "复制" },
1896
+ };
1897
+ const cdn = "${n}stage/protyle";
1898
+ const previewElement = document.getElementById("preview");
1899
+
1900
+ Protyle.highlightRender(previewElement, cdn);
1901
+ Protyle.mathRender(previewElement, cdn, false);
1902
+ Protyle.mermaidRender(previewElement, cdn);
1903
+ Protyle.flowchartRender(previewElement, cdn);
1904
+ Protyle.graphvizRender(previewElement, cdn);
1905
+ Protyle.chartRender(previewElement, cdn);
1906
+ Protyle.mindmapRender(previewElement, cdn);
1907
+ Protyle.abcRender(previewElement, cdn);
1908
+ Protyle.htmlRender(previewElement);
1909
+ Protyle.plantumlRender(previewElement, cdn);
1910
+ document.querySelectorAll(".protyle-action__copy").forEach((item) => {
1911
+ item.addEventListener("click", (event) => {
1912
+ navigator.clipboard.writeText(
1913
+ item.parentElement.nextElementSibling.textContent.trimEnd(),
1914
+ );
1915
+ event.preventDefault();
1916
+ event.stopPropagation();
1917
+ });
1918
+ });
1919
+ <\/script>
1920
+ ${t?.embedCode?.afterBody??""}
1921
+ </body>
1922
+ </html>`}function Jne(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos")}function ev(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&#(\d+);/g,(t,n)=>String.fromCharCode(Number(n)))}const j2="/__oceanpress/docTree.js";function ere(){return Gc(function*(){const e=yield*wf,t=yield*Br(()=>gv(e.notebook.id)),n=yield*Br(()=>Vi.file_getFile({path:`/data/${e.notebook.id}/.siyuan/sort.json`}).then(a=>{const c=new TextDecoder("utf-8").decode(a);return JSON.parse(c)})),r=t.map(a=>({id:a.id,hpath:a.hpath,title:a.content,sort:n[a.id]})),s=nre(r);return`
1923
+ // OceanPress DocTree - 动态加载的文档树
1924
+ (function() {
1925
+ 'use strict';
1926
+
1927
+ // 文档树数据
1928
+ const docTreeData = ${tre(s)};
1929
+
1930
+ // 渲染函数
1931
+ function renderDocTree(containerId, options = {}) {
1932
+ const container = document.getElementById(containerId);
1933
+ if (!container) {
1934
+ console.error('Container not found:', containerId);
1935
+ return;
1936
+ }
1937
+
1938
+ const currentPath = options.currentPath || window.location.pathname.replace(/\\.html$/, '');
1939
+
1940
+ // 生成 HTML
1941
+ const html = generateHTMLTree(docTreeData, currentPath);
1942
+ container.innerHTML = html;
1943
+
1944
+ // 加载样式
1945
+ loadStyles();
1946
+
1947
+ // 初始化交互
1948
+ initInteractions(container, currentPath);
1949
+ }
1950
+
1951
+ // 检查是否为单一路径(只有单个子节点的文件夹)
1952
+ function isSinglePath(node) {
1953
+ if (!node.children || node.children.length !== 1) {
1954
+ return false;
1955
+ }
1956
+
1957
+ let current = node;
1958
+ while (current.children && current.children.length === 1) {
1959
+ current = current.children[0];
1960
+ }
1961
+
1962
+ // 如果最终节点没有子节点,说明是单一路径
1963
+ return !current.children || current.children.length === 0;
1964
+ }
1965
+
1966
+ // 获取单一路径的所有节点
1967
+ function getSinglePathNodes(node) {
1968
+ const pathNodes = [node];
1969
+ let current = node;
1970
+
1971
+ while (current.children && current.children.length === 1) {
1972
+ current = current.children[0];
1973
+ pathNodes.push(current);
1974
+ }
1975
+
1976
+ return pathNodes;
1977
+ }
1978
+
1979
+ // 生成面包屑路径
1980
+ function generateBreadcrumb(pathNodes, currentPath) {
1981
+ const lastNode = pathNodes[pathNodes.length - 1];
1982
+ const isCurrent = lastNode.hpath === currentPath;
1983
+
1984
+ let breadcrumbHtml = '<div class="breadcrumb-path">';
1985
+
1986
+ pathNodes.forEach((node, index) => {
1987
+ if (index > 0) {
1988
+ breadcrumbHtml += '<span class="breadcrumb-separator">/</span>';
1989
+ }
1990
+
1991
+ const isLast = index === pathNodes.length - 1;
1992
+ const nodeCurrent = node.hpath === currentPath;
1993
+
1994
+ breadcrumbHtml += \`
1995
+ <a href="\${node.hpath}.html" class="breadcrumb-part \${(isLast && isCurrent) ? 'current' : ''}" target="_top">\${node.title}</a>
1996
+ \`;
1997
+ });
1998
+
1999
+ breadcrumbHtml += '</div>';
2000
+ return breadcrumbHtml;
2001
+ }
2002
+
2003
+ // 生成 HTML 树
2004
+ function generateHTMLTree(nodes, currentPath, level = 0) {
2005
+ let html = '';
2006
+ for (const node of nodes) {
2007
+ const isCurrent = node.hpath === currentPath;
2008
+ const isActive = isCurrent || (currentPath && node.hpath && currentPath.startsWith(node.hpath));
2009
+
2010
+ // 检查是否为单一路径,如果是则显示为面包屑
2011
+ if (isSinglePath(node)) {
2012
+ const pathNodes = getSinglePathNodes(node);
2013
+ html += generateBreadcrumb(pathNodes, currentPath);
2014
+ continue;
2015
+ }
2016
+
2017
+ if (node.children && node.children.length > 0) {
2018
+ // 有子节点时使用 details/summary
2019
+ const isExpanded = isActive ? 'open' : '';
2020
+ html += \`
2021
+ <details class="folder" \${isExpanded}>
2022
+ <summary class="folder-summary">
2023
+ <a href="\${node.hpath}.html" class="folder-link \${isCurrent ? 'current' : ''}" target="_top">\${node.title}</a>
2024
+ </summary>
2025
+ <div class="folder-children" style="padding:0 0 0 10px;">
2026
+ \${generateHTMLTree(node.children, currentPath, level + 1)}
2027
+ </div>
2028
+ </details>
2029
+ \`;
2030
+ } else {
2031
+ // 没有子节点的普通项目
2032
+ html += \`
2033
+ <div class="file \${isCurrent ? 'current' : ''}">
2034
+ <a href="\${node.hpath}.html" class="file-link" target="_top">\${node.title}</a>
2035
+ </div>
2036
+ \`;
2037
+ }
2038
+ }
2039
+ return html;
2040
+ }
2041
+
2042
+ // 加载样式
2043
+ function loadStyles() {
2044
+ if (document.getElementById('oceanpress-doctree-styles')) return;
2045
+
2046
+ const link = document.createElement('link');
2047
+ link.id = 'oceanpress-doctree-styles';
2048
+ link.rel = 'stylesheet';
2049
+ link.type = 'text/css';
2050
+ link.href = '${Rd.cdn.siyuanPrefix}appearance/docTree.css';
2051
+ document.head.appendChild(link);
2052
+ }
2053
+
2054
+ // 初始化交互
2055
+ function initInteractions(container, currentPath) {
2056
+ // 为当前页面项添加高亮样式
2057
+ const currentItems = container.querySelectorAll('.current');
2058
+ currentItems.forEach(item => {
2059
+ // 如果是面包屑路径中的当前项,需要特殊处理
2060
+ if (item.classList.contains('breadcrumb-part')) {
2061
+ item.style.fontWeight = 'bold';
2062
+ item.style.color = 'var(--oceanpress-sidebar-current-border)';
2063
+ } else {
2064
+ // 使用 CSS 变量而不是硬编码颜色
2065
+ item.style.backgroundColor = 'var(--oceanpress-sidebar-current-bg)';
2066
+ item.style.borderLeft = '3px solid var(--oceanpress-sidebar-current-border)';
2067
+ item.style.paddingLeft = '7px';
2068
+ }
2069
+ });
2070
+
2071
+ // 确保当前页面的所有父文件夹都展开
2072
+ const currentElements = container.querySelectorAll('.current');
2073
+ currentElements.forEach(currentElement => {
2074
+ // 向上遍历所有父级 details 元素并展开
2075
+ let parent = currentElement.parentElement;
2076
+ while (parent) {
2077
+ if (parent.tagName === 'DETAILS') {
2078
+ parent.setAttribute('open', 'open');
2079
+ }
2080
+ parent = parent.parentElement;
2081
+ }
2082
+ });
2083
+
2084
+ // 自动滚动到当前页面
2085
+ const firstCurrent = container.querySelector('.current');
2086
+ if (firstCurrent) {
2087
+ setTimeout(() => {
2088
+ firstCurrent.scrollIntoView({ behavior: 'smooth', block: 'center' });
2089
+ }, 100);
2090
+ }
2091
+
2092
+ // 监听主题变化事件,更新高亮样式
2093
+ window.addEventListener('oceanpress-theme-changed', function(e) {
2094
+ currentItems.forEach(item => {
2095
+ if (item.classList.contains('breadcrumb-part')) {
2096
+ item.style.fontWeight = 'bold';
2097
+ item.style.color = 'var(--oceanpress-sidebar-current-border)';
2098
+ } else {
2099
+ item.style.backgroundColor = 'var(--oceanpress-sidebar-current-bg)';
2100
+ item.style.borderLeft = '3px solid var(--oceanpress-sidebar-current-border)';
2101
+ }
2102
+ });
2103
+ });
2104
+ }
2105
+
2106
+ // 暴露到全局
2107
+ window.OceanPressDocTree = {
2108
+ render: renderDocTree,
2109
+ data: docTreeData
2110
+ };
2111
+
2112
+ // 自动渲染(如果容器存在)
2113
+ if (document.readyState === 'loading') {
2114
+ document.addEventListener('DOMContentLoaded', () => {
2115
+ if (document.getElementById('oceanpress-doctree')) {
2116
+ renderDocTree('oceanpress-doctree');
2117
+ }
2118
+ });
2119
+ } else {
2120
+ if (document.getElementById('oceanpress-doctree')) {
2121
+ renderDocTree('oceanpress-doctree');
2122
+ }
2123
+ }
2124
+ })();
2125
+ `})}function tre(e){return JSON.stringify(e,null,2)}function nre(e){const t=[],n={};e.sort((s,i)=>s.hpath.localeCompare(i.hpath));for(const s of e){const i=s.hpath.split("/").filter(c=>c!=="");let a="",o;for(let c=0;c<i.length-1;c++)a+="/"+i[c],n[a]||(n[a]={id:"virtual_"+a,hpath:a,title:i[c],sort:void 0,children:[]},o?(o.children=o.children||[],o.children.push(n[a])):t.push(n[a])),o=n[a];o?(o.children=o.children||[],o.children.push(s)):t.push(s),n[s.hpath]=s}function r(s){return s.map(i=>(i.children&&(i.children=r(i.children)),i)).sort((i,a)=>i.sort!==void 0&&a.sort!==void 0?i.sort-a.sort:i.sort!==void 0?-1:a.sort!==void 0?1:(i.title||"").localeCompare(a.title||""))}return r(t)}const mh=(e,t)=>Gc(function*(){if(e===void 0)return"";const n=yield*G2,r=t??n,s={...r,nodeStack:[...r.nodeStack]};if(r.nodeStack.find(i=>i.ID&&e.ID&&i.ID===e.ID))return hu("循环引用",[...r.nodeStack,e].map(i=>i.ID));if(s[e.Type]===void 0)return hu(`没有找到对应的渲染方法 ${e.Type} ${s.nodeStack[0].Properties?.title}`);{if(s.nodeStack.push(e),e.ID&&r.nodeStack[0]?.ID){const a=yield*gu,o=e.ID,c=yield*Br(()=>a.getDocByChildID(o)),l=r.nodeStack[0];c?.ID!==void 0&&c.ID!==l.ID&&l.ID&&s.refs.add(c.ID)}const i=yield*Br(()=>s[e.Type](e));return s.nodeStack.pop(),i}});function hu(e,...t){return Yl(e,...t),`<div class="ft__smaller ft__secondary b3-form__space--small">${e}</div>`}function W2(e){const t=atob(e.CodeBlockInfo??e.Children?.find(n=>n.Type==="NodeCodeBlockFenceInfoMarker")?.CodeBlockInfo??"");return[["mindmap","mermaid","echarts","abc","graphviz","flowchart","plantuml"].includes(t),t]}const Id=String.raw;function Jn(e,t={}){t?.subtype_class===void 0&&(t.subtype_class=(()=>{const s=e.ListData?.Typ===1?"o":e.ListData?.Typ===3?"t":"u";if(e.Type==="NodeDocument")return"";if(e.Type==="NodeHeading")return`h${e.HeadingLevel}`;if(e.Type==="NodeList")return[s,"list"];if(e.Type==="NodeListItem")return[s,"li"];if(e.Type==="NodeParagraph")return["","p"];if(e.Type==="NodeImage")return["","img"];if(e.Type==="NodeBlockquote")return["","bq"];if(e.Type==="NodeSuperBlock")return["","sb"];if(e.Type==="NodeCodeBlock"){const[i,a]=W2(e);return i?[a,"render-node"]:["","code-block"]}else return e.Type==="NodeTable"?["","table"]:e.Type==="NodeThematicBreak"?["","hr"]:e.Type==="NodeMathBlock"?["math","render-node"]:e.Type==="NodeIFrame"?["","iframe"]:e.Type==="NodeVideo"?["","iframe"]:""})());const n={};function r(s,i){n[s]=i}return e.ID&&(r("id",e.ID),r("data-node-id",e.ID)),e?.TextMarkType==="tag"?r("data-type",e.TextMarkType??""):r("data-type",t?.data_type??e.Type),e.Properties?.updated&&r("updated",e.Properties.updated),t?.subtype_class&&(typeof t.subtype_class=="string"?(r("data-subtype",t.subtype_class),r("class",t.subtype_class)):(t.subtype_class[0]!==""&&r("data-subtype",t.subtype_class[0]),t.subtype_class[1]!==""&&r("class",t.subtype_class[1]))),e.Properties&&Object.entries(e.Properties).forEach(([s,i])=>r(s,i)),e.ListData?.Marker&&r("data-marker",atob(e.ListData.Marker)),e.ListData?.Typ===3&&e.Children?.find(s=>s.Type==="NodeTaskListItemMarker")?.TaskListItemChecked&&(n.class=(n.class??"")+" protyle-task--done "),delete n.fold,e.Type==="NodeDocument"&&delete n.title,Object.entries(n).map(([s,i])=>`${s}="${i}"`).join(" ")}const fs=async e=>"",M0=async e=>e.Data??"",G2=Gc(function*(){return{...yield*rre,nodeStack:[],refs:new Set}}),rre=Gc(function*(){const e=yield*gu,t=yield*wf,n=uv().pipe(nc(gu,e),nc(wf,t));async function r(a,o){const l=(a?.Children??[]).map(f=>Af(F0(mh(f,o),n)));return(await Promise.all(l)).join("")}async function s(a,o){return Af(F0(mh(a,o),n))}return{nodeStack:[],refs:new Set,async getTopPathPrefix(){const a=this.nodeStack[0];let o=".";if(a.Type==="NodeDocument"&&a.ID){const c=await e.getDocPathBySY(a);if(c){const l=c.split("/").length-3;for(let d=0;d<l;d++)o+="/.."}return o}else return console.log("未定义顶层元素非 NodeDocument 时的处理方式",a),""},async NodeDocument(a){const o=this.nodeStack.length===1;let c=`<div style="min-height: 150px;" ${Jn(a)}>
2126
+ ${o&&a.Properties?.["title-img"]?`<div class="protyle-background__img" style="margin-bottom: 30px;position: relative;height: 16vh;${a.Properties?.["title-img"].replace(/assets/,await this.getTopPathPrefix()+"/assets")}"/>${a.Properties?.icon?`<div style="position: absolute;bottom:-10px;left:15px;height: 80px;width: 80px;transition: var(--b3-transition);cursor: pointer;font-size: 68px;line-height: 80px;text-align: center;font-family: var(--b3-font-family-emoji);margin-right: 16px;"> &#x${a.Properties?.icon} </div>`:""}</div>`:""}
2127
+ ${o?`<h1 ${Jn(a)} data-type="NodeHeading" class="h1">${a.Properties?.title}</h1>`:""}
2128
+ ${await r(a,this)}</div>`;return o&&(c=`<div class="protyle-wysiwyg protyle-wysiwyg--attr" id="preview">
2129
+ <div id="oceanpress-left-sidebar">
2130
+ ${t.sidebarCode.leftCode}
2131
+ ${t.sidebarCode.enableDocTree?`<div id="oceanpress-doctree"></div>
2132
+ <script src="${await this.getTopPathPrefix()}${j2}" async><\/script>`:""}
2133
+ </div>
2134
+ ${c}
2135
+ <div id="oceanpress-right-sidebar">${t.sidebarCode.rightCode}</div>
2136
+ </div>`),c},async NodeHeading(a){const o=`h${a.HeadingLevel}`;let c=`<${o} ${Jn(a)}>${await r(a,this)}</${o}>`;if(this.nodeStack[this.nodeStack.length-2]?.Type==="NodeBlockQueryEmbedScript"){let d=!1;for(const f of a.Parent.Children??[])f===a?d=!0:f!==a&&f.Type==="NodeHeading"?d=!1:d&&(c+=`
2137
+ `+await s(f,this))}return c},NodeText:M0,async NodeList(a){return Id`<div ${Jn(a)}>${await r(a,this)}</div>`},async NodeListItem(a){return Id`<div ${await Jn(a)}>
2138
+ <div class="protyle-action">
2139
+ ${a.ListData?.Typ===1?atob(a.ListData?.Marker??""):a.ListData?.Typ===3?`<svg><use xlink:href="#${a.Children?.find(o=>o.Type==="NodeTaskListItemMarker")?.TaskListItemChecked?"iconCheck":"iconUncheck"}"></use></svg>`:'<svg><use xlink:href="#iconDot"></use></svg>'}
2140
+ </div>
2141
+ ${await r(a,this)}
2142
+ </div>`},NodeTaskListItemMarker:fs,async NodeParagraph(a){return`<div ${Jn(a)}><div spellcheck="false">${await r(a,this)}</div></div>`},async NodeTextMark(a){const o=this;let c="";for(const d of(a.TextMarkType?.split(" ")??[]).reverse())c===""?c=await l(a,d,a.TextMarkTextContent??""):c=await l(a,d,c);return c;async function l(d,f,m){if(f==="inline-math")return`<span data-type="inline-math" data-subtype="math" data-content="${d.TextMarkInlineMathContent}" class="render-node"></span>`;if(f==="inline-memo")return`${m}<sup>(${d.TextMarkInlineMemoContent})</sup>`;if(f==="block-ref"){let h="";if(d.TextMarkBlockRefID){const g=await e.getDocByChildID(d.TextMarkBlockRefID);g?.ID?(h=`${await o.getTopPathPrefix()}${await e.getHPathByID_Node(g)}.html#${d.TextMarkBlockRefID}`,o.refs.add(g.ID)):Yl(`未查找到${d.ID}所指向的文档节点 ${d.TextMarkBlockRefID}`)}else Yl(`${d.ID} 块引用没有设定 ref id`);return`<span data-type="${d.TextMarkType}" data-subtype="${d.TextMarkBlockRefSubtype}" data-id="${d.TextMarkBlockRefID}"><a href="${h}">${m}</a></span>`}else if(f==="a"){let h=d.TextMarkAHref;return h?.startsWith("assets/")&&(h=`${await o.getTopPathPrefix()}/${h}`),`<a href="${h}">${m}</a>`}else return"strong em u s mark sup sub kbd tag code strong code text".includes(f??"")?`<span ${Jn(d,{data_type:f})}>${m}</span>`:hu(`没有找到对应的渲染器 ${d.TextMarkType} ${o.nodeStack[0].Properties?.title}`)}},async NodeImage(a){let o="";const c=a.Children?.filter(f=>f.Type==="NodeLinkDest");c?.length===1?o=await s(c[0],this):c?.length&&c.length>1&&Yl("NodeImage 存在多个 LinkDest",a);let l="";const d=a.Children?.filter(f=>f.Type==="NodeLinkTitle");return d?.length===1?l=await s(d[0],this):d?.length&&d.length>1&&Yl("NodeImage 存在多个 LinkTitle",a),`<span ${await Jn(a)} style="${a.Properties?.["parent-style"]??""}">
2143
+ <img
2144
+ src="${o}"
2145
+ data-src="${o}"
2146
+ title="${l}"
2147
+ style="${a.Properties?.style??""}"
2148
+ loading="lazy"
2149
+ />
2150
+ <span class="protyle-action__title">${l}</span></span>`},async NodeLinkDest(a){return/^(?:[a-z]+:)?\/\/|^(?:\/)/.test(a.Data??"")?a.Data??"":`${await this.getTopPathPrefix()}/${a.Data}`},NodeLinkTitle:M0,NodeKramdownSpanIAL:fs,async NodeSuperBlock(a){return`<div ${Jn(a)} data-sb-layout="${tv(a,"NodeSuperBlockLayoutMarker")}">${await r(a,this)}</div>`},NodeSuperBlockOpenMarker:fs,NodeSuperBlockCloseMarker:fs,NodeSuperBlockLayoutMarker:fs,async NodeBlockQueryEmbed(a){return`<div ${Jn(a)} data-type="NodeBlockquote" class="bq"> ${await r(a,this)} </div>`},NodeOpenBrace:fs,NodeCloseBrace:fs,async NodeBlockQueryEmbedScript(a){const o=a.Data;if(!o)return console.log("no sql",a),Id`<pre>${o}</pre>`;let c="";const l=await Vi.query_sql({stmt:ev(o).replace(/_esc_newline_/g,`
2151
+ `)}).catch(d=>{throw new Error(`sql error: ${d.message}
2152
+ rawSql:${o}
2153
+ unescapingSql:${ev(o)}`)});for(const d of l){const f=await e.getNodeByID(d.id);if(f===void 0)return hu("未找到此块,可能为跨笔记引用",d.id,o);c+=await s(f,this)}return c},async NodeBlockquote(a){return Id`<div ${Jn(a)}>${await r(a,this)}</div>`},NodeBlockquoteMarker:fs,NodeCodeBlock:async function(a){const[o,c]=W2(a);return o?`<div ${Jn(a)} data-content="${Jne(a.Children?.find(l=>l.Type==="NodeCodeBlockCode")?.Data??"")}">
2154
+ <div spin="1"></div>
2155
+ <div class="protyle-attr" contenteditable="false"></div>
2156
+ </div>`:`<div ${Jn(a)}>
2157
+ <div class="protyle-action">
2158
+ <span class="protyle-action--first protyle-action__language">${await s(a.Children?.find(l=>l.Type==="NodeCodeBlockFenceInfoMarker"),this)}</span>
2159
+ <span class="fn__flex-1"></span><span class="protyle-icon protyle-icon--only protyle-action__copy"><svg><use xlink:href="#iconCopy"></use></svg></span>
2160
+ </div>
2161
+ ${await s(a.Children?.find(l=>l.Type==="NodeCodeBlockCode"),this)}
2162
+ </div>`},NodeCodeBlockFenceInfoMarker:async a=>atob(a.CodeBlockInfo??""),NodeCodeBlockCode:async a=>`<div class="hljs" spellcheck="false">${a.Data}</div>`,NodeCodeBlockFenceOpenMarker:fs,NodeCodeBlockFenceCloseMarker:fs,async NodeTable(a){return`<div ${Jn(a)}>
2163
+ <div>
2164
+ <table spellcheck="false">
2165
+ <colgroup>
2166
+ ${a.TableAligns?.map(()=>"<col />").join("")}
2167
+ </colgroup>
2168
+ ${await s(a.Children?.find(o=>o.Type==="NodeTableHead"),this)}
2169
+ <tbody>
2170
+ ${(await Promise.all(a.Children?.filter(o=>o.Type==="NodeTableRow").map(o=>s(o,this))??[])).join(`
2171
+ `)}
2172
+ </tbody>
2173
+ </table>
2174
+ </div>
2175
+ </div>`},async NodeTableHead(a){return`<${a.Data}>${await r(a,this)}</${a.Data}>`},async NodeTableRow(a){return`<tr>${await r(a,this)}</tr>`},async NodeTableCell(a){return`<td>${await r(a,this)}</td>`},NodeHTMLBlock:async a=>`<div ${Jn(a)}>${a.Data}</div>`,NodeThematicBreak:async a=>`<div ${Jn(a)}><div></div></div>`,NodeMathBlock:async a=>`<div ${Jn(a)} data-content="${tv(a,"NodeMathBlockContent")}">
2176
+ <div spin="1"></div>
2177
+ </div>`,NodeMathBlockOpenMarker:fs,NodeMathBlockCloseMarker:fs,async NodeIFrame(a){return` <div ${Jn(a)}>
2178
+ <div class="iframe-content">
2179
+ ${a.Data?.replace(/src="assets\//,`src="${await this.getTopPathPrefix()}/assets/`)}
2180
+ </div>
2181
+ </div>`},async NodeVideo(a){return await this.NodeIFrame(a)},async NodeAudio(a){return await this.NodeIFrame(a)},NodeHeadingC8hMarker:fs,async NodeSoftBreak(a){return"​"},async NodeBr(a){return`<${a.Data}>`},async NodeWidget(a){return`<div ${Jn(a)}><img src="${await this.getTopPathPrefix()}/assets/widget/${a.ID}.jpg"/></div>`},async NodeBackslash(a){return a.Data===void 0||a.Data==="span"?`${await r(a,this)}`:hu(`未定义的 NodeBackslash 处理 ${a.Data}`,this.nodeStack[0].Properties?.title)},NodeBackslashContent:M0}});function tv(e,t){return e.Children?.find(n=>n.Type===t)?.Data}function Yl(...e){console.warn(`
2182
+ `,...e)}function sre(e,t){const n=[];t.sitemap?.siteLink&&n.push({name:t.sitemap?.title||"首页",url:t.sitemap.siteLink});const r=e.split("/").filter(i=>i.length>0);let s="";for(const i of r)s+="/"+i,n.push({name:i,url:`${t.sitemap?.siteLink||""}${s}.html`});return n}function ire(e,t){return Gc(function*(){const n=yield*gu,r=yield*dv,s=t?.renderHtmlFn??mh,i=e.notebook,a={},o=are();let c=0,l=0;function d(T){return l+=c,S=>{c=S*T,r.percentage((l+c)*100)}}r.log(`=== 开始编译 ${i.name} ===`);let f=d(.4);const m=yield*Br(()=>gv(i.id));function h(T){const S=e.__skipBuilds__[T.id]?.refs??[];for(const w of S){const v=m.find(F=>F.id===w)?.hash,O=e.__skipBuilds__[w]?.hash;if(v===void 0||O===void 0)return!1;if(v===O)continue;return!1}return!0}r.log("=== 查询文档级block完成 ===");let g=0;yield*Br(()=>Promise.all(m.map(async T=>{const S=await hv(_b(T));a[T.hpath]={sy:S,docBlock:T},g++,f(g/m.length)})));const b={};f=d(.4);const p=Yh.version!==e.OceanPress.version?(r.log(`配置文件版本号[${e.OceanPress.version}]与OceanPress版本[${Yh.version}]不一致,将进行文档全量编译`),!1):e.enableIncrementalCompilation_doc;r.log("=== 开始渲染文档 ===");const y=Date.now();yield*YA(Object.entries(a).map(([T,{sy:S,docBlock:w}])=>Gc(function*(){if(e.enableIncrementalCompilation&&p&&e.__skipBuilds__[w.id]?.hash===w.hash&&h(w))return"/** skip */";const v=yield*G2;try{const O=T.split("/").length-2,F=yield*s(S,v),X=e.sitemap.siteLink?`${e.sitemap.siteLink}${T}.html`:`${T}.html`;if(b[T+".html"]=yield*Br(()=>Zne({title:S.Properties?.title||"",htmlContent:F,level:O,seoData:{doc:S,config:e,pageUrl:X,breadcrumbs:sre(T,e)}},{...Rd.cdn,embedCode:e.embedCode})),e.sitemap.rss&&T.endsWith(".rss.xml")){const me=T;b[me]=yield*Br(()=>Hne(me,v,e,n.getHPathByID_Node)),r.log(`渲染 rss.xml:${me} 完毕`)}e.enableIncrementalCompilation&&e.enableIncrementalCompilation_doc&&o.add(w.id,{hash:w.hash}),o.add(w.id,{refs:[...v.refs.values()]})}catch(O){r.log(`${T} 渲染失败:${O}`),console.log(O)}})),{concurrency:6});const A=((Date.now()-y)/1e3).toFixed(2);if(r.log(`=== 文档渲染完毕,共 ${Object.keys(a).length+1}篇,耗时: ${A}秒 ===`),r.log("=== 开始生成 sitemap.xml ==="),e.sitemap.enable&&(b["sitemap.xml"]=qne(m,e.sitemap)),e.excludeAssetsCopy===!1){r.log("=== 开始复制资源文件 ===");const T=yield*Br(()=>Vi.query_sql({stmt:`SELECT * from assets
2183
+ WHERE box = '${i.id}'
2184
+ limit 150000 OFFSET 0`}));yield*Br(()=>Promise.all(T.map(async v=>{e.enableIncrementalCompilation&&e.__skipBuilds__[v.id]?.hash===v.hash||(b[v.path]=await Vi.get_assets({path:v.path}),e.enableIncrementalCompilation&&o.add(v.id,{hash:v.hash}))}))),r.log("=== 开始复制挂件资源文件 ===");const S=yield*Br(()=>Vi.query_sql({stmt:`
2185
+ SELECT *
2186
+ from blocks
2187
+ WHERE box = '${i.id}'
2188
+ AND type = 'widget'
2189
+ limit 150000 OFFSET 0
2190
+ `})),w=(yield*Br(()=>Promise.all(S.map(async v=>await mv(v.id))))).filter(v=>v?.Properties?.["custom-oceanpress-widget-update"]).map(async v=>{if(!v||!v?.ID)return;const O=v?.Properties?.["custom-oceanpress-widget-update"];if(!(e.enableIncrementalCompilation&&e.__skipBuilds__[v.ID]?.updated===O)){const F=v.ID;b[`assets/widget/${F}.jpg`]=await Vi.file_getFile({path:`data/storage/oceanpress/widget_img/${F}.jpg`}),e.enableIncrementalCompilation&&o.add(F,{updated:O})}});yield*Br(()=>Promise.all(w))}return e.sidebarCode.enableDocTree&&(r.log("=== 开始生成文档树 ==="),b[j2]=yield*ere(),r.log("=== 文档树生成完成 ===")),t?.beforeFileTree&&(yield*Br(()=>Promise.resolve(t.beforeFileTree(b,r)))),t?.onFileTree&&(yield*Br(()=>Promise.resolve(t.onFileTree(b,r)))),e.compressedZip&&(r.log("=== 开始生成压缩包 ==="),yield*Br(()=>p5(b,{withoutZip:Rd.withoutPublicZip,publicZip:Rd.cdn.publicZip}))),e.OceanPress.version=Yh.version,o.write(),r.percentage(100),r.log("编译完毕"),{fileTree:b}})}function are(){const e={};return{add(t,n){e[t]===void 0&&(e[t]={}),Oy(e[t],n)},write(){Oy(nt.value.__skipBuilds__,e)}}}class ore{constructor(t){this._funMap=t;const n=this;this.fun=new Proxy({},{get(r,s,i){const a=Reflect.get(n._funMap,s,i);return typeof a=="function"?(...o)=>n.callFn(s,a)(...o):a}})}plugins=[];registerPlugin(t){this.plugins.push(t)}removePlugin(t){this.plugins=this.plugins.filter(n=>n!==t)}callFn(t,n){return((...r)=>{const s=new cre(n);for(const i of this.plugins){const a=i[t];a&&s.use(a)}return s.runMiddlewareHandel(...r)})}pluginType=0;fun}class cre{constructor(t){this.handel=t}middlewares=[];use(t){this.middlewares.push(t)}runMiddlewareHandel(...t){let n=0;const r=((...s)=>{const i=this.middlewares[n];return n++,i===void 0?this.handel.call(this,...s):i(s,r)});return r.call(this,...t)}}class lre{constructor(t){this.config=t,t.meilisearch.enable&&this.pluginCenter.registerPlugin(new L4(t.meilisearch)),t.s3.enable&&this.pluginCenter.registerPlugin(fne),t.oceanPressServer.enable&&this.pluginCenter.registerPlugin(y5(this.config)),t.markdownMirror.enable&&this.pluginCenter.registerPlugin(new Mne(t.markdownMirror))}build(){return this.pluginCenter.fun.build(this.config,{renderHtmlFn:this.pluginCenter.fun.build_renderHTML,onFileTree:this.pluginCenter.fun.build_onFileTree})}funMap={build:ire,build_renderHTML:mh,build_onFileTree:(t,n)=>{}};pluginCenter=new ore(this.funMap)}function ure(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!pb(e)}const dre=mt({setup(){const e=kR(),t=Me(!1),n=Me(""),r=Fe(()=>Object.entries(qo).filter(([c,l])=>c.startsWith("__")?!1:typeof l=="object").map(([c,l])=>({key:c,value:l})));function s(){n.value===""?e.warning("名称不能为空"):n.value in qo?e.warning("不能和已有的配置项重名"):(XA(n.value),t.value=!1)}function i(c){return c.startsWith("__")?(e.warning("名称不能以双下划线开头"),!1):!0}function a(){const c=JSON.stringify(qo,null,2),d=new TextEncoder().encode(c),f=new Blob([d],{type:"text/plain;charset=utf-8"}),m=document.createElement("a");m.href=URL.createObjectURL(f),m.download="oceanpress.json",m.click()}async function o(){const c=document.createElement("input");c.type="file",c.click();const d=await(await new Promise(m=>{c.addEventListener("change",()=>{m(c.files[0])})})).text(),f=JSON.parse(d);if(typeof f=="object"){const m=QA(ZA(f),fv,Ev);await Af(m),e.success("导入成功")}}return{showModal:t,name:n,tabs:r,add:s,validateInput:i,downConfig:a,importConfig:o}},render(){let e;return Ne("div",null,[Ne(dB,{value:qo.__current__,"onUpdate:value":t=>qo.__current__=t,type:"card",animated:!0,addable:!0,closable:!0,onAdd:()=>this.showModal=!0,onClose:t=>delete qo[t]},ure(e=this.tabs.map(t=>Ne(oB,{name:t.key,tab:t.key},{default:()=>[t.key]})))?e:{default:()=>[e]}),Ne(Hr,null,null),Ne(FR,{align:"center"},{default:()=>[Ne(Ji,{onClick:this.importConfig},{default:()=>[$t("导入配置文件")],icon:()=>"📂"}),Ne(Ji,{onClick:this.downConfig},{default:()=>[$t("导出配置文件")],icon:()=>"📝"})]}),Ne(AR,{show:this.showModal,"onUpdate:show":t=>this.showModal=t},{default:()=>[Ne($v,{style:"width: 600px",title:"输入配置名",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{default:()=>[Ne(hr,{value:this.name,"onUpdate:value":t=>this.name=t,placeholder:"输入配置名",maxlength:30,"show-count":!0,"clearable:allow-input":this.validateInput},null),Ne("br",null,null),Ne("br",null,null),Ne(Ji,{type:"primary",onClick:()=>this.add(),disabled:!this.validateInput(this.name)},{default:()=>[$t("确认")]}),Ne("br",null,null),$t("不能以双下划线(__)开头、也不能为空、不能和已有的配置项重名")]})]})])}});function fre(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!pb(e)}const hre=mt({props:{notebooks:{type:Array,required:!0}},setup(e){const t=Fe({get:()=>nt.value.notebook.id,set:r=>{Object.assign(nt.value.notebook,e.notebooks.find(s=>s.id===r))}}),n=on(e,"notebooks");return{value:t,notebooks:n}},render(){let e;return Ne(yh,{title:"选择笔记本",description:"选择你需要的笔记本"},{default:()=>[Ne(fR,{value:this.value,"onUpdate:value":t=>this.value=t},fre(e=this.notebooks.map(t=>Ne(cR,{key:t.id,label:t.name,value:t.id},null)))?e:{default:()=>[e]})]})}}),mre=mt({render(){return Ne(yh,{title:"其他配置"},{default:()=>[Ne(eR,null,{default:()=>[Ne(ld,{title:"打包选项",name:"1",style:"text-align: start"},{default:()=>[Ne(zi,{checked:nt.value.compressedZip,"onUpdate:checked":e=>nt.value.compressedZip=e},{default:()=>[$t("打包成 zip(在浏览器端打包完毕后会弹出保存对话窗口)")]}),Ne(Hr,null,null),Ne(zi,{checked:nt.value.excludeAssetsCopy,"onUpdate:checked":e=>nt.value.excludeAssetsCopy=e},{default:()=>[$t("不复制 assets/ 资源,勾选此选项则需要自行处理资源文件")]}),Ne(Hr,null,null),Ne(zi,{checked:nt.value.sitemap.enable,"onUpdate:checked":e=>nt.value.sitemap.enable=e},{default:()=>[$t("输出 sitemap.xml 文件")]}),Ne("br",null,null),Ne("h4",null,[$t("路径前缀")]),Ne(hr,{value:nt.value.sitemap.sitePrefix,"onUpdate:value":e=>nt.value.sitemap.sitePrefix=e},null),$t('默认值为 "." 生成路径例如 "./record/思源笔记.html" '),Ne("br",null,null),$t('但 sitemap 并不建议采用相对路径所以应该替换成例如 "https://shenzilong.cn" '),Ne("br",null,null),$t('则会生成 "https://shenzilong.cn/record/思源笔记.html" 这样的绝对路径'),Ne("br",null,null),$t("参见 https://www.sitemaps.org/protocol.html#escaping"),Ne(Hr,null,null),Ne(zi,{checked:nt.value.enableIncrementalCompilation,"onUpdate:checked":e=>nt.value.enableIncrementalCompilation=e},{default:()=>[$t("开启增量编译,当资源的 hash 值没有变化时不会编译"),Ne("br",null,null),$t("会根据配置文件中的__skipBuilds__字段跳过一些没有变化不需要重新输出的内容"),Ne("br",null,null)]}),Ne("br",null,null),Ne(zi,{checked:nt.value.enableIncrementalCompilation_doc,"onUpdate:checked":e=>nt.value.enableIncrementalCompilation_doc=e},{default:()=>[$t("增量编译文档,当需要重新全量编译文档时不勾选此项,需要上方选项勾选,此选项才能生效")]}),Ne(Hr,null,null),Ne("h3",null,[$t("head")]),$t("此处的代码将添加至 head 标签顶部"),Ne(hr,{value:nt.value.embedCode.head,"onUpdate:value":e=>nt.value.embedCode.head=e,type:"textarea"},null),Ne("h3",null,[$t("beforeBody")]),$t("此处的代码将添加至 body 标签顶部"),Ne(hr,{value:nt.value.embedCode.beforeBody,"onUpdate:value":e=>nt.value.embedCode.beforeBody=e,type:"textarea"},null),Ne("h3",null,[$t("afterBody")]),$t("此处的代码将添加至 body 标签底部"),Ne(hr,{value:nt.value.embedCode.afterBody,"onUpdate:value":e=>nt.value.embedCode.afterBody=e,type:"textarea"},null)]}),Ne(ld,{title:"meilisearch 配置",name:"3"},{default:()=>[Ne(zi,{checked:nt.value.meilisearch.enable,"onUpdate:checked":e=>nt.value.meilisearch.enable=e},{default:()=>[$t("启用 meilisearch 搜索引擎")]}),Ne("a",{target:"_blank",href:"https://shenzilong.cn/%E6%83%B3%E6%B3%95/%E9%A1%B9%E7%9B%AE/OceanPress_js/%E8%87%AA%E5%BB%BAmeilisearch%E6%90%9C%E7%B4%A2"},[$t("自建meilisearch搜索")]),Ne(Hr,null,null),Ne(hr,{value:nt.value.meilisearch.host,"onUpdate:value":e=>nt.value.meilisearch.host=e,placeholder:"meilisearch.host"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.meilisearch.apiKey,"onUpdate:value":e=>nt.value.meilisearch.apiKey=e,placeholder:"meilisearch.apiKey"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.meilisearch.indexName,"onUpdate:value":e=>nt.value.meilisearch.indexName=e,placeholder:"meilisearch.indexName"},null)]}),Ne(ld,{title:"部署到 S3",name:"4"},{default:()=>[$t("OceanPress 的运算都是在本地,不会收集密钥,请确保网址是 https 加密的 oceanpress.heartstack.space"),Ne("br",null,null),Ne(zi,{checked:nt.value.s3.enable,"onUpdate:checked":e=>nt.value.s3.enable=e},{default:()=>[$t("启用 s3")]}),Ne(hr,{value:nt.value.s3.region,"onUpdate:value":e=>nt.value.s3.region=e,placeholder:"s3.region"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.s3.bucket,"onUpdate:value":e=>nt.value.s3.bucket=e,placeholder:"s3.bucket"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.s3.pathPrefix,"onUpdate:value":e=>nt.value.s3.pathPrefix=e,placeholder:"s3.pathPrefix"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.s3.endpoint,"onUpdate:value":e=>nt.value.s3.endpoint=e,placeholder:"s3.endpoint"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.s3.accessKeyId,"onUpdate:value":e=>nt.value.s3.accessKeyId=e,placeholder:"s3.accessKeyId"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.s3.secretAccessKey,"onUpdate:value":e=>nt.value.s3.secretAccessKey=e,type:"password",placeholder:"s3.secretAccessKey"},null)]}),Ne(ld,{title:"部署到 OceanPress Server",name:"5"},{default:()=>[Ne(zi,{checked:nt.value.oceanPressServer.enable,"onUpdate:checked":e=>nt.value.oceanPressServer.enable=e},{default:()=>[$t("启用 OceanPress Server")]}),Ne(Hr,null,null),Ne(hr,{value:nt.value.oceanPressServer.apiBase,"onUpdate:value":e=>nt.value.oceanPressServer.apiBase=e,placeholder:"apiBase"},null),Ne(Hr,null,null),Ne(hr,{value:nt.value.oceanPressServer.apiKey,"onUpdate:value":e=>nt.value.oceanPressServer.apiKey=e,placeholder:"apiKey"},null)]})]})]})}}),gre=mt({props:{percentage:{type:Number,default:0},log:{type:String,default:""}},emits:{saveToDisk(e){},generateClick(){},uploadS3(){}},setup(e,t){const n=Fe(()=>"showDirectoryPicker"in globalThis);async function r(){const s=await showDirectoryPicker({mode:"readwrite"});if(!s){console.log("showDirectoryPicker() 未返回有效值");return}t.emit("saveToDisk",s)}return()=>Ne(yh,{title:"开始生成",description:"点击开始生成后请耐心等待,生成完成后会自动弹出下载"},{default:()=>[Ne("div",null,[Ne(Ji,{type:"success",loading:e.percentage>0&&e.percentage<100,onClick:()=>t.emit("generateClick")},{default:()=>[$t("开始生成")]})," ",Ne(Ji,{disabled:!n,type:"success",loading:e.percentage>0&&e.percentage<100,onClick:()=>r()},{default:()=>[$t("保存到本地磁盘")]}),Ne(eB,{type:"line",percentage:e.percentage,"indicator-placement":"inside",style:{marginTop:"12px"}},null),Ne("pre",null,[e.log])])]})}}),_re=mt({setup(){const e=JA.notebook_lsNotebooks(),t=Fe(()=>{let a=0;return e.value.fulfilled&&(a=2),a=5,a}),n=Me(0),r=Me(!1),s=Me("");async function i(a){r.value=!0,s.value="";const o=new lre(nt.value);a?.dir_ref&&o.pluginCenter.registerPlugin({build_onFileTree([d]){bre(d,a.dir_ref)}});const c=uv().pipe(nc(gu,yv),nc(fv,Ev),nc(wf,nt.value),nc(dv,{log:d=>{s.value+=d+`
2191
+ `},percentage:d=>{n.value=d}})),l=F0(o.build(),c);await Af(l),r.value=!1,n.value=100}return()=>Ne(ma,null,[Ne(dre,null,null),Ne(iB,{vertical:!0,current:t.value,status:"process"},{default:()=>[Ne(yh,{title:"鉴权配置"},{default:()=>[$t("http apiPrefix:"),Ne(hr,{"show-password-on":"mousedown",placeholder:"例如: http:127.0.0.1:6806",value:nt.value.apiPrefix,"onUpdate:value":a=>nt.value.apiPrefix=a},null),$t("authorized:"),Ne(BI,null,{default:()=>[Ne(hr,{type:"password","show-password-on":"mousedown",placeholder:"输入:siyuan-设置-关于-API授权码",value:nt.value.authorized,"onUpdate:value":a=>nt.value.authorized=a},null),Ne(Ji,{type:"primary",ghost:!0,onClick:e.value.reLoad},{default:()=>[$t("确定")]})]})]}),e.value.fulfilled&&Ne(hre,{notebooks:e.value.data.notebooks},null),Ne(mre,null,null),Ne(gre,{percentage:n.value,log:s.value,onGenerateClick:()=>i(),onSaveToDisk:a=>i({dir_ref:a})},null)]})])}});async function bre(e,t){await Promise.all(Object.entries(e).map(async([r,s])=>{await n(t,r,s).catch(i=>{console.log(i,t)})}));async function n(r,s,i){const a=s.split("/");if(a.length>1)for(let l=0;l<a.length-1;l++){const d=a[l];d!==""&&(r=await r.getDirectoryHandle(d,{create:!0}))}const c=await(await r.getFileHandle(a[a.length-1],{create:!0})).createWritable();await c.write(i),await c.close()}}export{_re as default};