oceanpress 1.0.3

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,1735 @@
1
+ var h2=Object.defineProperty;var m2=(e,t,n)=>t in e?h2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>m2(e,typeof t!="symbol"?t+"":t,n);import{r as Fe,a as Rc,w as Yr,c as ze,g as Wb,o as uo,b as ci,d as Gb,e as es,f as b2,h as g2,C as p2,i as bt,j as N,T as y2,t as sn,k as E2,u as C2,F as na,l as Vb,m as zt,n as Kb,p as lx,q as Yb,s as Jr,v as Js,x as x2,y as cf,z as v2,A as _2,B as T2,D as j,E as oe,G as ee,H as jo,N as Yf,I as Xf,J as Us,K as Xb,L as ds,M as ae,O as hr,P as $s,Q as nn,R as lf,S as fs,U as uf,V as Qb,W as ux,X as $i,Y as Zs,Z as Mr,_ as We,$ as dx,a0 as fx,a1 as Zb,a2 as hx,a3 as mx,a4 as Jb,a5 as S2,a6 as Zl,a7 as df,a8 as Qf,a9 as bx,aa as ha,ab as eg,ac as tg,ad as ng,ae as ff,af as w2,ag as gx,ah as Qp,ai as A2,aj as k2,ak as R2,al as I2,am as B2,an as Uo,ao as Bl,ap as px,aq as P2,ar as N2,as as O2,at as Ih,au as Bh,av as Zp,aw as et,ax as Be,ay as Ao,az as D2,aA as L2,aB as M2}from"./index-CgSYWV1W.js";function Jp(e,t){let{target:n}=e;for(;n;){if(n.dataset&&n.dataset[t]!==void 0)return!0;n=n.parentElement}return!1}function rg(e){return e.composedPath()[0]||null}function Jl(e){return typeof e=="string"?e.endsWith("px")?Number(e.slice(0,e.length-2)):Number(e):e}function vs(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 F2(e,t){const[n,r]=e.split(" ");return{row:n,col:r||n}}function yd(e){return e.composedPath()[0]}const z2={mousemoveoutside:new WeakMap,clickoutside:new WeakMap};function U2(e,t,n){if(e==="mousemoveoutside"){const r=s=>{t.contains(yd(s))||n(s)};return{mousemove:r,touchstart:r}}else if(e==="clickoutside"){let r=!1;const s=a=>{r=!t.contains(yd(a))},i=a=>{r&&(t.contains(yd(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 yx(e,t,n){const r=z2[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=U2(e,t,n)),i}function $2(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const s=yx(e,t,n);return Object.keys(s).forEach(i=>{$n(i,document,s[i],r)}),!0}return!1}function H2(e,t,n,r){if(e==="mousemoveoutside"||e==="clickoutside"){const s=yx(e,t,n);return Object.keys(s).forEach(i=>{cr(i,document,s[i],r)}),!0}return!1}function q2(){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(T,k,R){const V=T[k];return T[k]=function(){return R.apply(T,arguments),V.apply(T,arguments)},T}function i(T,k){T[k]=Event.prototype[k]}const a=new WeakMap,o=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function c(){var T;return(T=a.get(this))!==null&&T!==void 0?T:null}function l(T,k){o!==void 0&&Object.defineProperty(T,"currentTarget",{configurable:!0,enumerable:!0,get:k??o.get})}const u={bubble:{},capture:{}},f={};function m(){const T=function(k){const{type:R,eventPhase:V,bubbles:Q}=k,A=yd(k);if(V===2)return;const W=V===1?"capture":"bubble";let _=A;const Y=[];for(;_===null&&(_=window),Y.push(_),_!==window;)_=_.parentNode||null;const De=u.capture[R],te=u.bubble[R];if(s(k,"stopPropagation",n),s(k,"stopImmediatePropagation",r),l(k,c),W==="capture"){if(De===void 0)return;for(let Me=Y.length-1;Me>=0&&!e.has(k);--Me){const de=Y[Me],Ue=De.get(de);if(Ue!==void 0){a.set(k,de);for(const J of Ue){if(t.has(k))break;J(k)}}if(Me===0&&!Q&&te!==void 0){const J=te.get(de);if(J!==void 0)for(const Z of J){if(t.has(k))break;Z(k)}}}}else if(W==="bubble"){if(te===void 0)return;for(let Me=0;Me<Y.length&&!e.has(k);++Me){const de=Y[Me],Ue=te.get(de);if(Ue!==void 0){a.set(k,de);for(const J of Ue){if(t.has(k))break;J(k)}}}}i(k,"stopPropagation"),i(k,"stopImmediatePropagation"),l(k)};return T.displayName="evtdUnifiedHandler",T}function h(){const T=function(k){const{type:R,eventPhase:V}=k;if(V!==2)return;const Q=f[R];Q!==void 0&&Q.forEach(A=>A(k))};return T.displayName="evtdUnifiedWindowEventHandler",T}const b=m(),p=h();function E(T,k){const R=u[T];return R[k]===void 0&&(R[k]=new Map,window.addEventListener(k,b,T==="capture")),R[k]}function g(T){return f[T]===void 0&&(f[T]=new Set,window.addEventListener(T,p)),f[T]}function y(T,k){let R=T.get(k);return R===void 0&&T.set(k,R=new Set),R}function w(T,k,R,V){const Q=u[k][R];if(Q!==void 0){const A=Q.get(T);if(A!==void 0&&A.has(V))return!0}return!1}function x(T,k){const R=f[T];return!!(R!==void 0&&R.has(k))}function S(T,k,R,V){let Q;if(typeof V=="object"&&V.once===!0?Q=De=>{C(T,k,Q,V),R(De)}:Q=R,$2(T,k,Q,V))return;const W=V===!0||typeof V=="object"&&V.capture===!0?"capture":"bubble",_=E(W,T),Y=y(_,k);if(Y.has(Q)||Y.add(Q),k===window){const De=g(T);De.has(Q)||De.add(Q)}}function C(T,k,R,V){if(H2(T,k,R,V))return;const A=V===!0||typeof V=="object"&&V.capture===!0,W=A?"capture":"bubble",_=E(W,T),Y=y(_,k);if(k===window&&!w(k,A?"bubble":"capture",T,R)&&x(T,R)){const te=f[T];te.delete(R),te.size===0&&(window.removeEventListener(T,p),f[T]=void 0)}Y.has(R)&&Y.delete(R),Y.size===0&&_.delete(k),_.size===0&&(window.removeEventListener(T,b,W==="capture"),u[W][T]=void 0)}return{on:S,off:C}}const{on:$n,off:cr}=q2();function Ex(e){const t=Fe(!!e.value);if(t.value)return Rc(t);const n=Yr(e,r=>{r&&(t.value=!0,n())});return Rc(t)}function no(e){const t=ze(e),n=Fe(t.value);return Yr(t,r=>{n.value=r}),typeof e=="function"?n:{__v_isRef:!0,get value(){return n.value},set value(r){e.set(r)}}}function Cx(){return Wb()!==null}const sg=typeof window<"u";let Wo,Dl;const j2=()=>{var e,t;Wo=sg?(t=(e=document)===null||e===void 0?void 0:e.fonts)===null||t===void 0?void 0:t.ready:void 0,Dl=!1,Wo!==void 0?Wo.then(()=>{Dl=!0}):Dl=!0};j2();function W2(e){if(Dl)return;let t=!1;uo(()=>{Dl||Wo==null||Wo.then(()=>{t||e()})}),ci(()=>{t=!0})}const Pl=Fe(null);function ey(e){if(e.clientX>0||e.clientY>0)Pl.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?Pl.value={x:n+s/2,y:r+i/2}:Pl.value={x:0,y:0}}else Pl.value=null}}let Uu=0,ty=!0;function G2(){if(!sg)return Rc(Fe(null));Uu===0&&$n("click",document,ey,!0);const e=()=>{Uu+=1};return ty&&(ty=Cx())?(Gb(e),ci(()=>{Uu-=1,Uu===0&&cr("click",document,ey,!0)})):e(),Rc(Pl)}const V2=Fe(void 0);let $u=0;function ny(){V2.value=Date.now()}let ry=!0;function K2(e){if(!sg)return Rc(Fe(!1));const t=Fe(!1);let n=null;function r(){n!==null&&window.clearTimeout(n)}function s(){r(),t.value=!0,n=window.setTimeout(()=>{t.value=!1},e)}$u===0&&$n("click",window,ny,!0);const i=()=>{$u+=1,$n("click",window,s,!0)};return ry&&(ry=Cx())?(Gb(i),ci(()=>{$u-=1,$u===0&&cr("click",window,ny,!0),cr("click",window,s,!0),r()})):i(),Rc(t)}function $c(e,t){return Yr(e,n=>{n!==void 0&&(t.value=n)}),ze(()=>e.value===void 0?t.value:e.value)}function sy(e,t){return ze(()=>{for(const n of t)if(e[n]!==void 0)return e[n];return e[t[t.length-1]]})}const Y2=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function X2(){return Y2}const Q2=es("n-drawer-body"),Z2=es("n-modal-body"),J2=es("n-modal-provider"),xx=es("n-modal"),eA=es("n-popover-body"),Hc=typeof document<"u"&&typeof window<"u",ig=Fe(!1);function iy(){ig.value=!0}function ay(){ig.value=!1}let Cl=0;function tA(){return Hc&&(Gb(()=>{Cl||(window.addEventListener("compositionstart",iy),window.addEventListener("compositionend",ay)),Cl++}),ci(()=>{Cl<=1?(window.removeEventListener("compositionstart",iy),window.removeEventListener("compositionend",ay),Cl=0):Cl--})),ig}let ko=0,oy="",cy="",ly="",uy="";const dy=Fe("0px");function nA(e){if(typeof document>"u")return;const t=document.documentElement;let n,r=!1;const s=()=>{t.style.marginRight=oy,t.style.overflow=cy,t.style.overflowX=ly,t.style.overflowY=uy,dy.value="0px"};uo(()=>{n=Yr(e,i=>{if(i){if(!ko){const a=window.innerWidth-t.offsetWidth;a>0&&(oy=t.style.marginRight,t.style.marginRight=`${a}px`,dy.value=`${a}px`),cy=t.style.overflow,ly=t.style.overflowX,uy=t.style.overflowY,t.style.overflow="hidden",t.style.overflowX="hidden",t.style.overflowY="hidden"}r=!0,ko++}else ko--,ko||s(),r=!1},{immediate:!0})}),ci(()=>{n==null||n(),r&&(ko--,ko||s(),r=!1)})}function rA(e){const t={isDeactivated:!1};let n=!1;return b2(()=>{if(t.isDeactivated=!1,!n){n=!0;return}e()}),g2(()=>{t.isDeactivated=!0,n||(n=!0)}),t}function fy(e,t,n="default"){const r=t[n];if(r===void 0)throw new Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}const Ro="@@coContext",sA={mounted(e,{value:t,modifiers:n}){e[Ro]={handler:void 0},typeof t=="function"&&(e[Ro].handler=t,$n("clickoutside",e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){const r=e[Ro];typeof t=="function"?r.handler?r.handler!==t&&(cr("clickoutside",e,r.handler,{capture:n.capture}),r.handler=t,$n("clickoutside",e,t,{capture:n.capture})):(e[Ro].handler=t,$n("clickoutside",e,t,{capture:n.capture})):r.handler&&(cr("clickoutside",e,r.handler,{capture:n.capture}),r.handler=void 0)},unmounted(e,{modifiers:t}){const{handler:n}=e[Ro];n&&cr("clickoutside",e,n,{capture:t.capture}),e[Ro].handler=void 0}};function iA(e,t){console.error(`[vdirs/${e}]: ${t}`)}class aA{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&&iA("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 Ph=new aA,Io="@@ziContext",oA={mounted(e,t){const{value:n={}}=t,{zIndex:r,enabled:s}=n;e[Io]={enabled:!!s,initialized:!1},s&&(Ph.ensureZIndex(e,r),e[Io].initialized=!0)},updated(e,t){const{value:n={}}=t,{zIndex:r,enabled:s}=n,i=e[Io].enabled;s&&!i&&(Ph.ensureZIndex(e,r),e[Io].initialized=!0),e[Io].enabled=!!s},unmounted(e,t){if(!e[Io].initialized)return;const{value:n={}}=t,{zIndex:r}=n;Ph.unregister(e,r)}};function hy(e,t){console.error(`[vueuc/${e}]: ${t}`)}const{c:my}=p2(),cA="vueuc-style";function by(e){return typeof e=="string"?document.querySelector(e):e()}const lA=bt({name:"LazyTeleport",props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:Ex(sn(e,"show")),mergedTo:ze(()=>{const{to:t}=e;return t??"body"})}},render(){return this.showTeleport?this.disabled?fy("lazy-teleport",this.$slots):N(y2,{disabled:this.disabled,to:this.mergedTo},fy("lazy-teleport",this.$slots)):null}});var _a=[],uA=function(){return _a.some(function(e){return e.activeTargets.length>0})},dA=function(){return _a.some(function(e){return e.skippedTargets.length>0})},gy="ResizeObserver loop completed with undelivered notifications.",fA=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:gy}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=gy),window.dispatchEvent(e)},eu;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(eu||(eu={}));var Ta=function(e){return Object.freeze(e)},hA=function(){function e(t,n){this.inlineSize=t,this.blockSize=n,Ta(this)}return e}(),vx=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,Ta(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}(),ag=function(e){return e instanceof SVGElement&&"getBBox"in e},_x=function(e){if(ag(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)},py=function(e){var t;if(e instanceof Element)return!0;var n=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},mA=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},Ll=typeof window<"u"?window:{},Hu=new WeakMap,yy=/auto|scroll/,bA=/^tb|vertical/,gA=/msie|trident/i.test(Ll.navigator&&Ll.navigator.userAgent),Vs=function(e){return parseFloat(e||"0")},Go=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new hA((n?t:e)||0,(n?e:t)||0)},Ey=Ta({devicePixelContentBoxSize:Go(),borderBoxSize:Go(),contentBoxSize:Go(),contentRect:new vx(0,0,0,0)}),Tx=function(e,t){if(t===void 0&&(t=!1),Hu.has(e)&&!t)return Hu.get(e);if(_x(e))return Hu.set(e,Ey),Ey;var n=getComputedStyle(e),r=ag(e)&&e.ownerSVGElement&&e.getBBox(),s=!gA&&n.boxSizing==="border-box",i=bA.test(n.writingMode||""),a=!r&&yy.test(n.overflowY||""),o=!r&&yy.test(n.overflowX||""),c=r?0:Vs(n.paddingTop),l=r?0:Vs(n.paddingRight),u=r?0:Vs(n.paddingBottom),f=r?0:Vs(n.paddingLeft),m=r?0:Vs(n.borderTopWidth),h=r?0:Vs(n.borderRightWidth),b=r?0:Vs(n.borderBottomWidth),p=r?0:Vs(n.borderLeftWidth),E=f+l,g=c+u,y=p+h,w=m+b,x=o?e.offsetHeight-w-e.clientHeight:0,S=a?e.offsetWidth-y-e.clientWidth:0,C=s?E+y:0,T=s?g+w:0,k=r?r.width:Vs(n.width)-C-S,R=r?r.height:Vs(n.height)-T-x,V=k+E+S+y,Q=R+g+x+w,A=Ta({devicePixelContentBoxSize:Go(Math.round(k*devicePixelRatio),Math.round(R*devicePixelRatio),i),borderBoxSize:Go(V,Q,i),contentBoxSize:Go(k,R,i),contentRect:new vx(f,c,k,R)});return Hu.set(e,A),A},Sx=function(e,t,n){var r=Tx(e,n),s=r.borderBoxSize,i=r.contentBoxSize,a=r.devicePixelContentBoxSize;switch(t){case eu.DEVICE_PIXEL_CONTENT_BOX:return a;case eu.BORDER_BOX:return s;default:return i}},pA=function(){function e(t){var n=Tx(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=Ta([n.borderBoxSize]),this.contentBoxSize=Ta([n.contentBoxSize]),this.devicePixelContentBoxSize=Ta([n.devicePixelContentBoxSize])}return e}(),wx=function(e){if(_x(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},yA=function(){var e=1/0,t=[];_a.forEach(function(a){if(a.activeTargets.length!==0){var o=[];a.activeTargets.forEach(function(l){var u=new pA(l.target),f=wx(l.target);o.push(u),l.lastReportedSize=Sx(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},Cy=function(e){_a.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(s){s.isActive()&&(wx(s.target)>e?n.activeTargets.push(s):n.skippedTargets.push(s))})})},EA=function(){var e=0;for(Cy(e);uA();)e=yA(),Cy(e);return dA()&&fA(),e>0},Nh,Ax=[],CA=function(){return Ax.splice(0).forEach(function(e){return e()})},xA=function(e){if(!Nh){var t=0,n=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return CA()}).observe(n,r),Nh=function(){n.textContent="".concat(t?t--:t++)}}Ax.push(e),Nh()},vA=function(e){xA(function(){requestAnimationFrame(e)})},Ed=0,_A=function(){return!!Ed},TA=250,SA={attributes:!0,characterData:!0,childList:!0,subtree:!0},xy=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],vy=function(e){return e===void 0&&(e=0),Date.now()+e},Oh=!1,wA=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=TA),!Oh){Oh=!0;var r=vy(t);vA(function(){var s=!1;try{s=EA()}finally{if(Oh=!1,t=r-vy(),!_A())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,SA)};document.body?n():Ll.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),xy.forEach(function(n){return Ll.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),xy.forEach(function(n){return Ll.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e}(),xm=new wA,_y=function(e){!Ed&&e>0&&xm.start(),Ed+=e,!Ed&&xm.stop()},AA=function(e){return!ag(e)&&!mA(e)&&getComputedStyle(e).display==="inline"},kA=function(){function e(t,n){this.target=t,this.observedBox=n||eu.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Sx(this.target,this.observedBox,!0);return AA(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),RA=function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e}(),qu=new WeakMap,Ty=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ju=function(){function e(){}return e.connect=function(t,n){var r=new RA(t,n);qu.set(t,r)},e.observe=function(t,n,r){var s=qu.get(t),i=s.observationTargets.length===0;Ty(s.observationTargets,n)<0&&(i&&_a.push(s),s.observationTargets.push(new kA(n,r&&r.box)),_y(1),xm.schedule())},e.unobserve=function(t,n){var r=qu.get(t),s=Ty(r.observationTargets,n),i=r.observationTargets.length===1;s>=0&&(i&&_a.splice(_a.indexOf(r),1),r.observationTargets.splice(s,1),_y(-1))},e.disconnect=function(t){var n=this,r=qu.get(t);r.observationTargets.slice().forEach(function(s){return n.unobserve(t,s.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e}(),IA=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.");ju.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(!py(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ju.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(!py(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ju.unobserve(this,t)},e.prototype.disconnect=function(){ju.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}();class BA{constructor(){this.handleResize=this.handleResize.bind(this),this.observer=new(typeof window<"u"&&window.ResizeObserver||IA)(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 Sy=new BA,Vo=bt({name:"ResizeObserver",props:{onResize:Function},setup(e){let t=!1;const n=Wb().proxy;function r(s){const{onResize:i}=e;i!==void 0&&i(s)}uo(()=>{const s=n.$el;if(s===void 0){hy("resize-observer","$el does not exist.");return}if(s.nextElementSibling!==s.nextSibling&&s.nodeType===3&&s.nodeValue!==""){hy("resize-observer","$el can not be observed (it may be a text node).");return}s.nextElementSibling!==null&&(Sy.registerHandler(s.nextElementSibling,r),t=!0)}),ci(()=>{t&&Sy.unregisterHandler(n.$el.nextElementSibling)})},render(){return E2(this.$slots,"default")}}),PA=my(".v-x-scroll",{overflow:"auto",scrollbarWidth:"none"},[my("&::-webkit-scrollbar",{width:0,height:0})]),NA=bt({name:"XScroll",props:{disabled:Boolean,onScroll:Function},setup(){const e=Fe(null);function t(s){!(s.currentTarget.offsetWidth<s.currentTarget.scrollWidth)||s.deltaY===0||(s.currentTarget.scrollLeft+=s.deltaY+s.deltaX,s.preventDefault())}const n=C2();return PA.mount({id:"vueuc/x-scroll",head:!0,anchorMetaName:cA,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...s){var i;(i=e.value)===null||i===void 0||i.scrollTo(...s)}})},render(){return N("div",{ref:"selfRef",onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:"v-x-scroll"},this.$slots)}});function kx(e){return e instanceof HTMLElement}function Rx(e){for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];if(kx(n)&&(Bx(n)||Rx(n)))return!0}return!1}function Ix(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(kx(n)&&(Bx(n)||Ix(n)))return!0}return!1}function Bx(e){if(!OA(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function OA(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 xl=[];const DA=bt({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=Vb(),n=Fe(null),r=Fe(null);let s=!1,i=!1;const a=typeof document>"u"?null:document.activeElement;function o(){return xl[xl.length-1]===t}function c(E){var g;E.code==="Escape"&&o()&&((g=e.onEsc)===null||g===void 0||g.call(e,E))}uo(()=>{Yr(()=>e.active,E=>{E?(f(),$n("keydown",document,c)):(cr("keydown",document,c),s&&m())},{immediate:!0})}),ci(()=>{cr("keydown",document,c),s&&m()});function l(E){if(!i&&o()){const g=u();if(g===null||g.contains(rg(E)))return;h("first")}}function u(){const E=n.value;if(E===null)return null;let g=E;for(;g=g.nextSibling,!(g===null||g instanceof Element&&g.tagName==="DIV"););return g}function f(){var E;if(!e.disabled){if(xl.push(t),e.autoFocus){const{initialFocusTo:g}=e;g===void 0?h("first"):(E=by(g))===null||E===void 0||E.focus({preventScroll:!0})}s=!0,document.addEventListener("focus",l,!0)}}function m(){var E;if(e.disabled||(document.removeEventListener("focus",l,!0),xl=xl.filter(y=>y!==t),o()))return;const{finalFocusTo:g}=e;g!==void 0?(E=by(g))===null||E===void 0||E.focus({preventScroll:!0}):e.returnFocusOnDeactivated&&a instanceof HTMLElement&&(i=!0,a.focus({preventScroll:!0}),i=!1)}function h(E){if(o()&&e.active){const g=n.value,y=r.value;if(g!==null&&y!==null){const w=u();if(w==null||w===y){i=!0,g.focus({preventScroll:!0}),i=!1;return}i=!0;const x=E==="first"?Rx(w):Ix(w);i=!1,x||(i=!0,g.focus({preventScroll:!0}),i=!1)}}}function b(E){if(i)return;const g=u();g!==null&&(E.relatedTarget!==null&&g.contains(E.relatedTarget)?h("last"):h("first"))}function p(E){i||(E.relatedTarget!==null&&E.relatedTarget===n.value?h("last"):h("first"))}return{focusableStartRef:n,focusableEndRef:r,focusableStyle:"position: absolute; height: 0; width: 0;",handleStartFocus:b,handleEndFocus:p}},render(){const{default:e}=this.$slots;if(e===void 0)return null;if(this.disabled)return e();const{active:t,focusableStyle:n}=this;return N(na,null,[N("div",{"aria-hidden":"true",tabindex:t?"0":"-1",ref:"focusableStartRef",style:n,onFocus:this.handleStartFocus}),e(),N("div",{"aria-hidden":"true",style:n,ref:"focusableEndRef",tabindex:t?"0":"-1",onFocus:this.handleEndFocus})])}});function wy(e){return e.replace(/#|\(|\)|,|\s|\./g,"_")}const LA=/^(\d|\.)+$/,Ay=/(\d|\.)+/;function Bo(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(LA.test(e)){const s=(Number(e)+n)*t;return r?s===0?"0":`${s}px`:`${s}`}else{const s=Ay.exec(e);return s?e.replace(Ay,String((Number(s[0])+n)*t)):e}return e}function ky(e){const{left:t,right:n,top:r,bottom:s}=vs(e);return`${r} ${t} ${s} ${n}`}const MA=new WeakSet;function FA(e){return!MA.has(e)}function Ct(e,...t){if(Array.isArray(e))e.forEach(n=>Ct(n,...t));else return e(...t)}function pi(e,t=!0,n=[]){return e.forEach(r=>{if(r!==null){if(typeof r!="object"){(typeof r=="string"||typeof r=="number")&&n.push(zt(String(r)));return}if(Array.isArray(r)){pi(r,t,n);return}if(r.type===na){if(r.children===null)return;Array.isArray(r.children)&&pi(r.children,t,n)}else{if(r.type===Kb&&t)return;n.push(r)}}}),n}function zA(e,t,n){if(!t)return null;const r=pi(t(n));return r.length===1?r[0]:(lx("getFirstSlotVNode",`slot[${e}] should have exactly one child`),null)}function og(e,t="default",n=[]){const s=e.$slots[t];return s===void 0?n:s()}function vm(e,t=[],n){const r={};return t.forEach(s=>{r[s]=e[s]}),Object.assign(r,n)}function cg(e){return Object.keys(e)}function Es(e){return e.some(t=>Yb(t)?!(t.type===Kb||t.type===na&&!Es(t.children)):!0)?e:null}function ei(e,t){return e&&Es(e())||t()}function _m(e,t,n){return e&&Es(e(t))||n(t)}function Ln(e,t){const n=e&&Es(e());return t(n||null)}function UA(e,t,n){const r=e&&Es(e(t));return n(r||null)}function $A(e){return!(e&&Es(e()))}const Ry=bt({render(){var e,t;return(t=(e=this.$slots).default)===null||t===void 0?void 0:t.call(e)}}),Iy=es("n-form-item");function yu(e,{defaultSize:t="medium",mergedSize:n,mergedDisabled:r}={}){const s=Jr(Iy,null);Js(Iy,null);const i=ze(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=ze(r?()=>r(s):()=>{const{disabled:c}=e;return c!==void 0?c:s?s.disabled.value:!1}),o=ze(()=>{const{status:c}=e;return c||(s==null?void 0:s.mergedValidationStatus.value)});return ci(()=>{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 HA={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 Dh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function vl(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;s=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&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 _l(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)?jA(o,f=>f.test(a)):qA(o,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(a.length);return{value:l,rest:u}}}function qA(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function jA(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function WA(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 GA={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"}},VA=(e,t,n)=>{let r;const s=GA[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},KA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},YA=(e,t,n,r)=>KA[e],XA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},QA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ZA={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"]},JA={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"]},e3={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"}},t3={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"}},n3=(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"},r3={ordinalNumber:n3,era:vl({values:XA,defaultWidth:"wide"}),quarter:vl({values:QA,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vl({values:ZA,defaultWidth:"wide"}),day:vl({values:JA,defaultWidth:"wide"}),dayPeriod:vl({values:e3,defaultWidth:"wide",formattingValues:t3,defaultFormattingWidth:"wide"})},s3=/^(\d+)(th|st|nd|rd)?/i,i3=/\d+/i,a3={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},o3={any:[/^b/i,/^(a|c)/i]},c3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},l3={any:[/1/i,/2/i,/3/i,/4/i]},u3={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},d3={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]},f3={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},h3={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]},m3={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},b3={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}},g3={ordinalNumber:WA({matchPattern:s3,parsePattern:i3,valueCallback:e=>parseInt(e,10)}),era:_l({matchPatterns:a3,defaultMatchWidth:"wide",parsePatterns:o3,defaultParseWidth:"any"}),quarter:_l({matchPatterns:c3,defaultMatchWidth:"wide",parsePatterns:l3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_l({matchPatterns:u3,defaultMatchWidth:"wide",parsePatterns:d3,defaultParseWidth:"any"}),day:_l({matchPatterns:f3,defaultMatchWidth:"wide",parsePatterns:h3,defaultParseWidth:"any"}),dayPeriod:_l({matchPatterns:m3,defaultMatchWidth:"any",parsePatterns:b3,defaultParseWidth:"any"})},p3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},y3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},E3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},C3={date:Dh({formats:p3,defaultWidth:"full"}),time:Dh({formats:y3,defaultWidth:"full"}),dateTime:Dh({formats:E3,defaultWidth:"full"})},x3={code:"en-US",formatDistance:VA,formatLong:C3,formatRelative:YA,localize:r3,match:g3,options:{weekStartsOn:0,firstWeekContainsDate:1}},v3={name:"en-US",locale:x3};var _3=/\s/;function T3(e){for(var t=e.length;t--&&_3.test(e.charAt(t)););return t}var S3=/^\s+/;function w3(e){return e&&e.slice(0,T3(e)+1).replace(S3,"")}var By=NaN,A3=/^[-+]0x[0-9a-f]+$/i,k3=/^0b[01]+$/i,R3=/^0o[0-7]+$/i,I3=parseInt;function Py(e){if(typeof e=="number")return e;if(x2(e))return By;if(cf(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cf(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=w3(e);var n=k3.test(e);return n||R3.test(e)?I3(e.slice(2),n?2:8):A3.test(e)?By:+e}var Lh=function(){return v2.Date.now()},B3="Expected a function",P3=Math.max,N3=Math.min;function O3(e,t,n){var r,s,i,a,o,c,l=0,u=!1,f=!1,m=!0;if(typeof e!="function")throw new TypeError(B3);t=Py(t)||0,cf(n)&&(u=!!n.leading,f="maxWait"in n,i=f?P3(Py(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m);function h(C){var T=r,k=s;return r=s=void 0,l=C,a=e.apply(k,T),a}function b(C){return l=C,o=setTimeout(g,t),u?h(C):a}function p(C){var T=C-c,k=C-l,R=t-T;return f?N3(R,i-k):R}function E(C){var T=C-c,k=C-l;return c===void 0||T>=t||T<0||f&&k>=i}function g(){var C=Lh();if(E(C))return y(C);o=setTimeout(g,p(C))}function y(C){return o=void 0,m&&r?h(C):(r=s=void 0,a)}function w(){o!==void 0&&clearTimeout(o),l=0,r=c=s=o=void 0}function x(){return o===void 0?a:y(Lh())}function S(){var C=Lh(),T=E(C);if(r=arguments,s=this,c=C,T){if(o===void 0)return b(c);if(f)return clearTimeout(o),o=setTimeout(g,t),h(c)}return o===void 0&&(o=setTimeout(g,t)),a}return S.cancel=w,S.flush=x,S}var D3="Expected a function";function Mh(e,t,n){var r=!0,s=!0;if(typeof e!="function")throw new TypeError(D3);return cf(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),O3(e,t,{leading:r,maxWait:t,trailing:s})}function L3(e){const{mergedLocaleRef:t,mergedDateLocaleRef:n}=Jr(_2,null)||{},r=ze(()=>{var i,a;return(a=(i=t==null?void 0:t.value)===null||i===void 0?void 0:i[e])!==null&&a!==void 0?a:HA[e]});return{dateLocaleRef:ze(()=>{var i;return(i=n==null?void 0:n.value)!==null&&i!==void 0?i:v3}),localeRef:r}}const M3=bt({name:"Add",render(){return N("svg",{width:"512",height:"512",viewBox:"0 0 512 512",fill:"none",xmlns:"http://www.w3.org/2000/svg"},N("path",{d:"M256 112V400M400 256H112",stroke:"currentColor","stroke-width":"32","stroke-linecap":"round","stroke-linejoin":"round"}))}}),F3=bt({name:"Checkmark",render(){return N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},N("g",{fill:"none"},N("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"})))}}),z3=bt({name:"ChevronDown",render(){return N("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},N("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"}))}}),U3=bt({name:"ChevronLeft",render(){return N("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},N("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"}))}}),$3=bt({name:"ChevronRight",render(){return N("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},N("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"}))}}),H3=T2("clear",()=>N("svg",{viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},N("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},N("g",{fill:"currentColor","fill-rule":"nonzero"},N("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"}))))),q3=bt({name:"Eye",render(){return N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},N("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"}),N("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"}))}}),j3=bt({name:"EyeOff",render(){return N("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},N("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"}),N("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"}),N("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"}),N("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"}),N("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"}))}}),W3=j("base-clear",`
2
+ flex-shrink: 0;
3
+ height: 1em;
4
+ width: 1em;
5
+ position: relative;
6
+ `,[oe(">",[ee("clear",`
7
+ font-size: var(--n-clear-size);
8
+ height: 1em;
9
+ width: 1em;
10
+ cursor: pointer;
11
+ color: var(--n-clear-color);
12
+ transition: color .3s var(--n-bezier);
13
+ display: flex;
14
+ `,[oe("&:hover",`
15
+ color: var(--n-clear-color-hover)!important;
16
+ `),oe("&:active",`
17
+ color: var(--n-clear-color-pressed)!important;
18
+ `)]),ee("placeholder",`
19
+ display: flex;
20
+ `),ee("clear, placeholder",`
21
+ position: absolute;
22
+ left: 50%;
23
+ top: 50%;
24
+ transform: translateX(-50%) translateY(-50%);
25
+ `,[jo({originalTransform:"translateX(-50%) translateY(-50%)",left:"50%",top:"50%"})])])]),Tm=bt({name:"BaseClear",props:{clsPrefix:{type:String,required:!0},show:Boolean,onClear:Function},setup(e){return Xf("-base-clear",W3,sn(e,"clsPrefix")),{handleMouseDown(t){t.preventDefault()}}},render(){const{clsPrefix:e}=this;return N("div",{class:`${e}-base-clear`},N(Yf,null,{default:()=>{var t,n;return this.show?N("div",{key:"dismiss",class:`${e}-base-clear__clear`,onClick:this.onClear,onMousedown:this.handleMouseDown,"data-clear":!0},ei(this.$slots.icon,()=>[N(Us,{clsPrefix:e},{default:()=>N(H3,null)})])):N("div",{key:"icon",class:`${e}-base-clear__placeholder`},(n=(t=this.$slots).placeholder)===null||n===void 0?void 0:n.call(t))}}))}}),{cubicBezierEaseInOut:Ny}=Xb;function Px({name:e="fade-in",enterDuration:t="0.2s",leaveDuration:n="0.2s",enterCubicBezier:r=Ny,leaveCubicBezier:s=Ny}={}){return[oe(`&.${e}-transition-enter-active`,{transition:`all ${t} ${r}!important`}),oe(`&.${e}-transition-leave-active`,{transition:`all ${n} ${s}!important`}),oe(`&.${e}-transition-enter-from, &.${e}-transition-leave-to`,{opacity:0}),oe(`&.${e}-transition-leave-from, &.${e}-transition-enter-to`,{opacity:1})]}const G3={railInsetHorizontalBottom:"auto 2px 4px 2px",railInsetHorizontalTop:"4px 2px auto 2px",railInsetVerticalRight:"2px 4px 2px auto",railInsetVerticalLeft:"2px auto 2px 4px",railColor:"transparent"};function V3(e){const{scrollbarColor:t,scrollbarColorHover:n,scrollbarHeight:r,scrollbarWidth:s,scrollbarBorderRadius:i}=e;return Object.assign(Object.assign({},G3),{height:r,width:s,borderRadius:i,color:t,colorHover:n})}const Nx={name:"Scrollbar",common:ds,self:V3},K3=j("scrollbar",`
26
+ overflow: hidden;
27
+ position: relative;
28
+ z-index: auto;
29
+ height: 100%;
30
+ width: 100%;
31
+ `,[oe(">",[j("scrollbar-container",`
32
+ width: 100%;
33
+ overflow: scroll;
34
+ height: 100%;
35
+ min-height: inherit;
36
+ max-height: inherit;
37
+ scrollbar-width: none;
38
+ `,[oe("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
39
+ width: 0;
40
+ height: 0;
41
+ display: none;
42
+ `),oe(">",[j("scrollbar-content",`
43
+ box-sizing: border-box;
44
+ min-width: 100%;
45
+ `)])])]),oe(">, +",[j("scrollbar-rail",`
46
+ position: absolute;
47
+ pointer-events: none;
48
+ user-select: none;
49
+ background: var(--n-scrollbar-rail-color);
50
+ -webkit-user-select: none;
51
+ `,[ae("horizontal",`
52
+ height: var(--n-scrollbar-height);
53
+ `,[oe(">",[ee("scrollbar",`
54
+ height: var(--n-scrollbar-height);
55
+ border-radius: var(--n-scrollbar-border-radius);
56
+ right: 0;
57
+ `)])]),ae("horizontal--top",`
58
+ top: var(--n-scrollbar-rail-top-horizontal-top);
59
+ right: var(--n-scrollbar-rail-right-horizontal-top);
60
+ bottom: var(--n-scrollbar-rail-bottom-horizontal-top);
61
+ left: var(--n-scrollbar-rail-left-horizontal-top);
62
+ `),ae("horizontal--bottom",`
63
+ top: var(--n-scrollbar-rail-top-horizontal-bottom);
64
+ right: var(--n-scrollbar-rail-right-horizontal-bottom);
65
+ bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom);
66
+ left: var(--n-scrollbar-rail-left-horizontal-bottom);
67
+ `),ae("vertical",`
68
+ width: var(--n-scrollbar-width);
69
+ `,[oe(">",[ee("scrollbar",`
70
+ width: var(--n-scrollbar-width);
71
+ border-radius: var(--n-scrollbar-border-radius);
72
+ bottom: 0;
73
+ `)])]),ae("vertical--left",`
74
+ top: var(--n-scrollbar-rail-top-vertical-left);
75
+ right: var(--n-scrollbar-rail-right-vertical-left);
76
+ bottom: var(--n-scrollbar-rail-bottom-vertical-left);
77
+ left: var(--n-scrollbar-rail-left-vertical-left);
78
+ `),ae("vertical--right",`
79
+ top: var(--n-scrollbar-rail-top-vertical-right);
80
+ right: var(--n-scrollbar-rail-right-vertical-right);
81
+ bottom: var(--n-scrollbar-rail-bottom-vertical-right);
82
+ left: var(--n-scrollbar-rail-left-vertical-right);
83
+ `),ae("disabled",[oe(">",[ee("scrollbar","pointer-events: none;")])]),oe(">",[ee("scrollbar",`
84
+ z-index: 1;
85
+ position: absolute;
86
+ cursor: pointer;
87
+ pointer-events: all;
88
+ background-color: var(--n-scrollbar-color);
89
+ transition: background-color .2s var(--n-scrollbar-bezier);
90
+ `,[Px(),oe("&:hover","background-color: var(--n-scrollbar-color-hover);")])])])])]),Y3=Object.assign(Object.assign({},nn.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"}}),Ox=bt({name:"Scrollbar",props:Y3,inheritAttrs:!1,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n,mergedRtlRef:r}=hr(e),s=$s("Scrollbar",r,t),i=Fe(null),a=Fe(null),o=Fe(null),c=Fe(null),l=Fe(null),u=Fe(null),f=Fe(null),m=Fe(null),h=Fe(null),b=Fe(null),p=Fe(null),E=Fe(0),g=Fe(0),y=Fe(!1),w=Fe(!1);let x=!1,S=!1,C,T,k=0,R=0,V=0,Q=0;const A=X2(),W=nn("Scrollbar","-scrollbar",K3,Nx,e,t),_=ze(()=>{const{value:Ee}=m,{value:Ye}=u,{value:ct}=b;return Ee===null||Ye===null||ct===null?0:Math.min(Ee,ct*Ee/Ye+Jl(W.value.self.width)*1.5)}),Y=ze(()=>`${_.value}px`),De=ze(()=>{const{value:Ee}=h,{value:Ye}=f,{value:ct}=p;return Ee===null||Ye===null||ct===null?0:ct*Ee/Ye+Jl(W.value.self.height)*1.5}),te=ze(()=>`${De.value}px`),Me=ze(()=>{const{value:Ee}=m,{value:Ye}=E,{value:ct}=u,{value:Ut}=b;if(Ee===null||ct===null||Ut===null)return 0;{const En=ct-Ee;return En?Ye/En*(Ut-_.value):0}}),de=ze(()=>`${Me.value}px`),Ue=ze(()=>{const{value:Ee}=h,{value:Ye}=g,{value:ct}=f,{value:Ut}=p;if(Ee===null||ct===null||Ut===null)return 0;{const En=ct-Ee;return En?Ye/En*(Ut-De.value):0}}),J=ze(()=>`${Ue.value}px`),Z=ze(()=>{const{value:Ee}=m,{value:Ye}=u;return Ee!==null&&Ye!==null&&Ye>Ee}),Xe=ze(()=>{const{value:Ee}=h,{value:Ye}=f;return Ee!==null&&Ye!==null&&Ye>Ee}),Le=ze(()=>{const{trigger:Ee}=e;return Ee==="none"||y.value}),Re=ze(()=>{const{trigger:Ee}=e;return Ee==="none"||w.value}),Je=ze(()=>{const{container:Ee}=e;return Ee?Ee():a.value}),Ht=ze(()=>{const{content:Ee}=e;return Ee?Ee():o.value}),ht=(Ee,Ye)=>{if(!e.scrollable)return;if(typeof Ee=="number"){vn(Ee,Ye??0,0,!1,"auto");return}const{left:ct,top:Ut,index:En,elSize:Pn,position:_n,behavior:Ft,el:nr,debounce:bs=!0}=Ee;(ct!==void 0||Ut!==void 0)&&vn(ct??0,Ut??0,0,!1,Ft),nr!==void 0?vn(0,nr.offsetTop,nr.offsetHeight,bs,Ft):En!==void 0&&Pn!==void 0?vn(0,En*Pn,Pn,bs,Ft):_n==="bottom"?vn(0,Number.MAX_SAFE_INTEGER,0,!1,Ft):_n==="top"&&vn(0,0,0,!1,Ft)},Ve=rA(()=>{e.container||ht({top:E.value,left:g.value})}),Nt=()=>{Ve.isDeactivated||pe()},Dt=Ee=>{if(Ve.isDeactivated)return;const{onResize:Ye}=e;Ye&&Ye(Ee),pe()},er=(Ee,Ye)=>{if(!e.scrollable)return;const{value:ct}=Je;ct&&(typeof Ee=="object"?ct.scrollBy(Ee):ct.scrollBy(Ee,Ye||0))};function vn(Ee,Ye,ct,Ut,En){const{value:Pn}=Je;if(Pn){if(Ut){const{scrollTop:_n,offsetHeight:Ft}=Pn;if(Ye>_n){Ye+ct<=_n+Ft||Pn.scrollTo({left:Ee,top:Ye+ct-Ft,behavior:En});return}}Pn.scrollTo({left:Ee,top:Ye,behavior:En})}}function v(){G(),U(),pe()}function ue(){ne()}function ne(){L(),P()}function L(){T!==void 0&&window.clearTimeout(T),T=window.setTimeout(()=>{w.value=!1},e.duration)}function P(){C!==void 0&&window.clearTimeout(C),C=window.setTimeout(()=>{y.value=!1},e.duration)}function G(){C!==void 0&&window.clearTimeout(C),y.value=!0}function U(){T!==void 0&&window.clearTimeout(T),w.value=!0}function H(Ee){const{onScroll:Ye}=e;Ye&&Ye(Ee),$()}function $(){const{value:Ee}=Je;Ee&&(E.value=Ee.scrollTop,g.value=Ee.scrollLeft*(s!=null&&s.value?-1:1))}function ie(){const{value:Ee}=Ht;Ee&&(u.value=Ee.offsetHeight,f.value=Ee.offsetWidth);const{value:Ye}=Je;Ye&&(m.value=Ye.offsetHeight,h.value=Ye.offsetWidth);const{value:ct}=l,{value:Ut}=c;ct&&(p.value=ct.offsetWidth),Ut&&(b.value=Ut.offsetHeight)}function Ie(){const{value:Ee}=Je;Ee&&(E.value=Ee.scrollTop,g.value=Ee.scrollLeft*(s!=null&&s.value?-1:1),m.value=Ee.offsetHeight,h.value=Ee.offsetWidth,u.value=Ee.scrollHeight,f.value=Ee.scrollWidth);const{value:Ye}=l,{value:ct}=c;Ye&&(p.value=Ye.offsetWidth),ct&&(b.value=ct.offsetHeight)}function pe(){e.scrollable&&(e.useUnifiedContainer?Ie():(ie(),$()))}function Ke(Ee){var Ye;return!(!((Ye=i.value)===null||Ye===void 0)&&Ye.contains(rg(Ee)))}function At(Ee){Ee.preventDefault(),Ee.stopPropagation(),S=!0,$n("mousemove",window,mt,!0),$n("mouseup",window,Gn,!0),R=g.value,V=s!=null&&s.value?window.innerWidth-Ee.clientX:Ee.clientX}function mt(Ee){if(!S)return;C!==void 0&&window.clearTimeout(C),T!==void 0&&window.clearTimeout(T);const{value:Ye}=h,{value:ct}=f,{value:Ut}=De;if(Ye===null||ct===null)return;const Pn=(s!=null&&s.value?window.innerWidth-Ee.clientX-V:Ee.clientX-V)*(ct-Ye)/(Ye-Ut),_n=ct-Ye;let Ft=R+Pn;Ft=Math.min(_n,Ft),Ft=Math.max(Ft,0);const{value:nr}=Je;if(nr){nr.scrollLeft=Ft*(s!=null&&s.value?-1:1);const{internalOnUpdateScrollLeft:bs}=e;bs&&bs(Ft)}}function Gn(Ee){Ee.preventDefault(),Ee.stopPropagation(),cr("mousemove",window,mt,!0),cr("mouseup",window,Gn,!0),S=!1,pe(),Ke(Ee)&&ne()}function Ns(Ee){Ee.preventDefault(),Ee.stopPropagation(),x=!0,$n("mousemove",window,tr,!0),$n("mouseup",window,rs,!0),k=E.value,Q=Ee.clientY}function tr(Ee){if(!x)return;C!==void 0&&window.clearTimeout(C),T!==void 0&&window.clearTimeout(T);const{value:Ye}=m,{value:ct}=u,{value:Ut}=_;if(Ye===null||ct===null)return;const Pn=(Ee.clientY-Q)*(ct-Ye)/(Ye-Ut),_n=ct-Ye;let Ft=k+Pn;Ft=Math.min(_n,Ft),Ft=Math.max(Ft,0);const{value:nr}=Je;nr&&(nr.scrollTop=Ft)}function rs(Ee){Ee.preventDefault(),Ee.stopPropagation(),cr("mousemove",window,tr,!0),cr("mouseup",window,rs,!0),x=!1,pe(),Ke(Ee)&&ne()}lf(()=>{const{value:Ee}=Xe,{value:Ye}=Z,{value:ct}=t,{value:Ut}=l,{value:En}=c;Ut&&(Ee?Ut.classList.remove(`${ct}-scrollbar-rail--disabled`):Ut.classList.add(`${ct}-scrollbar-rail--disabled`)),En&&(Ye?En.classList.remove(`${ct}-scrollbar-rail--disabled`):En.classList.add(`${ct}-scrollbar-rail--disabled`))}),uo(()=>{e.container||pe()}),ci(()=>{C!==void 0&&window.clearTimeout(C),T!==void 0&&window.clearTimeout(T),cr("mousemove",window,tr,!0),cr("mouseup",window,rs,!0)});const Kt=ze(()=>{const{common:{cubicBezierEaseInOut:Ee},self:{color:Ye,colorHover:ct,height:Ut,width:En,borderRadius:Pn,railInsetHorizontalTop:_n,railInsetHorizontalBottom:Ft,railInsetVerticalRight:nr,railInsetVerticalLeft:bs,railColor:So}}=W.value,{top:bl,right:Si,bottom:wi,left:gl}=vs(_n),{top:pl,right:wo,bottom:Ai,left:K}=vs(Ft),{top:he,right:rt,bottom:Yt,left:Tn}=vs(s!=null&&s.value?ky(nr):nr),{top:jt,right:di,bottom:fi,left:hi}=vs(s!=null&&s.value?ky(bs):bs);return{"--n-scrollbar-bezier":Ee,"--n-scrollbar-color":Ye,"--n-scrollbar-color-hover":ct,"--n-scrollbar-border-radius":Pn,"--n-scrollbar-width":En,"--n-scrollbar-height":Ut,"--n-scrollbar-rail-top-horizontal-top":bl,"--n-scrollbar-rail-right-horizontal-top":Si,"--n-scrollbar-rail-bottom-horizontal-top":wi,"--n-scrollbar-rail-left-horizontal-top":gl,"--n-scrollbar-rail-top-horizontal-bottom":pl,"--n-scrollbar-rail-right-horizontal-bottom":wo,"--n-scrollbar-rail-bottom-horizontal-bottom":Ai,"--n-scrollbar-rail-left-horizontal-bottom":K,"--n-scrollbar-rail-top-vertical-right":he,"--n-scrollbar-rail-right-vertical-right":rt,"--n-scrollbar-rail-bottom-vertical-right":Yt,"--n-scrollbar-rail-left-vertical-right":Tn,"--n-scrollbar-rail-top-vertical-left":jt,"--n-scrollbar-rail-right-vertical-left":di,"--n-scrollbar-rail-bottom-vertical-left":fi,"--n-scrollbar-rail-left-vertical-left":hi,"--n-scrollbar-rail-color":So}}),Nr=n?fs("scrollbar",void 0,Kt,e):void 0;return Object.assign(Object.assign({},{scrollTo:ht,scrollBy:er,sync:pe,syncUnifiedContainer:Ie,handleMouseEnterWrapper:v,handleMouseLeaveWrapper:ue}),{mergedClsPrefix:t,rtlEnabled:s,containerScrollTop:E,wrapperRef:i,containerRef:a,contentRef:o,yRailRef:c,xRailRef:l,needYBar:Z,needXBar:Xe,yBarSizePx:Y,xBarSizePx:te,yBarTopPx:de,xBarLeftPx:J,isShowXBar:Le,isShowYBar:Re,isIos:A,handleScroll:H,handleContentResize:Nt,handleContainerResize:Dt,handleYScrollMouseDown:Ns,handleXScrollMouseDown:At,cssVars:n?void 0:Kt,themeClass:Nr==null?void 0:Nr.themeClass,onRender:Nr==null?void 0:Nr.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",u=(h,b)=>N("div",{ref:"yRailRef",class:[`${n}-scrollbar-rail`,`${n}-scrollbar-rail--vertical`,`${n}-scrollbar-rail--vertical--${a}`,h],"data-scrollbar-rail":!0,style:[b||"",this.verticalRailStyle],"aria-hidden":!0},N(l?Ry:uf,l?null:{name:"fade-in-transition"},{default:()=>this.needYBar&&this.isShowYBar&&!this.isIos?N("div",{class:`${n}-scrollbar-rail__scrollbar`,style:{height:this.yBarSizePx,top:this.yBarTopPx},onMousedown:this.handleYScrollMouseDown}):null})),f=()=>{var h,b;return(h=this.onRender)===null||h===void 0||h.call(this),N("div",Qb(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?(b=t.default)===null||b===void 0?void 0:b.call(t):N("div",{role:"none",ref:"containerRef",class:[`${n}-scrollbar-container`,this.containerClass],style:this.containerStyle,onScroll:this.handleScroll,onWheel:this.onWheel},N(Vo,{onResize:this.handleContentResize},{default:()=>N("div",{ref:"contentRef",role:"none",style:[{width:this.xScrollable?"fit-content":null},this.contentStyle],class:[`${n}-scrollbar-content`,this.contentClass]},t)})),i?null:u(void 0,void 0),c&&N("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},N(l?Ry:uf,l?null:{name:"fade-in-transition"},{default:()=>this.needXBar&&this.isShowXBar&&!this.isIos?N("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():N(Vo,{onResize:this.handleContainerResize},{default:f});return i?N(na,null,m,u(this.themeClass,this.cssVars)):m}}),{cubicBezierEaseIn:Oy,cubicBezierEaseOut:Dy}=Xb;function X3({transformOrigin:e="inherit",duration:t=".2s",enterScale:n=".9",originalTransform:r="",originalTransition:s=""}={}){return[oe("&.fade-in-scale-up-transition-leave-active",{transformOrigin:e,transition:`opacity ${t} ${Oy}, transform ${t} ${Oy} ${s&&`,${s}`}`}),oe("&.fade-in-scale-up-transition-enter-active",{transformOrigin:e,transition:`opacity ${t} ${Dy}, transform ${t} ${Dy} ${s&&`,${s}`}`}),oe("&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to",{opacity:0,transform:`${r} scale(${n})`}),oe("&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to",{opacity:1,transform:`${r} scale(1)`})]}const Q3=bt({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 N(ux,{clsPrefix:n,class:`${n}-base-suffix`,strokeWidth:24,scale:.85,show:e.loading},{default:()=>e.showArrow?N(Tm,{clsPrefix:n,show:e.showClear,onClear:e.onClear},{placeholder:()=>N(Us,{clsPrefix:n,class:`${n}-base-suffix__arrow`},{default:()=>ei(t.default,()=>[N(z3,null)])})}):null})}}}),{cubicBezierEaseInOut:ki}=Xb;function Z3({duration:e=".2s",delay:t=".1s"}={}){return[oe("&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to",{opacity:1}),oe("&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from",`
91
+ opacity: 0!important;
92
+ margin-left: 0!important;
93
+ margin-right: 0!important;
94
+ `),oe("&.fade-in-width-expand-transition-leave-active",`
95
+ overflow: hidden;
96
+ transition:
97
+ opacity ${e} ${ki},
98
+ max-width ${e} ${ki} ${t},
99
+ margin-left ${e} ${ki} ${t},
100
+ margin-right ${e} ${ki} ${t};
101
+ `),oe("&.fade-in-width-expand-transition-enter-active",`
102
+ overflow: hidden;
103
+ transition:
104
+ opacity ${e} ${ki} ${t},
105
+ max-width ${e} ${ki},
106
+ margin-left ${e} ${ki},
107
+ margin-right ${e} ${ki};
108
+ `)]}const J3=j("base-wave",`
109
+ position: absolute;
110
+ left: 0;
111
+ right: 0;
112
+ top: 0;
113
+ bottom: 0;
114
+ border-radius: inherit;
115
+ `),ek=bt({name:"BaseWave",props:{clsPrefix:{type:String,required:!0}},setup(e){Xf("-base-wave",J3,sn(e,"clsPrefix"));const t=Fe(null),n=Fe(!1);let r=null;return ci(()=>{r!==null&&window.clearTimeout(r)}),{active:n,selfRef:t,play(){r!==null&&(window.clearTimeout(r),n.value=!1,r=null),$i(()=>{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 N("div",{ref:"selfRef","aria-hidden":!0,class:[`${e}-base-wave`,this.active&&`${e}-base-wave--active`]})}}),tk=Hc&&"chrome"in window;Hc&&navigator.userAgent.includes("Firefox");const Dx=Hc&&navigator.userAgent.includes("Safari")&&!tk,nk={paddingTiny:"0 8px",paddingSmall:"0 10px",paddingMedium:"0 12px",paddingLarge:"0 14px",clearSize:"16px"};function rk(e){const{textColor2:t,textColor3:n,textColorDisabled:r,primaryColor:s,primaryColorHover:i,inputColor:a,inputColorDisabled:o,borderColor:c,warningColor:l,warningColorHover:u,errorColor:f,errorColorHover:m,borderRadius:h,lineHeight:b,fontSizeTiny:p,fontSizeSmall:E,fontSizeMedium:g,fontSizeLarge:y,heightTiny:w,heightSmall:x,heightMedium:S,heightLarge:C,actionColor:T,clearColor:k,clearColorHover:R,clearColorPressed:V,placeholderColor:Q,placeholderColorDisabled:A,iconColor:W,iconColorDisabled:_,iconColorHover:Y,iconColorPressed:De,fontWeight:te}=e;return Object.assign(Object.assign({},nk),{fontWeight:te,countTextColorDisabled:r,countTextColor:n,heightTiny:w,heightSmall:x,heightMedium:S,heightLarge:C,fontSizeTiny:p,fontSizeSmall:E,fontSizeMedium:g,fontSizeLarge:y,lineHeight:b,lineHeightTextarea:b,borderRadius:h,iconSize:"16px",groupLabelColor:T,groupLabelTextColor:t,textColor:t,textColorDisabled:r,textDecorationColor:t,caretColor:s,placeholderColor:Q,placeholderColorDisabled:A,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 ${Zs(s,{alpha:.2})}`,loadingColor:s,loadingColorWarning:l,borderWarning:`1px solid ${l}`,borderHoverWarning:`1px solid ${u}`,colorFocusWarning:a,borderFocusWarning:`1px solid ${u}`,boxShadowFocusWarning:`0 0 0 2px ${Zs(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 ${Zs(f,{alpha:.2})}`,caretColorError:f,clearColor:k,clearColorHover:R,clearColorPressed:V,iconColor:W,iconColorDisabled:_,iconColorHover:Y,iconColorPressed:De,suffixTextColor:t})}const sk={common:ds,self:rk},Lx=es("n-input"),ik=j("input",`
116
+ max-width: 100%;
117
+ cursor: text;
118
+ line-height: 1.5;
119
+ z-index: auto;
120
+ outline: none;
121
+ box-sizing: border-box;
122
+ position: relative;
123
+ display: inline-flex;
124
+ border-radius: var(--n-border-radius);
125
+ background-color: var(--n-color);
126
+ transition: background-color .3s var(--n-bezier);
127
+ font-size: var(--n-font-size);
128
+ font-weight: var(--n-font-weight);
129
+ --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2);
130
+ `,[ee("input, textarea",`
131
+ overflow: hidden;
132
+ flex-grow: 1;
133
+ position: relative;
134
+ `),ee("input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder",`
135
+ box-sizing: border-box;
136
+ font-size: inherit;
137
+ line-height: 1.5;
138
+ font-family: inherit;
139
+ border: none;
140
+ outline: none;
141
+ background-color: #0000;
142
+ text-align: inherit;
143
+ transition:
144
+ -webkit-text-fill-color .3s var(--n-bezier),
145
+ caret-color .3s var(--n-bezier),
146
+ color .3s var(--n-bezier),
147
+ text-decoration-color .3s var(--n-bezier);
148
+ `),ee("input-el, textarea-el",`
149
+ -webkit-appearance: none;
150
+ scrollbar-width: none;
151
+ width: 100%;
152
+ min-width: 0;
153
+ text-decoration-color: var(--n-text-decoration-color);
154
+ color: var(--n-text-color);
155
+ caret-color: var(--n-caret-color);
156
+ background-color: transparent;
157
+ `,[oe("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
158
+ width: 0;
159
+ height: 0;
160
+ display: none;
161
+ `),oe("&::placeholder",`
162
+ color: #0000;
163
+ -webkit-text-fill-color: transparent !important;
164
+ `),oe("&:-webkit-autofill ~",[ee("placeholder","display: none;")])]),ae("round",[Mr("textarea","border-radius: calc(var(--n-height) / 2);")]),ee("placeholder",`
165
+ pointer-events: none;
166
+ position: absolute;
167
+ left: 0;
168
+ right: 0;
169
+ top: 0;
170
+ bottom: 0;
171
+ overflow: hidden;
172
+ color: var(--n-placeholder-color);
173
+ `,[oe("span",`
174
+ width: 100%;
175
+ display: inline-block;
176
+ `)]),ae("textarea",[ee("placeholder","overflow: visible;")]),Mr("autosize","width: 100%;"),ae("autosize",[ee("textarea-el, input-el",`
177
+ position: absolute;
178
+ top: 0;
179
+ left: 0;
180
+ height: 100%;
181
+ `)]),j("input-wrapper",`
182
+ overflow: hidden;
183
+ display: inline-flex;
184
+ flex-grow: 1;
185
+ position: relative;
186
+ padding-left: var(--n-padding-left);
187
+ padding-right: var(--n-padding-right);
188
+ `),ee("input-mirror",`
189
+ padding: 0;
190
+ height: var(--n-height);
191
+ line-height: var(--n-height);
192
+ overflow: hidden;
193
+ visibility: hidden;
194
+ position: static;
195
+ white-space: pre;
196
+ pointer-events: none;
197
+ `),ee("input-el",`
198
+ padding: 0;
199
+ height: var(--n-height);
200
+ line-height: var(--n-height);
201
+ `,[oe("&[type=password]::-ms-reveal","display: none;"),oe("+",[ee("placeholder",`
202
+ display: flex;
203
+ align-items: center;
204
+ `)])]),Mr("textarea",[ee("placeholder","white-space: nowrap;")]),ee("eye",`
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: center;
208
+ transition: color .3s var(--n-bezier);
209
+ `),ae("textarea","width: 100%;",[j("input-word-count",`
210
+ position: absolute;
211
+ right: var(--n-padding-right);
212
+ bottom: var(--n-padding-vertical);
213
+ `),ae("resizable",[j("input-wrapper",`
214
+ resize: vertical;
215
+ min-height: var(--n-height);
216
+ `)]),ee("textarea-el, textarea-mirror, placeholder",`
217
+ height: 100%;
218
+ padding-left: 0;
219
+ padding-right: 0;
220
+ padding-top: var(--n-padding-vertical);
221
+ padding-bottom: var(--n-padding-vertical);
222
+ word-break: break-word;
223
+ display: inline-block;
224
+ vertical-align: bottom;
225
+ box-sizing: border-box;
226
+ line-height: var(--n-line-height-textarea);
227
+ margin: 0;
228
+ resize: none;
229
+ white-space: pre-wrap;
230
+ scroll-padding-block-end: var(--n-padding-vertical);
231
+ `),ee("textarea-mirror",`
232
+ width: 100%;
233
+ pointer-events: none;
234
+ overflow: hidden;
235
+ visibility: hidden;
236
+ position: static;
237
+ white-space: pre-wrap;
238
+ overflow-wrap: break-word;
239
+ `)]),ae("pair",[ee("input-el, placeholder","text-align: center;"),ee("separator",`
240
+ display: flex;
241
+ align-items: center;
242
+ transition: color .3s var(--n-bezier);
243
+ color: var(--n-text-color);
244
+ white-space: nowrap;
245
+ `,[j("icon",`
246
+ color: var(--n-icon-color);
247
+ `),j("base-icon",`
248
+ color: var(--n-icon-color);
249
+ `)])]),ae("disabled",`
250
+ cursor: not-allowed;
251
+ background-color: var(--n-color-disabled);
252
+ `,[ee("border","border: var(--n-border-disabled);"),ee("input-el, textarea-el",`
253
+ cursor: not-allowed;
254
+ color: var(--n-text-color-disabled);
255
+ text-decoration-color: var(--n-text-color-disabled);
256
+ `),ee("placeholder","color: var(--n-placeholder-color-disabled);"),ee("separator","color: var(--n-text-color-disabled);",[j("icon",`
257
+ color: var(--n-icon-color-disabled);
258
+ `),j("base-icon",`
259
+ color: var(--n-icon-color-disabled);
260
+ `)]),j("input-word-count",`
261
+ color: var(--n-count-text-color-disabled);
262
+ `),ee("suffix, prefix","color: var(--n-text-color-disabled);",[j("icon",`
263
+ color: var(--n-icon-color-disabled);
264
+ `),j("internal-icon",`
265
+ color: var(--n-icon-color-disabled);
266
+ `)])]),Mr("disabled",[ee("eye",`
267
+ color: var(--n-icon-color);
268
+ cursor: pointer;
269
+ `,[oe("&:hover",`
270
+ color: var(--n-icon-color-hover);
271
+ `),oe("&:active",`
272
+ color: var(--n-icon-color-pressed);
273
+ `)]),oe("&:hover",[ee("state-border","border: var(--n-border-hover);")]),ae("focus","background-color: var(--n-color-focus);",[ee("state-border",`
274
+ border: var(--n-border-focus);
275
+ box-shadow: var(--n-box-shadow-focus);
276
+ `)])]),ee("border, state-border",`
277
+ box-sizing: border-box;
278
+ position: absolute;
279
+ left: 0;
280
+ right: 0;
281
+ top: 0;
282
+ bottom: 0;
283
+ pointer-events: none;
284
+ border-radius: inherit;
285
+ border: var(--n-border);
286
+ transition:
287
+ box-shadow .3s var(--n-bezier),
288
+ border-color .3s var(--n-bezier);
289
+ `),ee("state-border",`
290
+ border-color: #0000;
291
+ z-index: 1;
292
+ `),ee("prefix","margin-right: 4px;"),ee("suffix",`
293
+ margin-left: 4px;
294
+ `),ee("suffix, prefix",`
295
+ transition: color .3s var(--n-bezier);
296
+ flex-wrap: nowrap;
297
+ flex-shrink: 0;
298
+ line-height: var(--n-height);
299
+ white-space: nowrap;
300
+ display: inline-flex;
301
+ align-items: center;
302
+ justify-content: center;
303
+ color: var(--n-suffix-text-color);
304
+ `,[j("base-loading",`
305
+ font-size: var(--n-icon-size);
306
+ margin: 0 2px;
307
+ color: var(--n-loading-color);
308
+ `),j("base-clear",`
309
+ font-size: var(--n-icon-size);
310
+ `,[ee("placeholder",[j("base-icon",`
311
+ transition: color .3s var(--n-bezier);
312
+ color: var(--n-icon-color);
313
+ font-size: var(--n-icon-size);
314
+ `)])]),oe(">",[j("icon",`
315
+ transition: color .3s var(--n-bezier);
316
+ color: var(--n-icon-color);
317
+ font-size: var(--n-icon-size);
318
+ `)]),j("base-icon",`
319
+ font-size: var(--n-icon-size);
320
+ `)]),j("input-word-count",`
321
+ pointer-events: none;
322
+ line-height: 1.5;
323
+ font-size: .85em;
324
+ color: var(--n-count-text-color);
325
+ transition: color .3s var(--n-bezier);
326
+ margin-left: 4px;
327
+ font-variant: tabular-nums;
328
+ `),["warning","error"].map(e=>ae(`${e}-status`,[Mr("disabled",[j("base-loading",`
329
+ color: var(--n-loading-color-${e})
330
+ `),ee("input-el, textarea-el",`
331
+ caret-color: var(--n-caret-color-${e});
332
+ `),ee("state-border",`
333
+ border: var(--n-border-${e});
334
+ `),oe("&:hover",[ee("state-border",`
335
+ border: var(--n-border-hover-${e});
336
+ `)]),oe("&:focus",`
337
+ background-color: var(--n-color-focus-${e});
338
+ `,[ee("state-border",`
339
+ box-shadow: var(--n-box-shadow-focus-${e});
340
+ border: var(--n-border-focus-${e});
341
+ `)]),ae("focus",`
342
+ background-color: var(--n-color-focus-${e});
343
+ `,[ee("state-border",`
344
+ box-shadow: var(--n-box-shadow-focus-${e});
345
+ border: var(--n-border-focus-${e});
346
+ `)])])]))]),ak=j("input",[ae("disabled",[ee("input-el, textarea-el",`
347
+ -webkit-text-fill-color: var(--n-text-color-disabled);
348
+ `)])]);function ok(e){let t=0;for(const n of e)t++;return t}function Wu(e){return e===""||e==null}function ck(e){const t=Fe(null);function n(){const{value:i}=e;if(!(i!=null&&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:u,afterText:f}=a;let m=c.length;if(c.endsWith(f))m=c.length-f.length;else if(c.startsWith(u))m=u.length;else{const h=u[l-1],b=c.indexOf(h,l-1);b!==-1&&(m=b+1)}(i=o.setSelectionRange)===null||i===void 0||i.call(o,m,m)}function s(){t.value=null}return Yr(e,s),{recordCursor:n,restoreCursor:r}}const Ly=bt({name:"InputWordCount",setup(e,{slots:t}){const{mergedValueRef:n,maxlengthRef:r,mergedClsPrefixRef:s,countGraphemesRef:i}=Jr(Lx),a=ze(()=>{const{value:o}=n;return o===null||Array.isArray(o)?0:(i.value||ok)(o)});return()=>{const{value:o}=r,{value:c}=n;return N("span",{class:`${s.value}-input-word-count`},_m(t.default,{value:c===null||Array.isArray(c)?"":c},()=>[o===void 0?a.value:`${a.value} / ${o}`]))}}}),lk=Object.assign(Object.assign({},nn.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}),or=bt({name:"Input",props:lk,slots:Object,setup(e){const{mergedClsPrefixRef:t,mergedBorderedRef:n,inlineThemeDisabled:r,mergedRtlRef:s}=hr(e),i=nn("Input","-input",ik,sk,e,t);Dx&&Xf("-input-safari",ak,t);const a=Fe(null),o=Fe(null),c=Fe(null),l=Fe(null),u=Fe(null),f=Fe(null),m=Fe(null),h=ck(m),b=Fe(null),{localeRef:p}=L3("Input"),E=Fe(e.defaultValue),g=sn(e,"value"),y=$c(g,E),w=yu(e),{mergedSizeRef:x,mergedDisabledRef:S,mergedStatusRef:C}=w,T=Fe(!1),k=Fe(!1),R=Fe(!1),V=Fe(!1);let Q=null;const A=ze(()=>{const{placeholder:K,pair:he}=e;return he?Array.isArray(K)?K:K===void 0?["",""]:[K,K]:K===void 0?[p.value.placeholder]:[K]}),W=ze(()=>{const{value:K}=R,{value:he}=y,{value:rt}=A;return!K&&(Wu(he)||Array.isArray(he)&&Wu(he[0]))&&rt[0]}),_=ze(()=>{const{value:K}=R,{value:he}=y,{value:rt}=A;return!K&&rt[1]&&(Wu(he)||Array.isArray(he)&&Wu(he[1]))}),Y=no(()=>e.internalForceFocus||T.value),De=no(()=>{if(S.value||e.readonly||!e.clearable||!Y.value&&!k.value)return!1;const{value:K}=y,{value:he}=Y;return e.pair?!!(Array.isArray(K)&&(K[0]||K[1]))&&(k.value||he):!!K&&(k.value||he)}),te=ze(()=>{const{showPasswordOn:K}=e;if(K)return K;if(e.showPasswordToggle)return"click"}),Me=Fe(!1),de=ze(()=>{const{textDecoration:K}=e;return K?Array.isArray(K)?K.map(he=>({textDecoration:he})):[{textDecoration:K}]:["",""]}),Ue=Fe(void 0),J=()=>{var K,he;if(e.type==="textarea"){const{autosize:rt}=e;if(rt&&(Ue.value=(he=(K=b.value)===null||K===void 0?void 0:K.$el)===null||he===void 0?void 0:he.offsetWidth),!o.value||typeof rt=="boolean")return;const{paddingTop:Yt,paddingBottom:Tn,lineHeight:jt}=window.getComputedStyle(o.value),di=Number(Yt.slice(0,-2)),fi=Number(Tn.slice(0,-2)),hi=Number(jt.slice(0,-2)),{value:yl}=c;if(!yl)return;if(rt.minRows){const El=Math.max(rt.minRows,1),Rh=`${di+fi+hi*El}px`;yl.style.minHeight=Rh}if(rt.maxRows){const El=`${di+fi+hi*rt.maxRows}px`;yl.style.maxHeight=El}}},Z=ze(()=>{const{maxlength:K}=e;return K===void 0?void 0:Number(K)});uo(()=>{const{value:K}=y;Array.isArray(K)||nr(K)});const Xe=Wb().proxy;function Le(K,he){const{onUpdateValue:rt,"onUpdate:value":Yt,onInput:Tn}=e,{nTriggerFormInput:jt}=w;rt&&Ct(rt,K,he),Yt&&Ct(Yt,K,he),Tn&&Ct(Tn,K,he),E.value=K,jt()}function Re(K,he){const{onChange:rt}=e,{nTriggerFormChange:Yt}=w;rt&&Ct(rt,K,he),E.value=K,Yt()}function Je(K){const{onBlur:he}=e,{nTriggerFormBlur:rt}=w;he&&Ct(he,K),rt()}function Ht(K){const{onFocus:he}=e,{nTriggerFormFocus:rt}=w;he&&Ct(he,K),rt()}function ht(K){const{onClear:he}=e;he&&Ct(he,K)}function Ve(K){const{onInputBlur:he}=e;he&&Ct(he,K)}function Nt(K){const{onInputFocus:he}=e;he&&Ct(he,K)}function Dt(){const{onDeactivate:K}=e;K&&Ct(K)}function er(){const{onActivate:K}=e;K&&Ct(K)}function vn(K){const{onClick:he}=e;he&&Ct(he,K)}function v(K){const{onWrapperFocus:he}=e;he&&Ct(he,K)}function ue(K){const{onWrapperBlur:he}=e;he&&Ct(he,K)}function ne(){R.value=!0}function L(K){R.value=!1,K.target===f.value?P(K,1):P(K,0)}function P(K,he=0,rt="input"){const Yt=K.target.value;if(nr(Yt),K instanceof InputEvent&&!K.isComposing&&(R.value=!1),e.type==="textarea"){const{value:jt}=b;jt&&jt.syncUnifiedContainer()}if(Q=Yt,R.value)return;h.recordCursor();const Tn=G(Yt);if(Tn)if(!e.pair)rt==="input"?Le(Yt,{source:he}):Re(Yt,{source:he});else{let{value:jt}=y;Array.isArray(jt)?jt=[jt[0],jt[1]]:jt=["",""],jt[he]=Yt,rt==="input"?Le(jt,{source:he}):Re(jt,{source:he})}Xe.$forceUpdate(),Tn||$i(h.restoreCursor)}function G(K){const{countGraphemes:he,maxlength:rt,minlength:Yt}=e;if(he){let jt;if(rt!==void 0&&(jt===void 0&&(jt=he(K)),jt>Number(rt))||Yt!==void 0&&(jt===void 0&&(jt=he(K)),jt<Number(rt)))return!1}const{allowInput:Tn}=e;return typeof Tn=="function"?Tn(K):!0}function U(K){Ve(K),K.relatedTarget===a.value&&Dt(),K.relatedTarget!==null&&(K.relatedTarget===u.value||K.relatedTarget===f.value||K.relatedTarget===o.value)||(V.value=!1),Ie(K,"blur"),m.value=null}function H(K,he){Nt(K),T.value=!0,V.value=!0,er(),Ie(K,"focus"),he===0?m.value=u.value:he===1?m.value=f.value:he===2&&(m.value=o.value)}function $(K){e.passivelyActivated&&(ue(K),Ie(K,"blur"))}function ie(K){e.passivelyActivated&&(T.value=!0,v(K),Ie(K,"focus"))}function Ie(K,he){K.relatedTarget!==null&&(K.relatedTarget===u.value||K.relatedTarget===f.value||K.relatedTarget===o.value||K.relatedTarget===a.value)||(he==="focus"?(Ht(K),T.value=!0):he==="blur"&&(Je(K),T.value=!1))}function pe(K,he){P(K,he,"change")}function Ke(K){vn(K)}function At(K){ht(K),mt()}function mt(){e.pair?(Le(["",""],{source:"clear"}),Re(["",""],{source:"clear"})):(Le("",{source:"clear"}),Re("",{source:"clear"}))}function Gn(K){const{onMousedown:he}=e;he&&he(K);const{tagName:rt}=K.target;if(rt!=="INPUT"&&rt!=="TEXTAREA"){if(e.resizable){const{value:Yt}=a;if(Yt){const{left:Tn,top:jt,width:di,height:fi}=Yt.getBoundingClientRect(),hi=14;if(Tn+di-hi<K.clientX&&K.clientX<Tn+di&&jt+fi-hi<K.clientY&&K.clientY<jt+fi)return}}K.preventDefault(),T.value||ct()}}function Ns(){var K;k.value=!0,e.type==="textarea"&&((K=b.value)===null||K===void 0||K.handleMouseEnterWrapper())}function tr(){var K;k.value=!1,e.type==="textarea"&&((K=b.value)===null||K===void 0||K.handleMouseLeaveWrapper())}function rs(){S.value||te.value==="click"&&(Me.value=!Me.value)}function Kt(K){if(S.value)return;K.preventDefault();const he=Yt=>{Yt.preventDefault(),cr("mouseup",document,he)};if($n("mouseup",document,he),te.value!=="mousedown")return;Me.value=!0;const rt=()=>{Me.value=!1,cr("mouseup",document,rt)};$n("mouseup",document,rt)}function Nr(K){e.onKeyup&&Ct(e.onKeyup,K)}function Ti(K){switch(e.onKeydown&&Ct(e.onKeydown,K),K.key){case"Escape":Ye();break;case"Enter":Ee(K);break}}function Ee(K){var he,rt;if(e.passivelyActivated){const{value:Yt}=V;if(Yt){e.internalDeactivateOnEnter&&Ye();return}K.preventDefault(),e.type==="textarea"?(he=o.value)===null||he===void 0||he.focus():(rt=u.value)===null||rt===void 0||rt.focus()}}function Ye(){e.passivelyActivated&&(V.value=!1,$i(()=>{var K;(K=a.value)===null||K===void 0||K.focus()}))}function ct(){var K,he,rt;S.value||(e.passivelyActivated?(K=a.value)===null||K===void 0||K.focus():((he=o.value)===null||he===void 0||he.focus(),(rt=u.value)===null||rt===void 0||rt.focus()))}function Ut(){var K;!((K=a.value)===null||K===void 0)&&K.contains(document.activeElement)&&document.activeElement.blur()}function En(){var K,he;(K=o.value)===null||K===void 0||K.select(),(he=u.value)===null||he===void 0||he.select()}function Pn(){S.value||(o.value?o.value.focus():u.value&&u.value.focus())}function _n(){const{value:K}=a;K!=null&&K.contains(document.activeElement)&&K!==document.activeElement&&Ye()}function Ft(K){if(e.type==="textarea"){const{value:he}=o;he==null||he.scrollTo(K)}else{const{value:he}=u;he==null||he.scrollTo(K)}}function nr(K){const{type:he,pair:rt,autosize:Yt}=e;if(!rt&&Yt)if(he==="textarea"){const{value:Tn}=c;Tn&&(Tn.textContent=`${K??""}\r
349
+ `)}else{const{value:Tn}=l;Tn&&(K?Tn.textContent=K:Tn.innerHTML="&nbsp;")}}function bs(){J()}const So=Fe({top:"0"});function bl(K){var he;const{scrollTop:rt}=K.target;So.value.top=`${-rt}px`,(he=b.value)===null||he===void 0||he.syncUnifiedContainer()}let Si=null;lf(()=>{const{autosize:K,type:he}=e;K&&he==="textarea"?Si=Yr(y,rt=>{!Array.isArray(rt)&&rt!==Q&&nr(rt)}):Si==null||Si()});let wi=null;lf(()=>{e.type==="textarea"?wi=Yr(y,K=>{var he;!Array.isArray(K)&&K!==Q&&((he=b.value)===null||he===void 0||he.syncUnifiedContainer())}):wi==null||wi()}),Js(Lx,{mergedValueRef:y,maxlengthRef:Z,mergedClsPrefixRef:t,countGraphemesRef:sn(e,"countGraphemes")});const gl={wrapperElRef:a,inputElRef:u,textareaElRef:o,isCompositing:R,clear:mt,focus:ct,blur:Ut,select:En,deactivate:_n,activate:Pn,scrollTo:Ft},pl=$s("Input",s,t),wo=ze(()=>{const{value:K}=x,{common:{cubicBezierEaseInOut:he},self:{color:rt,borderRadius:Yt,textColor:Tn,caretColor:jt,caretColorError:di,caretColorWarning:fi,textDecorationColor:hi,border:yl,borderDisabled:El,borderHover:Rh,borderFocus:kw,placeholderColor:Rw,placeholderColorDisabled:Iw,lineHeightTextarea:Bw,colorDisabled:Pw,colorFocus:Nw,textColorDisabled:Ow,boxShadowFocus:Dw,iconSize:Lw,colorFocusWarning:Mw,boxShadowFocusWarning:Fw,borderWarning:zw,borderFocusWarning:Uw,borderHoverWarning:$w,colorFocusError:Hw,boxShadowFocusError:qw,borderError:jw,borderFocusError:Ww,borderHoverError:Gw,clearSize:Vw,clearColor:Kw,clearColorHover:Yw,clearColorPressed:Xw,iconColor:Qw,iconColorDisabled:Zw,suffixTextColor:Jw,countTextColor:e2,countTextColorDisabled:t2,iconColorHover:n2,iconColorPressed:r2,loadingColor:s2,loadingColorError:i2,loadingColorWarning:a2,fontWeight:o2,[We("padding",K)]:c2,[We("fontSize",K)]:l2,[We("height",K)]:u2}}=i.value,{left:d2,right:f2}=vs(c2);return{"--n-bezier":he,"--n-count-text-color":e2,"--n-count-text-color-disabled":t2,"--n-color":rt,"--n-font-size":l2,"--n-font-weight":o2,"--n-border-radius":Yt,"--n-height":u2,"--n-padding-left":d2,"--n-padding-right":f2,"--n-text-color":Tn,"--n-caret-color":jt,"--n-text-decoration-color":hi,"--n-border":yl,"--n-border-disabled":El,"--n-border-hover":Rh,"--n-border-focus":kw,"--n-placeholder-color":Rw,"--n-placeholder-color-disabled":Iw,"--n-icon-size":Lw,"--n-line-height-textarea":Bw,"--n-color-disabled":Pw,"--n-color-focus":Nw,"--n-text-color-disabled":Ow,"--n-box-shadow-focus":Dw,"--n-loading-color":s2,"--n-caret-color-warning":fi,"--n-color-focus-warning":Mw,"--n-box-shadow-focus-warning":Fw,"--n-border-warning":zw,"--n-border-focus-warning":Uw,"--n-border-hover-warning":$w,"--n-loading-color-warning":a2,"--n-caret-color-error":di,"--n-color-focus-error":Hw,"--n-box-shadow-focus-error":qw,"--n-border-error":jw,"--n-border-focus-error":Ww,"--n-border-hover-error":Gw,"--n-loading-color-error":i2,"--n-clear-color":Kw,"--n-clear-size":Vw,"--n-clear-color-hover":Yw,"--n-clear-color-pressed":Xw,"--n-icon-color":Qw,"--n-icon-color-hover":n2,"--n-icon-color-pressed":r2,"--n-icon-color-disabled":Zw,"--n-suffix-text-color":Jw}}),Ai=r?fs("input",ze(()=>{const{value:K}=x;return K[0]}),wo,e):void 0;return Object.assign(Object.assign({},gl),{wrapperElRef:a,inputElRef:u,inputMirrorElRef:l,inputEl2Ref:f,textareaElRef:o,textareaMirrorElRef:c,textareaScrollbarInstRef:b,rtlEnabled:pl,uncontrolledValue:E,mergedValue:y,passwordVisible:Me,mergedPlaceholder:A,showPlaceholder1:W,showPlaceholder2:_,mergedFocus:Y,isComposing:R,activated:V,showClearButton:De,mergedSize:x,mergedDisabled:S,textDecorationStyle:de,mergedClsPrefix:t,mergedBordered:n,mergedShowPasswordOn:te,placeholderStyle:So,mergedStatus:C,textAreaScrollContainerWidth:Ue,handleTextAreaScroll:bl,handleCompositionStart:ne,handleCompositionEnd:L,handleInput:P,handleInputBlur:U,handleInputFocus:H,handleWrapperBlur:$,handleWrapperFocus:ie,handleMouseEnter:Ns,handleMouseLeave:tr,handleMouseDown:Gn,handleChange:pe,handleClick:Ke,handleClear:At,handlePasswordToggleClick:rs,handlePasswordToggleMousedown:Kt,handleWrapperKeydown:Ti,handleWrapperKeyup:Nr,handleTextAreaMirrorResize:bs,getTextareaScrollContainer:()=>o.value,mergedTheme:i,cssVars:r?void 0:wo,themeClass:Ai==null?void 0:Ai.themeClass,onRender:Ai==null?void 0:Ai.onRender})},render(){var e,t;const{mergedClsPrefix:n,mergedStatus:r,themeClass:s,type:i,countGraphemes:a,onRender:o}=this,c=this.$slots;return o==null||o(),N("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},N("div",{class:`${n}-input-wrapper`},Ln(c.prefix,l=>l&&N("div",{class:`${n}-input__prefix`},l)),i==="textarea"?N(Ox,{ref:"textareaScrollbarInstRef",class:`${n}-input__textarea`,container:this.getTextareaScrollContainer,triggerDisplayManually:!0,useUnifiedContainer:!0,internalHoistYRail:!0},{default:()=>{var l,u;const{textAreaScrollContainerWidth:f}=this,m={width:this.autosize&&f&&`${f}px`};return N(na,null,N("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],(u=this.inputProps)===null||u===void 0?void 0:u.style,m],onBlur:this.handleInputBlur,onFocus:h=>{this.handleInputFocus(h,2)},onInput:this.handleInput,onChange:this.handleChange,onScroll:this.handleTextAreaScroll})),this.showPlaceholder1?N("div",{class:`${n}-input__placeholder`,style:[this.placeholderStyle,m],key:"placeholder"},this.mergedPlaceholder[0]):null,this.autosize?N(Vo,{onResize:this.handleTextAreaMirrorResize},{default:()=>N("div",{ref:"textareaMirrorElRef",class:`${n}-input__textarea-mirror`,key:"mirror"})}):null)}}):N("div",{class:`${n}-input__input`},N("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?N("div",{class:`${n}-input__placeholder`},N("span",null,this.mergedPlaceholder[0])):null,this.autosize?N("div",{class:`${n}-input__input-mirror`,key:"mirror",ref:"inputMirrorElRef"}," "):null),!this.pair&&Ln(c.suffix,l=>l||this.clearable||this.showCount||this.mergedShowPasswordOn||this.loading!==void 0?N("div",{class:`${n}-input__suffix`},[Ln(c["clear-icon-placeholder"],u=>(this.clearable||u)&&N(Tm,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{placeholder:()=>u,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?N(Q3,{clsPrefix:n,loading:this.loading,showArrow:!1,showClear:!1,style:this.cssVars}):null,this.internalLoadingBeforeSuffix?l:null,this.showCount&&this.type!=="textarea"?N(Ly,null,{default:u=>{var f;const{renderCount:m}=this;return m?m(u):(f=c.count)===null||f===void 0?void 0:f.call(c,u)}}):null,this.mergedShowPasswordOn&&this.type==="password"?N("div",{class:`${n}-input__eye`,onMousedown:this.handlePasswordToggleMousedown,onClick:this.handlePasswordToggleClick},this.passwordVisible?ei(c["password-visible-icon"],()=>[N(Us,{clsPrefix:n},{default:()=>N(q3,null)})]):ei(c["password-invisible-icon"],()=>[N(Us,{clsPrefix:n},{default:()=>N(j3,null)})])):null]):null)),this.pair?N("span",{class:`${n}-input__separator`},ei(c.separator,()=>[this.separator])):null,this.pair?N("div",{class:`${n}-input-wrapper`},N("div",{class:`${n}-input__input`},N("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?N("div",{class:`${n}-input__placeholder`},N("span",null,this.mergedPlaceholder[1])):null),Ln(c.suffix,l=>(this.clearable||l)&&N("div",{class:`${n}-input__suffix`},[this.clearable&&N(Tm,{clsPrefix:n,show:this.showClearButton,onClear:this.handleClear},{icon:()=>{var u;return(u=c["clear-icon"])===null||u===void 0?void 0:u.call(c)},placeholder:()=>{var u;return(u=c["clear-icon-placeholder"])===null||u===void 0?void 0:u.call(c)}}),l]))):null,this.mergedBordered?N("div",{class:`${n}-input__border`}):null,this.mergedBordered?N("div",{class:`${n}-input__state-border`}):null,this.showCount&&i==="textarea"?N(Ly,null,{default:l=>{var u;const{renderCount:f}=this;return f?f(l):(u=c.count)===null||u===void 0?void 0:u.call(c,l)}}):null)}}),uk=j("input-group",`
350
+ display: inline-flex;
351
+ width: 100%;
352
+ flex-wrap: nowrap;
353
+ vertical-align: bottom;
354
+ `,[oe(">",[j("input",[oe("&:not(:last-child)",`
355
+ border-top-right-radius: 0!important;
356
+ border-bottom-right-radius: 0!important;
357
+ `),oe("&:not(:first-child)",`
358
+ border-top-left-radius: 0!important;
359
+ border-bottom-left-radius: 0!important;
360
+ margin-left: -1px!important;
361
+ `)]),j("button",[oe("&:not(:last-child)",`
362
+ border-top-right-radius: 0!important;
363
+ border-bottom-right-radius: 0!important;
364
+ `,[ee("state-border, border",`
365
+ border-top-right-radius: 0!important;
366
+ border-bottom-right-radius: 0!important;
367
+ `)]),oe("&:not(:first-child)",`
368
+ border-top-left-radius: 0!important;
369
+ border-bottom-left-radius: 0!important;
370
+ `,[ee("state-border, border",`
371
+ border-top-left-radius: 0!important;
372
+ border-bottom-left-radius: 0!important;
373
+ `)])]),oe("*",[oe("&:not(:last-child)",`
374
+ border-top-right-radius: 0!important;
375
+ border-bottom-right-radius: 0!important;
376
+ `,[oe(">",[j("input",`
377
+ border-top-right-radius: 0!important;
378
+ border-bottom-right-radius: 0!important;
379
+ `),j("base-selection",[j("base-selection-label",`
380
+ border-top-right-radius: 0!important;
381
+ border-bottom-right-radius: 0!important;
382
+ `),j("base-selection-tags",`
383
+ border-top-right-radius: 0!important;
384
+ border-bottom-right-radius: 0!important;
385
+ `),ee("box-shadow, border, state-border",`
386
+ border-top-right-radius: 0!important;
387
+ border-bottom-right-radius: 0!important;
388
+ `)])])]),oe("&:not(:first-child)",`
389
+ margin-left: -1px!important;
390
+ border-top-left-radius: 0!important;
391
+ border-bottom-left-radius: 0!important;
392
+ `,[oe(">",[j("input",`
393
+ border-top-left-radius: 0!important;
394
+ border-bottom-left-radius: 0!important;
395
+ `),j("base-selection",[j("base-selection-label",`
396
+ border-top-left-radius: 0!important;
397
+ border-bottom-left-radius: 0!important;
398
+ `),j("base-selection-tags",`
399
+ border-top-left-radius: 0!important;
400
+ border-bottom-left-radius: 0!important;
401
+ `),ee("box-shadow, border, state-border",`
402
+ border-top-left-radius: 0!important;
403
+ border-bottom-left-radius: 0!important;
404
+ `)])])])])])]),dk={},fk=bt({name:"InputGroup",props:dk,setup(e){const{mergedClsPrefixRef:t}=hr(e);return Xf("-input-group",uk,t),{mergedClsPrefix:t}},render(){const{mergedClsPrefix:e}=this;return N("div",{class:`${e}-input-group`},this.$slots)}});function ca(e){return dx(e,[255,255,255,.16])}function Gu(e){return dx(e,[0,0,0,.12])}const hk=es("n-button-group"),mk={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 bk(e){const{heightTiny:t,heightSmall:n,heightMedium:r,heightLarge:s,borderRadius:i,fontSizeTiny:a,fontSizeSmall:o,fontSizeMedium:c,fontSizeLarge:l,opacityDisabled:u,textColor2:f,textColor3:m,primaryColorHover:h,primaryColorPressed:b,borderColor:p,primaryColor:E,baseColor:g,infoColor:y,infoColorHover:w,infoColorPressed:x,successColor:S,successColorHover:C,successColorPressed:T,warningColor:k,warningColorHover:R,warningColorPressed:V,errorColor:Q,errorColorHover:A,errorColorPressed:W,fontWeight:_,buttonColor2:Y,buttonColor2Hover:De,buttonColor2Pressed:te,fontWeightStrong:Me}=e;return Object.assign(Object.assign({},mk),{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:u,colorOpacitySecondary:"0.16",colorOpacitySecondaryHover:"0.22",colorOpacitySecondaryPressed:"0.28",colorSecondary:Y,colorSecondaryHover:De,colorSecondaryPressed:te,colorTertiary:Y,colorTertiaryHover:De,colorTertiaryPressed:te,colorQuaternary:"#0000",colorQuaternaryHover:De,colorQuaternaryPressed:te,color:"#0000",colorHover:"#0000",colorPressed:"#0000",colorFocus:"#0000",colorDisabled:"#0000",textColor:f,textColorTertiary:m,textColorHover:h,textColorPressed:b,textColorFocus:h,textColorDisabled:f,textColorText:f,textColorTextHover:h,textColorTextPressed:b,textColorTextFocus:h,textColorTextDisabled:f,textColorGhost:f,textColorGhostHover:h,textColorGhostPressed:b,textColorGhostFocus:h,textColorGhostDisabled:f,border:`1px solid ${p}`,borderHover:`1px solid ${h}`,borderPressed:`1px solid ${b}`,borderFocus:`1px solid ${h}`,borderDisabled:`1px solid ${p}`,rippleColor:E,colorPrimary:E,colorHoverPrimary:h,colorPressedPrimary:b,colorFocusPrimary:h,colorDisabledPrimary:E,textColorPrimary:g,textColorHoverPrimary:g,textColorPressedPrimary:g,textColorFocusPrimary:g,textColorDisabledPrimary:g,textColorTextPrimary:E,textColorTextHoverPrimary:h,textColorTextPressedPrimary:b,textColorTextFocusPrimary:h,textColorTextDisabledPrimary:f,textColorGhostPrimary:E,textColorGhostHoverPrimary:h,textColorGhostPressedPrimary:b,textColorGhostFocusPrimary:h,textColorGhostDisabledPrimary:E,borderPrimary:`1px solid ${E}`,borderHoverPrimary:`1px solid ${h}`,borderPressedPrimary:`1px solid ${b}`,borderFocusPrimary:`1px solid ${h}`,borderDisabledPrimary:`1px solid ${E}`,rippleColorPrimary:E,colorInfo:y,colorHoverInfo:w,colorPressedInfo:x,colorFocusInfo:w,colorDisabledInfo:y,textColorInfo:g,textColorHoverInfo:g,textColorPressedInfo:g,textColorFocusInfo:g,textColorDisabledInfo:g,textColorTextInfo:y,textColorTextHoverInfo:w,textColorTextPressedInfo:x,textColorTextFocusInfo:w,textColorTextDisabledInfo:f,textColorGhostInfo:y,textColorGhostHoverInfo:w,textColorGhostPressedInfo:x,textColorGhostFocusInfo:w,textColorGhostDisabledInfo:y,borderInfo:`1px solid ${y}`,borderHoverInfo:`1px solid ${w}`,borderPressedInfo:`1px solid ${x}`,borderFocusInfo:`1px solid ${w}`,borderDisabledInfo:`1px solid ${y}`,rippleColorInfo:y,colorSuccess:S,colorHoverSuccess:C,colorPressedSuccess:T,colorFocusSuccess:C,colorDisabledSuccess:S,textColorSuccess:g,textColorHoverSuccess:g,textColorPressedSuccess:g,textColorFocusSuccess:g,textColorDisabledSuccess:g,textColorTextSuccess:S,textColorTextHoverSuccess:C,textColorTextPressedSuccess:T,textColorTextFocusSuccess:C,textColorTextDisabledSuccess:f,textColorGhostSuccess:S,textColorGhostHoverSuccess:C,textColorGhostPressedSuccess:T,textColorGhostFocusSuccess:C,textColorGhostDisabledSuccess:S,borderSuccess:`1px solid ${S}`,borderHoverSuccess:`1px solid ${C}`,borderPressedSuccess:`1px solid ${T}`,borderFocusSuccess:`1px solid ${C}`,borderDisabledSuccess:`1px solid ${S}`,rippleColorSuccess:S,colorWarning:k,colorHoverWarning:R,colorPressedWarning:V,colorFocusWarning:R,colorDisabledWarning:k,textColorWarning:g,textColorHoverWarning:g,textColorPressedWarning:g,textColorFocusWarning:g,textColorDisabledWarning:g,textColorTextWarning:k,textColorTextHoverWarning:R,textColorTextPressedWarning:V,textColorTextFocusWarning:R,textColorTextDisabledWarning:f,textColorGhostWarning:k,textColorGhostHoverWarning:R,textColorGhostPressedWarning:V,textColorGhostFocusWarning:R,textColorGhostDisabledWarning:k,borderWarning:`1px solid ${k}`,borderHoverWarning:`1px solid ${R}`,borderPressedWarning:`1px solid ${V}`,borderFocusWarning:`1px solid ${R}`,borderDisabledWarning:`1px solid ${k}`,rippleColorWarning:k,colorError:Q,colorHoverError:A,colorPressedError:W,colorFocusError:A,colorDisabledError:Q,textColorError:g,textColorHoverError:g,textColorPressedError:g,textColorFocusError:g,textColorDisabledError:g,textColorTextError:Q,textColorTextHoverError:A,textColorTextPressedError:W,textColorTextFocusError:A,textColorTextDisabledError:f,textColorGhostError:Q,textColorGhostHoverError:A,textColorGhostPressedError:W,textColorGhostFocusError:A,textColorGhostDisabledError:Q,borderError:`1px solid ${Q}`,borderHoverError:`1px solid ${A}`,borderPressedError:`1px solid ${W}`,borderFocusError:`1px solid ${A}`,borderDisabledError:`1px solid ${Q}`,rippleColorError:Q,waveOpacity:"0.6",fontWeight:_,fontWeightStrong:Me})}const Mx={name:"Button",common:ds,self:bk},gk=oe([j("button",`
405
+ margin: 0;
406
+ font-weight: var(--n-font-weight);
407
+ line-height: 1;
408
+ font-family: inherit;
409
+ padding: var(--n-padding);
410
+ height: var(--n-height);
411
+ font-size: var(--n-font-size);
412
+ border-radius: var(--n-border-radius);
413
+ color: var(--n-text-color);
414
+ background-color: var(--n-color);
415
+ width: var(--n-width);
416
+ white-space: nowrap;
417
+ outline: none;
418
+ position: relative;
419
+ z-index: auto;
420
+ border: none;
421
+ display: inline-flex;
422
+ flex-wrap: nowrap;
423
+ flex-shrink: 0;
424
+ align-items: center;
425
+ justify-content: center;
426
+ user-select: none;
427
+ -webkit-user-select: none;
428
+ text-align: center;
429
+ cursor: pointer;
430
+ text-decoration: none;
431
+ transition:
432
+ color .3s var(--n-bezier),
433
+ background-color .3s var(--n-bezier),
434
+ opacity .3s var(--n-bezier),
435
+ border-color .3s var(--n-bezier);
436
+ `,[ae("color",[ee("border",{borderColor:"var(--n-border-color)"}),ae("disabled",[ee("border",{borderColor:"var(--n-border-color-disabled)"})]),Mr("disabled",[oe("&:focus",[ee("state-border",{borderColor:"var(--n-border-color-focus)"})]),oe("&:hover",[ee("state-border",{borderColor:"var(--n-border-color-hover)"})]),oe("&:active",[ee("state-border",{borderColor:"var(--n-border-color-pressed)"})]),ae("pressed",[ee("state-border",{borderColor:"var(--n-border-color-pressed)"})])])]),ae("disabled",{backgroundColor:"var(--n-color-disabled)",color:"var(--n-text-color-disabled)"},[ee("border",{border:"var(--n-border-disabled)"})]),Mr("disabled",[oe("&:focus",{backgroundColor:"var(--n-color-focus)",color:"var(--n-text-color-focus)"},[ee("state-border",{border:"var(--n-border-focus)"})]),oe("&:hover",{backgroundColor:"var(--n-color-hover)",color:"var(--n-text-color-hover)"},[ee("state-border",{border:"var(--n-border-hover)"})]),oe("&:active",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[ee("state-border",{border:"var(--n-border-pressed)"})]),ae("pressed",{backgroundColor:"var(--n-color-pressed)",color:"var(--n-text-color-pressed)"},[ee("state-border",{border:"var(--n-border-pressed)"})])]),ae("loading","cursor: wait;"),j("base-wave",`
437
+ pointer-events: none;
438
+ top: 0;
439
+ right: 0;
440
+ bottom: 0;
441
+ left: 0;
442
+ animation-iteration-count: 1;
443
+ animation-duration: var(--n-ripple-duration);
444
+ animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out);
445
+ `,[ae("active",{zIndex:1,animationName:"button-wave-spread, button-wave-opacity"})]),Hc&&"MozBoxSizing"in document.createElement("div").style?oe("&::moz-focus-inner",{border:0}):null,ee("border, state-border",`
446
+ position: absolute;
447
+ left: 0;
448
+ top: 0;
449
+ right: 0;
450
+ bottom: 0;
451
+ border-radius: inherit;
452
+ transition: border-color .3s var(--n-bezier);
453
+ pointer-events: none;
454
+ `),ee("border",{border:"var(--n-border)"}),ee("state-border",{border:"var(--n-border)",borderColor:"#0000",zIndex:1}),ee("icon",`
455
+ margin: var(--n-icon-margin);
456
+ margin-left: 0;
457
+ height: var(--n-icon-size);
458
+ width: var(--n-icon-size);
459
+ max-width: var(--n-icon-size);
460
+ font-size: var(--n-icon-size);
461
+ position: relative;
462
+ flex-shrink: 0;
463
+ `,[j("icon-slot",`
464
+ height: var(--n-icon-size);
465
+ width: var(--n-icon-size);
466
+ position: absolute;
467
+ left: 0;
468
+ top: 50%;
469
+ transform: translateY(-50%);
470
+ display: flex;
471
+ align-items: center;
472
+ justify-content: center;
473
+ `,[jo({top:"50%",originalTransform:"translateY(-50%)"})]),Z3()]),ee("content",`
474
+ display: flex;
475
+ align-items: center;
476
+ flex-wrap: nowrap;
477
+ min-width: 0;
478
+ `,[oe("~",[ee("icon",{margin:"var(--n-icon-margin)",marginRight:0})])]),ae("block",`
479
+ display: flex;
480
+ width: 100%;
481
+ `),ae("dashed",[ee("border, state-border",{borderStyle:"dashed !important"})]),ae("disabled",{cursor:"not-allowed",opacity:"var(--n-opacity-disabled)"})]),oe("@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)"}}),oe("@keyframes button-wave-opacity",{from:{opacity:"var(--n-wave-opacity)"},to:{opacity:0}})]),pk=Object.assign(Object.assign({},nn.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:!Dx}}),Hi=bt({name:"Button",props:pk,slots:Object,setup(e){const t=Fe(null),n=Fe(null),r=Fe(!1),s=no(()=>!e.quaternary&&!e.tertiary&&!e.secondary&&!e.text&&(!e.color||e.ghost||e.dashed)&&e.bordered),i=Jr(hk,{}),{mergedSizeRef:a}=yu({},{defaultSize:"medium",mergedSize:x=>{const{size:S}=e;if(S)return S;const{size:C}=i;if(C)return C;const{mergedSize:T}=x||{};return T?T.value:"medium"}}),o=ze(()=>e.focusable&&!e.disabled),c=x=>{var S;o.value||x.preventDefault(),!e.nativeFocusBehavior&&(x.preventDefault(),!e.disabled&&o.value&&((S=t.value)===null||S===void 0||S.focus({preventScroll:!0})))},l=x=>{var S;if(!e.disabled&&!e.loading){const{onClick:C}=e;C&&Ct(C,x),e.text||(S=n.value)===null||S===void 0||S.play()}},u=x=>{switch(x.key){case"Enter":if(!e.keyboard)return;r.value=!1}},f=x=>{switch(x.key){case"Enter":if(!e.keyboard||e.loading){x.preventDefault();return}r.value=!0}},m=()=>{r.value=!1},{inlineThemeDisabled:h,mergedClsPrefixRef:b,mergedRtlRef:p}=hr(e),E=nn("Button","-button",gk,Mx,e,b),g=$s("Button",p,b),y=ze(()=>{const x=E.value,{common:{cubicBezierEaseInOut:S,cubicBezierEaseOut:C},self:T}=x,{rippleDuration:k,opacityDisabled:R,fontWeight:V,fontWeightStrong:Q}=T,A=a.value,{dashed:W,type:_,ghost:Y,text:De,color:te,round:Me,circle:de,textColor:Ue,secondary:J,tertiary:Z,quaternary:Xe,strong:Le}=e,Re={"--n-font-weight":Le?Q:V};let Je={"--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 Ht=_==="tertiary",ht=_==="default",Ve=Ht?"default":_;if(De){const U=Ue||te;Je={"--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||T[We("textColorText",Ve)],"--n-text-color-hover":U?ca(U):T[We("textColorTextHover",Ve)],"--n-text-color-pressed":U?Gu(U):T[We("textColorTextPressed",Ve)],"--n-text-color-focus":U?ca(U):T[We("textColorTextHover",Ve)],"--n-text-color-disabled":U||T[We("textColorTextDisabled",Ve)]}}else if(Y||W){const U=Ue||te;Je={"--n-color":"#0000","--n-color-hover":"#0000","--n-color-pressed":"#0000","--n-color-focus":"#0000","--n-color-disabled":"#0000","--n-ripple-color":te||T[We("rippleColor",Ve)],"--n-text-color":U||T[We("textColorGhost",Ve)],"--n-text-color-hover":U?ca(U):T[We("textColorGhostHover",Ve)],"--n-text-color-pressed":U?Gu(U):T[We("textColorGhostPressed",Ve)],"--n-text-color-focus":U?ca(U):T[We("textColorGhostHover",Ve)],"--n-text-color-disabled":U||T[We("textColorGhostDisabled",Ve)]}}else if(J){const U=ht?T.textColor:Ht?T.textColorTertiary:T[We("color",Ve)],H=te||U,$=_!=="default"&&_!=="tertiary";Je={"--n-color":$?Zs(H,{alpha:Number(T.colorOpacitySecondary)}):T.colorSecondary,"--n-color-hover":$?Zs(H,{alpha:Number(T.colorOpacitySecondaryHover)}):T.colorSecondaryHover,"--n-color-pressed":$?Zs(H,{alpha:Number(T.colorOpacitySecondaryPressed)}):T.colorSecondaryPressed,"--n-color-focus":$?Zs(H,{alpha:Number(T.colorOpacitySecondaryHover)}):T.colorSecondaryHover,"--n-color-disabled":T.colorSecondary,"--n-ripple-color":"#0000","--n-text-color":H,"--n-text-color-hover":H,"--n-text-color-pressed":H,"--n-text-color-focus":H,"--n-text-color-disabled":H}}else if(Z||Xe){const U=ht?T.textColor:Ht?T.textColorTertiary:T[We("color",Ve)],H=te||U;Z?(Je["--n-color"]=T.colorTertiary,Je["--n-color-hover"]=T.colorTertiaryHover,Je["--n-color-pressed"]=T.colorTertiaryPressed,Je["--n-color-focus"]=T.colorSecondaryHover,Je["--n-color-disabled"]=T.colorTertiary):(Je["--n-color"]=T.colorQuaternary,Je["--n-color-hover"]=T.colorQuaternaryHover,Je["--n-color-pressed"]=T.colorQuaternaryPressed,Je["--n-color-focus"]=T.colorQuaternaryHover,Je["--n-color-disabled"]=T.colorQuaternary),Je["--n-ripple-color"]="#0000",Je["--n-text-color"]=H,Je["--n-text-color-hover"]=H,Je["--n-text-color-pressed"]=H,Je["--n-text-color-focus"]=H,Je["--n-text-color-disabled"]=H}else Je={"--n-color":te||T[We("color",Ve)],"--n-color-hover":te?ca(te):T[We("colorHover",Ve)],"--n-color-pressed":te?Gu(te):T[We("colorPressed",Ve)],"--n-color-focus":te?ca(te):T[We("colorFocus",Ve)],"--n-color-disabled":te||T[We("colorDisabled",Ve)],"--n-ripple-color":te||T[We("rippleColor",Ve)],"--n-text-color":Ue||(te?T.textColorPrimary:Ht?T.textColorTertiary:T[We("textColor",Ve)]),"--n-text-color-hover":Ue||(te?T.textColorHoverPrimary:T[We("textColorHover",Ve)]),"--n-text-color-pressed":Ue||(te?T.textColorPressedPrimary:T[We("textColorPressed",Ve)]),"--n-text-color-focus":Ue||(te?T.textColorFocusPrimary:T[We("textColorFocus",Ve)]),"--n-text-color-disabled":Ue||(te?T.textColorDisabledPrimary:T[We("textColorDisabled",Ve)])};let Nt={"--n-border":"initial","--n-border-hover":"initial","--n-border-pressed":"initial","--n-border-focus":"initial","--n-border-disabled":"initial"};De?Nt={"--n-border":"none","--n-border-hover":"none","--n-border-pressed":"none","--n-border-focus":"none","--n-border-disabled":"none"}:Nt={"--n-border":T[We("border",Ve)],"--n-border-hover":T[We("borderHover",Ve)],"--n-border-pressed":T[We("borderPressed",Ve)],"--n-border-focus":T[We("borderFocus",Ve)],"--n-border-disabled":T[We("borderDisabled",Ve)]};const{[We("height",A)]:Dt,[We("fontSize",A)]:er,[We("padding",A)]:vn,[We("paddingRound",A)]:v,[We("iconSize",A)]:ue,[We("borderRadius",A)]:ne,[We("iconMargin",A)]:L,waveOpacity:P}=T,G={"--n-width":de&&!De?Dt:"initial","--n-height":De?"initial":Dt,"--n-font-size":er,"--n-padding":de||De?"initial":Me?v:vn,"--n-icon-size":ue,"--n-icon-margin":L,"--n-border-radius":De?"initial":de||Me?Dt:ne};return Object.assign(Object.assign(Object.assign(Object.assign({"--n-bezier":S,"--n-bezier-ease-out":C,"--n-ripple-duration":k,"--n-opacity-disabled":R,"--n-wave-opacity":P},Re),Je),Nt),G)}),w=h?fs("button",ze(()=>{let x="";const{dashed:S,type:C,ghost:T,text:k,color:R,round:V,circle:Q,textColor:A,secondary:W,tertiary:_,quaternary:Y,strong:De}=e;S&&(x+="a"),T&&(x+="b"),k&&(x+="c"),V&&(x+="d"),Q&&(x+="e"),W&&(x+="f"),_&&(x+="g"),Y&&(x+="h"),De&&(x+="i"),R&&(x+=`j${wy(R)}`),A&&(x+=`k${wy(A)}`);const{value:te}=a;return x+=`l${te[0]}`,x+=`m${C[0]}`,x}),y,e):void 0;return{selfElRef:t,waveElRef:n,mergedClsPrefix:b,mergedFocusable:o,mergedSize:a,showBorder:s,enterPressed:r,rtlEnabled:g,handleMousedown:c,handleKeydown:f,handleBlur:m,handleKeyup:u,handleClick:l,customColorCssVars:ze(()=>{const{color:x}=e;if(!x)return null;const S=ca(x);return{"--n-border-color":x,"--n-border-color-hover":S,"--n-border-color-pressed":Gu(x),"--n-border-color-focus":S,"--n-border-color-disabled":x}}),cssVars:h?void 0:y,themeClass:w==null?void 0:w.themeClass,onRender:w==null?void 0:w.onRender}},render(){const{mergedClsPrefix:e,tag:t,onRender:n}=this;n==null||n();const r=Ln(this.$slots.default,s=>s&&N("span",{class:`${e}-button__content`},s));return N(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,N(fx,{width:!0},{default:()=>Ln(this.$slots.icon,s=>(this.loading||this.renderIcon||s)&&N("span",{class:`${e}-button__icon`,style:{margin:$A(this.$slots.default)?"0":""}},N(Yf,null,{default:()=>this.loading?N(ux,{clsPrefix:e,key:"loading",class:`${e}-icon-slot`,strokeWidth:20}):N("div",{key:"icon",class:`${e}-icon-slot`,role:"none"},this.renderIcon?this.renderIcon():s)})))}),this.iconPlacement==="left"&&r,this.text?null:N(ek,{ref:"waveElRef",clsPrefix:e}),this.showBorder?N("div",{"aria-hidden":!0,class:`${e}-button__border`,style:this.customColorCssVars}):null,this.showBorder?N("div",{"aria-hidden":!0,class:`${e}-button__state-border`,style:this.customColorCssVars}):null)}}),yk={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 Ek(e){const{primaryColor:t,borderRadius:n,lineHeight:r,fontSize:s,cardColor:i,textColor2:a,textColor1:o,dividerColor:c,fontWeightStrong:l,closeIconColor:u,closeIconColorHover:f,closeIconColorPressed:m,closeColorHover:h,closeColorPressed:b,modalColor:p,boxShadow1:E,popoverColor:g,actionColor:y}=e;return Object.assign(Object.assign({},yk),{lineHeight:r,color:i,colorModal:p,colorPopover:g,colorTarget:t,colorEmbedded:y,colorEmbeddedModal:y,colorEmbeddedPopover:y,textColor:a,titleTextColor:o,borderColor:c,actionColor:y,titleFontWeight:l,closeColorHover:h,closeColorPressed:b,closeBorderRadius:n,closeIconColor:u,closeIconColorHover:f,closeIconColorPressed:m,fontSizeSmall:s,fontSizeMedium:s,fontSizeLarge:s,fontSizeHuge:s,boxShadow:E,borderRadius:n})}const Fx={name:"Card",common:ds,self:Ek},Ck=oe([j("card",`
482
+ font-size: var(--n-font-size);
483
+ line-height: var(--n-line-height);
484
+ display: flex;
485
+ flex-direction: column;
486
+ width: 100%;
487
+ box-sizing: border-box;
488
+ position: relative;
489
+ border-radius: var(--n-border-radius);
490
+ background-color: var(--n-color);
491
+ color: var(--n-text-color);
492
+ word-break: break-word;
493
+ transition:
494
+ color .3s var(--n-bezier),
495
+ background-color .3s var(--n-bezier),
496
+ box-shadow .3s var(--n-bezier),
497
+ border-color .3s var(--n-bezier);
498
+ `,[mx({background:"var(--n-color-modal)"}),ae("hoverable",[oe("&:hover","box-shadow: var(--n-box-shadow);")]),ae("content-segmented",[oe(">",[ee("content",{paddingTop:"var(--n-padding-bottom)"})])]),ae("content-soft-segmented",[oe(">",[ee("content",`
499
+ margin: 0 var(--n-padding-left);
500
+ padding: var(--n-padding-bottom) 0;
501
+ `)])]),ae("footer-segmented",[oe(">",[ee("footer",{paddingTop:"var(--n-padding-bottom)"})])]),ae("footer-soft-segmented",[oe(">",[ee("footer",`
502
+ padding: var(--n-padding-bottom) 0;
503
+ margin: 0 var(--n-padding-left);
504
+ `)])]),oe(">",[j("card-header",`
505
+ box-sizing: border-box;
506
+ display: flex;
507
+ align-items: center;
508
+ font-size: var(--n-title-font-size);
509
+ padding:
510
+ var(--n-padding-top)
511
+ var(--n-padding-left)
512
+ var(--n-padding-bottom)
513
+ var(--n-padding-left);
514
+ `,[ee("main",`
515
+ font-weight: var(--n-title-font-weight);
516
+ transition: color .3s var(--n-bezier);
517
+ flex: 1;
518
+ min-width: 0;
519
+ color: var(--n-title-text-color);
520
+ `),ee("extra",`
521
+ display: flex;
522
+ align-items: center;
523
+ font-size: var(--n-font-size);
524
+ font-weight: 400;
525
+ transition: color .3s var(--n-bezier);
526
+ color: var(--n-text-color);
527
+ `),ee("close",`
528
+ margin: 0 0 0 8px;
529
+ transition:
530
+ background-color .3s var(--n-bezier),
531
+ color .3s var(--n-bezier);
532
+ `)]),ee("action",`
533
+ box-sizing: border-box;
534
+ transition:
535
+ background-color .3s var(--n-bezier),
536
+ border-color .3s var(--n-bezier);
537
+ background-clip: padding-box;
538
+ background-color: var(--n-action-color);
539
+ `),ee("content","flex: 1; min-width: 0;"),ee("content, footer",`
540
+ box-sizing: border-box;
541
+ padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left);
542
+ font-size: var(--n-font-size);
543
+ `,[oe("&:first-child",{paddingTop:"var(--n-padding-bottom)"})]),ee("action",`
544
+ background-color: var(--n-action-color);
545
+ padding: var(--n-padding-bottom) var(--n-padding-left);
546
+ border-bottom-left-radius: var(--n-border-radius);
547
+ border-bottom-right-radius: var(--n-border-radius);
548
+ `)]),j("card-cover",`
549
+ overflow: hidden;
550
+ width: 100%;
551
+ border-radius: var(--n-border-radius) var(--n-border-radius) 0 0;
552
+ `,[oe("img",`
553
+ display: block;
554
+ width: 100%;
555
+ `)]),ae("bordered",`
556
+ border: 1px solid var(--n-border-color);
557
+ `,[oe("&:target","border-color: var(--n-color-target);")]),ae("action-segmented",[oe(">",[ee("action",[oe("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),ae("content-segmented, content-soft-segmented",[oe(">",[ee("content",{transition:"border-color 0.3s var(--n-bezier)"},[oe("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),ae("footer-segmented, footer-soft-segmented",[oe(">",[ee("footer",{transition:"border-color 0.3s var(--n-bezier)"},[oe("&:not(:first-child)",{borderTop:"1px solid var(--n-border-color)"})])])]),ae("embedded",`
558
+ background-color: var(--n-color-embedded);
559
+ `)]),Zb(j("card",`
560
+ background: var(--n-color-modal);
561
+ `,[ae("embedded",`
562
+ background-color: var(--n-color-embedded-modal);
563
+ `)])),hx(j("card",`
564
+ background: var(--n-color-popover);
565
+ `,[ae("embedded",`
566
+ background-color: var(--n-color-embedded-popover);
567
+ `)]))]),lg={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},xk=cg(lg),vk=Object.assign(Object.assign({},nn.props),lg),zx=bt({name:"Card",props:vk,slots:Object,setup(e){const t=()=>{const{onClose:l}=e;l&&Ct(l)},{inlineThemeDisabled:n,mergedClsPrefixRef:r,mergedRtlRef:s}=hr(e),i=nn("Card","-card",Ck,Fx,e,r),a=$s("Card",s,r),o=ze(()=>{const{size:l}=e,{self:{color:u,colorModal:f,colorTarget:m,textColor:h,titleTextColor:b,titleFontWeight:p,borderColor:E,actionColor:g,borderRadius:y,lineHeight:w,closeIconColor:x,closeIconColorHover:S,closeIconColorPressed:C,closeColorHover:T,closeColorPressed:k,closeBorderRadius:R,closeIconSize:V,closeSize:Q,boxShadow:A,colorPopover:W,colorEmbedded:_,colorEmbeddedModal:Y,colorEmbeddedPopover:De,[We("padding",l)]:te,[We("fontSize",l)]:Me,[We("titleFontSize",l)]:de},common:{cubicBezierEaseInOut:Ue}}=i.value,{top:J,left:Z,bottom:Xe}=vs(te);return{"--n-bezier":Ue,"--n-border-radius":y,"--n-color":u,"--n-color-modal":f,"--n-color-popover":W,"--n-color-embedded":_,"--n-color-embedded-modal":Y,"--n-color-embedded-popover":De,"--n-color-target":m,"--n-text-color":h,"--n-line-height":w,"--n-action-color":g,"--n-title-text-color":b,"--n-title-font-weight":p,"--n-close-icon-color":x,"--n-close-icon-color-hover":S,"--n-close-icon-color-pressed":C,"--n-close-color-hover":T,"--n-close-color-pressed":k,"--n-border-color":E,"--n-box-shadow":A,"--n-padding-top":J,"--n-padding-bottom":Xe,"--n-padding-left":Z,"--n-font-size":Me,"--n-title-font-size":de,"--n-close-size":Q,"--n-close-icon-size":V,"--n-close-border-radius":R}}),c=n?fs("card",ze(()=>e.size[0]),o,e):void 0;return{rtlEnabled:a,mergedClsPrefix:r,mergedTheme:i,handleCloseClick:t,cssVars:n?void 0:o,themeClass:c==null?void 0:c.themeClass,onRender:c==null?void 0: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==null||i(),N(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},Ln(c.cover,l=>{const u=this.cover?Es([this.cover()]):l;return u&&N("div",{class:`${r}-card-cover`,role:"none"},u)}),Ln(c.header,l=>{const{title:u}=this,f=u?Es(typeof u=="function"?[u()]:[u]):l;return f||this.closable?N("div",{class:[`${r}-card-header`,this.headerClass],style:this.headerStyle,role:"heading"},N("div",{class:`${r}-card-header__main`,role:"heading"},f),Ln(c["header-extra"],m=>{const h=this.headerExtra?Es([this.headerExtra()]):m;return h&&N("div",{class:[`${r}-card-header__extra`,this.headerExtraClass],style:this.headerExtraStyle},h)}),this.closable&&N(Jb,{clsPrefix:r,class:`${r}-card-header__close`,onClick:this.handleCloseClick,absolute:!0})):null}),Ln(c.default,l=>{const{content:u}=this,f=u?Es(typeof u=="function"?[u()]:[u]):l;return f&&N("div",{class:[`${r}-card__content`,this.contentClass],style:this.contentStyle,role:"none"},f)}),Ln(c.footer,l=>{const u=this.footer?Es([this.footer()]):l;return u&&N("div",{class:[`${r}-card__footer`,this.footerClass],style:this.footerStyle,role:"none"},u)}),Ln(c.action,l=>{const u=this.action?Es([this.action()]):l;return u&&N("div",{class:`${r}-card__action`,role:"none"},u)}))}}),_k={sizeSmall:"14px",sizeMedium:"16px",sizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function Tk(e){const{baseColor:t,inputColorDisabled:n,cardColor:r,modalColor:s,popoverColor:i,textColorDisabled:a,borderColor:o,primaryColor:c,textColor2:l,fontSizeSmall:u,fontSizeMedium:f,fontSizeLarge:m,borderRadiusSmall:h,lineHeight:b}=e;return Object.assign(Object.assign({},_k),{labelLineHeight:b,fontSizeSmall:u,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 ${Zs(c,{alpha:.3})}`,textColor:l,textColorDisabled:a})}const Sk={common:ds,self:Tk},wk=es("n-checkbox-group"),Ak=()=>N("svg",{viewBox:"0 0 64 64",class:"check-icon"},N("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"})),kk=()=>N("svg",{viewBox:"0 0 100 100",class:"line-icon"},N("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"})),Rk=oe([j("checkbox",`
568
+ font-size: var(--n-font-size);
569
+ outline: none;
570
+ cursor: pointer;
571
+ display: inline-flex;
572
+ flex-wrap: nowrap;
573
+ align-items: flex-start;
574
+ word-break: break-word;
575
+ line-height: var(--n-size);
576
+ --n-merged-color-table: var(--n-color-table);
577
+ `,[ae("show-label","line-height: var(--n-label-line-height);"),oe("&:hover",[j("checkbox-box",[ee("border","border: var(--n-border-checked);")])]),oe("&:focus:not(:active)",[j("checkbox-box",[ee("border",`
578
+ border: var(--n-border-focus);
579
+ box-shadow: var(--n-box-shadow-focus);
580
+ `)])]),ae("inside-table",[j("checkbox-box",`
581
+ background-color: var(--n-merged-color-table);
582
+ `)]),ae("checked",[j("checkbox-box",`
583
+ background-color: var(--n-color-checked);
584
+ `,[j("checkbox-icon",[oe(".check-icon",`
585
+ opacity: 1;
586
+ transform: scale(1);
587
+ `)])])]),ae("indeterminate",[j("checkbox-box",[j("checkbox-icon",[oe(".check-icon",`
588
+ opacity: 0;
589
+ transform: scale(.5);
590
+ `),oe(".line-icon",`
591
+ opacity: 1;
592
+ transform: scale(1);
593
+ `)])])]),ae("checked, indeterminate",[oe("&:focus:not(:active)",[j("checkbox-box",[ee("border",`
594
+ border: var(--n-border-checked);
595
+ box-shadow: var(--n-box-shadow-focus);
596
+ `)])]),j("checkbox-box",`
597
+ background-color: var(--n-color-checked);
598
+ border-left: 0;
599
+ border-top: 0;
600
+ `,[ee("border",{border:"var(--n-border-checked)"})])]),ae("disabled",{cursor:"not-allowed"},[ae("checked",[j("checkbox-box",`
601
+ background-color: var(--n-color-disabled-checked);
602
+ `,[ee("border",{border:"var(--n-border-disabled-checked)"}),j("checkbox-icon",[oe(".check-icon, .line-icon",{fill:"var(--n-check-mark-color-disabled-checked)"})])])]),j("checkbox-box",`
603
+ background-color: var(--n-color-disabled);
604
+ `,[ee("border",`
605
+ border: var(--n-border-disabled);
606
+ `),j("checkbox-icon",[oe(".check-icon, .line-icon",`
607
+ fill: var(--n-check-mark-color-disabled);
608
+ `)])]),ee("label",`
609
+ color: var(--n-text-color-disabled);
610
+ `)]),j("checkbox-box-wrapper",`
611
+ position: relative;
612
+ width: var(--n-size);
613
+ flex-shrink: 0;
614
+ flex-grow: 0;
615
+ user-select: none;
616
+ -webkit-user-select: none;
617
+ `),j("checkbox-box",`
618
+ position: absolute;
619
+ left: 0;
620
+ top: 50%;
621
+ transform: translateY(-50%);
622
+ height: var(--n-size);
623
+ width: var(--n-size);
624
+ display: inline-block;
625
+ box-sizing: border-box;
626
+ border-radius: var(--n-border-radius);
627
+ background-color: var(--n-color);
628
+ transition: background-color 0.3s var(--n-bezier);
629
+ `,[ee("border",`
630
+ transition:
631
+ border-color .3s var(--n-bezier),
632
+ box-shadow .3s var(--n-bezier);
633
+ border-radius: inherit;
634
+ position: absolute;
635
+ left: 0;
636
+ right: 0;
637
+ top: 0;
638
+ bottom: 0;
639
+ border: var(--n-border);
640
+ `),j("checkbox-icon",`
641
+ display: flex;
642
+ align-items: center;
643
+ justify-content: center;
644
+ position: absolute;
645
+ left: 1px;
646
+ right: 1px;
647
+ top: 1px;
648
+ bottom: 1px;
649
+ `,[oe(".check-icon, .line-icon",`
650
+ width: 100%;
651
+ fill: var(--n-check-mark-color);
652
+ opacity: 0;
653
+ transform: scale(0.5);
654
+ transform-origin: center;
655
+ transition:
656
+ fill 0.3s var(--n-bezier),
657
+ transform 0.3s var(--n-bezier),
658
+ opacity 0.3s var(--n-bezier),
659
+ border-color 0.3s var(--n-bezier);
660
+ `),jo({left:"1px",top:"1px"})])]),ee("label",`
661
+ color: var(--n-text-color);
662
+ transition: color .3s var(--n-bezier);
663
+ user-select: none;
664
+ -webkit-user-select: none;
665
+ padding: var(--n-label-padding);
666
+ font-weight: var(--n-label-font-weight);
667
+ `,[oe("&:empty",{display:"none"})])]),Zb(j("checkbox",`
668
+ --n-merged-color-table: var(--n-color-table-modal);
669
+ `)),hx(j("checkbox",`
670
+ --n-merged-color-table: var(--n-color-table-popover);
671
+ `))]),Ik=Object.assign(Object.assign({},nn.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]}),Ri=bt({name:"Checkbox",props:Ik,setup(e){const t=Jr(wk,null),n=Fe(null),{mergedClsPrefixRef:r,inlineThemeDisabled:s,mergedRtlRef:i}=hr(e),a=Fe(e.defaultChecked),o=sn(e,"checked"),c=$c(o,a),l=no(()=>{if(t){const C=t.valueSetRef.value;return C&&e.value!==void 0?C.has(e.value):!1}else return c.value===e.checkedValue}),u=yu(e,{mergedSize(C){const{size:T}=e;if(T!==void 0)return T;if(t){const{value:k}=t.mergedSizeRef;if(k!==void 0)return k}if(C){const{mergedSize:k}=C;if(k!==void 0)return k.value}return"medium"},mergedDisabled(C){const{disabled:T}=e;if(T!==void 0)return T;if(t){if(t.disabledRef.value)return!0;const{maxRef:{value:k},checkedCountRef:R}=t;if(k!==void 0&&R.value>=k&&!l.value)return!0;const{minRef:{value:V}}=t;if(V!==void 0&&R.value<=V&&l.value)return!0}return C?C.disabled.value:!1}}),{mergedDisabledRef:f,mergedSizeRef:m}=u,h=nn("Checkbox","-checkbox",Rk,Sk,e,r);function b(C){if(t&&e.value!==void 0)t.toggleCheckbox(!l.value,e.value);else{const{onChange:T,"onUpdate:checked":k,onUpdateChecked:R}=e,{nTriggerFormInput:V,nTriggerFormChange:Q}=u,A=l.value?e.uncheckedValue:e.checkedValue;k&&Ct(k,A,C),R&&Ct(R,A,C),T&&Ct(T,A,C),V(),Q(),a.value=A}}function p(C){f.value||b(C)}function E(C){if(!f.value)switch(C.key){case" ":case"Enter":b(C)}}function g(C){switch(C.key){case" ":C.preventDefault()}}const y={focus:()=>{var C;(C=n.value)===null||C===void 0||C.focus()},blur:()=>{var C;(C=n.value)===null||C===void 0||C.blur()}},w=$s("Checkbox",i,r),x=ze(()=>{const{value:C}=m,{common:{cubicBezierEaseInOut:T},self:{borderRadius:k,color:R,colorChecked:V,colorDisabled:Q,colorTableHeader:A,colorTableHeaderModal:W,colorTableHeaderPopover:_,checkMarkColor:Y,checkMarkColorDisabled:De,border:te,borderFocus:Me,borderDisabled:de,borderChecked:Ue,boxShadowFocus:J,textColor:Z,textColorDisabled:Xe,checkMarkColorDisabledChecked:Le,colorDisabledChecked:Re,borderDisabledChecked:Je,labelPadding:Ht,labelLineHeight:ht,labelFontWeight:Ve,[We("fontSize",C)]:Nt,[We("size",C)]:Dt}}=h.value;return{"--n-label-line-height":ht,"--n-label-font-weight":Ve,"--n-size":Dt,"--n-bezier":T,"--n-border-radius":k,"--n-border":te,"--n-border-checked":Ue,"--n-border-focus":Me,"--n-border-disabled":de,"--n-border-disabled-checked":Je,"--n-box-shadow-focus":J,"--n-color":R,"--n-color-checked":V,"--n-color-table":A,"--n-color-table-modal":W,"--n-color-table-popover":_,"--n-color-disabled":Q,"--n-color-disabled-checked":Re,"--n-text-color":Z,"--n-text-color-disabled":Xe,"--n-check-mark-color":Y,"--n-check-mark-color-disabled":De,"--n-check-mark-color-disabled-checked":Le,"--n-font-size":Nt,"--n-label-padding":Ht}}),S=s?fs("checkbox",ze(()=>m.value[0]),x,e):void 0;return Object.assign(u,y,{rtlEnabled:w,selfRef:n,mergedClsPrefix:r,mergedDisabled:f,renderedChecked:l,mergedTheme:h,labelId:Vb(),handleClick:p,handleKeyUp:E,handleKeyDown:g,cssVars:s?void 0:x,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0: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:u,handleKeyUp:f,handleKeyDown:m,handleClick:h}=this;(e=this.onRender)===null||e===void 0||e.call(this);const b=Ln(t.default,p=>c||p?N("span",{class:`${l}-checkbox__label`,id:o},c||p):null);return N("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`,b&&`${l}-checkbox--show-label`],tabindex:r||!u?void 0:0,role:"checkbox","aria-checked":s?"mixed":n,"aria-labelledby":o,style:a,onKeyup:f,onKeydown:m,onClick:h,onMousedown:()=>{$n("selectstart",window,p=>{p.preventDefault()},{once:!0})}},N("div",{class:`${l}-checkbox-box-wrapper`}," ",N("div",{class:`${l}-checkbox-box`},N(Yf,null,{default:()=>this.indeterminate?N("div",{key:"indeterminate",class:`${l}-checkbox-icon`},kk()):N("div",{key:"check",class:`${l}-checkbox-icon`},Ak())}),N("div",{class:`${l}-checkbox-box__border`}))),b)}});function Bk(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 Pk={common:ds,self:Bk},Nk=j("collapse","width: 100%;",[j("collapse-item",`
672
+ font-size: var(--n-font-size);
673
+ color: var(--n-text-color);
674
+ transition:
675
+ color .3s var(--n-bezier),
676
+ border-color .3s var(--n-bezier);
677
+ margin: var(--n-item-margin);
678
+ `,[ae("disabled",[ee("header","cursor: not-allowed;",[ee("header-main",`
679
+ color: var(--n-title-text-color-disabled);
680
+ `),j("collapse-item-arrow",`
681
+ color: var(--n-arrow-color-disabled);
682
+ `)])]),j("collapse-item","margin-left: 32px;"),oe("&:first-child","margin-top: 0;"),oe("&:first-child >",[ee("header","padding-top: 0;")]),ae("left-arrow-placement",[ee("header",[j("collapse-item-arrow","margin-right: 4px;")])]),ae("right-arrow-placement",[ee("header",[j("collapse-item-arrow","margin-left: 4px;")])]),ee("content-wrapper",[ee("content-inner","padding-top: 16px;"),S2({duration:"0.15s"})]),ae("active",[ee("header",[ae("active",[j("collapse-item-arrow","transform: rotate(90deg);")])])]),oe("&:not(:first-child)","border-top: 1px solid var(--n-divider-color);"),Mr("disabled",[ae("trigger-area-main",[ee("header",[ee("header-main","cursor: pointer;"),j("collapse-item-arrow","cursor: default;")])]),ae("trigger-area-arrow",[ee("header",[j("collapse-item-arrow","cursor: pointer;")])]),ae("trigger-area-extra",[ee("header",[ee("header-extra","cursor: pointer;")])])]),ee("header",`
683
+ font-size: var(--n-title-font-size);
684
+ display: flex;
685
+ flex-wrap: nowrap;
686
+ align-items: center;
687
+ transition: color .3s var(--n-bezier);
688
+ position: relative;
689
+ padding: var(--n-title-padding);
690
+ color: var(--n-title-text-color);
691
+ `,[ee("header-main",`
692
+ display: flex;
693
+ flex-wrap: nowrap;
694
+ align-items: center;
695
+ font-weight: var(--n-title-font-weight);
696
+ transition: color .3s var(--n-bezier);
697
+ flex: 1;
698
+ color: var(--n-title-text-color);
699
+ `),ee("header-extra",`
700
+ display: flex;
701
+ align-items: center;
702
+ transition: color .3s var(--n-bezier);
703
+ color: var(--n-text-color);
704
+ `),j("collapse-item-arrow",`
705
+ display: flex;
706
+ transition:
707
+ transform .15s var(--n-bezier),
708
+ color .3s var(--n-bezier);
709
+ font-size: 18px;
710
+ color: var(--n-arrow-color);
711
+ `)])])]),Ok=Object.assign(Object.assign({},nn.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}}),Ux=es("n-collapse"),Dk=bt({name:"Collapse",props:Ok,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:s}=hr(e),i=Fe(e.defaultExpandedNames),a=ze(()=>e.expandedNames),o=$c(a,i),c=nn("Collapse","-collapse",Nk,Pk,e,n);function l(p){const{"onUpdate:expandedNames":E,onUpdateExpandedNames:g,onExpandedNamesChange:y}=e;g&&Ct(g,p),E&&Ct(E,p),y&&Ct(y,p),i.value=p}function u(p){const{onItemHeaderClick:E}=e;E&&Ct(E,p)}function f(p,E,g){const{accordion:y}=e,{value:w}=o;if(y)p?(l([E]),u({name:E,expanded:!0,event:g})):(l([]),u({name:E,expanded:!1,event:g}));else if(!Array.isArray(w))l([E]),u({name:E,expanded:!0,event:g});else{const x=w.slice(),S=x.findIndex(C=>E===C);~S?(x.splice(S,1),l(x),u({name:E,expanded:!1,event:g})):(x.push(E),l(x),u({name:E,expanded:!0,event:g}))}}Js(Ux,{props:e,mergedClsPrefixRef:n,expandedNamesRef:o,slots:t,toggleItem:f});const m=$s("Collapse",s,n),h=ze(()=>{const{common:{cubicBezierEaseInOut:p},self:{titleFontWeight:E,dividerColor:g,titlePadding:y,titleTextColor:w,titleTextColorDisabled:x,textColor:S,arrowColor:C,fontSize:T,titleFontSize:k,arrowColorDisabled:R,itemMargin:V}}=c.value;return{"--n-font-size":T,"--n-bezier":p,"--n-text-color":S,"--n-divider-color":g,"--n-title-padding":y,"--n-title-font-size":k,"--n-title-text-color":w,"--n-title-text-color-disabled":x,"--n-title-font-weight":E,"--n-arrow-color":C,"--n-arrow-color-disabled":R,"--n-item-margin":V}}),b=r?fs("collapse",void 0,h,e):void 0;return{rtlEnabled:m,mergedTheme:c,mergedClsPrefix:n,cssVars:r?void 0:h,themeClass:b==null?void 0:b.themeClass,onRender:b==null?void 0:b.onRender}},render(){var e;return(e=this.onRender)===null||e===void 0||e.call(this),N("div",{class:[`${this.mergedClsPrefix}-collapse`,this.rtlEnabled&&`${this.mergedClsPrefix}-collapse--rtl`,this.themeClass],style:this.cssVars},this.$slots)}}),Lk=bt({name:"CollapseItemContent",props:{displayDirective:{type:String,required:!0},show:Boolean,clsPrefix:{type:String,required:!0}},setup(e){return{onceTrue:Ex(sn(e,"show"))}},render(){return N(fx,null,{default:()=>{const{show:e,displayDirective:t,onceTrue:n,clsPrefix:r}=this,s=t==="show"&&n,i=N("div",{class:`${r}-collapse-item__content-wrapper`},N("div",{class:`${r}-collapse-item__content-inner`},this.$slots));return s?Zl(i,[[df,e]]):e?i:null}})}}),Mk={title:String,name:[String,Number],disabled:Boolean,displayDirective:String},Vu=bt({name:"CollapseItem",props:Mk,setup(e){const{mergedRtlRef:t}=hr(e),n=Vb(),r=no(()=>{var f;return(f=e.name)!==null&&f!==void 0?f:n}),s=Jr(Ux);s||Qf("collapse-item","`n-collapse-item` must be placed inside `n-collapse`.");const{expandedNamesRef:i,props:a,mergedClsPrefixRef:o,slots:c}=s,l=ze(()=>{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:$s("Collapse",t,o),collapseSlots:c,randomName:n,mergedClsPrefix:o,collapsed:l,triggerAreas:sn(a,"triggerAreas"),mergedDisplayDirective:ze(()=>{const{displayDirective:f}=e;return f||a.displayDirective}),arrowPlacement:ze(()=>a.arrowPlacement),handleClick(f){let m="main";Jp(f,"arrow")&&(m="arrow"),Jp(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=_m(t.header,{collapsed:r},()=>[this.title]),l=t["header-extra"]||e["header-extra"],u=t.arrow||e.arrow;return N("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}`)]},N("div",{class:[`${i}-collapse-item__header`,!r&&`${i}-collapse-item__header--active`]},N("div",{class:`${i}-collapse-item__header-main`,onClick:this.handleClick},n==="right"&&c,N("div",{class:`${i}-collapse-item-arrow`,key:this.rtlEnabled?0:1,"data-arrow":!0},_m(u,{collapsed:r},()=>[N(Us,{clsPrefix:i},{default:()=>this.rtlEnabled?N(U3,null):N($3,null)})])),n==="left"&&c),UA(l,{collapsed:r},f=>N("div",{class:`${i}-collapse-item__header-extra`,onClick:this.handleClick,"data-extra":!0},f))),N(Lk,{clsPrefix:i,displayDirective:s,show:!r},t))}}),Fk={radioSizeSmall:"14px",radioSizeMedium:"16px",radioSizeLarge:"18px",labelPadding:"0 8px",labelFontWeight:"400"};function zk(e){const{borderColor:t,primaryColor:n,baseColor:r,textColorDisabled:s,inputColorDisabled:i,textColor2:a,opacityDisabled:o,borderRadius:c,fontSizeSmall:l,fontSizeMedium:u,fontSizeLarge:f,heightSmall:m,heightMedium:h,heightLarge:b,lineHeight:p}=e;return Object.assign(Object.assign({},Fk),{labelLineHeight:p,buttonHeightSmall:m,buttonHeightMedium:h,buttonHeightLarge:b,fontSizeSmall:l,fontSizeMedium:u,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 ${Zs(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 ${Zs(n,{alpha:.3})}`,buttonBoxShadowHover:"inset 0 0 0 1px #0000",buttonBoxShadow:"inset 0 0 0 1px #0000",buttonBorderRadius:c})}const Uk={common:ds,self:zk},$k={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}},$x=es("n-radio-group");function Hk(e){const t=Jr($x,null),n=yu(e,{mergedSize(y){const{size:w}=e;if(w!==void 0)return w;if(t){const{mergedSizeRef:{value:x}}=t;if(x!==void 0)return x}return y?y.mergedSize.value:"medium"},mergedDisabled(y){return!!(e.disabled||t!=null&&t.disabledRef.value||y!=null&&y.disabled.value)}}),{mergedSizeRef:r,mergedDisabledRef:s}=n,i=Fe(null),a=Fe(null),o=Fe(e.defaultChecked),c=sn(e,"checked"),l=$c(c,o),u=no(()=>t?t.valueRef.value===e.value:l.value),f=no(()=>{const{name:y}=e;if(y!==void 0)return y;if(t)return t.nameRef.value}),m=Fe(!1);function h(){if(t){const{doUpdateValue:y}=t,{value:w}=e;Ct(y,w)}else{const{onUpdateChecked:y,"onUpdate:checked":w}=e,{nTriggerFormInput:x,nTriggerFormChange:S}=n;y&&Ct(y,!0),w&&Ct(w,!0),x(),S(),o.value=!0}}function b(){s.value||u.value||h()}function p(){b(),i.value&&(i.value.checked=u.value)}function E(){m.value=!1}function g(){m.value=!0}return{mergedClsPrefix:t?t.mergedClsPrefixRef:hr(e).mergedClsPrefixRef,inputRef:i,labelRef:a,mergedName:f,mergedDisabled:s,renderSafeChecked:u,focus:m,mergedSize:r,handleRadioInputChange:p,handleRadioInputBlur:E,handleRadioInputFocus:g}}const qk=bt({name:"RadioButton",props:$k,setup:Hk,render(){const{mergedClsPrefix:e}=this;return N("label",{class:[`${e}-radio-button`,this.mergedDisabled&&`${e}-radio-button--disabled`,this.renderSafeChecked&&`${e}-radio-button--checked`,this.focus&&[`${e}-radio-button--focus`]]},N("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}),N("div",{class:`${e}-radio-button__state-border`}),Ln(this.$slots.default,t=>!t&&!this.label?null:N("div",{ref:"labelRef",class:`${e}-radio__label`},t||this.label)))}}),jk=j("radio-group",`
712
+ display: inline-block;
713
+ font-size: var(--n-font-size);
714
+ `,[ee("splitor",`
715
+ display: inline-block;
716
+ vertical-align: bottom;
717
+ width: 1px;
718
+ transition:
719
+ background-color .3s var(--n-bezier),
720
+ opacity .3s var(--n-bezier);
721
+ background: var(--n-button-border-color);
722
+ `,[ae("checked",{backgroundColor:"var(--n-button-border-color-active)"}),ae("disabled",{opacity:"var(--n-opacity-disabled)"})]),ae("button-group",`
723
+ white-space: nowrap;
724
+ height: var(--n-height);
725
+ line-height: var(--n-height);
726
+ `,[j("radio-button",{height:"var(--n-height)",lineHeight:"var(--n-height)"}),ee("splitor",{height:"var(--n-height)"})]),j("radio-button",`
727
+ vertical-align: bottom;
728
+ outline: none;
729
+ position: relative;
730
+ user-select: none;
731
+ -webkit-user-select: none;
732
+ display: inline-block;
733
+ box-sizing: border-box;
734
+ padding-left: 14px;
735
+ padding-right: 14px;
736
+ white-space: nowrap;
737
+ transition:
738
+ background-color .3s var(--n-bezier),
739
+ opacity .3s var(--n-bezier),
740
+ border-color .3s var(--n-bezier),
741
+ color .3s var(--n-bezier);
742
+ background: var(--n-button-color);
743
+ color: var(--n-button-text-color);
744
+ border-top: 1px solid var(--n-button-border-color);
745
+ border-bottom: 1px solid var(--n-button-border-color);
746
+ `,[j("radio-input",`
747
+ pointer-events: none;
748
+ position: absolute;
749
+ border: 0;
750
+ border-radius: inherit;
751
+ left: 0;
752
+ right: 0;
753
+ top: 0;
754
+ bottom: 0;
755
+ opacity: 0;
756
+ z-index: 1;
757
+ `),ee("state-border",`
758
+ z-index: 1;
759
+ pointer-events: none;
760
+ position: absolute;
761
+ box-shadow: var(--n-button-box-shadow);
762
+ transition: box-shadow .3s var(--n-bezier);
763
+ left: -1px;
764
+ bottom: -1px;
765
+ right: -1px;
766
+ top: -1px;
767
+ `),oe("&:first-child",`
768
+ border-top-left-radius: var(--n-button-border-radius);
769
+ border-bottom-left-radius: var(--n-button-border-radius);
770
+ border-left: 1px solid var(--n-button-border-color);
771
+ `,[ee("state-border",`
772
+ border-top-left-radius: var(--n-button-border-radius);
773
+ border-bottom-left-radius: var(--n-button-border-radius);
774
+ `)]),oe("&:last-child",`
775
+ border-top-right-radius: var(--n-button-border-radius);
776
+ border-bottom-right-radius: var(--n-button-border-radius);
777
+ border-right: 1px solid var(--n-button-border-color);
778
+ `,[ee("state-border",`
779
+ border-top-right-radius: var(--n-button-border-radius);
780
+ border-bottom-right-radius: var(--n-button-border-radius);
781
+ `)]),Mr("disabled",`
782
+ cursor: pointer;
783
+ `,[oe("&:hover",[ee("state-border",`
784
+ transition: box-shadow .3s var(--n-bezier);
785
+ box-shadow: var(--n-button-box-shadow-hover);
786
+ `),Mr("checked",{color:"var(--n-button-text-color-hover)"})]),ae("focus",[oe("&:not(:active)",[ee("state-border",{boxShadow:"var(--n-button-box-shadow-focus)"})])])]),ae("checked",`
787
+ background: var(--n-button-color-active);
788
+ color: var(--n-button-text-color-active);
789
+ border-color: var(--n-button-border-color-active);
790
+ `),ae("disabled",`
791
+ cursor: not-allowed;
792
+ opacity: var(--n-opacity-disabled);
793
+ `)])]);function Wk(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 u=s[s.length-1].props,f=t===u.value,m=u.disabled,h=t===l.value,b=l.disabled,p=(f?2:0)+(m?0:1),E=(h?2:0)+(b?0:1),g={[`${n}-radio-group__splitor--disabled`]:m,[`${n}-radio-group__splitor--checked`]:f},y={[`${n}-radio-group__splitor--disabled`]:b,[`${n}-radio-group__splitor--checked`]:h},w=p<E?y:g;s.push(N("div",{class:[`${n}-radio-group__splitor`,w]}),o)}}return{children:s,isButtonGroup:i}}const Gk=Object.assign(Object.assign({},nn.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]}),Vk=bt({name:"RadioGroup",props:Gk,setup(e){const t=Fe(null),{mergedSizeRef:n,mergedDisabledRef:r,nTriggerFormChange:s,nTriggerFormInput:i,nTriggerFormBlur:a,nTriggerFormFocus:o}=yu(e),{mergedClsPrefixRef:c,inlineThemeDisabled:l,mergedRtlRef:u}=hr(e),f=nn("Radio","-radio-group",jk,Uk,e,c),m=Fe(e.defaultValue),h=sn(e,"value"),b=$c(h,m);function p(S){const{onUpdateValue:C,"onUpdate:value":T}=e;C&&Ct(C,S),T&&Ct(T,S),m.value=S,s(),i()}function E(S){const{value:C}=t;C&&(C.contains(S.relatedTarget)||o())}function g(S){const{value:C}=t;C&&(C.contains(S.relatedTarget)||a())}Js($x,{mergedClsPrefixRef:c,nameRef:sn(e,"name"),valueRef:b,disabledRef:r,mergedSizeRef:n,doUpdateValue:p});const y=$s("Radio",u,c),w=ze(()=>{const{value:S}=n,{common:{cubicBezierEaseInOut:C},self:{buttonBorderColor:T,buttonBorderColorActive:k,buttonBorderRadius:R,buttonBoxShadow:V,buttonBoxShadowFocus:Q,buttonBoxShadowHover:A,buttonColor:W,buttonColorActive:_,buttonTextColor:Y,buttonTextColorActive:De,buttonTextColorHover:te,opacityDisabled:Me,[We("buttonHeight",S)]:de,[We("fontSize",S)]:Ue}}=f.value;return{"--n-font-size":Ue,"--n-bezier":C,"--n-button-border-color":T,"--n-button-border-color-active":k,"--n-button-border-radius":R,"--n-button-box-shadow":V,"--n-button-box-shadow-focus":Q,"--n-button-box-shadow-hover":A,"--n-button-color":W,"--n-button-color-active":_,"--n-button-text-color":Y,"--n-button-text-color-hover":te,"--n-button-text-color-active":De,"--n-height":de,"--n-opacity-disabled":Me}}),x=l?fs("radio-group",ze(()=>n.value[0]),w,e):void 0;return{selfElRef:t,rtlEnabled:y,mergedClsPrefix:c,mergedValue:b,handleFocusout:g,handleFocusin:E,cssVars:l?void 0:w,themeClass:x==null?void 0:x.themeClass,onRender:x==null?void 0:x.onRender}},render(){var e;const{mergedValue:t,mergedClsPrefix:n,handleFocusin:r,handleFocusout:s}=this,{children:i,isButtonGroup:a}=Wk(pi(og(this)),t,n);return(e=this.onRender)===null||e===void 0||e.call(this),N("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)}}),Kk=es("n-dialog-provider"),Yk={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 Xk(e){const{textColor1:t,textColor2:n,modalColor:r,closeIconColor:s,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:o,closeColorPressed:c,infoColor:l,successColor:u,warningColor:f,errorColor:m,primaryColor:h,dividerColor:b,borderRadius:p,fontWeightStrong:E,lineHeight:g,fontSize:y}=e;return Object.assign(Object.assign({},Yk),{fontSize:y,lineHeight:g,border:`1px solid ${b}`,titleTextColor:t,textColor:n,color:r,closeColorHover:o,closeColorPressed:c,closeIconColor:s,closeIconColorHover:i,closeIconColorPressed:a,closeBorderRadius:p,iconColor:h,iconColorInfo:l,iconColorSuccess:u,iconColorWarning:f,iconColorError:m,borderRadius:p,titleFontWeight:E})}const Hx=bx({name:"Dialog",common:ds,peers:{Button:Mx},self:Xk}),ug={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},Qk=cg(ug),Zk=oe([j("dialog",`
794
+ --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);
795
+ word-break: break-word;
796
+ line-height: var(--n-line-height);
797
+ position: relative;
798
+ background: var(--n-color);
799
+ color: var(--n-text-color);
800
+ box-sizing: border-box;
801
+ margin: auto;
802
+ border-radius: var(--n-border-radius);
803
+ padding: var(--n-padding);
804
+ transition:
805
+ border-color .3s var(--n-bezier),
806
+ background-color .3s var(--n-bezier),
807
+ color .3s var(--n-bezier);
808
+ `,[ee("icon",{color:"var(--n-icon-color)"}),ae("bordered",{border:"var(--n-border)"}),ae("icon-top",[ee("close",{margin:"var(--n-close-margin)"}),ee("icon",{margin:"var(--n-icon-margin)"}),ee("content",{textAlign:"center"}),ee("title",{justifyContent:"center"}),ee("action",{justifyContent:"center"})]),ae("icon-left",[ee("icon",{margin:"var(--n-icon-margin)"}),ae("closable",[ee("title",`
809
+ padding-right: calc(var(--n-close-size) + 6px);
810
+ `)])]),ee("close",`
811
+ position: absolute;
812
+ right: 0;
813
+ top: 0;
814
+ margin: var(--n-close-margin);
815
+ transition:
816
+ background-color .3s var(--n-bezier),
817
+ color .3s var(--n-bezier);
818
+ z-index: 1;
819
+ `),ee("content",`
820
+ font-size: var(--n-font-size);
821
+ margin: var(--n-content-margin);
822
+ position: relative;
823
+ word-break: break-word;
824
+ `,[ae("last","margin-bottom: 0;")]),ee("action",`
825
+ display: flex;
826
+ justify-content: flex-end;
827
+ `,[oe("> *:not(:last-child)",`
828
+ margin-right: var(--n-action-space);
829
+ `)]),ee("icon",`
830
+ font-size: var(--n-icon-size);
831
+ transition: color .3s var(--n-bezier);
832
+ `),ee("title",`
833
+ transition: color .3s var(--n-bezier);
834
+ display: flex;
835
+ align-items: center;
836
+ font-size: var(--n-title-font-size);
837
+ font-weight: var(--n-title-font-weight);
838
+ color: var(--n-title-text-color);
839
+ `),j("dialog-icon-container",`
840
+ display: flex;
841
+ justify-content: center;
842
+ `)]),Zb(j("dialog",`
843
+ width: 446px;
844
+ max-width: calc(100vw - 32px);
845
+ `)),j("dialog",[mx(`
846
+ width: 446px;
847
+ max-width: calc(100vw - 32px);
848
+ `)])]),Jk={default:()=>N(ff,null),info:()=>N(ff,null),success:()=>N(ng,null),warning:()=>N(tg,null),error:()=>N(eg,null)},eR=bt({name:"Dialog",alias:["NimbusConfirmCard","Confirm"],props:Object.assign(Object.assign({},nn.props),ug),slots:Object,setup(e){const{mergedComponentPropsRef:t,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:s}=hr(e),i=$s("Dialog",s,n),a=ze(()=>{var h,b;const{iconPlacement:p}=e;return p||((b=(h=t==null?void 0:t.value)===null||h===void 0?void 0:h.Dialog)===null||b===void 0?void 0:b.iconPlacement)||"left"});function o(h){const{onPositiveClick:b}=e;b&&b(h)}function c(h){const{onNegativeClick:b}=e;b&&b(h)}function l(){const{onClose:h}=e;h&&h()}const u=nn("Dialog","-dialog",Zk,Hx,e,n),f=ze(()=>{const{type:h}=e,b=a.value,{common:{cubicBezierEaseInOut:p},self:{fontSize:E,lineHeight:g,border:y,titleTextColor:w,textColor:x,color:S,closeBorderRadius:C,closeColorHover:T,closeColorPressed:k,closeIconColor:R,closeIconColorHover:V,closeIconColorPressed:Q,closeIconSize:A,borderRadius:W,titleFontWeight:_,titleFontSize:Y,padding:De,iconSize:te,actionSpace:Me,contentMargin:de,closeSize:Ue,[b==="top"?"iconMarginIconTop":"iconMargin"]:J,[b==="top"?"closeMarginIconTop":"closeMargin"]:Z,[We("iconColor",h)]:Xe}}=u.value,Le=vs(J);return{"--n-font-size":E,"--n-icon-color":Xe,"--n-bezier":p,"--n-close-margin":Z,"--n-icon-margin-top":Le.top,"--n-icon-margin-right":Le.right,"--n-icon-margin-bottom":Le.bottom,"--n-icon-margin-left":Le.left,"--n-icon-size":te,"--n-close-size":Ue,"--n-close-icon-size":A,"--n-close-border-radius":C,"--n-close-color-hover":T,"--n-close-color-pressed":k,"--n-close-icon-color":R,"--n-close-icon-color-hover":V,"--n-close-icon-color-pressed":Q,"--n-color":S,"--n-text-color":x,"--n-border-radius":W,"--n-padding":De,"--n-line-height":g,"--n-border":y,"--n-content-margin":de,"--n-title-font-size":Y,"--n-title-font-weight":_,"--n-title-text-color":w,"--n-action-space":Me}}),m=r?fs("dialog",ze(()=>`${e.type[0]}${a.value[0]}`),f,e):void 0;return{mergedClsPrefix:n,rtlEnabled:i,mergedIconPlacement:a,mergedTheme:u,handlePositiveClick:o,handleNegativeClick:c,handleCloseClick:l,cssVars:r?void 0:f,themeClass:m==null?void 0:m.themeClass,onRender:m==null?void 0: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:u,positiveButtonProps:f,negativeButtonProps:m,handlePositiveClick:h,handleNegativeClick:b,mergedTheme:p,loading:E,type:g,mergedClsPrefix:y}=this;(e=this.onRender)===null||e===void 0||e.call(this);const w=i?N(Us,{clsPrefix:y,class:`${y}-dialog__icon`},{default:()=>Ln(this.$slots.icon,S=>S||(this.icon?ha(this.icon):Jk[this.type]()))}):null,x=Ln(this.$slots.action,S=>S||u||l||c?N("div",{class:[`${y}-dialog__action`,this.actionClass],style:this.actionStyle},S||(c?[ha(c)]:[this.negativeText&&N(Hi,Object.assign({theme:p.peers.Button,themeOverrides:p.peerOverrides.Button,ghost:!0,size:"small",onClick:b},m),{default:()=>ha(this.negativeText)}),this.positiveText&&N(Hi,Object.assign({theme:p.peers.Button,themeOverrides:p.peerOverrides.Button,size:"small",type:g==="default"?"primary":g,disabled:E,loading:E,onClick:h},f),{default:()=>ha(this.positiveText)})])):null);return N("div",{class:[`${y}-dialog`,this.themeClass,this.closable&&`${y}-dialog--closable`,`${y}-dialog--icon-${n}`,t&&`${y}-dialog--bordered`,this.rtlEnabled&&`${y}-dialog--rtl`],style:r,role:"dialog"},s?Ln(this.$slots.close,S=>{const C=[`${y}-dialog__close`,this.rtlEnabled&&`${y}-dialog--rtl`];return S?N("div",{class:C},S):N(Jb,{clsPrefix:y,class:C,onClick:this.handleCloseClick})}):null,i&&n==="top"?N("div",{class:`${y}-dialog-icon-container`},w):null,N("div",{class:[`${y}-dialog__title`,this.titleClass],style:this.titleStyle},i&&n==="left"?w:null,ei(this.$slots.header,()=>[ha(a)])),N("div",{class:[`${y}-dialog__content`,x?"":`${y}-dialog__content--last`,this.contentClass],style:this.contentStyle},ei(this.$slots.default,()=>[ha(o)])),x)}});function tR(e){const{modalColor:t,textColor2:n,boxShadow3:r}=e;return{color:t,textColor:n,boxShadow:r}}const nR=bx({name:"Modal",common:ds,peers:{Scrollbar:Nx,Dialog:Hx,Card:Fx},self:tR}),Sm="n-draggable";function rR(e,t){let n;const r=ze(()=>e.value!==!1),s=ze(()=>r.value?Sm:""),i=ze(()=>{const c=e.value;return c===!0||c===!1?!0:c?c.bounds!=="none":!0});function a(c){const l=c.querySelector(`.${Sm}`);if(!l||!s.value)return;let u=0,f=0,m=0,h=0,b=0,p=0,E;function g(x){x.preventDefault(),E=x;const{x:S,y:C,right:T,bottom:k}=c.getBoundingClientRect();f=S,h=C,u=window.innerWidth-T,m=window.innerHeight-k;const{left:R,top:V}=c.style;b=+V.slice(0,-2),p=+R.slice(0,-2)}function y(x){if(!E)return;const{clientX:S,clientY:C}=E;let T=x.clientX-S,k=x.clientY-C;i.value&&(T>u?T=u:-T>f&&(T=-f),k>m?k=m:-k>h&&(k=-h));const R=T+p,V=k+b;c.style.top=`${V}px`,c.style.left=`${R}px`}function w(){E=void 0,t.onEnd(c)}$n("mousedown",l,g),$n("mousemove",window,y),$n("mouseup",window,w),n=()=>{cr("mousedown",l,g),$n("mousemove",window,y),$n("mouseup",window,w)}}function o(){n&&(n(),n=void 0)}return w2(o),{stopDrag:o,startDrag:a,draggableRef:r,draggableClassRef:s}}const dg=Object.assign(Object.assign({},lg),ug),sR=cg(dg),iR=bt({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}},dg),{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=Fe(null),n=Fe(null),r=Fe(e.show),s=Fe(null),i=Fe(null),a=Jr(xx);let o=null;Yr(sn(e,"show"),k=>{k&&(o=a.getMousePosition())},{immediate:!0});const{stopDrag:c,startDrag:l,draggableRef:u,draggableClassRef:f}=rR(sn(e,"draggable"),{onEnd:k=>{p(k)}}),m=ze(()=>Qp([e.titleClass,f.value])),h=ze(()=>Qp([e.headerClass,f.value]));Yr(sn(e,"show"),k=>{k&&(r.value=!0)}),nA(ze(()=>e.blockScroll&&r.value));function b(){if(a.transformOriginRef.value==="center")return"";const{value:k}=s,{value:R}=i;if(k===null||R===null)return"";if(n.value){const V=n.value.containerScrollTop;return`${k}px ${R+V}px`}return""}function p(k){if(a.transformOriginRef.value==="center"||!o||!n.value)return;const R=n.value.containerScrollTop,{offsetLeft:V,offsetTop:Q}=k,A=o.y,W=o.x;s.value=-(V-W),i.value=-(Q-A-R),k.style.transformOrigin=b()}function E(k){$i(()=>{p(k)})}function g(k){k.style.transformOrigin=b(),e.onBeforeLeave()}function y(k){const R=k;u.value&&l(R),e.onAfterEnter&&e.onAfterEnter(R)}function w(){r.value=!1,s.value=null,i.value=null,c(),e.onAfterLeave()}function x(){const{onClose:k}=e;k&&k()}function S(){e.onNegativeClick()}function C(){e.onPositiveClick()}const T=Fe(null);return Yr(T,k=>{k&&$i(()=>{const R=k.el;R&&t.value!==R&&(t.value=R)})}),Js(Z2,t),Js(Q2,null),Js(eA,null),{mergedTheme:a.mergedThemeRef,appear:a.appearRef,isMounted:a.isMountedRef,mergedClsPrefix:a.mergedClsPrefixRef,bodyRef:t,scrollbarRef:n,draggableClass:f,displayed:r,childNodeRef:T,cardHeaderClass:h,dialogTitleClass:m,handlePositiveClick:C,handleNegativeClick:S,handleCloseClick:x,handleAfterEnter:y,handleAfterLeave:w,handleBeforeLeave:g,handleEnter:E}},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=zA("default",e.default,{draggableClass:this.draggableClass}),!c){lx("modal","default slot is empty");return}c=gx(c),c.props=Qb({class:`${o}-modal`},t,c.props||{})}return this.displayDirective==="show"||this.displayed||this.show?Zl(N("div",{role:"none",class:`${o}-modal-body-wrapper`},N(Ox,{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),N(DA,{disabled:!this.trapFocus,active:this.show,onEsc:this.onEsc,autoFocus:this.autoFocus},{default:()=>{var u;return N(uf,{name:"fade-in-scale-up-transition",appear:(u=this.appear)!==null&&u!==void 0?u:this.isMounted,onEnter:n,onAfterEnter:r,onAfterLeave:s,onBeforeLeave:i},{default:()=>{const f=[[df,this.show]],{onClickoutside:m}=this;return m&&f.push([sA,this.onClickoutside,void 0,{capture:!0}]),Zl(this.preset==="confirm"||this.preset==="dialog"?N(eR,Object.assign({},this.$attrs,{class:[`${o}-modal`,this.$attrs.class],ref:"bodyRef",theme:this.mergedTheme.peers.Dialog,themeOverrides:this.mergedTheme.peerOverrides.Dialog},vm(this.$props,Qk),{titleClass:this.dialogTitleClass,"aria-modal":"true"}),e):this.preset==="card"?N(zx,Object.assign({},this.$attrs,{ref:"bodyRef",class:[`${o}-modal`,this.$attrs.class],theme:this.mergedTheme.peers.Card,themeOverrides:this.mergedTheme.peerOverrides.Card},vm(this.$props,xk),{headerClass:this.cardHeaderClass,"aria-modal":"true",role:"dialog"}),e):this.childNodeRef=c,f)}})}})]}})),[[df,this.displayDirective==="if"||this.displayed||this.show]]):null}}),aR=oe([j("modal-container",`
849
+ position: fixed;
850
+ left: 0;
851
+ top: 0;
852
+ height: 0;
853
+ width: 0;
854
+ display: flex;
855
+ `),j("modal-mask",`
856
+ position: fixed;
857
+ left: 0;
858
+ right: 0;
859
+ top: 0;
860
+ bottom: 0;
861
+ background-color: rgba(0, 0, 0, .4);
862
+ `,[Px({enterDuration:".25s",leaveDuration:".25s",enterCubicBezier:"var(--n-bezier-ease-out)",leaveCubicBezier:"var(--n-bezier-ease-out)"})]),j("modal-body-wrapper",`
863
+ position: fixed;
864
+ left: 0;
865
+ right: 0;
866
+ top: 0;
867
+ bottom: 0;
868
+ overflow: visible;
869
+ `,[j("modal-scroll-content",`
870
+ min-height: 100%;
871
+ display: flex;
872
+ position: relative;
873
+ `)]),j("modal",`
874
+ position: relative;
875
+ align-self: center;
876
+ color: var(--n-text-color);
877
+ margin: auto;
878
+ box-shadow: var(--n-box-shadow);
879
+ `,[X3({duration:".25s",enterScale:".5"}),oe(`.${Sm}`,`
880
+ cursor: move;
881
+ user-select: none;
882
+ `)])]),oR=Object.assign(Object.assign(Object.assign(Object.assign({},nn.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}}),dg),{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}),cR=bt({name:"Modal",inheritAttrs:!1,props:oR,slots:Object,setup(e){const t=Fe(null),{mergedClsPrefixRef:n,namespaceRef:r,inlineThemeDisabled:s}=hr(e),i=nn("Modal","-modal",aR,nR,e,n),a=K2(64),o=G2(),c=A2(),l=e.internalDialog?Jr(Kk,null):null,u=e.internalModal?Jr(J2,null):null,f=tA();function m(C){const{onUpdateShow:T,"onUpdate:show":k,onHide:R}=e;T&&Ct(T,C),k&&Ct(k,C),R&&!C&&R(C)}function h(){const{onClose:C}=e;C?Promise.resolve(C()).then(T=>{T!==!1&&m(!1)}):m(!1)}function b(){const{onPositiveClick:C}=e;C?Promise.resolve(C()).then(T=>{T!==!1&&m(!1)}):m(!1)}function p(){const{onNegativeClick:C}=e;C?Promise.resolve(C()).then(T=>{T!==!1&&m(!1)}):m(!1)}function E(){const{onBeforeLeave:C,onBeforeHide:T}=e;C&&Ct(C),T&&T()}function g(){const{onAfterLeave:C,onAfterHide:T}=e;C&&Ct(C),T&&T()}function y(C){var T;const{onMaskClick:k}=e;k&&k(C),e.maskClosable&&!((T=t.value)===null||T===void 0)&&T.contains(rg(C))&&m(!1)}function w(C){var T;(T=e.onEsc)===null||T===void 0||T.call(e),e.show&&e.closeOnEsc&&FA(C)&&(f.value||m(!1))}Js(xx,{getMousePosition:()=>{const C=l||u;if(C){const{clickedRef:T,clickedPositionRef:k}=C;if(T.value&&k.value)return k.value}return a.value?o.value:null},mergedClsPrefixRef:n,mergedThemeRef:i,isMountedRef:c,appearRef:sn(e,"internalAppear"),transformOriginRef:sn(e,"transformOrigin")});const x=ze(()=>{const{common:{cubicBezierEaseOut:C},self:{boxShadow:T,color:k,textColor:R}}=i.value;return{"--n-bezier-ease-out":C,"--n-box-shadow":T,"--n-color":k,"--n-text-color":R}}),S=s?fs("theme-class",void 0,x,e):void 0;return{mergedClsPrefix:n,namespace:r,isMounted:c,containerRef:t,presetProps:ze(()=>vm(e,sR)),handleEsc:w,handleAfterLeave:g,handleClickoutside:y,handleBeforeLeave:E,doUpdateShow:m,handleNegativeClick:p,handlePositiveClick:b,handleCloseClick:h,cssVars:s?void 0:x,themeClass:S==null?void 0:S.themeClass,onRender:S==null?void 0:S.onRender}},render(){const{mergedClsPrefix:e}=this;return N(lA,{to:this.to,show:this.show},{default:()=>{var t;(t=this.onRender)===null||t===void 0||t.call(this);const{unstableShowMask:n}=this;return Zl(N("div",{role:"none",ref:"containerRef",class:[`${e}-modal-container`,this.themeClass,this.namespace],style:this.cssVars},N(iR,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 N(uf,{name:"fade-in-transition",key:"mask",appear:(r=this.internalAppear)!==null&&r!==void 0?r:this.isMounted},{default:()=>this.show?N("div",{"aria-hidden":!0,ref:"containerRef",class:`${e}-modal-mask`,onClick:this.handleClickoutside}):null})}:void 0}),this.$slots)),[[oA,{zIndex:this.zIndex,enabled:this.show}]])}})}});function lR(){const e=Jr(k2,null);return e===null&&Qf("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 uR(e){const{textColor1:t,dividerColor:n,fontWeightStrong:r}=e;return{textColor:t,color:n,fontWeight:r}}const dR={common:ds,self:uR},fR=j("divider",`
883
+ position: relative;
884
+ display: flex;
885
+ width: 100%;
886
+ box-sizing: border-box;
887
+ font-size: 16px;
888
+ color: var(--n-text-color);
889
+ transition:
890
+ color .3s var(--n-bezier),
891
+ background-color .3s var(--n-bezier);
892
+ `,[Mr("vertical",`
893
+ margin-top: 24px;
894
+ margin-bottom: 24px;
895
+ `,[Mr("no-title",`
896
+ display: flex;
897
+ align-items: center;
898
+ `)]),ee("title",`
899
+ display: flex;
900
+ align-items: center;
901
+ margin-left: 12px;
902
+ margin-right: 12px;
903
+ white-space: nowrap;
904
+ font-weight: var(--n-font-weight);
905
+ `),ae("title-position-left",[ee("line",[ae("left",{width:"28px"})])]),ae("title-position-right",[ee("line",[ae("right",{width:"28px"})])]),ae("dashed",[ee("line",`
906
+ background-color: #0000;
907
+ height: 0px;
908
+ width: 100%;
909
+ border-style: dashed;
910
+ border-width: 1px 0 0;
911
+ `)]),ae("vertical",`
912
+ display: inline-block;
913
+ height: 1em;
914
+ margin: 0 8px;
915
+ vertical-align: middle;
916
+ width: 1px;
917
+ `),ee("line",`
918
+ border: none;
919
+ transition: background-color .3s var(--n-bezier), border-color .3s var(--n-bezier);
920
+ height: 1px;
921
+ width: 100%;
922
+ margin: 0;
923
+ `),Mr("dashed",[ee("line",{backgroundColor:"var(--n-color)"})]),ae("dashed",[ee("line",{borderColor:"var(--n-color)"})]),ae("vertical",{backgroundColor:"var(--n-color)"})]),hR=Object.assign(Object.assign({},nn.props),{titlePlacement:{type:String,default:"center"},dashed:Boolean,vertical:Boolean}),Or=bt({name:"Divider",props:hR,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:n}=hr(e),r=nn("Divider","-divider",fR,dR,e,t),s=ze(()=>{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?fs("divider",void 0,s,e):void 0;return{mergedClsPrefix:t,cssVars:n?void 0:s,themeClass:i==null?void 0:i.themeClass,onRender:i==null?void 0: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),N("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:N("div",{class:`${a}-divider__line ${a}-divider__line--left`}),!r&&t.default?N(na,null,N("div",{class:`${a}-divider__title`},this.$slots),N("div",{class:`${a}-divider__line ${a}-divider__line--right`})):null)}}),mR={gapSmall:"4px 8px",gapMedium:"8px 12px",gapLarge:"12px 16px"};function bR(){return mR}const gR={self:bR};let Fh;function pR(){if(!Hc)return!0;if(Fh===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),Fh=t}return Fh}const yR=Object.assign(Object.assign({},nn.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}}),ER=bt({name:"Space",props:yR,setup(e){const{mergedClsPrefixRef:t,mergedRtlRef:n}=hr(e),r=nn("Space","-space",void 0,gR,e,t),s=$s("Space",n,t);return{useGap:pR(),rtlEnabled:s,mergedClsPrefix:t,margin:ze(()=>{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:{[We("gap",i)]:a}}=r.value,{row:o,col:c}=F2(a);return{horizontal:Jl(c),vertical:Jl(o)}})}},render(){const{vertical:e,reverse:t,align:n,inline:r,justify:s,itemClass:i,itemStyle:a,margin:o,wrap:c,mergedClsPrefix:l,rtlEnabled:u,useGap:f,wrapItem:m,internalUseGap:h}=this,b=pi(og(this),!1);if(!b.length)return null;const p=`${o.horizontal}px`,E=`${o.horizontal/2}px`,g=`${o.vertical}px`,y=`${o.vertical/2}px`,w=b.length-1,x=s.startsWith("space-");return N("div",{role:"none",class:[`${l}-space`,u&&`${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?"":`-${y}`,marginBottom:f||e?"":`-${y}`,alignItems:n,gap:f?`${o.vertical}px ${o.horizontal}px`:""}},!m&&(f||h)?b:b.map((S,C)=>S.type===Kb?S:N("div",{role:"none",class:i,style:[a,{maxWidth:"100%"},f?"":e?{marginBottom:C!==w?g:""}:u?{marginLeft:x?s==="space-between"&&C===w?"":E:C!==w?p:"",marginRight:x?s==="space-between"&&C===0?"":E:"",paddingTop:y,paddingBottom:y}:{marginRight:x?s==="space-between"&&C===w?"":E:C!==w?p:"",marginLeft:x?s==="space-between"&&C===0?"":E:"",paddingTop:y,paddingBottom:y}]},S)))}});function CR(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 xR={common:ds,self:CR},vR={stepHeaderFontSizeSmall:"14px",stepHeaderFontSizeMedium:"16px",indicatorIndexFontSizeSmall:"14px",indicatorIndexFontSizeMedium:"16px",indicatorSizeSmall:"22px",indicatorSizeMedium:"28px",indicatorIconSizeSmall:"14px",indicatorIconSizeMedium:"18px"};function _R(e){const{fontWeightStrong:t,baseColor:n,textColorDisabled:r,primaryColor:s,errorColor:i,textColor1:a,textColor2:o}=e;return Object.assign(Object.assign({},vR),{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 TR={common:ds,self:_R},SR={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:u,dividerColor:f,fontWeight:m,textColor1:h,borderRadius:b,fontSize:p,fontWeightStrong:E}=e;return Object.assign(Object.assign({},SR),{colorSegment:l,tabFontSizeCard:p,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:b,tabColor:l,tabColorSegment:u,tabBorderColor:f,tabFontWeightActive:m,tabFontWeight:m,tabBorderRadius:b,paneTextColor:t,fontWeightStrong:E})}const AR={common:ds,self:wR},kR={success:N(ng,null),error:N(eg,null),warning:N(tg,null),info:N(ff,null)},RR=bt({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:u}=e,f=50,m=0,h=f,b=0,p=2*f,E=50+u/2,g=`M ${E},${E} m ${m},${h}
924
+ a ${f},${f} 0 1 1 ${b},-100
925
+ a ${f},${f} 0 1 1 0,${p}`,y=Math.PI*2*f,w={stroke:o==="rail"?a:typeof e.fillColor=="object"?"url(#gradient)":a,strokeDasharray:`${s/100*(y-c)}px ${l*8}px`,strokeDashoffset:`-${c/2}px`,transformOrigin:i?"center":void 0,transform:i?`rotate(${i}deg)`:void 0};return{pathString:g,pathStyle:w}}const r=()=>{const s=typeof e.fillColor=="object",i=s?e.fillColor.stops[0]:"",a=s?e.fillColor.stops[1]:"";return s&&N("defs",null,N("linearGradient",{id:"gradient",x1:"0%",y1:"100%",x2:"100%",y2:"0%"},N("stop",{offset:"0%","stop-color":i}),N("stop",{offset:"100%","stop-color":a})))};return()=>{const{fillColor:s,railColor:i,strokeWidth:a,offsetDegree:o,status:c,percentage:l,showIndicator:u,indicatorTextColor:f,unit:m,gapOffsetDegree:h,clsPrefix:b}=e,{pathString:p,pathStyle:E}=n(100,0,i,"rail"),{pathString:g,pathStyle:y}=n(l,o,s,"fill"),w=100+a;return N("div",{class:`${b}-progress-content`,role:"none"},N("div",{class:`${b}-progress-graph`,"aria-hidden":!0},N("div",{class:`${b}-progress-graph-circle`,style:{transform:h?`rotate(${h}deg)`:void 0}},N("svg",{viewBox:`0 0 ${w} ${w}`},r(),N("g",null,N("path",{class:`${b}-progress-graph-circle-rail`,d:p,"stroke-width":a,"stroke-linecap":"round",fill:"none",style:E})),N("g",null,N("path",{class:[`${b}-progress-graph-circle-fill`,l===0&&`${b}-progress-graph-circle-fill--empty`],d:g,"stroke-width":a,"stroke-linecap":"round",fill:"none",style:y}))))),u?N("div",null,t.default?N("div",{class:`${b}-progress-custom-content`,role:"none"},t.default()):c!=="default"?N("div",{class:`${b}-progress-icon`,"aria-hidden":!0},N(Us,{clsPrefix:b},{default:()=>kR[c]})):N("div",{class:`${b}-progress-text`,style:{color:f},role:"none"},N("span",{class:`${b}-progress-text__percentage`},l),N("span",{class:`${b}-progress-text__unit`},m))):null)}}}),IR={success:N(ng,null),error:N(eg,null),warning:N(tg,null),info:N(ff,null)},BR=bt({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=ze(()=>Bo(e.height)),r=ze(()=>{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=ze(()=>e.railBorderRadius!==void 0?Bo(e.railBorderRadius):e.height!==void 0?Bo(e.height,{c:.5}):""),i=ze(()=>e.fillBorderRadius!==void 0?Bo(e.fillBorderRadius):e.railBorderRadius!==void 0?Bo(e.railBorderRadius):e.height!==void 0?Bo(e.height,{c:.5}):"");return()=>{const{indicatorPlacement:a,railColor:o,railStyle:c,percentage:l,unit:u,indicatorTextColor:f,status:m,showIndicator:h,processing:b,clsPrefix:p}=e;return N("div",{class:`${p}-progress-content`,role:"none"},N("div",{class:`${p}-progress-graph`,"aria-hidden":!0},N("div",{class:[`${p}-progress-graph-line`,{[`${p}-progress-graph-line--indicator-${a}`]:!0}]},N("div",{class:`${p}-progress-graph-line-rail`,style:[{backgroundColor:o,height:n.value,borderRadius:s.value},c]},N("div",{class:[`${p}-progress-graph-line-fill`,b&&`${p}-progress-graph-line-fill--processing`],style:{maxWidth:`${e.percentage}%`,background:r.value,height:n.value,lineHeight:n.value,borderRadius:i.value}},a==="inside"?N("div",{class:`${p}-progress-graph-line-indicator`,style:{color:f}},t.default?t.default():`${l}${u}`):null)))),h&&a==="outside"?N("div",null,t.default?N("div",{class:`${p}-progress-custom-content`,style:{color:f},role:"none"},t.default()):m==="default"?N("div",{role:"none",class:`${p}-progress-icon ${p}-progress-icon--as-text`,style:{color:f}},l,u):N("div",{class:`${p}-progress-icon`,"aria-hidden":!0},N(Us,{clsPrefix:p},{default:()=>IR[m]}))):null)}}});function My(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 PR=bt({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=ze(()=>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"&&N("linearGradient",{id:`gradient-${i}`,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},N("stop",{offset:"0%","stop-color":o}),N("stop",{offset:"100%","stop-color":c}))};return()=>{const{viewBoxWidth:s,strokeWidth:i,circleGap:a,showIndicator:o,fillColor:c,railColor:l,railStyle:u,percentage:f,clsPrefix:m}=e;return N("div",{class:`${m}-progress-content`,role:"none"},N("div",{class:`${m}-progress-graph`,"aria-hidden":!0},N("div",{class:`${m}-progress-graph-circle`},N("svg",{viewBox:`0 0 ${s} ${s}`},N("defs",null,f.map((h,b)=>r(h,b))),f.map((h,b)=>N("g",{key:b},N("path",{class:`${m}-progress-graph-circle-rail`,d:My(s/2-i/2*(1+2*b)-a*b,i,s),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:[{strokeDashoffset:0,stroke:l[b]},u[b]]}),N("path",{class:[`${m}-progress-graph-circle-fill`,h===0&&`${m}-progress-graph-circle-fill--empty`],d:My(s/2-i/2*(1+2*b)-a*b,i,s),"stroke-width":i,"stroke-linecap":"round",fill:"none",style:{strokeDasharray:n.value[b],strokeDashoffset:0,stroke:typeof c[b]=="object"?`url(#gradient-${b})`:c[b]}})))))),o&&t.default?N("div",null,N("div",{class:`${m}-progress-text`},t.default())):null)}}}),NR=oe([j("progress",{display:"inline-block"},[j("progress-icon",`
926
+ color: var(--n-icon-color);
927
+ transition: color .3s var(--n-bezier);
928
+ `),ae("line",`
929
+ width: 100%;
930
+ display: block;
931
+ `,[j("progress-content",`
932
+ display: flex;
933
+ align-items: center;
934
+ `,[j("progress-graph",{flex:1})]),j("progress-custom-content",{marginLeft:"14px"}),j("progress-icon",`
935
+ width: 30px;
936
+ padding-left: 14px;
937
+ height: var(--n-icon-size-line);
938
+ line-height: var(--n-icon-size-line);
939
+ font-size: var(--n-icon-size-line);
940
+ `,[ae("as-text",`
941
+ color: var(--n-text-color-line-outer);
942
+ text-align: center;
943
+ width: 40px;
944
+ font-size: var(--n-font-size);
945
+ padding-left: 4px;
946
+ transition: color .3s var(--n-bezier);
947
+ `)])]),ae("circle, dashboard",{width:"120px"},[j("progress-custom-content",`
948
+ position: absolute;
949
+ left: 50%;
950
+ top: 50%;
951
+ transform: translateX(-50%) translateY(-50%);
952
+ display: flex;
953
+ align-items: center;
954
+ justify-content: center;
955
+ `),j("progress-text",`
956
+ position: absolute;
957
+ left: 50%;
958
+ top: 50%;
959
+ transform: translateX(-50%) translateY(-50%);
960
+ display: flex;
961
+ align-items: center;
962
+ color: inherit;
963
+ font-size: var(--n-font-size-circle);
964
+ color: var(--n-text-color-circle);
965
+ font-weight: var(--n-font-weight-circle);
966
+ transition: color .3s var(--n-bezier);
967
+ white-space: nowrap;
968
+ `),j("progress-icon",`
969
+ position: absolute;
970
+ left: 50%;
971
+ top: 50%;
972
+ transform: translateX(-50%) translateY(-50%);
973
+ display: flex;
974
+ align-items: center;
975
+ color: var(--n-icon-color);
976
+ font-size: var(--n-icon-size-circle);
977
+ `)]),ae("multiple-circle",`
978
+ width: 200px;
979
+ color: inherit;
980
+ `,[j("progress-text",`
981
+ font-weight: var(--n-font-weight-circle);
982
+ color: var(--n-text-color-circle);
983
+ position: absolute;
984
+ left: 50%;
985
+ top: 50%;
986
+ transform: translateX(-50%) translateY(-50%);
987
+ display: flex;
988
+ align-items: center;
989
+ justify-content: center;
990
+ transition: color .3s var(--n-bezier);
991
+ `)]),j("progress-content",{position:"relative"}),j("progress-graph",{position:"relative"},[j("progress-graph-circle",[oe("svg",{verticalAlign:"bottom"}),j("progress-graph-circle-fill",`
992
+ stroke: var(--n-fill-color);
993
+ transition:
994
+ opacity .3s var(--n-bezier),
995
+ stroke .3s var(--n-bezier),
996
+ stroke-dasharray .3s var(--n-bezier);
997
+ `,[ae("empty",{opacity:0})]),j("progress-graph-circle-rail",`
998
+ transition: stroke .3s var(--n-bezier);
999
+ overflow: hidden;
1000
+ stroke: var(--n-rail-color);
1001
+ `)]),j("progress-graph-line",[ae("indicator-inside",[j("progress-graph-line-rail",`
1002
+ height: 16px;
1003
+ line-height: 16px;
1004
+ border-radius: 10px;
1005
+ `,[j("progress-graph-line-fill",`
1006
+ height: inherit;
1007
+ border-radius: 10px;
1008
+ `),j("progress-graph-line-indicator",`
1009
+ background: #0000;
1010
+ white-space: nowrap;
1011
+ text-align: right;
1012
+ margin-left: 14px;
1013
+ margin-right: 14px;
1014
+ height: inherit;
1015
+ font-size: 12px;
1016
+ color: var(--n-text-color-line-inner);
1017
+ transition: color .3s var(--n-bezier);
1018
+ `)])]),ae("indicator-inside-label",`
1019
+ height: 16px;
1020
+ display: flex;
1021
+ align-items: center;
1022
+ `,[j("progress-graph-line-rail",`
1023
+ flex: 1;
1024
+ transition: background-color .3s var(--n-bezier);
1025
+ `),j("progress-graph-line-indicator",`
1026
+ background: var(--n-fill-color);
1027
+ font-size: 12px;
1028
+ transform: translateZ(0);
1029
+ display: flex;
1030
+ vertical-align: middle;
1031
+ height: 16px;
1032
+ line-height: 16px;
1033
+ padding: 0 10px;
1034
+ border-radius: 10px;
1035
+ position: absolute;
1036
+ white-space: nowrap;
1037
+ color: var(--n-text-color-line-inner);
1038
+ transition:
1039
+ right .2s var(--n-bezier),
1040
+ color .3s var(--n-bezier),
1041
+ background-color .3s var(--n-bezier);
1042
+ `)]),j("progress-graph-line-rail",`
1043
+ position: relative;
1044
+ overflow: hidden;
1045
+ height: var(--n-rail-height);
1046
+ border-radius: 5px;
1047
+ background-color: var(--n-rail-color);
1048
+ transition: background-color .3s var(--n-bezier);
1049
+ `,[j("progress-graph-line-fill",`
1050
+ background: var(--n-fill-color);
1051
+ position: relative;
1052
+ border-radius: 5px;
1053
+ height: inherit;
1054
+ width: 100%;
1055
+ max-width: 0%;
1056
+ transition:
1057
+ background-color .3s var(--n-bezier),
1058
+ max-width .2s var(--n-bezier);
1059
+ `,[ae("processing",[oe("&::after",`
1060
+ content: "";
1061
+ background-image: var(--n-line-bg-processing);
1062
+ animation: progress-processing-animation 2s var(--n-bezier) infinite;
1063
+ `)])])])])])]),oe("@keyframes progress-processing-animation",`
1064
+ 0% {
1065
+ position: absolute;
1066
+ left: 0;
1067
+ top: 0;
1068
+ bottom: 0;
1069
+ right: 100%;
1070
+ opacity: 1;
1071
+ }
1072
+ 66% {
1073
+ position: absolute;
1074
+ left: 0;
1075
+ top: 0;
1076
+ bottom: 0;
1077
+ right: 0;
1078
+ opacity: 0;
1079
+ }
1080
+ 100% {
1081
+ position: absolute;
1082
+ left: 0;
1083
+ top: 0;
1084
+ bottom: 0;
1085
+ right: 0;
1086
+ opacity: 0;
1087
+ }
1088
+ `)]),OR=Object.assign(Object.assign({},nn.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}),DR=bt({name:"Progress",props:OR,setup(e){const t=ze(()=>e.indicatorPlacement||e.indicatorPosition),n=ze(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),{mergedClsPrefixRef:r,inlineThemeDisabled:s}=hr(e),i=nn("Progress","-progress",NR,xR,e,r),a=ze(()=>{const{status:c}=e,{common:{cubicBezierEaseInOut:l},self:{fontSize:u,fontSizeCircle:f,railColor:m,railHeight:h,iconSizeCircle:b,iconSizeLine:p,textColorCircle:E,textColorLineInner:g,textColorLineOuter:y,lineBgProcessing:w,fontWeightCircle:x,[We("iconColor",c)]:S,[We("fillColor",c)]:C}}=i.value;return{"--n-bezier":l,"--n-fill-color":C,"--n-font-size":u,"--n-font-size-circle":f,"--n-font-weight-circle":x,"--n-icon-color":S,"--n-icon-size-circle":b,"--n-icon-size-line":p,"--n-line-bg-processing":w,"--n-rail-color":m,"--n-rail-height":h,"--n-text-color-circle":E,"--n-text-color-line-inner":g,"--n-text-color-line-outer":y}}),o=s?fs("progress",ze(()=>e.status[0]),a,e):void 0;return{mergedClsPrefix:r,mergedIndicatorPlacement:t,gapDeg:n,cssVars:s?void 0:a,themeClass:o==null?void 0:o.themeClass,onRender:o==null?void 0: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:u,mergedIndicatorPlacement:f,unit:m,borderRadius:h,fillBorderRadius:b,height:p,processing:E,circleGap:g,mergedClsPrefix:y,gapDeg:w,gapOffsetDegree:x,themeClass:S,$slots:C,onRender:T}=this;return T==null||T(),N("div",{class:[S,`${y}-progress`,`${y}-progress--${e}`,`${y}-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"?N(RR,{clsPrefix:y,status:s,showIndicator:r,indicatorTextColor:n,railColor:i,fillColor:o,railStyle:a,offsetDegree:this.offsetDegree,percentage:c,viewBoxWidth:l,strokeWidth:u,gapDegree:w===void 0?e==="dashboard"?75:0:w,gapOffsetDegree:x,unit:m},C):e==="line"?N(BR,{clsPrefix:y,status:s,showIndicator:r,indicatorTextColor:n,railColor:i,fillColor:o,railStyle:a,percentage:c,processing:E,indicatorPlacement:f,unit:m,fillBorderRadius:b,railBorderRadius:h,height:p},C):e==="multiple-circle"?N(PR,{clsPrefix:y,strokeWidth:u,railColor:i,fillColor:o,railStyle:a,viewBoxWidth:l,percentage:c,showIndicator:r,circleGap:g},C):null)}}),LR=j("steps",`
1089
+ width: 100%;
1090
+ display: flex;
1091
+ `,[j("step",`
1092
+ position: relative;
1093
+ display: flex;
1094
+ flex: 1;
1095
+ `,[ae("disabled","cursor: not-allowed"),ae("clickable",`
1096
+ cursor: pointer;
1097
+ `),oe("&:last-child",[j("step-splitor","display: none;")])]),j("step-splitor",`
1098
+ background-color: var(--n-splitor-color);
1099
+ margin-top: calc(var(--n-step-header-font-size) / 2);
1100
+ height: 1px;
1101
+ flex: 1;
1102
+ align-self: flex-start;
1103
+ margin-left: 12px;
1104
+ margin-right: 12px;
1105
+ transition:
1106
+ color .3s var(--n-bezier),
1107
+ background-color .3s var(--n-bezier);
1108
+ `),j("step-content","flex: 1;",[j("step-content-header",`
1109
+ color: var(--n-header-text-color);
1110
+ margin-top: calc(var(--n-indicator-size) / 2 - var(--n-step-header-font-size) / 2);
1111
+ line-height: var(--n-step-header-font-size);
1112
+ font-size: var(--n-step-header-font-size);
1113
+ position: relative;
1114
+ display: flex;
1115
+ font-weight: var(--n-step-header-font-weight);
1116
+ margin-left: 9px;
1117
+ transition:
1118
+ color .3s var(--n-bezier),
1119
+ background-color .3s var(--n-bezier);
1120
+ `,[ee("title",`
1121
+ white-space: nowrap;
1122
+ flex: 0;
1123
+ `)]),ee("description",`
1124
+ color: var(--n-description-text-color);
1125
+ margin-top: 12px;
1126
+ margin-left: 9px;
1127
+ transition:
1128
+ color .3s var(--n-bezier),
1129
+ background-color .3s var(--n-bezier);
1130
+ `)]),j("step-indicator",`
1131
+ background-color: var(--n-indicator-color);
1132
+ box-shadow: 0 0 0 1px var(--n-indicator-border-color);
1133
+ height: var(--n-indicator-size);
1134
+ width: var(--n-indicator-size);
1135
+ border-radius: 50%;
1136
+ display: flex;
1137
+ align-items: center;
1138
+ justify-content: center;
1139
+ transition:
1140
+ background-color .3s var(--n-bezier),
1141
+ box-shadow .3s var(--n-bezier);
1142
+ `,[j("step-indicator-slot",`
1143
+ position: relative;
1144
+ width: var(--n-indicator-icon-size);
1145
+ height: var(--n-indicator-icon-size);
1146
+ font-size: var(--n-indicator-icon-size);
1147
+ line-height: var(--n-indicator-icon-size);
1148
+ `,[ee("index",`
1149
+ display: inline-block;
1150
+ text-align: center;
1151
+ position: absolute;
1152
+ left: 0;
1153
+ top: 0;
1154
+ white-space: nowrap;
1155
+ font-size: var(--n-indicator-index-font-size);
1156
+ width: var(--n-indicator-icon-size);
1157
+ height: var(--n-indicator-icon-size);
1158
+ line-height: var(--n-indicator-icon-size);
1159
+ color: var(--n-indicator-text-color);
1160
+ transition: color .3s var(--n-bezier);
1161
+ `,[jo()]),j("icon",`
1162
+ color: var(--n-indicator-text-color);
1163
+ transition: color .3s var(--n-bezier);
1164
+ `,[jo()]),j("base-icon",`
1165
+ color: var(--n-indicator-text-color);
1166
+ transition: color .3s var(--n-bezier);
1167
+ `,[jo()])])]),ae("vertical","flex-direction: column;",[Mr("show-description",[oe(">",[j("step","padding-bottom: 8px;")])]),oe(">",[j("step","margin-bottom: 16px;",[oe("&:last-child","margin-bottom: 0;"),oe(">",[j("step-indicator",[oe(">",[j("step-splitor",`
1168
+ position: absolute;
1169
+ bottom: -8px;
1170
+ width: 1px;
1171
+ margin: 0 !important;
1172
+ left: calc(var(--n-indicator-size) / 2);
1173
+ height: calc(100% - var(--n-indicator-size));
1174
+ `)])]),j("step-content",[ee("description","margin-top: 8px;")])])])])])]);function MR(e,t){return typeof e!="object"||e===null||Array.isArray(e)?null:(e.props||(e.props={}),e.props.internalIndex=t+1,e)}function FR(e){return e.map((t,n)=>MR(t,n))}const zR=Object.assign(Object.assign({},nn.props),{current:Number,status:{type:String,default:"process"},size:{type:String,default:"medium"},vertical:Boolean,"onUpdate:current":[Function,Array],onUpdateCurrent:[Function,Array]}),qx=es("n-steps"),UR=bt({name:"Steps",props:zR,slots:Object,setup(e,{slots:t}){const{mergedClsPrefixRef:n,mergedRtlRef:r}=hr(e),s=$s("Steps",r,n),i=nn("Steps","-steps",LR,TR,e,n);return Js(qx,{props:e,mergedThemeRef:i,mergedClsPrefixRef:n,stepsSlots:t}),{mergedClsPrefix:n,rtlEnabled:s}},render(){const{mergedClsPrefix:e}=this;return N("div",{class:[`${e}-steps`,this.rtlEnabled&&`${e}-steps--rtl`,this.vertical&&`${e}-steps--vertical`]},FR(pi(og(this))))}}),$R={status:String,title:String,description:String,disabled:Boolean,internalIndex:{type:Number,default:0}},Zf=bt({name:"Step",props:$R,slots:Object,setup(e){const t=Jr(qx,null);t||Qf("step","`n-step` must be placed inside `n-steps`.");const{inlineThemeDisabled:n}=hr(),{props:r,mergedThemeRef:s,mergedClsPrefixRef:i,stepsSlots:a}=t,o=ze(()=>r.vertical),c=ze(()=>{const{status:m}=e;if(m)return m;{const{internalIndex:h}=e,{current:b}=r;if(b===void 0)return"process";if(h<b)return"finish";if(h===b)return r.status||"process";if(h>b)return"wait"}return"process"}),l=ze(()=>{const{value:m}=c,{size:h}=r,{common:{cubicBezierEaseInOut:b},self:{stepHeaderFontWeight:p,[We("stepHeaderFontSize",h)]:E,[We("indicatorIndexFontSize",h)]:g,[We("indicatorSize",h)]:y,[We("indicatorIconSize",h)]:w,[We("indicatorTextColor",m)]:x,[We("indicatorBorderColor",m)]:S,[We("headerTextColor",m)]:C,[We("splitorColor",m)]:T,[We("indicatorColor",m)]:k,[We("descriptionTextColor",m)]:R}}=s.value;return{"--n-bezier":b,"--n-description-text-color":R,"--n-header-text-color":C,"--n-indicator-border-color":S,"--n-indicator-color":k,"--n-indicator-icon-size":w,"--n-indicator-index-font-size":g,"--n-indicator-size":y,"--n-indicator-text-color":x,"--n-splitor-color":T,"--n-step-header-font-size":E,"--n-step-header-font-weight":p}}),u=n?fs("step",ze(()=>{const{value:m}=c,{size:h}=r;return`${m[0]}${h[0]}`}),l,r):void 0,f=ze(()=>{if(e.disabled)return;const{onUpdateCurrent:m,"onUpdate:current":h}=r;return m||h?()=>{m&&Ct(m,e.internalIndex),h&&Ct(h,e.internalIndex)}:void 0});return{stepsSlots:a,mergedClsPrefix:i,vertical:o,mergedStatus:c,handleStepClick:f,cssVars:n?void 0:l,themeClass:u==null?void 0:u.themeClass,onRender:u==null?void 0:u.onRender}},render(){const{mergedClsPrefix:e,onRender:t,handleStepClick:n,disabled:r}=this,s=Ln(this.$slots.default,i=>{const a=i||this.description;return a?N("div",{class:`${e}-step-content__description`},a):null});return t==null||t(),N("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},N("div",{class:`${e}-step-indicator`},N("div",{class:`${e}-step-indicator-slot`},N(Yf,null,{default:()=>Ln(this.$slots.icon,i=>{const{mergedStatus:a,stepsSlots:o}=this;return a==="finish"||a==="error"?a==="finish"?N(Us,{clsPrefix:e,key:"finish"},{default:()=>ei(o["finish-icon"],()=>[N(F3,null)])}):a==="error"?N(Us,{clsPrefix:e,key:"error"},{default:()=>ei(o["error-icon"],()=>[N(R2,null)])}):null:i||N("div",{key:this.internalIndex,class:`${e}-step-indicator-slot__index`},this.internalIndex)})})),this.vertical?N("div",{class:`${e}-step-splitor`}):null),N("div",{class:`${e}-step-content`},N("div",{class:`${e}-step-content-header`},N("div",{class:`${e}-step-content-header__title`},ei(this.$slots.title,()=>[this.title])),this.vertical?null:N("div",{class:`${e}-step-splitor`})),s))}}),fg=es("n-tabs"),jx={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]},HR=bt({__TAB_PANE__:!0,name:"TabPane",alias:["TabPanel"],props:jx,slots:Object,setup(e){const t=Jr(fg,null);return t||Qf("tab-pane","`n-tab-pane` must be placed inside `n-tabs`."),{style:t.paneStyleRef,class:t.paneClassRef,mergedClsPrefix:t.mergedClsPrefixRef}},render(){return N("div",{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),qR=Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},I2(jx,["displayDirective"])),wm=bt({__TAB__:!0,inheritAttrs:!1,name:"Tab",props:qR,setup(e){const{mergedClsPrefixRef:t,valueRef:n,typeRef:r,closableRef:s,tabStyleRef:i,addTabStyleRef:a,tabClassRef:o,addTabClassRef:c,tabChangeIdRef:l,onBeforeLeaveRef:u,triggerRef:f,handleAdd:m,activateTab:h,handleClose:b}=Jr(fg);return{trigger:f,mergedClosable:ze(()=>{if(e.internalAddable)return!1;const{closable:p}=e;return p===void 0?s.value:p}),style:i,addStyle:a,tabClass:o,addTabClass:c,clsPrefix:t,value:n,type:r,handleClose(p){p.stopPropagation(),!e.disabled&&b(e.name)},activateTab(){if(e.disabled)return;if(e.internalAddable){m();return}const{name:p}=e,E=++l.id;if(p!==n.value){const{value:g}=u;g?Promise.resolve(g(e.name,n.value)).then(y=>{y&&l.id===E&&h(p)}):h(p)}}}},render(){const{internalAddable:e,clsPrefix:t,name:n,disabled:r,label:s,tab:i,value:a,mergedClosable:o,trigger:c,$slots:{default:l}}=this,u=s??i;return N("div",{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?N("div",{class:`${t}-tabs-tab-pad`}):null,N("div",Object.assign({key:n,"data-name":n,"data-disabled":r?!0:void 0},Qb({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)),N("span",{class:`${t}-tabs-tab__label`},e?N(na,null,N("div",{class:`${t}-tabs-tab__height-placeholder`}," "),N(Us,{clsPrefix:t},{default:()=>N(M3,null)})):l?l():typeof u=="object"?u:ha(u??n)),o&&this.type==="card"?N(Jb,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:r}):null))}}),jR=j("tabs",`
1175
+ box-sizing: border-box;
1176
+ width: 100%;
1177
+ display: flex;
1178
+ flex-direction: column;
1179
+ transition:
1180
+ background-color .3s var(--n-bezier),
1181
+ border-color .3s var(--n-bezier);
1182
+ `,[ae("segment-type",[j("tabs-rail",[oe("&.transition-disabled",[j("tabs-capsule",`
1183
+ transition: none;
1184
+ `)])])]),ae("top",[j("tab-pane",`
1185
+ padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
1186
+ `)]),ae("left",[j("tab-pane",`
1187
+ padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);
1188
+ `)]),ae("left, right",`
1189
+ flex-direction: row;
1190
+ `,[j("tabs-bar",`
1191
+ width: 2px;
1192
+ right: 0;
1193
+ transition:
1194
+ top .2s var(--n-bezier),
1195
+ max-height .2s var(--n-bezier),
1196
+ background-color .3s var(--n-bezier);
1197
+ `),j("tabs-tab",`
1198
+ padding: var(--n-tab-padding-vertical);
1199
+ `)]),ae("right",`
1200
+ flex-direction: row-reverse;
1201
+ `,[j("tab-pane",`
1202
+ padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);
1203
+ `),j("tabs-bar",`
1204
+ left: 0;
1205
+ `)]),ae("bottom",`
1206
+ flex-direction: column-reverse;
1207
+ justify-content: flex-end;
1208
+ `,[j("tab-pane",`
1209
+ padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);
1210
+ `),j("tabs-bar",`
1211
+ top: 0;
1212
+ `)]),j("tabs-rail",`
1213
+ position: relative;
1214
+ padding: 3px;
1215
+ border-radius: var(--n-tab-border-radius);
1216
+ width: 100%;
1217
+ background-color: var(--n-color-segment);
1218
+ transition: background-color .3s var(--n-bezier);
1219
+ display: flex;
1220
+ align-items: center;
1221
+ `,[j("tabs-capsule",`
1222
+ border-radius: var(--n-tab-border-radius);
1223
+ position: absolute;
1224
+ pointer-events: none;
1225
+ background-color: var(--n-tab-color-segment);
1226
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
1227
+ transition: transform 0.3s var(--n-bezier);
1228
+ `),j("tabs-tab-wrapper",`
1229
+ flex-basis: 0;
1230
+ flex-grow: 1;
1231
+ display: flex;
1232
+ align-items: center;
1233
+ justify-content: center;
1234
+ `,[j("tabs-tab",`
1235
+ overflow: hidden;
1236
+ border-radius: var(--n-tab-border-radius);
1237
+ width: 100%;
1238
+ display: flex;
1239
+ align-items: center;
1240
+ justify-content: center;
1241
+ `,[ae("active",`
1242
+ font-weight: var(--n-font-weight-strong);
1243
+ color: var(--n-tab-text-color-active);
1244
+ `),oe("&:hover",`
1245
+ color: var(--n-tab-text-color-hover);
1246
+ `)])])]),ae("flex",[j("tabs-nav",`
1247
+ width: 100%;
1248
+ position: relative;
1249
+ `,[j("tabs-wrapper",`
1250
+ width: 100%;
1251
+ `,[j("tabs-tab",`
1252
+ margin-right: 0;
1253
+ `)])])]),j("tabs-nav",`
1254
+ box-sizing: border-box;
1255
+ line-height: 1.5;
1256
+ display: flex;
1257
+ transition: border-color .3s var(--n-bezier);
1258
+ `,[ee("prefix, suffix",`
1259
+ display: flex;
1260
+ align-items: center;
1261
+ `),ee("prefix","padding-right: 16px;"),ee("suffix","padding-left: 16px;")]),ae("top, bottom",[j("tabs-nav-scroll-wrapper",[oe("&::before",`
1262
+ top: 0;
1263
+ bottom: 0;
1264
+ left: 0;
1265
+ width: 20px;
1266
+ `),oe("&::after",`
1267
+ top: 0;
1268
+ bottom: 0;
1269
+ right: 0;
1270
+ width: 20px;
1271
+ `),ae("shadow-start",[oe("&::before",`
1272
+ box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
1273
+ `)]),ae("shadow-end",[oe("&::after",`
1274
+ box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
1275
+ `)])])]),ae("left, right",[j("tabs-nav-scroll-content",`
1276
+ flex-direction: column;
1277
+ `),j("tabs-nav-scroll-wrapper",[oe("&::before",`
1278
+ top: 0;
1279
+ left: 0;
1280
+ right: 0;
1281
+ height: 20px;
1282
+ `),oe("&::after",`
1283
+ bottom: 0;
1284
+ left: 0;
1285
+ right: 0;
1286
+ height: 20px;
1287
+ `),ae("shadow-start",[oe("&::before",`
1288
+ box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
1289
+ `)]),ae("shadow-end",[oe("&::after",`
1290
+ box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
1291
+ `)])])]),j("tabs-nav-scroll-wrapper",`
1292
+ flex: 1;
1293
+ position: relative;
1294
+ overflow: hidden;
1295
+ `,[j("tabs-nav-y-scroll",`
1296
+ height: 100%;
1297
+ width: 100%;
1298
+ overflow-y: auto;
1299
+ scrollbar-width: none;
1300
+ `,[oe("&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb",`
1301
+ width: 0;
1302
+ height: 0;
1303
+ display: none;
1304
+ `)]),oe("&::before, &::after",`
1305
+ transition: box-shadow .3s var(--n-bezier);
1306
+ pointer-events: none;
1307
+ content: "";
1308
+ position: absolute;
1309
+ z-index: 1;
1310
+ `)]),j("tabs-nav-scroll-content",`
1311
+ display: flex;
1312
+ position: relative;
1313
+ min-width: 100%;
1314
+ min-height: 100%;
1315
+ width: fit-content;
1316
+ box-sizing: border-box;
1317
+ `),j("tabs-wrapper",`
1318
+ display: inline-flex;
1319
+ flex-wrap: nowrap;
1320
+ position: relative;
1321
+ `),j("tabs-tab-wrapper",`
1322
+ display: flex;
1323
+ flex-wrap: nowrap;
1324
+ flex-shrink: 0;
1325
+ flex-grow: 0;
1326
+ `),j("tabs-tab",`
1327
+ cursor: pointer;
1328
+ white-space: nowrap;
1329
+ flex-wrap: nowrap;
1330
+ display: inline-flex;
1331
+ align-items: center;
1332
+ color: var(--n-tab-text-color);
1333
+ font-size: var(--n-tab-font-size);
1334
+ background-clip: padding-box;
1335
+ padding: var(--n-tab-padding);
1336
+ transition:
1337
+ box-shadow .3s var(--n-bezier),
1338
+ color .3s var(--n-bezier),
1339
+ background-color .3s var(--n-bezier),
1340
+ border-color .3s var(--n-bezier);
1341
+ `,[ae("disabled",{cursor:"not-allowed"}),ee("close",`
1342
+ margin-left: 6px;
1343
+ transition:
1344
+ background-color .3s var(--n-bezier),
1345
+ color .3s var(--n-bezier);
1346
+ `),ee("label",`
1347
+ display: flex;
1348
+ align-items: center;
1349
+ z-index: 1;
1350
+ `)]),j("tabs-bar",`
1351
+ position: absolute;
1352
+ bottom: 0;
1353
+ height: 2px;
1354
+ border-radius: 1px;
1355
+ background-color: var(--n-bar-color);
1356
+ transition:
1357
+ left .2s var(--n-bezier),
1358
+ max-width .2s var(--n-bezier),
1359
+ opacity .3s var(--n-bezier),
1360
+ background-color .3s var(--n-bezier);
1361
+ `,[oe("&.transition-disabled",`
1362
+ transition: none;
1363
+ `),ae("disabled",`
1364
+ background-color: var(--n-tab-text-color-disabled)
1365
+ `)]),j("tabs-pane-wrapper",`
1366
+ position: relative;
1367
+ overflow: hidden;
1368
+ transition: max-height .2s var(--n-bezier);
1369
+ `),j("tab-pane",`
1370
+ color: var(--n-pane-text-color);
1371
+ width: 100%;
1372
+ transition:
1373
+ color .3s var(--n-bezier),
1374
+ background-color .3s var(--n-bezier),
1375
+ opacity .2s var(--n-bezier);
1376
+ left: 0;
1377
+ right: 0;
1378
+ top: 0;
1379
+ `,[oe("&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active",`
1380
+ transition:
1381
+ color .3s var(--n-bezier),
1382
+ background-color .3s var(--n-bezier),
1383
+ transform .2s var(--n-bezier),
1384
+ opacity .2s var(--n-bezier);
1385
+ `),oe("&.next-transition-leave-active, &.prev-transition-leave-active",`
1386
+ position: absolute;
1387
+ `),oe("&.next-transition-enter-from, &.prev-transition-leave-to",`
1388
+ transform: translateX(32px);
1389
+ opacity: 0;
1390
+ `),oe("&.next-transition-leave-to, &.prev-transition-enter-from",`
1391
+ transform: translateX(-32px);
1392
+ opacity: 0;
1393
+ `),oe("&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to",`
1394
+ transform: translateX(0);
1395
+ opacity: 1;
1396
+ `)]),j("tabs-tab-pad",`
1397
+ box-sizing: border-box;
1398
+ width: var(--n-tab-gap);
1399
+ flex-grow: 0;
1400
+ flex-shrink: 0;
1401
+ `),ae("line-type, bar-type",[j("tabs-tab",`
1402
+ font-weight: var(--n-tab-font-weight);
1403
+ box-sizing: border-box;
1404
+ vertical-align: bottom;
1405
+ `,[oe("&:hover",{color:"var(--n-tab-text-color-hover)"}),ae("active",`
1406
+ color: var(--n-tab-text-color-active);
1407
+ font-weight: var(--n-tab-font-weight-active);
1408
+ `),ae("disabled",{color:"var(--n-tab-text-color-disabled)"})])]),j("tabs-nav",[ae("line-type",[ae("top",[ee("prefix, suffix",`
1409
+ border-bottom: 1px solid var(--n-tab-border-color);
1410
+ `),j("tabs-nav-scroll-content",`
1411
+ border-bottom: 1px solid var(--n-tab-border-color);
1412
+ `),j("tabs-bar",`
1413
+ bottom: -1px;
1414
+ `)]),ae("left",[ee("prefix, suffix",`
1415
+ border-right: 1px solid var(--n-tab-border-color);
1416
+ `),j("tabs-nav-scroll-content",`
1417
+ border-right: 1px solid var(--n-tab-border-color);
1418
+ `),j("tabs-bar",`
1419
+ right: -1px;
1420
+ `)]),ae("right",[ee("prefix, suffix",`
1421
+ border-left: 1px solid var(--n-tab-border-color);
1422
+ `),j("tabs-nav-scroll-content",`
1423
+ border-left: 1px solid var(--n-tab-border-color);
1424
+ `),j("tabs-bar",`
1425
+ left: -1px;
1426
+ `)]),ae("bottom",[ee("prefix, suffix",`
1427
+ border-top: 1px solid var(--n-tab-border-color);
1428
+ `),j("tabs-nav-scroll-content",`
1429
+ border-top: 1px solid var(--n-tab-border-color);
1430
+ `),j("tabs-bar",`
1431
+ top: -1px;
1432
+ `)]),ee("prefix, suffix",`
1433
+ transition: border-color .3s var(--n-bezier);
1434
+ `),j("tabs-nav-scroll-content",`
1435
+ transition: border-color .3s var(--n-bezier);
1436
+ `),j("tabs-bar",`
1437
+ border-radius: 0;
1438
+ `)]),ae("card-type",[ee("prefix, suffix",`
1439
+ transition: border-color .3s var(--n-bezier);
1440
+ `),j("tabs-pad",`
1441
+ flex-grow: 1;
1442
+ transition: border-color .3s var(--n-bezier);
1443
+ `),j("tabs-tab-pad",`
1444
+ transition: border-color .3s var(--n-bezier);
1445
+ `),j("tabs-tab",`
1446
+ font-weight: var(--n-tab-font-weight);
1447
+ border: 1px solid var(--n-tab-border-color);
1448
+ background-color: var(--n-tab-color);
1449
+ box-sizing: border-box;
1450
+ position: relative;
1451
+ vertical-align: bottom;
1452
+ display: flex;
1453
+ justify-content: space-between;
1454
+ font-size: var(--n-tab-font-size);
1455
+ color: var(--n-tab-text-color);
1456
+ `,[ae("addable",`
1457
+ padding-left: 8px;
1458
+ padding-right: 8px;
1459
+ font-size: 16px;
1460
+ justify-content: center;
1461
+ `,[ee("height-placeholder",`
1462
+ width: 0;
1463
+ font-size: var(--n-tab-font-size);
1464
+ `),Mr("disabled",[oe("&:hover",`
1465
+ color: var(--n-tab-text-color-hover);
1466
+ `)])]),ae("closable","padding-right: 8px;"),ae("active",`
1467
+ background-color: #0000;
1468
+ font-weight: var(--n-tab-font-weight-active);
1469
+ color: var(--n-tab-text-color-active);
1470
+ `),ae("disabled","color: var(--n-tab-text-color-disabled);")])]),ae("left, right",`
1471
+ flex-direction: column;
1472
+ `,[ee("prefix, suffix",`
1473
+ padding: var(--n-tab-padding-vertical);
1474
+ `),j("tabs-wrapper",`
1475
+ flex-direction: column;
1476
+ `),j("tabs-tab-wrapper",`
1477
+ flex-direction: column;
1478
+ `,[j("tabs-tab-pad",`
1479
+ height: var(--n-tab-gap-vertical);
1480
+ width: 100%;
1481
+ `)])]),ae("top",[ae("card-type",[j("tabs-scroll-padding","border-bottom: 1px solid var(--n-tab-border-color);"),ee("prefix, suffix",`
1482
+ border-bottom: 1px solid var(--n-tab-border-color);
1483
+ `),j("tabs-tab",`
1484
+ border-top-left-radius: var(--n-tab-border-radius);
1485
+ border-top-right-radius: var(--n-tab-border-radius);
1486
+ `,[ae("active",`
1487
+ border-bottom: 1px solid #0000;
1488
+ `)]),j("tabs-tab-pad",`
1489
+ border-bottom: 1px solid var(--n-tab-border-color);
1490
+ `),j("tabs-pad",`
1491
+ border-bottom: 1px solid var(--n-tab-border-color);
1492
+ `)])]),ae("left",[ae("card-type",[j("tabs-scroll-padding","border-right: 1px solid var(--n-tab-border-color);"),ee("prefix, suffix",`
1493
+ border-right: 1px solid var(--n-tab-border-color);
1494
+ `),j("tabs-tab",`
1495
+ border-top-left-radius: var(--n-tab-border-radius);
1496
+ border-bottom-left-radius: var(--n-tab-border-radius);
1497
+ `,[ae("active",`
1498
+ border-right: 1px solid #0000;
1499
+ `)]),j("tabs-tab-pad",`
1500
+ border-right: 1px solid var(--n-tab-border-color);
1501
+ `),j("tabs-pad",`
1502
+ border-right: 1px solid var(--n-tab-border-color);
1503
+ `)])]),ae("right",[ae("card-type",[j("tabs-scroll-padding","border-left: 1px solid var(--n-tab-border-color);"),ee("prefix, suffix",`
1504
+ border-left: 1px solid var(--n-tab-border-color);
1505
+ `),j("tabs-tab",`
1506
+ border-top-right-radius: var(--n-tab-border-radius);
1507
+ border-bottom-right-radius: var(--n-tab-border-radius);
1508
+ `,[ae("active",`
1509
+ border-left: 1px solid #0000;
1510
+ `)]),j("tabs-tab-pad",`
1511
+ border-left: 1px solid var(--n-tab-border-color);
1512
+ `),j("tabs-pad",`
1513
+ border-left: 1px solid var(--n-tab-border-color);
1514
+ `)])]),ae("bottom",[ae("card-type",[j("tabs-scroll-padding","border-top: 1px solid var(--n-tab-border-color);"),ee("prefix, suffix",`
1515
+ border-top: 1px solid var(--n-tab-border-color);
1516
+ `),j("tabs-tab",`
1517
+ border-bottom-left-radius: var(--n-tab-border-radius);
1518
+ border-bottom-right-radius: var(--n-tab-border-radius);
1519
+ `,[ae("active",`
1520
+ border-top: 1px solid #0000;
1521
+ `)]),j("tabs-tab-pad",`
1522
+ border-top: 1px solid var(--n-tab-border-color);
1523
+ `),j("tabs-pad",`
1524
+ border-top: 1px solid var(--n-tab-border-color);
1525
+ `)])])])]),WR=Object.assign(Object.assign({},nn.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]}),GR=bt({name:"Tabs",props:WR,slots:Object,setup(e,{slots:t}){var n,r,s,i;const{mergedClsPrefixRef:a,inlineThemeDisabled:o}=hr(e),c=nn("Tabs","-tabs",jR,AR,e,a),l=Fe(null),u=Fe(null),f=Fe(null),m=Fe(null),h=Fe(null),b=Fe(null),p=Fe(!0),E=Fe(!0),g=sy(e,["labelSize","size"]),y=sy(e,["activeName","value"]),w=Fe((r=(n=y.value)!==null&&n!==void 0?n:e.defaultValue)!==null&&r!==void 0?r:t.default?(i=(s=pi(t.default())[0])===null||s===void 0?void 0:s.props)===null||i===void 0?void 0:i.name:null),x=$c(y,w),S={id:0},C=ze(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});Yr(x,()=>{S.id=0,Q(),A()});function T(){var U;const{value:H}=x;return H===null?null:(U=l.value)===null||U===void 0?void 0:U.querySelector(`[data-name="${H}"]`)}function k(U){if(e.type==="card")return;const{value:H}=u;if(!H)return;const $=H.style.opacity==="0";if(U){const ie=`${a.value}-tabs-bar--disabled`,{barWidth:Ie,placement:pe}=e;if(U.dataset.disabled==="true"?H.classList.add(ie):H.classList.remove(ie),["top","bottom"].includes(pe)){if(V(["top","maxHeight","height"]),typeof Ie=="number"&&U.offsetWidth>=Ie){const Ke=Math.floor((U.offsetWidth-Ie)/2)+U.offsetLeft;H.style.left=`${Ke}px`,H.style.maxWidth=`${Ie}px`}else H.style.left=`${U.offsetLeft}px`,H.style.maxWidth=`${U.offsetWidth}px`;H.style.width="8192px",$&&(H.style.transition="none"),H.offsetWidth,$&&(H.style.transition="",H.style.opacity="1")}else{if(V(["left","maxWidth","width"]),typeof Ie=="number"&&U.offsetHeight>=Ie){const Ke=Math.floor((U.offsetHeight-Ie)/2)+U.offsetTop;H.style.top=`${Ke}px`,H.style.maxHeight=`${Ie}px`}else H.style.top=`${U.offsetTop}px`,H.style.maxHeight=`${U.offsetHeight}px`;H.style.height="8192px",$&&(H.style.transition="none"),H.offsetHeight,$&&(H.style.transition="",H.style.opacity="1")}}}function R(){if(e.type==="card")return;const{value:U}=u;U&&(U.style.opacity="0")}function V(U){const{value:H}=u;if(H)for(const $ of U)H.style[$]=""}function Q(){if(e.type==="card")return;const U=T();U?k(U):R()}function A(){var U;const H=(U=h.value)===null||U===void 0?void 0:U.$el;if(!H)return;const $=T();if(!$)return;const{scrollLeft:ie,offsetWidth:Ie}=H,{offsetLeft:pe,offsetWidth:Ke}=$;ie>pe?H.scrollTo({top:0,left:pe,behavior:"smooth"}):pe+Ke>ie+Ie&&H.scrollTo({top:0,left:pe+Ke-Ie,behavior:"smooth"})}const W=Fe(null);let _=0,Y=null;function De(U){const H=W.value;if(H){_=U.getBoundingClientRect().height;const $=`${_}px`,ie=()=>{H.style.height=$,H.style.maxHeight=$};Y?(ie(),Y(),Y=null):Y=ie}}function te(U){const H=W.value;if(H){const $=U.getBoundingClientRect().height,ie=()=>{document.body.offsetHeight,H.style.maxHeight=`${$}px`,H.style.height=`${Math.max(_,$)}px`};Y?(Y(),Y=null,ie()):Y=ie}}function Me(){const U=W.value;if(U){U.style.maxHeight="",U.style.height="";const{paneWrapperStyle:H}=e;if(typeof H=="string")U.style.cssText=H;else if(H){const{maxHeight:$,height:ie}=H;$!==void 0&&(U.style.maxHeight=$),ie!==void 0&&(U.style.height=ie)}}}const de={value:[]},Ue=Fe("next");function J(U){const H=x.value;let $="next";for(const ie of de.value){if(ie===H)break;if(ie===U){$="prev";break}}Ue.value=$,Z(U)}function Z(U){const{onActiveNameChange:H,onUpdateValue:$,"onUpdate:value":ie}=e;H&&Ct(H,U),$&&Ct($,U),ie&&Ct(ie,U),w.value=U}function Xe(U){const{onClose:H}=e;H&&Ct(H,U)}function Le(){const{value:U}=u;if(!U)return;const H="transition-disabled";U.classList.add(H),Q(),U.classList.remove(H)}const Re=Fe(null);function Je({transitionDisabled:U}){const H=l.value;if(!H)return;U&&H.classList.add("transition-disabled");const $=T();$&&Re.value&&(Re.value.style.width=`${$.offsetWidth}px`,Re.value.style.height=`${$.offsetHeight}px`,Re.value.style.transform=`translateX(${$.offsetLeft-Jl(getComputedStyle(H).paddingLeft)}px)`,U&&Re.value.offsetWidth),U&&H.classList.remove("transition-disabled")}Yr([x],()=>{e.type==="segment"&&$i(()=>{Je({transitionDisabled:!1})})}),uo(()=>{e.type==="segment"&&Je({transitionDisabled:!0})});let Ht=0;function ht(U){var H;if(U.contentRect.width===0&&U.contentRect.height===0||Ht===U.contentRect.width)return;Ht=U.contentRect.width;const{type:$}=e;if(($==="line"||$==="bar")&&Le(),$!=="segment"){const{placement:ie}=e;v((ie==="top"||ie==="bottom"?(H=h.value)===null||H===void 0?void 0:H.$el:b.value)||null)}}const Ve=Mh(ht,64);Yr([()=>e.justifyContent,()=>e.size],()=>{$i(()=>{const{type:U}=e;(U==="line"||U==="bar")&&Le()})});const Nt=Fe(!1);function Dt(U){var H;const{target:$,contentRect:{width:ie,height:Ie}}=U,pe=$.parentElement.parentElement.offsetWidth,Ke=$.parentElement.parentElement.offsetHeight,{placement:At}=e;if(!Nt.value)At==="top"||At==="bottom"?pe<ie&&(Nt.value=!0):Ke<Ie&&(Nt.value=!0);else{const{value:mt}=m;if(!mt)return;At==="top"||At==="bottom"?pe-ie>mt.$el.offsetWidth&&(Nt.value=!1):Ke-Ie>mt.$el.offsetHeight&&(Nt.value=!1)}v(((H=h.value)===null||H===void 0?void 0:H.$el)||null)}const er=Mh(Dt,64);function vn(){const{onAdd:U}=e;U&&U(),$i(()=>{const H=T(),{value:$}=h;!H||!$||$.scrollTo({left:H.offsetLeft,top:0,behavior:"smooth"})})}function v(U){if(!U)return;const{placement:H}=e;if(H==="top"||H==="bottom"){const{scrollLeft:$,scrollWidth:ie,offsetWidth:Ie}=U;p.value=$<=0,E.value=$+Ie>=ie}else{const{scrollTop:$,scrollHeight:ie,offsetHeight:Ie}=U;p.value=$<=0,E.value=$+Ie>=ie}}const ue=Mh(U=>{v(U.target)},64);Js(fg,{triggerRef:sn(e,"trigger"),tabStyleRef:sn(e,"tabStyle"),tabClassRef:sn(e,"tabClass"),addTabStyleRef:sn(e,"addTabStyle"),addTabClassRef:sn(e,"addTabClass"),paneClassRef:sn(e,"paneClass"),paneStyleRef:sn(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:sn(e,"type"),closableRef:sn(e,"closable"),valueRef:x,tabChangeIdRef:S,onBeforeLeaveRef:sn(e,"onBeforeLeave"),activateTab:J,handleClose:Xe,handleAdd:vn}),W2(()=>{Q(),A()}),lf(()=>{const{value:U}=f;if(!U)return;const{value:H}=a,$=`${H}-tabs-nav-scroll-wrapper--shadow-start`,ie=`${H}-tabs-nav-scroll-wrapper--shadow-end`;p.value?U.classList.remove($):U.classList.add($),E.value?U.classList.remove(ie):U.classList.add(ie)});const ne={syncBarPosition:()=>{Q()}},L=()=>{Je({transitionDisabled:!0})},P=ze(()=>{const{value:U}=g,{type:H}=e,$={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[H],ie=`${U}${$}`,{self:{barColor:Ie,closeIconColor:pe,closeIconColorHover:Ke,closeIconColorPressed:At,tabColor:mt,tabBorderColor:Gn,paneTextColor:Ns,tabFontWeight:tr,tabBorderRadius:rs,tabFontWeightActive:Kt,colorSegment:Nr,fontWeightStrong:Ti,tabColorSegment:Ee,closeSize:Ye,closeIconSize:ct,closeColorHover:Ut,closeColorPressed:En,closeBorderRadius:Pn,[We("panePadding",U)]:_n,[We("tabPadding",ie)]:Ft,[We("tabPaddingVertical",ie)]:nr,[We("tabGap",ie)]:bs,[We("tabGap",`${ie}Vertical`)]:So,[We("tabTextColor",H)]:bl,[We("tabTextColorActive",H)]:Si,[We("tabTextColorHover",H)]:wi,[We("tabTextColorDisabled",H)]:gl,[We("tabFontSize",U)]:pl},common:{cubicBezierEaseInOut:wo}}=c.value;return{"--n-bezier":wo,"--n-color-segment":Nr,"--n-bar-color":Ie,"--n-tab-font-size":pl,"--n-tab-text-color":bl,"--n-tab-text-color-active":Si,"--n-tab-text-color-disabled":gl,"--n-tab-text-color-hover":wi,"--n-pane-text-color":Ns,"--n-tab-border-color":Gn,"--n-tab-border-radius":rs,"--n-close-size":Ye,"--n-close-icon-size":ct,"--n-close-color-hover":Ut,"--n-close-color-pressed":En,"--n-close-border-radius":Pn,"--n-close-icon-color":pe,"--n-close-icon-color-hover":Ke,"--n-close-icon-color-pressed":At,"--n-tab-color":mt,"--n-tab-font-weight":tr,"--n-tab-font-weight-active":Kt,"--n-tab-padding":Ft,"--n-tab-padding-vertical":nr,"--n-tab-gap":bs,"--n-tab-gap-vertical":So,"--n-pane-padding-left":vs(_n,"left"),"--n-pane-padding-right":vs(_n,"right"),"--n-pane-padding-top":vs(_n,"top"),"--n-pane-padding-bottom":vs(_n,"bottom"),"--n-font-weight-strong":Ti,"--n-tab-color-segment":Ee}}),G=o?fs("tabs",ze(()=>`${g.value[0]}${e.type[0]}`),P,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:x,renderedNames:new Set,segmentCapsuleElRef:Re,tabsPaneWrapperRef:W,tabsElRef:l,barElRef:u,addTabInstRef:m,xScrollInstRef:h,scrollWrapperElRef:f,addTabFixed:Nt,tabWrapperStyle:C,handleNavResize:Ve,mergedSize:g,handleScroll:ue,handleTabsResize:er,cssVars:o?void 0:P,themeClass:G==null?void 0:G.themeClass,animationDirection:Ue,renderNameListRef:de,yScrollElRef:b,handleSegmentResize:L,onAnimationBeforeLeave:De,onAnimationEnter:te,onAnimationAfterEnter:Me,onRender:G==null?void 0:G.onRender},ne)},render(){const{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:s,mergedSize:i,renderNameListRef:a,onRender:o,paneWrapperClass:c,paneWrapperStyle:l,$slots:{default:u,prefix:f,suffix:m}}=this;o==null||o();const h=u?pi(u()).filter(S=>S.type.__TAB_PANE__===!0):[],b=u?pi(u()).filter(S=>S.type.__TAB__===!0):[],p=!b.length,E=t==="card",g=t==="segment",y=!E&&!g&&this.justifyContent;a.value=[];const w=()=>{const S=N("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},y?null:N("div",{class:`${e}-tabs-scroll-padding`,style:n==="top"||n==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),p?h.map((C,T)=>(a.value.push(C.props.name),zh(N(wm,Object.assign({},C.props,{internalCreatedByPane:!0,internalLeftPadded:T!==0&&(!y||y==="center"||y==="start"||y==="end")}),C.children?{default:C.children.tab}:void 0)))):b.map((C,T)=>(a.value.push(C.props.name),zh(T!==0&&!y?Uy(C):C))),!r&&s&&E?zy(s,(p?h.length:b.length)!==0):null,y?null:N("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return N("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},E&&s?N(Vo,{onResize:this.handleTabsResize},{default:()=>S}):S,E?N("div",{class:`${e}-tabs-pad`}):null,E?null:N("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},x=g?"top":n;return N("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${i}-size`,y&&`${e}-tabs--flex`,`${e}-tabs--${x}`],style:this.cssVars},N("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${x}`,`${e}-tabs-nav`]},Ln(f,S=>S&&N("div",{class:`${e}-tabs-nav__prefix`},S)),g?N(Vo,{onResize:this.handleSegmentResize},{default:()=>N("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},N("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},N("div",{class:`${e}-tabs-wrapper`},N("div",{class:`${e}-tabs-tab`}))),p?h.map((S,C)=>(a.value.push(S.props.name),N(wm,Object.assign({},S.props,{internalCreatedByPane:!0,internalLeftPadded:C!==0}),S.children?{default:S.children.tab}:void 0))):b.map((S,C)=>(a.value.push(S.props.name),C===0?S:Uy(S))))}):N(Vo,{onResize:this.handleNavResize},{default:()=>N("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(x)?N(NA,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:w}):N("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},w()))}),r&&s&&E?zy(s,!0):null,Ln(m,S=>S&&N("div",{class:`${e}-tabs-nav__suffix`},S))),p&&(this.animated&&(x==="top"||x==="bottom")?N("div",{ref:"tabsPaneWrapperRef",style:l,class:[`${e}-tabs-pane-wrapper`,c]},Fy(h,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):Fy(h,this.mergedValue,this.renderedNames)))}});function Fy(e,t,n,r,s,i,a){const o=[];return e.forEach(c=>{const{name:l,displayDirective:u,"display-directive":f}=c.props,m=b=>u===b||f===b,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 b=!m("if");o.push(b?Zl(c,[[df,h]]):c)}}),a?N(B2,{name:`${a}-transition`,onBeforeLeave:r,onEnter:s,onAfterEnter:i},{default:()=>o}):o}function zy(e,t){return N(wm,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function Uy(e){const t=gx(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function zh(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}class fo extends Error{constructor(...n){super(...n);ge(this,"name","MeiliSearchError")}}class Am extends fo{constructor(n,r){super((r==null?void 0:r.message)??`${n.status}: ${n.statusText}`);ge(this,"name","MeiliSearchApiError");ge(this,"cause");ge(this,"response");this.response=n,r!==void 0&&(this.cause=r)}}class km extends fo{constructor(n,r){super(`Request to ${n} has failed`,{cause:r});ge(this,"name","MeiliSearchRequestError")}}class VR extends fo{constructor(n){super(n);ge(this,"name","MeiliSearchTimeOutError")}}function Ku(e,t){return`${e}
1526
+ Hint: It might not be working because maybe you're not up to date with the Meilisearch version that ${t} call requires.`}const KR="0.49.0";function Po(e){return Object.entries(e).reduce((t,n)=>{const[r,s]=n;return s!==void 0&&(t[r]=s),t},{})}async function YR(e){return await new Promise(t=>setTimeout(t,e))}function XR(e){return e.startsWith("https://")||e.startsWith("http://")?e:`http://${e}`}function QR(e){return e.endsWith("/")||(e+="/"),e}function Cd(e){return Object.keys(e).reduce((r,s)=>{const i=e[s];return i===void 0?r:Array.isArray(i)?{...r,[s]:i.join(",")}:i instanceof Date?{...r,[s]:i.toISOString()}:{...r,[s]:i}},{})}function ZR(e){try{return e=XR(e),e=QR(e),e}catch{throw new fo("The provided host is not valid.")}}function JR(e){if(Array.isArray(e))return e.reduce((t,n)=>(t[n[0]]=n[1],t),{});if("has"in e){const t={};return e.forEach((n,r)=>t[r]=n),t}else return Object.assign({},e)}function eI(e){var a;const t="X-Meilisearch-Client",n=`Meilisearch JavaScript (v${KR})`,r="Content-Type",s="Authorization",i=JR(((a=e.requestConfig)==null?void 0:a.headers)??{});if(e.apiKey&&!i[s]&&(i[s]=`Bearer ${e.apiKey}`),i[r]||(i["Content-Type"]="application/json"),e.clientAgents&&Array.isArray(e.clientAgents)){const o=e.clientAgents.concat(n);i[t]=o.join(" ; ")}else{if(e.clientAgents&&!Array.isArray(e.clientAgents))throw new fo(`Meilisearch: The header "${t}" should be an array of string(s).
1527
+ `);i[t]=n}return i}class tu{constructor(t){ge(this,"headers");ge(this,"url");ge(this,"requestConfig");ge(this,"httpClient");ge(this,"requestTimeout");this.headers=eI(t),this.requestConfig=t.requestConfig,this.httpClient=t.httpClient,this.requestTimeout=t.timeout;try{const n=ZR(t.host);this.url=new URL(n)}catch{throw new fo("The provided host is not valid.")}}async request({method:t,url:n,params:r,body:s,config:i={}}){var m;const a=new URL(n,this.url);if(r){const h=new URLSearchParams;Object.keys(r).filter(b=>r[b]!==null).map(b=>h.set(b,r[b])),a.search=h.toString()}(m=i.headers)!=null&&m["Content-Type"]||(s=JSON.stringify(s));const o={...this.headers,...i.headers},l=await this.fetchWithTimeout(a.toString(),{...i,...this.requestConfig,method:t,body:s,headers:o},this.requestTimeout).catch(h=>{throw new km(a.toString(),h)});if(this.httpClient!==void 0)return l;const u=await l.text(),f=u===""?void 0:JSON.parse(u);if(!l.ok)throw new Am(l,f);return f}async fetchWithTimeout(t,n,r){return new Promise((s,i)=>{const c=[(this.httpClient?this.httpClient:fetch)(t,n)];let l;if(r){const u=new Promise((f,m)=>{l=setTimeout(()=>{m(new Error("Error: Request Timed Out"))},r)});c.push(u)}Promise.race(c).then(s).catch(i).finally(()=>{clearTimeout(l)})})}async get(t,n,r){return await this.request({method:"GET",url:t,params:n,config:r})}async post(t,n,r,s){return await this.request({method:"POST",url:t,body:n,params:r,config:s})}async put(t,n,r,s){return await this.request({method:"PUT",url:t,body:n,params:r,config:s})}async patch(t,n,r,s){return await this.request({method:"PATCH",url:t,body:n,params:r,config:s})}async delete(t,n,r,s){return await this.request({method:"DELETE",url:t,body:n,params:r,config:s})}}class Rt{constructor(t){ge(this,"taskUid");ge(this,"indexUid");ge(this,"status");ge(this,"type");ge(this,"enqueuedAt");this.taskUid=t.taskUid,this.indexUid=t.indexUid,this.status=t.status,this.type=t.type,this.enqueuedAt=new Date(t.enqueuedAt)}}class $y{constructor(t){ge(this,"indexUid");ge(this,"status");ge(this,"type");ge(this,"uid");ge(this,"batchUid");ge(this,"canceledBy");ge(this,"details");ge(this,"error");ge(this,"duration");ge(this,"startedAt");ge(this,"enqueuedAt");ge(this,"finishedAt");this.indexUid=t.indexUid,this.status=t.status,this.type=t.type,this.uid=t.uid,this.batchUid=t.batchUid,this.details=t.details,this.canceledBy=t.canceledBy,this.error=t.error,this.duration=t.duration,this.startedAt=new Date(t.startedAt),this.enqueuedAt=new Date(t.enqueuedAt),this.finishedAt=new Date(t.finishedAt)}}class Wx{constructor(t){ge(this,"httpRequest");this.httpRequest=new tu(t)}async getTask(t){const n=`tasks/${t}`,r=await this.httpRequest.get(n);return new $y(r)}async getTasks(t={}){const r=await this.httpRequest.get("tasks",Cd(t));return{...r,results:r.results.map(s=>new $y(s))}}async waitForTask(t,{timeOutMs:n=5e3,intervalMs:r=50}={}){const s=Date.now();for(;Date.now()-s<n;){const i=await this.getTask(t);if(![qy.TASK_ENQUEUED,qy.TASK_PROCESSING].includes(i.status))return i;await YR(r)}throw new VR(`timeout of ${n}ms has exceeded on process ${t} when waiting a task to be resolved.`)}async waitForTasks(t,{timeOutMs:n=5e3,intervalMs:r=50}={}){const s=[];for(const i of t){const a=await this.waitForTask(i,{timeOutMs:n,intervalMs:r});s.push(a)}return s}async cancelTasks(t={}){const r=await this.httpRequest.post("tasks/cancel",{},Cd(t));return new Rt(r)}async deleteTasks(t={}){const r=await this.httpRequest.delete("tasks",{},Cd(t));return new Rt(r)}}class Hy{constructor(t){ge(this,"uid");ge(this,"details");ge(this,"stats");ge(this,"startedAt");ge(this,"finishedAt");ge(this,"duration");ge(this,"progress");this.uid=t.uid,this.details=t.details,this.stats=t.stats,this.startedAt=t.startedAt,this.finishedAt=t.finishedAt,this.duration=t.duration,this.progress=t.progress}}class tI{constructor(t){ge(this,"httpRequest");this.httpRequest=new tu(t)}async getBatch(t){const n=`batches/${t}`,r=await this.httpRequest.get(n);return new Hy(r)}async getBatches(t={}){const r=await this.httpRequest.get("batches",Cd(t));return{...r,results:r.results.map(s=>new Hy(s))}}}const qy={TASK_PROCESSING:"processing",TASK_ENQUEUED:"enqueued"},nI={INDEX_NOT_FOUND:"index_not_found"};class la{constructor(t,n,r){ge(this,"uid");ge(this,"primaryKey");ge(this,"createdAt");ge(this,"updatedAt");ge(this,"httpRequest");ge(this,"tasks");this.uid=n,this.primaryKey=r,this.httpRequest=new tu(t),this.tasks=new Wx(t)}async search(t,n,r){const s=`indexes/${this.uid}/search`;return await this.httpRequest.post(s,Po({q:t,...n}),void 0,r)}async searchGet(t,n,r){var o,c,l,u,f,m,h;const s=`indexes/${this.uid}/search`,a={q:t,...n,filter:(b=>{if(typeof b=="string")return b;if(Array.isArray(b))throw new fo("The filter query parameter should be in string format when using searchGet")})(n==null?void 0:n.filter),sort:(o=n==null?void 0:n.sort)==null?void 0:o.join(","),facets:(c=n==null?void 0:n.facets)==null?void 0:c.join(","),attributesToRetrieve:(l=n==null?void 0:n.attributesToRetrieve)==null?void 0:l.join(","),attributesToCrop:(u=n==null?void 0:n.attributesToCrop)==null?void 0:u.join(","),attributesToHighlight:(f=n==null?void 0:n.attributesToHighlight)==null?void 0:f.join(","),vector:(m=n==null?void 0:n.vector)==null?void 0:m.join(","),attributesToSearchOn:(h=n==null?void 0:n.attributesToSearchOn)==null?void 0:h.join(",")};return await this.httpRequest.get(s,Po(a),r)}async searchForFacetValues(t,n){const r=`indexes/${this.uid}/facet-search`;return await this.httpRequest.post(r,Po(t),void 0,n)}async searchSimilarDocuments(t){const n=`indexes/${this.uid}/similar`;return await this.httpRequest.post(n,Po(t),void 0)}async getRawInfo(){const t=`indexes/${this.uid}`,n=await this.httpRequest.get(t);return this.primaryKey=n.primaryKey,this.updatedAt=new Date(n.updatedAt),this.createdAt=new Date(n.createdAt),n}async fetchInfo(){return await this.getRawInfo(),this}async fetchPrimaryKey(){return this.primaryKey=(await this.getRawInfo()).primaryKey,this.primaryKey}static async create(t,n={},r){const a=await new tu(r).post("indexes",{...n,uid:t});return new Rt(a)}async update(t){const n=`indexes/${this.uid}`,r=await this.httpRequest.patch(n,t);return r.enqueuedAt=new Date(r.enqueuedAt),r}async delete(){const t=`indexes/${this.uid}`,n=await this.httpRequest.delete(t);return new Rt(n)}async getTasks(t={}){return await this.tasks.getTasks({...t,indexUids:[this.uid]})}async getTask(t){return await this.tasks.getTask(t)}async waitForTasks(t,{timeOutMs:n=5e3,intervalMs:r=50}={}){return await this.tasks.waitForTasks(t,{timeOutMs:n,intervalMs:r})}async waitForTask(t,{timeOutMs:n=5e3,intervalMs:r=50}={}){return await this.tasks.waitForTask(t,{timeOutMs:n,intervalMs:r})}async getStats(){const t=`indexes/${this.uid}/stats`;return await this.httpRequest.get(t)}async getDocuments(t={}){var n;if(t=Po(t),t.filter!==void 0)try{const r=`indexes/${this.uid}/documents/fetch`;return await this.httpRequest.post(r,t)}catch(r){throw(r instanceof km||r instanceof Am)&&(r.message=Ku(r.message,"getDocuments")),r}else{const r=`indexes/${this.uid}/documents`,s=Array.isArray(t==null?void 0:t.fields)?{fields:(n=t==null?void 0:t.fields)==null?void 0:n.join(",")}:{};return await this.httpRequest.get(r,{...t,...s})}}async getDocument(t,n){const r=`indexes/${this.uid}/documents/${t}`,s=(()=>{var i;if(Array.isArray(n==null?void 0:n.fields))return(i=n==null?void 0:n.fields)==null?void 0:i.join(",")})();return await this.httpRequest.get(r,Po({...n,fields:s}))}async addDocuments(t,n){const r=`indexes/${this.uid}/documents`,s=await this.httpRequest.post(r,t,n);return new Rt(s)}async addDocumentsFromString(t,n,r){const s=`indexes/${this.uid}/documents`,i=await this.httpRequest.post(s,t,r,{headers:{"Content-Type":n}});return new Rt(i)}async addDocumentsInBatches(t,n=1e3,r){const s=[];for(let i=0;i<t.length;i+=n)s.push(await this.addDocuments(t.slice(i,i+n),r));return s}async updateDocuments(t,n){const r=`indexes/${this.uid}/documents`,s=await this.httpRequest.put(r,t,n);return new Rt(s)}async updateDocumentsInBatches(t,n=1e3,r){const s=[];for(let i=0;i<t.length;i+=n)s.push(await this.updateDocuments(t.slice(i,i+n),r));return s}async updateDocumentsFromString(t,n,r){const s=`indexes/${this.uid}/documents`,i=await this.httpRequest.put(s,t,r,{headers:{"Content-Type":n}});return new Rt(i)}async deleteDocument(t){const n=`indexes/${this.uid}/documents/${t}`,r=await this.httpRequest.delete(n);return r.enqueuedAt=new Date(r.enqueuedAt),r}async deleteDocuments(t){const n=!Array.isArray(t)&&typeof t=="object",r=n?"documents/delete":"documents/delete-batch",s=`indexes/${this.uid}/${r}`;try{const i=await this.httpRequest.post(s,t);return new Rt(i)}catch(i){throw(i instanceof km&&n||i instanceof Am)&&(i.message=Ku(i.message,"deleteDocuments")),i}}async deleteAllDocuments(){const t=`indexes/${this.uid}/documents`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async updateDocumentsByFunction(t){const n=`indexes/${this.uid}/documents/edit`,r=await this.httpRequest.post(n,t);return new Rt(r)}async getSettings(){const t=`indexes/${this.uid}/settings`;return await this.httpRequest.get(t)}async updateSettings(t){const n=`indexes/${this.uid}/settings`,r=await this.httpRequest.patch(n,t);return r.enqueued=new Date(r.enqueuedAt),r}async resetSettings(){const t=`indexes/${this.uid}/settings`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getPagination(){const t=`indexes/${this.uid}/settings/pagination`;return await this.httpRequest.get(t)}async updatePagination(t){const n=`indexes/${this.uid}/settings/pagination`,r=await this.httpRequest.patch(n,t);return new Rt(r)}async resetPagination(){const t=`indexes/${this.uid}/settings/pagination`,n=await this.httpRequest.delete(t);return new Rt(n)}async getSynonyms(){const t=`indexes/${this.uid}/settings/synonyms`;return await this.httpRequest.get(t)}async updateSynonyms(t){const n=`indexes/${this.uid}/settings/synonyms`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetSynonyms(){const t=`indexes/${this.uid}/settings/synonyms`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getStopWords(){const t=`indexes/${this.uid}/settings/stop-words`;return await this.httpRequest.get(t)}async updateStopWords(t){const n=`indexes/${this.uid}/settings/stop-words`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetStopWords(){const t=`indexes/${this.uid}/settings/stop-words`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getRankingRules(){const t=`indexes/${this.uid}/settings/ranking-rules`;return await this.httpRequest.get(t)}async updateRankingRules(t){const n=`indexes/${this.uid}/settings/ranking-rules`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetRankingRules(){const t=`indexes/${this.uid}/settings/ranking-rules`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getDistinctAttribute(){const t=`indexes/${this.uid}/settings/distinct-attribute`;return await this.httpRequest.get(t)}async updateDistinctAttribute(t){const n=`indexes/${this.uid}/settings/distinct-attribute`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetDistinctAttribute(){const t=`indexes/${this.uid}/settings/distinct-attribute`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getFilterableAttributes(){const t=`indexes/${this.uid}/settings/filterable-attributes`;return await this.httpRequest.get(t)}async updateFilterableAttributes(t){const n=`indexes/${this.uid}/settings/filterable-attributes`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetFilterableAttributes(){const t=`indexes/${this.uid}/settings/filterable-attributes`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getSortableAttributes(){const t=`indexes/${this.uid}/settings/sortable-attributes`;return await this.httpRequest.get(t)}async updateSortableAttributes(t){const n=`indexes/${this.uid}/settings/sortable-attributes`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetSortableAttributes(){const t=`indexes/${this.uid}/settings/sortable-attributes`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getSearchableAttributes(){const t=`indexes/${this.uid}/settings/searchable-attributes`;return await this.httpRequest.get(t)}async updateSearchableAttributes(t){const n=`indexes/${this.uid}/settings/searchable-attributes`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetSearchableAttributes(){const t=`indexes/${this.uid}/settings/searchable-attributes`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getDisplayedAttributes(){const t=`indexes/${this.uid}/settings/displayed-attributes`;return await this.httpRequest.get(t)}async updateDisplayedAttributes(t){const n=`indexes/${this.uid}/settings/displayed-attributes`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetDisplayedAttributes(){const t=`indexes/${this.uid}/settings/displayed-attributes`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getTypoTolerance(){const t=`indexes/${this.uid}/settings/typo-tolerance`;return await this.httpRequest.get(t)}async updateTypoTolerance(t){const n=`indexes/${this.uid}/settings/typo-tolerance`,r=await this.httpRequest.patch(n,t);return r.enqueuedAt=new Date(r.enqueuedAt),r}async resetTypoTolerance(){const t=`indexes/${this.uid}/settings/typo-tolerance`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getFaceting(){const t=`indexes/${this.uid}/settings/faceting`;return await this.httpRequest.get(t)}async updateFaceting(t){const n=`indexes/${this.uid}/settings/faceting`,r=await this.httpRequest.patch(n,t);return new Rt(r)}async resetFaceting(){const t=`indexes/${this.uid}/settings/faceting`,n=await this.httpRequest.delete(t);return new Rt(n)}async getSeparatorTokens(){const t=`indexes/${this.uid}/settings/separator-tokens`;return await this.httpRequest.get(t)}async updateSeparatorTokens(t){const n=`indexes/${this.uid}/settings/separator-tokens`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetSeparatorTokens(){const t=`indexes/${this.uid}/settings/separator-tokens`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getNonSeparatorTokens(){const t=`indexes/${this.uid}/settings/non-separator-tokens`;return await this.httpRequest.get(t)}async updateNonSeparatorTokens(t){const n=`indexes/${this.uid}/settings/non-separator-tokens`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetNonSeparatorTokens(){const t=`indexes/${this.uid}/settings/non-separator-tokens`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getDictionary(){const t=`indexes/${this.uid}/settings/dictionary`;return await this.httpRequest.get(t)}async updateDictionary(t){const n=`indexes/${this.uid}/settings/dictionary`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetDictionary(){const t=`indexes/${this.uid}/settings/dictionary`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getProximityPrecision(){const t=`indexes/${this.uid}/settings/proximity-precision`;return await this.httpRequest.get(t)}async updateProximityPrecision(t){const n=`indexes/${this.uid}/settings/proximity-precision`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetProximityPrecision(){const t=`indexes/${this.uid}/settings/proximity-precision`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getEmbedders(){const t=`indexes/${this.uid}/settings/embedders`;return await this.httpRequest.get(t)}async updateEmbedders(t){const n=`indexes/${this.uid}/settings/embedders`,r=await this.httpRequest.patch(n,t);return new Rt(r)}async resetEmbedders(){const t=`indexes/${this.uid}/settings/embedders`,n=await this.httpRequest.delete(t);return n.enqueuedAt=new Date(n.enqueuedAt),n}async getSearchCutoffMs(){const t=`indexes/${this.uid}/settings/search-cutoff-ms`;return await this.httpRequest.get(t)}async updateSearchCutoffMs(t){const n=`indexes/${this.uid}/settings/search-cutoff-ms`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetSearchCutoffMs(){const t=`indexes/${this.uid}/settings/search-cutoff-ms`,n=await this.httpRequest.delete(t);return new Rt(n)}async getLocalizedAttributes(){const t=`indexes/${this.uid}/settings/localized-attributes`;return await this.httpRequest.get(t)}async updateLocalizedAttributes(t){const n=`indexes/${this.uid}/settings/localized-attributes`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetLocalizedAttributes(){const t=`indexes/${this.uid}/settings/localized-attributes`,n=await this.httpRequest.delete(t);return new Rt(n)}async getFacetSearch(){const t=`indexes/${this.uid}/settings/facet-search`;return await this.httpRequest.get(t)}async updateFacetSearch(t){const n=`indexes/${this.uid}/settings/facet-search`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetFacetSearch(){const t=`indexes/${this.uid}/settings/facet-search`,n=await this.httpRequest.delete(t);return new Rt(n)}async getPrefixSearch(){const t=`indexes/${this.uid}/settings/prefix-search`;return await this.httpRequest.get(t)}async updatePrefixSearch(t){const n=`indexes/${this.uid}/settings/prefix-search`,r=await this.httpRequest.put(n,t);return new Rt(r)}async resetPrefixSearch(){const t=`indexes/${this.uid}/settings/prefix-search`,n=await this.httpRequest.delete(t);return new Rt(n)}}class rI{constructor(t){ge(this,"config");ge(this,"httpRequest");ge(this,"tasks");ge(this,"batches");this.config=t,this.httpRequest=new tu(t),this.tasks=new Wx(t),this.batches=new tI(t)}index(t){return new la(this.config,t)}async getIndex(t){return new la(this.config,t).fetchInfo()}async getRawIndex(t){return new la(this.config,t).getRawInfo()}async getIndexes(t={}){const n=await this.getRawIndexes(t),r=n.results.map(s=>new la(this.config,s.uid,s.primaryKey));return{...n,results:r}}async getRawIndexes(t={}){return await this.httpRequest.get("indexes",t)}async createIndex(t,n={}){return await la.create(t,n,this.config)}async updateIndex(t,n={}){return await new la(this.config,t).update(n)}async deleteIndex(t){return await new la(this.config,t).delete()}async deleteIndexIfExists(t){try{return await this.deleteIndex(t),!0}catch(n){if(n.code===nI.INDEX_NOT_FOUND)return!1;throw n}}async swapIndexes(t){return await this.httpRequest.post("/swap-indexes",t)}async multiSearch(t,n){return await this.httpRequest.post("multi-search",t,void 0,n)}async getTasks(t={}){return await this.tasks.getTasks(t)}async getTask(t){return await this.tasks.getTask(t)}async waitForTasks(t,{timeOutMs:n=5e3,intervalMs:r=50}={}){return await this.tasks.waitForTasks(t,{timeOutMs:n,intervalMs:r})}async waitForTask(t,{timeOutMs:n=5e3,intervalMs:r=50}={}){return await this.tasks.waitForTask(t,{timeOutMs:n,intervalMs:r})}async cancelTasks(t){return await this.tasks.cancelTasks(t)}async deleteTasks(t={}){return await this.tasks.deleteTasks(t)}async getBatches(t={}){return await this.batches.getBatches(t)}async getBatch(t){return await this.batches.getBatch(t)}async getKeys(t={}){const r=await this.httpRequest.get("keys",t);return r.results=r.results.map(s=>({...s,createdAt:new Date(s.createdAt),updatedAt:new Date(s.updatedAt)})),r}async getKey(t){const n=`keys/${t}`;return await this.httpRequest.get(n)}async createKey(t){return await this.httpRequest.post("keys",t)}async updateKey(t,n){const r=`keys/${t}`;return await this.httpRequest.patch(r,n)}async deleteKey(t){const n=`keys/${t}`;return await this.httpRequest.delete(n)}async health(){return await this.httpRequest.get("health")}async isHealthy(){try{return await this.httpRequest.get("health"),!0}catch{return!1}}async getStats(){return await this.httpRequest.get("stats")}async getVersion(){return await this.httpRequest.get("version")}async createDump(){const n=await this.httpRequest.post("dumps");return new Rt(n)}async createSnapshot(){const n=await this.httpRequest.post("snapshots");return new Rt(n)}}var $t;(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"})($t||($t={}));function sI(e){return e.type===$t.Tag||e.type===$t.Script||e.type===$t.Style}const iI=$t.Root,aI=$t.Text,oI=$t.Directive,cI=$t.Comment,lI=$t.Script,uI=$t.Style,dI=$t.Tag,fI=$t.CDATA,hI=$t.Doctype;class Gx{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 ru(this,t)}}class hg extends Gx{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}}class nu extends hg{constructor(){super(...arguments),this.type=$t.Text}get nodeType(){return 3}}class mg extends hg{constructor(){super(...arguments),this.type=$t.Comment}get nodeType(){return 8}}class bg extends hg{constructor(t,n){super(n),this.name=t,this.type=$t.Directive}get nodeType(){return 1}}class gg extends Gx{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 Vx extends gg{constructor(){super(...arguments),this.type=$t.CDATA}get nodeType(){return 4}}class ro extends gg{constructor(){super(...arguments),this.type=$t.Root}get nodeType(){return 9}}let pg=class extends gg{constructor(t,n,r=[],s=t==="script"?$t.Script:t==="style"?$t.Style:$t.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 ft(e){return sI(e)}function Jf(e){return e.type===$t.CDATA}function ti(e){return e.type===$t.Text}function eh(e){return e.type===$t.Comment}function Rm(e){return e.type===$t.Directive}function ra(e){return e.type===$t.Root}function Mn(e){return Object.prototype.hasOwnProperty.call(e,"children")}function ru(e,t=!1){let n;if(ti(e))n=new nu(e.data);else if(eh(e))n=new mg(e.data);else if(ft(e)){const r=t?Uh(e.children):[],s=new pg(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(Jf(e)){const r=t?Uh(e.children):[],s=new Vx(r);r.forEach(i=>i.parent=s),n=s}else if(ra(e)){const r=t?Uh(e.children):[],s=new ro(r);r.forEach(i=>i.parent=s),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else if(Rm(e)){const r=new bg(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 Uh(e){const t=e.map(n=>ru(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 jy={withStartIndices:!1,withEndIndices:!1,xmlMode:!1};class mI{constructor(t,n,r){this.dom=[],this.root=new ro(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof n=="function"&&(r=n,n=jy),typeof t=="object"&&(n=t,t=void 0),this.callback=t??null,this.options=n??jy,this.elementCB=r??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new ro(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?$t.Tag:void 0,s=new pg(t,n,void 0,r);this.addNode(s),this.tagStack.push(s)}ontext(t){const{lastNode:n}=this;if(n&&n.type===$t.Text)n.data+=t,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{const r=new nu(t);this.addNode(r),this.lastNode=r}}oncomment(t){if(this.lastNode&&this.lastNode.type===$t.Comment){this.lastNode.data+=t;return}const n=new mg(t);this.addNode(n),this.lastNode=n}oncommentend(){this.lastNode=null}oncdatastart(){const t=new nu(""),n=new Vx([t]);this.addNode(n),t.parent=n,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,n){const r=new bg(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 yg=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))),Kx=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var $h;const bI=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]]),Im=($h=String.fromCodePoint)!==null&&$h!==void 0?$h: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 gI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=bI.get(e))!==null&&t!==void 0?t:e}var lr;(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"})(lr||(lr={}));const pI=32;var Fi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fi||(Fi={}));function Bm(e){return e>=lr.ZERO&&e<=lr.NINE}function yI(e){return e>=lr.UPPER_A&&e<=lr.UPPER_F||e>=lr.LOWER_A&&e<=lr.LOWER_F}function EI(e){return e>=lr.UPPER_A&&e<=lr.UPPER_Z||e>=lr.LOWER_A&&e<=lr.LOWER_Z||Bm(e)}function CI(e){return e===lr.EQUALS||EI(e)}var ar;(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"})(ar||(ar={}));var Cs;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Cs||(Cs={}));class Eg{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ar.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Cs.Strict}startEntity(t){this.decodeMode=t,this.state=ar.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ar.EntityStart:return t.charCodeAt(n)===lr.NUM?(this.state=ar.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ar.NamedEntity,this.stateNamedEntity(t,n));case ar.NumericStart:return this.stateNumericStart(t,n);case ar.NumericDecimal:return this.stateNumericDecimal(t,n);case ar.NumericHex:return this.stateNumericHex(t,n);case ar.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|pI)===lr.LOWER_X?(this.state=ar.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ar.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)+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(Bm(s)||yI(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(Bm(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===lr.SEMI)this.consumed+=1;else if(this.decodeMode===Cs.Strict)return 0;return this.emitCodePoint(gI(this.result),this.consumed),this.errors&&(t!==lr.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&Fi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=xI(r,s,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Cs.Attribute&&(i===0||CI(a))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],i=(s&Fi.VALUE_LENGTH)>>14,i!==0){if(a===lr.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Cs.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]&Fi.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]&~Fi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case ar.NamedEntity:return this.result!==0&&(this.decodeMode!==Cs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ar.NumericDecimal:return this.emitNumericEntity(0,2);case ar.NumericHex:return this.emitNumericEntity(0,3);case ar.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ar.EntityStart:return 0}}}function Yx(e){let t="";const n=new Eg(e,r=>t+=Im(r));return function(s,i){let a=0,o=0;for(;(o=s.indexOf("&",o))>=0;){t+=s.slice(a,o),n.startEntity(i);const l=n.write(s,o+1);if(l<0){a=o+n.end();break}a=o+l,o=l===0?a+1:a}const c=t+s.slice(a);return t="",c}}function xI(e,t,n,r){const s=(t&Fi.BRANCH_LENGTH)>>7,i=t&Fi.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}Yx(yg);Yx(Kx);const Wy=/["&'<>$\x80-\uFFFF]/g,vI=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]),_I=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 Xx(e){let t="",n=0,r;for(;(r=Wy.exec(e))!==null;){const s=r.index,i=e.charCodeAt(s),a=vI.get(i);a!==void 0?(t+=e.substring(n,s)+a,n=s+1):(t+=`${e.substring(n,s)}&#x${_I(e,s).toString(16)};`,n=Wy.lastIndex+=+((i&64512)===55296))}return t+e.substr(n)}function Qx(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 Zx=Qx(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),Jx=Qx(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]])),TI=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])),SI=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])),wI=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function AI(e){return e.replace(/"/g,"&quot;")}function kI(e,t){var n;if(!e)return;const r=((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)===!1?AI:t.xmlMode||t.encodeEntities!=="utf8"?Xx:Zx;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=SI.get(s))!==null&&a!==void 0?a:s),!t.emptyAttrs&&!t.xmlMode&&o===""?s:`${s}="${r(o)}"`}).join(" ")}const Gy=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function th(e,t={}){const n="length"in e?e:[e];let r="";for(let s=0;s<n.length;s++)r+=RI(n[s],t);return r}function RI(e,t){switch(e.type){case iI:return th(e.children,t);case hI:case oI:return NI(e);case cI:return LI(e);case fI:return DI(e);case lI:case uI:case dI:return PI(e,t);case aI:return OI(e,t)}}const II=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),BI=new Set(["svg","math"]);function PI(e,t){var n;t.xmlMode==="foreign"&&(e.name=(n=TI.get(e.name))!==null&&n!==void 0?n:e.name,e.parent&&II.has(e.parent.name)&&(t={...t,xmlMode:!1})),!t.xmlMode&&BI.has(e.name)&&(t={...t,xmlMode:"foreign"});let r=`<${e.name}`;const s=kI(e.attribs,t);return s&&(r+=` ${s}`),e.children.length===0&&(t.xmlMode?t.selfClosingTags!==!1:t.selfClosingTags&&Gy.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=th(e.children,t)),(t.xmlMode||!Gy.has(e.name))&&(r+=`</${e.name}>`)),r}function NI(e){return`<${e.data}>`}function OI(e,t){var n;let r=e.data||"";return((n=t.encodeEntities)!==null&&n!==void 0?n:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&wI.has(e.parent.name))&&(r=t.xmlMode||t.encodeEntities!=="utf8"?Xx(r):Jx(r)),r}function DI(e){return`<![CDATA[${e.children[0].data}]]>`}function LI(e){return`<!--${e.data}-->`}function ev(e,t){return th(e,t)}function MI(e,t){return Mn(e)?e.children.map(n=>ev(n,t)).join(""):""}function xd(e){return Array.isArray(e)?e.map(xd).join(""):ft(e)?e.name==="br"?`
1528
+ `:xd(e.children):Jf(e)?xd(e.children):ti(e)?e.data:""}function Ic(e){return Array.isArray(e)?e.map(Ic).join(""):Mn(e)&&!eh(e)?Ic(e.children):ti(e)?e.data:""}function hf(e){return Array.isArray(e)?e.map(hf).join(""):Mn(e)&&(e.type===$t.Tag||Jf(e))?hf(e.children):ti(e)?e.data:""}function nh(e){return Mn(e)?e.children:[]}function tv(e){return e.parent||null}function nv(e){const t=tv(e);if(t!=null)return nh(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 FI(e,t){var n;return(n=e.attribs)===null||n===void 0?void 0:n[t]}function zI(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function UI(e){return e.name}function Cg(e){let{next:t}=e;for(;t!==null&&!ft(t);)({next:t}=t);return t}function xg(e){let{prev:t}=e;for(;t!==null&&!ft(t);)({prev:t}=t);return t}function ho(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 $I(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 HI(e,t){if(ho(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 qI(e,t){ho(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 jI(e,t){if(ho(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 WI(e,t){ho(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 Eu(e,t,n=!0,r=1/0){return vg(e,Array.isArray(t)?t:[t],n,r)}function vg(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&&Mn(o)&&o.children.length>0&&(a.unshift(0),i.unshift(o.children))}}function GI(e,t){return t.find(e)}function _g(e,t,n=!0){const r=Array.isArray(t)?t:[t];for(let s=0;s<r.length;s++){const i=r[s];if(ft(i)&&e(i))return i;if(n&&Mn(i)&&i.children.length>0){const a=_g(e,i.children,!0);if(a)return a}}return null}function rv(e,t){return(Array.isArray(t)?t:[t]).some(n=>ft(n)&&e(n)||Mn(n)&&rv(e,n.children))}function VI(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]++];ft(i)&&e(i)&&n.push(i),Mn(i)&&i.children.length>0&&(s.unshift(0),r.unshift(i.children))}}const mf={tag_name(e){return typeof e=="function"?t=>ft(t)&&e(t.name):e==="*"?ft:t=>ft(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=>ti(t)&&e(t.data):t=>ti(t)&&t.data===e}};function Tg(e,t){return typeof t=="function"?n=>ft(n)&&t(n.attribs[e]):n=>ft(n)&&n.attribs[e]===t}function KI(e,t){return n=>e(n)||t(n)}function sv(e){const t=Object.keys(e).map(n=>{const r=e[n];return Object.prototype.hasOwnProperty.call(mf,n)?mf[n](r):Tg(n,r)});return t.length===0?null:t.reduce(KI)}function YI(e,t){const n=sv(e);return n?n(t):!0}function XI(e,t,n,r=1/0){const s=sv(e);return s?Eu(s,t,n,r):[]}function QI(e,t,n=!0){return Array.isArray(t)||(t=[t]),_g(Tg("id",e),t,n)}function qc(e,t,n=!0,r=1/0){return Eu(mf.tag_name(e),t,n,r)}function ZI(e,t,n=!0,r=1/0){return Eu(Tg("class",e),t,n,r)}function JI(e,t,n=!0,r=1/0){return Eu(mf.tag_type(e),t,n,r)}function eB(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 ys;(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"})(ys||(ys={}));function iv(e,t){const n=[],r=[];if(e===t)return 0;let s=Mn(e)?e:e.parent;for(;s;)n.unshift(s),s=s.parent;for(s=Mn(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 ys.DISCONNECTED;const o=n[a-1],c=o.children,l=n[a],u=r[a];return c.indexOf(l)>c.indexOf(u)?o===t?ys.FOLLOWING|ys.CONTAINED_BY:ys.FOLLOWING:o===e?ys.PRECEDING|ys.CONTAINS:ys.PRECEDING}function jc(e){return e=e.filter((t,n,r)=>!r.includes(t,n+1)),e.sort((t,n)=>{const r=iv(t,n);return r&ys.PRECEDING?-1:r&ys.FOLLOWING?1:0}),e}function tB(e){const t=bf(aB,e);return t?t.name==="feed"?nB(t):rB(t):null}function nB(e){var t;const n=e.children,r={type:"atom",items:qc("entry",n).map(a=>{var o;const{children:c}=a,l={media:av(c)};jr(l,"id","id",c),jr(l,"title","title",c);const u=(o=bf("link",c))===null||o===void 0?void 0:o.attribs.href;u&&(l.link=u);const f=zi("summary",c)||zi("content",c);f&&(l.description=f);const m=zi("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=zi("updated",n);return i&&(r.updated=new Date(i)),jr(r,"author","email",n,!0),r}function rB(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:qc("item",e.children).map(a=>{const{children:o}=a,c={media:av(o)};jr(c,"id","guid",o),jr(c,"title","title",o),jr(c,"link","link",o),jr(c,"description","description",o);const l=zi("pubDate",o)||zi("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=zi("lastBuildDate",r);return i&&(s.updated=new Date(i)),jr(s,"author","managingEditor",r,!0),s}const sB=["url","type","lang"],iB=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function av(e){return qc("media:content",e).map(t=>{const{attribs:n}=t,r={medium:n.medium,isDefault:!!n.isDefault};for(const s of sB)n[s]&&(r[s]=n[s]);for(const s of iB)n[s]&&(r[s]=parseInt(n[s],10));return n.expression&&(r.expression=n.expression),r})}function bf(e,t){return qc(e,t,!0,1)[0]}function zi(e,t,n=!1){return Ic(qc(e,t,n,1)).trim()}function jr(e,t,n,r,s=!1){const i=zi(n,r,s);i&&(e[t]=i)}function aB(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}const rh=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return ys},append:qI,appendChild:HI,compareDocumentPosition:iv,existsOne:rv,filter:Eu,find:vg,findAll:VI,findOne:_g,findOneChild:GI,getAttributeValue:FI,getChildren:nh,getElementById:QI,getElements:XI,getElementsByClassName:ZI,getElementsByTagName:qc,getElementsByTagType:JI,getFeed:tB,getInnerHTML:MI,getName:UI,getOuterHTML:ev,getParent:tv,getSiblings:nv,getText:xd,hasAttrib:zI,hasChildren:Mn,innerText:hf,isCDATA:Jf,isComment:eh,isDocument:ra,isTag:ft,isText:ti,nextElementSibling:Cg,prepend:WI,prependChild:jI,prevElementSibling:xg,removeElement:ho,removeSubsets:eB,replaceElement:$I,testElement:YI,textContent:Ic,uniqueSort:jc},Symbol.toStringTag,{value:"Module"})),oB={_useHtmlParser2:!1};function Pm(e,t){if(!e)return t??oB;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 ov(e,t,n){return e?e(t??e._root.children,null,void 0,n).toString():""}function cB(e,t){return typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function lB(e,t){const n=cB(e)?(t=e,void 0):e,r={...this===null||this===void 0?void 0:this._options,...Pm(t)};return ov(this,n,r)}function uB(e){const t={...this._options,xmlMode:!0};return ov(this,e,t)}function su(e){const t=e??(this?this.root():[]);let n="";for(let r=0;r<t.length;r++)n+=Ic(t[r]);return n}function dB(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 fB(){return this(this._root)}function cv(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 hB(e){return this.root().extract(e)}function mB(e,t){if(!Vy(e)||!Vy(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 Vy(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 bB=Object.freeze(Object.defineProperty({__proto__:null,contains:cv,extract:hB,html:lB,merge:mB,parseHTML:dB,root:fB,text:su,xml:uB},Symbol.toStringTag,{value:"Module"}));function yi(e){return e.cheerio!=null}function gB(e){return e.replace(/[._-](\w|$)/g,(t,n)=>n.toUpperCase())}function pB(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function Rn(e,t){const n=e.length;for(let r=0;r<n;r++)t(e[r],r);return e}var ba;(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"})(ba||(ba={}));function Nm(e){const t=e.indexOf("<");if(t<0||t>e.length-3)return!1;const n=e.charCodeAt(t+1);return(n>=ba.LowerA&&n<=ba.LowerZ||n>=ba.UpperA&&n<=ba.UpperZ||n===ba.Exclamation)&&e.includes(">",t+2)}const iu=Object.prototype.hasOwnProperty,au=/\s+/,Om="data-",Sg=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,yB=/^{[^]*}$|^\[[^]*]$/;function gf(e,t,n){var r;if(!(!e||!ft(e))){if((r=e.attribs)!==null&&r!==void 0||(e.attribs={}),!t)return e.attribs;if(iu.call(e.attribs,t))return!n&&Sg.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return su(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function Ko(e,t,n){n===null?uv(e,t):e.attribs[t]=`${n}`}function EB(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 Rn(this,(n,r)=>{ft(n)&&Ko(n,e,t.call(n,r,n.attribs[e]))})}return Rn(this,n=>{if(ft(n))if(typeof e=="object")for(const r of Object.keys(e)){const s=e[r];Ko(n,r,s)}else Ko(n,e,t)})}return arguments.length>1?this:gf(this[0],e,this.options.xmlMode)}function Ky(e,t,n){return t in e?e[t]:!n&&Sg.test(t)?gf(e,t,!1)!==void 0:gf(e,t,n)}function Hh(e,t,n,r){t in e?e[t]=n:Ko(e,t,!r&&Sg.test(t)?n?"":null:`${n}`)}function CB(e,t){var n;if(typeof e=="string"&&t===void 0){const r=this[0];if(!r||!ft(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 r.name.toUpperCase();case"href":case"src":{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 hf(r);case"textContent":return Ic(r);case"outerHTML":return this.clone().wrap("<container />").parent().html();case"innerHTML":return this.html();default:return Ky(r,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return Rn(this,(r,s)=>{ft(r)&&Hh(r,e,t.call(r,s,Ky(r,e,this.options.xmlMode)),this.options.xmlMode)})}return Rn(this,r=>{if(ft(r))if(typeof e=="object")for(const s of Object.keys(e)){const i=e[s];Hh(r,s,i,this.options.xmlMode)}else Hh(r,e,t,this.options.xmlMode)})}}function Yy(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 xB(e){for(const t of Object.keys(e.attribs)){if(!t.startsWith(Om))continue;const n=gB(t.slice(Om.length));iu.call(e.data,n)||(e.data[n]=lv(e.attribs[t]))}return e.data}function vB(e,t){const n=Om+pB(t),r=e.data;if(iu.call(r,t))return r[t];if(iu.call(e.attribs,n))return r[t]=lv(e.attribs[n])}function lv(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(yB.test(e))try{return JSON.parse(e)}catch{}return e}function _B(e,t){var n;const r=this[0];if(!r||!ft(r))return;const s=r;return(n=s.data)!==null&&n!==void 0||(s.data={}),e==null?xB(s):typeof e=="object"||t!==void 0?(Rn(this,i=>{ft(i)&&(typeof e=="object"?Yy(i,e):Yy(i,e,t))}),this):vB(s,e)}function TB(e){const t=arguments.length===0,n=this[0];if(!n||!ft(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=>su(s.children)):r.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function uv(e,t){!e.attribs||!iu.call(e.attribs,t)||delete e.attribs[t]}function pf(e){return e?e.trim().split(au):[]}function SB(e){const t=pf(e);for(const n of t)Rn(this,r=>{ft(r)&&uv(r,n)});return this}function wB(e){return this.toArray().some(t=>{const n=ft(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||au.test(n[r-1]))&&(s===n.length||au.test(n[s])))return!0}return!1})}function dv(e){if(typeof e=="function")return Rn(this,(r,s)=>{if(ft(r)){const i=r.attribs.class||"";dv.call([r],e.call(r,s,i))}});if(!e||typeof e!="string")return this;const t=e.split(au),n=this.length;for(let r=0;r<n;r++){const s=this[r];if(!ft(s))continue;const i=gf(s,"class",!1);if(i){let a=` ${i} `;for(const o of t){const c=`${o} `;a.includes(` ${c}`)||(a+=c)}Ko(s,"class",a.trim())}else Ko(s,"class",t.join(" ").trim())}return this}function fv(e){if(typeof e=="function")return Rn(this,(s,i)=>{ft(s)&&fv.call([s],e.call(s,i,s.attribs.class||""))});const t=pf(e),n=t.length,r=arguments.length===0;return Rn(this,s=>{if(ft(s))if(r)s.attribs.class="";else{const i=pf(s.attribs.class);let a=!1;for(let o=0;o<n;o++){const c=i.indexOf(t[o]);c>=0&&(i.splice(c,1),a=!0,o--)}a&&(s.attribs.class=i.join(" "))}})}function hv(e,t){if(typeof e=="function")return Rn(this,(a,o)=>{ft(a)&&hv.call([a],e.call(a,o,a.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;const n=e.split(au),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(!ft(o))continue;const c=pf(o.attribs.class);for(let l=0;l<r;l++){const u=c.indexOf(n[l]);s>=0&&u<0?c.push(n[l]):s<=0&&u>=0&&c.splice(u,1)}o.attribs.class=c.join(" ")}return this}const AB=Object.freeze(Object.defineProperty({__proto__:null,addClass:dv,attr:EB,data:_B,hasClass:wB,prop:CB,removeAttr:SB,removeClass:fv,toggleClass:hv,val:TB},Symbol.toStringTag,{value:"Module"}));var st;(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"})(st||(st={}));var Yn;(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"})(Yn||(Yn={}));const Xy=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,kB=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,RB=new Map([[126,Yn.Element],[94,Yn.Start],[36,Yn.End],[42,Yn.Any],[33,Yn.Not],[124,Yn.Hyphen]]),IB=new Set(["has","not","matches","is","where","host","host-context"]);function Ml(e){switch(e.type){case st.Adjacent:case st.Child:case st.Descendant:case st.Parent:case st.Sibling:case st.ColumnCombinator:return!0;default:return!1}}const BB=new Set(["contains","icontains"]);function PB(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 Tl(e){return e.replace(kB,PB)}function qh(e){return e===39||e===34}function Qy(e){return e===32||e===9||e===10||e===12||e===13}function sh(e){const t=[],n=mv(t,`${e}`,0);if(n<e.length)throw new Error(`Unmatched selector: ${e.slice(n)}`);return t}function mv(e,t,n){let r=[];function s(m){const h=t.slice(n+m).match(Xy);if(!h)throw new Error(`Expected name, found ${t.slice(n)}`);const[b]=h;return n+=m+b.length,Tl(b)}function i(m){for(n+=m;n<t.length&&Qy(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 Tl(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&&Ml(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function l(m){if(r.length>0&&r[r.length-1].type===st.Descendant){r[r.length-1].type=m;return}c(),r.push({type:m})}function u(m,h){r.push({type:st.Attribute,name:m,action:h,value:s(1),namespace:null,ignoreCase:"quirks"})}function f(){if(r.length&&r[r.length-1].type===st.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!==st.Descendant)&&(c(),r.push({type:st.Descendant})),i(1);break}case 62:{l(st.Child),i(1);break}case 60:{l(st.Parent),i(1);break}case 126:{l(st.Sibling),i(1);break}case 43:{l(st.Adjacent),i(1);break}case 46:{u("class",Yn.Element);break}case 35:{u("id",Yn.Equals);break}case 91:{i(1);let h,b=null;t.charCodeAt(n)===124?h=s(1):t.startsWith("*|",n)?(b="*",h=s(2)):(h=s(0),t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==61&&(b=h,h=s(1))),i(0);let p=Yn.Exists;const E=RB.get(t.charCodeAt(n));if(E){if(p=E,t.charCodeAt(n+1)!==61)throw new Error("Expected `=`");i(2)}else t.charCodeAt(n)===61&&(p=Yn.Equals,i(1));let g="",y=null;if(p!=="exists"){if(qh(t.charCodeAt(n))){const S=t.charCodeAt(n);let C=n+1;for(;C<t.length&&(t.charCodeAt(C)!==S||o(C));)C+=1;if(t.charCodeAt(C)!==S)throw new Error("Attribute value didn't end");g=Tl(t.slice(n+1,C)),n=C+1}else{const S=n;for(;n<t.length&&(!Qy(t.charCodeAt(n))&&t.charCodeAt(n)!==93||o(n));)n+=1;g=Tl(t.slice(S,n))}i(0);const x=t.charCodeAt(n)|32;x===115?(y=!1,i(1)):x===105&&(y=!0,i(1))}if(t.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const w={type:st.Attribute,name:h,action:p,value:g,namespace:b,ignoreCase:y};r.push(w);break}case 58:{if(t.charCodeAt(n+1)===58){r.push({type:st.PseudoElement,name:s(2).toLowerCase(),data:t.charCodeAt(n)===40?a():null});continue}const h=s(1).toLowerCase();let b=null;if(t.charCodeAt(n)===40)if(IB.has(h)){if(qh(t.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${h} cannot be quoted`);if(b=[],n=mv(b,t,n+1),t.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${h} (${t})`);n+=1}else{if(b=a(),BB.has(h)){const p=b.charCodeAt(0);p===b.charCodeAt(b.length-1)&&qh(p)&&(b=b.slice(1,-1))}b=Tl(b)}r.push({type:st.Pseudo,name:h,data:b});break}case 44:{f(),r=[],i(1);break}default:{if(t.startsWith("/*",n)){const p=t.indexOf("*/",n+2);if(p<0)throw new Error("Comment was not terminated");n=p+2,r.length===0&&i(0);break}let h=null,b;if(m===42)n+=1,b="*";else if(m===124){if(b="",t.charCodeAt(n+1)===124){l(st.ColumnCombinator),i(2);break}}else if(Xy.test(t.slice(n)))b=s(0);else break e;t.charCodeAt(n)===124&&t.charCodeAt(n+1)!==124&&(h=b,t.charCodeAt(n+1)===42?(b="*",n+=2):b=s(1)),r.push(b==="*"?{type:st.Universal,namespace:h}:{type:st.Tag,name:b,namespace:h})}}}return f(),n}var Yu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jh,Zy;function NB(){return Zy||(Zy=1,jh={trueFunc:function(){return!0},falseFunc:function(){return!1}}),jh}var yf=NB();const wt=bv(yf),gv=new Map([[st.Universal,50],[st.Tag,30],[st.Attribute,1],[st.Pseudo,0]]);function wg(e){return!gv.has(e.type)}const OB=new Map([[Yn.Exists,10],[Yn.Equals,8],[Yn.Not,7],[Yn.Start,6],[Yn.End,6],[Yn.Any,5]]);function DB(e){const t=e.map(pv);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 pv(e){var t,n;let r=(t=gv.get(e.type))!==null&&t!==void 0?t:-1;return e.type===st.Attribute?(r=(n=OB.get(e.action))!==null&&n!==void 0?n:4,e.action===Yn.Equals&&e.name==="id"&&(r=9),e.ignoreCase&&(r>>=1)):e.type===st.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(pv)))),r<0&&(r=0)):r=2:r=3),r}const LB=/[-[\]{}()*+?.,\\^$|#\s]/g;function Jy(e){return e.replace(LB,"\\$&")}const MB=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 ua(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&MB.has(e.name)}const FB={equals(e,t,n){const{adapter:r}=n,{name:s}=t;let{value:i}=t;return ua(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 ua(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 wt.falseFunc;const a=new RegExp(`(?:^|\\s)${Jy(i)}(?:$|\\s)`,ua(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?wt.falseFunc:ua(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?wt.falseFunc:ua(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 wt.falseFunc;if(ua(t,n)){const a=new RegExp(Jy(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):ua(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)}},zB=new Set([9,10,12,13,32]),e1=48,UB=57;function $B(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)>=e1&&e.charCodeAt(t)<=UB;)l=l*10+(e.charCodeAt(t)-e1),t++;return t===c?null:l}function o(){for(;t<e.length&&zB.has(e.charCodeAt(t));)t++}}function HB(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return wt.falseFunc;if(t===-1)return i=>i<=n;if(t===0)return i=>i===n;if(t===1)return n<0?wt.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 Xu(e){return HB($B(e))}function Qu(e,t){return n=>{const r=t.getParent(n);return r!=null&&t.isTag(r)&&e(n)}}const Dm={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=Xu(t);return s===wt.falseFunc?wt.falseFunc:s===wt.trueFunc?Qu(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=Xu(t);return s===wt.falseFunc?wt.falseFunc:s===wt.trueFunc?Qu(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=Xu(t);return s===wt.falseFunc?wt.falseFunc:s===wt.trueFunc?Qu(e,n):function(a){const o=n.getSiblings(a);let c=0;for(let l=0;l<o.length;l++){const u=o[l];if(r(a,u))break;n.isTag(u)&&n.getName(u)===n.getName(a)&&c++}return s(c)&&e(a)}},"nth-last-of-type"(e,t,{adapter:n,equals:r}){const s=Xu(t);return s===wt.falseFunc?wt.falseFunc:s===wt.trueFunc?Qu(e,n):function(a){const o=n.getSiblings(a);let c=0;for(let l=o.length-1;l>=0;l--){const u=o[l];if(r(a,u))break;n.isTag(u)&&n.getName(u)===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?Dm.root(e,t,n):r.length===1?i=>s(r[0],i)&&e(i):i=>r.includes(i)&&e(i)},hover:Wh("isHovered"),visited:Wh("isVisited"),active:Wh("isActive")};function Wh(e){return function(n,r,{adapter:s}){const i=s[e];return typeof i!="function"?wt.falseFunc:function(o){return i(o)&&n(o)}}}const t1={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 n1(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 qB={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is(
1529
+ :is(button, input, select, textarea, optgroup, option)[disabled],
1530
+ optgroup[disabled] > option,
1531
+ fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
1532
+ )`,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])"},yv={};function jB(e,t){return e===wt.falseFunc?wt.falseFunc:n=>t.isTag(n)&&e(n)}function Ev(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 Lm(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 Gh=(e,t,n,r,s)=>{const i=s(t,Lm(n),r);return i===wt.trueFunc?e:i===wt.falseFunc?wt.falseFunc:a=>i(a)&&e(a)},Vh={is:Gh,matches:Gh,where:Gh,not(e,t,n,r,s){const i=s(t,Lm(n),r);return i===wt.falseFunc?e:i===wt.trueFunc?wt.falseFunc:a=>!i(a)&&e(a)},has(e,t,n,r,s){const{adapter:i}=n,a=Lm(n);a.relativeSelector=!0;const o=t.some(u=>u.some(wg))?[yv]:void 0,c=s(t,a,o);if(c===wt.falseFunc)return wt.falseFunc;const l=jB(c,i);if(o&&c!==wt.trueFunc){const{shouldTestNextSiblings:u=!1}=c;return f=>{if(!e(f))return!1;o[0]=f;const m=i.getChildren(f),h=u?[...m,...Ev(f,i)]:m;return i.existsOne(l,h)}}return u=>e(u)&&i.existsOne(l,i.getChildren(u))}};function WB(e,t,n,r,s){var i;const{name:a,data:o}=t;if(Array.isArray(o)){if(!(a in Vh))throw new Error(`Unknown pseudo-class :${a}(${o})`);return Vh[a](e,o,n,r,s)}const c=(i=n.pseudos)===null||i===void 0?void 0:i[a],l=typeof c=="string"?c:qB[a];if(typeof l=="string"){if(o!=null)throw new Error(`Pseudo ${a} doesn't have any arguments`);const u=sh(l);return Vh.is(e,u,n,r,s)}if(typeof c=="function")return n1(c,a,o,1),u=>c(u,o)&&e(u);if(a in Dm)return Dm[a](e,o,n,r);if(a in t1){const u=t1[a];return n1(u,a,o,2),f=>u(f,n,o)&&e(f)}throw new Error(`Unknown pseudo-class :${a}`)}function Kh(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function GB(e,t,n,r,s){const{adapter:i,equals:a}=n;switch(t.type){case st.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case st.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case st.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()),FB[t.action](e,t,n)}case st.Pseudo:return WB(e,t,n,r,s);case st.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 st.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(l){let u=l;for(;u=Kh(u,i);)if(e(u))return!0;return!1};const o=new WeakSet;return function(l){let u=l;for(;u=Kh(u,i);)if(!o.has(u)){if(i.isTag(u)&&e(u))return!0;o.add(u)}return!1}}case"_flexibleDescendant":return function(c){let l=c;do if(e(l))return!0;while(l=Kh(l,i));return!1};case st.Parent:return function(c){return i.getChildren(c).some(l=>i.isTag(l)&&e(l))};case st.Child:return function(c){const l=i.getParent(c);return l!=null&&i.isTag(l)&&e(l)};case st.Sibling:return function(c){const l=i.getSiblings(c);for(let u=0;u<l.length;u++){const f=l[u];if(a(c,f))break;if(i.isTag(f)&&e(f))return!0}return!1};case st.Adjacent:return i.prevElementSibling?function(c){const l=i.prevElementSibling(c);return l!=null&&e(l)}:function(c){const l=i.getSiblings(c);let u;for(let f=0;f<l.length;f++){const m=l[f];if(a(c,m))break;i.isTag(m)&&(u=m)}return!!u&&e(u)};case st.Universal:{if(t.namespace!=null&&t.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return e}}}function Cv(e){return e.type===st.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(Cv)))}const VB={type:st.Descendant},KB={type:"_flexibleDescendant"},YB={type:st.Pseudo,name:"scope",data:null};function XB(e,{adapter:t},n){const r=!!(n!=null&&n.every(s=>{const i=t.isTag(s)&&t.getParent(s);return s===yv||i&&t.isTag(i)}));for(const s of e){if(!(s.length>0&&wg(s[0])&&s[0].type!==st.Descendant))if(r&&!s.some(Cv))s.unshift(VB);else continue;s.unshift(YB)}}function xv(e,t,n){var r;e.forEach(DB),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)XB(e,t,i);else if(e.some(c=>c.length>0&&wg(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,u]=c;l.type!==st.Pseudo||l.name!=="scope"||(s&&u.type===st.Descendant?c[1]=KB:(u.type===st.Adjacent||u.type===st.Sibling)&&(a=!0))}return QB(c,t,i)}).reduce(ZB,wt.falseFunc);return o.shouldTestNextSiblings=a,o}function QB(e,t,n){var r;return e.reduce((s,i)=>s===wt.falseFunc?wt.falseFunc:GB(s,i,t,n,xv),(r=t.rootFunc)!==null&&r!==void 0?r:wt.trueFunc)}function ZB(e,t){return t===wt.falseFunc||e===wt.trueFunc?e:e===wt.falseFunc||t===wt.trueFunc?t:function(r){return e(r)||t(r)}}const vv=(e,t)=>e===t,JB={adapter:rh,equals:vv};function e6(e){var t,n,r,s;const i=e??JB;return(t=i.adapter)!==null&&t!==void 0||(i.adapter=rh),(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:vv),i}function t6(e){return function(n,r,s){const i=e6(r);return e(n,i,s)}}const Ag=t6(xv);function _v(e,t,n=!1){return n&&(e=n6(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function n6(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let s=0;s<r;s++){const i=Ev(n[s],t);n.push(...i)}return n}const r6=new Set(["first","last","eq","gt","nth","lt","even","odd"]);function Ef(e){return e.type!=="pseudo"?!1:r6.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(Ef)):!1}function s6(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 i6(e){for(;e.parent;)e=e.parent;return e}function kg(e){const t=[],n=[];for(const r of e)r.some(Ef)?t.push(r):n.push(r);return[n,t]}const a6={type:st.Universal,namespace:null},o6={type:st.Pseudo,name:"scope",data:null};function Tv(e,t,n={}){return Sv([e],t,n)}function Sv(e,t,n={}){if(typeof t=="function")return e.some(t);const[r,s]=kg(sh(t));return r.length>0&&e.some(Ag(r,n))||s.some(i=>kv(i,e,n).length>0)}function c6(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(Av(n,t,r));return t.filter(a=>!i.has(a))}}}function wv(e,t,n={}){return Av(sh(e),t,n)}function Av(e,t,n){if(t.length===0)return[];const[r,s]=kg(e);let i;if(r.length){const a=Fm(t,r,n);if(s.length===0)return a;a.length&&(i=new Set(a))}for(let a=0;a<s.length&&(i==null?void 0:i.size)!==t.length;a++){const o=s[a];if((i?t.filter(u=>ft(u)&&!i.has(u)):t).length===0)break;const l=kv(o,t,n);if(l.length)if(i)l.forEach(u=>i.add(u));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 kv(e,t,n){var r;if(e.some(Ml)){const s=(r=n.root)!==null&&r!==void 0?r:i6(t[0]),i={...n,context:t,relativeSelector:!1};return e.push(o6),Cf(s,e,i,!0,t.length)}return Cf(t,e,n,!1,t.length)}function l6(e,t,n={},r=1/0){if(typeof e=="function")return Rv(t,e);const[s,i]=kg(sh(e)),a=i.map(o=>Cf(t,o,n,!0,r));return s.length&&a.push(Mm(t,s,n,r)),a.length===0?[]:a.length===1?a[0]:jc(a.reduce((o,c)=>[...o,...c]))}function Cf(e,t,n,r,s){const i=t.findIndex(Ef),a=t.slice(0,i),o=t[i],c=t.length-1===i?s:1/0,l=s6(o.name,o.data,c);if(l===0)return[];const f=(a.length===0&&!Array.isArray(e)?nh(e).filter(ft):a.length===0?(Array.isArray(e)?e:[e]).filter(ft):r||a.some(Ml)?Mm(e,[a],n,l):Fm(e,[a],n)).slice(0,l);let m=c6(o.name,f,o.data,n);if(m.length===0||t.length===i+1)return m;const h=t.slice(i+1),b=h.some(Ml);if(b){if(Ml(h[0])){const{type:p}=h[0];(p===st.Sibling||p===st.Adjacent)&&(m=_v(m,rh,!0)),h.unshift(a6)}n={...n,relativeSelector:!1,rootFunc:p=>m.includes(p)}}else n.rootFunc&&n.rootFunc!==yf.trueFunc&&(n={...n,rootFunc:yf.trueFunc});return h.some(Ef)?Cf(m,h,n,!1,s):b?Mm(m,[h],n,s):Fm(m,[h],n)}function Mm(e,t,n,r){const s=Ag(t,n,e);return Rv(e,s,r)}function Rv(e,t,n=1/0){const r=_v(e,rh,t.shouldTestNextSiblings);return vg(s=>ft(s)&&t(s),r,!0,n)}function Fm(e,t,n){const r=(Array.isArray(e)?e:[e]).filter(ft);if(r.length===0)return r;const s=Ag(t,n);return s===yf.trueFunc?r:r.filter(s)}const u6=/^\s*[+~]/;function d6(e){if(!e)return this._make([]);if(typeof e!="string"){const t=yi(e)?e.toArray():[e],n=this.toArray();return this._make(t.filter(r=>n.some(s=>cv(s,r))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function f6(e,t){var n;const r=this.toArray(),s=u6.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(l6(e,s,i,t))}function Rg(e){return function(t,...n){return function(r){var s;let i=e(t,this);return r&&(i=Pg(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 Cu=Rg((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}),Ig=Rg((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 Bg(e,...t){let n=null;const r=Rg((s,i)=>{const a=[];return Rn(i,o=>{for(let c;(c=s(o))&&!(n!=null&&n(c,a.length));o=c)a.push(c)}),a})(e,...t);return function(s,i){n=typeof s=="string"?o=>Tv(o,s,this.options):s?xu(s):null;const a=r.call(this,i);return n=null,a}}function Wc(e){return e.length>1?Array.from(new Set(e)):e}const h6=Ig(({parent:e})=>e&&!ra(e)?e:null,Wc),m6=Cu(e=>{const t=[];for(;e.parent&&!ra(e.parent);)t.push(e.parent),e=e.parent;return t},jc,e=>e.reverse()),b6=Bg(({parent:e})=>e&&!ra(e)?e:null,jc,e=>e.reverse());function g6(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=>Tv(i,e,r):xu(e);return Rn(this,i=>{for(i&&!ra(i)&&!ft(i)&&(i=i.parent);i&&ft(i);){if(s(i,0)){n.includes(i)||n.push(i);break}i=i.parent}}),this._make(n)}const p6=Ig(e=>Cg(e)),y6=Cu(e=>{const t=[];for(;e.next;)e=e.next,ft(e)&&t.push(e);return t},Wc),E6=Bg(e=>Cg(e),Wc),C6=Ig(e=>xg(e)),x6=Cu(e=>{const t=[];for(;e.prev;)e=e.prev,ft(e)&&t.push(e);return t},Wc),v6=Bg(e=>xg(e),Wc),_6=Cu(e=>nv(e).filter(t=>ft(t)&&t!==e),jc),T6=Cu(e=>nh(e).filter(ft),Wc);function S6(){const e=this.toArray().reduce((t,n)=>Mn(n)?t.concat(n.children):t,[]);return this._make(e)}function w6(e){let t=0;const n=this.length;for(;t<n&&e.call(this[t],t,this[t])!==!1;)++t;return this}function A6(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 xu(e){return typeof e=="function"?(t,n)=>e.call(t,n,t):yi(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function k6(e){var t;return this._make(Pg(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function Pg(e,t,n,r){return typeof t=="string"?wv(t,e,{xmlMode:n,root:r}):e.filter(xu(t))}function R6(e){const t=this.toArray();return typeof e=="string"?Sv(t.filter(ft),e,this.options):e?t.some(xu(e)):!1}function I6(e){let t=this.toArray();if(typeof e=="string"){const n=new Set(wv(e,t,this.options));t=t.filter(r=>!n.has(r))}else{const n=xu(e);t=t.filter((r,s)=>!n(r,s))}return this._make(t)}function B6(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,n)=>this._make(n).find(e).length>0)}function P6(){return this.length>1?this._make(this[0]):this}function N6(){return this.length>0?this._make(this[this.length-1]):this}function O6(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 D6(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function L6(){return Array.prototype.slice.call(this)}function M6(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=yi(e)?e[0]:e),Array.prototype.indexOf.call(t,n)}function F6(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function z6(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function U6(e,t){const n=this._make(e,t),r=jc([...this.get(),...n.get()]);return this._make(r)}function $6(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}const H6=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector:f6,add:U6,addBack:$6,children:T6,closest:g6,contents:S6,each:w6,end:z6,eq:O6,filter:k6,filterArray:Pg,find:d6,first:P6,get:D6,has:B6,index:M6,is:R6,last:N6,map:A6,next:p6,nextAll:y6,nextUntil:E6,not:I6,parent:h6,parents:m6,parentsUntil:b6,prev:C6,prevAll:x6,prevUntil:v6,siblings:_6,slice:F6,toArray:L6},Symbol.toStringTag,{value:"Module"}));function q6(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)&&ra(a))return a;const o=new ro([]);return so(a,o),o}}function so(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&&ho(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 j6(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?ru(s,!0):s);continue}}n.push(...this._makeDomArray(s,t))}return n}return[t?ru(e,!0):e]}function Iv(e){return function(...t){const n=this.length-1;return Rn(this,(r,s)=>{if(!Mn(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 sa(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 u=0;u<r.length;++u){const f=r[u],m=f.parent;if(m){const b=m.children.indexOf(f);b>-1&&(m.children.splice(b,1),s===m&&t>b&&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=u===0?c:r[u-1],f.next=u===r.length-1?l:r[u+1]}return c&&(c.next=r[0]),l&&(l.prev=r[r.length-1]),e.splice(...o)}function W6(e){return(yi(e)?e:this._make(e)).append(this),this}function G6(e){return(yi(e)?e:this._make(e)).prepend(this),this}const V6=Iv((e,t,n)=>{sa(t,t.length,0,e,n)}),K6=Iv((e,t,n)=>{sa(t,0,0,e,n)});function Bv(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"&&!Nm(t)?r.find(t).clone():t,[o]=this._makeDomArray(a,s<n);if(!o||!Mn(o))continue;let c=o,l=0;for(;l<c.children.length;){const u=c.children[l];ft(u)?(c=u,l=0):l++}e(i,c,[o])}return this}}const Y6=Bv((e,t,n)=>{const{parent:r}=e;if(!r)return;const s=r.children,i=s.indexOf(e);so([e],t),sa(s,i,0,n,r)}),X6=Bv((e,t,n)=>{Mn(e)&&(so(e.children,t),so(n,e))});function Q6(e){return this.parent(e).not("body").each((t,n)=>{this._make(n).replaceWith(n.children)}),this}function Z6(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==="tag"&&(r=n[i]);let s=0;for(;r&&s<r.children.length;){const i=r.children[s];i.type==="tag"?(r=i,s=0):s++}r&&this._make(r).append(this)}return this}function J6(...e){const t=this.length-1;return Rn(this,(n,r)=>{if(!Mn(n)||!n.parent)return;const s=n.parent.children,i=s.indexOf(n);if(i<0)return;const a=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,o=this._makeDomArray(a,r<t);sa(s,i+1,0,o,n.parent)})}function eP(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<0||(sa(i,a+1,0,r,s),t.push(...r))}return this._make(t)}function tP(...e){const t=this.length-1;return Rn(this,(n,r)=>{if(!Mn(n)||!n.parent)return;const s=n.parent.children,i=s.indexOf(n);if(i<0)return;const a=typeof e[0]=="function"?e[0].call(n,r,this._render(n.children)):e,o=this._makeDomArray(a,r<t);sa(s,i,0,o,n.parent)})}function nP(e){const t=this._make(e);this.remove();const n=[];return Rn(t,r=>{const s=this.clone().toArray(),{parent:i}=r;if(!i)return;const a=i.children,o=a.indexOf(r);o<0||(sa(a,o,0,s,i),n.push(...s))}),this._make(n)}function rP(e){const t=e?this.filter(e):this;return Rn(t,n=>{ho(n),n.prev=n.next=n.parent=null}),this}function sP(e){return Rn(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);so(a,null);const o=s.indexOf(t);sa(s,o,1,a,r),a.includes(t)||(t.parent=t.prev=t.next=null)})}function iP(){return Rn(this,e=>{if(Mn(e)){for(const t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function aP(e){if(e===void 0){const t=this[0];return!t||!Mn(t)?null:this._render(t.children)}return Rn(this,t=>{if(!Mn(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=yi(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;so(n,t)})}function oP(){return this._render(this)}function cP(e){return e===void 0?su(this):typeof e=="function"?Rn(this,(t,n)=>this._make(t).text(e.call(t,n,su([t])))):Rn(this,t=>{if(!Mn(t))return;for(const r of t.children)r.next=r.prev=r.parent=null;const n=new nu(`${e}`);so(n,t)})}function lP(){const e=Array.prototype.map.call(this.get(),n=>ru(n,!0)),t=new ro(e);for(const n of e)n.parent=t;return this._make(e)}const uP=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray:j6,after:J6,append:V6,appendTo:W6,before:tP,clone:lP,empty:iP,html:aP,insertAfter:eP,insertBefore:nP,prepend:K6,prependTo:G6,remove:rP,replaceWith:sP,text:cP,toString:oP,unwrap:Q6,wrap:Y6,wrapAll:Z6,wrapInner:X6},Symbol.toStringTag,{value:"Module"}));function dP(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return Rn(this,(n,r)=>{ft(n)&&Pv(n,e,t,r)});if(this.length!==0)return Nv(this[0],e)}function Pv(e,t,n,r){if(typeof t=="string"){const s=Nv(e),i=typeof n=="function"?n.call(e,r,s[t]):n;i===""?delete s[t]:i!=null&&(s[t]=i),e.attribs.style=fP(s)}else if(typeof t=="object"){const s=Object.keys(t);for(let i=0;i<s.length;i++){const a=s[i];Pv(e,a,t[a],i)}}}function Nv(e,t){if(!e||!ft(e))return;const n=hP(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 fP(e){return Object.keys(e).reduce((t,n)=>`${t}${t?" ":""}${n}: ${e[n]};`,"")}function hP(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 mP=Object.freeze(Object.defineProperty({__proto__:null,css:dP},Symbol.toStringTag,{value:"Module"})),r1="input,select,textarea,keygen",bP=/%20/g,s1=/\r?\n/g;function gP(){return this.serializeArray().map(n=>`${encodeURIComponent(n.name)}=${encodeURIComponent(n.value)}`).join("&").replace(bP,"+")}function pP(){return this.map((e,t)=>{const n=this._make(t);return ft(t)&&t.name==="form"?n.find(r1).toArray():n.filter(r1).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(s1,`\r
1533
+ `)})):{name:s,value:i.replace(s1,`\r
1534
+ `)}}).toArray()}const yP=Object.freeze(Object.defineProperty({__proto__:null,serialize:gP,serializeArray:pP},Symbol.toStringTag,{value:"Module"}));function EP(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 CP(e){const t={};for(const n in e){const r=e[n],s=Array.isArray(r),{selector:i,value:a}=EP(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 xP=Object.freeze(Object.defineProperty({__proto__:null,extract:CP},Symbol.toStringTag,{value:"Module"}));class vu{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}}}vu.prototype.cheerio="[cheerio object]";vu.prototype.splice=Array.prototype.splice;vu.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator];Object.assign(vu.prototype,AB,H6,uP,mP,yP,xP);function vP(e,t){return function n(r,s,i=!0){if(r==null)throw new Error("cheerio.load() expects a string");const a=Pm(s),o=e(r,a,i,null);class c extends vu{_make(f,m){const h=l(f,m);return h.prevObject=this,h}_parse(f,m,h,b){return e(f,m,h,b)}_render(f){return t(f,this.options)}}function l(u,f,m=o,h){if(u&&yi(u))return u;const b=Pm(h,a),p=typeof m=="string"?[e(m,b,!1,null)]:"length"in m?m:[m],E=yi(p)?p:new c(p,null,b);if(E._root=E,!u)return new c(void 0,E,b);const g=typeof u=="string"&&Nm(u)?e(u,b,!1,null).children:_P(u)?[u]:Array.isArray(u)?u:void 0,y=new c(g,E,b);if(g)return y;if(typeof u!="string")throw new TypeError("Unexpected type of selector");let w=u;const x=f?typeof f=="string"?Nm(f)?new c([e(f,b,!1,null)],E,b):(w=`${f} ${w}`,E):yi(f)?f:new c(Array.isArray(f)?f:[f],E,b):E;return x?x.find(w):y}return Object.assign(l,bB,{load:n,_root:o,_options:a,fn:c.prototype,prototype:c.prototype}),l}}function _P(e){return!!e.name||e.type==="root"||e.type==="text"||e.type==="comment"}const TP=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]),Sn="�";var B;(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"})(B||(B={}));const qr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Ov(e){return e>=55296&&e<=57343}function SP(e){return e>=56320&&e<=57343}function wP(e,t){return(e-55296)*1024+9216+t}function Dv(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Lv(e){return e>=64976&&e<=65007||TP.has(e)}var se;(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"})(se||(se={}));const AP=65536;class kP{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=AP,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(SP(n))return this.pos++,this._addGap(),wP(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,B.EOF;return this._err(se.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,B.EOF;const r=this.html.charCodeAt(n);return r===B.CARRIAGE_RETURN?B.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,B.EOF;let t=this.html.charCodeAt(this.pos);return t===B.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,B.LINE_FEED):t===B.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Ov(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===B.LINE_FEED||t===B.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Dv(t)?this._err(se.controlCharacterInInputStream):Lv(t)&&this._err(se.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Lt;(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"})(Lt||(Lt={}));function Mv(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 be;(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/"})(be||(be={}));var Sa;(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"})(Sa||(Sa={}));var is;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(is||(is={}));var X;(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"})(X||(X={}));var d;(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"})(d||(d={}));const RP=new Map([[X.A,d.A],[X.ADDRESS,d.ADDRESS],[X.ANNOTATION_XML,d.ANNOTATION_XML],[X.APPLET,d.APPLET],[X.AREA,d.AREA],[X.ARTICLE,d.ARTICLE],[X.ASIDE,d.ASIDE],[X.B,d.B],[X.BASE,d.BASE],[X.BASEFONT,d.BASEFONT],[X.BGSOUND,d.BGSOUND],[X.BIG,d.BIG],[X.BLOCKQUOTE,d.BLOCKQUOTE],[X.BODY,d.BODY],[X.BR,d.BR],[X.BUTTON,d.BUTTON],[X.CAPTION,d.CAPTION],[X.CENTER,d.CENTER],[X.CODE,d.CODE],[X.COL,d.COL],[X.COLGROUP,d.COLGROUP],[X.DD,d.DD],[X.DESC,d.DESC],[X.DETAILS,d.DETAILS],[X.DIALOG,d.DIALOG],[X.DIR,d.DIR],[X.DIV,d.DIV],[X.DL,d.DL],[X.DT,d.DT],[X.EM,d.EM],[X.EMBED,d.EMBED],[X.FIELDSET,d.FIELDSET],[X.FIGCAPTION,d.FIGCAPTION],[X.FIGURE,d.FIGURE],[X.FONT,d.FONT],[X.FOOTER,d.FOOTER],[X.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[X.FORM,d.FORM],[X.FRAME,d.FRAME],[X.FRAMESET,d.FRAMESET],[X.H1,d.H1],[X.H2,d.H2],[X.H3,d.H3],[X.H4,d.H4],[X.H5,d.H5],[X.H6,d.H6],[X.HEAD,d.HEAD],[X.HEADER,d.HEADER],[X.HGROUP,d.HGROUP],[X.HR,d.HR],[X.HTML,d.HTML],[X.I,d.I],[X.IMG,d.IMG],[X.IMAGE,d.IMAGE],[X.INPUT,d.INPUT],[X.IFRAME,d.IFRAME],[X.KEYGEN,d.KEYGEN],[X.LABEL,d.LABEL],[X.LI,d.LI],[X.LINK,d.LINK],[X.LISTING,d.LISTING],[X.MAIN,d.MAIN],[X.MALIGNMARK,d.MALIGNMARK],[X.MARQUEE,d.MARQUEE],[X.MATH,d.MATH],[X.MENU,d.MENU],[X.META,d.META],[X.MGLYPH,d.MGLYPH],[X.MI,d.MI],[X.MO,d.MO],[X.MN,d.MN],[X.MS,d.MS],[X.MTEXT,d.MTEXT],[X.NAV,d.NAV],[X.NOBR,d.NOBR],[X.NOFRAMES,d.NOFRAMES],[X.NOEMBED,d.NOEMBED],[X.NOSCRIPT,d.NOSCRIPT],[X.OBJECT,d.OBJECT],[X.OL,d.OL],[X.OPTGROUP,d.OPTGROUP],[X.OPTION,d.OPTION],[X.P,d.P],[X.PARAM,d.PARAM],[X.PLAINTEXT,d.PLAINTEXT],[X.PRE,d.PRE],[X.RB,d.RB],[X.RP,d.RP],[X.RT,d.RT],[X.RTC,d.RTC],[X.RUBY,d.RUBY],[X.S,d.S],[X.SCRIPT,d.SCRIPT],[X.SEARCH,d.SEARCH],[X.SECTION,d.SECTION],[X.SELECT,d.SELECT],[X.SOURCE,d.SOURCE],[X.SMALL,d.SMALL],[X.SPAN,d.SPAN],[X.STRIKE,d.STRIKE],[X.STRONG,d.STRONG],[X.STYLE,d.STYLE],[X.SUB,d.SUB],[X.SUMMARY,d.SUMMARY],[X.SUP,d.SUP],[X.TABLE,d.TABLE],[X.TBODY,d.TBODY],[X.TEMPLATE,d.TEMPLATE],[X.TEXTAREA,d.TEXTAREA],[X.TFOOT,d.TFOOT],[X.TD,d.TD],[X.TH,d.TH],[X.THEAD,d.THEAD],[X.TITLE,d.TITLE],[X.TR,d.TR],[X.TRACK,d.TRACK],[X.TT,d.TT],[X.U,d.U],[X.UL,d.UL],[X.SVG,d.SVG],[X.VAR,d.VAR],[X.WBR,d.WBR],[X.XMP,d.XMP]]);function ih(e){var t;return(t=RP.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const ke=d,IP={[be.HTML]:new Set([ke.ADDRESS,ke.APPLET,ke.AREA,ke.ARTICLE,ke.ASIDE,ke.BASE,ke.BASEFONT,ke.BGSOUND,ke.BLOCKQUOTE,ke.BODY,ke.BR,ke.BUTTON,ke.CAPTION,ke.CENTER,ke.COL,ke.COLGROUP,ke.DD,ke.DETAILS,ke.DIR,ke.DIV,ke.DL,ke.DT,ke.EMBED,ke.FIELDSET,ke.FIGCAPTION,ke.FIGURE,ke.FOOTER,ke.FORM,ke.FRAME,ke.FRAMESET,ke.H1,ke.H2,ke.H3,ke.H4,ke.H5,ke.H6,ke.HEAD,ke.HEADER,ke.HGROUP,ke.HR,ke.HTML,ke.IFRAME,ke.IMG,ke.INPUT,ke.LI,ke.LINK,ke.LISTING,ke.MAIN,ke.MARQUEE,ke.MENU,ke.META,ke.NAV,ke.NOEMBED,ke.NOFRAMES,ke.NOSCRIPT,ke.OBJECT,ke.OL,ke.P,ke.PARAM,ke.PLAINTEXT,ke.PRE,ke.SCRIPT,ke.SECTION,ke.SELECT,ke.SOURCE,ke.STYLE,ke.SUMMARY,ke.TABLE,ke.TBODY,ke.TD,ke.TEMPLATE,ke.TEXTAREA,ke.TFOOT,ke.TH,ke.THEAD,ke.TITLE,ke.TR,ke.TRACK,ke.UL,ke.WBR,ke.XMP]),[be.MATHML]:new Set([ke.MI,ke.MO,ke.MN,ke.MS,ke.MTEXT,ke.ANNOTATION_XML]),[be.SVG]:new Set([ke.TITLE,ke.FOREIGN_OBJECT,ke.DESC]),[be.XLINK]:new Set,[be.XML]:new Set,[be.XMLNS]:new Set},zm=new Set([ke.H1,ke.H2,ke.H3,ke.H4,ke.H5,ke.H6]),BP=new Set([X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT]);function PP(e,t){return BP.has(e)||t&&e===X.NOSCRIPT}var O;(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"})(O||(O={}));const Wr={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function NP(e){return e>=B.DIGIT_0&&e<=B.DIGIT_9}function Nl(e){return e>=B.LATIN_CAPITAL_A&&e<=B.LATIN_CAPITAL_Z}function OP(e){return e>=B.LATIN_SMALL_A&&e<=B.LATIN_SMALL_Z}function Oi(e){return OP(e)||Nl(e)}function i1(e){return Oi(e)||NP(e)}function Zu(e){return e+32}function Fv(e){return e===B.SPACE||e===B.LINE_FEED||e===B.TABULATION||e===B.FORM_FEED}function a1(e){return Fv(e)||e===B.SOLIDUS||e===B.GREATER_THAN_SIGN}function DP(e){return e===B.NULL?se.nullCharacterReference:e>1114111?se.characterReferenceOutsideUnicodeRange:Ov(e)?se.surrogateCharacterReference:Lv(e)?se.noncharacterCharacterReference:Dv(e)||e===B.CARRIAGE_RETURN?se.controlCharacterReference:null}let LP=class{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=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new kP(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Eg(yg,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(se.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(se.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=DP(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==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||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:Lt.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Lt.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Lt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Lt.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(Mv(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(se.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=ih(t.tagName),t.type===Lt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(se.endTagWithAttributes),t.selfClosing&&this._err(se.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 Lt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Lt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Lt.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:Lt.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=Fv(t)?Lt.WHITESPACE_CHARACTER:t===B.NULL?Lt.NULL_CHARACTER:Lt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Lt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Cs.Attribute:Cs.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitCodePoint(t);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case B.AMPERSAND:{this._startCharacterReference();break}case B.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(Sn);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case B.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(Sn);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(Sn);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(Sn);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Oi(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case B.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case B.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case B.QUESTION_MARK:{this._err(se.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case B.EOF:{this._err(se.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(se.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Oi(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case B.GREATER_THAN_SIGN:{this._err(se.missingEndTagName),this.state=O.DATA;break}case B.EOF:{this._err(se.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(se.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.tagName+=Sn;break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Nl(t)?Zu(t):t)}}_stateRcdataLessThanSign(t){t===B.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Oi(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.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 B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case B.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case B.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===B.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Oi(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case B.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case B.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===B.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===B.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(Sn);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(Sn);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(Sn);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===B.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Oi(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Oi(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(qr.SCRIPT,!1)&&a1(this.preprocessor.peek(qr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this._emitChars(Sn);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Sn);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Sn);break}case B.EOF:{this._err(se.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===B.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(qr.SCRIPT,!1)&&a1(this.preprocessor.peek(qr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<qr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._err(se.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:{this._err(se.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.name+=Sn;break}default:this.currentAttr.name+=String.fromCodePoint(Nl(t)?Zu(t):t)}}_stateAfterAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case B.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case B.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.value+=Sn;break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case B.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.value+=Sn;break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(se.unexpectedNullCharacter),this.currentAttr.value+=Sn;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:case B.EQUALS_SIGN:case B.GRAVE_ACCENT:{this._err(se.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this._err(se.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case B.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(se.eofInTag),this._emitEOFToken();break}default:this._err(se.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case B.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.data+=Sn;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(qr.DASH_DASH,!0)?(this._createCommentToken(qr.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(qr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(qr.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(qr.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(se.cdataInHtmlContent),this._createCommentToken(qr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(se.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case B.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.data+=Sn;break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case B.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case B.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===B.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===B.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==B.GREATER_THAN_SIGN&&t!==B.EOF&&this._err(se.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case B.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case B.HYPHEN_MINUS:{n.data+="-";break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case B.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case B.GREATER_THAN_SIGN:{this._err(se.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case B.EOF:{this._err(se.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case B.EOF:{this._err(se.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Nl(t))this._createDoctypeToken(String.fromCharCode(Zu(t))),this.state=O.DOCTYPE_NAME;else switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.NULL:{this._err(se.unexpectedNullCharacter),this._createDoctypeToken(Sn),this.state=O.DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.EOF:{this._err(se.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=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.name+=Sn;break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Nl(t)?Zu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(qr.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(qr.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(se.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(se.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(se.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.publicId+=Sn;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.EOF:{this._err(se.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 B.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.publicId+=Sn;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.EOF:{this._err(se.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 B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case B.QUOTATION_MARK:{this._err(se.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(se.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(se.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(se.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(se.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.systemId+=Sn;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.EOF:{this._err(se.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 B.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(se.unexpectedNullCharacter),n.systemId+=Sn;break}case B.GREATER_THAN_SIGN:{this._err(se.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.EOF:{this._err(se.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 B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.EOF:{this._err(se.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(se.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case B.NULL:{this._err(se.unexpectedNullCharacter);break}case B.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case B.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case B.EOF:{this._err(se.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===B.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case B.GREATER_THAN_SIGN:{this.state=O.DATA;break}case B.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.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(B.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&i1(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){i1(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===B.SEMICOLON&&this._err(se.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}};const zv=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),o1=new Set([...zv,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),xf=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),MP=new Set([...xf,d.OL,d.UL]),FP=new Set([...xf,d.BUTTON]),c1=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),l1=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),zP=new Set([d.TR,d.TEMPLATE,d.HTML]),UP=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),$P=new Set([d.TABLE,d.TEMPLATE,d.HTML]),HP=new Set([d.TD,d.TH]);class qP{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=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===be.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.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])!==be.HTML);this.shortenToLength(n<0?0:n)}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(n<0?0:n)}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r<0?0:r)}popUntilNumberedHeaderPopped(){this.popUntilPopped(zm,be.HTML)}popUntilTableCellPopped(){this.popUntilPopped(HP,be.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($P,be.HTML)}clearBackToTableBodyContext(){this.clearBackTo(UP,be.HTML)}clearBackToTableRowContext(){this.clearBackTo(zP,be.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]===d.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]===d.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 be.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case be.SVG:{if(l1.has(s))return!1;break}case be.MATHML:{if(c1.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,xf)}hasInListItemScope(t){return this.hasInDynamicScope(t,MP)}hasInButtonScope(t){return this.hasInDynamicScope(t,FP)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case be.HTML:{if(zm.has(n))return!0;if(xf.has(n))return!1;break}case be.SVG:{if(l1.has(n))return!1;break}case be.MATHML:{if(c1.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===be.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===be.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===be.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;zv.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;o1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&o1.has(this.currentTagId);)this.pop()}}const Yh=3;var Ys;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ys||(Ys={}));const u1={type:Ys.Marker};class jP{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===Ys.Marker)break;const{element:l}=c;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===a){const u=this.treeAdapter.getAttrList(l);u.length===s&&r.push({idx:o,attrs:u})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Yh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Yh)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>=Yh&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(u1)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ys.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ys.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(u1);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ys.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ys.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ys.Element&&n.element===t)}}const bi={createDocument(){return{nodeName:"#document",mode:is.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};bi.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(bi.isTextNode(n)){n.value+=t;return}}bi.appendChild(e,bi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&bi.isTextNode(r)?r.value+=t:bi.insertBefore(e,bi.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}}},Uv="html",WP="about:legacy-compat",GP="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",$v=["+//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//"],VP=[...$v,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],KP=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Hv=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],YP=[...Hv,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function d1(e,t){return t.some(n=>e.startsWith(n))}function XP(e){return e.name===Uv&&e.publicId===null&&(e.systemId===null||e.systemId===WP)}function QP(e){if(e.name!==Uv)return is.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===GP)return is.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),KP.has(n))return is.QUIRKS;let r=t===null?VP:$v;if(d1(n,r))return is.QUIRKS;if(r=t===null?Hv:YP,d1(n,r))return is.LIMITED_QUIRKS}return is.NO_QUIRKS}const f1={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},ZP="definitionurl",JP="definitionURL",eN=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])),tN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:be.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:be.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:be.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:be.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:be.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:be.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:be.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:be.XML}],["xml:space",{prefix:"xml",name:"space",namespace:be.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:be.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:be.XMLNS}]]),nN=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])),rN=new Set([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function sN(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===Sa.COLOR||r===Sa.SIZE||r===Sa.FACE)||rN.has(t)}function qv(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===ZP){e.attrs[t].name=JP;break}}function jv(e){for(let t=0;t<e.attrs.length;t++){const n=eN.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ng(e){for(let t=0;t<e.attrs.length;t++){const n=tN.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 iN(e){const t=nN.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ih(e.tagName))}function aN(e,t){return t===be.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function oN(e,t,n){if(t===be.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Sa.ENCODING){const s=n[r].value.toLowerCase();return s===f1.TEXT_HTML||s===f1.APPLICATION_XML}}return t===be.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function cN(e,t,n,r){return(!r||r===be.HTML)&&oN(e,t,n)||(!r||r===be.MATHML)&&aN(e,t)}const lN="hidden",uN=8,dN=3;var F;(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"})(F||(F={}));const fN={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Wv=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),h1={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:bi,onParseError:null};let Gv=class{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=F.INITIAL,this.originalInsertionMode=F.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={...h1,...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 LP(this.options,this),this.activeFormattingElements=new jP(this.treeAdapter),this.fragmentContextID=r?ih(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new qP(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={...h1,...n};t??(t=r.treeAdapter.createElement(X.TEMPLATE,be.HTML,[]));const s=r.treeAdapter.createElement("documentmock",be.HTML,[]),i=new this(r,s,t);return i.fragmentContextID===d.TEMPLATE&&i.tmplInsertionModeStack.unshift(F.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:fN,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||this.treeAdapter.getNamespaceURI(t)===be.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,be.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=F.TEXT}switchToPlaintextParsing(){this.insertionMode=F.TEXT,this.originalInsertionMode=F.IN_BODY,this.tokenizer.state=Wr.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)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==be.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Wr.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Wr.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Wr.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Wr.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,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,be.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,be.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(X.HTML,be.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.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:u}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:l,endOffset:u})}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===Lt.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===d.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===be.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&!this._isIntegrationPoint(r,n,be.HTML)}_processToken(t){switch(t.type){case Lt.CHARACTER:{this.onCharacter(t);break}case Lt.NULL_CHARACTER:{this.onNullCharacter(t);break}case Lt.COMMENT:{this.onComment(t);break}case Lt.DOCTYPE:{this.onDoctype(t);break}case Lt.START_TAG:{this._processStartTag(t);break}case Lt.END_TAG:{this.onEndTag(t);break}case Lt.EOF:{this.onEof(t);break}case Lt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return cN(t,s,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Ys.Marker||this.openElements.contains(s.element)),r=n<0?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=F.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=F.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=F.IN_TABLE;return}case d.BODY:{this.insertionMode=F.IN_BODY;return}case d.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case d.HEAD:{if(t>0){this.insertionMode=F.IN_HEAD;return}break}}this.insertionMode=F.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return Wv.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&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 d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===be.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.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 IP[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){HO(this,t);return}switch(this.insertionMode){case F.INITIAL:{Sl(this,t);break}case F.BEFORE_HTML:{Fl(this,t);break}case F.BEFORE_HEAD:{zl(this,t);break}case F.IN_HEAD:{Ul(this,t);break}case F.IN_HEAD_NO_SCRIPT:{$l(this,t);break}case F.AFTER_HEAD:{Hl(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{Kv(this,t);break}case F.TEXT:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Xh(this,t);break}case F.IN_TABLE_TEXT:{e_(this,t);break}case F.IN_COLUMN_GROUP:{vf(this,t);break}case F.AFTER_BODY:{_f(this,t);break}case F.AFTER_AFTER_BODY:{vd(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){$O(this,t);return}switch(this.insertionMode){case F.INITIAL:{Sl(this,t);break}case F.BEFORE_HTML:{Fl(this,t);break}case F.BEFORE_HEAD:{zl(this,t);break}case F.IN_HEAD:{Ul(this,t);break}case F.IN_HEAD_NO_SCRIPT:{$l(this,t);break}case F.AFTER_HEAD:{Hl(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Xh(this,t);break}case F.IN_COLUMN_GROUP:{vf(this,t);break}case F.AFTER_BODY:{_f(this,t);break}case F.AFTER_AFTER_BODY:{vd(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Um(this,t);return}switch(this.insertionMode){case F.INITIAL:case F.BEFORE_HTML:case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_TEMPLATE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{Um(this,t);break}case F.IN_TABLE_TEXT:{wl(this,t);break}case F.AFTER_BODY:{EN(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{CN(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{xN(this,t);break}case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:{this._err(t,se.misplacedDoctype);break}case F.IN_TABLE_TEXT:{wl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,se.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?qO(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Sl(this,t);break}case F.BEFORE_HTML:{vN(this,t);break}case F.BEFORE_HEAD:{TN(this,t);break}case F.IN_HEAD:{Hs(this,t);break}case F.IN_HEAD_NO_SCRIPT:{AN(this,t);break}case F.AFTER_HEAD:{RN(this,t);break}case F.IN_BODY:{Ir(this,t);break}case F.IN_TABLE:{Bc(this,t);break}case F.IN_TABLE_TEXT:{wl(this,t);break}case F.IN_CAPTION:{SO(this,t);break}case F.IN_COLUMN_GROUP:{Lg(this,t);break}case F.IN_TABLE_BODY:{ch(this,t);break}case F.IN_ROW:{lh(this,t);break}case F.IN_CELL:{kO(this,t);break}case F.IN_SELECT:{r_(this,t);break}case F.IN_SELECT_IN_TABLE:{IO(this,t);break}case F.IN_TEMPLATE:{PO(this,t);break}case F.AFTER_BODY:{OO(this,t);break}case F.IN_FRAMESET:{DO(this,t);break}case F.AFTER_FRAMESET:{MO(this,t);break}case F.AFTER_AFTER_BODY:{zO(this,t);break}case F.AFTER_AFTER_FRAMESET:{UO(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?jO(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{Sl(this,t);break}case F.BEFORE_HTML:{_N(this,t);break}case F.BEFORE_HEAD:{SN(this,t);break}case F.IN_HEAD:{wN(this,t);break}case F.IN_HEAD_NO_SCRIPT:{kN(this,t);break}case F.AFTER_HEAD:{IN(this,t);break}case F.IN_BODY:{oh(this,t);break}case F.TEXT:{bO(this,t);break}case F.IN_TABLE:{ou(this,t);break}case F.IN_TABLE_TEXT:{wl(this,t);break}case F.IN_CAPTION:{wO(this,t);break}case F.IN_COLUMN_GROUP:{AO(this,t);break}case F.IN_TABLE_BODY:{$m(this,t);break}case F.IN_ROW:{n_(this,t);break}case F.IN_CELL:{RO(this,t);break}case F.IN_SELECT:{s_(this,t);break}case F.IN_SELECT_IN_TABLE:{BO(this,t);break}case F.IN_TEMPLATE:{NO(this,t);break}case F.AFTER_BODY:{a_(this,t);break}case F.IN_FRAMESET:{LO(this,t);break}case F.AFTER_FRAMESET:{FO(this,t);break}case F.AFTER_AFTER_BODY:{vd(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{Sl(this,t);break}case F.BEFORE_HTML:{Fl(this,t);break}case F.BEFORE_HEAD:{zl(this,t);break}case F.IN_HEAD:{Ul(this,t);break}case F.IN_HEAD_NO_SCRIPT:{$l(this,t);break}case F.AFTER_HEAD:{Hl(this,t);break}case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{Zv(this,t);break}case F.TEXT:{gO(this,t);break}case F.IN_TABLE_TEXT:{wl(this,t);break}case F.IN_TEMPLATE:{i_(this,t);break}case F.AFTER_BODY:case F.IN_FRAMESET:case F.AFTER_FRAMESET:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{Dg(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===B.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 F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.TEXT:case F.IN_COLUMN_GROUP:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{this._insertCharacters(t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:case F.AFTER_BODY:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{Vv(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Xh(this,t);break}case F.IN_TABLE_TEXT:{Jv(this,t);break}}}};function hN(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):Qv(e,t),n}function mN(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(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function bN(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>=dN;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=gN(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function gN(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 pN(e,t,n){const r=e.treeAdapter.getTagName(t),s=ih(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);s===d.TEMPLATE&&i===be.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function yN(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 Og(e,t){for(let n=0;n<uN;n++){const r=hN(e,t);if(!r)break;const s=mN(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const i=bN(e,s,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&pN(e,a,i),yN(e,s,r)}}function Um(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function EN(e,t){e._appendCommentNode(t,e.openElements.items[0])}function CN(e,t){e._appendCommentNode(t,e.document)}function Dg(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 xN(e,t){e._setDocumentType(t);const n=t.forceQuirks?is.QUIRKS:QP(t);XP(t)||e._err(t,se.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=F.BEFORE_HTML}function Sl(e,t){e._err(t,se.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,is.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function vN(e,t){t.tagID===d.HTML?(e._insertElement(t,be.HTML),e.insertionMode=F.BEFORE_HEAD):Fl(e,t)}function _N(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&Fl(e,t)}function Fl(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function TN(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.HEAD:{e._insertElement(t,be.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:zl(e,t)}}function SN(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?zl(e,t):e._err(t,se.endTagWithoutMatchingOpenElement)}function zl(e,t){e._insertFakeElement(X.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function Hs(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Wr.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Wr.RAWTEXT):(e._insertElement(t,be.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Wr.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Wr.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case d.HEAD:{e._err(t,se.misplacedStartTagForHeadElement);break}default:Ul(e,t)}}function wN(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{Ul(e,t);break}case d.TEMPLATE:{mo(e,t);break}default:e._err(t,se.endTagWithoutMatchingOpenElement)}}function mo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,se.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,se.endTagWithoutMatchingOpenElement)}function Ul(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function AN(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{Hs(e,t);break}case d.NOSCRIPT:{e._err(t,se.nestedNoscriptInHead);break}default:$l(e,t)}}function kN(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case d.BR:{$l(e,t);break}default:e._err(t,se.endTagWithoutMatchingOpenElement)}}function $l(e,t){const n=t.type===Lt.EOF?se.openElementsLeftAfterEof:se.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function RN(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.BODY:{e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,be.HTML),e.insertionMode=F.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,se.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),Hs(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,se.misplacedStartTagForHeadElement);break}default:Hl(e,t)}}function IN(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{Hl(e,t);break}case d.TEMPLATE:{mo(e,t);break}default:e._err(t,se.endTagWithoutMatchingOpenElement)}}function Hl(e,t){e._insertFakeElement(X.BODY,d.BODY),e.insertionMode=F.IN_BODY,ah(e,t)}function ah(e,t){switch(t.type){case Lt.CHARACTER:{Kv(e,t);break}case Lt.WHITESPACE_CHARACTER:{Vv(e,t);break}case Lt.COMMENT:{Um(e,t);break}case Lt.START_TAG:{Ir(e,t);break}case Lt.END_TAG:{oh(e,t);break}case Lt.EOF:{Zv(e,t);break}}}function Vv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Kv(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function BN(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function PN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function NN(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_FRAMESET)}function ON(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,be.HTML)}function DN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),zm.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,be.HTML)}function LN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function MN(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,be.HTML),n||(e.formElement=e.openElements.current))}function FN(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===d.LI&&s===d.LI||(n===d.DD||n===d.DT)&&(s===d.DD||s===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==d.ADDRESS&&s!==d.DIV&&s!==d.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,be.HTML)}function zN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.tokenizer.state=Wr.PLAINTEXT}function UN(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.framesetOk=!1}function $N(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Og(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qN(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(Og(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function jN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function WN(e,t){e.treeAdapter.getDocumentMode(e.document)!==is.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function Yv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,be.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Xv(e){const t=Mv(e,Sa.TYPE);return t!=null&&t.toLowerCase()===lN}function GN(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,be.HTML),Xv(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function VN(e,t){e._appendElement(t,be.HTML),t.ackSelfClosing=!0}function KN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,be.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YN(e,t){t.tagName=X.IMG,t.tagID=d.IMG,Yv(e,t)}function XN(e,t){e._insertElement(t,be.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Wr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function QN(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Wr.RAWTEXT)}function ZN(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Wr.RAWTEXT)}function m1(e,t){e._switchToTextParsing(t,Wr.RAWTEXT)}function JN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===F.IN_TABLE||e.insertionMode===F.IN_CAPTION||e.insertionMode===F.IN_TABLE_BODY||e.insertionMode===F.IN_ROW||e.insertionMode===F.IN_CELL?F.IN_SELECT_IN_TABLE:F.IN_SELECT}function eO(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML)}function tO(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,be.HTML)}function nO(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,be.HTML)}function rO(e,t){e._reconstructActiveFormattingElements(),qv(t),Ng(t),t.selfClosing?e._appendElement(t,be.MATHML):e._insertElement(t,be.MATHML),t.ackSelfClosing=!0}function sO(e,t){e._reconstructActiveFormattingElements(),jv(t),Ng(t),t.selfClosing?e._appendElement(t,be.SVG):e._insertElement(t,be.SVG),t.ackSelfClosing=!0}function b1(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML)}function Ir(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{HN(e,t);break}case d.A:{$N(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{DN(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{ON(e,t);break}case d.LI:case d.DD:case d.DT:{FN(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{Yv(e,t);break}case d.HR:{KN(e,t);break}case d.RB:case d.RTC:{tO(e,t);break}case d.RT:case d.RP:{nO(e,t);break}case d.PRE:case d.LISTING:{LN(e,t);break}case d.XMP:{QN(e,t);break}case d.SVG:{sO(e,t);break}case d.HTML:{BN(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{Hs(e,t);break}case d.BODY:{PN(e,t);break}case d.FORM:{MN(e,t);break}case d.NOBR:{qN(e,t);break}case d.MATH:{rO(e,t);break}case d.TABLE:{WN(e,t);break}case d.INPUT:{GN(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{VN(e,t);break}case d.IMAGE:{YN(e,t);break}case d.BUTTON:{UN(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{jN(e,t);break}case d.IFRAME:{ZN(e,t);break}case d.SELECT:{JN(e,t);break}case d.OPTION:case d.OPTGROUP:{eO(e,t);break}case d.NOEMBED:case d.NOFRAMES:{m1(e,t);break}case d.FRAMESET:{NN(e,t);break}case d.TEXTAREA:{XN(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?m1(e,t):b1(e,t);break}case d.PLAINTEXT:{zN(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:b1(e,t)}}function iO(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function aO(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,a_(e,t))}function oO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function cO(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function lO(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(X.P,d.P),e._closePElement()}function uO(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function dO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function fO(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function hO(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function mO(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function Qv(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!==d.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 oh(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{Og(e,t);break}case d.P:{lO(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{oO(e,t);break}case d.LI:{uO(e);break}case d.DD:case d.DT:{dO(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{fO(e);break}case d.BR:{mO(e);break}case d.BODY:{iO(e,t);break}case d.HTML:{aO(e,t);break}case d.FORM:{cO(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{hO(e,t);break}case d.TEMPLATE:{mo(e,t);break}default:Qv(e,t)}}function Zv(e,t){e.tmplInsertionModeStack.length>0?i_(e,t):Dg(e,t)}function bO(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function gO(e,t){e._err(t,se.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Xh(e,t){if(Wv.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=F.IN_TABLE_TEXT,t.type){case Lt.CHARACTER:{e_(e,t);break}case Lt.WHITESPACE_CHARACTER:{Jv(e,t);break}}else _u(e,t)}function pO(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_CAPTION}function yO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function EO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,d.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,Lg(e,t)}function CO(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_TABLE_BODY}function xO(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,d.TBODY),e.insertionMode=F.IN_TABLE_BODY,ch(e,t)}function vO(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function _O(e,t){Xv(t)?e._appendElement(t,be.HTML):_u(e,t),t.ackSelfClosing=!0}function TO(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,be.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Bc(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{xO(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{Hs(e,t);break}case d.COL:{EO(e,t);break}case d.FORM:{TO(e,t);break}case d.TABLE:{vO(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{CO(e,t);break}case d.INPUT:{_O(e,t);break}case d.CAPTION:{pO(e,t);break}case d.COLGROUP:{yO(e,t);break}default:_u(e,t)}}function ou(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{mo(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:_u(e,t)}}function _u(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ah(e,t),e.fosterParentingEnabled=n}function Jv(e,t){e.pendingCharacterTokens.push(t)}function e_(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)_u(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const t_=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function SO(e,t){const n=t.tagID;t_.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Bc(e,t)):Ir(e,t)}function wO(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,n===d.TABLE&&ou(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:oh(e,t)}}function Lg(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.COL:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{Hs(e,t);break}default:vf(e,t)}}function AO(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TEMPLATE:{mo(e,t);break}case d.COL:break;default:vf(e,t)}}function vf(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function ch(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,d.TR),e.insertionMode=F.IN_ROW,lh(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Bc(e,t));break}default:Bc(e,t)}}function $m(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,ou(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:ou(e,t)}}function lh(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,be.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,ch(e,t));break}default:Bc(e,t)}}function n_(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,$m(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,$m(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:ou(e,t)}}function kO(e,t){const n=t.tagID;t_.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),lh(e,t)):Ir(e,t)}function RO(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),n_(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:oh(e,t)}}function r_(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,be.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,be.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{Hs(e,t);break}}}function s_(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{mo(e,t);break}}}function IO(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):r_(e,t)}function BO(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):s_(e,t)}function PO(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{Hs(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Bc(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,Lg(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,ch(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,lh(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,Ir(e,t)}}function NO(e,t){t.tagID===d.TEMPLATE&&mo(e,t)}function i_(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Dg(e,t)}function OO(e,t){t.tagID===d.HTML?Ir(e,t):_f(e,t)}function a_(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.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 _f(e,t)}function _f(e,t){e.insertionMode=F.IN_BODY,ah(e,t)}function DO(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.FRAMESET:{e._insertElement(t,be.HTML);break}case d.FRAME:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{Hs(e,t);break}}}function LO(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function MO(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.NOFRAMES:{Hs(e,t);break}}}function FO(e,t){t.tagID===d.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function zO(e,t){t.tagID===d.HTML?Ir(e,t):vd(e,t)}function vd(e,t){e.insertionMode=F.IN_BODY,ah(e,t)}function UO(e,t){switch(t.tagID){case d.HTML:{Ir(e,t);break}case d.NOFRAMES:{Hs(e,t);break}}}function $O(e,t){t.chars=Sn,e._insertCharacters(t)}function HO(e,t){e._insertCharacters(t),e.framesetOk=!1}function o_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==be.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function qO(e,t){if(sN(t))o_(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===be.MATHML?qv(t):r===be.SVG&&(iN(t),jv(t)),Ng(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function jO(e,t){if(t.tagID===d.P||t.tagID===d.BR){o_(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)===be.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}const WO=new Set([X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR]);function GO(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===be.HTML&&WO.has(t.treeAdapter.getTagName(e))}const VO={treeAdapter:bi,scriptingEnabled:!0};function KO(e,t){const n={...VO,...t};return c_(e,n)}function YO(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===X.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===be.HTML?t.treeAdapter.getTemplateContent(e):e,s=t.treeAdapter.getChildNodes(r);if(s)for(const i of s)n+=c_(i,t);return n}function c_(e,t){return t.treeAdapter.isElementNode(e)?XO(e,t):t.treeAdapter.isTextNode(e)?ZO(e,t):t.treeAdapter.isCommentNode(e)?JO(e,t):t.treeAdapter.isDocumentTypeNode(e)?e4(e,t):""}function XO(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${QO(e,t)}>${GO(e,t)?"":`${YO(e,t)}</${n}>`}`}function QO(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case be.XML:{n+=`xml:${r.name}`;break}case be.XMLNS:{r.name!=="xmlns"&&(n+="xmlns:"),n+=r.name;break}case be.XLINK:{n+=`xlink:${r.name}`;break}default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${Zx(r.value)}"`}return n}function ZO(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)===be.HTML&&PP(i,t.scriptingEnabled)?r:Jx(r)}function JO(e,{treeAdapter:t}){return`<!--${t.getCommentNodeContent(e)}-->`}function e4(e,{treeAdapter:t}){return`<!DOCTYPE ${t.getDocumentTypeNodeName(e)}>`}function t4(e,t){return Gv.parse(e,t)}function n4(e,t,n){typeof e=="string"&&(n=t,t=e,e=null);const r=Gv.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}function g1(e){const t=e.includes('"')?"'":'"';return t+e+t}function r4(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${g1(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${g1(n)}`),r}const Mi={isCommentNode:eh,isElementNode:ft,isTextNode:ti,createDocument(){const e=new ro([]);return e["x-mode"]=is.NO_QUIRKS,e},createDocumentFragment(){return new ro([])},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 pg(e,r,[]);return a.namespace=t,a["x-attribsNamespace"]=s,a["x-attribsPrefix"]=i,a},createCommentNode(e){return new mg(e)},createTextNode(e){return new nu(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){Mi.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=>Rm(a)&&a.name==="!doctype");i?i.data=s??null:(i=new bg("!doctype",s),Mi.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&&ti(n)?n.data+=t:Mi.appendChild(e,Mi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.children[e.children.indexOf(n)-1];r&&ti(r)?r.data+=t:Mi.insertBefore(e,Mi.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 Rm(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 s4(e,t,n,r){var s;return(s=t.treeAdapter)!==null&&s!==void 0||(t.treeAdapter=Mi),t.scriptingEnabled!==!1&&(t.scriptingEnabled=!0),n?t4(e,t):n4(r,e,t)}const i4={treeAdapter:Mi};function a4(e){const t="length"in e?e:[e];for(let r=0;r<t.length;r+=1){const s=t[r];ra(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+=KO(s,i4)}return n}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 xe;(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"})(xe||(xe={}));function mi(e){return e===lt.Space||e===lt.NewLine||e===lt.Tab||e===lt.FormFeed||e===lt.CarriageReturn}function Ju(e){return e===lt.Slash||e===lt.Gt||mi(e)}function o4(e){return e>=lt.LowerA&&e<=lt.LowerZ||e>=lt.UpperA&&e<=lt.UpperZ}var Xs;(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(Xs||(Xs={}));const pr={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])};class c4{constructor({xmlMode:t=!1,decodeEntities:n=!0},r){this.cbs=r,this.state=xe.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=xe.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 Eg(t?Kx:yg,(s,i)=>this.emitCodePoint(s,i))}reset(){this.state=xe.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=xe.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=xe.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===lt.Amp&&this.startEntity()}stateSpecialStartSequence(t){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?Ju(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=xe.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===lt.Gt||mi(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===pr.TitleEnd?this.decodeEntities&&t===lt.Amp&&this.startEntity():this.fastForwardTo(lt.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===lt.Lt)}stateCDATASequence(t){t===pr.Cdata[this.sequenceIndex]?++this.sequenceIndex===pr.Cdata.length&&(this.state=xe.InCommentLike,this.currentSequence=pr.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=xe.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===pr.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=xe.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?!Ju(t):o4(t)}startSpecial(t,n){this.isSpecial=!0,this.currentSequence=t,this.sequenceIndex=n,this.state=xe.SpecialStartSequence}stateBeforeTagName(t){if(t===lt.ExclamationMark)this.state=xe.BeforeDeclaration,this.sectionStart=this.index+1;else if(t===lt.Questionmark)this.state=xe.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(t)){const n=t|32;this.sectionStart=this.index,this.xmlMode?this.state=xe.InTagName:n===pr.ScriptEnd[2]?this.state=xe.BeforeSpecialS:n===pr.TitleEnd[2]?this.state=xe.BeforeSpecialT:this.state=xe.InTagName}else t===lt.Slash?this.state=xe.BeforeClosingTagName:(this.state=xe.Text,this.stateText(t))}stateInTagName(t){Ju(t)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=xe.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateBeforeClosingTagName(t){mi(t)||(t===lt.Gt?this.state=xe.Text:(this.state=this.isTagStartChar(t)?xe.InClosingTagName:xe.InSpecialComment,this.sectionStart=this.index))}stateInClosingTagName(t){(t===lt.Gt||mi(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=xe.AfterClosingTagName,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.state=xe.Text,this.sectionStart=this.index+1)}stateBeforeAttributeName(t){t===lt.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=xe.InSpecialTag,this.sequenceIndex=0):this.state=xe.Text,this.sectionStart=this.index+1):t===lt.Slash?this.state=xe.InSelfClosingTag:mi(t)||(this.state=xe.InAttributeName,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===lt.Gt?(this.cbs.onselfclosingtag(this.index),this.state=xe.Text,this.sectionStart=this.index+1,this.isSpecial=!1):mi(t)||(this.state=xe.BeforeAttributeName,this.stateBeforeAttributeName(t))}stateInAttributeName(t){(t===lt.Eq||Ju(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=xe.AfterAttributeName,this.stateAfterAttributeName(t))}stateAfterAttributeName(t){t===lt.Eq?this.state=xe.BeforeAttributeValue:t===lt.Slash||t===lt.Gt?(this.cbs.onattribend(Xs.NoValue,this.sectionStart),this.sectionStart=-1,this.state=xe.BeforeAttributeName,this.stateBeforeAttributeName(t)):mi(t)||(this.cbs.onattribend(Xs.NoValue,this.sectionStart),this.state=xe.InAttributeName,this.sectionStart=this.index)}stateBeforeAttributeValue(t){t===lt.DoubleQuote?(this.state=xe.InAttributeValueDq,this.sectionStart=this.index+1):t===lt.SingleQuote?(this.state=xe.InAttributeValueSq,this.sectionStart=this.index+1):mi(t)||(this.sectionStart=this.index,this.state=xe.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?Xs.Double:Xs.Single,this.index+1),this.state=xe.BeforeAttributeName):this.decodeEntities&&t===lt.Amp&&this.startEntity()}stateInAttributeValueDoubleQuotes(t){this.handleInAttributeValue(t,lt.DoubleQuote)}stateInAttributeValueSingleQuotes(t){this.handleInAttributeValue(t,lt.SingleQuote)}stateInAttributeValueNoQuotes(t){mi(t)||t===lt.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(Xs.Unquoted,this.index),this.state=xe.BeforeAttributeName,this.stateBeforeAttributeName(t)):this.decodeEntities&&t===lt.Amp&&this.startEntity()}stateBeforeDeclaration(t){t===lt.OpeningSquareBracket?(this.state=xe.CDATASequence,this.sequenceIndex=0):this.state=t===lt.Dash?xe.BeforeComment:xe.InDeclaration}stateInDeclaration(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=xe.Text,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=xe.Text,this.sectionStart=this.index+1)}stateBeforeComment(t){t===lt.Dash?(this.state=xe.InCommentLike,this.currentSequence=pr.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=xe.InDeclaration}stateInSpecialComment(t){(t===lt.Gt||this.fastForwardTo(lt.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=xe.Text,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){const n=t|32;n===pr.ScriptEnd[3]?this.startSpecial(pr.ScriptEnd,4):n===pr.StyleEnd[3]?this.startSpecial(pr.StyleEnd,4):(this.state=xe.InTagName,this.stateInTagName(t))}stateBeforeSpecialT(t){const n=t|32;n===pr.TitleEnd[3]?this.startSpecial(pr.TitleEnd,4):n===pr.TextareaEnd[3]?this.startSpecial(pr.TextareaEnd,4):(this.state=xe.InTagName,this.stateInTagName(t))}startEntity(){this.baseState=this.state,this.state=xe.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?Cs.Strict:this.baseState===xe.Text||this.baseState===xe.InSpecialTag?Cs.Legacy:Cs.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===xe.Text||this.state===xe.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===xe.InAttributeValueDq||this.state===xe.InAttributeValueSq||this.state===xe.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 xe.Text:{this.stateText(t);break}case xe.SpecialStartSequence:{this.stateSpecialStartSequence(t);break}case xe.InSpecialTag:{this.stateInSpecialTag(t);break}case xe.CDATASequence:{this.stateCDATASequence(t);break}case xe.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(t);break}case xe.InAttributeName:{this.stateInAttributeName(t);break}case xe.InCommentLike:{this.stateInCommentLike(t);break}case xe.InSpecialComment:{this.stateInSpecialComment(t);break}case xe.BeforeAttributeName:{this.stateBeforeAttributeName(t);break}case xe.InTagName:{this.stateInTagName(t);break}case xe.InClosingTagName:{this.stateInClosingTagName(t);break}case xe.BeforeTagName:{this.stateBeforeTagName(t);break}case xe.AfterAttributeName:{this.stateAfterAttributeName(t);break}case xe.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(t);break}case xe.BeforeAttributeValue:{this.stateBeforeAttributeValue(t);break}case xe.BeforeClosingTagName:{this.stateBeforeClosingTagName(t);break}case xe.AfterClosingTagName:{this.stateAfterClosingTagName(t);break}case xe.BeforeSpecialS:{this.stateBeforeSpecialS(t);break}case xe.BeforeSpecialT:{this.stateBeforeSpecialT(t);break}case xe.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(t);break}case xe.InSelfClosingTag:{this.stateInSelfClosingTag(t);break}case xe.InDeclaration:{this.stateInDeclaration(t);break}case xe.BeforeDeclaration:{this.stateBeforeDeclaration(t);break}case xe.BeforeComment:{this.stateBeforeComment(t);break}case xe.InProcessingInstruction:{this.stateInProcessingInstruction(t);break}case xe.InEntity:{this.stateInEntity();break}}this.index++}this.cleanup()}finish(){this.state===xe.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===xe.InCommentLike?this.currentSequence===pr.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===xe.InTagName||this.state===xe.BeforeAttributeName||this.state===xe.BeforeAttributeValue||this.state===xe.AfterAttributeName||this.state===xe.InAttributeName||this.state===xe.InAttributeValueSq||this.state===xe.InAttributeValueDq||this.state===xe.InAttributeValueNq||this.state===xe.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,n){this.baseState!==xe.Text&&this.baseState!==xe.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 No=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Xt=new Set(["p"]),p1=new Set(["thead","tbody"]),y1=new Set(["dd","dt"]),E1=new Set(["rt","rp"]),l4=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",Xt],["h1",Xt],["h2",Xt],["h3",Xt],["h4",Xt],["h5",Xt],["h6",Xt],["select",No],["input",No],["output",No],["button",No],["datalist",No],["textarea",No],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",y1],["dt",y1],["address",Xt],["article",Xt],["aside",Xt],["blockquote",Xt],["details",Xt],["div",Xt],["dl",Xt],["fieldset",Xt],["figcaption",Xt],["figure",Xt],["footer",Xt],["form",Xt],["header",Xt],["hr",Xt],["main",Xt],["nav",Xt],["ol",Xt],["pre",Xt],["section",Xt],["table",Xt],["ul",Xt],["rt",E1],["rp",E1],["tbody",p1],["tfoot",p1]]),u4=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),C1=new Set(["math","svg"]),x1=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),d4=/\s|\//;let f4=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:c4)(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,Im(t)),this.startIndex=n}isVoidElement(t){return this.htmlMode&&u4.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&&l4.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&&(C1.has(t)?this.foreignContext.unshift(!0):x1.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,u;this.endIndex=n;let f=this.getSlice(t,n);if(this.lowerCaseTagNames&&(f=f.toLowerCase()),this.htmlMode&&(C1.has(f)||x1.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),(u=(l=this.cbs).onclosetag)===null||u===void 0||u.call(l,"br",!1));else{const m=this.stack.indexOf(f);if(m!==-1)for(let h=0;h<=m;h++){const b=this.stack.shift();(s=(r=this.cbs).onclosetag)===null||s===void 0||s.call(r,b,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+=Im(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===Xs.Double?'"':t===Xs.Single?"'":t===Xs.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(d4);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,u,f,m,h;this.endIndex=n;const b=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,b),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(u=this.cbs).oncomment)===null||f===void 0||f.call(u,`[CDATA[${b}]]`),(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 h4(e,t){const n=new mI(void 0,t);return new f4(n,t).end(e),n.root}const m4=q6((e,t,n,r)=>t._useHtmlParser2?h4(e,t):s4(e,t,n,r)),b4=vP(m4,(e,t)=>t._useHtmlParser2?th(e,t):a4(e));class g4{constructor(t){ge(this,"_melisearch");ge(this,"_index");ge(this,"_indexName");ge(this,"host");ge(this,"apiKey");ge(this,"docs",{});ge(this,"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=b4(a.toString()),c=o(".h1,.h2,.h3,.h4,.h5,.h6,.p").toArray(),l={lvl0:o("title").text()};for(const u of c){const f=u.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(u).text()),this.addDocument({id:u.attribs.id,content:o(u).text(),url:`${i}#${u.attribs.id}`,...l})}if(i.endsWith("index.html"))break}return this.updateDocument(),n(r)});this.host=t.host,this.apiKey=t.apiKey,this._indexName=t.indexName}async _getMeliSearch(){return this._melisearch===void 0&&(this._melisearch=new rI({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}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)}}class p4{constructor(t){ge(this,"plugins",[]);ge(this,"pluginType",0);ge(this,"fun");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}})}registerPlugin(t){this.plugins.push(t)}removePlugin(t){this.plugins=this.plugins.filter(n=>n!==t)}callFn(t,n){return(...r)=>{const s=new y4(n);for(const i of this.plugins){const a=i[t];a&&s.use(a)}return s.runMiddlewareHandel(...r)}}}class y4{constructor(t){ge(this,"middlewares",[]);this.handel=t}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)}}const E4=e=>{let t=e.httpHandler;return{setHttpHandler(n){t=n},httpHandler(){return t},updateHttpClientConfig(n,r){t.updateHttpClientConfig(n,r)},httpHandlerConfigs(){return t.httpHandlerConfigs()}}},C4=e=>({httpHandler:e.httpHandler()});var v1;(function(e){e.HEADER="header",e.QUERY="query"})(v1||(v1={}));var _1;(function(e){e.HEADER="header",e.QUERY="query"})(_1||(_1={}));var cu;(function(e){e.HTTP="http",e.HTTPS="https"})(cu||(cu={}));var Tf;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(Tf||(Tf={}));var T1;(function(e){e[e.HEADER=0]="HEADER",e[e.TRAILER=1]="TRAILER"})(T1||(T1={}));const Hm="__smithy_context";var S1;(function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"})(S1||(S1={}));var w1;(function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"})(w1||(w1={}));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=x4(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 x4(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}},{})}class Pc{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 v4(e){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(e)}function _4(e){return t=>async n=>{var s,i;const{request:r}=n;return qn.isInstance(r)&&r.body&&e.runtime==="node"&&((i=(s=e.requestHandler)==null?void 0:s.constructor)==null?void 0:i.name)!=="FetchHttpHandler"&&(r.headers={...r.headers,Expect:"100-continue"}),t({...n,request:r})}}const T4={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},S4=e=>({applyToStack:t=>{t.add(_4(e),T4)}}),Nc={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},w4=Nc.WHEN_SUPPORTED,Qh={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},A4=Nc.WHEN_SUPPORTED;var an;(function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"})(an||(an={}));var A1;(function(e){e.HEADER="header",e.TRAILER="trailer"})(A1||(A1={}));const qm=an.CRC32;var k1;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(k1||(k1={}));function k4(e,t,n){return e.$source||(e.$source={}),e.$source[t]=n,e}function Un(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 R1=e=>{var t,n;return Pc.isInstance(e)?((t=e.headers)==null?void 0:t.date)??((n=e.headers)==null?void 0:n.Date):void 0},Mg=e=>new Date(Date.now()+e),R4=(e,t)=>Math.abs(Mg(t).getTime()-e)>=3e5,I1=(e,t)=>{const n=Date.parse(e);return R4(n,t)?n-Date.now():t},ql=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},l_=async e=>{var l,u,f;const t=ql("context",e.context),n=ql("config",e.config),r=(f=(u=(l=t.endpointV2)==null?void 0:l.properties)==null?void 0:u.authSchemes)==null?void 0:f[0],i=await ql("signer",n.signer)(r),a=e==null?void 0:e.signingRegion,o=e==null?void 0:e.signingRegionSet,c=e==null?void 0:e.signingName;return{config:n,signer:i,signingRegion:a,signingRegionSet:o,signingName:c}};class u_{async sign(t,n,r){var f;if(!qn.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const s=await l_(r),{config:i,signer:a}=s;let{signingRegion:o,signingName:c}=s;const l=r.context;if(((f=l==null?void 0:l.authSchemes)==null?void 0:f.length)??!1){const[m,h]=l.authSchemes;(m==null?void 0:m.name)==="sigv4a"&&(h==null?void 0:h.name)==="sigv4"&&(o=(h==null?void 0:h.signingRegion)??o,c=(h==null?void 0:h.signingName)??c)}return await a.sign(t,{signingDate:Mg(i.systemClockOffset),signingRegion:o,signingService:c})}errorHandler(t){return n=>{const r=n.ServerTime??R1(n.$response);if(r){const s=ql("config",t.config),i=s.systemClockOffset;s.systemClockOffset=I1(r,s.systemClockOffset),s.systemClockOffset!==i&&n.$metadata&&(n.$metadata.clockSkewCorrected=!0)}throw n}}successHandler(t,n){const r=R1(t);if(r){const s=ql("config",n.config);s.systemClockOffset=I1(r,s.systemClockOffset)}}}class I4 extends u_{async sign(t,n,r){var m;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 l_(r),u=(await((m=s.sigv4aSigningRegionSet)==null?void 0:m.call(s))??o??[a]).join(",");return await i.sign(t,{signingDate:Mg(s.systemClockOffset),signingRegion:u,signingService:c})}}const Gc=e=>e[Hm]||(e[Hm]={}),ni=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t};function B4(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}const P4=(e,t)=>(n,r)=>async s=>{var l;const i=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,s.input)),a=B4(e.httpAuthSchemes),o=Gc(r),c=[];for(const u of i){const f=a.get(u.schemeId);if(!f){c.push(`HttpAuthScheme \`${u.schemeId}\` was not enabled for this service.`);continue}const m=f.identityProvider(await t.identityProviderConfigProvider(e));if(!m){c.push(`HttpAuthScheme \`${u.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:h={},signingProperties:b={}}=((l=u.propertiesExtractor)==null?void 0:l.call(u,e,r))||{};u.identityProperties=Object.assign(u.identityProperties||{},h),u.signingProperties=Object.assign(u.signingProperties||{},b),o.selectedHttpAuthScheme={httpAuthOption:u,identity:await m(u.identityProperties),signer:f.signer};break}if(!o.selectedHttpAuthScheme)throw new Error(c.join(`
1535
+ `));return n(s)},N4={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},O4=(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(P4(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),N4)}}),D4=(e,t)=>(n,r)=>async s=>{var a,o,c,l;const{response:i}=await n(s);try{const u=await t(i,e);return{response:i,output:u}}catch(u){if(Object.defineProperty(u,"$response",{value:i}),!("$metadata"in u)){const f="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{u.message+=`
1536
+ `+f}catch{!r.logger||((o=(a=r.logger)==null?void 0:a.constructor)==null?void 0:o.name)==="NoOpLogger"?console.warn(f):(l=(c=r.logger)==null?void 0:c.warn)==null||l.call(c,f)}typeof u.$responseBodyText<"u"&&u.$response&&(u.$response.body=u.$responseBodyText)}throw u}},L4=(e,t)=>(n,r)=>async s=>{var o;const i=(o=r.endpointV2)!=null&&o.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!i)throw new Error("No valid endpoint provider available.");const a=await t(s.input,{...e,endpoint:i});return n({...s,request:a})},M4={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Fg={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function _e(e,t,n){return{applyToStack:r=>{r.add(D4(e,n),M4),r.add(L4(e,t),Fg)}}}Fg.name;const F4=e=>t=>{throw t},z4=(e,t)=>{},U4=e=>(t,n)=>async r=>{if(!qn.isInstance(r.request))return t(r);const i=Gc(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||F4)(a));return(c.successHandler||z4)(l.response,a),l},d_={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},$4=e=>({applyToStack:t=>{t.addRelativeTo(U4(),d_)}}),$o=e=>{if(typeof e=="function")return e;const t=Promise.resolve(e);return()=>t},Yi={},Vc=new Array(64);for(let e=0,t=65,n=90;e+t<=n;e++){const r=String.fromCharCode(e+t);Yi[r]=e,Vc[e]=r}for(let e=0,t=97,n=122;e+t<=n;e++){const r=String.fromCharCode(e+t),s=e+26;Yi[r]=s,Vc[s]=r}for(let e=0;e<10;e++){Yi[e.toString(10)]=e+52;const t=e.toString(10),n=e+52;Yi[t]=n,Vc[n]=t}Yi["+"]=62;Vc[62]="+";Yi["/"]=63;Vc[63]="/";const Yo=6,jl=8,H4=63,zg=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,u=s+3;l<=u;l++)if(e[l]!=="="){if(!(e[l]in Yi))throw new TypeError(`Invalid character ${e[l]} in base64 string.`);i|=Yi[e[l]]<<(u-l)*Yo,a+=Yo}else i>>=Yo;const o=s/4*3;i>>=a%jl;const c=Math.floor(a/jl);for(let l=0;l<c;l++){const u=(c-l-1)*jl;r.setUint8(o+l,(i&255<<u)>>u)}}return new Uint8Array(n)},io=e=>new TextEncoder().encode(e),Xo=e=>typeof e=="string"?io(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),Ug=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 uh(e){let t;typeof e=="string"?t=io(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,u=Math.min(i+3,t.length);l<u;l++)a|=t[l]<<(u-l-1)*jl,o+=jl;const c=Math.ceil(o/Yo);a<<=c*Yo-o;for(let l=1;l<=c;l++){const u=(c-l)*Yo;s+=Vc[(a&H4<<u)>>u]}s+="==".slice(0,4-c)}return s}function q4(e,t="utf-8"){return t==="base64"?uh(e):Ug(e)}function j4(e,t){return t==="base64"?wa.mutate(zg(e)):wa.mutate(io(e))}class wa extends Uint8Array{static fromString(t,n="utf-8"){switch(typeof t){case"string":return j4(t,n);default:throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}}static mutate(t){return Object.setPrototypeOf(t,wa.prototype),t}transformToString(t="utf-8"){return q4(this,t)}}const W4=typeof ReadableStream=="function"?ReadableStream:function(){};class G4 extends W4{}const jm=e=>{var t;return typeof ReadableStream=="function"&&(((t=e==null?void 0:e.constructor)==null?void 0:t.name)===ReadableStream.name||e instanceof ReadableStream)},V4=({expectedChecksum:e,checksum:t,source:n,checksumSourceLocation:r,base64Encoder:s})=>{var c;if(!jm(n))throw new Error(`@smithy/util-stream: unsupported source type ${((c=n==null?void 0:n.constructor)==null?void 0:c.name)??n} in ChecksumStream.`);const i=s??uh;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(l,u){t.update(l),u.enqueue(l)},async flush(l){const u=await t.digest(),f=i(u);if(e!==f){const m=new Error(`Checksum mismatch: expected "${e}" but received "${f}" in response header "${r}".`);l.error(m)}else l.terminate()}});n.pipeThrough(a);const o=a.readable;return Object.setPrototypeOf(o,G4.prototype),o};class K4{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 Y4(e,t,n){const r=e.getReader();let s=!1,i=0;const a=["",new K4(l=>new Uint8Array(l))];let o=-1;const c=async l=>{const{value:u,done:f}=await r.read(),m=u;if(f){if(o!==-1){const h=Zh(a,o);Wl(h)>0&&l.enqueue(h)}l.close()}else{const h=Z4(m);if(o!==h&&(o>=0&&l.enqueue(Zh(a,o)),o=h),o===-1){l.enqueue(m);return}const b=Wl(m);i+=b;const p=Wl(a[o]);if(b>=t&&p===0)l.enqueue(m);else{const E=Q4(a,o,m);!s&&i>t*2&&(s=!0,n==null||n.warn(`@smithy/util-stream - stream chunk size ${b} is below threshold of ${t}, automatically buffering.`)),E>=t?l.enqueue(Zh(a,o)):await c(l)}}};return new ReadableStream({pull:c})}const X4=Y4;function Q4(e,t,n){switch(t){case 0:return e[0]+=n,Wl(e[0]);case 1:case 2:return e[t].push(n),Wl(e[t])}}function Zh(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 Wl(e){return(e==null?void 0:e.byteLength)??(e==null?void 0:e.length)??0}function Z4(e){return typeof Buffer<"u"&&e instanceof Buffer?2:e instanceof Uint8Array?1:typeof e=="string"?0:-1}const J4=(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(u){const{value:f,done:m}=await l.read();if(m){if(u.enqueue(`0\r
1537
+ `),o){const h=n(await c);u.enqueue(`${i}:${h}\r
1538
+ `),u.enqueue(`\r
1539
+ `)}u.close()}else u.enqueue(`${(r(f)||0).toString(16)}\r
1540
+ ${f}\r
1541
+ `)}})};async function eD(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==null?void 0: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 Aa=e=>encodeURIComponent(e).replace(/[!'()*]/g,tD),tD=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;function nD(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=Aa(n),Array.isArray(r))for(let s=0,i=r.length;s<i;s++)t.push(`${n}=${Aa(r[s])}`);else{let s=n;(r||typeof r=="string")&&(s+=`=${Aa(r)}`),t.push(s)}}return t.join("&")}function B1(e,t){return new Request(e,t)}function rD(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 Jh={supported:void 0};class $g{static create(t){return typeof(t==null?void 0:t.handle)=="function"?t:new $g(t)}constructor(t){typeof t=="function"?this.configProvider=t().then(n=>n||{}):(this.config=t??{},this.configProvider=Promise.resolve(this.config)),Jh.supported===void 0&&(Jh.supported=typeof Request<"u"&&"keepalive"in B1("https://[::1]"))}destroy(){}async handle(t,{abortSignal:n}={}){var g;this.config||(this.config=await this.configProvider);const r=this.config.requestTimeout,s=this.config.keepAlive===!0,i=this.config.credentials;if(n!=null&&n.aborted){const y=new Error("Request aborted");return y.name="AbortError",Promise.reject(y)}let a=t.path;const o=nD(t.query||{});o&&(a+=`?${o}`),t.fragment&&(a+=`#${t.fragment}`);let c="";if(t.username!=null||t.password!=null){const y=t.username??"",w=t.password??"";c=`${y}:${w}@`}const{port:l,method:u}=t,f=`${t.protocol}//${c}${t.hostname}${l?`:${l}`:""}${a}`,m=u==="GET"||u==="HEAD"?void 0:t.body,h={body:m,headers:new Headers(t.headers),method:u,credentials:i};(g=this.config)!=null&&g.cache&&(h.cache=this.config.cache),m&&(h.duplex="half"),typeof AbortController<"u"&&(h.signal=n),Jh.supported&&(h.keepalive=s),typeof this.config.requestInit=="function"&&Object.assign(h,this.config.requestInit(t));let b=()=>{};const p=B1(f,h),E=[fetch(p).then(y=>{const w=y.headers,x={};for(const C of w.entries())x[C[0]]=C[1];return y.body!=null?{response:new Pc({headers:x,reason:y.statusText,statusCode:y.status,body:y.body})}:y.blob().then(C=>({response:new Pc({headers:x,reason:y.statusText,statusCode:y.status,body:C})}))}),rD(r)];return n&&E.push(new Promise((y,w)=>{const x=()=>{const S=new Error("Request aborted");S.name="AbortError",w(S)};if(typeof n.addEventListener=="function"){const S=n;S.addEventListener("abort",x,{once:!0}),b=()=>S.removeEventListener("abort",x)}else n.onabort=x})),Promise.race(E).finally(b)}updateHttpClientConfig(t,n){this.config=void 0,this.configProvider=this.configProvider.then(r=>(r[t]=n,r))}httpHandlerConfigs(){return this.config??{}}}const f_=async e=>{var t;return typeof Blob=="function"&&e instanceof Blob||((t=e.constructor)==null?void 0:t.name)==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await e.arrayBuffer()):sD(e):iD(e)};async function sD(e){const t=await aD(e),n=zg(t);return new Uint8Array(n)}async function iD(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 aD(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 h_={},Wm={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();t.length===1&&(t=`0${t}`),h_[e]=t,Wm[t]=e}function m_(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 Wm)t[n/2]=Wm[r];else throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`)}return t}function Gr(e){let t="";for(let n=0;n<e.byteLength;n++)t+=h_[e[n]];return t}const P1="The stream has already been transformed.",oD=e=>{var s,i;if(!N1(e)&&!jm(e)){const a=((i=(s=e==null?void 0:e.__proto__)==null?void 0:s.constructor)==null?void 0:i.name)||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${a}`)}let t=!1;const n=async()=>{if(t)throw new Error(P1);return t=!0,await f_(e)},r=a=>{if(typeof a.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
1542
+ 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 a.stream()};return Object.assign(e,{transformToByteArray:n,transformToString:async a=>{const o=await n();if(a==="base64")return uh(o);if(a==="hex")return Gr(o);if(a===void 0||a==="utf8"||a==="utf-8")return Ug(o);if(typeof TextDecoder=="function")return new TextDecoder(a).decode(o);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(t)throw new Error(P1);if(t=!0,N1(e))return r(e);if(jm(e))return e;throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},N1=e=>typeof Blob=="function"&&e instanceof Blob;async function cD(e){return typeof e.stream=="function"&&(e=e.stream()),e.tee()}const ot=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return wa.mutate(e);if(!e)return wa.mutate(new Uint8Array);const n=t.streamCollector(e);return wa.mutate(await n)};function O1(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}const lD=(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=>O1(o)).join("/"):O1(a))}else throw new Error("No value provided for input HTTP label: "+n+".");return e};function Te(e,t){return new uD(e,t)}class uD{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!=null&&n.endsWith("/")?n.slice(0,-1):n||""}`+t}),this}p(t,n,r,s){return this.resolvePathStack.push(i=>{this.path=lD(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 dD(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 fD{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 hD=e=>t=>b_(t)&&t.expiration.getTime()-Date.now()<e,mD=3e5,bD=hD(mD),b_=e=>e.expiration!==void 0,gD=(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!=null&&l.forceRefresh)&&(s=await c(l)),s):async l=>((!a||l!=null&&l.forceRefresh)&&(s=await c(l)),o?s:n(s)?(t(s)&&await c(l),s):(o=!0,s))},pD=(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!=null&&c.forceRefresh)&&(r=await o()),r)},yD=e=>(e.sigv4aSigningRegionSet=$o(e.sigv4aSigningRegionSet),e),ED="X-Amz-Algorithm",CD="X-Amz-Credential",g_="X-Amz-Date",xD="X-Amz-SignedHeaders",vD="X-Amz-Expires",p_="X-Amz-Signature",y_="X-Amz-Security-Token",E_="authorization",C_=g_.toLowerCase(),_D="date",TD=[E_,C_,_D],SD=p_.toLowerCase(),Gm="x-amz-content-sha256",wD=y_.toLowerCase(),AD={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},kD=/^proxy-/,RD=/^sec-/,e0="AWS4-HMAC-SHA256",ID="AWS4-HMAC-SHA256-PAYLOAD",BD="UNSIGNED-PAYLOAD",PD=50,x_="aws4_request",ND=60*60*24*7,ed={},t0=[],n0=(e,t,n)=>`${e}/${t}/${n}/${x_}`,OD=async(e,t,n,r,s)=>{const i=await D1(e,t.secretAccessKey,t.accessKeyId),a=`${n}:${r}:${s}:${Gr(i)}:${t.sessionToken}`;if(a in ed)return ed[a];for(t0.push(a);t0.length>PD;)delete ed[t0.shift()];let o=`AWS4${t.secretAccessKey}`;for(const c of[n,r,s,x_])o=await D1(e,o,c);return ed[a]=o},D1=(e,t,n)=>{const r=new e(t);return r.update(Xo(n)),r.digest()},L1=({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 AD||t!=null&&t.has(i)||kD.test(i)||RD.test(i))&&(!n||n&&!n.has(i))||(r[i]=e[s].trim().replace(/\s+/g," "))}return r},DD=({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e)){if(r.toLowerCase()===SD)continue;const s=Aa(r);t.push(s);const i=e[r];typeof i=="string"?n[s]=`${s}=${Aa(i)}`:Array.isArray(i)&&(n[s]=i.slice(0).reduce((a,o)=>a.concat([`${s}=${Aa(o)}`]),[]).sort().join("&"))}return t.sort().map(r=>n[r]).filter(r=>r).join("&")},v_=e=>typeof ArrayBuffer=="function"&&e instanceof ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]",r0=async({headers:e,body:t},n)=>{for(const r of Object.keys(e))if(r.toLowerCase()===Gm)return e[r];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||v_(t)){const r=new n;return r.update(Xo(t)),Gr(await r.digest())}return BD};class LD{format(t){const n=[];for(const i of Object.keys(t)){const a=io(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=io(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 u=new Uint8Array(9);return u[0]=8,u.set(FD.fromNumber(t.value.valueOf()).bytes,1),u;case"uuid":if(!MD.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(m_(t.value.replace(/\-/g,"")),1),f}}}var M1;(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"})(M1||(M1={}));const MD=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let FD=class __{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&&F1(n),new __(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&F1(t),parseInt(Gr(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}};function F1(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}const zD=(e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1},UD=(e,t={})=>{var s,i;const{headers:n,query:r={}}=qn.clone(e);for(const a of Object.keys(n)){const o=a.toLowerCase();(o.slice(0,6)==="x-amz-"&&!((s=t.unhoistableHeaders)!=null&&s.has(o))||(i=t.hoistableHeaders)!=null&&i.has(o))&&(r[a]=n[a],delete n[a])}return{...e,headers:n,query:r}},z1=e=>{e=qn.clone(e);for(const t of Object.keys(e.headers))TD.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},$D=e=>HD(e).toISOString().replace(/\.\d{3}Z$/,"Z"),HD=e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e;class Vm{constructor({applyChecksum:t,credentials:n,region:r,service:s,sha256:i,uriEscapePath:a=!0}){this.headerFormatter=new LD,this.service=s,this.sha256=i,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=ni(r),this.credentialProvider=ni(n)}async presign(t,n={}){const{signingDate:r=new Date,expiresIn:s=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:o,hoistableHeaders:c,signingRegion:l,signingService:u}=n,f=await this.credentialProvider();this.validateResolvedCredentials(f);const m=l??await this.regionProvider(),{longDate:h,shortDate:b}=td(r);if(s>ND)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const p=n0(b,m,u??this.service),E=UD(z1(t),{unhoistableHeaders:a,hoistableHeaders:c});f.sessionToken&&(E.query[y_]=f.sessionToken),E.query[ED]=e0,E.query[CD]=`${f.accessKeyId}/${p}`,E.query[g_]=h,E.query[vD]=s.toString(10);const g=L1(E,i,o);return E.query[xD]=U1(g),E.query[p_]=await this.getSignature(h,p,this.getSigningKey(f,m,b,u),this.createCanonicalRequest(E,g,await r0(t,this.sha256))),E}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}=td(r),u=n0(c,o,a??this.service),f=await r0({headers:{},body:n},this.sha256),m=new this.sha256;m.update(t);const h=Gr(await m.digest()),b=[ID,l,u,s,h,f].join(`
1543
+ `);return this.signString(b,{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}=td(n),c=new this.sha256(await this.getSigningKey(i,a,o,s));return c.update(Xo(t)),Gr(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=z1(t),{longDate:u,shortDate:f}=td(n),m=n0(f,c,a??this.service);l.headers[C_]=u,o.sessionToken&&(l.headers[wD]=o.sessionToken);const h=await r0(l,this.sha256);!zD(Gm,l.headers)&&this.applyChecksum&&(l.headers[Gm]=h);const b=L1(l,s,r),p=await this.getSignature(u,m,this.getSigningKey(o,c,f,a),this.createCanonicalRequest(l,b,h));return l.headers[E_]=`${e0} Credential=${o.accessKeyId}/${m}, SignedHeaders=${U1(b)}, Signature=${p}`,l}createCanonicalRequest(t,n,r){const s=Object.keys(n).sort();return`${t.method}
1544
+ ${this.getCanonicalPath(t)}
1545
+ ${DD(t)}
1546
+ ${s.map(i=>`${i}:${n[i]}`).join(`
1547
+ `)}
1548
+
1549
+ ${s.join(";")}
1550
+ ${r}`}async createStringToSign(t,n,r){const s=new this.sha256;s.update(Xo(r));const i=await s.digest();return`${e0}
1551
+ ${t}
1552
+ ${n}
1553
+ ${Gr(i)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){const n=[];for(const i of t.split("/"))(i==null?void 0:i.length)!==0&&i!=="."&&(i===".."?n.pop():n.push(i));const r=`${t!=null&&t.startsWith("/")?"/":""}${n.join("/")}${n.length>0&&(t!=null&&t.endsWith("/"))?"/":""}`;return Aa(r).replace(/%2F/g,"/")}return t}async getSignature(t,n,r,s){const i=await this.createStringToSign(t,n,s),a=new this.sha256(await r);return a.update(Xo(i)),Gr(await a.digest())}getSigningKey(t,n,r,s){return OD(this.sha256,t,r,n,s||this.service)}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}}const td=e=>{const t=$D(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}},U1=e=>Object.keys(e).sort().join(";"),qD=e=>{let t=!1,n;e.credentials&&(t=!0,n=gD(e.credentials,bD,b_)),n||(e.credentialDefaultProvider?n=$o(e.credentialDefaultProvider(Object.assign({},e,{parentClientConfig:e}))):n=async()=>{throw new Error("`credentials` is missing")});const r=async()=>n({callerClientConfig:e}),{signingEscapePath:s=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:a}=e;let o;return e.signer?o=$o(e.signer):e.regionInfoProvider?o=()=>$o(e.region)().then(async c=>[await e.regionInfoProvider(c,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},c]).then(([c,l])=>{const{signingRegion:u,signingService:f}=c;e.signingRegion=e.signingRegion||u||l,e.signingName=e.signingName||f||e.serviceId;const m={...e,credentials:r,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s},h=e.signerConstructor||Vm;return new h(m)}):o=async c=>{c=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await $o(e.region)(),properties:{}},c);const l=c.signingRegion,u=c.signingName;e.signingRegion=e.signingRegion||l,e.signingName=e.signingName||u||e.serviceId;const f={...e,credentials:r,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s},m=e.signerConstructor||Vm;return new m(f)},{...e,systemClockOffset:i,signingEscapePath:s,credentials:t?async()=>r().then(c=>k4(c,"CREDENTIALS_CODE","e")):r,signer:o}},da=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const r of t)n.push(r);return n},Ii=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,Sf=()=>{let e=[],t=[],n=!1;const r=new Set,s=f=>f.sort((m,h)=>$1[h.step]-$1[m.step]||H1[h.priority||"normal"]-H1[m.priority||"normal"]),i=f=>{let m=!1;const h=b=>{const p=da(b.name,b.aliases);if(p.includes(f)){m=!0;for(const E of p)r.delete(E);return!1}return!0};return e=e.filter(h),t=t.filter(h),m},a=f=>{let m=!1;const h=b=>{if(b.middleware===f){m=!0;for(const p of da(b.name,b.aliases))r.delete(p);return!1}return!0};return e=e.filter(h),t=t.filter(h),m},o=f=>{var m;return e.forEach(h=>{f.add(h.middleware,{...h})}),t.forEach(h=>{f.addRelativeTo(h.middleware,{...h})}),(m=f.identifyOnResolve)==null||m.call(f,u.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=[],b={};return e.forEach(E=>{const g={...E,before:[],after:[]};for(const y of da(g.name,g.aliases))b[y]=g;m.push(g)}),t.forEach(E=>{const g={...E,before:[],after:[]};for(const y of da(g.name,g.aliases))b[y]=g;h.push(g)}),h.forEach(E=>{if(E.toMiddleware){const g=b[E.toMiddleware];if(g===void 0){if(f)return;throw new Error(`${E.toMiddleware} is not found when adding ${Ii(E.name,E.aliases)} middleware ${E.relation} ${E.toMiddleware}`)}E.relation==="after"&&g.after.push(E),E.relation==="before"&&g.before.push(E)}}),s(m).map(c).reduce((E,g)=>(E.push(...g),E),[])},u={add:(f,m={})=>{const{name:h,override:b,aliases:p}=m,E={step:"initialize",priority:"normal",middleware:f,...m},g=da(h,p);if(g.length>0){if(g.some(y=>r.has(y))){if(!b)throw new Error(`Duplicate middleware name '${Ii(h,p)}'`);for(const y of g){const w=e.findIndex(S=>{var C;return S.name===y||((C=S.aliases)==null?void 0:C.some(T=>T===y))});if(w===-1)continue;const x=e[w];if(x.step!==E.step||E.priority!==x.priority)throw new Error(`"${Ii(x.name,x.aliases)}" middleware with ${x.priority} priority in ${x.step} step cannot be overridden by "${Ii(h,p)}" middleware with ${E.priority} priority in ${E.step} step.`);e.splice(w,1)}}for(const y of g)r.add(y)}e.push(E)},addRelativeTo:(f,m)=>{const{name:h,override:b,aliases:p}=m,E={middleware:f,...m},g=da(h,p);if(g.length>0){if(g.some(y=>r.has(y))){if(!b)throw new Error(`Duplicate middleware name '${Ii(h,p)}'`);for(const y of g){const w=t.findIndex(S=>{var C;return S.name===y||((C=S.aliases)==null?void 0:C.some(T=>T===y))});if(w===-1)continue;const x=t[w];if(x.toMiddleware!==E.toMiddleware||x.relation!==E.relation)throw new Error(`"${Ii(x.name,x.aliases)}" middleware ${x.relation} "${x.toMiddleware}" middleware cannot be overridden by "${Ii(h,p)}" middleware ${E.relation} "${E.toMiddleware}" middleware.`);t.splice(w,1)}}for(const y of g)r.add(y)}t.push(E)},clone:()=>o(Sf()),use:f=>{f.applyToStack(u)},remove:f=>typeof f=="string"?i(f):a(f),removeByTag:f=>{let m=!1;const h=b=>{const{tags:p,name:E,aliases:g}=b;if(p&&p.includes(f)){const y=da(E,g);for(const w of y)r.delete(w);return m=!0,!1}return!0};return e=e.filter(h),t=t.filter(h),m},concat:f=>{var h;const m=o(Sf());return m.use(f),m.identifyOnResolve(n||m.identifyOnResolve()||(((h=f.identifyOnResolve)==null?void 0:h.call(f))??!1)),m},applyToStack:o,identify:()=>l(!0).map(f=>{const m=f.step??f.relation+" "+f.toMiddleware;return Ii(f.name,f.aliases)+" - "+m}),identifyOnResolve(f){return typeof f=="boolean"&&(n=f),n},resolve:(f,m)=>{for(const h of l().map(b=>b.middleware).reverse())f=h(f,m);return n&&console.log(u.identify()),f}};return u},$1={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},H1={high:3,normal:2,low:1};class jD{constructor(t){this.config=t,this.middlewareStack=Sf()}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(){var t,n,r;(r=(n=(t=this.config)==null?void 0:t.requestHandler)==null?void 0:n.destroy)==null||r.call(n),delete this.handlers}}class Ce{constructor(){this.middlewareStack=Sf()}static classBuilder(){return new WD}resolveMiddlewareWithContext(t,n,r,{middlewareFn:s,clientName:i,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:c,smithyContext:l,additionalContext:u,CommandCtor:f}){for(const E of s.bind(this)(f,t,n,r))this.middlewareStack.use(E);const m=t.concat(this.middlewareStack),{logger:h}=n,b={logger:h,clientName:i,commandName:a,inputFilterSensitiveLog:o,outputFilterSensitiveLog:c,[Hm]:{commandInstance:this,...l},...u},{requestHandler:p}=n;return m.resolve(E=>p.handle(E.request,r||{}),b)}}class WD{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}build(){const t=this;let n;return n=class extends Ce{static getEndpointParameterInstructions(){return t._ep}constructor(...[r]){super(),this.serialize=t._serializer,this.deserialize=t._deserializer,this.input=r??{},t._init(this)}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***",GD=(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}},Pt=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},VD=e=>{if(e!=null){if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&w_.warn(S_(`Expected number but observed string: ${e}`)),t}if(typeof e=="number")return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},KD=Math.ceil(2**127*(2-2**-23)),q1=e=>{const t=VD(e);if(t!==void 0&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>KD)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},Km=e=>{if(e!=null){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},j1=e=>Hg(e,32),W1=e=>Hg(e,16),G1=e=>Hg(e,8),Hg=(e,t)=>{const n=Km(e);if(n!==void 0&&YD(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},YD=(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]}},Ge=(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},pt=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}`)},M=e=>{if(e!=null){if(typeof e=="string")return e;if(["boolean","number","bigint"].includes(typeof e))return w_.warn(S_(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},T_=e=>{if(e==null)return;const t=pt(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},XD=e=>q1(typeof e=="string"?Tu(e):e),QD=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Tu=e=>{const t=e.match(QD);if(t===null||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},ur=e=>Km(typeof e=="string"?Tu(e):e),Jt=e=>j1(typeof e=="string"?Tu(e):e),wf=e=>W1(typeof e=="string"?Tu(e):e),ZD=e=>G1(typeof e=="string"?Tu(e):e),S_=e=>String(new TypeError(e).stack||e).split(`
1554
+ `).slice(0,5).filter(t=>!t.includes("stackTraceWarning")).join(`
1555
+ `),w_={warn:console.warn},JD=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dr(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}`,u=a<10?`0${a}`:`${a}`,f=o<10?`0${o}`:`${o}`;return`${JD[r]}, ${c} ${qg[n]} ${t} ${l}:${u}:${f} GMT`}const e5=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Hr=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=e5.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,s,i,a,o,c,l,u]=t,f=wf(lu(r)),m=qi(s,"month",1,12),h=qi(i,"day",1,31),b=_d(f,m,h,{hours:a,minutes:o,seconds:c,fractionalMilliseconds:l});return u.toUpperCase()!="Z"&&b.setTime(b.getTime()-d5(u)),b},t5=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$/),n5=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$/),r5=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})$/),Xi=e=>{if(e==null)return;if(typeof e!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=t5.exec(e);if(t){const[n,r,s,i,a,o,c,l]=t;return _d(wf(lu(i)),s0(s),qi(r,"day",1,31),{hours:a,minutes:o,seconds:c,fractionalMilliseconds:l})}if(t=n5.exec(e),t){const[n,r,s,i,a,o,c,l]=t;return a5(_d(s5(i),s0(s),qi(r,"day",1,31),{hours:a,minutes:o,seconds:c,fractionalMilliseconds:l}))}if(t=r5.exec(e),t){const[n,r,s,i,a,o,c,l]=t;return _d(wf(lu(l)),s0(r),qi(s.trimLeft(),"day",1,31),{hours:i,minutes:a,seconds:o,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},_d=(e,t,n,r)=>{const s=t-1;return c5(e,s,n),new Date(Date.UTC(e,s,n,qi(r.hours,"hour",0,23),qi(r.minutes,"minute",0,59),qi(r.seconds,"seconds",0,60),u5(r.fractionalMilliseconds)))},s5=e=>{const t=new Date().getUTCFullYear(),n=Math.floor(t/100)*100+wf(lu(e));return n<t?n+100:n},i5=50*365*24*60*60*1e3,a5=e=>e.getTime()-new Date().getTime()>i5?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,s0=e=>{const t=qg.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},o5=[31,28,31,30,31,30,31,31,30,31,30,31],c5=(e,t,n)=>{let r=o5[t];if(t===1&&l5(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${qg[t]} in ${e}: ${n}`)},l5=e=>e%4===0&&(e%100!==0||e%400===0),qi=(e,t,n,r)=>{const s=ZD(lu(e));if(s<n||s>r)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return s},u5=e=>e==null?0:XD("0."+e)*1e3,d5=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},lu=e=>{let t=0;for(;t<e.length-1&&e.charAt(t)==="0";)t++;return t===0?e:e.slice(t)};class Ho 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 Ho.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===Ho?Ho.isInstance(t):Ho.isInstance(t)?n.name&&this.name?this.prototype.isPrototypeOf(t)||n.name===this.name:this.prototype.isPrototypeOf(t):!1}}const ts=(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},f5=({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const s=m5(e),i=s.httpStatusCode?s.httpStatusCode+"":void 0,a=new n({name:(t==null?void 0:t.code)||(t==null?void 0:t.Code)||r||i||"UnknownError",$fault:"client",$metadata:s});throw ts(a,t)},h5=e=>({output:t,parsedBody:n,errorCode:r})=>{f5({output:t,parsedBody:n,exceptionCtor:e,errorCode:r})},m5=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"]}),b5=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{}}},g5=e=>{const t=[];for(const n in Tf){const r=Tf[n];e[r]!==void 0&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(n){this._checksumAlgorithms.push(n)},checksumAlgorithms(){return this._checksumAlgorithms}}},p5=e=>{const t={};return e.checksumAlgorithms().forEach(n=>{t[n.algorithmId()]=n.checksumConstructor()}),t},y5=e=>{let t=e.retryStrategy;return{setRetryStrategy(n){t=n},retryStrategy(){return t}}},E5=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},C5=e=>({...g5(e),...y5(e)}),x5=e=>({...p5(e),...E5(e)}),at=e=>Array.isArray(e)?e:[e],A_=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]=A_(e[n]));return e},re=e=>e!=null;class jg{trace(){}debug(){}info(){}warn(){}error(){}}function I(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,v5(r,s,i);i=t}for(const a of Object.keys(i)){if(!Array.isArray(i[a])){r[a]=i[a];continue}_5(r,null,i,a)}return r}const v5=(e,t,n)=>I(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),{})),_5=(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)}};function dh(e){return(e.includes(",")||e.includes('"'))&&(e=`"${e.replace(/"/g,'\\"')}"`),e}const bo=e=>e.toISOString().replace(".000Z","Z"),T5=(e,t)=>ot(e,t).then(n=>t.utf8Encoder(n));var i0={},a0={},V1;function Wg(){return V1||(V1=1,function(e){const t=":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",n=t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",r="["+t+"]["+n+"]*",s=new RegExp("^"+r+"$"),i=function(o,c){const l=[];let u=c.exec(o);for(;u;){const f=[];f.startIndex=c.lastIndex-u[0].length;const m=u.length;for(let h=0;h<m;h++)f.push(u[h]);l.push(f),u=c.exec(o)}return l},a=function(o){const c=s.exec(o);return!(c===null||typeof c>"u")};e.isExist=function(o){return typeof o<"u"},e.isEmptyObject=function(o){return Object.keys(o).length===0},e.merge=function(o,c,l){if(c){const u=Object.keys(c),f=u.length;for(let m=0;m<f;m++)l==="strict"?o[u[m]]=[c[u[m]]]:o[u[m]]=c[u[m]]}},e.getValue=function(o){return e.isExist(o)?o:""},e.isName=a,e.getAllMatches=i,e.nameRegexp=r}(a0)),a0}var K1;function k_(){if(K1)return i0;K1=1;const e=Wg(),t={allowBooleanAttributes:!1,unpairedTags:[]};i0.validate=function(g,y){y=Object.assign({},t,y);const w=[];let x=!1,S=!1;g[0]==="\uFEFF"&&(g=g.substr(1));for(let C=0;C<g.length;C++)if(g[C]==="<"&&g[C+1]==="?"){if(C+=2,C=r(g,C),C.err)return C}else if(g[C]==="<"){let T=C;if(C++,g[C]==="!"){C=s(g,C);continue}else{let k=!1;g[C]==="/"&&(k=!0,C++);let R="";for(;C<g.length&&g[C]!==">"&&g[C]!==" "&&g[C]!==" "&&g[C]!==`
1556
+ `&&g[C]!=="\r";C++)R+=g[C];if(R=R.trim(),R[R.length-1]==="/"&&(R=R.substring(0,R.length-1),C--),!b(R)){let A;return R.trim().length===0?A="Invalid space after '<'.":A="Tag '"+R+"' is an invalid name.",m("InvalidTag",A,p(g,C))}const V=o(g,C);if(V===!1)return m("InvalidAttr","Attributes for '"+R+"' have open quote.",p(g,C));let Q=V.value;if(C=V.index,Q[Q.length-1]==="/"){const A=C-Q.length;Q=Q.substring(0,Q.length-1);const W=l(Q,y);if(W===!0)x=!0;else return m(W.err.code,W.err.msg,p(g,A+W.err.line))}else if(k)if(V.tagClosed){if(Q.trim().length>0)return m("InvalidTag","Closing tag '"+R+"' can't have attributes or invalid starting.",p(g,T));if(w.length===0)return m("InvalidTag","Closing tag '"+R+"' has not been opened.",p(g,T));{const A=w.pop();if(R!==A.tagName){let W=p(g,A.tagStartPos);return m("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+W.line+", col "+W.col+") instead of closing tag '"+R+"'.",p(g,T))}w.length==0&&(S=!0)}}else return m("InvalidTag","Closing tag '"+R+"' doesn't have proper closing.",p(g,C));else{const A=l(Q,y);if(A!==!0)return m(A.err.code,A.err.msg,p(g,C-Q.length+A.err.line));if(S===!0)return m("InvalidXml","Multiple possible root nodes found.",p(g,C));y.unpairedTags.indexOf(R)!==-1||w.push({tagName:R,tagStartPos:T}),x=!0}for(C++;C<g.length;C++)if(g[C]==="<")if(g[C+1]==="!"){C++,C=s(g,C);continue}else if(g[C+1]==="?"){if(C=r(g,++C),C.err)return C}else break;else if(g[C]==="&"){const A=f(g,C);if(A==-1)return m("InvalidChar","char '&' is not expected.",p(g,C));C=A}else if(S===!0&&!n(g[C]))return m("InvalidXml","Extra text at the end",p(g,C));g[C]==="<"&&C--}}else{if(n(g[C]))continue;return m("InvalidChar","char '"+g[C]+"' is not expected.",p(g,C))}if(x){if(w.length==1)return m("InvalidTag","Unclosed tag '"+w[0].tagName+"'.",p(g,w[0].tagStartPos));if(w.length>0)return m("InvalidXml","Invalid '"+JSON.stringify(w.map(C=>C.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return m("InvalidXml","Start tag expected.",1);return!0};function n(g){return g===" "||g===" "||g===`
1557
+ `||g==="\r"}function r(g,y){const w=y;for(;y<g.length;y++)if(g[y]=="?"||g[y]==" "){const x=g.substr(w,y-w);if(y>5&&x==="xml")return m("InvalidXml","XML declaration allowed only at the start of the document.",p(g,y));if(g[y]=="?"&&g[y+1]==">"){y++;break}else continue}return y}function s(g,y){if(g.length>y+5&&g[y+1]==="-"&&g[y+2]==="-"){for(y+=3;y<g.length;y++)if(g[y]==="-"&&g[y+1]==="-"&&g[y+2]===">"){y+=2;break}}else if(g.length>y+8&&g[y+1]==="D"&&g[y+2]==="O"&&g[y+3]==="C"&&g[y+4]==="T"&&g[y+5]==="Y"&&g[y+6]==="P"&&g[y+7]==="E"){let w=1;for(y+=8;y<g.length;y++)if(g[y]==="<")w++;else if(g[y]===">"&&(w--,w===0))break}else if(g.length>y+9&&g[y+1]==="["&&g[y+2]==="C"&&g[y+3]==="D"&&g[y+4]==="A"&&g[y+5]==="T"&&g[y+6]==="A"&&g[y+7]==="["){for(y+=8;y<g.length;y++)if(g[y]==="]"&&g[y+1]==="]"&&g[y+2]===">"){y+=2;break}}return y}const i='"',a="'";function o(g,y){let w="",x="",S=!1;for(;y<g.length;y++){if(g[y]===i||g[y]===a)x===""?x=g[y]:x!==g[y]||(x="");else if(g[y]===">"&&x===""){S=!0;break}w+=g[y]}return x!==""?!1:{value:w,index:y,tagClosed:S}}const c=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function l(g,y){const w=e.getAllMatches(g,c),x={};for(let S=0;S<w.length;S++){if(w[S][1].length===0)return m("InvalidAttr","Attribute '"+w[S][2]+"' has no space in starting.",E(w[S]));if(w[S][3]!==void 0&&w[S][4]===void 0)return m("InvalidAttr","Attribute '"+w[S][2]+"' is without value.",E(w[S]));if(w[S][3]===void 0&&!y.allowBooleanAttributes)return m("InvalidAttr","boolean attribute '"+w[S][2]+"' is not allowed.",E(w[S]));const C=w[S][2];if(!h(C))return m("InvalidAttr","Attribute '"+C+"' is an invalid name.",E(w[S]));if(!x.hasOwnProperty(C))x[C]=1;else return m("InvalidAttr","Attribute '"+C+"' is repeated.",E(w[S]))}return!0}function u(g,y){let w=/\d/;for(g[y]==="x"&&(y++,w=/[\da-fA-F]/);y<g.length;y++){if(g[y]===";")return y;if(!g[y].match(w))break}return-1}function f(g,y){if(y++,g[y]===";")return-1;if(g[y]==="#")return y++,u(g,y);let w=0;for(;y<g.length;y++,w++)if(!(g[y].match(/\w/)&&w<20)){if(g[y]===";")break;return-1}return y}function m(g,y,w){return{err:{code:g,msg:y,line:w.line||w,col:w.col}}}function h(g){return e.isName(g)}function b(g){return e.isName(g)}function p(g,y){const w=g.substring(0,y).split(/\r?\n/);return{line:w.length,col:w[w.length-1].length+1}}function E(g){return g.startIndex+g[1].length}return i0}var nd={},Y1;function S5(){if(Y1)return nd;Y1=1;const e={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(n,r){return r},attributeValueProcessor:function(n,r){return r},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,r,s){return n}},t=function(n){return Object.assign({},e,n)};return nd.buildOptions=t,nd.defaultOptions=e,nd}var o0,X1;function w5(){if(X1)return o0;X1=1;class e{constructor(n){this.tagname=n,this.child=[],this[":@"]={}}add(n,r){n==="__proto__"&&(n="#__proto__"),this.child.push({[n]:r})}addChild(n){n.tagname==="__proto__"&&(n.tagname="#__proto__"),n[":@"]&&Object.keys(n[":@"]).length>0?this.child.push({[n.tagname]:n.child,":@":n[":@"]}):this.child.push({[n.tagname]:n.child})}}return o0=e,o0}var c0,Q1;function A5(){if(Q1)return c0;Q1=1;const e=Wg();function t(l,u){const f={};if(l[u+3]==="O"&&l[u+4]==="C"&&l[u+5]==="T"&&l[u+6]==="Y"&&l[u+7]==="P"&&l[u+8]==="E"){u=u+9;let m=1,h=!1,b=!1,p="";for(;u<l.length;u++)if(l[u]==="<"&&!b){if(h&&s(l,u))u+=7,[entityName,val,u]=n(l,u+1),val.indexOf("&")===-1&&(f[c(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(h&&i(l,u))u+=8;else if(h&&a(l,u))u+=8;else if(h&&o(l,u))u+=9;else if(r)b=!0;else throw new Error("Invalid DOCTYPE");m++,p=""}else if(l[u]===">"){if(b?l[u-1]==="-"&&l[u-2]==="-"&&(b=!1,m--):m--,m===0)break}else l[u]==="["?h=!0:p+=l[u];if(m!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:u}}function n(l,u){let f="";for(;u<l.length&&l[u]!=="'"&&l[u]!=='"';u++)f+=l[u];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const m=l[u++];let h="";for(;u<l.length&&l[u]!==m;u++)h+=l[u];return[f,h,u]}function r(l,u){return l[u+1]==="!"&&l[u+2]==="-"&&l[u+3]==="-"}function s(l,u){return l[u+1]==="!"&&l[u+2]==="E"&&l[u+3]==="N"&&l[u+4]==="T"&&l[u+5]==="I"&&l[u+6]==="T"&&l[u+7]==="Y"}function i(l,u){return l[u+1]==="!"&&l[u+2]==="E"&&l[u+3]==="L"&&l[u+4]==="E"&&l[u+5]==="M"&&l[u+6]==="E"&&l[u+7]==="N"&&l[u+8]==="T"}function a(l,u){return l[u+1]==="!"&&l[u+2]==="A"&&l[u+3]==="T"&&l[u+4]==="T"&&l[u+5]==="L"&&l[u+6]==="I"&&l[u+7]==="S"&&l[u+8]==="T"}function o(l,u){return l[u+1]==="!"&&l[u+2]==="N"&&l[u+3]==="O"&&l[u+4]==="T"&&l[u+5]==="A"&&l[u+6]==="T"&&l[u+7]==="I"&&l[u+8]==="O"&&l[u+9]==="N"}function c(l){if(e.isName(l))return l;throw new Error(`Invalid entity name ${l}`)}return c0=t,c0}var l0,Z1;function k5(){if(Z1)return l0;Z1=1;const e=/^[-+]?0x[a-fA-F0-9]+$/,t=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function r(a,o={}){if(o=Object.assign({},n,o),!a||typeof a!="string")return a;let c=a.trim();if(o.skipLike!==void 0&&o.skipLike.test(c))return a;if(a==="0")return 0;if(o.hex&&e.test(c))return i(c,16);if(c.search(/[eE]/)!==-1){const l=c.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(l){if(o.leadingZeros)c=(l[1]||"")+l[3];else if(!(l[2]==="0"&&l[3][0]==="."))return a;return o.eNotation?Number(c):a}else return a}else{const l=t.exec(c);if(l){const u=l[1],f=l[2];let m=s(l[3]);if(!o.leadingZeros&&f.length>0&&u&&c[2]!==".")return a;if(!o.leadingZeros&&f.length>0&&!u&&c[1]!==".")return a;if(o.leadingZeros&&f===a)return 0;{const h=Number(c),b=""+h;return b.search(/[eE]/)!==-1?o.eNotation?h:a:c.indexOf(".")!==-1?b==="0"&&m===""||b===m||u&&b==="-"+m?h:a:f?m===b||u+m===b?h:a:c===b||c===u+b?h:a}}else return a}}function s(a){return a&&a.indexOf(".")!==-1&&(a=a.replace(/0+$/,""),a==="."?a="0":a[0]==="."?a="0"+a:a[a.length-1]==="."&&(a=a.substr(0,a.length-1))),a}function i(a,o){if(parseInt)return parseInt(a,o);if(Number.parseInt)return Number.parseInt(a,o);if(window&&window.parseInt)return window.parseInt(a,o);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}return l0=r,l0}var u0,J1;function R5(){if(J1)return u0;J1=1;const e=Wg(),t=w5(),n=A5(),r=k5();class s{constructor(S){this.options=S,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:(C,T)=>String.fromCharCode(Number.parseInt(T,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(C,T)=>String.fromCharCode(Number.parseInt(T,16))}},this.addExternalEntities=i,this.parseXml=u,this.parseTextData=a,this.resolveNameSpace=o,this.buildAttributesMap=l,this.isItStopNode=b,this.replaceEntitiesValue=m,this.readStopNodeData=y,this.saveTextToParentTag=h,this.addChild=f}}function i(x){const S=Object.keys(x);for(let C=0;C<S.length;C++){const T=S[C];this.lastEntities[T]={regex:new RegExp("&"+T+";","g"),val:x[T]}}}function a(x,S,C,T,k,R,V){if(x!==void 0&&(this.options.trimValues&&!T&&(x=x.trim()),x.length>0)){V||(x=this.replaceEntitiesValue(x));const Q=this.options.tagValueProcessor(S,x,C,k,R);return Q==null?x:typeof Q!=typeof x||Q!==x?Q:this.options.trimValues?w(x,this.options.parseTagValue,this.options.numberParseOptions):x.trim()===x?w(x,this.options.parseTagValue,this.options.numberParseOptions):x}}function o(x){if(this.options.removeNSPrefix){const S=x.split(":"),C=x.charAt(0)==="/"?"/":"";if(S[0]==="xmlns")return"";S.length===2&&(x=C+S[1])}return x}const c=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function l(x,S,C){if(!this.options.ignoreAttributes&&typeof x=="string"){const T=e.getAllMatches(x,c),k=T.length,R={};for(let V=0;V<k;V++){const Q=this.resolveNameSpace(T[V][1]);let A=T[V][4],W=this.options.attributeNamePrefix+Q;if(Q.length)if(this.options.transformAttributeName&&(W=this.options.transformAttributeName(W)),W==="__proto__"&&(W="#__proto__"),A!==void 0){this.options.trimValues&&(A=A.trim()),A=this.replaceEntitiesValue(A);const _=this.options.attributeValueProcessor(Q,A,S);_==null?R[W]=A:typeof _!=typeof A||_!==A?R[W]=_:R[W]=w(A,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(R[W]=!0)}if(!Object.keys(R).length)return;if(this.options.attributesGroupName){const V={};return V[this.options.attributesGroupName]=R,V}return R}}const u=function(x){x=x.replace(/\r\n?/g,`
1558
+ `);const S=new t("!xml");let C=S,T="",k="";for(let R=0;R<x.length;R++)if(x[R]==="<")if(x[R+1]==="/"){const Q=E(x,">",R,"Closing Tag is not closed.");let A=x.substring(R+2,Q).trim();if(this.options.removeNSPrefix){const Y=A.indexOf(":");Y!==-1&&(A=A.substr(Y+1))}this.options.transformTagName&&(A=this.options.transformTagName(A)),C&&(T=this.saveTextToParentTag(T,C,k));const W=k.substring(k.lastIndexOf(".")+1);if(A&&this.options.unpairedTags.indexOf(A)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${A}>`);let _=0;W&&this.options.unpairedTags.indexOf(W)!==-1?(_=k.lastIndexOf(".",k.lastIndexOf(".")-1),this.tagsNodeStack.pop()):_=k.lastIndexOf("."),k=k.substring(0,_),C=this.tagsNodeStack.pop(),T="",R=Q}else if(x[R+1]==="?"){let Q=g(x,R,!1,"?>");if(!Q)throw new Error("Pi Tag is not closed.");if(T=this.saveTextToParentTag(T,C,k),!(this.options.ignoreDeclaration&&Q.tagName==="?xml"||this.options.ignorePiTags)){const A=new t(Q.tagName);A.add(this.options.textNodeName,""),Q.tagName!==Q.tagExp&&Q.attrExpPresent&&(A[":@"]=this.buildAttributesMap(Q.tagExp,k,Q.tagName)),this.addChild(C,A,k)}R=Q.closeIndex+1}else if(x.substr(R+1,3)==="!--"){const Q=E(x,"-->",R+4,"Comment is not closed.");if(this.options.commentPropName){const A=x.substring(R+4,Q-2);T=this.saveTextToParentTag(T,C,k),C.add(this.options.commentPropName,[{[this.options.textNodeName]:A}])}R=Q}else if(x.substr(R+1,2)==="!D"){const Q=n(x,R);this.docTypeEntities=Q.entities,R=Q.i}else if(x.substr(R+1,2)==="!["){const Q=E(x,"]]>",R,"CDATA is not closed.")-2,A=x.substring(R+9,Q);T=this.saveTextToParentTag(T,C,k);let W=this.parseTextData(A,C.tagname,k,!0,!1,!0,!0);W==null&&(W=""),this.options.cdataPropName?C.add(this.options.cdataPropName,[{[this.options.textNodeName]:A}]):C.add(this.options.textNodeName,W),R=Q+2}else{let Q=g(x,R,this.options.removeNSPrefix),A=Q.tagName;const W=Q.rawTagName;let _=Q.tagExp,Y=Q.attrExpPresent,De=Q.closeIndex;this.options.transformTagName&&(A=this.options.transformTagName(A)),C&&T&&C.tagname!=="!xml"&&(T=this.saveTextToParentTag(T,C,k,!1));const te=C;if(te&&this.options.unpairedTags.indexOf(te.tagname)!==-1&&(C=this.tagsNodeStack.pop(),k=k.substring(0,k.lastIndexOf("."))),A!==S.tagname&&(k+=k?"."+A:A),this.isItStopNode(this.options.stopNodes,k,A)){let Me="";if(_.length>0&&_.lastIndexOf("/")===_.length-1)A[A.length-1]==="/"?(A=A.substr(0,A.length-1),k=k.substr(0,k.length-1),_=A):_=_.substr(0,_.length-1),R=Q.closeIndex;else if(this.options.unpairedTags.indexOf(A)!==-1)R=Q.closeIndex;else{const Ue=this.readStopNodeData(x,W,De+1);if(!Ue)throw new Error(`Unexpected end of ${W}`);R=Ue.i,Me=Ue.tagContent}const de=new t(A);A!==_&&Y&&(de[":@"]=this.buildAttributesMap(_,k,A)),Me&&(Me=this.parseTextData(Me,A,k,!0,Y,!0,!0)),k=k.substr(0,k.lastIndexOf(".")),de.add(this.options.textNodeName,Me),this.addChild(C,de,k)}else{if(_.length>0&&_.lastIndexOf("/")===_.length-1){A[A.length-1]==="/"?(A=A.substr(0,A.length-1),k=k.substr(0,k.length-1),_=A):_=_.substr(0,_.length-1),this.options.transformTagName&&(A=this.options.transformTagName(A));const Me=new t(A);A!==_&&Y&&(Me[":@"]=this.buildAttributesMap(_,k,A)),this.addChild(C,Me,k),k=k.substr(0,k.lastIndexOf("."))}else{const Me=new t(A);this.tagsNodeStack.push(C),A!==_&&Y&&(Me[":@"]=this.buildAttributesMap(_,k,A)),this.addChild(C,Me,k),C=Me}T="",R=De}}else T+=x[R];return S.child};function f(x,S,C){const T=this.options.updateTag(S.tagname,C,S[":@"]);T===!1||(typeof T=="string"&&(S.tagname=T),x.addChild(S))}const m=function(x){if(this.options.processEntities){for(let S in this.docTypeEntities){const C=this.docTypeEntities[S];x=x.replace(C.regx,C.val)}for(let S in this.lastEntities){const C=this.lastEntities[S];x=x.replace(C.regex,C.val)}if(this.options.htmlEntities)for(let S in this.htmlEntities){const C=this.htmlEntities[S];x=x.replace(C.regex,C.val)}x=x.replace(this.ampEntity.regex,this.ampEntity.val)}return x};function h(x,S,C,T){return x&&(T===void 0&&(T=Object.keys(S.child).length===0),x=this.parseTextData(x,S.tagname,C,!1,S[":@"]?Object.keys(S[":@"]).length!==0:!1,T),x!==void 0&&x!==""&&S.add(this.options.textNodeName,x),x=""),x}function b(x,S,C){const T="*."+C;for(const k in x){const R=x[k];if(T===R||S===R)return!0}return!1}function p(x,S,C=">"){let T,k="";for(let R=S;R<x.length;R++){let V=x[R];if(T)V===T&&(T="");else if(V==='"'||V==="'")T=V;else if(V===C[0])if(C[1]){if(x[R+1]===C[1])return{data:k,index:R}}else return{data:k,index:R};else V===" "&&(V=" ");k+=V}}function E(x,S,C,T){const k=x.indexOf(S,C);if(k===-1)throw new Error(T);return k+S.length-1}function g(x,S,C,T=">"){const k=p(x,S+1,T);if(!k)return;let R=k.data;const V=k.index,Q=R.search(/\s/);let A=R,W=!0;Q!==-1&&(A=R.substring(0,Q),R=R.substring(Q+1).trimStart());const _=A;if(C){const Y=A.indexOf(":");Y!==-1&&(A=A.substr(Y+1),W=A!==k.data.substr(Y+1))}return{tagName:A,tagExp:R,closeIndex:V,attrExpPresent:W,rawTagName:_}}function y(x,S,C){const T=C;let k=1;for(;C<x.length;C++)if(x[C]==="<")if(x[C+1]==="/"){const R=E(x,">",C,`${S} is not closed`);if(x.substring(C+2,R).trim()===S&&(k--,k===0))return{tagContent:x.substring(T,C),i:R};C=R}else if(x[C+1]==="?")C=E(x,"?>",C+1,"StopNode is not closed.");else if(x.substr(C+1,3)==="!--")C=E(x,"-->",C+3,"StopNode is not closed.");else if(x.substr(C+1,2)==="![")C=E(x,"]]>",C,"StopNode is not closed.")-2;else{const R=g(x,C,">");R&&((R&&R.tagName)===S&&R.tagExp[R.tagExp.length-1]!=="/"&&k++,C=R.closeIndex)}}function w(x,S,C){if(S&&typeof x=="string"){const T=x.trim();return T==="true"?!0:T==="false"?!1:r(x,C)}else return e.isExist(x)?x:""}return u0=s,u0}var d0={},eE;function I5(){if(eE)return d0;eE=1;function e(i,a){return t(i,a)}function t(i,a,o){let c;const l={};for(let u=0;u<i.length;u++){const f=i[u],m=n(f);let h="";if(o===void 0?h=m:h=o+"."+m,m===a.textNodeName)c===void 0?c=f[m]:c+=""+f[m];else{if(m===void 0)continue;if(f[m]){let b=t(f[m],a,h);const p=s(b,a);f[":@"]?r(b,f[":@"],h,a):Object.keys(b).length===1&&b[a.textNodeName]!==void 0&&!a.alwaysCreateTextNode?b=b[a.textNodeName]:Object.keys(b).length===0&&(a.alwaysCreateTextNode?b[a.textNodeName]="":b=""),l[m]!==void 0&&l.hasOwnProperty(m)?(Array.isArray(l[m])||(l[m]=[l[m]]),l[m].push(b)):a.isArray(m,h,p)?l[m]=[b]:l[m]=b}}}return typeof c=="string"?c.length>0&&(l[a.textNodeName]=c):c!==void 0&&(l[a.textNodeName]=c),l}function n(i){const a=Object.keys(i);for(let o=0;o<a.length;o++){const c=a[o];if(c!==":@")return c}}function r(i,a,o,c){if(a){const l=Object.keys(a),u=l.length;for(let f=0;f<u;f++){const m=l[f];c.isArray(m,o+"."+m,!0,!0)?i[m]=[a[m]]:i[m]=a[m]}}}function s(i,a){const{textNodeName:o}=a,c=Object.keys(i).length;return!!(c===0||c===1&&(i[o]||typeof i[o]=="boolean"||i[o]===0))}return d0.prettify=e,d0}var f0,tE;function B5(){if(tE)return f0;tE=1;const{buildOptions:e}=S5(),t=R5(),{prettify:n}=I5(),r=k_();class s{constructor(a){this.externalEntities={},this.options=e(a)}parse(a,o){if(typeof a!="string")if(a.toString)a=a.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(o){o===!0&&(o={});const u=r.validate(a,o);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const c=new t(this.options);c.addExternalEntities(this.externalEntities);const l=c.parseXml(a);return this.options.preserveOrder||l===void 0?l:n(l,this.options)}addEntity(a,o){if(o.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(a.indexOf("&")!==-1||a.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(o==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[a]=o}}return f0=s,f0}var h0,nE;function P5(){if(nE)return h0;nE=1;const e=`
1559
+ `;function t(o,c){let l="";return c.format&&c.indentBy.length>0&&(l=e),n(o,c,"",l)}function n(o,c,l,u){let f="",m=!1;for(let h=0;h<o.length;h++){const b=o[h],p=r(b);if(p===void 0)continue;let E="";if(l.length===0?E=p:E=`${l}.${p}`,p===c.textNodeName){let S=b[p];i(E,c)||(S=c.tagValueProcessor(p,S),S=a(S,c)),m&&(f+=u),f+=S,m=!1;continue}else if(p===c.cdataPropName){m&&(f+=u),f+=`<![CDATA[${b[p][0][c.textNodeName]}]]>`,m=!1;continue}else if(p===c.commentPropName){f+=u+`<!--${b[p][0][c.textNodeName]}-->`,m=!0;continue}else if(p[0]==="?"){const S=s(b[":@"],c),C=p==="?xml"?"":u;let T=b[p][0][c.textNodeName];T=T.length!==0?" "+T:"",f+=C+`<${p}${T}${S}?>`,m=!0;continue}let g=u;g!==""&&(g+=c.indentBy);const y=s(b[":@"],c),w=u+`<${p}${y}`,x=n(b[p],c,E,g);c.unpairedTags.indexOf(p)!==-1?c.suppressUnpairedNode?f+=w+">":f+=w+"/>":(!x||x.length===0)&&c.suppressEmptyNode?f+=w+"/>":x&&x.endsWith(">")?f+=w+`>${x}${u}</${p}>`:(f+=w+">",x&&u!==""&&(x.includes("/>")||x.includes("</"))?f+=u+c.indentBy+x+u:f+=x,f+=`</${p}>`),m=!0}return f}function r(o){const c=Object.keys(o);for(let l=0;l<c.length;l++){const u=c[l];if(o.hasOwnProperty(u)&&u!==":@")return u}}function s(o,c){let l="";if(o&&!c.ignoreAttributes)for(let u in o){if(!o.hasOwnProperty(u))continue;let f=c.attributeValueProcessor(u,o[u]);f=a(f,c),f===!0&&c.suppressBooleanAttributes?l+=` ${u.substr(c.attributeNamePrefix.length)}`:l+=` ${u.substr(c.attributeNamePrefix.length)}="${f}"`}return l}function i(o,c){o=o.substr(0,o.length-c.textNodeName.length-1);let l=o.substr(o.lastIndexOf(".")+1);for(let u in c.stopNodes)if(c.stopNodes[u]===o||c.stopNodes[u]==="*."+l)return!0;return!1}function a(o,c){if(o&&o.length>0&&c.processEntities)for(let l=0;l<c.entities.length;l++){const u=c.entities[l];o=o.replace(u.regex,u.val)}return o}return h0=t,h0}var m0,rE;function N5(){if(rE)return m0;rE=1;const e=P5(),t={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(a,o){return o},attributeValueProcessor:function(a,o){return o},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function n(a){this.options=Object.assign({},t,a),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=i),this.processTextOrObjNode=r,this.options.format?(this.indentate=s,this.tagEndChar=`>
1560
+ `,this.newLine=`
1561
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}n.prototype.build=function(a){return this.options.preserveOrder?e(a,this.options):(Array.isArray(a)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(a={[this.options.arrayNodeName]:a}),this.j2x(a,0).val)},n.prototype.j2x=function(a,o){let c="",l="";for(let u in a)if(Object.prototype.hasOwnProperty.call(a,u))if(typeof a[u]>"u")this.isAttribute(u)&&(l+="");else if(a[u]===null)this.isAttribute(u)?l+="":u[0]==="?"?l+=this.indentate(o)+"<"+u+"?"+this.tagEndChar:l+=this.indentate(o)+"<"+u+"/"+this.tagEndChar;else if(a[u]instanceof Date)l+=this.buildTextValNode(a[u],u,"",o);else if(typeof a[u]!="object"){const f=this.isAttribute(u);if(f)c+=this.buildAttrPairStr(f,""+a[u]);else if(u===this.options.textNodeName){let m=this.options.tagValueProcessor(u,""+a[u]);l+=this.replaceEntitiesValue(m)}else l+=this.buildTextValNode(a[u],u,"",o)}else if(Array.isArray(a[u])){const f=a[u].length;let m="",h="";for(let b=0;b<f;b++){const p=a[u][b];if(!(typeof p>"u"))if(p===null)u[0]==="?"?l+=this.indentate(o)+"<"+u+"?"+this.tagEndChar:l+=this.indentate(o)+"<"+u+"/"+this.tagEndChar;else if(typeof p=="object")if(this.options.oneListGroup){const E=this.j2x(p,o+1);m+=E.val,this.options.attributesGroupName&&p.hasOwnProperty(this.options.attributesGroupName)&&(h+=E.attrStr)}else m+=this.processTextOrObjNode(p,u,o);else if(this.options.oneListGroup){let E=this.options.tagValueProcessor(u,p);E=this.replaceEntitiesValue(E),m+=E}else m+=this.buildTextValNode(p,u,"",o)}this.options.oneListGroup&&(m=this.buildObjectNode(m,u,h,o)),l+=m}else if(this.options.attributesGroupName&&u===this.options.attributesGroupName){const f=Object.keys(a[u]),m=f.length;for(let h=0;h<m;h++)c+=this.buildAttrPairStr(f[h],""+a[u][f[h]])}else l+=this.processTextOrObjNode(a[u],u,o);return{attrStr:c,val:l}},n.prototype.buildAttrPairStr=function(a,o){return o=this.options.attributeValueProcessor(a,""+o),o=this.replaceEntitiesValue(o),this.options.suppressBooleanAttributes&&o==="true"?" "+a:" "+a+'="'+o+'"'};function r(a,o,c){const l=this.j2x(a,c+1);return a[this.options.textNodeName]!==void 0&&Object.keys(a).length===1?this.buildTextValNode(a[this.options.textNodeName],o,l.attrStr,c):this.buildObjectNode(l.val,o,l.attrStr,c)}n.prototype.buildObjectNode=function(a,o,c,l){if(a==="")return o[0]==="?"?this.indentate(l)+"<"+o+c+"?"+this.tagEndChar:this.indentate(l)+"<"+o+c+this.closeTag(o)+this.tagEndChar;{let u="</"+o+this.tagEndChar,f="";return o[0]==="?"&&(f="?",u=""),(c||c==="")&&a.indexOf("<")===-1?this.indentate(l)+"<"+o+c+f+">"+a+u:this.options.commentPropName!==!1&&o===this.options.commentPropName&&f.length===0?this.indentate(l)+`<!--${a}-->`+this.newLine:this.indentate(l)+"<"+o+c+f+this.tagEndChar+a+this.indentate(l)+u}},n.prototype.closeTag=function(a){let o="";return this.options.unpairedTags.indexOf(a)!==-1?this.options.suppressUnpairedNode||(o="/"):this.options.suppressEmptyNode?o="/":o=`></${a}`,o},n.prototype.buildTextValNode=function(a,o,c,l){if(this.options.cdataPropName!==!1&&o===this.options.cdataPropName)return this.indentate(l)+`<![CDATA[${a}]]>`+this.newLine;if(this.options.commentPropName!==!1&&o===this.options.commentPropName)return this.indentate(l)+`<!--${a}-->`+this.newLine;if(o[0]==="?")return this.indentate(l)+"<"+o+c+"?"+this.tagEndChar;{let u=this.options.tagValueProcessor(o,a);return u=this.replaceEntitiesValue(u),u===""?this.indentate(l)+"<"+o+c+this.closeTag(o)+this.tagEndChar:this.indentate(l)+"<"+o+c+">"+u+"</"+o+this.tagEndChar}},n.prototype.replaceEntitiesValue=function(a){if(a&&a.length>0&&this.options.processEntities)for(let o=0;o<this.options.entities.length;o++){const c=this.options.entities[o];a=a.replace(c.regex,c.val)}return a};function s(a){return this.options.indentBy.repeat(a)}function i(a){return a.startsWith(this.options.attributeNamePrefix)&&a!==this.options.textNodeName?a.substr(this.attrPrefixLen):!1}return m0=n,m0}var b0,sE;function O5(){if(sE)return b0;sE=1;const e=k_(),t=B5(),n=N5();return b0={XMLParser:t,XMLValidator:e,XMLBuilder:n},b0}var D5=O5();const ut=(e,t)=>T5(e,t).then(n=>{if(n.length){const r=new D5.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(c,l)=>l.trim()===""&&l.includes(`
1562
+ `)?"":void 0});r.addEntity("#xD","\r"),r.addEntity("#10",`
1563
+ `);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]),A_(o)}return{}}),L5=async(e,t)=>{const n=await ut(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},M5=(e,t)=>{var n;if(((n=t==null?void 0:t.Error)==null?void 0:n.Code)!==void 0)return t.Error.Code;if((t==null?void 0:t.Code)!==void 0)return t.Code;if(e.statusCode==404)return"NotFound"},Ym=[an.CRC32,an.CRC32C,an.CRC64NVME,an.SHA1,an.SHA256],F5=[an.SHA256,an.SHA1,an.CRC32,an.CRC32C,an.CRC64NVME],z5=(e,{requestChecksumRequired:t,requestAlgorithmMember:n,requestChecksumCalculation:r})=>{if(!n)return r===Nc.WHEN_SUPPORTED||t?qm:void 0;if(!e[n])return;const s=e[n];if(!Ym.includes(s))throw new Error(`The checksum algorithm "${s}" is not supported by the client. Select one of ${Ym}.`);return s},Gg=e=>e===an.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,U5=(e,t)=>{const n=e.toLowerCase();for(const r of Object.keys(t))if(n===r.toLowerCase())return!0;return!1},$5=(e,t)=>{const n=e.toLowerCase();for(const r of Object.keys(t))if(r.toLowerCase().startsWith(n))return!0;return!1},R_=e=>e!==void 0&&typeof e!="string"&&!ArrayBuffer.isView(e)&&!v_(e);function Vg(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(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?i(u.value):s(u.value).then(o,c)}l((r=r.apply(e,t||[])).next())})}function Kg(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(u){return c([l,u])}}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(u){l=[6,u],s=0}finally{r=i=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function I_(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 B_=e=>new TextEncoder().encode(e);var H5=typeof Buffer<"u"&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:B_;function Qi(e){return e instanceof Uint8Array?e:typeof e=="string"?H5(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function uu(e){return typeof e=="string"?e.length===0:e.byteLength===0}function P_(e){return new Uint8Array([(e&4278190080)>>24,(e&16711680)>>16,(e&65280)>>8,e&255])}function N_(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 q5=function(){function e(){this.crc32c=new iE}return e.prototype.update=function(t){uu(t)||this.crc32c.update(Qi(t))},e.prototype.digest=function(){return Vg(this,void 0,void 0,function(){return Kg(this,function(t){return[2,P_(this.crc32c.digest())]})})},e.prototype.reset=function(){this.crc32c=new iE},e}(),iE=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var s=I_(t),i=s.next();!i.done;i=s.next()){var a=i.value;this.checksum=this.checksum>>>8^W5[(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}(),j5=[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],W5=N_(j5),G5=function(){function e(){this.crc32=new Af}return e.prototype.update=function(t){uu(t)||this.crc32.update(Qi(t))},e.prototype.digest=function(){return Vg(this,void 0,void 0,function(){return Kg(this,function(t){return[2,P_(this.crc32.digest())]})})},e.prototype.reset=function(){this.crc32=new Af},e}(),Af=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(t){var n,r;try{for(var s=I_(t),i=s.next();!i.done;i=s.next()){var a=i.value;this.checksum=this.checksum>>>8^K5[(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}(),V5=[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],K5=N_(V5);const Y5=()=>G5,O_=(e,t)=>{switch(e){case an.MD5:return t.md5;case an.CRC32:return Y5();case an.CRC32C:return q5;case an.CRC64NVME:throw new Error(`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly.
1564
+ 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";].
1565
+ For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);case an.SHA1:return t.sha1;case an.SHA256:return t.sha256;default:throw new Error(`Unsupported checksum algorithm: ${e}`)}},D_=(e,t)=>{const n=new e;return n.update(Xo(t||"")),n.digest()},X5={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},Q5=(e,t)=>(n,r)=>async s=>{if(!qn.isInstance(s.request)||$5("x-amz-checksum-",s.request.headers))return n(s);const{request:i,input:a}=s,{body:o,headers:c}=i,{base64Encoder:l,streamHasher:u}=e,{requestChecksumRequired:f,requestAlgorithmMember:m}=t,h=await e.requestChecksumCalculation(),b=m==null?void 0:m.name,p=m==null?void 0:m.httpHeader;b&&!a[b]&&(h===Nc.WHEN_SUPPORTED||f)&&(a[b]=qm,p&&(c[p]=qm));const E=z5(a,{requestChecksumRequired:f,requestAlgorithmMember:m==null?void 0:m.name,requestChecksumCalculation:h});let g=o,y=c;if(E){switch(E){case an.CRC32:Un(r,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case an.CRC32C:Un(r,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case an.CRC64NVME:Un(r,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case an.SHA1:Un(r,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case an.SHA256:Un(r,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const x=Gg(E),S=O_(E,e);if(R_(o)){const{getAwsChunkedEncodingStream:C,bodyLengthChecker:T}=e;g=C(typeof e.requestStreamBufferSize=="number"&&e.requestStreamBufferSize>=8*1024?X4(o,e.requestStreamBufferSize,r.logger):o,{base64Encoder:l,bodyLengthChecker:T,checksumLocationName:x,checksumAlgorithmFn:S,streamHasher:u}),y={...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":x},delete y["content-length"]}else if(!U5(x,c)){const C=await D_(S,o);y={...c,[x]:l(C)}}}return await n({...s,request:{...i,headers:y,body:g}})},Z5={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},J5=(e,t)=>(n,r)=>async s=>{const i=s.input,{requestValidationModeMember:a}=t,o=await e.requestChecksumCalculation(),c=await e.responseChecksumValidation();switch(o){case Nc.WHEN_REQUIRED:Un(r,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case Nc.WHEN_SUPPORTED:Un(r,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(c){case Qh.WHEN_REQUIRED:Un(r,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case Qh.WHEN_SUPPORTED:Un(r,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return a&&!i[a]&&c===Qh.WHEN_SUPPORTED&&(i[a]="ENABLED"),n(s)},L_=(e=[])=>{const t=[];for(const n of F5)!e.includes(n)||!Ym.includes(n)||t.push(n);return t},e8=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},t8=async(e,{checksumAlgorithmFn:t,base64Encoder:n})=>n(await D_(t,e)),n8=async(e,{config:t,responseAlgorithms:n,logger:r})=>{const s=L_(n),{body:i,headers:a}=e;for(const o of s){const c=Gg(o),l=a[c];if(l){let u;try{u=O_(o,t)}catch(h){if(o===an.CRC64NVME){r==null||r.warn(`Skipping ${an.CRC64NVME} checksum validation: ${h.message}`);continue}throw h}const{base64Encoder:f}=t;if(R_(i)){e.body=V4({expectedChecksum:l,checksumSourceLocation:c,checksum:new u,source:i,base64Encoder:f});return}const m=await t8(i,{checksumAlgorithmFn:u,base64Encoder:f});if(m===l)break;throw new Error(`Checksum mismatch: expected "${m}" but received "${l}" in response header "${c}".`)}}},r8={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},s8=(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:u,commandName:f}=r;if(u==="S3Client"&&f==="GetObjectCommand"&&L_(l).every(h=>{const b=Gg(h),p=o.headers[b];return!p||e8(p)}))return a;await n8(o,{config:e,responseAlgorithms:l,logger:r.logger})}return a},Cn=(e,t)=>({applyToStack:n=>{n.add(Q5(e,t),X5),n.addRelativeTo(J5(e,t),Z5),n.addRelativeTo(s8(e,t),r8)}}),i8=e=>({...e,requestChecksumCalculation:ni(e.requestChecksumCalculation??w4),responseChecksumValidation:ni(e.responseChecksumValidation??A4),requestStreamBufferSize:Number(e.requestStreamBufferSize??0)});const a8=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)},o8={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},c8=e=>({applyToStack:t=>{t.add(a8(e),o8)}}),l8=()=>(e,t)=>async n=>{var r,s;try{const i=await e(n),{clientName:a,commandName:o,logger:c,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:u,overrideOutputFilterSensitiveLog:f}=l,m=u??t.inputFilterSensitiveLog,h=f??t.outputFilterSensitiveLog,{$metadata:b,...p}=i.output;return(r=c==null?void 0:c.info)==null||r.call(c,{clientName:a,commandName:o,input:m(n.input),output:h(p),metadata:b}),i}catch(i){const{clientName:a,commandName:o,logger:c,dynamoDbDocumentClientOptions:l={}}=t,{overrideInputFilterSensitiveLog:u}=l,f=u??t.inputFilterSensitiveLog;throw(s=c==null?void 0:c.error)==null||s.call(c,{clientName:a,commandName:o,input:f(n.input),error:i,metadata:i.$metadata}),i}},u8={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},d8=e=>({applyToStack:t=>{t.add(l8(),u8)}});var aE={};const oE="X-Amzn-Trace-Id",f8="AWS_LAMBDA_FUNCTION_NAME",h8="_X_AMZN_TRACE_ID",m8=e=>t=>async n=>{const{request:r}=n;if(!qn.isInstance(r)||e.runtime!=="node"||r.headers.hasOwnProperty(oE))return t(n);const s=aE[f8],i=aE[h8],a=o=>typeof o=="string"&&o.length>0;return a(s)&&a(i)&&(r.headers[oE]=i),t({...n,request:r})},b8={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},g8=e=>({applyToStack:t=>{t.add(m8(e),b8)}}),p8="content-length",y8="x-amz-decoded-content-length";function E8(){return(e,t)=>async n=>{var s;const{request:r}=n;if(qn.isInstance(r)&&!(p8 in r.headers)&&!(y8 in r.headers)){const i="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((s=t==null?void 0:t.logger)==null?void 0:s.warn)=="function"&&!(t.logger instanceof jg)?t.logger.warn(i):console.warn(i)}return e({...n})}}const C8={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},x8=e=>({applyToStack:t=>{t.add(E8(),C8)}}),v8=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}},_8={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function T8(e){return(t,n)=>async r=>{var s,i,a;try{return await t(r)}catch(o){if(e.followRegionRedirects&&(((s=o==null?void 0:o.$metadata)==null?void 0:s.httpStatusCode)===301||((i=o==null?void 0:o.$metadata)==null?void 0:i.httpStatusCode)===400&&(o==null?void 0:o.name)==="IllegalLocationConstraintException")){try{const c=o.$response.headers["x-amz-bucket-region"];(a=n.logger)==null||a.debug(`Redirecting from ${await e.region()} to ${c}`),n.__s3RegionRedirect=c}catch(c){throw new Error("Region redirect failed: "+c)}return t(r)}throw o}}}const S8={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},w8=e=>({applyToStack:t=>{t.add(T8(e),S8),t.addRelativeTo(v8(e),_8)}}),A8=e=>(t,n)=>async r=>{var a;const s=await t(r),{response:i}=s;if(Pc.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{Xi(i.headers.expires)}catch(o){(a=n.logger)==null||a.warn(`AWS SDK Warning for ${n.clientName}::${n.commandName} response parsing (${i.headers.expires}): ${o}`),delete i.headers.expires}}return s},k8={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},M_=e=>({applyToStack:t=>{t.addRelativeTo(A8(),k8)}}),Vf=class Vf{constructor(t={}){ge(this,"data");ge(this,"lastPurgeTime",Date.now());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+Vf.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]}}}};ge(Vf,"EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS",3e4);let Xm=Vf;class g0{constructor(t,n=!1,r=Date.now()){ge(this,"_identity");ge(this,"isRefreshing");ge(this,"accessed");this._identity=t,this.isRefreshing=n,this.accessed=r}get identity(){return this.accessed=Date.now(),this._identity}}const Kf=class Kf{constructor(t,n=new Xm){ge(this,"createSessionFn");ge(this,"cache");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=>{var l,u;return(((l=a.expiration)==null?void 0:l.getTime())??0)<Date.now()?s.set(r,new g0(this.getIdentity(r))).identity:((((u=a.expiration)==null?void 0:u.getTime())??0)<Date.now()+Kf.REFRESH_WINDOW_MS&&!i.isRefreshing&&(i.isRefreshing=!0,this.getIdentity(r).then(f=>{s.set(r,new g0(Promise.resolve(f)))})),a)}):s.set(r,new g0(this.getIdentity(r))).identity}async getIdentity(t){var s,i;await this.cache.purgeExpired().catch(a=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache:
1566
+ `+a)});const n=await this.createSessionFn(t);if(!((s=n.Credentials)!=null&&s.AccessKeyId)||!((i=n.Credentials)!=null&&i.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}}};ge(Kf,"REFRESH_WINDOW_MS",6e4);let Qm=Kf;var cE;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(cE||(cE={}));const R8="Directory",I8="S3Express",B8="sigv4-s3express",Zm="X-Amz-S3session-Token",Jm=Zm.toLowerCase();class P8 extends Vm{async signWithCredentials(t,n,r){const s=lE(n);t.headers[Jm]=n.sessionToken;const i=this;return uE(i,s),i.signRequest(t,r??{})}async presignWithCredentials(t,n,r){const s=lE(n);return delete t.headers[Jm],t.headers[Zm]=n.sessionToken,t.query=t.query??{},t.query[Zm]=n.sessionToken,uE(this,s),this.presign(t,r)}}function lE(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function uE(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 N8=e=>(t,n)=>async r=>{var s,i,a,o,c;if(n.endpointV2){const l=n.endpointV2,u=((a=(i=(s=l.properties)==null?void 0:s.authSchemes)==null?void 0:i[0])==null?void 0:a.name)===B8;if((((o=l.properties)==null?void 0:o.backend)===I8||((c=l.properties)==null?void 0:c.bucketType)===R8)&&(Un(n,"S3_EXPRESS_BUCKET","J"),n.isS3ExpressBucket=!0),u){const m=r.input.Bucket;if(m){const h=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:m});n.s3ExpressIdentity=h,qn.isInstance(r.request)&&h.sessionToken&&(r.request.headers[Jm]=h.sessionToken)}}}return t(r)},O8={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},D8=e=>({applyToStack:t=>{t.add(N8(e),O8)}}),L8=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},M8=e=>t=>{throw t},F8=(e,t)=>{},z8=e=>(t,n)=>async r=>{if(!qn.isInstance(r.request))return t(r);const i=Gc(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 L8(n.s3ExpressIdentity,a,r.request,await e.signer()):l=await c.sign(r.request,o,a);const u=await t({...r,request:l}).catch((c.errorHandler||M8)(a));return(c.successHandler||F8)(u.response,a),u},U8=e=>({applyToStack:t=>{t.addRelativeTo(z8(e),d_)}}),$8=(e,{session:t})=>{const[n,r]=t;return{...e,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,followRegionRedirects:e.followRegionRedirects??!1,s3ExpressIdentityProvider:e.s3ExpressIdentityProvider??new Qm(async s=>n().send(new r({Bucket:s}))),bucketEndpoint:e.bucketEndpoint??!1}},H8={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},q8=3e3,j8=e=>(t,n)=>async r=>{const s=await t(r),{response:i}=s;if(!Pc.isInstance(i))return s;const{statusCode:a,body:o}=i;if(a<200||a>=300||!(typeof(o==null?void 0:o.stream)=="function"||typeof(o==null?void 0:o.pipe)=="function"||typeof(o==null?void 0:o.tee)=="function"))return s;let l=o,u=o;o&&typeof o=="object"&&!(o instanceof Uint8Array)&&([l,u]=await cD(o)),i.body=u;const f=await W8(l,{streamCollector:async h=>eD(h,q8)});typeof(l==null?void 0:l.destroy)=="function"&&l.destroy();const m=e.utf8Encoder(f.subarray(f.length-16));if(f.length===0&&H8[n.commandName]){const h=new Error("S3 aborted request");throw h.name="InternalError",h}return m&&m.endsWith("</Error>")&&(i.statusCode=400),s},W8=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),G8={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},Ze=e=>({applyToStack:t=>{t.addRelativeTo(j8(e),G8)}}),V8=e=>typeof e=="string"&&e.indexOf("arn:")===0&&e.split(":").length>=6;function K8(e){return(t,n)=>async r=>{var s,i,a,o;if(e.bucketEndpoint){const c=n.endpointV2;if(c){const l=r.input.Bucket;if(typeof l=="string")try{const u=new URL(l);n.endpointV2={...c,url:u}}catch(u){const f=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${l} could not be parsed as URL.`;throw((i=(s=n.logger)==null?void 0:s.constructor)==null?void 0:i.name)==="NoOpLogger"?console.warn(f):(o=(a=n.logger)==null?void 0:a.warn)==null||o.call(a,f),u}}}return t(r)}}const Y8={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function X8({bucketEndpoint:e}){return t=>async n=>{const{input:{Bucket:r}}=n;if(!e&&typeof r=="string"&&!V8(r)&&r.indexOf("/")>=0){const s=new Error(`Bucket name shouldn't contain '/', received '${r}'`);throw s.name="InvalidBucketName",s}return t({...n})}}const Q8={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Z8=e=>({applyToStack:t=>{t.add(X8(e),Q8),t.addRelativeTo(K8(e),Y8)}}),J8=void 0;function eL(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}function tL(e){const t=$o(e.userAgentAppId??J8);return{...e,customUserAgent:typeof e.customUserAgent=="string"?[[e.customUserAgent]]:e.customUserAgent,userAgentAppId:async()=>{var r,s;const n=await t();if(!eL(n)){const i=((s=(r=e.logger)==null?void 0:r.constructor)==null?void 0:s.name)==="NoOpLogger"||!e.logger?console:e.logger;typeof n!="string"?i==null||i.warn("userAgentAppId must be a string or undefined."):n.length>50&&(i==null||i.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."))}return n}}}class nL{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 rL=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}$"),F_=e=>rL.test(e)||e.startsWith("[")&&e.endsWith("]"),sL=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Yg=(e,t=!1)=>{if(!t)return sL.test(e);const n=e.split(".");for(const r of n)if(!Yg(r))return!1;return!0},kf={},du="endpoints";function Zi(e){return typeof e!="object"||e==null?e:"ref"in e?`$${Zi(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Zi).join(", ")})`:JSON.stringify(e,null,2)}class cs extends Error{constructor(t){super(t),this.name="EndpointError"}}const iL=(e,t)=>e===t,aL=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 cs(`Path: '${e}' does not end with ']'`);const i=r.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new cs(`Invalid array index: '${i}' in path: '${e}'`);s!==0&&n.push(r.slice(0,s)),n.push(i)}else n.push(r)}return n},z_=(e,t)=>aL(t).reduce((n,r)=>{if(typeof n!="object")throw new cs(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]},e),oL=e=>e!=null,cL=e=>!e,p0={[cu.HTTP]:80,[cu.HTTPS]:443},lL=e=>{const t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){const{hostname:m,port:h,protocol:b="",path:p="",query:E={}}=e,g=new URL(`${b}//${m}${h?`:${h}`:""}${p}`);return g.search=Object.entries(E).map(([y,w])=>`${y}=${w}`).join("&"),g}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(cu).includes(c))return null;const l=F_(s),u=n.includes(`${r}:${p0[c]}`)||typeof e=="string"&&e.includes(`${r}:${p0[c]}`),f=`${r}${u?`:${p0[c]}`:""}`;return{scheme:c,authority:f,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:l}},uL=(e,t)=>e===t,dL=(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),fL=e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),hL={booleanEquals:iL,getAttr:z_,isSet:oL,isValidHostLabel:Yg,not:cL,parseURL:lL,stringEquals:uL,substring:dL,uriEncode:fL},U_=(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(z_(r[c],l))}else n.push(r[o]);s=a+1}return n.join("")},mL=({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],fh=(e,t,n)=>{if(typeof e=="string")return U_(e,n);if(e.fn)return $_(e,n);if(e.ref)return mL(e,n);throw new cs(`'${t}': ${String(e)} is not a string, function or reference.`)},$_=({fn:e,argv:t},n)=>{const r=t.map(i=>["boolean","number"].includes(typeof i)?i:fh(i,"arg",n)),s=e.split(".");return s[0]in kf&&s[1]!=null?kf[s[0]][s[1]](...r):hL[e](...r)},bL=({assign:e,...t},n)=>{var s,i;if(e&&e in n.referenceRecord)throw new cs(`'${e}' is already defined in Reference Record.`);const r=$_(t,n);return(i=(s=n.logger)==null?void 0:s.debug)==null||i.call(s,`${du} evaluateCondition: ${Zi(t)} = ${Zi(r)}`),{result:r===""?!0:!!r,...e!=null&&{toAssign:{name:e,value:r}}}},Xg=(e=[],t)=>{var r,s;const n={};for(const i of e){const{result:a,toAssign:o}=bL(i,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!a)return{result:a};o&&(n[o.name]=o.value,(s=(r=t.logger)==null?void 0:r.debug)==null||s.call(r,`${du} assign: ${o.name} := ${Zi(o.value)}`))}return{result:!0,referenceRecord:n}},gL=(e,t)=>Object.entries(e).reduce((n,[r,s])=>({...n,[r]:s.map(i=>{const a=fh(i,"Header value entry",t);if(typeof a!="string")throw new cs(`Header '${r}' value '${a}' is not a string`);return a})}),{}),H_=(e,t)=>{if(Array.isArray(e))return e.map(n=>H_(n,t));switch(typeof e){case"string":return U_(e,t);case"object":if(e===null)throw new cs(`Unexpected endpoint property: ${e}`);return q_(e,t);case"boolean":return e;default:throw new cs(`Unexpected endpoint property type: ${typeof e}`)}},q_=(e,t)=>Object.entries(e).reduce((n,[r,s])=>({...n,[r]:H_(s,t)}),{}),pL=(e,t)=>{const n=fh(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 cs(`Endpoint URL must be a string, got ${typeof n}`)},yL=(e,t)=>{var u,f;const{conditions:n,endpoint:r}=e,{result:s,referenceRecord:i}=Xg(n,t);if(!s)return;const a={...t,referenceRecord:{...t.referenceRecord,...i}},{url:o,properties:c,headers:l}=r;return(f=(u=t.logger)==null?void 0:u.debug)==null||f.call(u,`${du} Resolving endpoint from template: ${Zi(r)}`),{...l!=null&&{headers:gL(l,a)},...c!=null&&{properties:q_(c,a)},url:pL(o,a)}},EL=(e,t)=>{const{conditions:n,error:r}=e,{result:s,referenceRecord:i}=Xg(n,t);if(s)throw new cs(fh(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},CL=(e,t)=>{const{conditions:n,rules:r}=e,{result:s,referenceRecord:i}=Xg(n,t);if(s)return j_(r,{...t,referenceRecord:{...t.referenceRecord,...i}})},j_=(e,t)=>{for(const n of e)if(n.type==="endpoint"){const r=yL(n,t);if(r)return r}else if(n.type==="error")EL(n,t);else if(n.type==="tree"){const r=CL(n,t);if(r)return r}else throw new cs(`Unknown endpoint rule: ${n}`);throw new cs("Rules evaluation failed")},xL=(e,t)=>{var l,u,f,m;const{endpointParams:n,logger:r}=t,{parameters:s,rules:i}=e;(u=(l=t.logger)==null?void 0:l.debug)==null||u.call(l,`${du} Initial EndpointParams: ${Zi(n)}`);const a=Object.entries(s).filter(([,h])=>h.default!=null).map(([h,b])=>[h,b.default]);if(a.length>0)for(const[h,b]of a)n[h]=n[h]??b;const o=Object.entries(s).filter(([,h])=>h.required).map(([h])=>h);for(const h of o)if(n[h]==null)throw new cs(`Missing required parameter: '${h}'`);const c=j_(i,{endpointParams:n,logger:r,referenceRecord:{}});return(m=(f=t.logger)==null?void 0:f.debug)==null||m.call(f,`${du} Resolved endpoint: ${Zi(c)}`),c},W_=(e,t=!1)=>{if(t){for(const n of e.split("."))if(!W_(n))return!1;return!0}return!(!Yg(e)||e.length<3||e.length>63||e!==e.toLowerCase()||F_(e))},dE=":",vL="/",_L=e=>{const t=e.split(dE);if(t.length<6)return null;const[n,r,s,i,a,...o]=t;if(n!=="arn"||r===""||s===""||o.join(dE)==="")return null;const c=o.map(l=>l.split(vL)).flat();return{partition:r,service:s,region:i,accountId:a,resourceId:c}},TL=[{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-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 Standard 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 China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{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 GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.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 (US) 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:"sc2s.sgov.gov",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 ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.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 ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],SL={partitions:TL};let wL=SL;const AL=e=>{const{partitions:t}=wL;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}},G_={isVirtualHostableS3Bucket:W_,parseArn:_L,partition:AL};kf.aws=G_;const kL=/\d{12}\.ddb/;async function RL(e,t,n){var i,a,o,c,l,u,f;const r=n.request;if(((i=r==null?void 0:r.headers)==null?void 0:i["smithy-protocol"])==="rpc-v2-cbor"&&Un(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){const m=await t.retryStrategy();typeof m.acquireInitialRetryToken=="function"?(o=(a=m.constructor)==null?void 0:a.name)!=null&&o.includes("Adaptive")?Un(e,"RETRY_MODE_ADAPTIVE","F"):Un(e,"RETRY_MODE_STANDARD","E"):Un(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){const m=e.endpointV2;switch(String((c=m==null?void 0:m.url)==null?void 0:c.hostname).match(kL)&&Un(e,"ACCOUNT_ID_ENDPOINT","O"),await((l=t.accountIdEndpointMode)==null?void 0:l.call(t))){case"disabled":Un(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Un(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Un(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const s=(f=(u=e.__smithy_context)==null?void 0:u.selectedHttpAuthScheme)==null?void 0:f.identity;if(s!=null&&s.$source){const m=s;m.accountId&&Un(e,"RESOLVED_ACCOUNT_ID","T");for(const[h,b]of Object.entries(m.$source??{}))Un(e,h,b)}}const fE="user-agent",y0="x-amz-user-agent",hE=" ",E0="/",IL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,BL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,mE="-",PL=1024;function NL(e){let t="";for(const n in e){const r=e[n];if(t.length+r.length+1<=PL){t.length?t+=","+r:t+=r;continue}break}return t}const OL=e=>(t,n)=>async r=>{var h,b,p,E;const{request:s}=r;if(!qn.isInstance(s))return t(r);const{headers:i}=s,a=((h=n==null?void 0:n.userAgent)==null?void 0:h.map(rd))||[],o=(await e.defaultUserAgentProvider()).map(rd);await RL(n,e,r);const c=n;o.push(`m/${NL(Object.assign({},(b=n.__smithy_context)==null?void 0:b.features,(p=c.__aws_sdk_context)==null?void 0:p.features))}`);const l=((E=e==null?void 0:e.customUserAgent)==null?void 0:E.map(rd))||[],u=await e.userAgentAppId();u&&o.push(rd([`app/${u}`]));const f=[].concat([...o,...a,...l]).join(hE),m=[...o.filter(g=>g.startsWith("aws-sdk-")),...l].join(hE);return e.runtime!=="browser"?(m&&(i[y0]=i[y0]?`${i[fE]} ${m}`:m),i[fE]=f):i[y0]=f,t({...r,request:s})},rd=e=>{var a;const t=e[0].split(E0).map(o=>o.replace(IL,mE)).join(E0),n=(a=e[1])==null?void 0:a.replace(BL,mE),r=t.indexOf(E0),s=t.substring(0,r);let i=t.substring(r+1);return s==="api"&&(i=i.toLowerCase()),[s,i,n].filter(o=>o&&o.length>0).reduce((o,c,l)=>{switch(l){case 0:return c;case 1:return`${o}/${c}`;default:return`${o}#${c}`}},"")},DL={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},LL=e=>({applyToStack:t=>{t.add(OL(e),DL)}}),ML=!1,FL=!1,V_=e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),bE=e=>V_(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,zL=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if(typeof t=="string")return bE(t);const r=await t();return bE(r)},useFipsEndpoint:async()=>{const r=typeof t=="string"?t:await t();return V_(r)?!0:typeof n!="function"?Promise.resolve(!!n):n()}}},UL=e=>({...e,eventStreamMarshaller:e.eventStreamSerdeProvider(e)}),gE="content-length";function $L(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(gE)===-1)try{const a=e(s);r.headers={...r.headers,[gE]:String(a)}}catch{}}return t({...n,request:r})}}const HL={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},qL=e=>({applyToStack:t=>{t.add($L(e.bodyLengthChecker),HL)}}),jL=async e=>{const t=(e==null?void 0:e.Bucket)||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),YL(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!KL(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},WL=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,GL=/(\d+\.){3}\d+/,VL=/\.\./,KL=e=>WL.test(e)&&!GL.test(e)&&!VL.test(e),YL=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},XL=(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==null?void 0:s.credentialScope)??(s==null?void 0:s.CredentialScope)}:e==="accountId"||t==="AccountId"?async()=>{const s=typeof n.credentials=="function"?await n.credentials():n.credentials;return(s==null?void 0:s.accountId)??(s==null?void 0:s.AccountId)}:e==="endpoint"||t==="endpoint"?async()=>{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},K_=async e=>{};function QL(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 Rf=e=>{if(typeof e=="string")return Rf(new URL(e));const{hostname:t,pathname:n,port:r,protocol:s,search:i}=e;let a;return i&&(a=QL(i)),{hostname:t,port:r?parseInt(r):void 0,protocol:s,path:n,query:a}},Y_=e=>typeof e=="object"?"url"in e?Rf(e.url):e:Rf(e),ZL=async(e,t,n,r)=>{if(!n.endpoint){let a;n.serviceConfiguredEndpoint?a=await n.serviceConfiguredEndpoint():a=await K_(n.serviceId),a&&(n.endpoint=()=>Promise.resolve(Y_(a)))}const s=await X_(e,t,n);if(typeof n.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return n.endpointProvider(s,r)},X_=async(e,t,n)=>{var i;const r={},s=((i=t==null?void 0:t.getEndpointParameterInstructions)==null?void 0:i.call(t))||{};for(const[a,o]of Object.entries(s))switch(o.type){case"staticContextParams":r[a]=o.value;break;case"contextParams":r[a]=e[o.name];break;case"clientContextParams":case"builtInParams":r[a]=await XL(o.name,a,n)();break;case"operationContextParams":r[a]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return Object.keys(s).length===0&&Object.assign(r,n),String(n.serviceId).toLowerCase()==="s3"&&await jL(r),r},JL=({config:e,instructions:t})=>(n,r)=>async s=>{var o,c,l;e.endpoint&&dD(r,"ENDPOINT_OVERRIDE","N");const i=await ZL(s.input,{getEndpointParameterInstructions(){return t}},{...e},r);r.endpointV2=i,r.authSchemes=(o=i.properties)==null?void 0:o.authSchemes;const a=(c=r.authSchemes)==null?void 0:c[0];if(a){r.signing_region=a.signingRegion,r.signing_service=a.signingName;const u=Gc(r),f=(l=u==null?void 0:u.selectedHttpAuthScheme)==null?void 0:l.httpAuthOption;f&&(f.signingProperties=Object.assign(f.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return n({...s})},eM={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Fg.name},Se=(e,t)=>({applyToStack:n=>{n.addRelativeTo(JL({config:e,instructions:t}),eM)}}),tM=e=>{const t=e.tls??!0,{endpoint:n}=e,r=n!=null?async()=>Y_(await ni(n)()):void 0,i={...e,endpoint:r,tls:t,isCustomEndpoint:!!n,useDualstackEndpoint:ni(e.useDualstackEndpoint??!1),useFipsEndpoint:ni(e.useFipsEndpoint??!1)};let a;return i.serviceConfiguredEndpoint=async()=>(e.serviceId&&!a&&(a=K_(e.serviceId)),a),i};var Oc;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(Oc||(Oc={}));const If=3,nM=Oc.STANDARD,rM=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],sM=["TimeoutError","RequestTimeout","RequestTimeoutException"],iM=[500,502,503,504],aM=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],oM=e=>{var t;return(t=e.$metadata)==null?void 0:t.clockSkewCorrected},Q_=e=>{var t,n;return((t=e.$metadata)==null?void 0:t.httpStatusCode)===429||rM.includes(e.name)||((n=e.$retryable)==null?void 0:n.throttling)==!0},Qg=(e,t=0)=>{var n;return oM(e)||sM.includes(e.name)||aM.includes((e==null?void 0:e.code)||"")||iM.includes(((n=e.$metadata)==null?void 0:n.httpStatusCode)||0)||e.cause!==void 0&&t<=10&&Qg(e.cause,t+1)},cM=e=>{var t;if(((t=e.$metadata)==null?void 0:t.httpStatusCode)!==void 0){const n=e.$metadata.httpStatusCode;return 500<=n&&n<=599&&!Qg(e)}return!1};class hh{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==null?void 0:t.beta)??.7,this.minCapacity=(t==null?void 0:t.minCapacity)??1,this.minFillRate=(t==null?void 0:t.minFillRate)??.5,this.scaleConstant=(t==null?void 0:t.scaleConstant)??.4,this.smooth=(t==null?void 0: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=>hh.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(),Q_(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))}}hh.setTimeoutFn=setTimeout;const eb=100,Z_=20*1e3,lM=500,pE=500,uM=5,dM=10,fM=1,hM="amz-sdk-invocation-id",mM="amz-sdk-request",bM=()=>{let e=eb;return{computeNextBackoffDelay:r=>Math.floor(Math.min(Z_,Math.random()*2**r*e)),setDelayBase:r=>{e=r}}},yE=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(Z_,e),getRetryCost:()=>n});class J_{constructor(t){this.maxAttempts=t,this.mode=Oc.STANDARD,this.capacity=pE,this.retryBackoffStrategy=bM(),this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return yE({retryDelay:eb,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"?lM:eb);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,yE({retryDelay:a,retryCount:t.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(pE,this.capacity+(t.getRetryCost()??fM))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${If}`),If}}shouldRetry(t,n,r){return t.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(n.errorType)&&this.isRetryableError(n.errorType)}getCapacityCost(t){return t==="TRANSIENT"?dM:uM}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}}class gM{constructor(t,n){this.maxAttemptsProvider=t,this.mode=Oc.ADAPTIVE;const{rateLimiter:r}=n??{};this.rateLimiter=r??new hh,this.standardRetryStrategy=new J_(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)}}let sd;const pM=new Uint8Array(16);function yM(){if(!sd&&(sd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!sd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return sd(pM)}const yr=[];for(let e=0;e<256;++e)yr.push((e+256).toString(16).slice(1));function EM(e,t=0){return yr[e[t+0]]+yr[e[t+1]]+yr[e[t+2]]+yr[e[t+3]]+"-"+yr[e[t+4]]+yr[e[t+5]]+"-"+yr[e[t+6]]+yr[e[t+7]]+"-"+yr[e[t+8]]+yr[e[t+9]]+"-"+yr[e[t+10]]+yr[e[t+11]]+yr[e[t+12]]+yr[e[t+13]]+yr[e[t+14]]+yr[e[t+15]]}const CM=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),EE={randomUUID:CM};function xM(e,t,n){if(EE.randomUUID&&!e)return EE.randomUUID();e=e||{};const r=e.random||(e.rng||yM)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,EM(r)}const vM=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}`),_M=e=>{const{retryStrategy:t}=e,n=ni(e.maxAttempts??If);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await ni(e.retryMode)()===Oc.ADAPTIVE?new gM(n):new J_(n))}},TM=e=>(e==null?void 0:e.body)instanceof ReadableStream,SM=e=>(t,n)=>async r=>{var a;let s=await e.retryStrategy();const i=await e.maxAttempts();if(wM(s)){s=s;let o=await s.acquireInitialRetryToken(n.partition_id),c=new Error,l=0,u=0;const{request:f}=r,m=qn.isInstance(f);for(m&&(f.headers[hM]=xM());;)try{m&&(f.headers[mM]=`attempt=${l+1}; max=${i}`);const{response:h,output:b}=await t(r);return s.recordSuccess(o),b.$metadata.attempts=l+1,b.$metadata.totalRetryDelay=u,{response:h,output:b}}catch(h){const b=AM(h);if(c=vM(h),m&&TM(f))throw(a=n.logger instanceof jg?console:n.logger)==null||a.warn("An error was encountered in a non-retryable streaming request."),c;try{o=await s.refreshRetryTokenForRetry(o,b)}catch{throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=l+1,c.$metadata.totalRetryDelay=u,c}l=o.getRetryCount();const p=o.getRetryDelay();u+=p,await new Promise(E=>setTimeout(E,p))}}else return s=s,s!=null&&s.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(t,r)},wM=e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u",AM=e=>{const t={error:e,errorType:kM(e)},n=BM(e.$response);return n&&(t.retryAfterHint=n),t},kM=e=>Q_(e)?"THROTTLING":Qg(e)?"TRANSIENT":cM(e)?"SERVER_ERROR":"CLIENT_ERROR",RM={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},IM=e=>({applyToStack:t=>{t.add(SM(e),RM)}}),BM=e=>{if(!Pc.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)},PM={CrtSignerV4:null};class NM{constructor(t){ge(this,"sigv4aSigner");ge(this,"sigv4Signer");ge(this,"signerOptions");this.sigv4Signer=new P8(t),this.signerOptions=t}async sign(t,n={}){if(n.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(t,n)}return this.sigv4Signer.sign(t,n)}async signWithCredentials(t,n,r={}){if(r.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(t,n,r)}return this.sigv4Signer.signWithCredentials(t,n,r)}async presign(t,n={}){if(n.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(t,n)}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){let t=null;try{if(t=PM.CrtSignerV4,typeof t!="function")throw new Error}catch(n){throw n.message=`${n.message}
1567
+ Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly.
1568
+ 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";].
1569
+ For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,n}this.sigv4aSigner=new t({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}const Zg="required",D="type",q="conditions",ce="fn",le="argv",it="ref",Zt="assign",He="url",qe="properties",eT="backend",qs="authSchemes",ls="disableDoubleEncoding",us="signingName",li="signingRegion",je="headers",Jg="signingRegionSet",OM=6,DM=!1,Os=!0,xs="isSet",fr="booleanEquals",Qe="error",Bf="aws.partition",Qt="stringEquals",On="getAttr",Rr="name",Sr="substring",CE="bucketSuffix",tT="parseURL",xE="{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",ve="endpoint",ye="tree",nT="aws.isVirtualHostableS3Bucket",Td="{url#scheme}://{Bucket}.{url#authority}{url#path}",ri="not",Sd="{url#scheme}://{url#authority}{url#path}",rT="hardwareType",sT="regionPrefix",vE="bucketAliasSuffix",tb="outpostId",go="isValidHostLabel",ep="sigv4a",fu="s3-outposts",Dc="s3",iT="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",aT="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",_E="https://{Bucket}.s3.{partitionResult#dnsSuffix}",oT="aws.parseArn",cT="bucketArn",lT="arnType",Pf="",tp="s3-object-lambda",uT="accesspoint",np="accessPointName",TE="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",SE="mrapPartition",wE="outpostType",AE="arnPrefix",dT="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",kE="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",RE="https://s3.{partitionResult#dnsSuffix}",Oo={[Zg]:!1,[D]:"String"},Do={[Zg]:!0,default:!1,[D]:"Boolean"},Al={[Zg]:!1,[D]:"Boolean"},Ds={[ce]:fr,[le]:[{[it]:"Accelerate"},!0]},bn={[ce]:fr,[le]:[{[it]:"UseFIPS"},!0]},mn={[ce]:fr,[le]:[{[it]:"UseDualStack"},!0]},zn={[ce]:xs,[le]:[{[it]:"Endpoint"}]},fT={[ce]:Bf,[le]:[{[it]:"Region"}],[Zt]:"partitionResult"},IE={[ce]:Qt,[le]:[{[ce]:On,[le]:[{[it]:"partitionResult"},Rr]},"aws-cn"]},Nf={[ce]:xs,[le]:[{[it]:"Bucket"}]},Dn={[it]:"Bucket"},Dr={[ce]:tT,[le]:[{[it]:"Endpoint"}],[Zt]:"url"},wd={[ce]:fr,[le]:[{[ce]:On,[le]:[{[it]:"url"},"isIp"]},!0]},hT={[it]:"url"},mT={[ce]:"uriEncode",[le]:[Dn],[Zt]:"uri_encoded_bucket"},gi={[eT]:"S3Express",[qs]:[{[ls]:!0,[Rr]:"sigv4",[us]:"s3express",[li]:"{Region}"}]},dt={},bT={[ce]:nT,[le]:[Dn,!1]},C0={[Qe]:"S3Express bucket name is not a valid virtual hostable name.",[D]:Qe},Of={[eT]:"S3Express",[qs]:[{[ls]:!0,[Rr]:"sigv4-s3express",[us]:"s3express",[li]:"{Region}"}]},BE={[ce]:xs,[le]:[{[it]:"UseS3ExpressControlEndpoint"}]},PE={[ce]:fr,[le]:[{[it]:"UseS3ExpressControlEndpoint"},!0]},yt={[ce]:ri,[le]:[zn]},NE={[Qe]:"Unrecognized S3Express bucket name format.",[D]:Qe},OE={[ce]:ri,[le]:[Nf]},DE={[it]:rT},LE={[q]:[yt],[Qe]:"Expected a endpoint to be specified but no endpoint was found",[D]:Qe},id={[qs]:[{[ls]:!0,[Rr]:ep,[us]:fu,[Jg]:["*"]},{[ls]:!0,[Rr]:"sigv4",[us]:fu,[li]:"{Region}"}]},x0={[ce]:fr,[le]:[{[it]:"ForcePathStyle"},!1]},LM={[it]:"ForcePathStyle"},Fn={[ce]:fr,[le]:[{[it]:"Accelerate"},!1]},Kn={[ce]:Qt,[le]:[{[it]:"Region"},"aws-global"]},rr={[qs]:[{[ls]:!0,[Rr]:"sigv4",[us]:Dc,[li]:"us-east-1"}]},Bt={[ce]:ri,[le]:[Kn]},sr={[ce]:fr,[le]:[{[it]:"UseGlobalEndpoint"},!0]},ME={[He]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[qe]:{[qs]:[{[ls]:!0,[Rr]:"sigv4",[us]:Dc,[li]:"{Region}"}]},[je]:{}},Hn={[qs]:[{[ls]:!0,[Rr]:"sigv4",[us]:Dc,[li]:"{Region}"}]},ir={[ce]:fr,[le]:[{[it]:"UseGlobalEndpoint"},!1]},kt={[ce]:fr,[le]:[{[it]:"UseDualStack"},!1]},FE={[He]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},vt={[ce]:fr,[le]:[{[it]:"UseFIPS"},!1]},zE={[He]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},UE={[He]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},v0={[ce]:fr,[le]:[{[ce]:On,[le]:[hT,"isIp"]},!1]},_0={[He]:iT,[qe]:Hn,[je]:{}},nb={[He]:Td,[qe]:Hn,[je]:{}},$E={[ve]:nb,[D]:ve},T0={[He]:aT,[qe]:Hn,[je]:{}},HE={[He]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},ad={[Qe]:"Invalid region: region was not a valid DNS name.",[D]:Qe},Vr={[it]:cT},gT={[it]:lT},S0={[ce]:On,[le]:[Vr,"service"]},rp={[it]:np},qE={[q]:[mn],[Qe]:"S3 Object Lambda does not support Dual-stack",[D]:Qe},jE={[q]:[Ds],[Qe]:"S3 Object Lambda does not support S3 Accelerate",[D]:Qe},WE={[q]:[{[ce]:xs,[le]:[{[it]:"DisableAccessPoints"}]},{[ce]:fr,[le]:[{[it]:"DisableAccessPoints"},!0]}],[Qe]:"Access points are not supported for this operation",[D]:Qe},w0={[q]:[{[ce]:xs,[le]:[{[it]:"UseArnRegion"}]},{[ce]:fr,[le]:[{[it]:"UseArnRegion"},!1]},{[ce]:ri,[le]:[{[ce]:Qt,[le]:[{[ce]:On,[le]:[Vr,"region"]},"{Region}"]}]}],[Qe]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[D]:Qe},pT={[ce]:On,[le]:[{[it]:"bucketPartition"},Rr]},yT={[ce]:On,[le]:[Vr,"accountId"]},A0={[qs]:[{[ls]:!0,[Rr]:"sigv4",[us]:tp,[li]:"{bucketArn#region}"}]},GE={[Qe]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[D]:Qe},k0={[Qe]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[D]:Qe},R0={[Qe]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[D]:Qe},I0={[Qe]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[D]:Qe},VE={[Qe]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[D]:Qe},KE={[Qe]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[D]:Qe},kl={[qs]:[{[ls]:!0,[Rr]:"sigv4",[us]:Dc,[li]:"{bucketArn#region}"}]},YE={[qs]:[{[ls]:!0,[Rr]:ep,[us]:fu,[Jg]:["*"]},{[ls]:!0,[Rr]:"sigv4",[us]:fu,[li]:"{bucketArn#region}"}]},XE={[ce]:oT,[le]:[Dn]},QE={[He]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[qe]:Hn,[je]:{}},ZE={[He]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[qe]:Hn,[je]:{}},JE={[He]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[qe]:Hn,[je]:{}},B0={[He]:dT,[qe]:Hn,[je]:{}},eC={[He]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[qe]:Hn,[je]:{}},tC={[it]:"UseObjectLambdaEndpoint"},P0={[qs]:[{[ls]:!0,[Rr]:"sigv4",[us]:tp,[li]:"{Region}"}]},nC={[He]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},rC={[He]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},sC={[He]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},N0={[He]:Sd,[qe]:Hn,[je]:{}},iC={[He]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[qe]:Hn,[je]:{}},O0=[{[it]:"Region"}],MM=[{[it]:"Endpoint"}],FM=[Dn],D0=[mn],od=[Ds],fa=[zn,Dr],aC=[{[ce]:xs,[le]:[{[it]:"DisableS3ExpressSessionAuth"}]},{[ce]:fr,[le]:[{[it]:"DisableS3ExpressSessionAuth"},!0]}],oC=[wd],L0=[mT],M0=[bT],Lo=[bn],cC=[{[ce]:Sr,[le]:[Dn,6,14,!0],[Zt]:"s3expressAvailabilityZoneId"},{[ce]:Sr,[le]:[Dn,14,16,!0],[Zt]:"s3expressAvailabilityZoneDelim"},{[ce]:Qt,[le]:[{[it]:"s3expressAvailabilityZoneDelim"},"--"]}],Rl=[{[q]:[bn],[ve]:{[He]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[qe]:gi,[je]:{}},[D]:ve},{[ve]:{[He]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[qe]:gi,[je]:{}},[D]:ve}],lC=[{[ce]:Sr,[le]:[Dn,6,15,!0],[Zt]:"s3expressAvailabilityZoneId"},{[ce]:Sr,[le]:[Dn,15,17,!0],[Zt]:"s3expressAvailabilityZoneDelim"},{[ce]:Qt,[le]:[{[it]:"s3expressAvailabilityZoneDelim"},"--"]}],uC=[{[ce]:Sr,[le]:[Dn,6,19,!0],[Zt]:"s3expressAvailabilityZoneId"},{[ce]:Sr,[le]:[Dn,19,21,!0],[Zt]:"s3expressAvailabilityZoneDelim"},{[ce]:Qt,[le]:[{[it]:"s3expressAvailabilityZoneDelim"},"--"]}],dC=[{[ce]:Sr,[le]:[Dn,6,20,!0],[Zt]:"s3expressAvailabilityZoneId"},{[ce]:Sr,[le]:[Dn,20,22,!0],[Zt]:"s3expressAvailabilityZoneDelim"},{[ce]:Qt,[le]:[{[it]:"s3expressAvailabilityZoneDelim"},"--"]}],fC=[{[ce]:Sr,[le]:[Dn,6,26,!0],[Zt]:"s3expressAvailabilityZoneId"},{[ce]:Sr,[le]:[Dn,26,28,!0],[Zt]:"s3expressAvailabilityZoneDelim"},{[ce]:Qt,[le]:[{[it]:"s3expressAvailabilityZoneDelim"},"--"]}],Il=[{[q]:[bn],[ve]:{[He]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[qe]:Of,[je]:{}},[D]:ve},{[ve]:{[He]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[qe]:Of,[je]:{}},[D]:ve}],zM=[Nf],hC=[{[ce]:go,[le]:[{[it]:tb},!1]}],mC=[{[ce]:Qt,[le]:[{[it]:sT},"beta"]}],UM=["*"],Bi=[fT],bC=[{[ce]:go,[le]:[{[it]:"Region"},!1]}],Pi=[{[ce]:Qt,[le]:[{[it]:"Region"},"us-east-1"]}],F0=[{[ce]:Qt,[le]:[gT,uT]}],gC=[{[ce]:On,[le]:[Vr,"resourceId[1]"],[Zt]:np},{[ce]:ri,[le]:[{[ce]:Qt,[le]:[rp,Pf]}]}],$M=[Vr,"resourceId[1]"],z0=[{[ce]:ri,[le]:[{[ce]:Qt,[le]:[{[ce]:On,[le]:[Vr,"region"]},Pf]}]}],pC=[{[ce]:ri,[le]:[{[ce]:xs,[le]:[{[ce]:On,[le]:[Vr,"resourceId[2]"]}]}]}],HM=[Vr,"resourceId[2]"],U0=[{[ce]:Bf,[le]:[{[ce]:On,[le]:[Vr,"region"]}],[Zt]:"bucketPartition"}],yC=[{[ce]:Qt,[le]:[pT,{[ce]:On,[le]:[{[it]:"partitionResult"},Rr]}]}],$0=[{[ce]:go,[le]:[{[ce]:On,[le]:[Vr,"region"]},!0]}],H0=[{[ce]:go,[le]:[yT,!1]}],EC=[{[ce]:go,[le]:[rp,!1]}],CC=[{[ce]:go,[le]:[{[it]:"Region"},!0]}],qM={parameters:{Bucket:Oo,Region:Oo,UseFIPS:Do,UseDualStack:Do,Endpoint:Oo,ForcePathStyle:Do,Accelerate:Do,UseGlobalEndpoint:Do,UseObjectLambdaEndpoint:Al,Key:Oo,Prefix:Oo,CopySource:Oo,DisableAccessPoints:Al,DisableMultiRegionAccessPoints:Do,UseArnRegion:Al,UseS3ExpressControlEndpoint:Al,DisableS3ExpressSessionAuth:Al},rules:[{[q]:[{[ce]:xs,[le]:O0}],rules:[{[q]:[Ds,bn],error:"Accelerate cannot be used with FIPS",[D]:Qe},{[q]:[mn,zn],error:"Cannot set dual-stack in combination with a custom endpoint.",[D]:Qe},{[q]:[zn,bn],error:"A custom endpoint cannot be combined with FIPS",[D]:Qe},{[q]:[zn,Ds],error:"A custom endpoint cannot be combined with S3 Accelerate",[D]:Qe},{[q]:[bn,fT,IE],error:"Partition does not support FIPS",[D]:Qe},{[q]:[Nf,{[ce]:Sr,[le]:[Dn,0,OM,Os],[Zt]:CE},{[ce]:Qt,[le]:[{[it]:CE},"--x-s3"]}],rules:[{[q]:D0,error:"S3Express does not support Dual-stack.",[D]:Qe},{[q]:od,error:"S3Express does not support S3 Accelerate.",[D]:Qe},{[q]:fa,rules:[{[q]:aC,rules:[{[q]:oC,rules:[{[q]:L0,rules:[{endpoint:{[He]:xE,[qe]:gi,[je]:dt},[D]:ve}],[D]:ye}],[D]:ye},{[q]:M0,rules:[{endpoint:{[He]:Td,[qe]:gi,[je]:dt},[D]:ve}],[D]:ye},C0],[D]:ye},{[q]:oC,rules:[{[q]:L0,rules:[{endpoint:{[He]:xE,[qe]:Of,[je]:dt},[D]:ve}],[D]:ye}],[D]:ye},{[q]:M0,rules:[{endpoint:{[He]:Td,[qe]:Of,[je]:dt},[D]:ve}],[D]:ye},C0],[D]:ye},{[q]:[BE,PE],rules:[{[q]:[mT,yt],rules:[{[q]:Lo,endpoint:{[He]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",[qe]:gi,[je]:dt},[D]:ve},{endpoint:{[He]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",[qe]:gi,[je]:dt},[D]:ve}],[D]:ye}],[D]:ye},{[q]:M0,rules:[{[q]:aC,rules:[{[q]:cC,rules:Rl,[D]:ye},{[q]:lC,rules:Rl,[D]:ye},{[q]:uC,rules:Rl,[D]:ye},{[q]:dC,rules:Rl,[D]:ye},{[q]:fC,rules:Rl,[D]:ye},NE],[D]:ye},{[q]:cC,rules:Il,[D]:ye},{[q]:lC,rules:Il,[D]:ye},{[q]:uC,rules:Il,[D]:ye},{[q]:dC,rules:Il,[D]:ye},{[q]:fC,rules:Il,[D]:ye},NE],[D]:ye},C0],[D]:ye},{[q]:[OE,BE,PE],rules:[{[q]:fa,endpoint:{[He]:Sd,[qe]:gi,[je]:dt},[D]:ve},{[q]:Lo,endpoint:{[He]:"https://s3express-control-fips.{Region}.amazonaws.com",[qe]:gi,[je]:dt},[D]:ve},{endpoint:{[He]:"https://s3express-control.{Region}.amazonaws.com",[qe]:gi,[je]:dt},[D]:ve}],[D]:ye},{[q]:[Nf,{[ce]:Sr,[le]:[Dn,49,50,Os],[Zt]:rT},{[ce]:Sr,[le]:[Dn,8,12,Os],[Zt]:sT},{[ce]:Sr,[le]:[Dn,0,7,Os],[Zt]:vE},{[ce]:Sr,[le]:[Dn,32,49,Os],[Zt]:tb},{[ce]:Bf,[le]:O0,[Zt]:"regionPartition"},{[ce]:Qt,[le]:[{[it]:vE},"--op-s3"]}],rules:[{[q]:hC,rules:[{[q]:[{[ce]:Qt,[le]:[DE,"e"]}],rules:[{[q]:mC,rules:[LE,{[q]:fa,endpoint:{[He]:"https://{Bucket}.ec2.{url#authority}",[qe]:id,[je]:dt},[D]:ve}],[D]:ye},{endpoint:{[He]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[qe]:id,[je]:dt},[D]:ve}],[D]:ye},{[q]:[{[ce]:Qt,[le]:[DE,"o"]}],rules:[{[q]:mC,rules:[LE,{[q]:fa,endpoint:{[He]:"https://{Bucket}.op-{outpostId}.{url#authority}",[qe]:id,[je]:dt},[D]:ve}],[D]:ye},{endpoint:{[He]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[qe]:id,[je]:dt},[D]:ve}],[D]:ye},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[D]:Qe}],[D]:ye},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[D]:Qe}],[D]:ye},{[q]:zM,rules:[{[q]:[zn,{[ce]:ri,[le]:[{[ce]:xs,[le]:[{[ce]:tT,[le]:MM}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[D]:Qe},{[q]:[x0,bT],rules:[{[q]:Bi,rules:[{[q]:bC,rules:[{[q]:[Ds,IE],error:"S3 Accelerate cannot be used in this region",[D]:Qe},{[q]:[mn,bn,Fn,yt,Kn],endpoint:{[He]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[mn,bn,Fn,yt,Bt,sr],rules:[{endpoint:ME,[D]:ve}],[D]:ye},{[q]:[mn,bn,Fn,yt,Bt,ir],endpoint:ME,[D]:ve},{[q]:[kt,bn,Fn,yt,Kn],endpoint:{[He]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,bn,Fn,yt,Bt,sr],rules:[{endpoint:FE,[D]:ve}],[D]:ye},{[q]:[kt,bn,Fn,yt,Bt,ir],endpoint:FE,[D]:ve},{[q]:[mn,vt,Ds,yt,Kn],endpoint:{[He]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[mn,vt,Ds,yt,Bt,sr],rules:[{endpoint:zE,[D]:ve}],[D]:ye},{[q]:[mn,vt,Ds,yt,Bt,ir],endpoint:zE,[D]:ve},{[q]:[mn,vt,Fn,yt,Kn],endpoint:{[He]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[mn,vt,Fn,yt,Bt,sr],rules:[{endpoint:UE,[D]:ve}],[D]:ye},{[q]:[mn,vt,Fn,yt,Bt,ir],endpoint:UE,[D]:ve},{[q]:[kt,vt,Fn,zn,Dr,wd,Kn],endpoint:{[He]:iT,[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,vt,Fn,zn,Dr,v0,Kn],endpoint:{[He]:Td,[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,vt,Fn,zn,Dr,wd,Bt,sr],rules:[{[q]:Pi,endpoint:_0,[D]:ve},{endpoint:_0,[D]:ve}],[D]:ye},{[q]:[kt,vt,Fn,zn,Dr,v0,Bt,sr],rules:[{[q]:Pi,endpoint:nb,[D]:ve},$E],[D]:ye},{[q]:[kt,vt,Fn,zn,Dr,wd,Bt,ir],endpoint:_0,[D]:ve},{[q]:[kt,vt,Fn,zn,Dr,v0,Bt,ir],endpoint:nb,[D]:ve},{[q]:[kt,vt,Ds,yt,Kn],endpoint:{[He]:aT,[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,vt,Ds,yt,Bt,sr],rules:[{[q]:Pi,endpoint:T0,[D]:ve},{endpoint:T0,[D]:ve}],[D]:ye},{[q]:[kt,vt,Ds,yt,Bt,ir],endpoint:T0,[D]:ve},{[q]:[kt,vt,Fn,yt,Kn],endpoint:{[He]:_E,[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,vt,Fn,yt,Bt,sr],rules:[{[q]:Pi,endpoint:{[He]:_E,[qe]:Hn,[je]:dt},[D]:ve},{endpoint:HE,[D]:ve}],[D]:ye},{[q]:[kt,vt,Fn,yt,Bt,ir],endpoint:HE,[D]:ve}],[D]:ye},ad],[D]:ye}],[D]:ye},{[q]:[zn,Dr,{[ce]:Qt,[le]:[{[ce]:On,[le]:[hT,"scheme"]},"http"]},{[ce]:nT,[le]:[Dn,Os]},x0,vt,kt,Fn],rules:[{[q]:Bi,rules:[{[q]:bC,rules:[$E],[D]:ye},ad],[D]:ye}],[D]:ye},{[q]:[x0,{[ce]:oT,[le]:FM,[Zt]:cT}],rules:[{[q]:[{[ce]:On,[le]:[Vr,"resourceId[0]"],[Zt]:lT},{[ce]:ri,[le]:[{[ce]:Qt,[le]:[gT,Pf]}]}],rules:[{[q]:[{[ce]:Qt,[le]:[S0,tp]}],rules:[{[q]:F0,rules:[{[q]:gC,rules:[qE,jE,{[q]:z0,rules:[WE,{[q]:pC,rules:[w0,{[q]:U0,rules:[{[q]:Bi,rules:[{[q]:yC,rules:[{[q]:$0,rules:[{[q]:[{[ce]:Qt,[le]:[yT,Pf]}],error:"Invalid ARN: Missing account id",[D]:Qe},{[q]:H0,rules:[{[q]:EC,rules:[{[q]:fa,endpoint:{[He]:TE,[qe]:A0,[je]:dt},[D]:ve},{[q]:Lo,endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[qe]:A0,[je]:dt},[D]:ve},{endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[qe]:A0,[je]:dt},[D]:ve}],[D]:ye},GE],[D]:ye},k0],[D]:ye},R0],[D]:ye},I0],[D]:ye}],[D]:ye}],[D]:ye},VE],[D]:ye},{error:"Invalid ARN: bucket ARN is missing a region",[D]:Qe}],[D]:ye},KE],[D]:ye},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[D]:Qe}],[D]:ye},{[q]:F0,rules:[{[q]:gC,rules:[{[q]:z0,rules:[{[q]:F0,rules:[{[q]:z0,rules:[WE,{[q]:pC,rules:[w0,{[q]:U0,rules:[{[q]:Bi,rules:[{[q]:[{[ce]:Qt,[le]:[pT,"{partitionResult#name}"]}],rules:[{[q]:$0,rules:[{[q]:[{[ce]:Qt,[le]:[S0,Dc]}],rules:[{[q]:H0,rules:[{[q]:EC,rules:[{[q]:od,error:"Access Points do not support S3 Accelerate",[D]:Qe},{[q]:[bn,mn],endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[qe]:kl,[je]:dt},[D]:ve},{[q]:[bn,kt],endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[qe]:kl,[je]:dt},[D]:ve},{[q]:[vt,mn],endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[qe]:kl,[je]:dt},[D]:ve},{[q]:[vt,kt,zn,Dr],endpoint:{[He]:TE,[qe]:kl,[je]:dt},[D]:ve},{[q]:[vt,kt],endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[qe]:kl,[je]:dt},[D]:ve}],[D]:ye},GE],[D]:ye},k0],[D]:ye},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[D]:Qe}],[D]:ye},R0],[D]:ye},I0],[D]:ye}],[D]:ye}],[D]:ye},VE],[D]:ye}],[D]:ye}],[D]:ye},{[q]:[{[ce]:go,[le]:[rp,Os]}],rules:[{[q]:D0,error:"S3 MRAP does not support dual-stack",[D]:Qe},{[q]:Lo,error:"S3 MRAP does not support FIPS",[D]:Qe},{[q]:od,error:"S3 MRAP does not support S3 Accelerate",[D]:Qe},{[q]:[{[ce]:fr,[le]:[{[it]:"DisableMultiRegionAccessPoints"},Os]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[D]:Qe},{[q]:[{[ce]:Bf,[le]:O0,[Zt]:SE}],rules:[{[q]:[{[ce]:Qt,[le]:[{[ce]:On,[le]:[{[it]:SE},Rr]},{[ce]:On,[le]:[Vr,"partition"]}]}],rules:[{endpoint:{[He]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[qe]:{[qs]:[{[ls]:Os,name:ep,[us]:Dc,[Jg]:UM}]},[je]:dt},[D]:ve}],[D]:ye},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[D]:Qe}],[D]:ye}],[D]:ye},{error:"Invalid Access Point Name",[D]:Qe}],[D]:ye},KE],[D]:ye},{[q]:[{[ce]:Qt,[le]:[S0,fu]}],rules:[{[q]:D0,error:"S3 Outposts does not support Dual-stack",[D]:Qe},{[q]:Lo,error:"S3 Outposts does not support FIPS",[D]:Qe},{[q]:od,error:"S3 Outposts does not support S3 Accelerate",[D]:Qe},{[q]:[{[ce]:xs,[le]:[{[ce]:On,[le]:[Vr,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[D]:Qe},{[q]:[{[ce]:On,[le]:$M,[Zt]:tb}],rules:[{[q]:hC,rules:[w0,{[q]:U0,rules:[{[q]:Bi,rules:[{[q]:yC,rules:[{[q]:$0,rules:[{[q]:H0,rules:[{[q]:[{[ce]:On,[le]:HM,[Zt]:wE}],rules:[{[q]:[{[ce]:On,[le]:[Vr,"resourceId[3]"],[Zt]:np}],rules:[{[q]:[{[ce]:Qt,[le]:[{[it]:wE},uT]}],rules:[{[q]:fa,endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[qe]:YE,[je]:dt},[D]:ve},{endpoint:{[He]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[qe]:YE,[je]:dt},[D]:ve}],[D]:ye},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[D]:Qe}],[D]:ye},{error:"Invalid ARN: expected an access point name",[D]:Qe}],[D]:ye},{error:"Invalid ARN: Expected a 4-component resource",[D]:Qe}],[D]:ye},k0],[D]:ye},R0],[D]:ye},I0],[D]:ye}],[D]:ye}],[D]:ye},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[D]:Qe}],[D]:ye},{error:"Invalid ARN: The Outpost Id was not set",[D]:Qe}],[D]:ye},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[D]:Qe}],[D]:ye},{error:"Invalid ARN: No ARN type specified",[D]:Qe}],[D]:ye},{[q]:[{[ce]:Sr,[le]:[Dn,0,4,DM],[Zt]:AE},{[ce]:Qt,[le]:[{[it]:AE},"arn:"]},{[ce]:ri,[le]:[{[ce]:xs,[le]:[XE]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[D]:Qe},{[q]:[{[ce]:fr,[le]:[LM,Os]},XE],error:"Path-style addressing cannot be used with ARN buckets",[D]:Qe},{[q]:L0,rules:[{[q]:Bi,rules:[{[q]:[Fn],rules:[{[q]:[mn,yt,bn,Kn],endpoint:{[He]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[mn,yt,bn,Bt,sr],rules:[{endpoint:QE,[D]:ve}],[D]:ye},{[q]:[mn,yt,bn,Bt,ir],endpoint:QE,[D]:ve},{[q]:[kt,yt,bn,Kn],endpoint:{[He]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,yt,bn,Bt,sr],rules:[{endpoint:ZE,[D]:ve}],[D]:ye},{[q]:[kt,yt,bn,Bt,ir],endpoint:ZE,[D]:ve},{[q]:[mn,yt,vt,Kn],endpoint:{[He]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[mn,yt,vt,Bt,sr],rules:[{endpoint:JE,[D]:ve}],[D]:ye},{[q]:[mn,yt,vt,Bt,ir],endpoint:JE,[D]:ve},{[q]:[kt,zn,Dr,vt,Kn],endpoint:{[He]:dT,[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,zn,Dr,vt,Bt,sr],rules:[{[q]:Pi,endpoint:B0,[D]:ve},{endpoint:B0,[D]:ve}],[D]:ye},{[q]:[kt,zn,Dr,vt,Bt,ir],endpoint:B0,[D]:ve},{[q]:[kt,yt,vt,Kn],endpoint:{[He]:kE,[qe]:rr,[je]:dt},[D]:ve},{[q]:[kt,yt,vt,Bt,sr],rules:[{[q]:Pi,endpoint:{[He]:kE,[qe]:Hn,[je]:dt},[D]:ve},{endpoint:eC,[D]:ve}],[D]:ye},{[q]:[kt,yt,vt,Bt,ir],endpoint:eC,[D]:ve}],[D]:ye},{error:"Path-style addressing cannot be used with S3 Accelerate",[D]:Qe}],[D]:ye}],[D]:ye}],[D]:ye},{[q]:[{[ce]:xs,[le]:[tC]},{[ce]:fr,[le]:[tC,Os]}],rules:[{[q]:Bi,rules:[{[q]:CC,rules:[qE,jE,{[q]:fa,endpoint:{[He]:Sd,[qe]:P0,[je]:dt},[D]:ve},{[q]:Lo,endpoint:{[He]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[qe]:P0,[je]:dt},[D]:ve},{endpoint:{[He]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[qe]:P0,[je]:dt},[D]:ve}],[D]:ye},ad],[D]:ye}],[D]:ye},{[q]:[OE],rules:[{[q]:Bi,rules:[{[q]:CC,rules:[{[q]:[bn,mn,yt,Kn],endpoint:{[He]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[bn,mn,yt,Bt,sr],rules:[{endpoint:nC,[D]:ve}],[D]:ye},{[q]:[bn,mn,yt,Bt,ir],endpoint:nC,[D]:ve},{[q]:[bn,kt,yt,Kn],endpoint:{[He]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[bn,kt,yt,Bt,sr],rules:[{endpoint:rC,[D]:ve}],[D]:ye},{[q]:[bn,kt,yt,Bt,ir],endpoint:rC,[D]:ve},{[q]:[vt,mn,yt,Kn],endpoint:{[He]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[qe]:rr,[je]:dt},[D]:ve},{[q]:[vt,mn,yt,Bt,sr],rules:[{endpoint:sC,[D]:ve}],[D]:ye},{[q]:[vt,mn,yt,Bt,ir],endpoint:sC,[D]:ve},{[q]:[vt,kt,zn,Dr,Kn],endpoint:{[He]:Sd,[qe]:rr,[je]:dt},[D]:ve},{[q]:[vt,kt,zn,Dr,Bt,sr],rules:[{[q]:Pi,endpoint:N0,[D]:ve},{endpoint:N0,[D]:ve}],[D]:ye},{[q]:[vt,kt,zn,Dr,Bt,ir],endpoint:N0,[D]:ve},{[q]:[vt,kt,yt,Kn],endpoint:{[He]:RE,[qe]:rr,[je]:dt},[D]:ve},{[q]:[vt,kt,yt,Bt,sr],rules:[{[q]:Pi,endpoint:{[He]:RE,[qe]:Hn,[je]:dt},[D]:ve},{endpoint:iC,[D]:ve}],[D]:ye},{[q]:[vt,kt,yt,Bt,ir],endpoint:iC,[D]:ve}],[D]:ye},ad],[D]:ye}],[D]:ye}],[D]:ye},{error:"A region must be set when sending requests to S3.",[D]:Qe}]},jM=qM,WM=new nL({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),ET=(e,t={})=>WM.get(e,()=>xL(jM,{endpointParams:e,logger:t.logger}));kf.aws=G_;const GM=e=>async(t,n,r)=>{var o,c,l;if(!r)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const s=await e(t,n,r),i=(l=(c=(o=Gc(n))==null?void 0:o.commandInstance)==null?void 0:c.constructor)==null?void 0:l.getEndpointParameterInstructions;if(!i)throw new Error(`getEndpointParameterInstructions() is not defined on \`${n.commandName}\``);const a=await X_(r,{getEndpointParameterInstructions:i},t);return Object.assign(s,a)},VM=async(e,t,n)=>({operation:Gc(t).operation,region:await ni(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),KM=GM(VM);function CT(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}function xT(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(t,n)=>({signingProperties:{config:t,context:n}})}}const YM=(e,t,n)=>s=>{var c;const a=(c=e(s).properties)==null?void 0:c.authSchemes;if(!a)return t(s);const o=[];for(const l of a){const{name:u,properties:f={},...m}=l,h=u.toLowerCase();u!==h&&console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${u}\` to \`${h}\``);let b;if(h==="sigv4a"){if(b="aws.auth#sigv4a",a.find(y=>{const w=y.name.toLowerCase();return w!=="sigv4a"&&w.startsWith("sigv4")}))continue}else if(h.startsWith("sigv4"))b="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${h}\``);const p=n[b];if(!p)throw new Error(`Could not find HttpAuthOption create function for \`${b}\``);const E=p(s);E.schemeId=b,E.signingProperties={...E.signingProperties||{},...m,...f},o.push(E)}return o},XM=e=>{const t=[];switch(e.operation){default:t.push(CT(e)),t.push(xT(e))}return t},QM=YM(ET,XM,{"aws.auth#sigv4":CT,"aws.auth#sigv4a":xT}),ZM=e=>{const t=qD(e);return{...yD(t)}},JM=e=>({...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"}),we={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 Br extends Ho{constructor(t){super(t),Object.setPrototypeOf(this,Br.prototype)}}class sp extends Br{constructor(n){super({name:"NoSuchUpload",$fault:"client",...n});ge(this,"name","NoSuchUpload");ge(this,"$fault","client");Object.setPrototypeOf(this,sp.prototype)}}class ip extends Br{constructor(n){super({name:"ObjectNotInActiveTierError",$fault:"client",...n});ge(this,"name","ObjectNotInActiveTierError");ge(this,"$fault","client");Object.setPrototypeOf(this,ip.prototype)}}class ap extends Br{constructor(n){super({name:"BucketAlreadyExists",$fault:"client",...n});ge(this,"name","BucketAlreadyExists");ge(this,"$fault","client");Object.setPrototypeOf(this,ap.prototype)}}class op extends Br{constructor(n){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...n});ge(this,"name","BucketAlreadyOwnedByYou");ge(this,"$fault","client");Object.setPrototypeOf(this,op.prototype)}}class cp extends Br{constructor(n){super({name:"NoSuchBucket",$fault:"client",...n});ge(this,"name","NoSuchBucket");ge(this,"$fault","client");Object.setPrototypeOf(this,cp.prototype)}}var rb;(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])})(rb||(rb={}));var sb;(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])})(sb||(sb={}));class lp extends Br{constructor(n){super({name:"InvalidObjectState",$fault:"client",...n});ge(this,"name","InvalidObjectState");ge(this,"$fault","client");ge(this,"StorageClass");ge(this,"AccessTier");Object.setPrototypeOf(this,lp.prototype),this.StorageClass=n.StorageClass,this.AccessTier=n.AccessTier}}class up extends Br{constructor(n){super({name:"NoSuchKey",$fault:"client",...n});ge(this,"name","NoSuchKey");ge(this,"$fault","client");Object.setPrototypeOf(this,up.prototype)}}class dp extends Br{constructor(n){super({name:"NotFound",$fault:"client",...n});ge(this,"name","NotFound");ge(this,"$fault","client");Object.setPrototypeOf(this,dp.prototype)}}const eF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),tF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),nF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),rF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:_t}}),sF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),iF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),aF=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:_t},...e.SessionToken&&{SessionToken:_t}}),oF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t},...e.Credentials&&{Credentials:aF(e.Credentials)}}),cF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),lF=e=>({...e,...e.KMSMasterKeyID&&{KMSMasterKeyID:_t}}),uF=e=>({...e,...e.ApplyServerSideEncryptionByDefault&&{ApplyServerSideEncryptionByDefault:lF(e.ApplyServerSideEncryptionByDefault)}}),vT=e=>({...e,...e.Rules&&{Rules:e.Rules.map(t=>uF(t))}}),dF=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:vT(e.ServerSideEncryptionConfiguration)}}),fF=e=>({...e,...e.KeyId&&{KeyId:_t}}),hF=e=>({...e,...e.SSEKMS&&{SSEKMS:fF(e.SSEKMS)}}),mF=e=>({...e,...e.Encryption&&{Encryption:hF(e.Encryption)}}),bF=e=>({...e,...e.S3BucketDestination&&{S3BucketDestination:mF(e.S3BucketDestination)}}),fp=e=>({...e,...e.Destination&&{Destination:bF(e.Destination)}}),gF=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:fp(e.InventoryConfiguration)}}),pF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),yF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),EF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),CF=e=>({...e}),xF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),vF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),_F=e=>({...e,...e.InventoryConfigurationList&&{InventoryConfigurationList:e.InventoryConfigurationList.map(t=>fp(t))}}),TF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}});function SF(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function wF(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 hp{constructor(t){ge(this,"value");this.value=t}toString(){return wF(""+this.value)}}class z{constructor(t,n=[]){ge(this,"name");ge(this,"children");ge(this,"attributes",{});this.name=t,this.children=n}static of(t,n,r){const s=new z(t);return n!==void 0&&s.addChildNode(new hp(n)),r!==void 0&&s.withName(r),s}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=z.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 z(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}="${SF(""+i)}"`)}return n+=t?`>${this.children.map(s=>s.toString()).join("")}</${this.name}>`:"/>"}}class mp extends Br{constructor(n){super({name:"EncryptionTypeMismatch",$fault:"client",...n});ge(this,"name","EncryptionTypeMismatch");ge(this,"$fault","client");Object.setPrototypeOf(this,mp.prototype)}}class bp extends Br{constructor(n){super({name:"InvalidRequest",$fault:"client",...n});ge(this,"name","InvalidRequest");ge(this,"$fault","client");Object.setPrototypeOf(this,bp.prototype)}}class gp extends Br{constructor(n){super({name:"InvalidWriteOffset",$fault:"client",...n});ge(this,"name","InvalidWriteOffset");ge(this,"$fault","client");Object.setPrototypeOf(this,gp.prototype)}}class pp extends Br{constructor(n){super({name:"TooManyParts",$fault:"client",...n});ge(this,"name","TooManyParts");ge(this,"$fault","client");Object.setPrototypeOf(this,pp.prototype)}}class yp extends Br{constructor(n){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...n});ge(this,"name","ObjectAlreadyInActiveTierError");ge(this,"$fault","client");Object.setPrototypeOf(this,yp.prototype)}}var xC;(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])})(xC||(xC={}));const AF=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:vT(e.ServerSideEncryptionConfiguration)}}),kF=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:fp(e.InventoryConfiguration)}}),RF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),IF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.SSEKMSKeyId&&{SSEKMSKeyId:_t},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_t}}),BF=e=>({...e,...e.KMSKeyId&&{KMSKeyId:_t}}),PF=e=>({...e,...e.Encryption&&{Encryption:BF(e.Encryption)}}),NF=e=>({...e,...e.S3&&{S3:PF(e.S3)}}),OF=e=>({...e,...e.OutputLocation&&{OutputLocation:NF(e.OutputLocation)}}),DF=e=>({...e,...e.RestoreRequest&&{RestoreRequest:OF(e.RestoreRequest)}}),LF=e=>({...e,...e.Payload&&{Payload:"STREAMING_CONTENT"}}),MF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),FF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),zF=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t}}),UF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),$F=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:_t},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:_t}}),HF=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:_t}}),qF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe],[nY]:[()=>re(e[kC]),()=>dr(e[kC]).toString()]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"AbortMultipartUpload"],[Ou]:[,Ge(e[Zr],"UploadId")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},jF=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Co]:e[on],[xo]:e[cn],[vo]:e[ln],[_o]:e[un],[To]:e[dn],[ul]:e[fn],[aY]:[()=>re(e[NC]),()=>e[NC].toString()],[Vt]:e[Wt],[Ne]:e[Pe],[Pu]:e[Su],[_h]:e[gh],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[Ou]:[,Ge(e[Zr],"UploadId")]});let i,a;return e.MultipartUpload!==void 0&&(a=r$(e.MultipartUpload),a=a.n("CompleteMultipartUpload"),i=Gt,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()},WF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[ll]:e[Qc],[Au]:e[Zc],[Wp]:e[Tt],[ku]:e[Jc],[Ru]:e[el],[Iu]:e[tl],[Bu]:e[nl],[WS]:e[jT],[GS]:e[WT],[VS]:[()=>re(e[Df]),()=>dr(e[Df]).toString()],[KS]:e[GT],[YS]:[()=>re(e[Lf]),()=>dr(e[Lf]).toString()],[co]:[()=>re(e[ai]),()=>dr(e[ai]).toString()],[dl]:e[rl],[fl]:e[sl],[hl]:e[il],[ml]:e[al],[iY]:e[qG],[bY]:e[zV],[hs]:e[Pr],[Fu]:e[xt],[zu]:e[wu],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[ms]:e[Cr],[oa]:e[aa],[Bn]:[()=>re(e[gn]),()=>e[gn].toString()],[XS]:e[VT],[QS]:e[KT],[ZS]:e[YT],[Vt]:e[Wt],[Yp]:e[eo],[Mu]:e[ol],[lo]:[()=>re(e[oi]),()=>bo(e[oi]).toString()],[Lu]:e[yo],[Ne]:e[Pe],[nw]:e[ZT],...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((a,o)=>(a[`x-amz-meta-${o.toLowerCase()}`]=e.Metadata[o],a),{})});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"CopyObject"]});return n.m("PUT").h(r).q(s).b(void 0),n.build()},GF=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[ll]:e[Qc],[dl]:e[rl],[fl]:e[sl],[hl]:e[il],[Gp]:e[wp],[ml]:e[al],[bK]:[()=>re(e[DC]),()=>e[DC].toString()],[lY]:e[Kl]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);let s,i;return e.CreateBucketConfiguration!==void 0&&(i=u$(e.CreateBucketConfiguration),s=Gt,i.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),s+=i.toString()),n.m("PUT").h(r).b(s),n.build()},VF=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Mp]:[,""]});let i,a;return e.MetadataTableConfiguration!==void 0&&(a=X$(e.MetadataTableConfiguration),i=Gt,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()},KF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[ll]:e[Qc],[Au]:e[Zc],[ku]:e[Jc],[Ru]:e[el],[Iu]:e[tl],[Bu]:e[nl],[co]:[()=>re(e[ai]),()=>dr(e[ai]).toString()],[dl]:e[rl],[fl]:e[sl],[hl]:e[il],[ml]:e[al],[hs]:e[Pr],[Fu]:e[xt],[zu]:e[wu],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[ms]:e[Cr],[oa]:e[aa],[Bn]:[()=>re(e[gn]),()=>e[gn].toString()],[Vt]:e[Wt],[Yp]:e[eo],[Mu]:e[ol],[lo]:[()=>re(e[oi]),()=>bo(e[oi]).toString()],[Lu]:e[yo],[Ne]:e[Pe],[Wp]:e[Tt],[ul]:e[fn],...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((a,o)=>(a[`x-amz-meta-${o.toLowerCase()}`]=e.Metadata[o],a),{})});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[US]:[,""]});return n.m("POST").h(r).q(s).b(void 0),n.build()},YF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[yK]:e[PV],[hs]:e[Pr],[ms]:e[Cr],[oa]:e[aa],[Bn]:[()=>re(e[gn]),()=>e[gn].toString()]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[sK]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},XF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});return n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.m("DELETE").h(r).b(void 0),n.build()},QF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[ph]:[,""],[Ps]:[,Ge(e[nt],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},ZF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Op]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},JF=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Dp]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},e9=async(e,t)=>{const n=Te(e,t),r={};n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Th]:[,""],[Ps]:[,Ge(e[nt],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},t9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[vh]:[,""],[Ps]:[,Ge(e[nt],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},n9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Lp]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},r9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Mp]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},s9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Sh]:[,""],[Ps]:[,Ge(e[nt],"Id")]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},i9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[zp]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},a9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Up]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},o9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Hp]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},c9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[cl]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},l9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[qp]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},u9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vp]:e[Ap],[Vt]:e[Wt],[jp]:[()=>re(e[Lc]),()=>e[Lc].toString()],[Ne]:e[Pe],[Pu]:e[Su],[rY]:[()=>re(e[RC]),()=>dr(e[RC]).toString()],[sY]:[()=>re(e[IC]),()=>e[IC].toString()]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"DeleteObject"],[ns]:[,e[St]]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},d9=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Vp]:e[Ap],[Vt]:e[Wt],[jp]:[()=>re(e[Lc]),()=>e[Lc].toString()],[Ne]:e[Pe],[In]:e[Tt]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[VV]:[,""]});let i,a;return e.Delete!==void 0&&(a=m$(e.Delete),i=Gt,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()},f9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[cl]:[,""],[ns]:[,e[St]]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},h9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[$p]:[,""]});return n.m("DELETE").h(r).q(s).b(void 0),n.build()},m9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe],[Vt]:e[Wt]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[ES]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},b9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[yh]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},g9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[ph]:[,""],[gr]:[,"GetBucketAnalyticsConfiguration"],[Ps]:[,Ge(e[nt],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},p9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Op]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},y9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Dp]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},E9=async(e,t)=>{const n=Te(e,t),r={};n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Th]:[,""],[gr]:[,"GetBucketIntelligentTieringConfiguration"],[Ps]:[,Ge(e[nt],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},C9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[vh]:[,""],[gr]:[,"GetBucketInventoryConfiguration"],[Ps]:[,Ge(e[nt],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},x9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Lp]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},v9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[AS]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},_9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[kS]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},T9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Mp]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},S9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Sh]:[,""],[gr]:[,"GetBucketMetricsConfiguration"],[Ps]:[,Ge(e[nt],"Id")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},w9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[RS]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},A9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[zp]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},k9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Up]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},R9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[tK]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},I9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Hp]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},B9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[BS]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},P9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[cl]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},N9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[$S]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},O9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[qp]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},D9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Pu]:e[Su],[_S]:[()=>re(e[Mf]),()=>dr(e[Mf]).toString()],[_h]:e[gh],[TS]:[()=>re(e[Ff]),()=>dr(e[Ff]).toString()],[PS]:e[cS],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[Vt]:e[Wt],[Ne]:e[Pe],[jS]:e[qT]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"GetObject"],[NS]:[,e[lS]],[OS]:[,e[uS]],[DS]:[,e[dS]],[LS]:[,e[fS]],[MS]:[,e[hS]],[FS]:[()=>e.ResponseExpires!==void 0,()=>dr(e[mS]).toString()],[ns]:[,e[St]],[wh]:[()=>e.PartNumber!==void 0,()=>e[Kr].toString()]});return n.m("GET").h(r).q(s).b(void 0),n.build()},L9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[yh]:[,""],[ns]:[,e[St]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},M9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[oY]:[()=>re(e[xi]),()=>e[xi].toString()],[uY]:e[Gi],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[Vt]:e[Wt],[Ne]:e[Pe],[cY]:[()=>re(e[OC]),()=>(e[OC]||[]).map(dh).join(", ")]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[WV]:[,""],[ns]:[,e[St]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},F9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[wS]:[,""],[ns]:[,e[St]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},z9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[IS]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},U9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[zS]:[,""],[ns]:[,e[St]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},$9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe],[Vt]:e[Wt]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[cl]:[,""],[ns]:[,e[St]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},H9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[cK]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},q9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[$p]:[,""]});return n.m("GET").h(r).q(s).b(void 0),n.build()},j9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});return n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.m("HEAD").h(r).b(void 0),n.build()},W9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Pu]:e[Su],[_S]:[()=>re(e[Mf]),()=>dr(e[Mf]).toString()],[_h]:e[gh],[TS]:[()=>re(e[Ff]),()=>dr(e[Ff]).toString()],[PS]:e[cS],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[Vt]:e[Wt],[Ne]:e[Pe],[jS]:e[qT]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[NS]:[,e[lS]],[OS]:[,e[uS]],[DS]:[,e[dS]],[LS]:[,e[fS]],[MS]:[,e[hS]],[FS]:[()=>e.ResponseExpires!==void 0,()=>dr(e[mS]).toString()],[ns]:[,e[St]],[wh]:[()=>e.PartNumber!==void 0,()=>e[Kr].toString()]});return n.m("HEAD").h(r).q(s).b(void 0),n.build()},G9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[ph]:[,""],[gr]:[,"ListBucketAnalyticsConfigurations"],[Eo]:[,e[en]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},V9=async(e,t)=>{const n=Te(e,t),r={};n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Th]:[,""],[gr]:[,"ListBucketIntelligentTieringConfigurations"],[Eo]:[,e[en]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},K9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[vh]:[,""],[gr]:[,"ListBucketInventoryConfigurations"],[Eo]:[,e[en]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},Y9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Sh]:[,""],[gr]:[,"ListBucketMetricsConfigurations"],[Eo]:[,e[en]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},X9=async(e,t)=>{const n=Te(e,t),r={};n.bp("/");const s=I({[gr]:[,"ListBuckets"],[QV]:[()=>e.MaxBuckets!==void 0,()=>e[HG].toString()],[Eo]:[,e[en]],[Nu]:[,e[Oe]],[GV]:[,e[Gl]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},Q9=async(e,t)=>{const n=Te(e,t),r={};n.bp("/");const s=I({[gr]:[,"ListDirectoryBuckets"],[Eo]:[,e[en]],[ZV]:[()=>e.MaxDirectoryBuckets!==void 0,()=>e[jG].toString()]});return n.m("GET").h(r).q(s).b(void 0),n.build()},Z9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe],[Vt]:e[Wt]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[US]:[,""],[Eh]:[,e[Ar]],[Ch]:[,e[kr]],[SS]:[,e[Wi]],[eK]:[()=>e.MaxUploads!==void 0,()=>e[Md].toString()],[Nu]:[,e[Oe]],[lK]:[,e[nf]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},J9=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe],[Kp]:[()=>re(e[Mc]),()=>(e[Mc]||[]).map(dh).join(", ")]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Eh]:[,e[Ar]],[Ch]:[,e[kr]],[XV]:[,e[Dd]],[Fp]:[()=>e.MaxKeys!==void 0,()=>e[Ts].toString()],[Nu]:[,e[Oe]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},ez=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe],[Kp]:[()=>re(e[Mc]),()=>(e[Mc]||[]).map(dh).join(", ")]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[YV]:[,"2"],[Eh]:[,e[Ar]],[Ch]:[,e[kr]],[Fp]:[()=>e.MaxKeys!==void 0,()=>e[Ts].toString()],[Nu]:[,e[Oe]],[Eo]:[,e[en]],[KV]:[()=>e.FetchOwner!==void 0,()=>e[lG].toString()],[iK]:[,e[Kd]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},tz=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Ne]:e[Pe],[Vt]:e[Wt],[Kp]:[()=>re(e[Mc]),()=>(e[Mc]||[]).map(dh).join(", ")]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[uK]:[,""],[Eh]:[,e[Ar]],[Ch]:[,e[kr]],[SS]:[,e[Wi]],[Fp]:[()=>e.MaxKeys!==void 0,()=>e[Ts].toString()],[Nu]:[,e[Oe]],[dK]:[,e[sf]]});return n.m("GET").h(r).q(s).b(void 0),n.build()},nz=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Vt]:e[Wt],[Ne]:e[Pe],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"ListParts"],[JV]:[()=>e.MaxParts!==void 0,()=>e[xi].toString()],[nK]:[,e[Gi]],[Ou]:[,Ge(e[Zr],"UploadId")]});return n.m("GET").h(r).q(s).b(void 0),n.build()},rz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Ne]:e[Pe],[In]:e[Tt]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[ES]:[,""]});let i,a;return e.AccelerateConfiguration!==void 0&&(a=jU(e.AccelerateConfiguration),i=Gt,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()},sz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[ll]:e[Qc],[Wn]:e[jn],[In]:e[Tt],[dl]:e[rl],[fl]:e[sl],[hl]:e[il],[Gp]:e[wp],[ml]:e[al],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[yh]:[,""]});let i,a;return e.AccessControlPolicy!==void 0&&(a=_T(e.AccessControlPolicy),i=Gt,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()},iz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[ph]:[,""],[Ps]:[,Ge(e[nt],"Id")]});let i,a;return e.AnalyticsConfiguration!==void 0&&(a=XU(e.AnalyticsConfiguration),i=Gt,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()},az=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Op]:[,""]});let i,a;return e.CORSConfiguration!==void 0&&(a=o$(e.CORSConfiguration),i=Gt,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()},oz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Dp]:[,""]});let i,a;return e.ServerSideEncryptionConfiguration!==void 0&&(a=$H(e.ServerSideEncryptionConfiguration),i=Gt,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()},cz=async(e,t)=>{const n=Te(e,t),r={"content-type":"application/xml"};n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Th]:[,""],[Ps]:[,Ge(e[nt],"Id")]});let i,a;return e.IntelligentTieringConfiguration!==void 0&&(a=R$(e.IntelligentTieringConfiguration),i=Gt,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()},lz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[vh]:[,""],[Ps]:[,Ge(e[nt],"Id")]});let i,a;return e.InventoryConfiguration!==void 0&&(a=B$(e.InventoryConfiguration),i=Gt,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()},uz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[In]:e[Tt],[Ne]:e[Pe],[Xp]:e[Np]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Lp]:[,""]});let i,a;return e.LifecycleConfiguration!==void 0&&(a=t$(e.LifecycleConfiguration),a=a.n("LifecycleConfiguration"),i=Gt,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()},dz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[kS]:[,""]});let i,a;return e.BucketLoggingStatus!==void 0&&(a=n$(e.BucketLoggingStatus),i=Gt,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()},fz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Sh]:[,""],[Ps]:[,Ge(e[nt],"Id")]});let i,a;return e.MetricsConfiguration!==void 0&&(a=J$(e.MetricsConfiguration),i=Gt,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()},hz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Ne]:e[Pe],[mY]:[()=>re(e[MC]),()=>e[MC].toString()]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[RS]:[,""]});let i,a;return e.NotificationConfiguration!==void 0&&(a=sH(e.NotificationConfiguration),i=Gt,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()},mz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[zp]:[,""]});let i,a;return e.OwnershipControls!==void 0&&(a=hH(e.OwnershipControls),i=Gt,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()},bz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"text/plain",[Wn]:e[jn],[In]:e[Tt],[pK]:[()=>re(e[TC]),()=>e[TC].toString()],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Up]:[,""]});let i,a;return e.Policy!==void 0&&(a=e.Policy,i=a),n.m("PUT").h(r).q(s).b(i),n.build()},gz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[qS]:e[pS],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[Hp]:[,""]});let i,a;return e.ReplicationConfiguration!==void 0&&(a=TH(e.ReplicationConfiguration),i=Gt,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()},pz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[BS]:[,""]});let i,a;return e.RequestPaymentConfiguration!==void 0&&(a=IH(e.RequestPaymentConfiguration),i=Gt,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()},yz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[cl]:[,""]});let i,a;return e.Tagging!==void 0&&(a=xp(e.Tagging),i=Gt,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()},Ez=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Vp]:e[Ap],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[$S]:[,""]});let i,a;return e.VersioningConfiguration!==void 0&&(a=oq(e.VersioningConfiguration),i=Gt,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()},Cz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[qp]:[,""]});let i,a;return e.WebsiteConfiguration!==void 0&&(a=cq(e.WebsiteConfiguration),i=Gt,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()},xz=async(e,t)=>{const n=Te(e,t),r=I({},re,{[Bu]:e[nl]||"application/octet-stream",[ll]:e[Qc],[Au]:e[Zc],[ku]:e[Jc],[Ru]:e[el],[Iu]:e[tl],[oo]:[()=>re(e[Ji]),()=>e[Ji].toString()],[Wn]:e[jn],[In]:e[Tt],[Co]:e[on],[xo]:e[cn],[vo]:e[ln],[_o]:e[un],[To]:e[dn],[co]:[()=>re(e[ai]),()=>dr(e[ai]).toString()],[Pu]:e[Su],[_h]:e[gh],[dl]:e[rl],[fl]:e[sl],[hl]:e[il],[ml]:e[al],[gY]:[()=>re(e[HC]),()=>e[HC].toString()],[hs]:e[Pr],[Fu]:e[xt],[zu]:e[wu],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[ms]:e[Cr],[oa]:e[aa],[Bn]:[()=>re(e[gn]),()=>e[gn].toString()],[Vt]:e[Wt],[Yp]:e[eo],[Mu]:e[ol],[lo]:[()=>re(e[oi]),()=>bo(e[oi]).toString()],[Lu]:e[yo],[Ne]:e[Pe],...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((o,c)=>(o[`x-amz-meta-${c.toLowerCase()}`]=e.Metadata[c],o),{})});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"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()},vz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[ll]:e[Qc],[Wn]:e[jn],[In]:e[Tt],[dl]:e[rl],[fl]:e[sl],[hl]:e[il],[Gp]:e[wp],[ml]:e[al],[Vt]:e[Wt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[yh]:[,""],[ns]:[,e[St]]});let i,a;return e.AccessControlPolicy!==void 0&&(a=_T(e.AccessControlPolicy),i=Gt,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()},_z=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Vt]:e[Wt],[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[wS]:[,""],[ns]:[,e[St]]});let i,a;return e.LegalHold!==void 0&&(a=cH(e.LegalHold),a=a.n("LegalHold"),i=Gt,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()},Tz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Vt]:e[Wt],[qS]:e[pS],[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[IS]:[,""]});let i,a;return e.ObjectLockConfiguration!==void 0&&(a=oH(e.ObjectLockConfiguration),i=Gt,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()},Sz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Vt]:e[Wt],[jp]:[()=>re(e[Lc]),()=>e[Lc].toString()],[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[zS]:[,""],[ns]:[,e[St]]});let i,a;return e.Retention!==void 0&&(a=lH(e.Retention),a=a.n("Retention"),i=Gt,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()},wz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe],[Vt]:e[Wt]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[cl]:[,""],[ns]:[,e[St]]});let i,a;return e.Tagging!==void 0&&(a=xp(e.Tagging),i=Gt,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()},Az=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Wn]:e[jn],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1);const s=I({[$p]:[,""]});let i,a;return e.PublicAccessBlockConfiguration!==void 0&&(a=yH(e.PublicAccessBlockConfiguration),i=Gt,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()},kz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[Vt]:e[Wt],[In]:e[Tt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[rK]:[,""],[ns]:[,e[St]]});let i,a;return e.RestoreRequest!==void 0&&(a=PH(e.RestoreRequest),i=Gt,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()},Rz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/xml",[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[aK]:[,""],[oK]:[,"2"]});let i;i=Gt;const a=new z(NV);return a.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),a.cc(e,eS),a.cc(e,JT),e[za]!=null&&a.c(wT(e[za]).n(za)),e[ja]!=null&&a.c(AT(e[ja]).n(ja)),e[Gd]!=null&&a.c(BH(e[Gd]).n(Gd)),e[Xd]!=null&&a.c(FH(e[Xd]).n(Xd)),i+=a.toString(),n.m("POST").h(r).q(s).b(i),n.build()},Iz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"content-type":"application/octet-stream",[oo]:[()=>re(e[Ji]),()=>e[Ji].toString()],[Wn]:e[jn],[In]:e[Tt],[Co]:e[on],[xo]:e[cn],[vo]:e[ln],[_o]:e[un],[To]:e[dn],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[Vt]:e[Wt],[Ne]:e[Pe]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"UploadPart"],[wh]:[Ge(e.PartNumber,"PartNumber")!=null,()=>e[Kr].toString()],[Ou]:[,Ge(e[Zr],"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()},Bz=async(e,t)=>{const n=Te(e,t),r=I({},re,{[WS]:e[jT],[GS]:e[WT],[VS]:[()=>re(e[Df]),()=>dr(e[Df]).toString()],[KS]:e[GT],[YS]:[()=>re(e[Lf]),()=>dr(e[Lf]).toString()],[EK]:e[XW],[mr]:e[Qn],[Ws]:e[js],[br]:e[Zn],[XS]:e[VT],[QS]:e[KT],[ZS]:e[YT],[Vt]:e[Wt],[Ne]:e[Pe],[nw]:e[ZT]});n.bp("/{Key+}"),n.p("Bucket",()=>e.Bucket,"{Bucket}",!1),n.p("Key",()=>e.Key,"{Key+}",!0);const s=I({[gr]:[,"UploadPartCopy"],[wh]:[Ge(e.PartNumber,"PartNumber")!=null,()=>e[Kr].toString()],[Ou]:[,Ge(e[Zr],"UploadId")]});return n.m("PUT").h(r).q(s).b(void 0),n.build()},Pz=async(e,t)=>{const n=Te(e,t),r=I({},re,{"x-amz-content-sha256":"UNSIGNED-PAYLOAD","content-type":"application/octet-stream",[fY]:e[pV],[hY]:e[TV],[tY]:[()=>re(e[LC]),()=>e[LC].toString()],[CK]:e[kd],[xK]:e[Rd],[vK]:e[Tp],[_K]:e[Zc],[TK]:e[Jc],[SK]:e[el],[wK]:e[tl],[oo]:[()=>re(e[Ji]),()=>e[Ji].toString()],[AK]:e[Sp],[kK]:e[nl],[PK]:e[on],[NK]:e[cn],[OK]:e[ln],[DK]:e[un],[LK]:e[dn],[MK]:[()=>re(e[Fs]),()=>e[Fs].toString()],[RK]:e[tn],[IK]:[()=>re(e[ai]),()=>dr(e[ai]).toString()],[FK]:e[zr],[BK]:[()=>re(e[kn]),()=>dr(e[kn]).toString()],[zK]:[()=>re(e[zf]),()=>e[zf].toString()],[HK]:e[ol],[$K]:e[yo],[qK]:[()=>re(e[oi]),()=>bo(e[oi]).toString()],[UK]:[()=>re(e[Fc]),()=>e[Fc].toString()],[GK]:e[Bp],[WK]:e[yn],[jK]:e[Pp],[KK]:e[Pr],[QK]:e[Qn],[YK]:e[Cr],[ZK]:e[Zn],[VK]:e[xt],[JK]:[()=>re(e[Nb]),()=>e[Nb].toString()],[eY]:e[St],[XK]:[()=>re(e[gn]),()=>e[gn].toString()],...e.Metadata!==void 0&&Object.keys(e.Metadata).reduce((o,c)=>(o[`x-amz-meta-${c.toLowerCase()}`]=e.Metadata[c],o),{})});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),!v4(a))throw new Error("ValidationError: prefixed hostname must be hostname compatible.")}return n.hn(a),n.m("POST").h(r).b(s),n.build()},Nz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},Oz=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[zr]:[,e.headers[Du]],[Pr]:[,e.headers[hs]],[St]:[,e.headers[ui]],[Cr]:[,e.headers[ms]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r[It]!=null&&(n[It]=M(r[It])),r[on]!=null&&(n[on]=M(r[on])),r[cn]!=null&&(n[cn]=M(r[cn])),r[ln]!=null&&(n[ln]=M(r[ln])),r[un]!=null&&(n[un]=M(r[un])),r[dn]!=null&&(n[dn]=M(r[dn])),r[fn]!=null&&(n[fn]=M(r[fn])),r[tn]!=null&&(n[tn]=M(r[tn])),r[gt]!=null&&(n[gt]=M(r[gt])),r[Ua]!=null&&(n[Ua]=M(r[Ua])),n},Dz=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[zr]:[,e.headers[Du]],[XT]:[,e.headers[JS]],[St]:[,e.headers[ui]],[Pr]:[,e.headers[hs]],[Qn]:[,e.headers[mr]],[Zn]:[,e.headers[br]],[Cr]:[,e.headers[ms]],[aa]:[,e.headers[oa]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[yn]:[,e.headers[xn]]}),r=pt(await ut(e.body,t));return n.CopyObjectResult=Tq(r),n},Lz=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Ua]:[,e.headers[AS]]});return await ot(e.body,t),n},Mz=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Fz=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[$T]:[()=>e.headers[jf]!==void 0,()=>Ge(Xi(e.headers[jf]))],[HT]:[,e.headers[HS]],[Pr]:[,e.headers[hs]],[Qn]:[,e.headers[mr]],[Zn]:[,e.headers[br]],[Cr]:[,e.headers[ms]],[aa]:[,e.headers[oa]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[yn]:[,e.headers[xn]],[Tt]:[,e.headers[Wp]],[fn]:[,e.headers[ul]]}),r=Ge(pt(await ut(e.body,t)),"body");return r[It]!=null&&(n[It]=M(r[It])),r[gt]!=null&&(n[gt]=M(r[gt])),r[Zr]!=null&&(n[Zr]=M(r[Zr])),n},zz=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Pr]:[,e.headers[hs]],[Cr]:[,e.headers[ms]],[aa]:[,e.headers[oa]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])]}),r=Ge(pt(await ut(e.body,t)),"body");return r[j0]!=null&&(n[j0]=oW(r[j0])),n},Uz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},$z=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Hz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},qz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},jz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Wz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Gz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Vz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Kz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Yz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Xz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Qz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Zz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Jz=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},e7=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Fs]:[()=>e.headers[ea]!==void 0,()=>Pt(e.headers[ea])],[St]:[,e.headers[ui]],[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},t7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r.Deleted===""?n[ld]=[]:r[ld]!=null&&(n[ld]=Iq(at(r[ld]))),r.Error===""?n[wC]=[]:r[Vl]!=null&&(n[wC]=Uq(at(r[Vl]))),n},n7=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[St]:[,e.headers[ui]]});return await ot(e.body,t),n},r7=async(e,t)=>{if(e.statusCode!==204&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},s7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r[$e]!=null&&(n[$e]=M(r[$e])),n},i7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r.AccessControlList===""?n[hu]=[]:r[ka]!=null&&r[ka][_i]!=null&&(n[hu]=NT(at(r[ka][_i]))),r[Ot]!=null&&(n[Ot]=ia(r[Ot])),n},a7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.AnalyticsConfiguration=RT(r),n},o7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r.CORSRule===""?n[mb]=[]:r[hb]!=null&&(n[mb]=Aq(at(r[hb]))),n},c7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.ServerSideEncryptionConfiguration=sW(r),n},l7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.IntelligentTieringConfiguration=DT(r),n},u7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.InventoryConfiguration=LT(r),n},d7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Np]:[,e.headers[Xp]]}),r=Ge(pt(await ut(e.body,t)),"body");return r.Rule===""?n[Bs]=[]:r[Xr]!=null&&(n[Bs]=fj(at(r[Xr]))),n},f7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[pc]!=null&&(n[pc]=M(r[pc])),n},h7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[$a]!=null&&(n[$a]=hj(r[$a])),n},m7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.GetBucketMetadataTableConfigurationResult=Gq(r),n},b7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.MetricsConfiguration=MT(r),n},g7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[Oa]!=null&&(n[Oa]=$q(r[Oa])),r.CloudFunctionConfiguration===""?n[vb]=[]:r[_C]!=null&&(n[vb]=oj(at(r[_C]))),r.QueueConfiguration===""?n[kb]=[]:r[Ab]!=null&&(n[kb]=qj(at(r[Ab]))),r.TopicConfiguration===""?n[Db]=[]:r[Ob]!=null&&(n[Db]=vW(at(r[Ob]))),n},p7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.OwnershipControls=Pj(r),n},y7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=await SW(e.body,t);return n.Policy=M(r),n},E7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.PolicyStatus=zj(r),n},C7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.ReplicationConfiguration=Vj(r),n},x7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[$d]!=null&&(n[$d]=M(r[$d])),n},v7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r.TagSet===""?n[Ms]=[]:r[Ms]!=null&&r[Ms][Et]!=null&&(n[Ms]=po(at(r[Ms][Et]))),n},_7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[Tb]!=null&&(n[Ld]=M(r[Tb])),r[$e]!=null&&(n[$e]=M(r[$e])),n},T7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[La]!=null&&(n[La]=zq(r[La])),r[Fa]!=null&&(n[Fa]=Yq(r[Fa])),r[Ga]!=null&&(n[Ga]=Wj(r[Ga])),r.RoutingRules===""?n[Fo]=[]:r[Fo]!=null&&r[Fo][$f]!=null&&(n[Fo]=eW(at(r[Fo][$f]))),n},S7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Fs]:[()=>e.headers[ea]!==void 0,()=>Pt(e.headers[ea])],[Tp]:[,e.headers[CS]],[zr]:[,e.headers[Du]],[Pp]:[,e.headers[ew]],[kn]:[()=>e.headers[zc]!==void 0,()=>Ge(Xi(e.headers[zc]))],[Ji]:[()=>e.headers[oo]!==void 0,()=>ur(e.headers[oo])],[tn]:[,e.headers[xh]],[on]:[,e.headers[Co]],[cn]:[,e.headers[xo]],[ln]:[,e.headers[vo]],[un]:[,e.headers[_o]],[dn]:[,e.headers[To]],[fn]:[,e.headers[ul]],[zf]:[()=>e.headers[Wf]!==void 0,()=>Jt(e.headers[Wf])],[St]:[,e.headers[ui]],[Zc]:[,e.headers[Au]],[Jc]:[,e.headers[ku]],[el]:[,e.headers[Ru]],[tl]:[,e.headers[Iu]],[Sp]:[,e.headers[xS]],[nl]:[,e.headers[Bu]],[ai]:[()=>e.headers[co]!==void 0,()=>Ge(Xi(e.headers[co]))],[QT]:[,e.headers[vS]],[wu]:[,e.headers[zu]],[Pr]:[,e.headers[hs]],[Qn]:[,e.headers[mr]],[Zn]:[,e.headers[br]],[Cr]:[,e.headers[ms]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[xt]:[,e.headers[Fu]],[yn]:[,e.headers[xn]],[Bp]:[,e.headers[tw]],[Fc]:[()=>e.headers[Gf]!==void 0,()=>Jt(e.headers[Gf])],[Nb]:[()=>e.headers[GC]!==void 0,()=>Jt(e.headers[GC])],[ol]:[,e.headers[Mu]],[oi]:[()=>e.headers[lo]!==void 0,()=>Ge(Hr(e.headers[lo]))],[yo]:[,e.headers[Lu]],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},w7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r.AccessControlList===""?n[hu]=[]:r[ka]!=null&&r[ka][_i]!=null&&(n[hu]=NT(at(r[ka][_i]))),r[Ot]!=null&&(n[Ot]=ia(r[Ot])),n},A7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Fs]:[()=>e.headers[ea]!==void 0,()=>Pt(e.headers[ea])],[kn]:[()=>e.headers[zc]!==void 0,()=>Ge(Xi(e.headers[zc]))],[St]:[,e.headers[ui]],[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r[V0]!=null&&(n[V0]=Cq(r[V0])),r[tn]!=null&&(n[tn]=M(r[tn])),r[cm]!=null&&(n[cm]=Vq(r[cm])),r[lm]!=null&&(n[lm]=ur(r[lm])),r[xt]!=null&&(n[xt]=M(r[xt])),n},k7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.LegalHold=wj(r),n},R7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.ObjectLockConfiguration=Sj(r),n},I7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.Retention=Aj(r),n},B7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[St]:[,e.headers[ui]]}),r=Ge(pt(await ut(e.body,t)),"body");return r.TagSet===""?n[Ms]=[]:r[Ms]!=null&&r[Ms][Et]!=null&&(n[Ms]=po(at(r[Ms][Et]))),n},P7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=e.body;return t.sdkStreamMixin(r),n.Body=r,n},N7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=pt(await ut(e.body,t));return n.PublicAccessBlockConfiguration=$j(r),n},O7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[qW]:[,e.headers[mK]],[UW]:[,e.headers[hK]],[Gl]:[,e.headers[gK]],[PW]:[()=>e.headers[jC]!==void 0,()=>Pt(e.headers[jC])]});return await ot(e.body,t),n},D7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Fs]:[()=>e.headers[ea]!==void 0,()=>Pt(e.headers[ea])],[Tp]:[,e.headers[CS]],[zr]:[,e.headers[Du]],[Pp]:[,e.headers[ew]],[NW]:[,e.headers[fK]],[kn]:[()=>e.headers[zc]!==void 0,()=>Ge(Xi(e.headers[zc]))],[Ji]:[()=>e.headers[oo]!==void 0,()=>ur(e.headers[oo])],[on]:[,e.headers[Co]],[cn]:[,e.headers[xo]],[ln]:[,e.headers[vo]],[un]:[,e.headers[_o]],[dn]:[,e.headers[To]],[fn]:[,e.headers[ul]],[tn]:[,e.headers[xh]],[zf]:[()=>e.headers[Wf]!==void 0,()=>Jt(e.headers[Wf])],[St]:[,e.headers[ui]],[Zc]:[,e.headers[Au]],[Jc]:[,e.headers[ku]],[el]:[,e.headers[Ru]],[tl]:[,e.headers[Iu]],[nl]:[,e.headers[Bu]],[Sp]:[,e.headers[xS]],[ai]:[()=>e.headers[co]!==void 0,()=>Ge(Xi(e.headers[co]))],[QT]:[,e.headers[vS]],[wu]:[,e.headers[zu]],[Pr]:[,e.headers[hs]],[Qn]:[,e.headers[mr]],[Zn]:[,e.headers[br]],[Cr]:[,e.headers[ms]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[xt]:[,e.headers[Fu]],[yn]:[,e.headers[xn]],[Bp]:[,e.headers[tw]],[Fc]:[()=>e.headers[Gf]!==void 0,()=>Jt(e.headers[Gf])],[ol]:[,e.headers[Mu]],[oi]:[()=>e.headers[lo]!==void 0,()=>Ge(Hr(e.headers[lo]))],[yo]:[,e.headers[Lu]],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 ot(e.body,t),n},L7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r.AnalyticsConfiguration===""?n[vC]=[]:r[ib]!=null&&(n[vC]=bq(at(r[ib]))),r[en]!=null&&(n[en]=M(r[en])),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[Ur]!=null&&(n[Ur]=M(r[Ur])),n},M7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[en]!=null&&(n[en]=M(r[en])),r.IntelligentTieringConfiguration===""?n[BC]=[]:r[xb]!=null&&(n[BC]=Qq(at(r[xb]))),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[Ur]!=null&&(n[Ur]=M(r[Ur])),n},F7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[en]!=null&&(n[en]=M(r[en])),r.InventoryConfiguration===""?n[AC]=[]:r[Cb]!=null&&(n[AC]=Jq(at(r[Cb]))),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[Ur]!=null&&(n[Ur]=M(r[Ur])),n},z7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r[en]!=null&&(n[en]=M(r[en])),r[qt]!=null&&(n[qt]=Pt(r[qt])),r.MetricsConfiguration===""?n[PC]=[]:r[_b]!=null&&(n[PC]=pj(at(r[_b]))),r[Ur]!=null&&(n[Ur]=M(r[Ur])),n},U7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r.Buckets===""?n[Qs]=[]:r[Qs]!=null&&r[Qs][It]!=null&&(n[Qs]=IT(at(r[Qs][It]))),r[en]!=null&&(n[en]=M(r[en])),r[Ot]!=null&&(n[Ot]=ia(r[Ot])),r[Oe]!=null&&(n[Oe]=M(r[Oe])),n},$7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=Ge(pt(await ut(e.body,t)),"body");return r.Buckets===""?n[Qs]=[]:r[Qs]!=null&&r[Qs][It]!=null&&(n[Qs]=IT(at(r[Qs][It]))),r[en]!=null&&(n[en]=M(r[en])),n},H7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r[It]!=null&&(n[It]=M(r[It])),r.CommonPrefixes===""?n[wr]=[]:r[wr]!=null&&(n[wr]=mh(at(r[wr]))),r[Ar]!=null&&(n[Ar]=M(r[Ar])),r[kr]!=null&&(n[kr]=M(r[kr])),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[Wi]!=null&&(n[Wi]=M(r[Wi])),r[Md]!=null&&(n[Md]=Jt(r[Md])),r[yc]!=null&&(n[yc]=M(r[yc])),r[am]!=null&&(n[am]=M(r[am])),r[Oe]!=null&&(n[Oe]=M(r[Oe])),r[nf]!=null&&(n[nf]=M(r[nf])),r.Upload===""?n[zC]=[]:r[FC]!=null&&(n[zC]=Cj(at(r[FC]))),n},q7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r.CommonPrefixes===""?n[wr]=[]:r[wr]!=null&&(n[wr]=mh(at(r[wr]))),r.Contents===""?n[Ui]=[]:r[Ui]!=null&&(n[Ui]=FT(at(r[Ui]))),r[Ar]!=null&&(n[Ar]=M(r[Ar])),r[kr]!=null&&(n[kr]=M(r[kr])),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[Dd]!=null&&(n[Dd]=M(r[Dd])),r[Ts]!=null&&(n[Ts]=Jt(r[Ts])),r[wn]!=null&&(n[wn]=M(r[wn])),r[im]!=null&&(n[im]=M(r[im])),r[Oe]!=null&&(n[Oe]=M(r[Oe])),n},j7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r.CommonPrefixes===""?n[wr]=[]:r[wr]!=null&&(n[wr]=mh(at(r[wr]))),r.Contents===""?n[Ui]=[]:r[Ui]!=null&&(n[Ui]=FT(at(r[Ui]))),r[en]!=null&&(n[en]=M(r[en])),r[Ar]!=null&&(n[Ar]=M(r[Ar])),r[kr]!=null&&(n[kr]=M(r[kr])),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[tm]!=null&&(n[tm]=Jt(r[tm])),r[Ts]!=null&&(n[Ts]=Jt(r[Ts])),r[wn]!=null&&(n[wn]=M(r[wn])),r[Ur]!=null&&(n[Ur]=M(r[Ur])),r[Oe]!=null&&(n[Oe]=M(r[Oe])),r[Kd]!=null&&(n[Kd]=M(r[Kd])),n},W7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r.CommonPrefixes===""?n[wr]=[]:r[wr]!=null&&(n[wr]=mh(at(r[wr]))),r.DeleteMarker===""?n[SC]=[]:r[Fs]!=null&&(n[SC]=Nq(at(r[Fs]))),r[Ar]!=null&&(n[Ar]=M(r[Ar])),r[kr]!=null&&(n[kr]=M(r[kr])),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[Wi]!=null&&(n[Wi]=M(r[Wi])),r[Ts]!=null&&(n[Ts]=Jt(r[Ts])),r[wn]!=null&&(n[wn]=M(r[wn])),r[yc]!=null&&(n[yc]=M(r[yc])),r[om]!=null&&(n[om]=M(r[om])),r[Oe]!=null&&(n[Oe]=M(r[Oe])),r[sf]!=null&&(n[sf]=M(r[sf])),r.Version===""?n[$C]=[]:r[UC]!=null&&(n[$C]=Bj(at(r[UC]))),n},G7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[$T]:[()=>e.headers[jf]!==void 0,()=>Ge(Xi(e.headers[jf]))],[HT]:[,e.headers[HS]],[yn]:[,e.headers[xn]]}),r=Ge(pt(await ut(e.body,t)),"body");return r[It]!=null&&(n[It]=M(r[It])),r[Tt]!=null&&(n[Tt]=M(r[Tt])),r[fn]!=null&&(n[fn]=M(r[fn])),r[hc]!=null&&(n[hc]=OT(r[hc])),r[qt]!=null&&(n[qt]=Pt(r[qt])),r[gt]!=null&&(n[gt]=M(r[gt])),r[xi]!=null&&(n[xi]=Jt(r[xi])),r[Ec]!=null&&(n[Ec]=M(r[Ec])),r[Ot]!=null&&(n[Ot]=ia(r[Ot])),r[Gi]!=null&&(n[Gi]=M(r[Gi])),r.Part===""?n[mu]=[]:r[Uf]!=null&&(n[mu]=Mj(at(r[Uf]))),r[xt]!=null&&(n[xt]=M(r[xt])),r[Zr]!=null&&(n[Zr]=M(r[Zr])),n},V7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},K7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Y7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},X7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Q7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Z7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},J7=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},eU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Np]:[,e.headers[Xp]]});return await ot(e.body,t),n},tU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},nU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},rU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},sU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},iU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},aU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},oU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},cU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},lU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},uU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},dU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[zr]:[,e.headers[Du]],[tn]:[,e.headers[xh]],[on]:[,e.headers[Co]],[cn]:[,e.headers[xo]],[ln]:[,e.headers[vo]],[un]:[,e.headers[_o]],[dn]:[,e.headers[To]],[fn]:[,e.headers[ul]],[Pr]:[,e.headers[hs]],[St]:[,e.headers[ui]],[Qn]:[,e.headers[mr]],[Zn]:[,e.headers[br]],[Cr]:[,e.headers[ms]],[aa]:[,e.headers[oa]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[Er]:[()=>e.headers[WC]!==void 0,()=>ur(e.headers[WC])],[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},fU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},hU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},mU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},bU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},gU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[St]:[,e.headers[ui]]});return await ot(e.body,t),n},pU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},yU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[yn]:[,e.headers[xn]],[bV]:[,e.headers[dY]]});return await ot(e.body,t),n},EU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)}),r=e.body;return n.Payload=MU(r,t),n},CU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[Pr]:[,e.headers[hs]],[tn]:[,e.headers[xh]],[on]:[,e.headers[Co]],[cn]:[,e.headers[xo]],[ln]:[,e.headers[vo]],[un]:[,e.headers[_o]],[dn]:[,e.headers[To]],[Qn]:[,e.headers[mr]],[Zn]:[,e.headers[br]],[Cr]:[,e.headers[ms]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[yn]:[,e.headers[xn]]});return await ot(e.body,t),n},xU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e),[XT]:[,e.headers[JS]],[Pr]:[,e.headers[hs]],[Qn]:[,e.headers[mr]],[Zn]:[,e.headers[br]],[Cr]:[,e.headers[ms]],[gn]:[()=>e.headers[Bn]!==void 0,()=>Pt(e.headers[Bn])],[yn]:[,e.headers[xn]]}),r=pt(await ut(e.body,t));return n.CopyPartResult=Sq(r),n},vU=async(e,t)=>{if(e.statusCode!==200&&e.statusCode>=300)return Ae(e,t);const n=I({$metadata:fe(e)});return await ot(e.body,t),n},Ae=async(e,t)=>{const n={...e,body:await L5(e.body,t)},r=M5(e,n.body);switch(r){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await PU(n);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await DU(n);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await TU(n);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await SU(n);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await IU(n);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await AU(n);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await BU(n);case"NotFound":case"com.amazonaws.s3#NotFound":throw await NU(n);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await wU(n);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await kU(n);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await RU(n);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await LU(n);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await OU(n);default:const s=n.body;return _U({output:e,parsedBody:s,errorCode:r})}},_U=h5(Br),TU=async(e,t)=>{const n=I({});e.body;const r=new ap({$metadata:fe(e),...n});return ts(r,e.body)},SU=async(e,t)=>{const n=I({});e.body;const r=new op({$metadata:fe(e),...n});return ts(r,e.body)},wU=async(e,t)=>{const n=I({});e.body;const r=new mp({$metadata:fe(e),...n});return ts(r,e.body)},AU=async(e,t)=>{const n=I({}),r=e.body;r[Ci]!=null&&(n[Ci]=M(r[Ci])),r[xt]!=null&&(n[xt]=M(r[xt]));const s=new lp({$metadata:fe(e),...n});return ts(s,e.body)},kU=async(e,t)=>{const n=I({});e.body;const r=new bp({$metadata:fe(e),...n});return ts(r,e.body)},RU=async(e,t)=>{const n=I({});e.body;const r=new gp({$metadata:fe(e),...n});return ts(r,e.body)},IU=async(e,t)=>{const n=I({});e.body;const r=new cp({$metadata:fe(e),...n});return ts(r,e.body)},BU=async(e,t)=>{const n=I({});e.body;const r=new up({$metadata:fe(e),...n});return ts(r,e.body)},PU=async(e,t)=>{const n=I({});e.body;const r=new sp({$metadata:fe(e),...n});return ts(r,e.body)},NU=async(e,t)=>{const n=I({});e.body;const r=new dp({$metadata:fe(e),...n});return ts(r,e.body)},OU=async(e,t)=>{const n=I({});e.body;const r=new yp({$metadata:fe(e),...n});return ts(r,e.body)},DU=async(e,t)=>{const n=I({});e.body;const r=new ip({$metadata:fe(e),...n});return ts(r,e.body)},LU=async(e,t)=>{const n=I({});e.body;const r=new pp({$metadata:fe(e),...n});return ts(r,e.body)},MU=(e,t)=>t.eventStreamMarshaller.deserialize(e,async n=>n.Records!=null?{Records:await $U(n.Records)}:n.Stats!=null?{Stats:await HU(n.Stats,t)}:n.Progress!=null?{Progress:await UU(n.Progress,t)}:n.Cont!=null?{Cont:await FU(n.Cont,t)}:n.End!=null?{End:await zU(n.End,t)}:{$unknown:e}),FU=async(e,t)=>{const n={};return await ut(e.body,t),Object.assign(n,_q()),n},zU=async(e,t)=>{const n={};return await ut(e.body,t),Object.assign(n,Lq()),n},UU=async(e,t)=>{const n={},r=await ut(e.body,t);return n.Details=Uj(r),n},$U=async(e,t)=>{const n={};return n.Payload=e.body,n},HU=async(e,t)=>{const n={},r=await ut(e.body,t);return n.Details=hW(r),n},qU=(e,t)=>{const n=new z(Ia);return e[ga]!=null&&n.c(z.of(ga,String(e[ga])).n(ga)),n},jU=(e,t)=>{const n=new z(kW);return e[$e]!=null&&n.c(z.of(LW,e[$e]).n($e)),n},_T=(e,t)=>{const n=new z(AW);return n.lc(e,"Grants","AccessControlList",()=>ST(e[hu])),e[Ot]!=null&&n.c(fH(e[Ot]).n(Ot)),n},WU=(e,t)=>{const n=new z(Ra);return e[Ot]!=null&&n.c(z.of(oV,e[Ot]).n(Ot)),n},GU=(e,t)=>e.filter(n=>n!=null).map(n=>z.of(ab,n).n(Jn)),VU=(e,t)=>e.filter(n=>n!=null).map(n=>z.of(cb,n).n(Jn)),KU=(e,t)=>e.filter(n=>n!=null).map(n=>z.of(ub,n).n(Jn)),YU=(e,t)=>{const n=new z(wW);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Yc(e[$r])),n},XU=(e,t)=>{const n=new z(ib);return e[nt]!=null&&n.c(z.of(BW,e[nt]).n(nt)),e[tt]!=null&&n.c(ZU(e[tt]).n(tt)),e[Xa]!=null&&n.c(YH(e[Xa]).n(Xa)),n},QU=(e,t)=>{const n=new z(RW);return e[Is]!=null&&n.c(JU(e[Is]).n(Is)),n},ZU=(e,t)=>{const n=new z(IW);return rb.visit(e,{Prefix:r=>{e[Oe]!=null&&n.c(z.of(Oe,r).n(Oe))},Tag:r=>{e[Et]!=null&&n.c(Kc(r).n(Et))},And:r=>{e[pn]!=null&&n.c(YU(r).n(pn))},_:(r,s)=>{if(!(s instanceof z||s instanceof hp))throw new Error("Unable to serialize unknown union members in XML.");n.c(new z(r).c(s))}}),n},JU=(e,t)=>{const n=new z(OW);return e[_s]!=null&&n.c(z.of(DW,e[_s]).n(_s)),e[ec]!=null&&n.c(z.of(Qo,e[ec]).n(ec)),e[It]!=null&&n.c(z.of(bh,e[It]).n(It)),n.cc(e,Oe),n},e$=(e,t)=>{const n=new z(MW);return n.cc(e,nG),e[Qr]!=null&&n.c(z.of(jW,e[Qr]).n(Qr)),n},t$=(e,t)=>{const n=new z(FW);return n.l(e,"Rules","Rule",()=>G$(e[Bs])),n},n$=(e,t)=>{const n=new z(HW);return e[$a]!=null&&n.c(K$(e[$a]).n($a)),n},r$=(e,t)=>{const n=new z(VW);return n.l(e,"Parts","Part",()=>i$(e[mu])),n},s$=(e,t)=>{const n=new z(YW);return n.cc(e,tn),n.cc(e,on),n.cc(e,cn),n.cc(e,ln),n.cc(e,un),n.cc(e,dn),e[Kr]!=null&&n.c(z.of(Kr,String(e[Kr])).n(Kr)),n},i$=(e,t)=>e.filter(n=>n!=null).map(n=>s$(n).n(Jn)),a$=(e,t)=>{const n=new z(Ba);return n.cc(e,Bd),n.cc(e,Nd),n},o$=(e,t)=>{const n=new z(KW);return n.l(e,"CORSRules","CORSRule",()=>l$(e[mb])),n},c$=(e,t)=>{const n=new z(hb);return n.cc(e,An),n.l(e,"AllowedHeaders","AllowedHeader",()=>GU(e[ob])),n.l(e,"AllowedMethods","AllowedMethod",()=>VU(e[lb])),n.l(e,"AllowedOrigins","AllowedOrigin",()=>KU(e[db])),n.l(e,"ExposeHeaders","ExposeHeader",()=>v$(e[bb])),e[Ea]!=null&&n.c(z.of(Ea,String(e[Ea])).n(Ea)),n},l$=(e,t)=>e.filter(n=>n!=null).map(n=>c$(n).n(Jn)),u$=(e,t)=>{const n=new z(GW);return e[pc]!=null&&n.c(z.of(zW,e[pc]).n(pc)),e[Ua]!=null&&n.c(V$(e[Ua]).n(Ua)),e[It]!=null&&n.c(e$(e[It]).n(It)),n},d$=(e,t)=>{const n=new z(QW);return n.cc(e,cG),n.cc(e,eG),n.cc(e,oS),n.cc(e,Ip),n.cc(e,tS),n.cc(e,aS),e[cd]!=null&&n.c(z.of(cd,String(e[cd])).n(cd)),n},f$=(e,t)=>{const n=new z(ZW);return n.cc(e,fV),n.cc(e,oS),n.cc(e,Ip),n.cc(e,tS),n.cc(e,aS),n},h$=(e,t)=>{const n=new z(Na);return e[Ss]!=null&&n.c(z.of(rS,e[Ss]).n(Ss)),e[Mt]!=null&&n.c(z.of(Mt,String(e[Mt])).n(Mt)),e[va]!=null&&n.c(z.of(va,String(e[va])).n(va)),n},m$=(e,t)=>{const n=new z(rG);return n.l(e,"Objects","Object",()=>aH(e[lV])),e[fd]!=null&&n.c(z.of(fd,String(e[fd])).n(fd)),n},b$=(e,t)=>{const n=new z(Pa);return e[$e]!=null&&n.c(z.of(tG,e[$e]).n($e)),n},g$=(e,t)=>{const n=new z(Xn);return e[It]!=null&&n.c(z.of(bh,e[It]).n(It)),e[Jo]!=null&&n.c(z.of(Qo,e[Jo]).n(Jo)),n.cc(e,xt),e[Ra]!=null&&n.c(WU(e[Ra]).n(Ra)),e[Da]!=null&&n.c(y$(e[Da]).n(Da)),e[Ka]!=null&&n.c(RH(e[Ka]).n(Ka)),e[Ha]!=null&&n.c(Q$(e[Ha]).n(Ha)),n},p$=(e,t)=>{const n=new z(si);return e[X0]!=null&&n.c(z.of(Pr,e[X0]).n(X0)),e[nm]!=null&&n.c(z.of(Cr,e[nm]).n(nm)),n.cc(e,BG),n},y$=(e,t)=>{const n=new z(Da);return n.cc(e,qd),n},E$=(e,t)=>{const n=new z(La);return e[gt]!=null&&n.c(z.of(Rp,e[gt]).n(gt)),n},C$=(e,t)=>new z(Oa),Ep=(e,t)=>e.filter(n=>n!=null).map(n=>z.of(ao,n).n(Jn)),x$=(e,t)=>{const n=new z(Ma);return e[$e]!=null&&n.c(z.of(iG,e[$e]).n($e)),n},v$=(e,t)=>e.filter(n=>n!=null).map(n=>z.of(gb,n).n(Jn)),_$=(e,t)=>{const n=new z(pb);return e[wn]!=null&&n.c(z.of(uG,e[wn]).n(wn)),e[os]!=null&&n.c(z.of(dG,e[os]).n(os)),n},T$=(e,t)=>e.filter(n=>n!=null).map(n=>_$(n).n(Jn)),S$=(e,t)=>{const n=new z(Id);return n.cc(e,gS),n},w$=(e,t)=>{const n=new z(_i);if(e[as]!=null){const r=TT(e[as]).n(as);r.a("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),n.c(r)}return n.cc(e,ii),n},TT=(e,t)=>{const n=new z(as);return n.cc(e,zs),n.cc(e,Ad),n.cc(e,An),n.cc(e,rf),n.a("xsi:type",e[Qr]),n},ST=(e,t)=>e.filter(n=>n!=null).map(n=>w$(n).n(_i)),A$=(e,t)=>{const n=new z(Fa);return n.cc(e,Zd),n},wT=(e,t)=>{const n=new z(za);return e[ac]!=null&&n.c(d$(e[ac]).n(ac)),n.cc(e,JW),e[mc]!=null&&n.c(F$(e[mc]).n(mc)),e[um]!=null&&n.c(gH(e[um]).n(um)),n},k$=(e,t)=>{const n=new z(vG);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Yc(e[$r])),n},R$=(e,t)=>{const n=new z(xb);return e[nt]!=null&&n.c(z.of(wG,e[nt]).n(nt)),e[tt]!=null&&n.c(I$(e[tt]).n(tt)),e[$e]!=null&&n.c(z.of(AG,e[$e]).n($e)),n.l(e,"Tierings","Tiering",()=>tq(e[Lb])),n},I$=(e,t)=>{const n=new z(SG);return n.cc(e,Oe),e[Et]!=null&&n.c(Kc(e[Et]).n(Et)),e[pn]!=null&&n.c(k$(e[pn]).n(pn)),n},B$=(e,t)=>{const n=new z(Cb);return e[Xn]!=null&&n.c(P$(e[Xn]).n(Xn)),e[ya]!=null&&n.c(z.of(ya,String(e[ya])).n(ya)),e[tt]!=null&&n.c(O$(e[tt]).n(tt)),e[nt]!=null&&n.c(z.of(pG,e[nt]).n(nt)),e[dc]!=null&&n.c(z.of(yG,e[dc]).n(dc)),n.lc(e,"OptionalFields","OptionalFields",()=>D$(e[Mo])),e[Sc]!=null&&n.c(M$(e[Sc]).n(Sc)),n},P$=(e,t)=>{const n=new z(fG);return e[Is]!=null&&n.c(L$(e[Is]).n(Is)),n},N$=(e,t)=>{const n=new z(hG);return e[Pb]!=null&&n.c(KH(e[Pb]).n(qf)),e[Bb]!=null&&n.c(GH(e[Bb]).n(Hf)),n},O$=(e,t)=>{const n=new z(mG);return n.cc(e,Oe),n},D$=(e,t)=>e.filter(n=>n!=null).map(n=>z.of(EG,n).n(Eb)),L$=(e,t)=>{const n=new z(CG);return n.cc(e,Qo),e[It]!=null&&n.c(z.of(bh,e[It]).n(It)),e[_s]!=null&&n.c(z.of(bG,e[_s]).n(_s)),n.cc(e,Oe),e[si]!=null&&n.c(N$(e[si]).n(si)),n},M$=(e,t)=>{const n=new z(xG);return e[lc]!=null&&n.c(z.of(gG,e[lc]).n(lc)),n},F$=(e,t)=>{const n=new z(kG);return e[Qr]!=null&&n.c(z.of(IG,e[Qr]).n(Qr)),n},z$=(e,t)=>{const n=new z(RG);return n.cc(e,Ip),n},U$=(e,t)=>{const n=new z(NG);return e[nt]!=null&&n.c(z.of(kp,e[nt]).n(nt)),e[Od]!=null&&n.c(z.of(Od,e[Od]).n(fb)),n.l(e,"Events","Event",()=>Ep(e[vi])),e[tt]!=null&&n.c(Cp(e[tt]).n(tt)),n},$$=(e,t)=>e.filter(n=>n!=null).map(n=>U$(n).n(Jn)),H$=(e,t)=>{const n=new z(PG);return e[Fr]!=null&&n.c(z.of(Fr,bo(e[Fr]).toString()).n(Fr)),e[Mt]!=null&&n.c(z.of(Mt,String(e[Mt])).n(Mt)),e[pa]!=null&&n.c(z.of(pa,String(e[pa])).n(pa)),n},q$=(e,t)=>{const n=new z(MG);return e[zr]!=null&&n.c(H$(e[zr]).n(zr)),n.cc(e,An),n.cc(e,Oe),e[tt]!=null&&n.c(W$(e[tt]).n(tt)),e[$e]!=null&&n.c(z.of(oG,e[$e]).n($e)),n.l(e,"Transitions","Transition",()=>iq(e[zb])),n.l(e,"NoncurrentVersionTransitions","NoncurrentVersionTransition",()=>rH(e[Sb])),e[qa]!=null&&n.c(tH(e[qa]).n(qa)),e[Ia]!=null&&n.c(qU(e[Ia]).n(Ia)),n},j$=(e,t)=>{const n=new z(FG);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Yc(e[$r])),e[ks]!=null&&n.c(z.of(sS,String(e[ks])).n(ks)),e[Rs]!=null&&n.c(z.of(iS,String(e[Rs])).n(Rs)),n},W$=(e,t)=>{const n=new z(zG);return n.cc(e,Oe),e[Et]!=null&&n.c(Kc(e[Et]).n(Et)),e[ks]!=null&&n.c(z.of(sS,String(e[ks])).n(ks)),e[Rs]!=null&&n.c(z.of(iS,String(e[Rs])).n(Rs)),e[pn]!=null&&n.c(j$(e[pn]).n(pn)),n},G$=(e,t)=>e.filter(n=>n!=null).map(n=>q$(n).n(Jn)),V$=(e,t)=>{const n=new z(OG);return e[Qr]!=null&&n.c(z.of(UG,e[Qr]).n(Qr)),e[wn]!=null&&n.c(z.of(DG,e[wn]).n(wn)),n},K$=(e,t)=>{const n=new z($a);return n.cc(e,ef),n.lc(e,"TargetGrants","TargetGrants",()=>ZH(e[zo])),n.cc(e,tf),e[to]!=null&&n.c(JH(e[to]).n(to)),n},Y$=(e,t)=>{const n=new z(nS);return e[wn]!=null&&n.c(z.of(VG,e[wn]).n(wn)),e[os]!=null&&n.c(z.of(XG,e[os]).n(os)),n},X$=(e,t)=>{const n=new z(YG);return e[Qd]!=null&&n.c(MH(e[Qd]).n(Qd)),n},Q$=(e,t)=>{const n=new z(Ha);return e[$e]!=null&&n.c(z.of(KG,e[$e]).n($e)),e[cc]!=null&&n.c(kT(e[cc]).n(cc)),n},Z$=(e,t)=>{const n=new z($G);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Yc(e[$r])),n.cc(e,Ei),n},J$=(e,t)=>{const n=new z(_b);return e[nt]!=null&&n.c(z.of(GG,e[nt]).n(nt)),e[tt]!=null&&n.c(eH(e[tt]).n(tt)),n},eH=(e,t)=>{const n=new z(WG);return sb.visit(e,{Prefix:r=>{e[Oe]!=null&&n.c(z.of(Oe,r).n(Oe))},Tag:r=>{e[Et]!=null&&n.c(Kc(r).n(Et))},AccessPointArn:r=>{e[Ei]!=null&&n.c(z.of(Ei,r).n(Ei))},And:r=>{e[pn]!=null&&n.c(Z$(r).n(pn))},_:(r,s)=>{if(!(s instanceof z||s instanceof hp))throw new Error("Unable to serialize unknown union members in XML.");n.c(new z(r).c(s))}}),n},tH=(e,t)=>{const n=new z(qa);return e[ws]!=null&&n.c(z.of(Mt,String(e[ws])).n(ws)),e[As]!=null&&n.c(z.of(yS,String(e[As])).n(As)),n},nH=(e,t)=>{const n=new z(wb);return e[ws]!=null&&n.c(z.of(Mt,String(e[ws])).n(ws)),e[xt]!=null&&n.c(z.of(bS,e[xt]).n(xt)),e[As]!=null&&n.c(z.of(yS,String(e[As])).n(As)),n},rH=(e,t)=>e.filter(n=>n!=null).map(n=>nH(n).n(Jn)),sH=(e,t)=>{const n=new z(QG);return n.l(e,"TopicConfigurations","TopicConfiguration",()=>rq(e[Db])),n.l(e,"QueueConfigurations","QueueConfiguration",()=>CH(e[kb])),n.l(e,"LambdaFunctionConfigurations","CloudFunctionConfiguration",()=>$$(e[vb])),e[Oa]!=null&&n.c(C$(e[Oa]).n(Oa)),n},Cp=(e,t)=>{const n=new z(ZG);return e[gt]!=null&&n.c(DH(e[gt]).n(Ib)),n},iH=(e,t)=>{const n=new z(nV);return e[gt]!=null&&n.c(z.of(Rp,e[gt]).n(gt)),e[St]!=null&&n.c(z.of(cV,e[St]).n(St)),n.cc(e,tn),e[dd]!=null&&n.c(z.of(dd,dr(e[dd]).toString()).n(dd)),e[Er]!=null&&n.c(z.of(Er,String(e[Er])).n(Er)),n},aH=(e,t)=>e.filter(n=>n!=null).map(n=>iH(n).n(Jn)),oH=(e,t)=>{const n=new z(rV);return n.cc(e,zd),e[Xr]!=null&&n.c(uH(e[Xr]).n(Xr)),n},cH=(e,t)=>{const n=new z(sV);return e[$e]!=null&&n.c(z.of(yo,e[$e]).n($e)),n},lH=(e,t)=>{const n=new z(iV);return e[Ss]!=null&&n.c(z.of(rS,e[Ss]).n(Ss)),e[_c]!=null&&n.c(z.of(Fr,bo(e[_c]).toString()).n(_c)),n},uH=(e,t)=>{const n=new z(aV);return e[Na]!=null&&n.c(h$(e[Na]).n(Na)),n},dH=(e,t)=>{const n=new z(Fd);return e[bm]!=null&&n.c(LH(e[bm]).n(bm)),n},AT=(e,t)=>{const n=new z(ja);return e[ac]!=null&&n.c(f$(e[ac]).n(ac)),e[mc]!=null&&n.c(z$(e[mc]).n(mc)),n},fH=(e,t)=>{const n=new z(Ot);return n.cc(e,zs),n.cc(e,An),n},hH=(e,t)=>{const n=new z(JG);return n.l(e,"Rules","Rule",()=>bH(e[Bs])),n},mH=(e,t)=>{const n=new z(tV);return n.cc(e,Kl),n},bH=(e,t)=>e.filter(n=>n!=null).map(n=>mH(n).n(Jn)),gH=(e,t)=>new z(dV),pH=(e,t)=>{const n=new z(Wa);return n.cc(e,Ud),n},yH=(e,t)=>{const n=new z(uV);return e[nc]!=null&&n.c(z.of(hd,String(e[nc])).n(nc)),e[fc]!=null&&n.c(z.of(hd,String(e[fc])).n(fc)),e[rc]!=null&&n.c(z.of(hd,String(e[rc])).n(rc)),e[xc]!=null&&n.c(z.of(hd,String(e[xc])).n(xc)),n},EH=(e,t)=>{const n=new z(Ab);return e[nt]!=null&&n.c(z.of(kp,e[nt]).n(nt)),e[Hd]!=null&&n.c(z.of(Hd,e[Hd]).n(Rb)),n.l(e,"Events","Event",()=>Ep(e[vi])),e[tt]!=null&&n.c(Cp(e[tt]).n(tt)),n},CH=(e,t)=>e.filter(n=>n!=null).map(n=>EH(n).n(Jn)),xH=(e,t)=>{const n=new z(Ya);return n.cc(e,ji),n.cc(e,Pd),n.cc(e,Vi),n.cc(e,jd),n.cc(e,Wd),n},vH=(e,t)=>{const n=new z(Ga);return n.cc(e,ji),n.cc(e,Vi),n},_H=(e,t)=>{const n=new z(Va);return e[$e]!=null&&n.c(z.of(mV,e[$e]).n($e)),n},TH=(e,t)=>{const n=new z(hV);return n.cc(e,Vd),n.l(e,"Rules","Rule",()=>kH(e[Bs])),n},SH=(e,t)=>{const n=new z(vV);return n.cc(e,An),e[xa]!=null&&n.c(z.of(xa,String(e[xa])).n(xa)),n.cc(e,Oe),e[tt]!=null&&n.c(AH(e[tt]).n(tt)),e[$e]!=null&&n.c(z.of(CV,e[$e]).n($e)),e[Ja]!=null&&n.c(WH(e[Ja]).n(Ja)),e[Ma]!=null&&n.c(x$(e[Ma]).n(Ma)),e[Xn]!=null&&n.c(g$(e[Xn]).n(Xn)),e[Pa]!=null&&n.c(b$(e[Pa]).n(Pa)),n},wH=(e,t)=>{const n=new z(yV);return n.cc(e,Oe),n.l(e,"Tags","Tag",()=>Yc(e[$r])),n},AH=(e,t)=>{const n=new z(EV);return n.cc(e,Oe),e[Et]!=null&&n.c(Kc(e[Et]).n(Et)),e[pn]!=null&&n.c(wH(e[pn]).n(pn)),n},kH=(e,t)=>e.filter(n=>n!=null).map(n=>SH(n).n(Jn)),RH=(e,t)=>{const n=new z(Ka);return e[$e]!=null&&n.c(z.of(SV,e[$e]).n($e)),e[kc]!=null&&n.c(kT(e[kc]).n(kc)),n},kT=(e,t)=>{const n=new z(wV);return e[Ca]!=null&&n.c(z.of(Ca,String(e[Ca])).n(Ca)),n},IH=(e,t)=>{const n=new z(gV);return n.cc(e,$d),n},BH=(e,t)=>{const n=new z(Gd);return e[Q0]!=null&&n.c(z.of(aG,String(e[Q0])).n(Q0)),n},PH=(e,t)=>{const n=new z(_V);return e[Mt]!=null&&n.c(z.of(Mt,String(e[Mt])).n(Mt)),e[Id]!=null&&n.c(S$(e[Id]).n(Id)),e[Qr]!=null&&n.c(z.of(xV,e[Qr]).n(Qr)),n.cc(e,gS),n.cc(e,sG),e[Yd]!=null&&n.c(zH(e[Yd]).n(Yd)),e[Fd]!=null&&n.c(dH(e[Fd]).n(Fd)),n},NH=(e,t)=>{const n=new z($f);return e[Ba]!=null&&n.c(a$(e[Ba]).n(Ba)),e[Ya]!=null&&n.c(xH(e[Ya]).n(Ya)),n},OH=(e,t)=>e.filter(n=>n!=null).map(n=>NH(n).n($f)),DH=(e,t)=>{const n=new z(IV);return n.l(e,"FilterRules","FilterRule",()=>T$(e[yb])),n},LH=(e,t)=>{const n=new z(BV);return n.cc(e,bh),e[Oe]!=null&&n.c(z.of(LG,e[Oe]).n(Oe)),e[si]!=null&&n.c(p$(e[si]).n(si)),e[W0]!=null&&n.c(z.of(eV,e[W0]).n(W0)),n.lc(e,"AccessControlList","AccessControlList",()=>ST(e[ka])),e[eo]!=null&&n.c(xp(e[eo]).n(eo)),n.lc(e,"UserMetadata","UserMetadata",()=>aq(e[HV])),n.cc(e,xt),n},MH=(e,t)=>{const n=new z(Qd);return e[wc]!=null&&n.c(z.of(MV,e[wc]).n(wc)),e[Ac]!=null&&n.c(z.of(FV,e[Ac]).n(Ac)),n},FH=(e,t)=>{const n=new z(Xd);return e[md]!=null&&n.c(z.of(md,String(e[md])).n(md)),e[ud]!=null&&n.c(z.of(ud,String(e[ud])).n(ud)),n},zH=(e,t)=>{const n=new z(Yd);return e[za]!=null&&n.c(wT(e[za]).n(za)),n.cc(e,JT),n.cc(e,eS),e[ja]!=null&&n.c(AT(e[ja]).n(ja)),n},UH=(e,t)=>{const n=new z(OV);return e[Tc]!=null&&n.c(z.of(Pr,e[Tc]).n(Tc)),e[gc]!=null&&n.c(z.of(Cr,e[gc]).n(gc)),n},$H=(e,t)=>{const n=new z(DV);return n.l(e,"Rules","Rule",()=>qH(e[Bs])),n},HH=(e,t)=>{const n=new z(LV);return e[Zo]!=null&&n.c(UH(e[Zo]).n(Zo)),e[gn]!=null&&n.c(z.of(gn,String(e[gn])).n(gn)),n},qH=(e,t)=>e.filter(n=>n!=null).map(n=>HH(n).n(Jn)),jH=(e,t)=>new z(Za),WH=(e,t)=>{const n=new z(Ja);return e[Qa]!=null&&n.c(VH(e[Qa]).n(Qa)),e[Va]!=null&&n.c(_H(e[Va]).n(Va)),n},GH=(e,t)=>{const n=new z(Hf);return e[bc]!=null&&n.c(z.of(Cr,e[bc]).n(bc)),n},VH=(e,t)=>{const n=new z(Qa);return e[$e]!=null&&n.c(z.of(RV,e[$e]).n($e)),n},KH=(e,t)=>new z(qf),YH=(e,t)=>{const n=new z(Xa);return e[oc]!=null&&n.c(XH(e[oc]).n(oc)),n},XH=(e,t)=>{const n=new z(AV);return e[Cc]!=null&&n.c(z.of(kV,e[Cc]).n(Cc)),e[Xn]!=null&&n.c(QU(e[Xn]).n(Xn)),n},Kc=(e,t)=>{const n=new z(Et);return e[gt]!=null&&n.c(z.of(Rp,e[gt]).n(gt)),n.cc(e,os),n},xp=(e,t)=>{const n=new z(eo);return n.lc(e,"TagSet","TagSet",()=>Yc(e[Ms])),n},Yc=(e,t)=>e.filter(n=>n!=null).map(n=>Kc(n).n(Et)),QH=(e,t)=>{const n=new z(UV);if(e[as]!=null){const r=TT(e[as]).n(as);r.a("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),n.c(r)}return e[ii]!=null&&n.c(z.of($W,e[ii]).n(ii)),n},ZH=(e,t)=>e.filter(n=>n!=null).map(n=>QH(n).n(_i)),JH=(e,t)=>{const n=new z(to);return e[Za]!=null&&n.c(jH(e[Za]).n(Za)),e[Wa]!=null&&n.c(pH(e[Wa]).n(Wa)),n},eq=(e,t)=>{const n=new z(Mb);return e[Mt]!=null&&n.c(z.of(TG,String(e[Mt])).n(Mt)),e[Ci]!=null&&n.c(z.of(_G,e[Ci]).n(Ci)),n},tq=(e,t)=>e.filter(n=>n!=null).map(n=>eq(n).n(Jn)),nq=(e,t)=>{const n=new z(Ob);return e[nt]!=null&&n.c(z.of(kp,e[nt]).n(nt)),e[Jd]!=null&&n.c(z.of(Jd,e[Jd]).n(Fb)),n.l(e,"Events","Event",()=>Ep(e[vi])),e[tt]!=null&&n.c(Cp(e[tt]).n(tt)),n},rq=(e,t)=>e.filter(n=>n!=null).map(n=>nq(n).n(Jn)),sq=(e,t)=>{const n=new z(Ub);return e[Fr]!=null&&n.c(z.of(Fr,bo(e[Fr]).toString()).n(Fr)),e[Mt]!=null&&n.c(z.of(Mt,String(e[Mt])).n(Mt)),e[xt]!=null&&n.c(z.of(bS,e[xt]).n(xt)),n},iq=(e,t)=>e.filter(n=>n!=null).map(n=>sq(n).n(Jn)),aq=(e,t)=>e.filter(n=>n!=null).map(n=>Y$(n).n(nS)),oq=(e,t)=>{const n=new z(qV);return e[Ld]!=null&&n.c(z.of(Ld,e[Ld]).n(Tb)),e[$e]!=null&&n.c(z.of(WW,e[$e]).n($e)),n},cq=(e,t)=>{const n=new z(jV);return e[La]!=null&&n.c(E$(e[La]).n(La)),e[Fa]!=null&&n.c(A$(e[Fa]).n(Fa)),e[Ga]!=null&&n.c(vH(e[Ga]).n(Ga)),n.lc(e,"RoutingRules","RoutingRules",()=>OH(e[Fo])),n},lq=(e,t)=>{const n={};return e[ga]!=null&&(n[ga]=Jt(e[ga])),n},uq=(e,t)=>{const n={};return e[Ot]!=null&&(n[Ot]=M(e[Ot])),n},dq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>M(n)),fq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>M(n)),hq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>M(n)),mq=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e.Tag===""?n[$r]=[]:e[Et]!=null&&(n[$r]=po(at(e[Et]))),n},RT=(e,t)=>{const n={};return e[nt]!=null&&(n[nt]=M(e[nt])),e.Filter===""||e[tt]!=null&&(n[tt]=pq(T_(e[tt]))),e[Xa]!=null&&(n[Xa]=mW(e[Xa])),n},bq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>RT(n)),gq=(e,t)=>{const n={};return e[Is]!=null&&(n[Is]=yq(e[Is])),n},pq=(e,t)=>e[Oe]!=null?{Prefix:M(e[Oe])}:e[Et]!=null?{Tag:Xc(e[Et])}:e[pn]!=null?{And:mq(e[pn])}:{$unknown:Object.entries(e)[0]},yq=(e,t)=>{const n={};return e[_s]!=null&&(n[_s]=M(e[_s])),e[ec]!=null&&(n[ec]=M(e[ec])),e[It]!=null&&(n[It]=M(e[It])),e[Oe]!=null&&(n[Oe]=M(e[Oe])),n},Eq=(e,t)=>{const n={};return e[wn]!=null&&(n[wn]=M(e[wn])),e[G0]!=null&&(n[G0]=Ge(Hr(e[G0]))),e[Gl]!=null&&(n[Gl]=M(e[Gl])),n},IT=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Eq(n)),Cq=(e,t)=>{const n={};return e[on]!=null&&(n[on]=M(e[on])),e[cn]!=null&&(n[cn]=M(e[cn])),e[ln]!=null&&(n[ln]=M(e[ln])),e[un]!=null&&(n[un]=M(e[un])),e[dn]!=null&&(n[dn]=M(e[dn])),e[fn]!=null&&(n[fn]=M(e[fn])),n},BT=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>M(n)),xq=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),n},mh=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>xq(n)),vq=(e,t)=>{const n={};return e[Bd]!=null&&(n[Bd]=M(e[Bd])),e[Nd]!=null&&(n[Nd]=M(e[Nd])),n},_q=(e,t)=>({}),Tq=(e,t)=>{const n={};return e[tn]!=null&&(n[tn]=M(e[tn])),e[kn]!=null&&(n[kn]=Ge(Hr(e[kn]))),e[fn]!=null&&(n[fn]=M(e[fn])),e[on]!=null&&(n[on]=M(e[on])),e[cn]!=null&&(n[cn]=M(e[cn])),e[ln]!=null&&(n[ln]=M(e[ln])),e[un]!=null&&(n[un]=M(e[un])),e[dn]!=null&&(n[dn]=M(e[dn])),n},Sq=(e,t)=>{const n={};return e[tn]!=null&&(n[tn]=M(e[tn])),e[kn]!=null&&(n[kn]=Ge(Hr(e[kn]))),e[on]!=null&&(n[on]=M(e[on])),e[cn]!=null&&(n[cn]=M(e[cn])),e[ln]!=null&&(n[ln]=M(e[ln])),e[un]!=null&&(n[un]=M(e[un])),e[dn]!=null&&(n[dn]=M(e[dn])),n},wq=(e,t)=>{const n={};return e[An]!=null&&(n[An]=M(e[An])),e.AllowedHeader===""?n[ob]=[]:e[ab]!=null&&(n[ob]=dq(at(e[ab]))),e.AllowedMethod===""?n[lb]=[]:e[cb]!=null&&(n[lb]=fq(at(e[cb]))),e.AllowedOrigin===""?n[db]=[]:e[ub]!=null&&(n[db]=hq(at(e[ub]))),e.ExposeHeader===""?n[bb]=[]:e[gb]!=null&&(n[bb]=qq(at(e[gb]))),e[Ea]!=null&&(n[Ea]=Jt(e[Ea])),n},Aq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>wq(n)),kq=(e,t)=>{const n={};return e[Ss]!=null&&(n[Ss]=M(e[Ss])),e[Mt]!=null&&(n[Mt]=Jt(e[Mt])),e[va]!=null&&(n[va]=Jt(e[va])),n},Rq=(e,t)=>{const n={};return e[gt]!=null&&(n[gt]=M(e[gt])),e[St]!=null&&(n[St]=M(e[St])),e[Fs]!=null&&(n[Fs]=Pt(e[Fs])),e[Y0]!=null&&(n[Y0]=M(e[Y0])),n},Iq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Rq(n)),Bq=(e,t)=>{const n={};return e[Ot]!=null&&(n[Ot]=ia(e[Ot])),e[gt]!=null&&(n[gt]=M(e[gt])),e[St]!=null&&(n[St]=M(e[St])),e[uc]!=null&&(n[uc]=Pt(e[uc])),e[kn]!=null&&(n[kn]=Ge(Hr(e[kn]))),n},Pq=(e,t)=>{const n={};return e[$e]!=null&&(n[$e]=M(e[$e])),n},Nq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Bq(n)),Oq=(e,t)=>{const n={};return e[It]!=null&&(n[It]=M(e[It])),e[Jo]!=null&&(n[Jo]=M(e[Jo])),e[xt]!=null&&(n[xt]=M(e[xt])),e[Ra]!=null&&(n[Ra]=uq(e[Ra])),e[Da]!=null&&(n[Da]=Dq(e[Da])),e[Ka]!=null&&(n[Ka]=Zj(e[Ka])),e[Ha]!=null&&(n[Ha]=bj(e[Ha])),n},Dq=(e,t)=>{const n={};return e[qd]!=null&&(n[qd]=M(e[qd])),n},Lq=(e,t)=>({}),Mq=(e,t)=>{const n={};return e[gt]!=null&&(n[gt]=M(e[gt])),e[St]!=null&&(n[St]=M(e[St])),e[K0]!=null&&(n[K0]=M(e[K0])),e[sm]!=null&&(n[sm]=M(e[sm])),n},Fq=(e,t)=>{const n={};return e[kd]!=null&&(n[kd]=M(e[kd])),e[Rd]!=null&&(n[Rd]=M(e[Rd])),n},zq=(e,t)=>{const n={};return e[gt]!=null&&(n[gt]=M(e[gt])),n},Uq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Mq(n)),$q=(e,t)=>({}),vp=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>M(n)),Hq=(e,t)=>{const n={};return e[$e]!=null&&(n[$e]=M(e[$e])),n},qq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>M(n)),jq=(e,t)=>{const n={};return e[wn]!=null&&(n[wn]=M(e[wn])),e[os]!=null&&(n[os]=M(e[os])),n},Wq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>jq(n)),Gq=(e,t)=>{const n={};return e[rm]!=null&&(n[rm]=mj(e[rm])),e[$e]!=null&&(n[$e]=M(e[$e])),e[Vl]!=null&&(n[Vl]=Fq(e[Vl])),n},Vq=(e,t)=>{const n={};return e[Fc]!=null&&(n[$V]=Jt(e[Fc])),e[Gi]!=null&&(n[Gi]=M(e[Gi])),e[Ec]!=null&&(n[Ec]=M(e[Ec])),e[xi]!=null&&(n[xi]=Jt(e[xi])),e[qt]!=null&&(n[qt]=Pt(e[qt])),e.Part===""?n[mu]=[]:e[Uf]!=null&&(n[mu]=Fj(at(e[Uf]))),n},Kq=(e,t)=>{const n={};return e[as]!=null&&(n[as]=PT(e[as])),e[ii]!=null&&(n[ii]=M(e[ii])),n},PT=(e,t)=>{const n={};return e[zs]!=null&&(n[zs]=M(e[zs])),e[Ad]!=null&&(n[Ad]=M(e[Ad])),e[An]!=null&&(n[An]=M(e[An])),e[rf]!=null&&(n[rf]=M(e[rf])),e[qC]!=null&&(n[Qr]=M(e[qC])),n},NT=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Kq(n)),Yq=(e,t)=>{const n={};return e[Zd]!=null&&(n[Zd]=M(e[Zd])),n},OT=(e,t)=>{const n={};return e[An]!=null&&(n[An]=M(e[An])),e[zs]!=null&&(n[zs]=M(e[zs])),n},Xq=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e.Tag===""?n[$r]=[]:e[Et]!=null&&(n[$r]=po(at(e[Et]))),n},DT=(e,t)=>{const n={};return e[nt]!=null&&(n[nt]=M(e[nt])),e[tt]!=null&&(n[tt]=Zq(e[tt])),e[$e]!=null&&(n[$e]=M(e[$e])),e.Tiering===""?n[Lb]=[]:e[Mb]!=null&&(n[Lb]=CW(at(e[Mb]))),n},Qq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>DT(n)),Zq=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e[Et]!=null&&(n[Et]=Xc(e[Et])),e[pn]!=null&&(n[pn]=Xq(e[pn])),n},LT=(e,t)=>{const n={};return e[Xn]!=null&&(n[Xn]=ej(e[Xn])),e[ya]!=null&&(n[ya]=Pt(e[ya])),e[tt]!=null&&(n[tt]=nj(e[tt])),e[nt]!=null&&(n[nt]=M(e[nt])),e[dc]!=null&&(n[dc]=M(e[dc])),e.OptionalFields===""?n[Mo]=[]:e[Mo]!=null&&e[Mo][Eb]!=null&&(n[Mo]=rj(at(e[Mo][Eb]))),e[Sc]!=null&&(n[Sc]=ij(e[Sc])),n},Jq=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>LT(n)),ej=(e,t)=>{const n={};return e[Is]!=null&&(n[Is]=sj(e[Is])),n},tj=(e,t)=>{const n={};return e[qf]!=null&&(n[Pb]=fW(e[qf])),e[Hf]!=null&&(n[Bb]=uW(e[Hf])),n},nj=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),n},rj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>M(n)),sj=(e,t)=>{const n={};return e[Qo]!=null&&(n[Qo]=M(e[Qo])),e[It]!=null&&(n[It]=M(e[It])),e[_s]!=null&&(n[_s]=M(e[_s])),e[Oe]!=null&&(n[Oe]=M(e[Oe])),e[si]!=null&&(n[si]=tj(e[si])),n},ij=(e,t)=>{const n={};return e[lc]!=null&&(n[lc]=M(e[lc])),n},aj=(e,t)=>{const n={};return e[nt]!=null&&(n[nt]=M(e[nt])),e[fb]!=null&&(n[Od]=M(e[fb])),e.Event===""?n[vi]=[]:e[ao]!=null&&(n[vi]=vp(at(e[ao]))),e[tt]!=null&&(n[tt]=_p(e[tt])),n},oj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>aj(n)),cj=(e,t)=>{const n={};return e[Fr]!=null&&(n[Fr]=Ge(Hr(e[Fr]))),e[Mt]!=null&&(n[Mt]=Jt(e[Mt])),e[pa]!=null&&(n[pa]=Pt(e[pa])),n},lj=(e,t)=>{const n={};return e[zr]!=null&&(n[zr]=cj(e[zr])),e[An]!=null&&(n[An]=M(e[An])),e[Oe]!=null&&(n[Oe]=M(e[Oe])),e[tt]!=null&&(n[tt]=dj(e[tt])),e[$e]!=null&&(n[$e]=M(e[$e])),e.Transition===""?n[zb]=[]:e[Ub]!=null&&(n[zb]=TW(at(e[Ub]))),e.NoncurrentVersionTransition===""?n[Sb]=[]:e[wb]!=null&&(n[Sb]=_j(at(e[wb]))),e[qa]!=null&&(n[qa]=xj(e[qa])),e[Ia]!=null&&(n[Ia]=lq(e[Ia])),n},uj=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e.Tag===""?n[$r]=[]:e[Et]!=null&&(n[$r]=po(at(e[Et]))),e[ks]!=null&&(n[ks]=ur(e[ks])),e[Rs]!=null&&(n[Rs]=ur(e[Rs])),n},dj=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e[Et]!=null&&(n[Et]=Xc(e[Et])),e[ks]!=null&&(n[ks]=ur(e[ks])),e[Rs]!=null&&(n[Rs]=ur(e[Rs])),e[pn]!=null&&(n[pn]=uj(e[pn])),n},fj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>lj(n)),hj=(e,t)=>{const n={};return e[ef]!=null&&(n[ef]=M(e[ef])),e.TargetGrants===""?n[zo]=[]:e[zo]!=null&&e[zo][_i]!=null&&(n[zo]=pW(at(e[zo][_i]))),e[tf]!=null&&(n[tf]=M(e[tf])),e[to]!=null&&(n[to]=yW(e[to])),n},mj=(e,t)=>{const n={};return e[mm]!=null&&(n[mm]=nW(e[mm])),n},bj=(e,t)=>{const n={};return e[$e]!=null&&(n[$e]=M(e[$e])),e[cc]!=null&&(n[cc]=zT(e[cc])),n},gj=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e.Tag===""?n[$r]=[]:e[Et]!=null&&(n[$r]=po(at(e[Et]))),e[Ei]!=null&&(n[Ei]=M(e[Ei])),n},MT=(e,t)=>{const n={};return e[nt]!=null&&(n[nt]=M(e[nt])),e.Filter===""||e[tt]!=null&&(n[tt]=yj(T_(e[tt]))),n},pj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>MT(n)),yj=(e,t)=>e[Oe]!=null?{Prefix:M(e[Oe])}:e[Et]!=null?{Tag:Xc(e[Et])}:e[Ei]!=null?{AccessPointArn:M(e[Ei])}:e[pn]!=null?{And:gj(e[pn])}:{$unknown:Object.entries(e)[0]},Ej=(e,t)=>{const n={};return e[Zr]!=null&&(n[Zr]=M(e[Zr])),e[gt]!=null&&(n[gt]=M(e[gt])),e[em]!=null&&(n[em]=Ge(Hr(e[em]))),e[xt]!=null&&(n[xt]=M(e[xt])),e[Ot]!=null&&(n[Ot]=ia(e[Ot])),e[hc]!=null&&(n[hc]=OT(e[hc])),e[Tt]!=null&&(n[Tt]=M(e[Tt])),e[fn]!=null&&(n[fn]=M(e[fn])),n},Cj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Ej(n)),xj=(e,t)=>{const n={};return e[ws]!=null&&(n[ws]=Jt(e[ws])),e[As]!=null&&(n[As]=Jt(e[As])),n},vj=(e,t)=>{const n={};return e[ws]!=null&&(n[ws]=Jt(e[ws])),e[xt]!=null&&(n[xt]=M(e[xt])),e[As]!=null&&(n[As]=Jt(e[As])),n},_j=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>vj(n)),_p=(e,t)=>{const n={};return e[Ib]!=null&&(n[gt]=tW(e[Ib])),n},Tj=(e,t)=>{const n={};return e[gt]!=null&&(n[gt]=M(e[gt])),e[kn]!=null&&(n[kn]=Ge(Hr(e[kn]))),e[tn]!=null&&(n[tn]=M(e[tn])),e.ChecksumAlgorithm===""?n[Tt]=[]:e[Tt]!=null&&(n[Tt]=BT(at(e[Tt]))),e[fn]!=null&&(n[fn]=M(e[fn])),e[Er]!=null&&(n[Er]=ur(e[Er])),e[xt]!=null&&(n[xt]=M(e[xt])),e[Ot]!=null&&(n[Ot]=ia(e[Ot])),e[vc]!=null&&(n[vc]=UT(e[vc])),n},FT=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Tj(n)),Sj=(e,t)=>{const n={};return e[zd]!=null&&(n[zd]=M(e[zd])),e[Xr]!=null&&(n[Xr]=kj(e[Xr])),n},wj=(e,t)=>{const n={};return e[$e]!=null&&(n[$e]=M(e[$e])),n},Aj=(e,t)=>{const n={};return e[Ss]!=null&&(n[Ss]=M(e[Ss])),e[_c]!=null&&(n[_c]=Ge(Hr(e[_c]))),n},kj=(e,t)=>{const n={};return e[Na]!=null&&(n[Na]=kq(e[Na])),n},Rj=(e,t)=>{const n={};return e[Kr]!=null&&(n[Kr]=Jt(e[Kr])),e[Er]!=null&&(n[Er]=ur(e[Er])),e[on]!=null&&(n[on]=M(e[on])),e[cn]!=null&&(n[cn]=M(e[cn])),e[ln]!=null&&(n[ln]=M(e[ln])),e[un]!=null&&(n[un]=M(e[un])),e[dn]!=null&&(n[dn]=M(e[dn])),n},Ij=(e,t)=>{const n={};return e[tn]!=null&&(n[tn]=M(e[tn])),e.ChecksumAlgorithm===""?n[Tt]=[]:e[Tt]!=null&&(n[Tt]=BT(at(e[Tt]))),e[fn]!=null&&(n[fn]=M(e[fn])),e[Er]!=null&&(n[Er]=ur(e[Er])),e[xt]!=null&&(n[xt]=M(e[xt])),e[gt]!=null&&(n[gt]=M(e[gt])),e[St]!=null&&(n[St]=M(e[St])),e[uc]!=null&&(n[uc]=Pt(e[uc])),e[kn]!=null&&(n[kn]=Ge(Hr(e[kn]))),e[Ot]!=null&&(n[Ot]=ia(e[Ot])),e[vc]!=null&&(n[vc]=UT(e[vc])),n},Bj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Ij(n)),ia=(e,t)=>{const n={};return e[zs]!=null&&(n[zs]=M(e[zs])),e[An]!=null&&(n[An]=M(e[An])),n},Pj=(e,t)=>{const n={};return e.Rule===""?n[Bs]=[]:e[Xr]!=null&&(n[Bs]=Oj(at(e[Xr]))),n},Nj=(e,t)=>{const n={};return e[Kl]!=null&&(n[Kl]=M(e[Kl])),n},Oj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Nj(n)),Dj=(e,t)=>{const n={};return e[Kr]!=null&&(n[Kr]=Jt(e[Kr])),e[kn]!=null&&(n[kn]=Ge(Hr(e[kn]))),e[tn]!=null&&(n[tn]=M(e[tn])),e[Er]!=null&&(n[Er]=ur(e[Er])),e[on]!=null&&(n[on]=M(e[on])),e[cn]!=null&&(n[cn]=M(e[cn])),e[ln]!=null&&(n[ln]=M(e[ln])),e[un]!=null&&(n[un]=M(e[un])),e[dn]!=null&&(n[dn]=M(e[dn])),n},Lj=(e,t)=>{const n={};return e[Ud]!=null&&(n[Ud]=M(e[Ud])),n},Mj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Dj(n)),Fj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Rj(n)),zj=(e,t)=>{const n={};return e[Z0]!=null&&(n[Z0]=Pt(e[Z0])),n},Uj=(e,t)=>{const n={};return e[ic]!=null&&(n[ic]=ur(e[ic])),e[tc]!=null&&(n[tc]=ur(e[tc])),e[sc]!=null&&(n[sc]=ur(e[sc])),n},$j=(e,t)=>{const n={};return e[nc]!=null&&(n[nc]=Pt(e[nc])),e[fc]!=null&&(n[fc]=Pt(e[fc])),e[rc]!=null&&(n[rc]=Pt(e[rc])),e[xc]!=null&&(n[xc]=Pt(e[xc])),n},Hj=(e,t)=>{const n={};return e[nt]!=null&&(n[nt]=M(e[nt])),e[Rb]!=null&&(n[Hd]=M(e[Rb])),e.Event===""?n[vi]=[]:e[ao]!=null&&(n[vi]=vp(at(e[ao]))),e[tt]!=null&&(n[tt]=_p(e[tt])),n},qj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Hj(n)),jj=(e,t)=>{const n={};return e[ji]!=null&&(n[ji]=M(e[ji])),e[Pd]!=null&&(n[Pd]=M(e[Pd])),e[Vi]!=null&&(n[Vi]=M(e[Vi])),e[jd]!=null&&(n[jd]=M(e[jd])),e[Wd]!=null&&(n[Wd]=M(e[Wd])),n},Wj=(e,t)=>{const n={};return e[ji]!=null&&(n[ji]=M(e[ji])),e[Vi]!=null&&(n[Vi]=M(e[Vi])),n},Gj=(e,t)=>{const n={};return e[$e]!=null&&(n[$e]=M(e[$e])),n},Vj=(e,t)=>{const n={};return e[Vd]!=null&&(n[Vd]=M(e[Vd])),e.Rule===""?n[Bs]=[]:e[Xr]!=null&&(n[Bs]=Qj(at(e[Xr]))),n},Kj=(e,t)=>{const n={};return e[An]!=null&&(n[An]=M(e[An])),e[xa]!=null&&(n[xa]=Jt(e[xa])),e[Oe]!=null&&(n[Oe]=M(e[Oe])),e[tt]!=null&&(n[tt]=Xj(e[tt])),e[$e]!=null&&(n[$e]=M(e[$e])),e[Ja]!=null&&(n[Ja]=lW(e[Ja])),e[Ma]!=null&&(n[Ma]=Hq(e[Ma])),e[Xn]!=null&&(n[Xn]=Oq(e[Xn])),e[Pa]!=null&&(n[Pa]=Pq(e[Pa])),n},Yj=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e.Tag===""?n[$r]=[]:e[Et]!=null&&(n[$r]=po(at(e[Et]))),n},Xj=(e,t)=>{const n={};return e[Oe]!=null&&(n[Oe]=M(e[Oe])),e[Et]!=null&&(n[Et]=Xc(e[Et])),e[pn]!=null&&(n[pn]=Yj(e[pn])),n},Qj=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Kj(n)),Zj=(e,t)=>{const n={};return e[$e]!=null&&(n[$e]=M(e[$e])),e[kc]!=null&&(n[kc]=zT(e[kc])),n},zT=(e,t)=>{const n={};return e[Ca]!=null&&(n[Ca]=Jt(e[Ca])),n},UT=(e,t)=>{const n={};return e[J0]!=null&&(n[J0]=Pt(e[J0])),e[dm]!=null&&(n[dm]=Ge(Hr(e[dm]))),n},Jj=(e,t)=>{const n={};return e[Ba]!=null&&(n[Ba]=vq(e[Ba])),e[Ya]!=null&&(n[Ya]=jj(e[Ya])),n},eW=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Jj(n)),tW=(e,t)=>{const n={};return e.FilterRule===""?n[yb]=[]:e[pb]!=null&&(n[yb]=Wq(at(e[pb]))),n},nW=(e,t)=>{const n={};return e[wc]!=null&&(n[wc]=M(e[wc])),e[Ac]!=null&&(n[Ac]=M(e[Ac])),e[gm]!=null&&(n[gm]=M(e[gm])),e[pm]!=null&&(n[pm]=M(e[pm])),n},rW=(e,t)=>{const n={};return e[Tc]!=null&&(n[Tc]=M(e[Tc])),e[gc]!=null&&(n[gc]=M(e[gc])),n},sW=(e,t)=>{const n={};return e.Rule===""?n[Bs]=[]:e[Xr]!=null&&(n[Bs]=aW(at(e[Xr]))),n},iW=(e,t)=>{const n={};return e[Zo]!=null&&(n[Zo]=rW(e[Zo])),e[gn]!=null&&(n[gn]=Pt(e[gn])),n},aW=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>iW(n)),oW=(e,t)=>{const n={};return e[q0]!=null&&(n[q0]=M(e[q0])),e[fm]!=null&&(n[fm]=M(e[fm])),e[hm]!=null&&(n[hm]=M(e[hm])),e[zr]!=null&&(n[zr]=Ge(Hr(e[zr]))),n},cW=(e,t)=>({}),lW=(e,t)=>{const n={};return e[Qa]!=null&&(n[Qa]=dW(e[Qa])),e[Va]!=null&&(n[Va]=Gj(e[Va])),n},uW=(e,t)=>{const n={};return e[bc]!=null&&(n[bc]=M(e[bc])),n},dW=(e,t)=>{const n={};return e[$e]!=null&&(n[$e]=M(e[$e])),n},fW=(e,t)=>({}),hW=(e,t)=>{const n={};return e[ic]!=null&&(n[ic]=ur(e[ic])),e[tc]!=null&&(n[tc]=ur(e[tc])),e[sc]!=null&&(n[sc]=ur(e[sc])),n},mW=(e,t)=>{const n={};return e[oc]!=null&&(n[oc]=bW(e[oc])),n},bW=(e,t)=>{const n={};return e[Cc]!=null&&(n[Cc]=M(e[Cc])),e[Xn]!=null&&(n[Xn]=gq(e[Xn])),n},Xc=(e,t)=>{const n={};return e[gt]!=null&&(n[gt]=M(e[gt])),e[os]!=null&&(n[os]=M(e[os])),n},po=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>Xc(n)),gW=(e,t)=>{const n={};return e[as]!=null&&(n[as]=PT(e[as])),e[ii]!=null&&(n[ii]=M(e[ii])),n},pW=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>gW(n)),yW=(e,t)=>{const n={};return e[Za]!=null&&(n[Za]=cW(e[Za])),e[Wa]!=null&&(n[Wa]=Lj(e[Wa])),n},EW=(e,t)=>{const n={};return e[Mt]!=null&&(n[Mt]=Jt(e[Mt])),e[Ci]!=null&&(n[Ci]=M(e[Ci])),n},CW=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>EW(n)),xW=(e,t)=>{const n={};return e[nt]!=null&&(n[nt]=M(e[nt])),e[Fb]!=null&&(n[Jd]=M(e[Fb])),e.Event===""?n[vi]=[]:e[ao]!=null&&(n[vi]=vp(at(e[ao]))),e[tt]!=null&&(n[tt]=_p(e[tt])),n},vW=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>xW(n)),_W=(e,t)=>{const n={};return e[Fr]!=null&&(n[Fr]=Ge(Hr(e[Fr]))),e[Mt]!=null&&(n[Mt]=Jt(e[Mt])),e[xt]!=null&&(n[xt]=M(e[xt])),n},TW=(e,t)=>(e||[]).filter(n=>n!=null).map(n=>_W(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"]}),SW=(e,t)=>ot(e,t).then(n=>t.utf8Encoder(n)),pn="And",wW="AnalyticsAndOperator",ib="AnalyticsConfiguration",Qc="ACL",ka="AccessControlList",vC="AnalyticsConfigurationList",AW="AccessControlPolicy",Ra="AccessControlTranslation",kW="AccelerateConfiguration",$T="AbortDate",RW="AnalyticsExportDestination",IW="AnalyticsFilter",ab="AllowedHeader",ob="AllowedHeaders",BW="AnalyticsId",Ia="AbortIncompleteMultipartUpload",Qo="AccountId",q0="AccessKeyId",cb="AllowedMethod",lb="AllowedMethods",ub="AllowedOrigin",db="AllowedOrigins",PW="AccessPointAlias",Ei="AccessPointArn",cd="AllowQuotedRecordDelimiter",Tp="AcceptRanges",HT="AbortRuleId",NW="ArchiveStatus",OW="AnalyticsS3BucketDestination",DW="AnalyticsS3ExportFileFormat",Zo="ApplyServerSideEncryptionByDefault",Ci="AccessTier",Jo="Account",It="Bucket",ec="BucketAccountId",LW="BucketAccelerateStatus",Lc="BypassGovernanceRetention",MW="BucketInfo",gn="BucketKeyEnabled",FW="BucketLifecycleConfiguration",zW="BucketLocationConstraint",UW="BucketLocationName",$W="BucketLogsPermission",HW="BucketLoggingStatus",qW="BucketLocationType",bh="BucketName",tc="BytesProcessed",nc="BlockPublicAcls",rc="BlockPublicPolicy",Gl="BucketRegion",sc="BytesReturned",ic="BytesScanned",jW="BucketType",WW="BucketVersioningStatus",Qs="Buckets",j0="Credentials",Tt="ChecksumAlgorithm",W0="CannedACL",GW="CreateBucketConfiguration",Zc="CacheControl",on="ChecksumCRC32",cn="ChecksumCRC32C",ln="ChecksumCRC64NVME",Jc="ContentDisposition",G0="CreationDate",el="ContentEncoding",fb="CloudFunction",_C="CloudFunctionConfiguration",tl="ContentLanguage",Ji="ContentLength",qT="ChecksumMode",jn="ContentMD5",VW="CompletedMultipartUpload",KW="CORSConfiguration",hb="CORSRule",mb="CORSRules",wr="CommonPrefixes",YW="CompletedPart",Sp="ContentRange",TC="ConfirmRemoveSelfBucketAccess",jT="CopySource",un="ChecksumSHA1",dn="ChecksumSHA256",WT="CopySourceIfMatch",Df="CopySourceIfModifiedSince",GT="CopySourceIfNoneMatch",Lf="CopySourceIfUnmodifiedSince",XW="CopySourceRange",VT="CopySourceSSECustomerAlgorithm",KT="CopySourceSSECustomerKey",YT="CopySourceSSECustomerKeyMD5",ac="CSV",XT="CopySourceVersionId",QW="CSVInput",ZW="CSVOutput",fn="ChecksumType",nl="ContentType",JW="CompressionType",en="ContinuationToken",V0="Checksum",Ui="Contents",K0="Code",eG="Comments",Ba="Condition",Ar="Delimiter",ga="DaysAfterInitiation",oc="DataExport",Fs="DeleteMarker",Pa="DeleteMarkerReplication",tG="DeleteMarkerReplicationStatus",Y0="DeleteMarkerVersionId",SC="DeleteMarkers",zs="DisplayName",nG="DataRedundancy",Na="DefaultRetention",Mt="Days",Fr="Date",ld="Deleted",rG="Delete",Xn="Destination",sG="Description",ai="Expires",Ad="EmailAddress",Oa="EventBridgeConfiguration",Pe="ExpectedBucketOwner",kd="ErrorCode",Da="EncryptionConfiguration",La="ErrorDocument",bb="ExposeHeaders",gb="ExposeHeader",Rd="ErrorMessage",pa="ExpiredObjectDeleteMarker",Ma="ExistingObjectReplication",iG="ExistingObjectReplicationStatus",aG="EnableRequestProgress",QT="ExpiresString",ZT="ExpectedSourceBucketOwner",oG="ExpirationStatus",kr="EncodingType",tn="ETag",X0="EncryptionType",cc="EventThreshold",JT="ExpressionType",si="Encryption",Q0="Enabled",ud="End",Vl="Error",wC="Errors",ao="Event",vi="Events",eS="Expression",zr="Expiration",tt="Filter",tS="FieldDelimiter",cG="FileHeaderInfo",lG="FetchOwner",pb="FilterRule",uG="FilterRuleName",dG="FilterRuleValue",yb="FilterRules",Eb="Field",_s="Format",lc="Frequency",_i="Grant",rl="GrantFullControl",Id="GlacierJobParameters",sl="GrantRead",il="GrantReadACP",wp="GrantWrite",al="GrantWriteACP",hu="Grants",as="Grantee",Bd="HttpErrorCodeReturnedEquals",ji="HostName",Pd="HttpRedirectCode",nt="Id",Cb="InventoryConfiguration",AC="InventoryConfigurationList",Fa="IndexDocument",An="ID",fG="InventoryDestination",ya="IsEnabled",hG="InventoryEncryption",mG="InventoryFilter",bG="InventoryFormat",gG="InventoryFrequency",pG="InventoryId",yG="InventoryIncludedObjectVersions",uc="IsLatest",Su="IfMatch",kC="IfMatchInitiatedTime",RC="IfMatchLastModifiedTime",IC="IfMatchSize",Mf="IfModifiedSince",gh="IfNoneMatch",EG="InventoryOptionalField",dc="IncludedObjectVersions",Z0="IsPublic",fc="IgnorePublicAcls",J0="IsRestoreInProgress",za="InputSerialization",CG="InventoryS3BucketDestination",xG="InventorySchedule",qt="IsTruncated",vG="IntelligentTieringAndOperator",_G="IntelligentTieringAccessTier",xb="IntelligentTieringConfiguration",BC="IntelligentTieringConfigurationList",TG="IntelligentTieringDays",SG="IntelligentTieringFilter",wG="IntelligentTieringId",AG="IntelligentTieringStatus",Ff="IfUnmodifiedSince",hc="Initiator",em="Initiated",mc="JSON",kG="JSONInput",RG="JSONOutput",IG="JSONType",gt="Key",tm="KeyCount",bc="KeyId",Wi="KeyMarker",BG="KMSContext",nm="KMSKeyId",gc="KMSMasterKeyID",Nd="KeyPrefixEquals",Ua="Location",pc="LocationConstraint",$a="LoggingEnabled",PG="LifecycleExpiration",Od="LambdaFunctionArn",vb="LambdaFunctionConfigurations",NG="LambdaFunctionConfiguration",OG="LocationInfo",kn="LastModified",dd="LastModifiedTime",DG="LocationNameAsString",LG="LocationPrefix",MG="LifecycleRule",FG="LifecycleRuleAndOperator",zG="LifecycleRuleFilter",UG="LocationType",Dd="Marker",$G="MetricsAndOperator",Ea="MaxAgeSeconds",HG="MaxBuckets",_b="MetricsConfiguration",PC="MetricsConfigurationList",qG="MetadataDirective",jG="MaxDirectoryBuckets",Tb="MfaDelete",nS="MetadataEntry",WG="MetricsFilter",Ap="MFA",Ld="MFADelete",GG="MetricsId",Ts="MaxKeys",VG="MetadataKey",zf="MissingMeta",NC="MpuObjectSize",xi="MaxParts",KG="MetricsStatus",YG="MetadataTableConfiguration",rm="MetadataTableConfigurationResult",Md="MaxUploads",XG="MetadataValue",Ha="Metrics",sm="Message",Ca="Minutes",Ss="Mode",wn="Name",QG="NotificationConfiguration",ZG="NotificationConfigurationFilter",Ur="NextContinuationToken",ws="NoncurrentDays",kp="NotificationId",yc="NextKeyMarker",im="NextMarker",As="NewerNoncurrentVersions",Ec="NextPartNumberMarker",am="NextUploadIdMarker",qa="NoncurrentVersionExpiration",om="NextVersionIdMarker",Sb="NoncurrentVersionTransitions",wb="NoncurrentVersionTransition",Ot="Owner",OC="ObjectAttributes",JG="OwnershipControls",eV="ObjectCannedACL",tV="OwnershipControlsRule",Mo="OptionalFields",nV="ObjectIdentifier",Rp="ObjectKey",Fd="OutputLocation",rV="ObjectLockConfiguration",zd="ObjectLockEnabled",DC="ObjectLockEnabledForBucket",sV="ObjectLockLegalHold",yo="ObjectLockLegalHoldStatus",ol="ObjectLockMode",iV="ObjectLockRetention",rS="ObjectLockRetentionMode",oi="ObjectLockRetainUntilDate",aV="ObjectLockRule",Kl="ObjectOwnership",Mc="OptionalObjectAttributes",oV="OwnerOverride",cm="ObjectParts",ja="OutputSerialization",ks="ObjectSizeGreaterThan",sS="ObjectSizeGreaterThanBytes",Rs="ObjectSizeLessThan",iS="ObjectSizeLessThanBytes",Cc="OutputSchemaVersion",lm="ObjectSize",cV="ObjectVersionId",lV="Objects",Oe="Prefix",uV="PublicAccessBlockConfiguration",Fc="PartsCount",Ud="PartitionDateSource",dV="ParquetInput",Kr="PartNumber",Gi="PartNumberMarker",Wa="PartitionedPrefix",$d="Payer",Uf="Part",um="Parquet",mu="Parts",ii="Permission",Vi="Protocol",xa="Priority",fd="Quiet",Hd="QueueArn",Ab="QueueConfiguration",kb="QueueConfigurations",aS="QuoteCharacter",oS="QuoteEscapeCharacter",fV="QuoteFields",Rb="Queue",cS="Range",Ga="RedirectAllRequestsTo",yn="RequestCharged",lS="ResponseCacheControl",uS="ResponseContentDisposition",dS="ResponseContentEncoding",fS="ResponseContentLanguage",hS="ResponseContentType",hV="ReplicationConfiguration",Ip="RecordDelimiter",mS="ResponseExpires",dm="RestoreExpiryDate",qd="ReplicaKmsKeyID",jd="ReplaceKeyPrefixWith",Wd="ReplaceKeyWith",Va="ReplicaModifications",mV="ReplicaModificationsStatus",bV="RestoreOutputPath",Wt="RequestPayer",xc="RestrictPublicBuckets",gV="RequestPaymentConfiguration",Gd="RequestProgress",pV="RequestRoute",yV="ReplicationRuleAndOperator",EV="ReplicationRuleFilter",CV="ReplicationRuleStatus",xV="RestoreRequestType",vV="ReplicationRule",_V="RestoreRequest",Fo="RoutingRules",$f="RoutingRule",Bp="ReplicationStatus",vc="RestoreStatus",TV="RequestToken",SV="ReplicationTimeStatus",wV="ReplicationTimeValue",Ka="ReplicationTime",_c="RetainUntilDate",Pp="Restore",Ya="Redirect",Vd="Role",Xr="Rule",Bs="Rules",$e="Status",Kd="StartAfter",fm="SecretAccessKey",Is="S3BucketDestination",xt="StorageClass",Xa="StorageClassAnalysis",AV="StorageClassAnalysisDataExport",kV="StorageClassAnalysisSchemaVersion",LC="StatusCode",MC="SkipDestinationValidation",Hf="SSE-KMS",Qa="SseKmsEncryptedObjects",RV="SseKmsEncryptedObjectsStatus",IV="S3KeyFilter",Ib="S3Key",BV="S3Location",PV="SessionMode",NV="SelectObjectContentRequest",Yd="SelectParameters",Za="SimplePrefix",Xd="ScanRange",qf="SSE-S3",Ja="SourceSelectionCriteria",Pr="ServerSideEncryption",Tc="SSEAlgorithm",OV="ServerSideEncryptionByDefault",DV="ServerSideEncryptionConfiguration",Qn="SSECustomerAlgorithm",js="SSECustomerKey",Zn="SSECustomerKeyMD5",Bb="SSEKMS",aa="SSEKMSEncryptionContext",Cr="SSEKMSKeyId",LV="ServerSideEncryptionRule",Pb="SSES3",hm="SessionToken",MV="S3TablesBucketArn",Qd="S3TablesDestination",mm="S3TablesDestinationResult",FV="S3TablesName",bm="S3",Sc="Schedule",hd="Setting",Er="Size",md="Start",Zd="Suffix",eo="Tagging",Jd="TopicArn",gm="TableArn",ef="TargetBucket",wc="TableBucketArn",Nb="TagCount",Ob="TopicConfiguration",Db="TopicConfigurations",zV="TaggingDirective",Np="TransitionDefaultMinimumObjectSize",zo="TargetGrants",UV="TargetGrant",Ac="TableName",pm="TableNamespace",to="TargetObjectKeyFormat",tf="TargetPrefix",$V="TotalPartsCount",Ms="TagSet",bS="TransitionStorageClass",Et="Tag",$r="Tags",gS="Tier",Lb="Tierings",Mb="Tiering",kc="Time",pS="Token",Fb="Topic",zb="Transitions",Ub="Transition",Qr="Type",FC="Upload",Zr="UploadId",nf="UploadIdMarker",HV="UserMetadata",rf="URI",zC="Uploads",UC="Version",yS="VersionCount",qV="VersioningConfiguration",St="VersionId",sf="VersionIdMarker",os="Value",$C="Versions",jV="WebsiteConfiguration",HC="WriteOffsetBytes",wu="WebsiteRedirectLocation",va="Years",ph="analytics",ES="accelerate",yh="acl",CS="accept-ranges",WV="attributes",GV="bucket-region",Op="cors",Au="cache-control",ku="content-disposition",Ru="content-encoding",Iu="content-language",oo="content-length",Wn="content-md5",xS="content-range",Bu="content-type",Eo="continuation-token",VV="delete",Eh="delimiter",co="expires",Dp="encryption",Ch="encoding-type",xh="etag",vS="expiresstring",KV="fetch-owner",Ps="id",Pu="if-match",_S="if-modified-since",vh="inventory",_h="if-none-match",Th="intelligent-tiering",TS="if-unmodified-since",SS="key-marker",Lp="lifecycle",wS="legal-hold",zc="last-modified",AS="location",kS="logging",YV="list-type",Sh="metrics",Mp="metadataTable",XV="marker",QV="max-buckets",ZV="max-directory-buckets",Jn="member",Fp="max-keys",JV="max-parts",eK="max-uploads",RS="notification",zp="ownershipControls",IS="object-lock",Up="policy",$p="publicAccessBlock",wh="partNumber",tK="policyStatus",nK="part-number-marker",Nu="prefix",Hp="replication",BS="requestPayment",PS="range",NS="response-cache-control",OS="response-content-disposition",DS="response-content-encoding",LS="response-content-language",MS="response-content-type",FS="response-expires",rK="restore",zS="retention",sK="session",iK="start-after",aK="select",oK="select-type",cl="tagging",cK="torrent",US="uploads",Ou="uploadId",lK="upload-id-marker",$S="versioning",ns="versionId",Gt='<?xml version="1.0" encoding="UTF-8"?>',uK="versions",dK="version-id-marker",qp="website",qC="xsi:type",ll="x-amz-acl",jf="x-amz-abort-date",jC="x-amz-access-point-alias",HS="x-amz-abort-rule-id",fK="x-amz-archive-status",jp="x-amz-bypass-governance-retention",hK="x-amz-bucket-location-name",mK="x-amz-bucket-location-type",bK="x-amz-bucket-object-lock-enabled",qS="x-amz-bucket-object-lock-token",gK="x-amz-bucket-region",Wp="x-amz-checksum-algorithm",Co="x-amz-checksum-crc32",xo="x-amz-checksum-crc32c",vo="x-amz-checksum-crc64nvme",jS="x-amz-checksum-mode",pK="x-amz-confirm-remove-self-bucket-access",_o="x-amz-checksum-sha1",To="x-amz-checksum-sha256",WS="x-amz-copy-source",GS="x-amz-copy-source-if-match",VS="x-amz-copy-source-if-modified-since",KS="x-amz-copy-source-if-none-match",YS="x-amz-copy-source-if-unmodified-since",yK="x-amz-create-session-mode",EK="x-amz-copy-source-range",XS="x-amz-copy-source-server-side-encryption-customer-algorithm",QS="x-amz-copy-source-server-side-encryption-customer-key",ZS="x-amz-copy-source-server-side-encryption-customer-key-md5",JS="x-amz-copy-source-version-id",ul="x-amz-checksum-type",ea="x-amz-delete-marker",Du="x-amz-expiration",Ne="x-amz-expected-bucket-owner",CK="x-amz-fwd-error-code",xK="x-amz-fwd-error-message",vK="x-amz-fwd-header-accept-ranges",_K="x-amz-fwd-header-cache-control",TK="x-amz-fwd-header-content-disposition",SK="x-amz-fwd-header-content-encoding",wK="x-amz-fwd-header-content-language",AK="x-amz-fwd-header-content-range",kK="x-amz-fwd-header-content-type",RK="x-amz-fwd-header-etag",IK="x-amz-fwd-header-expires",BK="x-amz-fwd-header-last-modified",PK="x-amz-fwd-header-x-amz-checksum-crc32",NK="x-amz-fwd-header-x-amz-checksum-crc32c",OK="x-amz-fwd-header-x-amz-checksum-crc64nvme",DK="x-amz-fwd-header-x-amz-checksum-sha1",LK="x-amz-fwd-header-x-amz-checksum-sha256",MK="x-amz-fwd-header-x-amz-delete-marker",FK="x-amz-fwd-header-x-amz-expiration",zK="x-amz-fwd-header-x-amz-missing-meta",UK="x-amz-fwd-header-x-amz-mp-parts-count",$K="x-amz-fwd-header-x-amz-object-lock-legal-hold",HK="x-amz-fwd-header-x-amz-object-lock-mode",qK="x-amz-fwd-header-x-amz-object-lock-retain-until-date",jK="x-amz-fwd-header-x-amz-restore",WK="x-amz-fwd-header-x-amz-request-charged",GK="x-amz-fwd-header-x-amz-replication-status",VK="x-amz-fwd-header-x-amz-storage-class",KK="x-amz-fwd-header-x-amz-server-side-encryption",YK="x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id",XK="x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled",QK="x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm",ZK="x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5",JK="x-amz-fwd-header-x-amz-tagging-count",eY="x-amz-fwd-header-x-amz-version-id",tY="x-amz-fwd-status",dl="x-amz-grant-full-control",fl="x-amz-grant-read",hl="x-amz-grant-read-acp",Gp="x-amz-grant-write",ml="x-amz-grant-write-acp",nY="x-amz-if-match-initiated-time",rY="x-amz-if-match-last-modified-time",sY="x-amz-if-match-size",Vp="x-amz-mfa",iY="x-amz-metadata-directive",Wf="x-amz-missing-meta",aY="x-amz-mp-object-size",oY="x-amz-max-parts",Gf="x-amz-mp-parts-count",cY="x-amz-object-attributes",Lu="x-amz-object-lock-legal-hold",Mu="x-amz-object-lock-mode",lo="x-amz-object-lock-retain-until-date",lY="x-amz-object-ownership",Kp="x-amz-optional-object-attributes",WC="x-amz-object-size",uY="x-amz-part-number-marker",ew="x-amz-restore",xn="x-amz-request-charged",dY="x-amz-restore-output-path",Vt="x-amz-request-payer",fY="x-amz-request-route",tw="x-amz-replication-status",hY="x-amz-request-token",Fu="x-amz-storage-class",In="x-amz-sdk-checksum-algorithm",mY="x-amz-skip-destination-validation",nw="x-amz-source-expected-bucket-owner",hs="x-amz-server-side-encryption",ms="x-amz-server-side-encryption-aws-kms-key-id",Bn="x-amz-server-side-encryption-bucket-key-enabled",oa="x-amz-server-side-encryption-context",mr="x-amz-server-side-encryption-customer-algorithm",Ws="x-amz-server-side-encryption-customer-key",br="x-amz-server-side-encryption-customer-key-md5",Yp="x-amz-tagging",GC="x-amz-tagging-count",bY="x-amz-tagging-directive",Xp="x-amz-transition-default-minimum-object-size",ui="x-amz-version-id",gY="x-amz-write-offset-bytes",zu="x-amz-website-redirect-location",gr="x-id";class rw extends Ce.classBuilder().ep({...we,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(cF,oF).ser(YF).de(zz).build(){}const pY="3.758.0",yY={version:pY};function VC(e){return typeof e=="string"?e.length===0:e.byteLength===0}var sw={name:"SHA-1"},KC={name:"HMAC",hash:sw},EY=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const CY={};function Ki(){return typeof window<"u"?window:typeof self<"u"?self:CY}var xY=function(){function e(t){this.toHash=new Uint8Array(0),t!==void 0&&(this.key=new Promise(function(n,r){Ki().crypto.subtle.importKey("raw",YC(t),KC,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))}return e.prototype.update=function(t){if(!VC(t)){var n=YC(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 Ki().crypto.subtle.sign(KC,n,t.toHash).then(function(r){return new Uint8Array(r)})}):VC(this.toHash)?Promise.resolve(EY):Promise.resolve().then(function(){return Ki().crypto.subtle.digest(sw,t.toHash)}).then(function(n){return Promise.resolve(new Uint8Array(n))})},e.prototype.reset=function(){this.toHash=new Uint8Array(0)},e}();function YC(e){return typeof e=="string"?B_(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}var vY=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function iw(e){if(_Y(e)&&typeof e.crypto.subtle=="object"){var t=e.crypto.subtle;return TY(t)}return!1}function _Y(e){if(typeof e=="object"&&typeof e.crypto=="object"){var t=e.crypto.getRandomValues;return typeof t=="function"}return!1}function TY(e){return e&&vY.every(function(t){return typeof e[t]=="function"})}var SY=function(){function e(t){if(iw(Ki()))this.hash=new xY(t);else throw new Error("SHA1 not supported")}return e.prototype.update=function(t,n){this.hash.update(Qi(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}(),aw={name:"SHA-256"},XC={name:"HMAC",hash:aw},wY=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]),AY=function(){function e(t){this.toHash=new Uint8Array(0),this.secret=t,this.reset()}return e.prototype.update=function(t){if(!uu(t)){var n=Qi(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 Ki().crypto.subtle.sign(XC,n,t.toHash).then(function(r){return new Uint8Array(r)})}):uu(this.toHash)?Promise.resolve(wY):Promise.resolve().then(function(){return Ki().crypto.subtle.digest(aw,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){Ki().crypto.subtle.importKey("raw",Qi(t.secret),XC,!1,["sign"]).then(n,r)}),this.key.catch(function(){}))},e}(),ps=64,kY=32,RY=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]),IY=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],BY=Math.pow(2,53)-1,af=function(){function e(){this.state=Int32Array.from(IY),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>BY)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;r>0;)this.buffer[this.bufferLength++]=t[n++],r--,this.bufferLength===ps&&(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%ps>=ps-8){for(var s=this.bufferLength;s<ps;s++)n.setUint8(s,0);this.hashBuffer(),this.bufferLength=0}for(var s=this.bufferLength;s<ps-8;s++)n.setUint8(s,0);n.setUint32(ps-8,Math.floor(t/4294967296),!0),n.setUint32(ps-4,t),this.hashBuffer(),this.finished=!0}for(var i=new Uint8Array(kY),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],u=r[6],f=r[7],m=0;m<ps;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],b=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10;h=this.temp[m-15];var p=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3;this.temp[m]=(b+this.temp[m-7]|0)+(p+this.temp[m-16]|0)}var E=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&l^~c&u)|0)+(f+(RY[m]+this.temp[m]|0)|0)|0,g=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&i^s&a^i&a)|0;f=u,u=l,l=c,c=o+E|0,o=a,a=i,i=s,s=E+g|0}r[0]+=s,r[1]+=i,r[2]+=a,r[3]+=o,r[4]+=c,r[5]+=l,r[6]+=u,r[7]+=f},e}(),PY=function(){function e(t){this.secret=t,this.hash=new af,this.reset()}return e.prototype.update=function(t){if(!(uu(t)||this.error))try{this.hash.update(Qi(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 Vg(this,void 0,void 0,function(){return Kg(this,function(t){return[2,this.digestSync()]})})},e.prototype.reset=function(){if(this.hash=new af,this.secret){this.outer=new af;var t=NY(this.secret),n=new Uint8Array(ps);n.set(t);for(var r=0;r<ps;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 NY(e){var t=Qi(e);if(t.byteLength>ps){var n=new af;n.update(t),t=n.digest()}var r=new Uint8Array(ps);return r.set(t),r}var OY=function(){function e(t){iw(Ki())?this.hash=new AY(t):this.hash=new PY(t)}return e.prototype.update=function(t,n){this.hash.update(Qi(t))},e.prototype.digest=function(){return this.hash.digest()},e.prototype.reset=function(){this.hash.reset()},e}();const DY={"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",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"},ow={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",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"},Nn={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Lr={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"},Di={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class me{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=me.getVersionPrecision(t),i=me.getVersionPrecision(n);let a=Math.max(s,i),o=0;const c=me.map([t,n],l=>{const u=a-me.getVersionPrecision(l),f=l+new Array(u+1).join(".0");return me.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 DY[t]}static getBrowserTypeByAlias(t){return ow[t]||""}}const rn=/version\/(\d+(\.?_?\d+)+)/i,LY=[{test:[/googlebot/i],describe(e){const t={name:"Googlebot"},n=me.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){const t={name:"Opera"},n=me.getFirstMatch(rn,e)||me.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){const t={name:"Opera"},n=me.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){const t={name:"Samsung Internet for Android"},n=me.getFirstMatch(rn,e)||me.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=me.getFirstMatch(rn,e)||me.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){const t={name:"MZ Browser"},n=me.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){const t={name:"Focus"},n=me.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){const t={name:"Swing"},n=me.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){const t={name:"Opera Coast"},n=me.getFirstMatch(rn,e)||me.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=me.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){const t={name:"Yandex Browser"},n=me.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){const t={name:"UC Browser"},n=me.getFirstMatch(rn,e)||me.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){const t={name:"Maxthon"},n=me.getFirstMatch(rn,e)||me.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){const t={name:"Epiphany"},n=me.getFirstMatch(rn,e)||me.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){const t={name:"Puffin"},n=me.getFirstMatch(rn,e)||me.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){const t={name:"Sleipnir"},n=me.getFirstMatch(rn,e)||me.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=me.getFirstMatch(rn,e)||me.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){const t={name:"WeChat"},n=me.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||me.getFirstMatch(rn,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=me.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){const t={name:"Internet Explorer"},n=me.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){const t={name:"Microsoft Edge"},n=me.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=me.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){const t={name:"Vivaldi"},n=me.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){const t={name:"SeaMonkey"},n=me.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){const t={name:"Sailfish"},n=me.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=me.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){const t={name:"PhantomJS"},n=me.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){const t={name:"SlimerJS"},n=me.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=me.getFirstMatch(rn,e)||me.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=me.getFirstMatch(rn,e)||me.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=me.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){const t={name:"Tizen"},n=me.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){const t={name:"QupZilla"},n=me.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){const t={name:"Firefox"},n=me.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=me.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){const t={name:"Miui"},n=me.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){const t={name:"Chromium"},n=me.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){const t={name:"Chrome"},n=me.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=me.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=me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){const t={name:"PlayStation 4"},n=me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){const t={name:"Safari"},n=me.getFirstMatch(rn,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){const t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,s=e.search("\\(")!==-1?n:t;return{name:me.getFirstMatch(s,e),version:me.getSecondMatch(s,e)}}}],MY=[{test:[/Roku\/DVP/],describe(e){const t=me.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Lr.Roku,version:t}}},{test:[/windows phone/i],describe(e){const t=me.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Lr.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){const t=me.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=me.getWindowsVersionName(t);return{name:Lr.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){const t={name:Lr.iOS},n=me.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){const t=me.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=me.getMacOSVersionName(t),r={name:Lr.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){const t=me.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Lr.iOS,version:t}}},{test(e){const t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){const t=me.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=me.getAndroidVersionName(t),r={name:Lr.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){const t=me.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Lr.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){const t=me.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||me.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||me.getFirstMatch(/\bbb(\d+)/i,e);return{name:Lr.BlackBerry,version:t}}},{test:[/bada/i],describe(e){const t=me.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Lr.Bada,version:t}}},{test:[/tizen/i],describe(e){const t=me.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Lr.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Lr.Linux}}},{test:[/CrOS/],describe(){return{name:Lr.ChromeOS}}},{test:[/PlayStation 4/],describe(e){const t=me.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Lr.PlayStation4,version:t}}}],FY=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){const t=me.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Nn.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Nn.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Nn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Nn.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Nn.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Nn.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Nn.tablet}}},{test(e){const t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){const t=me.getFirstMatch(/(ipod|iphone)/i,e);return{type:Nn.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Nn.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Nn.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Nn.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Nn.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Nn.mobile,vendor:"Microsoft"}}},{test(e){const t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Nn.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Nn.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Nn.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Nn.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Nn.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Nn.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Nn.tv}}}],zY=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Di.Blink};const n=me.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Di.EdgeHTML,version:n}}},{test:[/trident/i],describe(e){const t={name:Di.Trident},n=me.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){const t={name:Di.Presto},n=me.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:Di.Gecko},n=me.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Di.Blink}}},{test:[/(apple)?webkit/i],describe(e){const t={name:Di.WebKit},n=me.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];class QC{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=me.find(LY,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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=me.find(MY,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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=me.find(FY,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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=me.find(zY,n=>{if(typeof n.test=="function")return n.test(this);if(n.test instanceof Array)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 me.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=me.find(o,u=>this.isOS(u));if(c){const u=this.satisfies(n[c]);if(u!==void 0)return u}const l=me.find(o,u=>this.isPlatform(u));if(l){const u=this.satisfies(n[l]);if(u!==void 0)return u}}if(i>0){const o=Object.keys(s),c=me.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=me.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(me.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))}}/*!
1570
+ * Bowser - a browser detector
1571
+ * https://github.com/lancedikson/bowser
1572
+ * MIT License | (c) Dustin Diaz 2012-2015
1573
+ * MIT License | (c) Denis Demchenko 2015-2019
1574
+ */class cw{static getParser(t,n=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new QC(t,n)}static parse(t){return new QC(t).getResult()}static get BROWSER_MAP(){return ow}static get ENGINE_MAP(){return Di}static get OS_MAP(){return Lr}static get PLATFORMS_MAP(){return Nn}}const UY=({serviceId:e,clientVersion:t})=>async n=>{var a,o,c,l,u,f;const r=typeof window<"u"&&((a=window==null?void 0:window.navigator)!=null&&a.userAgent)?cw.parse(window.navigator.userAgent):void 0,s=[["aws-sdk-js",t],["ua","2.1"],[`os/${((o=r==null?void 0:r.os)==null?void 0:o.name)||"other"}`,(c=r==null?void 0:r.os)==null?void 0:c.version],["lang/js"],["md/browser",`${((l=r==null?void 0:r.browser)==null?void 0:l.name)??"unknown"}_${((u=r==null?void 0:r.browser)==null?void 0:u.version)??"unknown"}`]];e&&s.push([`api/${e}`,t]);const i=await((f=n==null?void 0:n.userAgentAppId)==null?void 0:f.call(n));return i&&s.push([`app/${i}`]),s};class Yl{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&&ZC(n),new Yl(n)}valueOf(){const t=this.bytes.slice(0),n=t[0]&128;return n&&ZC(t),parseInt(Gr(t),16)*(n?-1:1)}toString(){return String(this.valueOf())}}function ZC(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}class $Y{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 u=new Uint8Array(9);return u[0]=8,u.set(Yl.fromNumber(t.value.valueOf()).bytes,1),u;case"uuid":if(!XY.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);const f=new Uint8Array(17);return f[0]=9,f.set(m_(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:ex,value:!0};break;case 1:n[i]={type:ex,value:!1};break;case 2:n[i]={type:HY,value:t.getInt8(r++)};break;case 3:n[i]={type:qY,value:t.getInt16(r,!1)},r+=2;break;case 4:n[i]={type:jY,value:t.getInt32(r,!1)},r+=4;break;case 5:n[i]={type:WY,value:new Yl(new Uint8Array(t.buffer,t.byteOffset+r,8))},r+=8;break;case 6:const a=t.getUint16(r,!1);r+=2,n[i]={type:GY,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:VY,value:this.toUtf8(new Uint8Array(t.buffer,t.byteOffset+r,o))},r+=o;break;case 8:n[i]={type:KY,value:new Date(new Yl(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:YY,value:`${Gr(c.subarray(0,4))}-${Gr(c.subarray(4,6))}-${Gr(c.subarray(6,8))}-${Gr(c.subarray(8,10))}-${Gr(c.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return n}}var JC;(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"})(JC||(JC={}));const ex="boolean",HY="byte",qY="short",jY="integer",WY="long",GY="binary",VY="string",KY="timestamp",YY="uuid",XY=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,lw=4,Li=lw*2,ma=4,QY=Li+ma*2;function ZY({byteLength:e,byteOffset:t,buffer:n}){if(e<QY)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(lw,!1),a=r.getUint32(Li,!1),o=r.getUint32(e-ma,!1),c=new Af().update(new Uint8Array(n,t,Li));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+Li,e-(Li+ma))),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+Li+ma,i),body:new Uint8Array(n,t+Li+ma+i,s-i-(Li+ma+ma))}}class JY{constructor(t,n){this.headerMarshaller=new $Y(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 Af;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}=ZY(t);return{headers:this.headerMarshaller.parse(n),body:r}}formatHeaders(t){return this.headerMarshaller.format(t)}}class eX{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 tX{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 nX{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 rX{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 sX(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 u=c.length;let f=0;for(;f<u;){if(!r){const h=u-f;s||(s=new Uint8Array(4));const b=Math.min(4-n,h);if(s.set(c.slice(f,f+b),n),n+=b,f+=b,n<4)break;i(new DataView(s.buffer).getUint32(0,!1)),s=null}const m=Math.min(t-n,u-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 iX(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 aX=class{constructor({utf8Encoder:t,utf8Decoder:n}){this.eventStreamCodec=new JY(t,n),this.utfEncoder=t}deserialize(t,n){const r=sX(t);return new nX({messageStream:new eX({inputStream:r,decoder:this.eventStreamCodec}),deserializer:iX(n,this.utfEncoder)})}serialize(t,n){return new tX({messageStream:new rX({inputStream:t,serializer:n}),encoder:this.eventStreamCodec,includeEndFrame:!0})}};const oX=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()}}}),cX=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 lX{constructor({utf8Encoder:t,utf8Decoder:n}){this.universalMarshaller=new aX({utf8Decoder:n,utf8Encoder:t})}deserialize(t,n){const r=uX(t)?oX(t):t;return this.universalMarshaller.deserialize(r,n)}serialize(t,n){const r=this.universalMarshaller.serialize(t,n);return typeof ReadableStream=="function"?cX(r):r}}const uX=e=>typeof ReadableStream=="function"&&e instanceof ReadableStream,dX=e=>new lX(e);async function fX(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 hX=async function(t,n){const r=new t;return await fX(n,s=>{r.update(s)}),r.digest()},mX=e=>()=>Promise.reject(e),Ni=64,bX=16,gX=[1732584193,4023233417,2562383102,271733878];class pX{constructor(){this.reset()}update(t){if(yX(t))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const n=EX(t);let r=0,{byteLength:s}=n;for(this.bytesHashed+=s;s>0;)this.buffer.setUint8(this.bufferLength++,n[r++]),s--,this.bufferLength===Ni&&(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%Ni>=Ni-8){for(let a=this.bufferLength;a<Ni;a++)n.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(let a=this.bufferLength;a<Ni-8;a++)n.setUint8(a,0);n.setUint32(Ni-8,i>>>0,!0),n.setUint32(Ni-4,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}const t=new DataView(new ArrayBuffer(bX));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=xr(r,s,i,a,t.getUint32(0,!0),7,3614090360),a=xr(a,r,s,i,t.getUint32(4,!0),12,3905402710),i=xr(i,a,r,s,t.getUint32(8,!0),17,606105819),s=xr(s,i,a,r,t.getUint32(12,!0),22,3250441966),r=xr(r,s,i,a,t.getUint32(16,!0),7,4118548399),a=xr(a,r,s,i,t.getUint32(20,!0),12,1200080426),i=xr(i,a,r,s,t.getUint32(24,!0),17,2821735955),s=xr(s,i,a,r,t.getUint32(28,!0),22,4249261313),r=xr(r,s,i,a,t.getUint32(32,!0),7,1770035416),a=xr(a,r,s,i,t.getUint32(36,!0),12,2336552879),i=xr(i,a,r,s,t.getUint32(40,!0),17,4294925233),s=xr(s,i,a,r,t.getUint32(44,!0),22,2304563134),r=xr(r,s,i,a,t.getUint32(48,!0),7,1804603682),a=xr(a,r,s,i,t.getUint32(52,!0),12,4254626195),i=xr(i,a,r,s,t.getUint32(56,!0),17,2792965006),s=xr(s,i,a,r,t.getUint32(60,!0),22,1236535329),r=vr(r,s,i,a,t.getUint32(4,!0),5,4129170786),a=vr(a,r,s,i,t.getUint32(24,!0),9,3225465664),i=vr(i,a,r,s,t.getUint32(44,!0),14,643717713),s=vr(s,i,a,r,t.getUint32(0,!0),20,3921069994),r=vr(r,s,i,a,t.getUint32(20,!0),5,3593408605),a=vr(a,r,s,i,t.getUint32(40,!0),9,38016083),i=vr(i,a,r,s,t.getUint32(60,!0),14,3634488961),s=vr(s,i,a,r,t.getUint32(16,!0),20,3889429448),r=vr(r,s,i,a,t.getUint32(36,!0),5,568446438),a=vr(a,r,s,i,t.getUint32(56,!0),9,3275163606),i=vr(i,a,r,s,t.getUint32(12,!0),14,4107603335),s=vr(s,i,a,r,t.getUint32(32,!0),20,1163531501),r=vr(r,s,i,a,t.getUint32(52,!0),5,2850285829),a=vr(a,r,s,i,t.getUint32(8,!0),9,4243563512),i=vr(i,a,r,s,t.getUint32(28,!0),14,1735328473),s=vr(s,i,a,r,t.getUint32(48,!0),20,2368359562),r=_r(r,s,i,a,t.getUint32(20,!0),4,4294588738),a=_r(a,r,s,i,t.getUint32(32,!0),11,2272392833),i=_r(i,a,r,s,t.getUint32(44,!0),16,1839030562),s=_r(s,i,a,r,t.getUint32(56,!0),23,4259657740),r=_r(r,s,i,a,t.getUint32(4,!0),4,2763975236),a=_r(a,r,s,i,t.getUint32(16,!0),11,1272893353),i=_r(i,a,r,s,t.getUint32(28,!0),16,4139469664),s=_r(s,i,a,r,t.getUint32(40,!0),23,3200236656),r=_r(r,s,i,a,t.getUint32(52,!0),4,681279174),a=_r(a,r,s,i,t.getUint32(0,!0),11,3936430074),i=_r(i,a,r,s,t.getUint32(12,!0),16,3572445317),s=_r(s,i,a,r,t.getUint32(24,!0),23,76029189),r=_r(r,s,i,a,t.getUint32(36,!0),4,3654602809),a=_r(a,r,s,i,t.getUint32(48,!0),11,3873151461),i=_r(i,a,r,s,t.getUint32(60,!0),16,530742520),s=_r(s,i,a,r,t.getUint32(8,!0),23,3299628645),r=Tr(r,s,i,a,t.getUint32(0,!0),6,4096336452),a=Tr(a,r,s,i,t.getUint32(28,!0),10,1126891415),i=Tr(i,a,r,s,t.getUint32(56,!0),15,2878612391),s=Tr(s,i,a,r,t.getUint32(20,!0),21,4237533241),r=Tr(r,s,i,a,t.getUint32(48,!0),6,1700485571),a=Tr(a,r,s,i,t.getUint32(12,!0),10,2399980690),i=Tr(i,a,r,s,t.getUint32(40,!0),15,4293915773),s=Tr(s,i,a,r,t.getUint32(4,!0),21,2240044497),r=Tr(r,s,i,a,t.getUint32(32,!0),6,1873313359),a=Tr(a,r,s,i,t.getUint32(60,!0),10,4264355552),i=Tr(i,a,r,s,t.getUint32(24,!0),15,2734768916),s=Tr(s,i,a,r,t.getUint32(52,!0),21,1309151649),r=Tr(r,s,i,a,t.getUint32(16,!0),6,4149444226),a=Tr(a,r,s,i,t.getUint32(44,!0),10,3174756917),i=Tr(i,a,r,s,t.getUint32(8,!0),15,718787259),s=Tr(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(gX),this.buffer=new DataView(new ArrayBuffer(Ni)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function Ah(e,t,n,r,s,i){return t=(t+e&4294967295)+(r+i&4294967295)&4294967295,(t<<s|t>>>32-s)+n&4294967295}function xr(e,t,n,r,s,i,a){return Ah(t&n|~t&r,e,t,s,i,a)}function vr(e,t,n,r,s,i,a){return Ah(t&r|n&~r,e,t,s,i,a)}function _r(e,t,n,r,s,i,a){return Ah(t^n^r,e,t,s,i,a)}function Tr(e,t,n,r,s,i,a){return Ah(n^(t|~r),e,t,s,i,a)}function yX(e){return typeof e=="string"?e.length===0:e.byteLength===0}function EX(e){return typeof e=="string"?io(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}const tx=typeof TextEncoder=="function"?new TextEncoder:null,CX=e=>{if(typeof e=="string"){if(tx)return tx.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}`)},xX=e=>({apiVersion:"2006-03-01",base64Decoder:(e==null?void 0:e.base64Decoder)??zg,base64Encoder:(e==null?void 0:e.base64Encoder)??uh,disableHostPrefix:(e==null?void 0:e.disableHostPrefix)??!1,endpointProvider:(e==null?void 0:e.endpointProvider)??ET,extensions:(e==null?void 0:e.extensions)??[],getAwsChunkedEncodingStream:(e==null?void 0:e.getAwsChunkedEncodingStream)??J4,httpAuthSchemeProvider:(e==null?void 0:e.httpAuthSchemeProvider)??QM,httpAuthSchemes:(e==null?void 0:e.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4"),signer:new u_},{schemeId:"aws.auth#sigv4a",identityProvider:t=>t.getIdentityProvider("aws.auth#sigv4a"),signer:new I4}],logger:(e==null?void 0:e.logger)??new jg,sdkStreamMixin:(e==null?void 0:e.sdkStreamMixin)??oD,serviceId:(e==null?void 0:e.serviceId)??"S3",signerConstructor:(e==null?void 0:e.signerConstructor)??NM,signingEscapePath:(e==null?void 0:e.signingEscapePath)??!1,urlParser:(e==null?void 0:e.urlParser)??Rf,useArnRegion:(e==null?void 0:e.useArnRegion)??!1,utf8Decoder:(e==null?void 0:e.utf8Decoder)??io,utf8Encoder:(e==null?void 0:e.utf8Encoder)??Ug}),vX=["in-region","cross-region","mobile","standard","legacy"],_X=({defaultsMode:e}={})=>pD(async()=>{const t=typeof e=="function"?await e():e;switch(t==null?void 0:t.toLowerCase()){case"auto":return Promise.resolve(TX()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(t==null?void 0:t.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${vX.join(", ")}, got ${t}`)}}),TX=()=>{var n,r;const e=typeof window<"u"&&((n=window==null?void 0:window.navigator)!=null&&n.userAgent)?cw.parse(window.navigator.userAgent):void 0,t=(r=e==null?void 0:e.platform)==null?void 0:r.type;return t==="tablet"||t==="mobile"},SX=e=>{const t=_X(e),n=()=>t().then(b5),r=xX(e);return{...r,...e,runtime:"browser",defaultsMode:t,bodyLengthChecker:(e==null?void 0:e.bodyLengthChecker)??CX,credentialDefaultProvider:(e==null?void 0:e.credentialDefaultProvider)??(s=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(e==null?void 0:e.defaultUserAgentProvider)??UY({serviceId:r.serviceId,clientVersion:yY.version}),eventStreamSerdeProvider:(e==null?void 0:e.eventStreamSerdeProvider)??dX,maxAttempts:(e==null?void 0:e.maxAttempts)??If,md5:(e==null?void 0:e.md5)??pX,region:(e==null?void 0:e.region)??mX("Region is missing"),requestHandler:$g.create((e==null?void 0:e.requestHandler)??n),retryMode:(e==null?void 0:e.retryMode)??(async()=>(await n()).retryMode||nM),sha1:(e==null?void 0:e.sha1)??SY,sha256:(e==null?void 0:e.sha256)??OY,streamCollector:(e==null?void 0:e.streamCollector)??f_,streamHasher:(e==null?void 0:e.streamHasher)??hX,useDualstackEndpoint:(e==null?void 0:e.useDualstackEndpoint)??(()=>Promise.resolve(ML)),useFipsEndpoint:(e==null?void 0:e.useFipsEndpoint)??(()=>Promise.resolve(FL))}},wX=e=>{let t=async()=>{if(e.region===void 0)throw new Error("Region is missing from runtimeConfig");const n=e.region;return typeof n=="string"?n:n()};return{setRegion(n){t=n},region(){return t}}},AX=e=>({region:e.region()}),kX=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}}},RX=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),bd=e=>e,IX=(e,t)=>{const n={...bd(wX(e)),...bd(C5(e)),...bd(E4(e)),...bd(kX(e))};return t.forEach(r=>r.configure(n)),{...e,...AX(n),...x5(n),...C4(n),...RX(n)}};class BX extends jD{constructor(...[n]){const r=SX(n||{}),s=JM(r),i=tL(s),a=i8(i),o=_M(a),c=zL(o),l=c,u=tM(l),f=UL(u),m=ZM(f),h=$8(m,{session:[()=>this,rw]}),b=IX(h,(n==null?void 0:n.extensions)||[]);super(b);ge(this,"config");this.config=b,this.middlewareStack.use(LL(this.config)),this.middlewareStack.use(IM(this.config)),this.middlewareStack.use(qL(this.config)),this.middlewareStack.use(c8(this.config)),this.middlewareStack.use(d8(this.config)),this.middlewareStack.use(g8(this.config)),this.middlewareStack.use(O4(this.config,{httpAuthSchemeParametersProvider:KM,identityProviderConfigProvider:async p=>new fD({"aws.auth#sigv4":p.credentials,"aws.auth#sigv4a":p.credentials})})),this.middlewareStack.use($4(this.config)),this.middlewareStack.use(Z8(this.config)),this.middlewareStack.use(S4(this.config)),this.middlewareStack.use(w8(this.config)),this.middlewareStack.use(D8(this.config)),this.middlewareStack.use(U8(this.config))}destroy(){super.destroy()}}class PX extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").f(void 0,void 0).ser(qF).de(Nz).build(){}function NX(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"?DX(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 OX={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Gs=e=>({applyToStack:t=>{t.add(NX(e),OX)}});function DX(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 LX extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r)]}).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").f(tF,eF).ser(jF).de(Oz).build(){}class MX extends Ce.classBuilder().ep({...we,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[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r)]}).s("AmazonS3","CopyObject",{}).n("S3Client","CopyObjectCommand").f(rF,nF).ser(WF).de(Dz).build(){}function FX(e){return t=>async n=>{const{CreateBucketConfiguration:r}=n.input,s=await e.region();return!(r!=null&&r.LocationConstraint)&&!(r!=null&&r.Location)&&(n={...n,input:{...n.input,CreateBucketConfiguration:s==="us-east-1"?void 0:{LocationConstraint:s}}}),t(n)}}const zX={step:"initialize",tags:["LOCATION_CONSTRAINT","CREATE_BUCKET_CONFIGURATION"],name:"locationConstraintMiddleware",override:!0},UX=e=>({applyToStack:t=>{t.add(FX(e),zX)}});class $X extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},DisableAccessPoints:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),UX(r)]}).s("AmazonS3","CreateBucket",{}).n("S3Client","CreateBucketCommand").f(void 0,void 0).ser(GF).de(Lz).build(){}class HX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","CreateBucketMetadataTableConfiguration",{}).n("S3Client","CreateBucketMetadataTableConfigurationCommand").f(void 0,void 0).ser(VF).de(Mz).build(){}class qX extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r)]}).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").f(iF,sF).ser(KF).de(Fz).build(){}class jX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketAnalyticsConfiguration",{}).n("S3Client","DeleteBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(QF).de($z).build(){}class WX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucket",{}).n("S3Client","DeleteBucketCommand").f(void 0,void 0).ser(XF).de(Uz).build(){}class GX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketCors",{}).n("S3Client","DeleteBucketCorsCommand").f(void 0,void 0).ser(ZF).de(Hz).build(){}class VX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketEncryption",{}).n("S3Client","DeleteBucketEncryptionCommand").f(void 0,void 0).ser(JF).de(qz).build(){}class KX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketIntelligentTieringConfiguration",{}).n("S3Client","DeleteBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(e9).de(jz).build(){}class YX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketInventoryConfiguration",{}).n("S3Client","DeleteBucketInventoryConfigurationCommand").f(void 0,void 0).ser(t9).de(Wz).build(){}class XX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketLifecycle",{}).n("S3Client","DeleteBucketLifecycleCommand").f(void 0,void 0).ser(n9).de(Gz).build(){}class QX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketMetadataTableConfiguration",{}).n("S3Client","DeleteBucketMetadataTableConfigurationCommand").f(void 0,void 0).ser(r9).de(Vz).build(){}class ZX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketMetricsConfiguration",{}).n("S3Client","DeleteBucketMetricsConfigurationCommand").f(void 0,void 0).ser(s9).de(Kz).build(){}class JX extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketOwnershipControls",{}).n("S3Client","DeleteBucketOwnershipControlsCommand").f(void 0,void 0).ser(i9).de(Yz).build(){}class eQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketPolicy",{}).n("S3Client","DeleteBucketPolicyCommand").f(void 0,void 0).ser(a9).de(Xz).build(){}class tQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketReplication",{}).n("S3Client","DeleteBucketReplicationCommand").f(void 0,void 0).ser(o9).de(Qz).build(){}class nQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketTagging",{}).n("S3Client","DeleteBucketTaggingCommand").f(void 0,void 0).ser(c9).de(Zz).build(){}class rQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeleteBucketWebsite",{}).n("S3Client","DeleteBucketWebsiteCommand").f(void 0,void 0).ser(l9).de(Jz).build(){}class sQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").f(void 0,void 0).ser(u9).de(e7).build(){}class iQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Ze(r)]}).s("AmazonS3","DeleteObjects",{}).n("S3Client","DeleteObjectsCommand").f(void 0,void 0).ser(d9).de(t7).build(){}class aQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","DeleteObjectTagging",{}).n("S3Client","DeleteObjectTaggingCommand").f(void 0,void 0).ser(f9).de(n7).build(){}class oQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","DeletePublicAccessBlock",{}).n("S3Client","DeletePublicAccessBlockCommand").f(void 0,void 0).ser(h9).de(r7).build(){}class cQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketAccelerateConfiguration",{}).n("S3Client","GetBucketAccelerateConfigurationCommand").f(void 0,void 0).ser(m9).de(s7).build(){}class lQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketAcl",{}).n("S3Client","GetBucketAclCommand").f(void 0,void 0).ser(b9).de(i7).build(){}class uQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketAnalyticsConfiguration",{}).n("S3Client","GetBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(g9).de(a7).build(){}class dQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketCors",{}).n("S3Client","GetBucketCorsCommand").f(void 0,void 0).ser(p9).de(o7).build(){}class fQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketEncryption",{}).n("S3Client","GetBucketEncryptionCommand").f(void 0,dF).ser(y9).de(c7).build(){}class hQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketIntelligentTieringConfiguration",{}).n("S3Client","GetBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(E9).de(l7).build(){}class mQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketInventoryConfiguration",{}).n("S3Client","GetBucketInventoryConfigurationCommand").f(void 0,gF).ser(C9).de(u7).build(){}class bQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketLifecycleConfiguration",{}).n("S3Client","GetBucketLifecycleConfigurationCommand").f(void 0,void 0).ser(x9).de(d7).build(){}class gQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketLocation",{}).n("S3Client","GetBucketLocationCommand").f(void 0,void 0).ser(v9).de(f7).build(){}class pQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketLogging",{}).n("S3Client","GetBucketLoggingCommand").f(void 0,void 0).ser(_9).de(h7).build(){}class yQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketMetadataTableConfiguration",{}).n("S3Client","GetBucketMetadataTableConfigurationCommand").f(void 0,void 0).ser(T9).de(m7).build(){}class EQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketMetricsConfiguration",{}).n("S3Client","GetBucketMetricsConfigurationCommand").f(void 0,void 0).ser(S9).de(b7).build(){}class CQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketNotificationConfiguration",{}).n("S3Client","GetBucketNotificationConfigurationCommand").f(void 0,void 0).ser(w9).de(g7).build(){}class xQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketOwnershipControls",{}).n("S3Client","GetBucketOwnershipControlsCommand").f(void 0,void 0).ser(A9).de(p7).build(){}class vQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketPolicy",{}).n("S3Client","GetBucketPolicyCommand").f(void 0,void 0).ser(k9).de(y7).build(){}class _Q extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketPolicyStatus",{}).n("S3Client","GetBucketPolicyStatusCommand").f(void 0,void 0).ser(R9).de(E7).build(){}class TQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketReplication",{}).n("S3Client","GetBucketReplicationCommand").f(void 0,void 0).ser(I9).de(C7).build(){}class SQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketRequestPayment",{}).n("S3Client","GetBucketRequestPaymentCommand").f(void 0,void 0).ser(B9).de(x7).build(){}class wQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketTagging",{}).n("S3Client","GetBucketTaggingCommand").f(void 0,void 0).ser(P9).de(v7).build(){}class AQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketVersioning",{}).n("S3Client","GetBucketVersioningCommand").f(void 0,void 0).ser(N9).de(_7).build(){}class kQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetBucketWebsite",{}).n("S3Client","GetBucketWebsiteCommand").f(void 0,void 0).ser(O9).de(T7).build(){}class RQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetObjectAcl",{}).n("S3Client","GetObjectAclCommand").f(void 0,void 0).ser(L9).de(w7).build(){}class IQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r)]}).s("AmazonS3","GetObjectAttributes",{}).n("S3Client","GetObjectAttributesCommand").f(EF,void 0).ser(M9).de(A7).build(){}class BQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),Gs(r),M_()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(yF,pF).ser(D9).de(S7).build(){}class PQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetObjectLegalHold",{}).n("S3Client","GetObjectLegalHoldCommand").f(void 0,void 0).ser(F9).de(k7).build(){}class NQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetObjectLockConfiguration",{}).n("S3Client","GetObjectLockConfigurationCommand").f(void 0,void 0).ser(z9).de(R7).build(){}class OQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetObjectRetention",{}).n("S3Client","GetObjectRetentionCommand").f(void 0,void 0).ser(U9).de(I7).build(){}class DQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetObjectTagging",{}).n("S3Client","GetObjectTaggingCommand").f(void 0,void 0).ser($9).de(B7).build(){}class LQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","GetObjectTorrent",{}).n("S3Client","GetObjectTorrentCommand").f(void 0,CF).ser(H9).de(P7).build(){}class MQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","GetPublicAccessBlock",{}).n("S3Client","GetPublicAccessBlockCommand").f(void 0,void 0).ser(q9).de(N7).build(){}class FQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","HeadBucket",{}).n("S3Client","HeadBucketCommand").f(void 0,void 0).ser(j9).de(O7).build(){}class zQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r),M_()]}).s("AmazonS3","HeadObject",{}).n("S3Client","HeadObjectCommand").f(vF,xF).ser(W9).de(D7).build(){}class UQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListBucketAnalyticsConfigurations",{}).n("S3Client","ListBucketAnalyticsConfigurationsCommand").f(void 0,void 0).ser(G9).de(L7).build(){}class $Q extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListBucketIntelligentTieringConfigurations",{}).n("S3Client","ListBucketIntelligentTieringConfigurationsCommand").f(void 0,void 0).ser(V9).de(M7).build(){}class HQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListBucketInventoryConfigurations",{}).n("S3Client","ListBucketInventoryConfigurationsCommand").f(void 0,_F).ser(K9).de(F7).build(){}class qQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListBucketMetricsConfigurations",{}).n("S3Client","ListBucketMetricsConfigurationsCommand").f(void 0,void 0).ser(Y9).de(z7).build(){}class jQ extends Ce.classBuilder().ep(we).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").f(void 0,void 0).ser(X9).de(U7).build(){}class WQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListDirectoryBuckets",{}).n("S3Client","ListDirectoryBucketsCommand").f(void 0,void 0).ser(Q9).de($7).build(){}class GQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListMultipartUploads",{}).n("S3Client","ListMultipartUploadsCommand").f(void 0,void 0).ser(Z9).de(H7).build(){}class VQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListObjects",{}).n("S3Client","ListObjectsCommand").f(void 0,void 0).ser(J9).de(q7).build(){}class KQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(ez).de(j7).build(){}class YQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r)]}).s("AmazonS3","ListObjectVersions",{}).n("S3Client","ListObjectVersionsCommand").f(void 0,void 0).ser(tz).de(W7).build(){}class XQ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r)]}).s("AmazonS3","ListParts",{}).n("S3Client","ListPartsCommand").f(TF,void 0).ser(nz).de(G7).build(){}class QQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1})]}).s("AmazonS3","PutBucketAccelerateConfiguration",{}).n("S3Client","PutBucketAccelerateConfigurationCommand").f(void 0,void 0).ser(rz).de(V7).build(){}class ZQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketAcl",{}).n("S3Client","PutBucketAclCommand").f(void 0,void 0).ser(sz).de(K7).build(){}class JQ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketAnalyticsConfiguration",{}).n("S3Client","PutBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(iz).de(Y7).build(){}class eZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketCors",{}).n("S3Client","PutBucketCorsCommand").f(void 0,void 0).ser(az).de(X7).build(){}class tZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketEncryption",{}).n("S3Client","PutBucketEncryptionCommand").f(AF,void 0).ser(oz).de(Q7).build(){}class nZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketIntelligentTieringConfiguration",{}).n("S3Client","PutBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(cz).de(Z7).build(){}class rZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketInventoryConfiguration",{}).n("S3Client","PutBucketInventoryConfigurationCommand").f(kF,void 0).ser(lz).de(J7).build(){}class sZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Ze(r)]}).s("AmazonS3","PutBucketLifecycleConfiguration",{}).n("S3Client","PutBucketLifecycleConfigurationCommand").f(void 0,void 0).ser(uz).de(eU).build(){}class iZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketLogging",{}).n("S3Client","PutBucketLoggingCommand").f(void 0,void 0).ser(dz).de(tU).build(){}class aZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketMetricsConfiguration",{}).n("S3Client","PutBucketMetricsConfigurationCommand").f(void 0,void 0).ser(fz).de(nU).build(){}class oZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","PutBucketNotificationConfiguration",{}).n("S3Client","PutBucketNotificationConfigurationCommand").f(void 0,void 0).ser(hz).de(rU).build(){}class cZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketOwnershipControls",{}).n("S3Client","PutBucketOwnershipControlsCommand").f(void 0,void 0).ser(mz).de(sU).build(){}class lZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketPolicy",{}).n("S3Client","PutBucketPolicyCommand").f(void 0,void 0).ser(bz).de(iU).build(){}class uZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketReplication",{}).n("S3Client","PutBucketReplicationCommand").f(void 0,void 0).ser(gz).de(aU).build(){}class dZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketRequestPayment",{}).n("S3Client","PutBucketRequestPaymentCommand").f(void 0,void 0).ser(pz).de(oU).build(){}class fZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketTagging",{}).n("S3Client","PutBucketTaggingCommand").f(void 0,void 0).ser(yz).de(cU).build(){}class hZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketVersioning",{}).n("S3Client","PutBucketVersioningCommand").f(void 0,void 0).ser(Ez).de(lU).build(){}class mZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutBucketWebsite",{}).n("S3Client","PutBucketWebsiteCommand").f(void 0,void 0).ser(Cz).de(uU).build(){}class bZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Ze(r)]}).s("AmazonS3","PutObjectAcl",{}).n("S3Client","PutObjectAclCommand").f(void 0,void 0).ser(vz).de(fU).build(){}class gZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),x8(),Ze(r),Gs(r)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(IF,RF).ser(xz).de(dU).build(){}class pZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Ze(r)]}).s("AmazonS3","PutObjectLegalHold",{}).n("S3Client","PutObjectLegalHoldCommand").f(void 0,void 0).ser(_z).de(hU).build(){}class yZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Ze(r)]}).s("AmazonS3","PutObjectLockConfiguration",{}).n("S3Client","PutObjectLockConfigurationCommand").f(void 0,void 0).ser(Tz).de(mU).build(){}class EZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Ze(r)]}).s("AmazonS3","PutObjectRetention",{}).n("S3Client","PutObjectRetentionCommand").f(void 0,void 0).ser(Sz).de(bU).build(){}class CZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0}),Ze(r)]}).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").f(void 0,void 0).ser(wz).de(gU).build(){}class xZ extends Ce.classBuilder().ep({...we,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!0})]}).s("AmazonS3","PutPublicAccessBlock",{}).n("S3Client","PutPublicAccessBlockCommand").f(void 0,void 0).ser(Az).de(pU).build(){}class vZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Ze(r)]}).s("AmazonS3","RestoreObject",{}).n("S3Client","RestoreObjectCommand").f(DF,void 0).ser(kz).de(yU).build(){}class _Z extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r)]}).s("AmazonS3","SelectObjectContent",{eventStream:{output:!0}}).n("S3Client","SelectObjectContentCommand").f(MF,LF).ser(Rz).de(EU).build(){}class TZ extends Ce.classBuilder().ep({...we,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Cn(r,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),Ze(r),Gs(r)]}).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").f(zF,FF).ser(Iz).de(CU).build(){}class SZ extends Ce.classBuilder().ep({...we,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions()),Ze(r),Gs(r)]}).s("AmazonS3","UploadPartCopy",{}).n("S3Client","UploadPartCopyCommand").f($F,UF).ser(Bz).de(xU).build(){}class wZ extends Ce.classBuilder().ep({...we,UseObjectLambdaEndpoint:{type:"staticContextParams",value:!0}}).m(function(t,n,r,s){return[_e(r,this.serialize,this.deserialize),Se(r,t.getEndpointParameterInstructions())]}).s("AmazonS3","WriteGetObjectResponse",{}).n("S3Client","WriteGetObjectResponseCommand").f(HF,void 0).ser(Pz).de(vU).build(){}const AZ={AbortMultipartUploadCommand:PX,CompleteMultipartUploadCommand:LX,CopyObjectCommand:MX,CreateBucketCommand:$X,CreateBucketMetadataTableConfigurationCommand:HX,CreateMultipartUploadCommand:qX,CreateSessionCommand:rw,DeleteBucketCommand:WX,DeleteBucketAnalyticsConfigurationCommand:jX,DeleteBucketCorsCommand:GX,DeleteBucketEncryptionCommand:VX,DeleteBucketIntelligentTieringConfigurationCommand:KX,DeleteBucketInventoryConfigurationCommand:YX,DeleteBucketLifecycleCommand:XX,DeleteBucketMetadataTableConfigurationCommand:QX,DeleteBucketMetricsConfigurationCommand:ZX,DeleteBucketOwnershipControlsCommand:JX,DeleteBucketPolicyCommand:eQ,DeleteBucketReplicationCommand:tQ,DeleteBucketTaggingCommand:nQ,DeleteBucketWebsiteCommand:rQ,DeleteObjectCommand:sQ,DeleteObjectsCommand:iQ,DeleteObjectTaggingCommand:aQ,DeletePublicAccessBlockCommand:oQ,GetBucketAccelerateConfigurationCommand:cQ,GetBucketAclCommand:lQ,GetBucketAnalyticsConfigurationCommand:uQ,GetBucketCorsCommand:dQ,GetBucketEncryptionCommand:fQ,GetBucketIntelligentTieringConfigurationCommand:hQ,GetBucketInventoryConfigurationCommand:mQ,GetBucketLifecycleConfigurationCommand:bQ,GetBucketLocationCommand:gQ,GetBucketLoggingCommand:pQ,GetBucketMetadataTableConfigurationCommand:yQ,GetBucketMetricsConfigurationCommand:EQ,GetBucketNotificationConfigurationCommand:CQ,GetBucketOwnershipControlsCommand:xQ,GetBucketPolicyCommand:vQ,GetBucketPolicyStatusCommand:_Q,GetBucketReplicationCommand:TQ,GetBucketRequestPaymentCommand:SQ,GetBucketTaggingCommand:wQ,GetBucketVersioningCommand:AQ,GetBucketWebsiteCommand:kQ,GetObjectCommand:BQ,GetObjectAclCommand:RQ,GetObjectAttributesCommand:IQ,GetObjectLegalHoldCommand:PQ,GetObjectLockConfigurationCommand:NQ,GetObjectRetentionCommand:OQ,GetObjectTaggingCommand:DQ,GetObjectTorrentCommand:LQ,GetPublicAccessBlockCommand:MQ,HeadBucketCommand:FQ,HeadObjectCommand:zQ,ListBucketAnalyticsConfigurationsCommand:UQ,ListBucketIntelligentTieringConfigurationsCommand:$Q,ListBucketInventoryConfigurationsCommand:HQ,ListBucketMetricsConfigurationsCommand:qQ,ListBucketsCommand:jQ,ListDirectoryBucketsCommand:WQ,ListMultipartUploadsCommand:GQ,ListObjectsCommand:VQ,ListObjectsV2Command:KQ,ListObjectVersionsCommand:YQ,ListPartsCommand:XQ,PutBucketAccelerateConfigurationCommand:QQ,PutBucketAclCommand:ZQ,PutBucketAnalyticsConfigurationCommand:JQ,PutBucketCorsCommand:eZ,PutBucketEncryptionCommand:tZ,PutBucketIntelligentTieringConfigurationCommand:nZ,PutBucketInventoryConfigurationCommand:rZ,PutBucketLifecycleConfigurationCommand:sZ,PutBucketLoggingCommand:iZ,PutBucketMetricsConfigurationCommand:aZ,PutBucketNotificationConfigurationCommand:oZ,PutBucketOwnershipControlsCommand:cZ,PutBucketPolicyCommand:lZ,PutBucketReplicationCommand:uZ,PutBucketRequestPaymentCommand:dZ,PutBucketTaggingCommand:fZ,PutBucketVersioningCommand:hZ,PutBucketWebsiteCommand:mZ,PutObjectCommand:gZ,PutObjectAclCommand:bZ,PutObjectLegalHoldCommand:pZ,PutObjectLockConfigurationCommand:yZ,PutObjectRetentionCommand:EZ,PutObjectTaggingCommand:CZ,PutPublicAccessBlockCommand:xZ,RestoreObjectCommand:vZ,SelectObjectContentCommand:_Z,UploadPartCommand:TZ,UploadPartCopyCommand:SZ,WriteGetObjectResponseCommand:wZ};class uw extends BX{}GD(AZ,uw);const kZ={build:async function([e,t,n],r){const s=await r(e,t,{...n,onFileTree:async i=>{n!=null&&n.onFileTree&&await n.onFileTree(i);for await(const[a,o]of RZ(i,e))t.log(`上传: ${a} ${o}`)}});return t.log("s3 上传完毕"),s}},RZ=async function*(e,t){const n=new uw({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]}};async function IZ(e,t){var s,i,a;let n="";if(t!=null&&t.siyuanPrefix)n=t.siyuanPrefix;else for(let o=0;o<e.level;o++)n+="../";const r="2.10.5";return`<!DOCTYPE html>
1575
+ <html lang="zh_CN" data-theme-mode="light" data-light-theme="daylight" data-dark-theme="midnight">
1576
+ <head>
1577
+ ${((s=t==null?void 0:t.embedCode)==null?void 0:s.head)??""}
1578
+ <meta charset="utf-8" />
1579
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
1580
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
1581
+ <meta name="apple-mobile-web-app-capable" content="yes" />
1582
+ <meta name="mobile-web-app-capable" content="yes" />
1583
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
1584
+ <link rel="stylesheet" type="text/css" id="baseStyle" href="${n}stage/build/export/base.css?${r}"/>
1585
+ <script>
1586
+ function isNightTime() {
1587
+ const currentHour = new Date().getHours();
1588
+ return currentHour >= 18 || currentHour < 6;
1589
+ }
1590
+ document.write('<link rel="stylesheet" type="text/css" id="themeDefaultStyle" href="${n}appearance/themes/'+(isNightTime()?'midnight':'daylight')+'/theme.css?${r}"/>');
1591
+ <\/script>
1592
+ <link rel="stylesheet" type="text/css" href="${n}appearance/oceanpress.css"/>
1593
+ <title>${e.title}</title>
1594
+ </head>
1595
+ <body>
1596
+ ${((i=t==null?void 0:t.embedCode)==null?void 0:i.beforeBody)??""}
1597
+ <div class="protyle-wysiwyg protyle-wysiwyg--attr" id="preview">
1598
+ ${e.htmlContent}
1599
+ </div>
1600
+ <script src="${n}appearance/icons/material/icon.js?${r}"><\/script>
1601
+ <script src="${n}stage/build/export/protyle-method.js?${r}"><\/script>
1602
+ <script src="${n}stage/protyle/js/lute/lute.min.js?${r}"><\/script>
1603
+ <script>
1604
+ window.siyuan = {
1605
+ config: {
1606
+ appearance: {
1607
+ mode: isNightTime()?1:0,//主题 明亮=0 暗黑=1
1608
+ codeBlockThemeDark: "base16/dracula",
1609
+ codeBlockThemeLight: "github",
1610
+ },
1611
+ editor: {
1612
+ codeLineWrap: true,
1613
+ codeLigatures: false,
1614
+ plantUMLServePath: "https://www.plantuml.com/plantuml/svg/~1",
1615
+ codeSyntaxHighlightLineNum: true,
1616
+ katexMacros: JSON.stringify({}),
1617
+ },
1618
+ },
1619
+ languages: { copy: "复制" },
1620
+ };
1621
+ const cdn = "${n}stage/protyle";
1622
+ const previewElement = document.getElementById("preview");
1623
+
1624
+ Protyle.highlightRender(previewElement, cdn);
1625
+ Protyle.mathRender(previewElement, cdn, false);
1626
+ Protyle.mermaidRender(previewElement, cdn);
1627
+ Protyle.flowchartRender(previewElement, cdn);
1628
+ Protyle.graphvizRender(previewElement, cdn);
1629
+ Protyle.chartRender(previewElement, cdn);
1630
+ Protyle.mindmapRender(previewElement, cdn);
1631
+ Protyle.abcRender(previewElement, cdn);
1632
+ Protyle.htmlRender(previewElement);
1633
+ Protyle.plantumlRender(previewElement, cdn);
1634
+ document.querySelectorAll(".protyle-action__copy").forEach((item) => {
1635
+ item.addEventListener("click", (event) => {
1636
+ navigator.clipboard.writeText(
1637
+ item.parentElement.nextElementSibling.textContent.trimEnd(),
1638
+ );
1639
+ event.preventDefault();
1640
+ event.stopPropagation();
1641
+ });
1642
+ });
1643
+ <\/script>
1644
+ ${((a=t==null?void 0:t.embedCode)==null?void 0:a.afterBody)??""}
1645
+ </body>
1646
+ </html>`}function BZ(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos")}function nx(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)))}async function Ls(e,t=fw()){var r,s;if(e===void 0)return"";const n={...t,nodeStack:[...t.nodeStack]};if(t.nodeStack.find(i=>i.ID&&e.ID&&i.ID===e.ID))return Xl("循环引用",[...t.nodeStack,e].map(i=>i.ID));if(n[e.Type]===void 0)return Xl(`没有找到对应的渲染方法 ${e.Type} ${(r=n.nodeStack[0].Properties)==null?void 0:r.title}`);{if(n.nodeStack.push(e),e.ID&&((s=t.nodeStack[0])!=null&&s.ID)){const a=await Uo.getDocByChildID(e.ID),o=t.nodeStack[0];(a==null?void 0:a.ID)!==void 0&&a.ID!==o.ID&&o.ID&&n.refs.add(a.ID)}const i=await n[e.Type](e);return n.nodeStack.pop(),i}}function Xl(e,...t){return Ol(e,...t),`<div class="ft__smaller ft__secondary b3-form__space--small">${e}</div>`}function dw(e){var n,r;const t=atob(e.CodeBlockInfo??((r=(n=e.Children)==null?void 0:n.find(s=>s.Type==="NodeCodeBlockFenceInfoMarker"))==null?void 0:r.CodeBlockInfo)??"");return[["mindmap","mermaid","echarts","abc","graphviz","flowchart","plantuml"].includes(t),t]}const gd=String.raw;async function gs(e,t){let n="";for await(const r of(e==null?void 0:e.Children)??[])n+=await Ls(r,t);return n}function Vn(e,t={}){var s,i,a,o,c;(t==null?void 0:t.subtype_class)===void 0&&(t.subtype_class=(()=>{var u,f;const l=((u=e.ListData)==null?void 0:u.Typ)===1?"o":((f=e.ListData)==null?void 0:f.Typ)===3?"t":"u";if(e.Type==="NodeDocument")return"h1";if(e.Type==="NodeHeading")return`h${e.HeadingLevel}`;if(e.Type==="NodeList")return[l,"list"];if(e.Type==="NodeListItem")return[l,"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[m,h]=dw(e);return m?[h,"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(l,u){n[l]=u}return e.ID&&(r("id",e.ID),r("data-node-id",e.ID)),(e==null?void 0:e.TextMarkType)==="tag"?r("data-type",e.TextMarkType??""):r("data-type",(t==null?void 0:t.data_type)??e.Type),(s=e.Properties)!=null&&s.updated&&r("updated",e.Properties.updated),t!=null&&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(([l,u])=>r(l,u)),(i=e.ListData)!=null&&i.Marker&&r("data-marker",atob(e.ListData.Marker)),((a=e.ListData)==null?void 0:a.Typ)===3&&((c=(o=e.Children)==null?void 0:o.find(l=>l.Type==="NodeTaskListItemMarker"))!=null&&c.TaskListItemChecked)&&(n.class=(n.class??"")+" protyle-task--done "),delete n.fold,e.Type==="NodeDocument"&&delete n.title,Object.entries(n).map(([l,u])=>`${l}="${u}"`).join(" ")}const ss=async e=>"",ym=async e=>e.Data??"",fw=()=>({...PZ,nodeStack:[],refs:new Set}),PZ={nodeStack:[],refs:new Set,async getTopPathPrefix(){const e=this.nodeStack[0];let t=".";if(e.Type==="NodeDocument"&&e.ID){const n=await Uo.getDocPathBySY(e);if(n){const r=n.split("/").length-3;for(let s=0;s<r;s++)t+="/.."}return t}else return console.log("未定义顶层元素非 NodeDocument 时的处理方式",e),""},async NodeDocument(e){var n,r,s,i,a;let t="";return this.nodeStack.length===1&&(t+=`<div style="min-height: 150px;" ${Vn(e)}>`,(n=e.Properties)!=null&&n["title-img"]&&(t+=`<div class="protyle-background__img" style="margin-bottom: 30px;position: relative;height: 16vh;${(r=e.Properties)==null?void 0:r["title-img"].replace(/assets/,await this.getTopPathPrefix()+"/assets")}"/>${(s=e.Properties)!=null&&s.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${(i=e.Properties)==null?void 0:i.icon} </div>`:""}</div>`),t+="</div>",t+=`<h1 ${Vn(e)} data-type="NodeHeading" class="h1">${(a=e.Properties)==null?void 0:a.title}</h1>`),t+=await gs(e,this),t},async NodeHeading(e){const t=`h${e.HeadingLevel}`;let n=`<${t} ${Vn(e)}>${await gs(e,this)}</${t}>`;const r=this.nodeStack[this.nodeStack.length-2];if((r==null?void 0:r.Type)==="NodeBlockQueryEmbedScript"){let s=!1;for(const i of e.Parent.Children??[])i===e?s=!0:i!==e&&i.Type==="NodeHeading"?s=!1:s&&(n+=`
1647
+ `+await Ls(i,this))}return n},NodeText:ym,async NodeList(e){return gd`<div ${Vn(e)}>${await gs(e,this)}</div>`},async NodeListItem(e){var t,n,r,s,i;return gd`<div ${await Vn(e)}>
1648
+ <div class="protyle-action">
1649
+ ${((t=e.ListData)==null?void 0:t.Typ)===1?atob(((n=e.ListData)==null?void 0:n.Marker)??""):((r=e.ListData)==null?void 0:r.Typ)===3?`<svg><use xlink:href="#${(i=(s=e.Children)==null?void 0:s.find(a=>a.Type==="NodeTaskListItemMarker"))!=null&&i.TaskListItemChecked?"iconCheck":"iconUncheck"}"></use></svg>`:'<svg><use xlink:href="#iconDot"></use></svg>'}
1650
+ </div>
1651
+ ${await gs(e,this)}
1652
+ </div>`},NodeTaskListItemMarker:ss,async NodeParagraph(e){return`<div ${Vn(e)}><div spellcheck="false">${await gs(e,this)}</div></div>`},async NodeTextMark(e){var s;const t=this;let n="";for(const i of(((s=e.TextMarkType)==null?void 0:s.split(" "))??[]).reverse())n===""?n=await r(e,i,e.TextMarkTextContent??""):n=await r(e,i,n);return n;async function r(i,a,o){var c;if(a==="inline-math")return`<span data-type="inline-math" data-subtype="math" data-content="${i.TextMarkInlineMathContent}" class="render-node"></span>`;if(a==="inline-memo")return`${o}<sup>(${i.TextMarkInlineMemoContent})</sup>`;if(a==="block-ref"){let l="";if(i.TextMarkBlockRefID){const u=await Uo.getDocByChildID(i.TextMarkBlockRefID);u!=null&&u.ID?(l=`${await t.getTopPathPrefix()}${await Uo.getHPathByID_Node(u)}.html#${i.TextMarkBlockRefID}`,t.refs.add(u.ID)):Ol(`未查找到${i.ID}所指向的文档节点 ${i.TextMarkBlockRefID}`)}else Ol(`${i.ID} 块引用没有设定 ref id`);return`<span data-type="${i.TextMarkType}" data-subtype="${i.TextMarkBlockRefSubtype}" data-id="${i.TextMarkBlockRefID}"><a href="${l}">${o}</a></span>`}else if(a==="a"){let l=i.TextMarkAHref;return l!=null&&l.startsWith("assets/")&&(l=`${await t.getTopPathPrefix()}/${l}`),`<a href="${l}">${o}</a>`}else return"strong em u s mark sup sub kbd tag code strong code text".includes(a??"")?`<span ${Vn(i,{data_type:a})}>${o}</span>`:Xl(`没有找到对应的渲染器 ${i.TextMarkType} ${(c=t.nodeStack[0].Properties)==null?void 0:c.title}`)}},async NodeImage(e){var i,a,o,c;let t="";const n=(i=e.Children)==null?void 0:i.filter(l=>l.Type==="NodeLinkDest");(n==null?void 0:n.length)===1?t=await Ls(n[0],this):n!=null&&n.length&&n.length>1&&Ol("NodeImage 存在多个 LinkDest",e);let r="";const s=(a=e.Children)==null?void 0:a.filter(l=>l.Type==="NodeLinkTitle");return(s==null?void 0:s.length)===1?r=await Ls(s[0],this):s!=null&&s.length&&s.length>1&&Ol("NodeImage 存在多个 LinkTitle",e),`<span ${await Vn(e)} style="${((o=e.Properties)==null?void 0:o["parent-style"])??""}">
1653
+ <img
1654
+ src="${t}"
1655
+ data-src="${t}"
1656
+ title="${r}"
1657
+ style="${((c=e.Properties)==null?void 0:c.style)??""}"
1658
+ loading="lazy"
1659
+ />
1660
+ <span class="protyle-action__title">${r}</span></span>`},async NodeLinkDest(e){return/^(?:[a-z]+:)?\/\/|^(?:\/)/.test(e.Data??"")?e.Data??"":`${await this.getTopPathPrefix()}/${e.Data}`},NodeLinkTitle:ym,NodeKramdownSpanIAL:ss,async NodeSuperBlock(e){return`<div ${Vn(e)} data-sb-layout="${rx(e,"NodeSuperBlockLayoutMarker")}">${await gs(e,this)}</div>`},NodeSuperBlockOpenMarker:ss,NodeSuperBlockCloseMarker:ss,NodeSuperBlockLayoutMarker:ss,async NodeBlockQueryEmbed(e){return`<div ${Vn(e)} data-type="NodeBlockquote" class="bq">${await gs(e,this)}</div>`},NodeOpenBrace:ss,NodeCloseBrace:ss,async NodeBlockQueryEmbedScript(e){const t=e.Data;if(!t)return console.log("no sql",e),gd`<pre>${t}</pre>`;let n="";const r=await Bl.query_sql({stmt:nx(t).replace(/_esc_newline_/g,`
1661
+ `)}).catch(s=>{throw new Error(`sql error: ${s.message}
1662
+ rawSql:${t}
1663
+ unescapingSql:${nx(t)}`)});for(const s of r){const i=await Uo.getNodeByID(s.id);if(i===void 0)return Xl("未找到此块,可能为跨笔记引用",s.id,t);n+=await Ls(i,this)}return n},async NodeBlockquote(e){return gd`<div ${Vn(e)}>${await gs(e,this)}</div>`},NodeBlockquoteMarker:ss,NodeCodeBlock:async e=>{var r,s,i,a;const[t,n]=dw(e);return t?`<div ${Vn(e)} data-content="${BZ(((s=(r=e.Children)==null?void 0:r.find(o=>o.Type==="NodeCodeBlockCode"))==null?void 0:s.Data)??"")}">
1664
+ <div spin="1"></div>
1665
+ <div class="protyle-attr" contenteditable="false"></div>
1666
+ </div>`:`<div ${Vn(e)}>
1667
+ <div class="protyle-action">
1668
+ <span class="protyle-action--first protyle-action__language">${await Ls((i=e.Children)==null?void 0:i.find(o=>o.Type==="NodeCodeBlockFenceInfoMarker"),void 0)}</span>
1669
+ <span class="fn__flex-1"></span><span class="protyle-icon protyle-icon--only protyle-action__copy"><svg><use xlink:href="#iconCopy"></use></svg></span>
1670
+ </div>
1671
+ ${await Ls((a=e.Children)==null?void 0:a.find(o=>o.Type==="NodeCodeBlockCode"),void 0)}
1672
+ </div>`},NodeCodeBlockFenceInfoMarker:async e=>atob(e.CodeBlockInfo??""),NodeCodeBlockCode:async e=>`<div class="hljs" spellcheck="false">${e.Data}</div>`,NodeCodeBlockFenceOpenMarker:ss,NodeCodeBlockFenceCloseMarker:ss,async NodeTable(e){var t,n,r;return`<div ${Vn(e)}>
1673
+ <div>
1674
+ <table spellcheck="false">
1675
+ <colgroup>
1676
+ ${(t=e.TableAligns)==null?void 0:t.map(()=>"<col />").join("")}
1677
+ </colgroup>
1678
+ ${await Ls((n=e.Children)==null?void 0:n.find(s=>s.Type==="NodeTableHead"),this)}
1679
+ <tbody>
1680
+ ${(await Promise.all(((r=e.Children)==null?void 0:r.filter(s=>s.Type==="NodeTableRow").map(s=>Ls(s,this)))??[])).join(`
1681
+ `)}
1682
+ </tbody>
1683
+ </table>
1684
+ </div>
1685
+ </div>`},async NodeTableHead(e){return`<${e.Data}>${await gs(e,this)}</${e.Data}>`},async NodeTableRow(e){return`<tr>${await gs(e,this)}</tr>`},async NodeTableCell(e){return`<td>${await gs(e,this)}</td>`},NodeHTMLBlock:async e=>`<div ${Vn(e)}>${e.Data}</div>`,NodeThematicBreak:async e=>`<div ${Vn(e)}><div></div></div>`,NodeMathBlock:async e=>`<div ${Vn(e)} data-content="${rx(e,"NodeMathBlockContent")}">
1686
+ <div spin="1"></div>
1687
+ </div>`,NodeMathBlockOpenMarker:ss,NodeMathBlockCloseMarker:ss,async NodeIFrame(e){var t;return` <div ${Vn(e)}>
1688
+ <div class="iframe-content">
1689
+ ${(t=e.Data)==null?void 0:t.replace(/src="assets\//,`src="${await this.getTopPathPrefix()}/assets/`)}
1690
+ </div>
1691
+ </div>`},async NodeVideo(e){return await this.NodeIFrame(e)},async NodeAudio(e){return await this.NodeIFrame(e)},NodeHeadingC8hMarker:ss,async NodeSoftBreak(e){return"​"},async NodeBr(e){return`<${e.Data}>`},async NodeWidget(e){return`<div ${Vn(e)}><img src="${await this.getTopPathPrefix()}/assets/widget/${e.ID}.jpg"/></div>`},async NodeBackslash(e){var t;return e.Data===void 0||e.Data==="span"?`${await gs(e,this)}`:Xl(`未定义的 NodeBackslash 处理 ${e.Data}`,(t=this.nodeStack[0].Properties)==null?void 0:t.title)},NodeBackslashContent:ym};function rx(e,t){var n,r;return(r=(n=e.Children)==null?void 0:n.find(s=>s.Type===t))==null?void 0:r.Data}function Ol(...e){console.warn(`
1692
+ `,...e)}async function NZ(e,t,n){const r=(await Promise.all([...t.refs.values()].map(px))).filter(s=>s);return`<?xml version="1.0" encoding="UTF-8"?>
1693
+ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
1694
+ <channel>
1695
+ <title>${n.sitemap.title}</title>
1696
+ <link>${n.sitemap.siteLink}</link>
1697
+ <description>${n.sitemap.description}</description>
1698
+ <atom:link href="${n.sitemap.sitePrefix}${e}" rel="self" type="application/rss+xml"/>
1699
+ <lastBuildDate>${new Date().toISOString()}</lastBuildDate>
1700
+ ${(await Promise.all(r.map(async s=>{var i,a;return`<item>
1701
+ <title>${(i=s==null?void 0:s.Properties)==null?void 0:i.title}</title>
1702
+ <link>${n.sitemap.sitePrefix}${s!=null&&s.ID?await Uo.getHPathByID_Node(s==null?void 0:s.ID)+".html":""}</link>
1703
+ <description></description>
1704
+ <pubDate>${(a=s==null?void 0:s.Properties)!=null&&a.updated?new Date(s.Properties.updated.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/,"$1/$2/$3 $4:$5:$6")).toISOString():""}</pubDate>
1705
+ </item>`}))).join(`
1706
+ `)}
1707
+ </channel>
1708
+ </rss>`}function OZ(e,t){return`<?xml version="1.0" encoding="UTF-8"?>
1709
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
1710
+ ${e.map(r=>{var a;let s="";const i=((a=r.ial.match(/updated=\"(\d+)\"/))==null?void 0:a[1])??r.created;return i&&(s=`
1711
+ <lastmod>${i.slice(0,4)}-${i.slice(4,6)}-${i.slice(6,8)}</lastmod>`),`<url>
1712
+ <loc>${t.sitePrefix}${r.hpath}.html</loc>${s}
1713
+ </url>
1714
+ `}).join("")}
1715
+ </urlset>`}function pd(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 Em={exports:{}};/*!
1716
+
1717
+ JSZip v3.10.1 - A JavaScript class for generating and reading zip files
1718
+ <http://stuartk.com/jszip>
1719
+
1720
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
1721
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
1722
+
1723
+ JSZip uses the library pako released under the MIT license :
1724
+ https://github.com/nodeca/pako/blob/main/LICENSE
1725
+ */var sx;function DZ(){return sx||(sx=1,function(e,t){(function(n){e.exports=n()})(function(){return function n(r,s,i){function a(l,u){if(!s[l]){if(!r[l]){var f=typeof pd=="function"&&pd;if(!u&&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(b){var p=r[l][1][b];return a(p||b)},h,h.exports,n,r,s,i)}return s[l].exports}for(var o=typeof pd=="function"&&pd,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,u,f,m,h,b,p,E=[],g=0,y=c.length,w=y,x=i.getTypeOf(c)!=="string";g<c.length;)w=y-g,f=x?(l=c[g++],u=g<y?c[g++]:0,g<y?c[g++]:0):(l=c.charCodeAt(g++),u=g<y?c.charCodeAt(g++):0,g<y?c.charCodeAt(g++):0),m=l>>2,h=(3&l)<<4|u>>4,b=1<w?(15&u)<<2|f>>6:64,p=2<w?63&f:64,E.push(o.charAt(m)+o.charAt(h)+o.charAt(b)+o.charAt(p));return E.join("")},s.decode=function(c){var l,u,f,m,h,b,p=0,E=0,g="data:";if(c.substr(0,g.length)===g)throw new Error("Invalid base64 input, it looks like a data url.");var y,w=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===o.charAt(64)&&w--,c.charAt(c.length-2)===o.charAt(64)&&w--,w%1!=0)throw new Error("Invalid base64 input, bad content length.");for(y=a.uint8array?new Uint8Array(0|w):new Array(0|w);p<c.length;)l=o.indexOf(c.charAt(p++))<<2|(m=o.indexOf(c.charAt(p++)))>>4,u=(15&m)<<4|(h=o.indexOf(c.charAt(p++)))>>2,f=(3&h)<<6|(b=o.indexOf(c.charAt(p++))),y[E++]=l,h!==64&&(y[E++]=u),b!==64&&(y[E++]=f);return y}},{"./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(u,f,m,h,b){this.compressedSize=u,this.uncompressedSize=f,this.crc32=m,this.compression=h,this.compressedContent=b}l.prototype={getContentWorker:function(){var u=new a(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),f=this;return u.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),u},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(u,f,m){return u.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 u=0;u<8;u++)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,u,f,m){var h=a,b=m+f;l^=-1;for(var p=m;p<b;p++)l=l>>>8^h[255&(l^u[p])];return-1^l}(0|c,o,o.length,0):function(l,u,f,m){var h=a,b=m+f;l^=-1;for(var p=m;p<b;p++)l=l>>>8^h[255&(l^u.charCodeAt(p))];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 u(f,m){c.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=m,this.meta={}}s.magic="\b\0",o.inherits(u,c),u.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(l,f.data),!1)},u.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},u.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 u("Deflate",f)},s.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(n,r,s){function i(h,b){var p,E="";for(p=0;p<b;p++)E+=String.fromCharCode(255&h),h>>>=8;return E}function a(h,b,p,E,g,y){var w,x,S=h.file,C=h.compression,T=y!==l.utf8encode,k=o.transformTo("string",y(S.name)),R=o.transformTo("string",l.utf8encode(S.name)),V=S.comment,Q=o.transformTo("string",y(V)),A=o.transformTo("string",l.utf8encode(V)),W=R.length!==S.name.length,_=A.length!==V.length,Y="",De="",te="",Me=S.dir,de=S.date,Ue={crc32:0,compressedSize:0,uncompressedSize:0};b&&!p||(Ue.crc32=h.crc32,Ue.compressedSize=h.compressedSize,Ue.uncompressedSize=h.uncompressedSize);var J=0;b&&(J|=8),T||!W&&!_||(J|=2048);var Z=0,Xe=0;Me&&(Z|=16),g==="UNIX"?(Xe=798,Z|=function(Re,Je){var Ht=Re;return Re||(Ht=Je?16893:33204),(65535&Ht)<<16}(S.unixPermissions,Me)):(Xe=20,Z|=function(Re){return 63&(Re||0)}(S.dosPermissions)),w=de.getUTCHours(),w<<=6,w|=de.getUTCMinutes(),w<<=5,w|=de.getUTCSeconds()/2,x=de.getUTCFullYear()-1980,x<<=4,x|=de.getUTCMonth()+1,x<<=5,x|=de.getUTCDate(),W&&(De=i(1,1)+i(u(k),4)+R,Y+="up"+i(De.length,2)+De),_&&(te=i(1,1)+i(u(Q),4)+A,Y+="uc"+i(te.length,2)+te);var Le="";return Le+=`
1726
+ \0`,Le+=i(J,2),Le+=C.magic,Le+=i(w,2),Le+=i(x,2),Le+=i(Ue.crc32,4),Le+=i(Ue.compressedSize,4),Le+=i(Ue.uncompressedSize,4),Le+=i(k.length,2),Le+=i(Y.length,2),{fileRecord:f.LOCAL_FILE_HEADER+Le+k+Y,dirRecord:f.CENTRAL_FILE_HEADER+i(Xe,2)+Le+i(Q.length,2)+"\0\0\0\0"+i(Z,4)+i(E,4)+k+Y+Q}}var o=n("../utils"),c=n("../stream/GenericWorker"),l=n("../utf8"),u=n("../crc32"),f=n("../signature");function m(h,b,p,E){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=b,this.zipPlatform=p,this.encodeFileName=E,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 b=h.meta.percent||0,p=this.entriesCount,E=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:p?(b+100*(p-E-1))/p:100}}))},m.prototype.openedSource=function(h){this.currentSourceOffset=this.bytesWritten,this.currentFile=h.file.name;var b=this.streamFiles&&!h.file.dir;if(b){var p=a(h,b,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:p.fileRecord,meta:{percent:0}})}else this.accumulate=!0},m.prototype.closedSource=function(h){this.accumulate=!1;var b=this.streamFiles&&!h.file.dir,p=a(h,b,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(p.dirRecord),b)this.push({data:function(E){return f.DATA_DESCRIPTOR+i(E.crc32,4)+i(E.compressedSize,4)+i(E.uncompressedSize,4)}(h),meta:{percent:100}});else for(this.push({data:p.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},m.prototype.flush=function(){for(var h=this.bytesWritten,b=0;b<this.dirRecords.length;b++)this.push({data:this.dirRecords[b],meta:{percent:100}});var p=this.bytesWritten-h,E=function(g,y,w,x,S){var C=o.transformTo("string",S(x));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(g,2)+i(g,2)+i(y,4)+i(w,4)+i(C.length,2)+C}(this.dirRecords.length,p,h,this.zipComment,this.encodeFileName);this.push({data:E,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 b=this;return h.on("data",function(p){b.processChunk(p)}),h.on("end",function(){b.closedSource(b.previous.streamInfo),b._sources.length?b.prepareNextSource():b.end()}),h.on("error",function(p){b.error(p)}),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 b=this._sources;if(!c.prototype.error.call(this,h))return!1;for(var p=0;p<b.length;p++)try{b[p].error(h)}catch{}return!0},m.prototype.lock=function(){c.prototype.lock.call(this);for(var h=this._sources,b=0;b<h.length;b++)h[b].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 u=new a(c.streamFiles,l,c.platform,c.encodeFileName),f=0;try{o.forEach(function(m,h){f++;var b=function(y,w){var x=y||w,S=i[x];if(!S)throw new Error(x+" is not a valid compression method !");return S}(h.options.compression,c.compression),p=h.options.compressionOptions||c.compressionOptions||{},E=h.dir,g=h.date;h._compressWorker(b,p).withStreamInfo("file",{name:m,dir:E,date:g,comment:h.comment||"",unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions}).pipe(u)}),u.entriesCount=f}catch(m){u.error(m)}return u}},{"../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"),u=n("./nodejsUtils");function f(m){return new a.Promise(function(h,b){var p=m.decompressed.getContentWorker().pipe(new l);p.on("error",function(E){b(E)}).on("end",function(){p.streamInfo.crc32!==m.decompressed.crc32?b(new Error("Corrupted zip : CRC32 mismatch")):h()}).resume()})}r.exports=function(m,h){var b=this;return h=i.extend(h||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.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(p){var E=new c(h);return E.load(p),E}).then(function(p){var E=[a.Promise.resolve(p)],g=p.files;if(h.checkCRC32)for(var y=0;y<g.length;y++)E.push(f(g[y]));return a.Promise.all(E)}).then(function(p){for(var E=p.shift(),g=E.files,y=0;y<g.length;y++){var w=g[y],x=w.fileNameStr,S=i.resolve(w.fileNameStr);b.file(S,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:h.createFolders}),w.dir||(b.file(S).unsafeOriginalName=x)}return E.zipComment.length&&(b.comment=E.zipComment),b})}},{"./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(u){l.push({data:u,meta:{percent:0}})}).on("error",function(u){l.isPaused?this.generatedError=u:l.error(u)}).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 u=this;o.on("data",function(f,m){u.push(f)||u._helper.pause(),l&&l(m)}).on("error",function(f){u.emit("error",f)}).on("end",function(){u.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,C,T){var k,R=o.getTypeOf(C),V=o.extend(T||{},u);V.date=V.date||new Date,V.compression!==null&&(V.compression=V.compression.toUpperCase()),typeof V.unixPermissions=="string"&&(V.unixPermissions=parseInt(V.unixPermissions,8)),V.unixPermissions&&16384&V.unixPermissions&&(V.dir=!0),V.dosPermissions&&16&V.dosPermissions&&(V.dir=!0),V.dir&&(S=g(S)),V.createFolders&&(k=E(S))&&y.call(this,k,!0);var Q=R==="string"&&V.binary===!1&&V.base64===!1;T&&T.binary!==void 0||(V.binary=!Q),(C instanceof f&&C.uncompressedSize===0||V.dir||!C||C.length===0)&&(V.base64=!1,V.binary=!0,C="",V.compression="STORE",R="string");var A=null;A=C instanceof f||C instanceof c?C:b.isNode&&b.isStream(C)?new p(S,C):o.prepareContent(S,C,V.binary,V.optimizedBinaryString,V.base64);var W=new m(S,A,V);this.files[S]=W}var a=n("./utf8"),o=n("./utils"),c=n("./stream/GenericWorker"),l=n("./stream/StreamHelper"),u=n("./defaults"),f=n("./compressedObject"),m=n("./zipObject"),h=n("./generate"),b=n("./nodejsUtils"),p=n("./nodejs/NodejsStreamInputAdapter"),E=function(S){S.slice(-1)==="/"&&(S=S.substring(0,S.length-1));var C=S.lastIndexOf("/");return 0<C?S.substring(0,C):""},g=function(S){return S.slice(-1)!=="/"&&(S+="/"),S},y=function(S,C){return C=C!==void 0?C:u.createFolders,S=g(S),this.files[S]||i.call(this,S,null,{dir:!0,createFolders:C}),this.files[S]};function w(S){return Object.prototype.toString.call(S)==="[object RegExp]"}var x={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(S){var C,T,k;for(C in this.files)k=this.files[C],(T=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&S(T,k)},filter:function(S){var C=[];return this.forEach(function(T,k){S(T,k)&&C.push(k)}),C},file:function(S,C,T){if(arguments.length!==1)return S=this.root+S,i.call(this,S,C,T),this;if(w(S)){var k=S;return this.filter(function(V,Q){return!Q.dir&&k.test(V)})}var R=this.files[this.root+S];return R&&!R.dir?R:null},folder:function(S){if(!S)return this;if(w(S))return this.filter(function(R,V){return V.dir&&S.test(R)});var C=this.root+S,T=y.call(this,C),k=this.clone();return k.root=T.name,k},remove:function(S){S=this.root+S;var C=this.files[S];if(C||(S.slice(-1)!=="/"&&(S+="/"),C=this.files[S]),C&&!C.dir)delete this.files[S];else for(var T=this.filter(function(R,V){return V.name.slice(0,S.length)===S}),k=0;k<T.length;k++)delete this.files[T[k].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 C,T={};try{if((T=o.extend(S||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:a.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");o.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var k=T.comment||this.comment||"";C=h.generateWorker(this,T,k)}catch(R){(C=new c("error")).error(R)}return new l(C,T.type||"string",T.mimeType)},generateAsync:function(S,C){return this.generateInternalStream(S).accumulate(C)},generateNodeStream:function(S,C){return(S=S||{}).type||(S.type="nodebuffer"),this.generateInternalStream(S).toNodejsStream(C)}};r.exports=x},{"./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),u=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]===u&&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),u=o.charCodeAt(2),f=o.charCodeAt(3),m=this.readData(4);return c===m[0]&&l===m[1]&&u===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"),u=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 u(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(u){l.dataIsReady=!0,l.data=u,l.max=u&&u.length||0,l.type=i.getTypeOf(u),l.isPaused||l._tickAndRepeat()},function(u){l.error(u)})}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"),u=n("../external"),f=null;if(l.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function m(b,p){return new u.Promise(function(E,g){var y=[],w=b._internalType,x=b._outputType,S=b._mimeType;b.on("data",function(C,T){y.push(C),p&&p(T)}).on("error",function(C){y=[],g(C)}).on("end",function(){try{var C=function(T,k,R){switch(T){case"blob":return i.newBlob(i.transformTo("arraybuffer",k),R);case"base64":return c.encode(k);default:return i.transformTo(T,k)}}(x,function(T,k){var R,V=0,Q=null,A=0;for(R=0;R<k.length;R++)A+=k[R].length;switch(T){case"string":return k.join("");case"array":return Array.prototype.concat.apply([],k);case"uint8array":for(Q=new Uint8Array(A),R=0;R<k.length;R++)Q.set(k[R],V),V+=k[R].length;return Q;case"nodebuffer":return Buffer.concat(k);default:throw new Error("concat : unsupported type '"+T+"'")}}(w,y),S);E(C)}catch(T){g(T)}y=[]}).resume()})}function h(b,p,E){var g=p;switch(p){case"blob":case"arraybuffer":g="uint8array";break;case"base64":g="string"}try{this._internalType=g,this._outputType=p,this._mimeType=E,i.checkSupport(g),this._worker=b.pipe(new a(g)),b.lock()}catch(y){this._worker=new o("error"),this._worker.error(y)}}h.prototype={accumulate:function(b){return m(this,b)},on:function(b,p){var E=this;return b==="data"?this._worker.on(b,function(g){p.call(E,g.data,g.meta)}):this._worker.on(b,function(){i.delay(p,arguments,E)}),this},resume:function(){return i.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(b){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"},b)}},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),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?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(b){var p,E,g,y,w,x=b.length,S=0;for(y=0;y<x;y++)(64512&(E=b.charCodeAt(y)))==55296&&y+1<x&&(64512&(g=b.charCodeAt(y+1)))==56320&&(E=65536+(E-55296<<10)+(g-56320),y++),S+=E<128?1:E<2048?2:E<65536?3:4;for(p=a.uint8array?new Uint8Array(S):new Array(S),y=w=0;w<S;y++)(64512&(E=b.charCodeAt(y)))==55296&&y+1<x&&(64512&(g=b.charCodeAt(y+1)))==56320&&(E=65536+(E-55296<<10)+(g-56320),y++),E<128?p[w++]=E:(E<2048?p[w++]=192|E>>>6:(E<65536?p[w++]=224|E>>>12:(p[w++]=240|E>>>18,p[w++]=128|E>>>12&63),p[w++]=128|E>>>6&63),p[w++]=128|63&E);return p}(h)},s.utf8decode=function(h){return a.nodebuffer?i.transformTo("nodebuffer",h).toString("utf-8"):function(b){var p,E,g,y,w=b.length,x=new Array(2*w);for(p=E=0;p<w;)if((g=b[p++])<128)x[E++]=g;else if(4<(y=l[g]))x[E++]=65533,p+=y-1;else{for(g&=y===2?31:y===3?15:7;1<y&&p<w;)g=g<<6|63&b[p++],y--;1<y?x[E++]=65533:g<65536?x[E++]=g:(g-=65536,x[E++]=55296|g>>10&1023,x[E++]=56320|1023&g)}return x.length!==E&&(x.subarray?x=x.subarray(0,E):x.length=E),i.applyFromCharCode(x)}(h=i.transformTo(a.uint8array?"uint8array":"array",h))},i.inherits(f,c),f.prototype.processChunk=function(h){var b=i.transformTo(a.uint8array?"uint8array":"array",h.data);if(this.leftOver&&this.leftOver.length){if(a.uint8array){var p=b;(b=new Uint8Array(p.length+this.leftOver.length)).set(this.leftOver,0),b.set(p,this.leftOver.length)}else b=this.leftOver.concat(b);this.leftOver=null}var E=function(y,w){var x;for((w=w||y.length)>y.length&&(w=y.length),x=w-1;0<=x&&(192&y[x])==128;)x--;return x<0||x===0?w:x+l[y[x]]>w?x:w}(b),g=b;E!==b.length&&(a.uint8array?(g=b.subarray(0,E),this.leftOver=b.subarray(E,b.length)):(g=b.slice(0,E),this.leftOver=b.slice(E,b.length))),this.push({data:s.utf8decode(g),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(p){return p}function u(p,E){for(var g=0;g<p.length;++g)E[g]=255&p.charCodeAt(g);return E}n("setimmediate"),s.newBlob=function(p,E){s.checkSupport("blob");try{return new Blob([p],{type:E})}catch{try{var g=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return g.append(p),g.getBlob(E)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(p,E,g){var y=[],w=0,x=p.length;if(x<=g)return String.fromCharCode.apply(null,p);for(;w<x;)E==="array"||E==="nodebuffer"?y.push(String.fromCharCode.apply(null,p.slice(w,Math.min(w+g,x)))):y.push(String.fromCharCode.apply(null,p.subarray(w,Math.min(w+g,x)))),w+=g;return y.join("")},stringifyByChar:function(p){for(var E="",g=0;g<p.length;g++)E+=String.fromCharCode(p[g]);return E},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(p){var E=65536,g=s.getTypeOf(p),y=!0;if(g==="uint8array"?y=f.applyCanBeUsed.uint8array:g==="nodebuffer"&&(y=f.applyCanBeUsed.nodebuffer),y)for(;1<E;)try{return f.stringifyByChunk(p,g,E)}catch{E=Math.floor(E/2)}return f.stringifyByChar(p)}function h(p,E){for(var g=0;g<p.length;g++)E[g]=p[g];return E}s.applyFromCharCode=m;var b={};b.string={string:l,array:function(p){return u(p,new Array(p.length))},arraybuffer:function(p){return b.string.uint8array(p).buffer},uint8array:function(p){return u(p,new Uint8Array(p.length))},nodebuffer:function(p){return u(p,o.allocBuffer(p.length))}},b.array={string:m,array:l,arraybuffer:function(p){return new Uint8Array(p).buffer},uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return o.newBufferFrom(p)}},b.arraybuffer={string:function(p){return m(new Uint8Array(p))},array:function(p){return h(new Uint8Array(p),new Array(p.byteLength))},arraybuffer:l,uint8array:function(p){return new Uint8Array(p)},nodebuffer:function(p){return o.newBufferFrom(new Uint8Array(p))}},b.uint8array={string:m,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return p.buffer},uint8array:l,nodebuffer:function(p){return o.newBufferFrom(p)}},b.nodebuffer={string:m,array:function(p){return h(p,new Array(p.length))},arraybuffer:function(p){return b.nodebuffer.uint8array(p).buffer},uint8array:function(p){return h(p,new Uint8Array(p.length))},nodebuffer:l},s.transformTo=function(p,E){if(E=E||"",!p)return E;s.checkSupport(p);var g=s.getTypeOf(E);return b[g][p](E)},s.resolve=function(p){for(var E=p.split("/"),g=[],y=0;y<E.length;y++){var w=E[y];w==="."||w===""&&y!==0&&y!==E.length-1||(w===".."?g.pop():g.push(w))}return g.join("/")},s.getTypeOf=function(p){return typeof p=="string"?"string":Object.prototype.toString.call(p)==="[object Array]"?"array":i.nodebuffer&&o.isBuffer(p)?"nodebuffer":i.uint8array&&p instanceof Uint8Array?"uint8array":i.arraybuffer&&p instanceof ArrayBuffer?"arraybuffer":void 0},s.checkSupport=function(p){if(!i[p.toLowerCase()])throw new Error(p+" is not supported by this platform")},s.MAX_VALUE_16BITS=65535,s.MAX_VALUE_32BITS=-1,s.pretty=function(p){var E,g,y="";for(g=0;g<(p||"").length;g++)y+="\\x"+((E=p.charCodeAt(g))<16?"0":"")+E.toString(16).toUpperCase();return y},s.delay=function(p,E,g){setImmediate(function(){p.apply(g||null,E||[])})},s.inherits=function(p,E){function g(){}g.prototype=E.prototype,p.prototype=new g},s.extend=function(){var p,E,g={};for(p=0;p<arguments.length;p++)for(E in arguments[p])Object.prototype.hasOwnProperty.call(arguments[p],E)&&g[E]===void 0&&(g[E]=arguments[p][E]);return g},s.prepareContent=function(p,E,g,y,w){return c.Promise.resolve(E).then(function(x){return i.blob&&(x instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(x))!==-1)&&typeof FileReader<"u"?new c.Promise(function(S,C){var T=new FileReader;T.onload=function(k){S(k.target.result)},T.onerror=function(k){C(k.target.error)},T.readAsArrayBuffer(x)}):x}).then(function(x){var S=s.getTypeOf(x);return S?(S==="arraybuffer"?x=s.transformTo("uint8array",x):S==="string"&&(w?x=a.decode(x):g&&y!==!0&&(x=function(C){return u(C,i.uint8array?new Uint8Array(C.length):new Array(C.length))}(x))),x):c.Promise.reject(new Error("Can't read the data of '"+p+"'. 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 u(f){this.files=[],this.loadOptions=f}u.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 b=this.reader.readString(4)===m;return this.reader.setIndex(h),b},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,b=this.zip64EndOfCentralSize-44;0<b;)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 b=m-h;if(0<b)this.isSignature(m,o.CENTRAL_FILE_HEADER)||(this.reader.zero=b);else if(b<0)throw new Error("Corrupted zip: missing "+Math.abs(b)+" bytes.")},prepareReader:function(f){this.reader=i(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./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"),u=n("./compressions"),f=n("./support");function m(h,b){this.options=h,this.loadOptions=b}m.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(h){var b,p;if(h.skip(22),this.fileNameLength=h.readInt(2),p=h.readInt(2),this.fileName=h.readData(this.fileNameLength),h.skip(p),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((b=function(E){for(var g in u)if(Object.prototype.hasOwnProperty.call(u,g)&&u[g].magic===E)return u[g];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,b,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 b=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(b),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 b,p,E,g=h.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});h.index+4<g;)b=h.readInt(2),p=h.readInt(2),E=h.readData(p),this.extraFields[b]={id:b,length:p,value:E};h.setIndex(g)},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 b=this.findExtraFieldUnicodePath();if(b!==null)this.fileNameStr=b;else{var p=a.transformTo(h,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(p)}var E=this.findExtraFieldUnicodeComment();if(E!==null)this.fileCommentStr=E;else{var g=a.transformTo(h,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(g)}}},findExtraFieldUnicodePath:function(){var h=this.extraFields[28789];if(h){var b=i(h.value);return b.readInt(1)!==1||c(this.fileName)!==b.readInt(4)?null:l.utf8decode(b.readData(h.length-5))}return null},findExtraFieldUnicodeComment:function(){var h=this.extraFields[25461];if(h){var b=i(h.value);return b.readInt(1)!==1||c(this.fileComment)!==b.readInt(4)?null:l.utf8decode(b.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(b,p,E){this.name=b,this.dir=E.dir,this.date=E.date,this.comment=E.comment,this.unixPermissions=E.unixPermissions,this.dosPermissions=E.dosPermissions,this._data=p,this._dataBinary=E.binary,this.options={compression:E.compression,compressionOptions:E.compressionOptions}}var a=n("./stream/StreamHelper"),o=n("./stream/DataWorker"),c=n("./utf8"),l=n("./compressedObject"),u=n("./stream/GenericWorker");i.prototype={internalStream:function(b){var p=null,E="string";try{if(!b)throw new Error("No output type specified.");var g=(E=b.toLowerCase())==="string"||E==="text";E!=="binarystring"&&E!=="text"||(E="string"),p=this._decompressWorker();var y=!this._dataBinary;y&&!g&&(p=p.pipe(new c.Utf8EncodeWorker)),!y&&g&&(p=p.pipe(new c.Utf8DecodeWorker))}catch(w){(p=new u("error")).error(w)}return new a(p,E,"")},async:function(b,p){return this.internalStream(b).accumulate(p)},nodeStream:function(b,p){return this.internalStream(b||"nodebuffer").toNodejsStream(p)},_compressWorker:function(b,p){if(this._data instanceof l&&this._data.compression.magic===b.magic)return this._data.getCompressedWorker();var E=this._decompressWorker();return this._dataBinary||(E=E.pipe(new c.Utf8EncodeWorker)),l.createWorkerFrom(E,b,p)},_decompressWorker:function(){return this._data instanceof l?this._data.getContentWorker():this._data instanceof u?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,u=new c(b),f=i.document.createTextNode("");u.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 p=i.document.createElement("script");p.onreadystatechange=function(){b(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},i.document.documentElement.appendChild(p)}:function(){setTimeout(b,0)};else{var m=new i.MessageChannel;m.port1.onmessage=b,a=function(){m.port2.postMessage(0)}}var h=[];function b(){var p,E;o=!0;for(var g=h.length;g;){for(E=h,h=[],p=-1;++p<g;)E[p]();g=h.length}o=!1}r.exports=function(p){h.push(p)!==1||o||a()}}).call(this,typeof Yu<"u"?Yu: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"],u=["PENDING"];function f(g){if(typeof g!="function")throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,g!==a&&p(this,g)}function m(g,y,w){this.promise=g,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function h(g,y,w){i(function(){var x;try{x=y(w)}catch(S){return o.reject(g,S)}x===g?o.reject(g,new TypeError("Cannot resolve promise with itself")):o.resolve(g,x)})}function b(g){var y=g&&g.then;if(g&&(typeof g=="object"||typeof g=="function")&&typeof y=="function")return function(){y.apply(g,arguments)}}function p(g,y){var w=!1;function x(T){w||(w=!0,o.reject(g,T))}function S(T){w||(w=!0,o.resolve(g,T))}var C=E(function(){y(S,x)});C.status==="error"&&x(C.value)}function E(g,y){var w={};try{w.value=g(y),w.status="success"}catch(x){w.status="error",w.value=x}return w}(r.exports=f).prototype.finally=function(g){if(typeof g!="function")return this;var y=this.constructor;return this.then(function(w){return y.resolve(g()).then(function(){return w})},function(w){return y.resolve(g()).then(function(){throw w})})},f.prototype.catch=function(g){return this.then(null,g)},f.prototype.then=function(g,y){if(typeof g!="function"&&this.state===l||typeof y!="function"&&this.state===c)return this;var w=new this.constructor(a);return this.state!==u?h(w,this.state===l?g:y,this.outcome):this.queue.push(new m(w,g,y)),w},m.prototype.callFulfilled=function(g){o.resolve(this.promise,g)},m.prototype.otherCallFulfilled=function(g){h(this.promise,this.onFulfilled,g)},m.prototype.callRejected=function(g){o.reject(this.promise,g)},m.prototype.otherCallRejected=function(g){h(this.promise,this.onRejected,g)},o.resolve=function(g,y){var w=E(b,y);if(w.status==="error")return o.reject(g,w.value);var x=w.value;if(x)p(g,x);else{g.state=l,g.outcome=y;for(var S=-1,C=g.queue.length;++S<C;)g.queue[S].callFulfilled(y)}return g},o.reject=function(g,y){g.state=c,g.outcome=y;for(var w=-1,x=g.queue.length;++w<x;)g.queue[w].callRejected(y);return g},f.resolve=function(g){return g instanceof this?g:o.resolve(new this(a),g)},f.reject=function(g){var y=new this(a);return o.reject(y,g)},f.all=function(g){var y=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=g.length,x=!1;if(!w)return this.resolve([]);for(var S=new Array(w),C=0,T=-1,k=new this(a);++T<w;)R(g[T],T);return k;function R(V,Q){y.resolve(V).then(function(A){S[Q]=A,++C!==w||x||(x=!0,o.resolve(k,S))},function(A){x||(x=!0,o.reject(k,A))})}},f.race=function(g){var y=this;if(Object.prototype.toString.call(g)!=="[object Array]")return this.reject(new TypeError("must be an array"));var w=g.length,x=!1;if(!w)return this.resolve([]);for(var S=-1,C=new this(a);++S<w;)T=g[S],y.resolve(T).then(function(k){x||(x=!0,o.resolve(C,k))},function(k){x||(x=!0,o.reject(C,k))});var T;return C}},{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"),u=Object.prototype.toString,f=0,m=-1,h=0,b=8;function p(g){if(!(this instanceof p))return new p(g);this.options=a.assign({level:m,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:h,to:""},g||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var w=i.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(w!==f)throw new Error(c[w]);if(y.header&&i.deflateSetHeader(this.strm,y.header),y.dictionary){var x;if(x=typeof y.dictionary=="string"?o.string2buf(y.dictionary):u.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(w=i.deflateSetDictionary(this.strm,x))!==f)throw new Error(c[w]);this._dict_set=!0}}function E(g,y){var w=new p(y);if(w.push(g,!0),w.err)throw w.msg||c[w.err];return w.result}p.prototype.push=function(g,y){var w,x,S=this.strm,C=this.options.chunkSize;if(this.ended)return!1;x=y===~~y?y:y===!0?4:0,typeof g=="string"?S.input=o.string2buf(g):u.call(g)==="[object ArrayBuffer]"?S.input=new Uint8Array(g):S.input=g,S.next_in=0,S.avail_in=S.input.length;do{if(S.avail_out===0&&(S.output=new a.Buf8(C),S.next_out=0,S.avail_out=C),(w=i.deflate(S,x))!==1&&w!==f)return this.onEnd(w),!(this.ended=!0);S.avail_out!==0&&(S.avail_in!==0||x!==4&&x!==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)&&w!==1);return x===4?(w=i.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===f):x!==2||(this.onEnd(f),!(S.avail_out=0))},p.prototype.onData=function(g){this.chunks.push(g)},p.prototype.onEnd=function(g){g===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=g,this.msg=this.strm.msg},s.Deflate=p,s.deflate=E,s.deflateRaw=function(g,y){return(y=y||{}).raw=!0,E(g,y)},s.gzip=function(g,y){return(y=y||{}).gzip=!0,E(g,y)}},{"./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"),u=n("./zlib/zstream"),f=n("./zlib/gzheader"),m=Object.prototype.toString;function h(p){if(!(this instanceof h))return new h(p);this.options=a.assign({chunkSize:16384,windowBits:0,to:""},p||{});var E=this.options;E.raw&&0<=E.windowBits&&E.windowBits<16&&(E.windowBits=-E.windowBits,E.windowBits===0&&(E.windowBits=-15)),!(0<=E.windowBits&&E.windowBits<16)||p&&p.windowBits||(E.windowBits+=32),15<E.windowBits&&E.windowBits<48&&(15&E.windowBits)==0&&(E.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var g=i.inflateInit2(this.strm,E.windowBits);if(g!==c.Z_OK)throw new Error(l[g]);this.header=new f,i.inflateGetHeader(this.strm,this.header)}function b(p,E){var g=new h(E);if(g.push(p,!0),g.err)throw g.msg||l[g.err];return g.result}h.prototype.push=function(p,E){var g,y,w,x,S,C,T=this.strm,k=this.options.chunkSize,R=this.options.dictionary,V=!1;if(this.ended)return!1;y=E===~~E?E:E===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof p=="string"?T.input=o.binstring2buf(p):m.call(p)==="[object ArrayBuffer]"?T.input=new Uint8Array(p):T.input=p,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new a.Buf8(k),T.next_out=0,T.avail_out=k),(g=i.inflate(T,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&R&&(C=typeof R=="string"?o.string2buf(R):m.call(R)==="[object ArrayBuffer]"?new Uint8Array(R):R,g=i.inflateSetDictionary(this.strm,C)),g===c.Z_BUF_ERROR&&V===!0&&(g=c.Z_OK,V=!1),g!==c.Z_STREAM_END&&g!==c.Z_OK)return this.onEnd(g),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&g!==c.Z_STREAM_END&&(T.avail_in!==0||y!==c.Z_FINISH&&y!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=o.utf8border(T.output,T.next_out),x=T.next_out-w,S=o.buf2string(T.output,w),T.next_out=x,T.avail_out=k-x,x&&a.arraySet(T.output,T.output,w,x,0),this.onData(S)):this.onData(a.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(V=!0)}while((0<T.avail_in||T.avail_out===0)&&g!==c.Z_STREAM_END);return g===c.Z_STREAM_END&&(y=c.Z_FINISH),y===c.Z_FINISH?(g=i.inflateEnd(this.strm),this.onEnd(g),this.ended=!0,g===c.Z_OK):y!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(T.avail_out=0))},h.prototype.onData=function(p){this.chunks.push(p)},h.prototype.onEnd=function(p){p===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=a.flattenChunks(this.chunks)),this.chunks=[],this.err=p,this.msg=this.strm.msg},s.Inflate=h,s.inflate=b,s.inflateRaw=function(p,E){return(E=E||{}).raw=!0,b(p,E)},s.ungzip=b},{"./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 u=l.shift();if(u){if(typeof u!="object")throw new TypeError(u+"must be non-object");for(var f in u)u.hasOwnProperty(f)&&(c[f]=u[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,u,f,m){if(l.subarray&&c.subarray)c.set(l.subarray(u,u+f),m);else for(var h=0;h<f;h++)c[m+h]=l[u+h]},flattenChunks:function(c){var l,u,f,m,h,b;for(l=f=0,u=c.length;l<u;l++)f+=c[l].length;for(b=new Uint8Array(f),l=m=0,u=c.length;l<u;l++)h=c[l],b.set(h,m),m+=h.length;return b}},o={arraySet:function(c,l,u,f,m){for(var h=0;h<f;h++)c[m+h]=l[u+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 u(f,m){if(m<65537&&(f.subarray&&o||!f.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(f,m));for(var h="",b=0;b<m;b++)h+=String.fromCharCode(f[b]);return h}c[254]=c[254]=1,s.string2buf=function(f){var m,h,b,p,E,g=f.length,y=0;for(p=0;p<g;p++)(64512&(h=f.charCodeAt(p)))==55296&&p+1<g&&(64512&(b=f.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(b-56320),p++),y+=h<128?1:h<2048?2:h<65536?3:4;for(m=new i.Buf8(y),p=E=0;E<y;p++)(64512&(h=f.charCodeAt(p)))==55296&&p+1<g&&(64512&(b=f.charCodeAt(p+1)))==56320&&(h=65536+(h-55296<<10)+(b-56320),p++),h<128?m[E++]=h:(h<2048?m[E++]=192|h>>>6:(h<65536?m[E++]=224|h>>>12:(m[E++]=240|h>>>18,m[E++]=128|h>>>12&63),m[E++]=128|h>>>6&63),m[E++]=128|63&h);return m},s.buf2binstring=function(f){return u(f,f.length)},s.binstring2buf=function(f){for(var m=new i.Buf8(f.length),h=0,b=m.length;h<b;h++)m[h]=f.charCodeAt(h);return m},s.buf2string=function(f,m){var h,b,p,E,g=m||f.length,y=new Array(2*g);for(h=b=0;h<g;)if((p=f[h++])<128)y[b++]=p;else if(4<(E=c[p]))y[b++]=65533,h+=E-1;else{for(p&=E===2?31:E===3?15:7;1<E&&h<g;)p=p<<6|63&f[h++],E--;1<E?y[b++]=65533:p<65536?y[b++]=p:(p-=65536,y[b++]=55296|p>>10&1023,y[b++]=56320|1023&p)}return u(y,b)},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,u=i>>>16&65535|0,f=0;o!==0;){for(o-=f=2e3<o?2e3:o;u=u+(l=l+a[c++]|0)|0,--f;);l%=65521,u%=65521}return l|u<<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 u=i,f=l+c;a^=-1;for(var m=l;m<f;m++)a=a>>>8^u[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"),u=n("./messages"),f=0,m=4,h=0,b=-2,p=-1,E=4,g=2,y=8,w=9,x=286,S=30,C=19,T=2*x+1,k=15,R=3,V=258,Q=V+R+1,A=42,W=113,_=1,Y=2,De=3,te=4;function Me(v,ue){return v.msg=u[ue],ue}function de(v){return(v<<1)-(4<v?9:0)}function Ue(v){for(var ue=v.length;0<=--ue;)v[ue]=0}function J(v){var ue=v.state,ne=ue.pending;ne>v.avail_out&&(ne=v.avail_out),ne!==0&&(a.arraySet(v.output,ue.pending_buf,ue.pending_out,ne,v.next_out),v.next_out+=ne,ue.pending_out+=ne,v.total_out+=ne,v.avail_out-=ne,ue.pending-=ne,ue.pending===0&&(ue.pending_out=0))}function Z(v,ue){o._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,ue),v.block_start=v.strstart,J(v.strm)}function Xe(v,ue){v.pending_buf[v.pending++]=ue}function Le(v,ue){v.pending_buf[v.pending++]=ue>>>8&255,v.pending_buf[v.pending++]=255&ue}function Re(v,ue){var ne,L,P=v.max_chain_length,G=v.strstart,U=v.prev_length,H=v.nice_match,$=v.strstart>v.w_size-Q?v.strstart-(v.w_size-Q):0,ie=v.window,Ie=v.w_mask,pe=v.prev,Ke=v.strstart+V,At=ie[G+U-1],mt=ie[G+U];v.prev_length>=v.good_match&&(P>>=2),H>v.lookahead&&(H=v.lookahead);do if(ie[(ne=ue)+U]===mt&&ie[ne+U-1]===At&&ie[ne]===ie[G]&&ie[++ne]===ie[G+1]){G+=2,ne++;do;while(ie[++G]===ie[++ne]&&ie[++G]===ie[++ne]&&ie[++G]===ie[++ne]&&ie[++G]===ie[++ne]&&ie[++G]===ie[++ne]&&ie[++G]===ie[++ne]&&ie[++G]===ie[++ne]&&ie[++G]===ie[++ne]&&G<Ke);if(L=V-(Ke-G),G=Ke-V,U<L){if(v.match_start=ue,H<=(U=L))break;At=ie[G+U-1],mt=ie[G+U]}}while((ue=pe[ue&Ie])>$&&--P!=0);return U<=v.lookahead?U:v.lookahead}function Je(v){var ue,ne,L,P,G,U,H,$,ie,Ie,pe=v.w_size;do{if(P=v.window_size-v.lookahead-v.strstart,v.strstart>=pe+(pe-Q)){for(a.arraySet(v.window,v.window,pe,pe,0),v.match_start-=pe,v.strstart-=pe,v.block_start-=pe,ue=ne=v.hash_size;L=v.head[--ue],v.head[ue]=pe<=L?L-pe:0,--ne;);for(ue=ne=pe;L=v.prev[--ue],v.prev[ue]=pe<=L?L-pe:0,--ne;);P+=pe}if(v.strm.avail_in===0)break;if(U=v.strm,H=v.window,$=v.strstart+v.lookahead,ie=P,Ie=void 0,Ie=U.avail_in,ie<Ie&&(Ie=ie),ne=Ie===0?0:(U.avail_in-=Ie,a.arraySet(H,U.input,U.next_in,Ie,$),U.state.wrap===1?U.adler=c(U.adler,H,Ie,$):U.state.wrap===2&&(U.adler=l(U.adler,H,Ie,$)),U.next_in+=Ie,U.total_in+=Ie,Ie),v.lookahead+=ne,v.lookahead+v.insert>=R)for(G=v.strstart-v.insert,v.ins_h=v.window[G],v.ins_h=(v.ins_h<<v.hash_shift^v.window[G+1])&v.hash_mask;v.insert&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[G+R-1])&v.hash_mask,v.prev[G&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=G,G++,v.insert--,!(v.lookahead+v.insert<R)););}while(v.lookahead<Q&&v.strm.avail_in!==0)}function Ht(v,ue){for(var ne,L;;){if(v.lookahead<Q){if(Je(v),v.lookahead<Q&&ue===f)return _;if(v.lookahead===0)break}if(ne=0,v.lookahead>=R&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,ne=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),ne!==0&&v.strstart-ne<=v.w_size-Q&&(v.match_length=Re(v,ne)),v.match_length>=R)if(L=o._tr_tally(v,v.strstart-v.match_start,v.match_length-R),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=R){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,ne=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart,--v.match_length!=0;);v.strstart++}else v.strstart+=v.match_length,v.match_length=0,v.ins_h=v.window[v.strstart],v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+1])&v.hash_mask;else L=o._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++;if(L&&(Z(v,!1),v.strm.avail_out===0))return _}return v.insert=v.strstart<R-1?v.strstart:R-1,ue===m?(Z(v,!0),v.strm.avail_out===0?De:te):v.last_lit&&(Z(v,!1),v.strm.avail_out===0)?_:Y}function ht(v,ue){for(var ne,L,P;;){if(v.lookahead<Q){if(Je(v),v.lookahead<Q&&ue===f)return _;if(v.lookahead===0)break}if(ne=0,v.lookahead>=R&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,ne=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),v.prev_length=v.match_length,v.prev_match=v.match_start,v.match_length=R-1,ne!==0&&v.prev_length<v.max_lazy_match&&v.strstart-ne<=v.w_size-Q&&(v.match_length=Re(v,ne),v.match_length<=5&&(v.strategy===1||v.match_length===R&&4096<v.strstart-v.match_start)&&(v.match_length=R-1)),v.prev_length>=R&&v.match_length<=v.prev_length){for(P=v.strstart+v.lookahead-R,L=o._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-R),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=P&&(v.ins_h=(v.ins_h<<v.hash_shift^v.window[v.strstart+R-1])&v.hash_mask,ne=v.prev[v.strstart&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=v.strstart),--v.prev_length!=0;);if(v.match_available=0,v.match_length=R-1,v.strstart++,L&&(Z(v,!1),v.strm.avail_out===0))return _}else if(v.match_available){if((L=o._tr_tally(v,0,v.window[v.strstart-1]))&&Z(v,!1),v.strstart++,v.lookahead--,v.strm.avail_out===0)return _}else v.match_available=1,v.strstart++,v.lookahead--}return v.match_available&&(L=o._tr_tally(v,0,v.window[v.strstart-1]),v.match_available=0),v.insert=v.strstart<R-1?v.strstart:R-1,ue===m?(Z(v,!0),v.strm.avail_out===0?De:te):v.last_lit&&(Z(v,!1),v.strm.avail_out===0)?_:Y}function Ve(v,ue,ne,L,P){this.good_length=v,this.max_lazy=ue,this.nice_length=ne,this.max_chain=L,this.func=P}function Nt(){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=y,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*T),this.dyn_dtree=new a.Buf16(2*(2*S+1)),this.bl_tree=new a.Buf16(2*(2*C+1)),Ue(this.dyn_ltree),Ue(this.dyn_dtree),Ue(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new a.Buf16(k+1),this.heap=new a.Buf16(2*x+1),Ue(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new a.Buf16(2*x+1),Ue(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 Dt(v){var ue;return v&&v.state?(v.total_in=v.total_out=0,v.data_type=g,(ue=v.state).pending=0,ue.pending_out=0,ue.wrap<0&&(ue.wrap=-ue.wrap),ue.status=ue.wrap?A:W,v.adler=ue.wrap===2?0:1,ue.last_flush=f,o._tr_init(ue),h):Me(v,b)}function er(v){var ue=Dt(v);return ue===h&&function(ne){ne.window_size=2*ne.w_size,Ue(ne.head),ne.max_lazy_match=i[ne.level].max_lazy,ne.good_match=i[ne.level].good_length,ne.nice_match=i[ne.level].nice_length,ne.max_chain_length=i[ne.level].max_chain,ne.strstart=0,ne.block_start=0,ne.lookahead=0,ne.insert=0,ne.match_length=ne.prev_length=R-1,ne.match_available=0,ne.ins_h=0}(v.state),ue}function vn(v,ue,ne,L,P,G){if(!v)return b;var U=1;if(ue===p&&(ue=6),L<0?(U=0,L=-L):15<L&&(U=2,L-=16),P<1||w<P||ne!==y||L<8||15<L||ue<0||9<ue||G<0||E<G)return Me(v,b);L===8&&(L=9);var H=new Nt;return(v.state=H).strm=v,H.wrap=U,H.gzhead=null,H.w_bits=L,H.w_size=1<<H.w_bits,H.w_mask=H.w_size-1,H.hash_bits=P+7,H.hash_size=1<<H.hash_bits,H.hash_mask=H.hash_size-1,H.hash_shift=~~((H.hash_bits+R-1)/R),H.window=new a.Buf8(2*H.w_size),H.head=new a.Buf16(H.hash_size),H.prev=new a.Buf16(H.w_size),H.lit_bufsize=1<<P+6,H.pending_buf_size=4*H.lit_bufsize,H.pending_buf=new a.Buf8(H.pending_buf_size),H.d_buf=1*H.lit_bufsize,H.l_buf=3*H.lit_bufsize,H.level=ue,H.strategy=G,H.method=ne,er(v)}i=[new Ve(0,0,0,0,function(v,ue){var ne=65535;for(ne>v.pending_buf_size-5&&(ne=v.pending_buf_size-5);;){if(v.lookahead<=1){if(Je(v),v.lookahead===0&&ue===f)return _;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var L=v.block_start+ne;if((v.strstart===0||v.strstart>=L)&&(v.lookahead=v.strstart-L,v.strstart=L,Z(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-Q&&(Z(v,!1),v.strm.avail_out===0))return _}return v.insert=0,ue===m?(Z(v,!0),v.strm.avail_out===0?De:te):(v.strstart>v.block_start&&(Z(v,!1),v.strm.avail_out),_)}),new Ve(4,4,8,4,Ht),new Ve(4,5,16,8,Ht),new Ve(4,6,32,32,Ht),new Ve(4,4,16,16,ht),new Ve(8,16,32,32,ht),new Ve(8,16,128,128,ht),new Ve(8,32,128,256,ht),new Ve(32,128,258,1024,ht),new Ve(32,258,258,4096,ht)],s.deflateInit=function(v,ue){return vn(v,ue,y,15,8,0)},s.deflateInit2=vn,s.deflateReset=er,s.deflateResetKeep=Dt,s.deflateSetHeader=function(v,ue){return v&&v.state?v.state.wrap!==2?b:(v.state.gzhead=ue,h):b},s.deflate=function(v,ue){var ne,L,P,G;if(!v||!v.state||5<ue||ue<0)return v?Me(v,b):b;if(L=v.state,!v.output||!v.input&&v.avail_in!==0||L.status===666&&ue!==m)return Me(v,v.avail_out===0?-5:b);if(L.strm=v,ne=L.last_flush,L.last_flush=ue,L.status===A)if(L.wrap===2)v.adler=0,Xe(L,31),Xe(L,139),Xe(L,8),L.gzhead?(Xe(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)),Xe(L,255&L.gzhead.time),Xe(L,L.gzhead.time>>8&255),Xe(L,L.gzhead.time>>16&255),Xe(L,L.gzhead.time>>24&255),Xe(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),Xe(L,255&L.gzhead.os),L.gzhead.extra&&L.gzhead.extra.length&&(Xe(L,255&L.gzhead.extra.length),Xe(L,L.gzhead.extra.length>>8&255)),L.gzhead.hcrc&&(v.adler=l(v.adler,L.pending_buf,L.pending,0)),L.gzindex=0,L.status=69):(Xe(L,0),Xe(L,0),Xe(L,0),Xe(L,0),Xe(L,0),Xe(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),Xe(L,3),L.status=W);else{var U=y+(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=W,Le(L,U),L.strstart!==0&&(Le(L,v.adler>>>16),Le(L,65535&v.adler)),v.adler=1}if(L.status===69)if(L.gzhead.extra){for(P=L.pending;L.gzindex<(65535&L.gzhead.extra.length)&&(L.pending!==L.pending_buf_size||(L.gzhead.hcrc&&L.pending>P&&(v.adler=l(v.adler,L.pending_buf,L.pending-P,P)),J(v),P=L.pending,L.pending!==L.pending_buf_size));)Xe(L,255&L.gzhead.extra[L.gzindex]),L.gzindex++;L.gzhead.hcrc&&L.pending>P&&(v.adler=l(v.adler,L.pending_buf,L.pending-P,P)),L.gzindex===L.gzhead.extra.length&&(L.gzindex=0,L.status=73)}else L.status=73;if(L.status===73)if(L.gzhead.name){P=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>P&&(v.adler=l(v.adler,L.pending_buf,L.pending-P,P)),J(v),P=L.pending,L.pending===L.pending_buf_size)){G=1;break}G=L.gzindex<L.gzhead.name.length?255&L.gzhead.name.charCodeAt(L.gzindex++):0,Xe(L,G)}while(G!==0);L.gzhead.hcrc&&L.pending>P&&(v.adler=l(v.adler,L.pending_buf,L.pending-P,P)),G===0&&(L.gzindex=0,L.status=91)}else L.status=91;if(L.status===91)if(L.gzhead.comment){P=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>P&&(v.adler=l(v.adler,L.pending_buf,L.pending-P,P)),J(v),P=L.pending,L.pending===L.pending_buf_size)){G=1;break}G=L.gzindex<L.gzhead.comment.length?255&L.gzhead.comment.charCodeAt(L.gzindex++):0,Xe(L,G)}while(G!==0);L.gzhead.hcrc&&L.pending>P&&(v.adler=l(v.adler,L.pending_buf,L.pending-P,P)),G===0&&(L.status=103)}else L.status=103;if(L.status===103&&(L.gzhead.hcrc?(L.pending+2>L.pending_buf_size&&J(v),L.pending+2<=L.pending_buf_size&&(Xe(L,255&v.adler),Xe(L,v.adler>>8&255),v.adler=0,L.status=W)):L.status=W),L.pending!==0){if(J(v),v.avail_out===0)return L.last_flush=-1,h}else if(v.avail_in===0&&de(ue)<=de(ne)&&ue!==m)return Me(v,-5);if(L.status===666&&v.avail_in!==0)return Me(v,-5);if(v.avail_in!==0||L.lookahead!==0||ue!==f&&L.status!==666){var H=L.strategy===2?function($,ie){for(var Ie;;){if($.lookahead===0&&(Je($),$.lookahead===0)){if(ie===f)return _;break}if($.match_length=0,Ie=o._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,Ie&&(Z($,!1),$.strm.avail_out===0))return _}return $.insert=0,ie===m?(Z($,!0),$.strm.avail_out===0?De:te):$.last_lit&&(Z($,!1),$.strm.avail_out===0)?_:Y}(L,ue):L.strategy===3?function($,ie){for(var Ie,pe,Ke,At,mt=$.window;;){if($.lookahead<=V){if(Je($),$.lookahead<=V&&ie===f)return _;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=R&&0<$.strstart&&(pe=mt[Ke=$.strstart-1])===mt[++Ke]&&pe===mt[++Ke]&&pe===mt[++Ke]){At=$.strstart+V;do;while(pe===mt[++Ke]&&pe===mt[++Ke]&&pe===mt[++Ke]&&pe===mt[++Ke]&&pe===mt[++Ke]&&pe===mt[++Ke]&&pe===mt[++Ke]&&pe===mt[++Ke]&&Ke<At);$.match_length=V-(At-Ke),$.match_length>$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=R?(Ie=o._tr_tally($,1,$.match_length-R),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(Ie=o._tr_tally($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),Ie&&(Z($,!1),$.strm.avail_out===0))return _}return $.insert=0,ie===m?(Z($,!0),$.strm.avail_out===0?De:te):$.last_lit&&(Z($,!1),$.strm.avail_out===0)?_:Y}(L,ue):i[L.level].func(L,ue);if(H!==De&&H!==te||(L.status=666),H===_||H===De)return v.avail_out===0&&(L.last_flush=-1),h;if(H===Y&&(ue===1?o._tr_align(L):ue!==5&&(o._tr_stored_block(L,0,0,!1),ue===3&&(Ue(L.head),L.lookahead===0&&(L.strstart=0,L.block_start=0,L.insert=0))),J(v),v.avail_out===0))return L.last_flush=-1,h}return ue!==m?h:L.wrap<=0?1:(L.wrap===2?(Xe(L,255&v.adler),Xe(L,v.adler>>8&255),Xe(L,v.adler>>16&255),Xe(L,v.adler>>24&255),Xe(L,255&v.total_in),Xe(L,v.total_in>>8&255),Xe(L,v.total_in>>16&255),Xe(L,v.total_in>>24&255)):(Le(L,v.adler>>>16),Le(L,65535&v.adler)),J(v),0<L.wrap&&(L.wrap=-L.wrap),L.pending!==0?h:1)},s.deflateEnd=function(v){var ue;return v&&v.state?(ue=v.state.status)!==A&&ue!==69&&ue!==73&&ue!==91&&ue!==103&&ue!==W&&ue!==666?Me(v,b):(v.state=null,ue===W?Me(v,-3):h):b},s.deflateSetDictionary=function(v,ue){var ne,L,P,G,U,H,$,ie,Ie=ue.length;if(!v||!v.state||(G=(ne=v.state).wrap)===2||G===1&&ne.status!==A||ne.lookahead)return b;for(G===1&&(v.adler=c(v.adler,ue,Ie,0)),ne.wrap=0,Ie>=ne.w_size&&(G===0&&(Ue(ne.head),ne.strstart=0,ne.block_start=0,ne.insert=0),ie=new a.Buf8(ne.w_size),a.arraySet(ie,ue,Ie-ne.w_size,ne.w_size,0),ue=ie,Ie=ne.w_size),U=v.avail_in,H=v.next_in,$=v.input,v.avail_in=Ie,v.next_in=0,v.input=ue,Je(ne);ne.lookahead>=R;){for(L=ne.strstart,P=ne.lookahead-(R-1);ne.ins_h=(ne.ins_h<<ne.hash_shift^ne.window[L+R-1])&ne.hash_mask,ne.prev[L&ne.w_mask]=ne.head[ne.ins_h],ne.head[ne.ins_h]=L,L++,--P;);ne.strstart=L,ne.lookahead=R-1,Je(ne)}return ne.strstart+=ne.lookahead,ne.block_start=ne.strstart,ne.insert=ne.lookahead,ne.lookahead=0,ne.match_length=ne.prev_length=R-1,ne.match_available=0,v.next_in=H,v.input=$,v.avail_in=U,ne.wrap=G,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,u,f,m,h,b,p,E,g,y,w,x,S,C,T,k,R,V,Q,A,W,_,Y;o=i.state,c=i.next_in,_=i.input,l=c+(i.avail_in-5),u=i.next_out,Y=i.output,f=u-(a-i.avail_out),m=u+(i.avail_out-257),h=o.dmax,b=o.wsize,p=o.whave,E=o.wnext,g=o.window,y=o.hold,w=o.bits,x=o.lencode,S=o.distcode,C=(1<<o.lenbits)-1,T=(1<<o.distbits)-1;e:do{w<15&&(y+=_[c++]<<w,w+=8,y+=_[c++]<<w,w+=8),k=x[y&C];t:for(;;){if(y>>>=R=k>>>24,w-=R,(R=k>>>16&255)===0)Y[u++]=65535&k;else{if(!(16&R)){if((64&R)==0){k=x[(65535&k)+(y&(1<<R)-1)];continue t}if(32&R){o.mode=12;break e}i.msg="invalid literal/length code",o.mode=30;break e}V=65535&k,(R&=15)&&(w<R&&(y+=_[c++]<<w,w+=8),V+=y&(1<<R)-1,y>>>=R,w-=R),w<15&&(y+=_[c++]<<w,w+=8,y+=_[c++]<<w,w+=8),k=S[y&T];n:for(;;){if(y>>>=R=k>>>24,w-=R,!(16&(R=k>>>16&255))){if((64&R)==0){k=S[(65535&k)+(y&(1<<R)-1)];continue n}i.msg="invalid distance code",o.mode=30;break e}if(Q=65535&k,w<(R&=15)&&(y+=_[c++]<<w,(w+=8)<R&&(y+=_[c++]<<w,w+=8)),h<(Q+=y&(1<<R)-1)){i.msg="invalid distance too far back",o.mode=30;break e}if(y>>>=R,w-=R,(R=u-f)<Q){if(p<(R=Q-R)&&o.sane){i.msg="invalid distance too far back",o.mode=30;break e}if(W=g,(A=0)===E){if(A+=b-R,R<V){for(V-=R;Y[u++]=g[A++],--R;);A=u-Q,W=Y}}else if(E<R){if(A+=b+E-R,(R-=E)<V){for(V-=R;Y[u++]=g[A++],--R;);if(A=0,E<V){for(V-=R=E;Y[u++]=g[A++],--R;);A=u-Q,W=Y}}}else if(A+=E-R,R<V){for(V-=R;Y[u++]=g[A++],--R;);A=u-Q,W=Y}for(;2<V;)Y[u++]=W[A++],Y[u++]=W[A++],Y[u++]=W[A++],V-=3;V&&(Y[u++]=W[A++],1<V&&(Y[u++]=W[A++]))}else{for(A=u-Q;Y[u++]=Y[A++],Y[u++]=Y[A++],Y[u++]=Y[A++],2<(V-=3););V&&(Y[u++]=Y[A++],1<V&&(Y[u++]=Y[A++]))}break}}break}}while(c<l&&u<m);c-=V=w>>3,y&=(1<<(w-=V<<3))-1,i.next_in=c,i.next_out=u,i.avail_in=c<l?l-c+5:5-(c-l),i.avail_out=u<m?m-u+257:257-(u-m),o.hold=y,o.bits=w}},{}],49:[function(n,r,s){var i=n("../utils/common"),a=n("./adler32"),o=n("./crc32"),c=n("./inffast"),l=n("./inftrees"),u=1,f=2,m=0,h=-2,b=1,p=852,E=592;function g(A){return(A>>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function y(){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 w(A){var W;return A&&A.state?(W=A.state,A.total_in=A.total_out=W.total=0,A.msg="",W.wrap&&(A.adler=1&W.wrap),W.mode=b,W.last=0,W.havedict=0,W.dmax=32768,W.head=null,W.hold=0,W.bits=0,W.lencode=W.lendyn=new i.Buf32(p),W.distcode=W.distdyn=new i.Buf32(E),W.sane=1,W.back=-1,m):h}function x(A){var W;return A&&A.state?((W=A.state).wsize=0,W.whave=0,W.wnext=0,w(A)):h}function S(A,W){var _,Y;return A&&A.state?(Y=A.state,W<0?(_=0,W=-W):(_=1+(W>>4),W<48&&(W&=15)),W&&(W<8||15<W)?h:(Y.window!==null&&Y.wbits!==W&&(Y.window=null),Y.wrap=_,Y.wbits=W,x(A))):h}function C(A,W){var _,Y;return A?(Y=new y,(A.state=Y).window=null,(_=S(A,W))!==m&&(A.state=null),_):h}var T,k,R=!0;function V(A){if(R){var W;for(T=new i.Buf32(512),k=new i.Buf32(32),W=0;W<144;)A.lens[W++]=8;for(;W<256;)A.lens[W++]=9;for(;W<280;)A.lens[W++]=7;for(;W<288;)A.lens[W++]=8;for(l(u,A.lens,0,288,T,0,A.work,{bits:9}),W=0;W<32;)A.lens[W++]=5;l(f,A.lens,0,32,k,0,A.work,{bits:5}),R=!1}A.lencode=T,A.lenbits=9,A.distcode=k,A.distbits=5}function Q(A,W,_,Y){var De,te=A.state;return te.window===null&&(te.wsize=1<<te.wbits,te.wnext=0,te.whave=0,te.window=new i.Buf8(te.wsize)),Y>=te.wsize?(i.arraySet(te.window,W,_-te.wsize,te.wsize,0),te.wnext=0,te.whave=te.wsize):(Y<(De=te.wsize-te.wnext)&&(De=Y),i.arraySet(te.window,W,_-Y,De,te.wnext),(Y-=De)?(i.arraySet(te.window,W,_-Y,Y,0),te.wnext=Y,te.whave=te.wsize):(te.wnext+=De,te.wnext===te.wsize&&(te.wnext=0),te.whave<te.wsize&&(te.whave+=De))),0}s.inflateReset=x,s.inflateReset2=S,s.inflateResetKeep=w,s.inflateInit=function(A){return C(A,15)},s.inflateInit2=C,s.inflate=function(A,W){var _,Y,De,te,Me,de,Ue,J,Z,Xe,Le,Re,Je,Ht,ht,Ve,Nt,Dt,er,vn,v,ue,ne,L,P=0,G=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(!A||!A.state||!A.output||!A.input&&A.avail_in!==0)return h;(_=A.state).mode===12&&(_.mode=13),Me=A.next_out,De=A.output,Ue=A.avail_out,te=A.next_in,Y=A.input,de=A.avail_in,J=_.hold,Z=_.bits,Xe=de,Le=Ue,ue=m;e:for(;;)switch(_.mode){case b:if(_.wrap===0){_.mode=13;break}for(;Z<16;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(2&_.wrap&&J===35615){G[_.check=0]=255&J,G[1]=J>>>8&255,_.check=o(_.check,G,2,0),Z=J=0,_.mode=2;break}if(_.flags=0,_.head&&(_.head.done=!1),!(1&_.wrap)||(((255&J)<<8)+(J>>8))%31){A.msg="incorrect header check",_.mode=30;break}if((15&J)!=8){A.msg="unknown compression method",_.mode=30;break}if(Z-=4,v=8+(15&(J>>>=4)),_.wbits===0)_.wbits=v;else if(v>_.wbits){A.msg="invalid window size",_.mode=30;break}_.dmax=1<<v,A.adler=_.check=1,_.mode=512&J?10:12,Z=J=0;break;case 2:for(;Z<16;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(_.flags=J,(255&_.flags)!=8){A.msg="unknown compression method",_.mode=30;break}if(57344&_.flags){A.msg="unknown header flags set",_.mode=30;break}_.head&&(_.head.text=J>>8&1),512&_.flags&&(G[0]=255&J,G[1]=J>>>8&255,_.check=o(_.check,G,2,0)),Z=J=0,_.mode=3;case 3:for(;Z<32;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}_.head&&(_.head.time=J),512&_.flags&&(G[0]=255&J,G[1]=J>>>8&255,G[2]=J>>>16&255,G[3]=J>>>24&255,_.check=o(_.check,G,4,0)),Z=J=0,_.mode=4;case 4:for(;Z<16;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}_.head&&(_.head.xflags=255&J,_.head.os=J>>8),512&_.flags&&(G[0]=255&J,G[1]=J>>>8&255,_.check=o(_.check,G,2,0)),Z=J=0,_.mode=5;case 5:if(1024&_.flags){for(;Z<16;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}_.length=J,_.head&&(_.head.extra_len=J),512&_.flags&&(G[0]=255&J,G[1]=J>>>8&255,_.check=o(_.check,G,2,0)),Z=J=0}else _.head&&(_.head.extra=null);_.mode=6;case 6:if(1024&_.flags&&(de<(Re=_.length)&&(Re=de),Re&&(_.head&&(v=_.head.extra_len-_.length,_.head.extra||(_.head.extra=new Array(_.head.extra_len)),i.arraySet(_.head.extra,Y,te,Re,v)),512&_.flags&&(_.check=o(_.check,Y,Re,te)),de-=Re,te+=Re,_.length-=Re),_.length))break e;_.length=0,_.mode=7;case 7:if(2048&_.flags){if(de===0)break e;for(Re=0;v=Y[te+Re++],_.head&&v&&_.length<65536&&(_.head.name+=String.fromCharCode(v)),v&&Re<de;);if(512&_.flags&&(_.check=o(_.check,Y,Re,te)),de-=Re,te+=Re,v)break e}else _.head&&(_.head.name=null);_.length=0,_.mode=8;case 8:if(4096&_.flags){if(de===0)break e;for(Re=0;v=Y[te+Re++],_.head&&v&&_.length<65536&&(_.head.comment+=String.fromCharCode(v)),v&&Re<de;);if(512&_.flags&&(_.check=o(_.check,Y,Re,te)),de-=Re,te+=Re,v)break e}else _.head&&(_.head.comment=null);_.mode=9;case 9:if(512&_.flags){for(;Z<16;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(J!==(65535&_.check)){A.msg="header crc mismatch",_.mode=30;break}Z=J=0}_.head&&(_.head.hcrc=_.flags>>9&1,_.head.done=!0),A.adler=_.check=0,_.mode=12;break;case 10:for(;Z<32;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}A.adler=_.check=g(J),Z=J=0,_.mode=11;case 11:if(_.havedict===0)return A.next_out=Me,A.avail_out=Ue,A.next_in=te,A.avail_in=de,_.hold=J,_.bits=Z,2;A.adler=_.check=1,_.mode=12;case 12:if(W===5||W===6)break e;case 13:if(_.last){J>>>=7&Z,Z-=7&Z,_.mode=27;break}for(;Z<3;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}switch(_.last=1&J,Z-=1,3&(J>>>=1)){case 0:_.mode=14;break;case 1:if(V(_),_.mode=20,W!==6)break;J>>>=2,Z-=2;break e;case 2:_.mode=17;break;case 3:A.msg="invalid block type",_.mode=30}J>>>=2,Z-=2;break;case 14:for(J>>>=7&Z,Z-=7&Z;Z<32;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if((65535&J)!=(J>>>16^65535)){A.msg="invalid stored block lengths",_.mode=30;break}if(_.length=65535&J,Z=J=0,_.mode=15,W===6)break e;case 15:_.mode=16;case 16:if(Re=_.length){if(de<Re&&(Re=de),Ue<Re&&(Re=Ue),Re===0)break e;i.arraySet(De,Y,te,Re,Me),de-=Re,te+=Re,Ue-=Re,Me+=Re,_.length-=Re;break}_.mode=12;break;case 17:for(;Z<14;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(_.nlen=257+(31&J),J>>>=5,Z-=5,_.ndist=1+(31&J),J>>>=5,Z-=5,_.ncode=4+(15&J),J>>>=4,Z-=4,286<_.nlen||30<_.ndist){A.msg="too many length or distance symbols",_.mode=30;break}_.have=0,_.mode=18;case 18:for(;_.have<_.ncode;){for(;Z<3;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}_.lens[U[_.have++]]=7&J,J>>>=3,Z-=3}for(;_.have<19;)_.lens[U[_.have++]]=0;if(_.lencode=_.lendyn,_.lenbits=7,ne={bits:_.lenbits},ue=l(0,_.lens,0,19,_.lencode,0,_.work,ne),_.lenbits=ne.bits,ue){A.msg="invalid code lengths set",_.mode=30;break}_.have=0,_.mode=19;case 19:for(;_.have<_.nlen+_.ndist;){for(;Ve=(P=_.lencode[J&(1<<_.lenbits)-1])>>>16&255,Nt=65535&P,!((ht=P>>>24)<=Z);){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(Nt<16)J>>>=ht,Z-=ht,_.lens[_.have++]=Nt;else{if(Nt===16){for(L=ht+2;Z<L;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(J>>>=ht,Z-=ht,_.have===0){A.msg="invalid bit length repeat",_.mode=30;break}v=_.lens[_.have-1],Re=3+(3&J),J>>>=2,Z-=2}else if(Nt===17){for(L=ht+3;Z<L;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}Z-=ht,v=0,Re=3+(7&(J>>>=ht)),J>>>=3,Z-=3}else{for(L=ht+7;Z<L;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}Z-=ht,v=0,Re=11+(127&(J>>>=ht)),J>>>=7,Z-=7}if(_.have+Re>_.nlen+_.ndist){A.msg="invalid bit length repeat",_.mode=30;break}for(;Re--;)_.lens[_.have++]=v}}if(_.mode===30)break;if(_.lens[256]===0){A.msg="invalid code -- missing end-of-block",_.mode=30;break}if(_.lenbits=9,ne={bits:_.lenbits},ue=l(u,_.lens,0,_.nlen,_.lencode,0,_.work,ne),_.lenbits=ne.bits,ue){A.msg="invalid literal/lengths set",_.mode=30;break}if(_.distbits=6,_.distcode=_.distdyn,ne={bits:_.distbits},ue=l(f,_.lens,_.nlen,_.ndist,_.distcode,0,_.work,ne),_.distbits=ne.bits,ue){A.msg="invalid distances set",_.mode=30;break}if(_.mode=20,W===6)break e;case 20:_.mode=21;case 21:if(6<=de&&258<=Ue){A.next_out=Me,A.avail_out=Ue,A.next_in=te,A.avail_in=de,_.hold=J,_.bits=Z,c(A,Le),Me=A.next_out,De=A.output,Ue=A.avail_out,te=A.next_in,Y=A.input,de=A.avail_in,J=_.hold,Z=_.bits,_.mode===12&&(_.back=-1);break}for(_.back=0;Ve=(P=_.lencode[J&(1<<_.lenbits)-1])>>>16&255,Nt=65535&P,!((ht=P>>>24)<=Z);){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(Ve&&(240&Ve)==0){for(Dt=ht,er=Ve,vn=Nt;Ve=(P=_.lencode[vn+((J&(1<<Dt+er)-1)>>Dt)])>>>16&255,Nt=65535&P,!(Dt+(ht=P>>>24)<=Z);){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}J>>>=Dt,Z-=Dt,_.back+=Dt}if(J>>>=ht,Z-=ht,_.back+=ht,_.length=Nt,Ve===0){_.mode=26;break}if(32&Ve){_.back=-1,_.mode=12;break}if(64&Ve){A.msg="invalid literal/length code",_.mode=30;break}_.extra=15&Ve,_.mode=22;case 22:if(_.extra){for(L=_.extra;Z<L;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}_.length+=J&(1<<_.extra)-1,J>>>=_.extra,Z-=_.extra,_.back+=_.extra}_.was=_.length,_.mode=23;case 23:for(;Ve=(P=_.distcode[J&(1<<_.distbits)-1])>>>16&255,Nt=65535&P,!((ht=P>>>24)<=Z);){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if((240&Ve)==0){for(Dt=ht,er=Ve,vn=Nt;Ve=(P=_.distcode[vn+((J&(1<<Dt+er)-1)>>Dt)])>>>16&255,Nt=65535&P,!(Dt+(ht=P>>>24)<=Z);){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}J>>>=Dt,Z-=Dt,_.back+=Dt}if(J>>>=ht,Z-=ht,_.back+=ht,64&Ve){A.msg="invalid distance code",_.mode=30;break}_.offset=Nt,_.extra=15&Ve,_.mode=24;case 24:if(_.extra){for(L=_.extra;Z<L;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}_.offset+=J&(1<<_.extra)-1,J>>>=_.extra,Z-=_.extra,_.back+=_.extra}if(_.offset>_.dmax){A.msg="invalid distance too far back",_.mode=30;break}_.mode=25;case 25:if(Ue===0)break e;if(Re=Le-Ue,_.offset>Re){if((Re=_.offset-Re)>_.whave&&_.sane){A.msg="invalid distance too far back",_.mode=30;break}Je=Re>_.wnext?(Re-=_.wnext,_.wsize-Re):_.wnext-Re,Re>_.length&&(Re=_.length),Ht=_.window}else Ht=De,Je=Me-_.offset,Re=_.length;for(Ue<Re&&(Re=Ue),Ue-=Re,_.length-=Re;De[Me++]=Ht[Je++],--Re;);_.length===0&&(_.mode=21);break;case 26:if(Ue===0)break e;De[Me++]=_.length,Ue--,_.mode=21;break;case 27:if(_.wrap){for(;Z<32;){if(de===0)break e;de--,J|=Y[te++]<<Z,Z+=8}if(Le-=Ue,A.total_out+=Le,_.total+=Le,Le&&(A.adler=_.check=_.flags?o(_.check,De,Le,Me-Le):a(_.check,De,Le,Me-Le)),Le=Ue,(_.flags?J:g(J))!==_.check){A.msg="incorrect data check",_.mode=30;break}Z=J=0}_.mode=28;case 28:if(_.wrap&&_.flags){for(;Z<32;){if(de===0)break e;de--,J+=Y[te++]<<Z,Z+=8}if(J!==(4294967295&_.total)){A.msg="incorrect length check",_.mode=30;break}Z=J=0}_.mode=29;case 29:ue=1;break e;case 30:ue=-3;break e;case 31:return-4;case 32:default:return h}return A.next_out=Me,A.avail_out=Ue,A.next_in=te,A.avail_in=de,_.hold=J,_.bits=Z,(_.wsize||Le!==A.avail_out&&_.mode<30&&(_.mode<27||W!==4))&&Q(A,A.output,A.next_out,Le-A.avail_out)?(_.mode=31,-4):(Xe-=A.avail_in,Le-=A.avail_out,A.total_in+=Xe,A.total_out+=Le,_.total+=Le,_.wrap&&Le&&(A.adler=_.check=_.flags?o(_.check,De,Le,A.next_out-Le):a(_.check,De,Le,A.next_out-Le)),A.data_type=_.bits+(_.last?64:0)+(_.mode===12?128:0)+(_.mode===20||_.mode===15?256:0),(Xe==0&&Le===0||W===4)&&ue===m&&(ue=-5),ue)},s.inflateEnd=function(A){if(!A||!A.state)return h;var W=A.state;return W.window&&(W.window=null),A.state=null,m},s.inflateGetHeader=function(A,W){var _;return A&&A.state?(2&(_=A.state).wrap)==0?h:((_.head=W).done=!1,m):h},s.inflateSetDictionary=function(A,W){var _,Y=W.length;return A&&A.state?(_=A.state).wrap!==0&&_.mode!==11?h:_.mode===11&&a(1,W,Y,0)!==_.check?-3:Q(A,W,Y,Y)?(_.mode=31,-4):(_.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(u,f,m,h,b,p,E,g){var y,w,x,S,C,T,k,R,V,Q=g.bits,A=0,W=0,_=0,Y=0,De=0,te=0,Me=0,de=0,Ue=0,J=0,Z=null,Xe=0,Le=new i.Buf16(16),Re=new i.Buf16(16),Je=null,Ht=0;for(A=0;A<=15;A++)Le[A]=0;for(W=0;W<h;W++)Le[f[m+W]]++;for(De=Q,Y=15;1<=Y&&Le[Y]===0;Y--);if(Y<De&&(De=Y),Y===0)return b[p++]=20971520,b[p++]=20971520,g.bits=1,0;for(_=1;_<Y&&Le[_]===0;_++);for(De<_&&(De=_),A=de=1;A<=15;A++)if(de<<=1,(de-=Le[A])<0)return-1;if(0<de&&(u===0||Y!==1))return-1;for(Re[1]=0,A=1;A<15;A++)Re[A+1]=Re[A]+Le[A];for(W=0;W<h;W++)f[m+W]!==0&&(E[Re[f[m+W]]++]=W);if(T=u===0?(Z=Je=E,19):u===1?(Z=a,Xe-=257,Je=o,Ht-=257,256):(Z=c,Je=l,-1),A=_,C=p,Me=W=J=0,x=-1,S=(Ue=1<<(te=De))-1,u===1&&852<Ue||u===2&&592<Ue)return 1;for(;;){for(k=A-Me,V=E[W]<T?(R=0,E[W]):E[W]>T?(R=Je[Ht+E[W]],Z[Xe+E[W]]):(R=96,0),y=1<<A-Me,_=w=1<<te;b[C+(J>>Me)+(w-=y)]=k<<24|R<<16|V|0,w!==0;);for(y=1<<A-1;J&y;)y>>=1;if(y!==0?(J&=y-1,J+=y):J=0,W++,--Le[A]==0){if(A===Y)break;A=f[m+E[W]]}if(De<A&&(J&S)!==x){for(Me===0&&(Me=De),C+=_,de=1<<(te=A-Me);te+Me<Y&&!((de-=Le[te+Me])<=0);)te++,de<<=1;if(Ue+=1<<te,u===1&&852<Ue||u===2&&592<Ue)return 1;b[x=J&S]=De<<24|te<<16|C-p|0}}return J!==0&&(b[C+J]=A-Me<<24|64<<16|0),g.bits=De,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(P){for(var G=P.length;0<=--G;)P[G]=0}var l=0,u=29,f=256,m=f+1+u,h=30,b=19,p=2*m+1,E=15,g=16,y=7,w=256,x=16,S=17,C=18,T=[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],k=[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],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=new Array(2*(m+2));c(Q);var A=new Array(2*h);c(A);var W=new Array(512);c(W);var _=new Array(256);c(_);var Y=new Array(u);c(Y);var De,te,Me,de=new Array(h);function Ue(P,G,U,H,$){this.static_tree=P,this.extra_bits=G,this.extra_base=U,this.elems=H,this.max_length=$,this.has_stree=P&&P.length}function J(P,G){this.dyn_tree=P,this.max_code=0,this.stat_desc=G}function Z(P){return P<256?W[P]:W[256+(P>>>7)]}function Xe(P,G){P.pending_buf[P.pending++]=255&G,P.pending_buf[P.pending++]=G>>>8&255}function Le(P,G,U){P.bi_valid>g-U?(P.bi_buf|=G<<P.bi_valid&65535,Xe(P,P.bi_buf),P.bi_buf=G>>g-P.bi_valid,P.bi_valid+=U-g):(P.bi_buf|=G<<P.bi_valid&65535,P.bi_valid+=U)}function Re(P,G,U){Le(P,U[2*G],U[2*G+1])}function Je(P,G){for(var U=0;U|=1&P,P>>>=1,U<<=1,0<--G;);return U>>>1}function Ht(P,G,U){var H,$,ie=new Array(E+1),Ie=0;for(H=1;H<=E;H++)ie[H]=Ie=Ie+U[H-1]<<1;for($=0;$<=G;$++){var pe=P[2*$+1];pe!==0&&(P[2*$]=Je(ie[pe]++,pe))}}function ht(P){var G;for(G=0;G<m;G++)P.dyn_ltree[2*G]=0;for(G=0;G<h;G++)P.dyn_dtree[2*G]=0;for(G=0;G<b;G++)P.bl_tree[2*G]=0;P.dyn_ltree[2*w]=1,P.opt_len=P.static_len=0,P.last_lit=P.matches=0}function Ve(P){8<P.bi_valid?Xe(P,P.bi_buf):0<P.bi_valid&&(P.pending_buf[P.pending++]=P.bi_buf),P.bi_buf=0,P.bi_valid=0}function Nt(P,G,U,H){var $=2*G,ie=2*U;return P[$]<P[ie]||P[$]===P[ie]&&H[G]<=H[U]}function Dt(P,G,U){for(var H=P.heap[U],$=U<<1;$<=P.heap_len&&($<P.heap_len&&Nt(G,P.heap[$+1],P.heap[$],P.depth)&&$++,!Nt(G,H,P.heap[$],P.depth));)P.heap[U]=P.heap[$],U=$,$<<=1;P.heap[U]=H}function er(P,G,U){var H,$,ie,Ie,pe=0;if(P.last_lit!==0)for(;H=P.pending_buf[P.d_buf+2*pe]<<8|P.pending_buf[P.d_buf+2*pe+1],$=P.pending_buf[P.l_buf+pe],pe++,H===0?Re(P,$,G):(Re(P,(ie=_[$])+f+1,G),(Ie=T[ie])!==0&&Le(P,$-=Y[ie],Ie),Re(P,ie=Z(--H),U),(Ie=k[ie])!==0&&Le(P,H-=de[ie],Ie)),pe<P.last_lit;);Re(P,w,G)}function vn(P,G){var U,H,$,ie=G.dyn_tree,Ie=G.stat_desc.static_tree,pe=G.stat_desc.has_stree,Ke=G.stat_desc.elems,At=-1;for(P.heap_len=0,P.heap_max=p,U=0;U<Ke;U++)ie[2*U]!==0?(P.heap[++P.heap_len]=At=U,P.depth[U]=0):ie[2*U+1]=0;for(;P.heap_len<2;)ie[2*($=P.heap[++P.heap_len]=At<2?++At:0)]=1,P.depth[$]=0,P.opt_len--,pe&&(P.static_len-=Ie[2*$+1]);for(G.max_code=At,U=P.heap_len>>1;1<=U;U--)Dt(P,ie,U);for($=Ke;U=P.heap[1],P.heap[1]=P.heap[P.heap_len--],Dt(P,ie,1),H=P.heap[1],P.heap[--P.heap_max]=U,P.heap[--P.heap_max]=H,ie[2*$]=ie[2*U]+ie[2*H],P.depth[$]=(P.depth[U]>=P.depth[H]?P.depth[U]:P.depth[H])+1,ie[2*U+1]=ie[2*H+1]=$,P.heap[1]=$++,Dt(P,ie,1),2<=P.heap_len;);P.heap[--P.heap_max]=P.heap[1],function(mt,Gn){var Ns,tr,rs,Kt,Nr,Ti,Ee=Gn.dyn_tree,Ye=Gn.max_code,ct=Gn.stat_desc.static_tree,Ut=Gn.stat_desc.has_stree,En=Gn.stat_desc.extra_bits,Pn=Gn.stat_desc.extra_base,_n=Gn.stat_desc.max_length,Ft=0;for(Kt=0;Kt<=E;Kt++)mt.bl_count[Kt]=0;for(Ee[2*mt.heap[mt.heap_max]+1]=0,Ns=mt.heap_max+1;Ns<p;Ns++)_n<(Kt=Ee[2*Ee[2*(tr=mt.heap[Ns])+1]+1]+1)&&(Kt=_n,Ft++),Ee[2*tr+1]=Kt,Ye<tr||(mt.bl_count[Kt]++,Nr=0,Pn<=tr&&(Nr=En[tr-Pn]),Ti=Ee[2*tr],mt.opt_len+=Ti*(Kt+Nr),Ut&&(mt.static_len+=Ti*(ct[2*tr+1]+Nr)));if(Ft!==0){do{for(Kt=_n-1;mt.bl_count[Kt]===0;)Kt--;mt.bl_count[Kt]--,mt.bl_count[Kt+1]+=2,mt.bl_count[_n]--,Ft-=2}while(0<Ft);for(Kt=_n;Kt!==0;Kt--)for(tr=mt.bl_count[Kt];tr!==0;)Ye<(rs=mt.heap[--Ns])||(Ee[2*rs+1]!==Kt&&(mt.opt_len+=(Kt-Ee[2*rs+1])*Ee[2*rs],Ee[2*rs+1]=Kt),tr--)}}(P,G),Ht(ie,At,P.bl_count)}function v(P,G,U){var H,$,ie=-1,Ie=G[1],pe=0,Ke=7,At=4;for(Ie===0&&(Ke=138,At=3),G[2*(U+1)+1]=65535,H=0;H<=U;H++)$=Ie,Ie=G[2*(H+1)+1],++pe<Ke&&$===Ie||(pe<At?P.bl_tree[2*$]+=pe:$!==0?($!==ie&&P.bl_tree[2*$]++,P.bl_tree[2*x]++):pe<=10?P.bl_tree[2*S]++:P.bl_tree[2*C]++,ie=$,At=(pe=0)===Ie?(Ke=138,3):$===Ie?(Ke=6,3):(Ke=7,4))}function ue(P,G,U){var H,$,ie=-1,Ie=G[1],pe=0,Ke=7,At=4;for(Ie===0&&(Ke=138,At=3),H=0;H<=U;H++)if($=Ie,Ie=G[2*(H+1)+1],!(++pe<Ke&&$===Ie)){if(pe<At)for(;Re(P,$,P.bl_tree),--pe!=0;);else $!==0?($!==ie&&(Re(P,$,P.bl_tree),pe--),Re(P,x,P.bl_tree),Le(P,pe-3,2)):pe<=10?(Re(P,S,P.bl_tree),Le(P,pe-3,3)):(Re(P,C,P.bl_tree),Le(P,pe-11,7));ie=$,At=(pe=0)===Ie?(Ke=138,3):$===Ie?(Ke=6,3):(Ke=7,4)}}c(de);var ne=!1;function L(P,G,U,H){Le(P,(l<<1)+(H?1:0),3),function($,ie,Ie,pe){Ve($),Xe($,Ie),Xe($,~Ie),i.arraySet($.pending_buf,$.window,ie,Ie,$.pending),$.pending+=Ie}(P,G,U)}s._tr_init=function(P){ne||(function(){var G,U,H,$,ie,Ie=new Array(E+1);for($=H=0;$<u-1;$++)for(Y[$]=H,G=0;G<1<<T[$];G++)_[H++]=$;for(_[H-1]=$,$=ie=0;$<16;$++)for(de[$]=ie,G=0;G<1<<k[$];G++)W[ie++]=$;for(ie>>=7;$<h;$++)for(de[$]=ie<<7,G=0;G<1<<k[$]-7;G++)W[256+ie++]=$;for(U=0;U<=E;U++)Ie[U]=0;for(G=0;G<=143;)Q[2*G+1]=8,G++,Ie[8]++;for(;G<=255;)Q[2*G+1]=9,G++,Ie[9]++;for(;G<=279;)Q[2*G+1]=7,G++,Ie[7]++;for(;G<=287;)Q[2*G+1]=8,G++,Ie[8]++;for(Ht(Q,m+1,Ie),G=0;G<h;G++)A[2*G+1]=5,A[2*G]=Je(G,5);De=new Ue(Q,T,f+1,m,E),te=new Ue(A,k,0,h,E),Me=new Ue(new Array(0),R,0,b,y)}(),ne=!0),P.l_desc=new J(P.dyn_ltree,De),P.d_desc=new J(P.dyn_dtree,te),P.bl_desc=new J(P.bl_tree,Me),P.bi_buf=0,P.bi_valid=0,ht(P)},s._tr_stored_block=L,s._tr_flush_block=function(P,G,U,H){var $,ie,Ie=0;0<P.level?(P.strm.data_type===2&&(P.strm.data_type=function(pe){var Ke,At=4093624447;for(Ke=0;Ke<=31;Ke++,At>>>=1)if(1&At&&pe.dyn_ltree[2*Ke]!==0)return a;if(pe.dyn_ltree[18]!==0||pe.dyn_ltree[20]!==0||pe.dyn_ltree[26]!==0)return o;for(Ke=32;Ke<f;Ke++)if(pe.dyn_ltree[2*Ke]!==0)return o;return a}(P)),vn(P,P.l_desc),vn(P,P.d_desc),Ie=function(pe){var Ke;for(v(pe,pe.dyn_ltree,pe.l_desc.max_code),v(pe,pe.dyn_dtree,pe.d_desc.max_code),vn(pe,pe.bl_desc),Ke=b-1;3<=Ke&&pe.bl_tree[2*V[Ke]+1]===0;Ke--);return pe.opt_len+=3*(Ke+1)+5+5+4,Ke}(P),$=P.opt_len+3+7>>>3,(ie=P.static_len+3+7>>>3)<=$&&($=ie)):$=ie=U+5,U+4<=$&&G!==-1?L(P,G,U,H):P.strategy===4||ie===$?(Le(P,2+(H?1:0),3),er(P,Q,A)):(Le(P,4+(H?1:0),3),function(pe,Ke,At,mt){var Gn;for(Le(pe,Ke-257,5),Le(pe,At-1,5),Le(pe,mt-4,4),Gn=0;Gn<mt;Gn++)Le(pe,pe.bl_tree[2*V[Gn]+1],3);ue(pe,pe.dyn_ltree,Ke-1),ue(pe,pe.dyn_dtree,At-1)}(P,P.l_desc.max_code+1,P.d_desc.max_code+1,Ie+1),er(P,P.dyn_ltree,P.dyn_dtree)),ht(P),H&&Ve(P)},s._tr_tally=function(P,G,U){return P.pending_buf[P.d_buf+2*P.last_lit]=G>>>8&255,P.pending_buf[P.d_buf+2*P.last_lit+1]=255&G,P.pending_buf[P.l_buf+P.last_lit]=255&U,P.last_lit++,G===0?P.dyn_ltree[2*U]++:(P.matches++,G--,P.dyn_ltree[2*(_[U]+f+1)]++,P.dyn_dtree[2*Z(G)]++),P.last_lit===P.lit_bufsize-1},s._tr_align=function(P){Le(P,2,3),Re(P,w,Q),function(G){G.bi_valid===16?(Xe(G,G.bi_buf),G.bi_buf=0,G.bi_valid=0):8<=G.bi_valid&&(G.pending_buf[G.pending++]=255&G.bi_buf,G.bi_buf>>=8,G.bi_valid-=8)}(P)}},{"../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,u,f,m=1,h={},b=!1,p=a.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(a);E=E&&E.setTimeout?E:a,c={}.toString.call(a.process)==="[object process]"?function(x){process.nextTick(function(){y(x)})}:function(){if(a.postMessage&&!a.importScripts){var x=!0,S=a.onmessage;return a.onmessage=function(){x=!1},a.postMessage("","*"),a.onmessage=S,x}}()?(f="setImmediate$"+Math.random()+"$",a.addEventListener?a.addEventListener("message",w,!1):a.attachEvent("onmessage",w),function(x){a.postMessage(f+x,"*")}):a.MessageChannel?((u=new MessageChannel).port1.onmessage=function(x){y(x.data)},function(x){u.port2.postMessage(x)}):p&&"onreadystatechange"in p.createElement("script")?(l=p.documentElement,function(x){var S=p.createElement("script");S.onreadystatechange=function(){y(x),S.onreadystatechange=null,l.removeChild(S),S=null},l.appendChild(S)}):function(x){setTimeout(y,0,x)},E.setImmediate=function(x){typeof x!="function"&&(x=new Function(""+x));for(var S=new Array(arguments.length-1),C=0;C<S.length;C++)S[C]=arguments[C+1];var T={callback:x,args:S};return h[m]=T,c(m),m++},E.clearImmediate=g}function g(x){delete h[x]}function y(x){if(b)setTimeout(y,0,x);else{var S=h[x];if(S){b=!0;try{(function(C){var T=C.callback,k=C.args;switch(k.length){case 0:T();break;case 1:T(k[0]);break;case 2:T(k[0],k[1]);break;case 3:T(k[0],k[1],k[2]);break;default:T.apply(o,k)}})(S)}finally{g(x),b=!1}}}}function w(x){x.source===a&&typeof x.data=="string"&&x.data.indexOf(f)===0&&y(+x.data.slice(f.length))}})(typeof self>"u"?i===void 0?this:i:self)}).call(this,typeof Yu<"u"?Yu:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(Em)),Em.exports}var LZ=DZ();const MZ=bv(LZ);async function FZ(e,t){const n=await hw(e,t);if(globalThis.document){const r=document.createElement("a");r.href=URL.createObjectURL(n),r.download="notebook.zip",r.click()}}async function hw(e,t){const n=new MZ;if((t==null?void 0:t.withoutZip)!==!0){const r=await(await fetch((t==null?void 0: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"})}async function zZ(e,t,n){const r=(n==null?void 0:n.renderHtmlFn)??Ls,s=e.notebook,i={},a=UZ();let o=0,c=0;function l(E){return c+=o,g=>{o=g*E,t.percentage((c+o)*100)}}t.log(`=== 开始编译 ${s.name} ===`);let u=l(.4);const f=await P2(s.id);function m(E){var y,w,x;const g=((y=e.__skipBuilds__[E.id])==null?void 0:y.refs)??[];for(const S of g){const C=(w=f.find(k=>k.id===S))==null?void 0:w.hash,T=(x=e.__skipBuilds__[S])==null?void 0:x.hash;if(C===void 0||T===void 0)return!1;if(C===T)continue;return!1}return!0}t.log("=== 查询文档级block完成 ===");let h=0;await Promise.all(f.map(async E=>{const g=await N2(O2(E));i[E.hpath]={sy:g,docBlock:E},h++,u(h/f.length)}));const b={};u=l(.4);const p=Ih.version!==e.OceanPress.version?(t.log(`配置文件版本号[${e.OceanPress.version}]与OceanPress版本[${Ih.version}]不一致,将进行文档全量编译`),!1):e.enableIncrementalCompilation_doc;if(t.log("=== 开始渲染文档 ==="),await Promise.all(Object.entries(i).map(async([E,{sy:g,docBlock:y}])=>{var w,x;if(!(e.enableIncrementalCompilation&&p&&((w=e.__skipBuilds__[y.id])==null?void 0:w.hash)===y.hash&&m(y))){try{const S=E.split("/").length-2,C=fw();if(b[E+".html"]=await IZ({title:((x=g.Properties)==null?void 0:x.title)||"",htmlContent:await r(g,C),level:S},{...Bh.cdn,embedCode:e.embedCode}),e.sitemap.rss&&E.endsWith(".rss.xml")){const T=E;b[T]=await NZ(T,C,e),t.log(`渲染 rss.xml:${T} 完毕`)}e.enableIncrementalCompilation&&e.enableIncrementalCompilation_doc&&a.add(y.id,{hash:y.hash}),a.add(y.id,{refs:[...C.refs.values()]})}catch(S){t.log(`${E} 渲染失败:${S}`),console.log(S)}u(h/f.length),t.log(`渲染完毕:${E}`)}})),t.log("=== 渲染文档完成 ==="),t.log("=== 开始生成 sitemap.xml ==="),e.sitemap.enable&&(b["sitemap.xml"]=OZ(f,e.sitemap)),e.excludeAssetsCopy===!1){t.log("=== 开始复制资源文件 ===");const E=await Bl.query_sql({stmt:`SELECT * from assets
1727
+ WHERE box = '${s.id}'
1728
+ limit 150000 OFFSET 0`});await Promise.all(E.map(async w=>{var x;e.enableIncrementalCompilation&&((x=e.__skipBuilds__[w.id])==null?void 0:x.hash)===w.hash||(b[w.path]=await Bl.get_assets({path:w.path}),e.enableIncrementalCompilation&&a.add(w.id,{hash:w.hash}))})),t.log("=== 开始复制挂件资源文件 ===");const g=await Bl.query_sql({stmt:`
1729
+ SELECT *
1730
+ from blocks
1731
+ WHERE box = '${s.id}'
1732
+ AND type = 'widget'
1733
+ limit 150000 OFFSET 0
1734
+ `}),y=(await Promise.all(g.map(async w=>await px(w.id)))).filter(w=>{var x;return(x=w==null?void 0:w.Properties)==null?void 0:x["custom-oceanpress-widget-update"]}).map(async w=>{var S,C;if(!w||!(w!=null&&w.ID))return;const x=(S=w==null?void 0:w.Properties)==null?void 0:S["custom-oceanpress-widget-update"];if(!(e.enableIncrementalCompilation&&((C=e.__skipBuilds__[w.ID])==null?void 0:C.updated)===x)){const T=w.ID;b[`assets/widget/${T}.jpg`]=await Bl.file_getFile({path:`data/storage/oceanpress/widget_img/${T}.jpg`}),e.enableIncrementalCompilation&&a.add(T,{updated:x})}});await Promise.all(y)}return n!=null&&n.onFileTree&&n.onFileTree(b),e.compressedZip&&(t.log("=== 开始生成压缩包 ==="),await FZ(b,{withoutZip:Bh.withoutPublicZip,publicZip:Bh.cdn.publicZip})),e.OceanPress.version=Ih.version,a.write(),t.percentage(100),t.log("编译完毕"),{fileTree:b}}function UZ(){const e={};return{add(t,n){e[t]===void 0&&(e[t]={}),Zp(e[t],n)},write(){Zp(et.value.__skipBuilds__,e)}}}async function $Z(...[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)):u()}async function u(){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 u=[...o,l];return new Proxy(function(...f){const m=u.join(".");return s(m,f)},i(u))},apply(c,l,u){const f=o.join(".");return s(f,u)}}}return{API:new Proxy(function(){},i()),RC:s}}class HZ{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 mw{constructor(t){this.generateIdentifier=t,this.kv=new HZ}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 qZ extends mw{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 jZ(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 WZ(e,t){const n=jZ(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 Uc(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function of(e,t){return e.indexOf(t)!==-1}function ix(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}class GZ{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return WZ(this.transfomers,n=>n.isApplicable(t))}findByName(t){return this.transfomers[t]}}const VZ=e=>Object.prototype.toString.call(e).slice(8,-1),bw=e=>typeof e>"u",KZ=e=>e===null,bu=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,$b=e=>bu(e)&&Object.keys(e).length===0,ta=e=>Array.isArray(e),YZ=e=>typeof e=="string",XZ=e=>typeof e=="number"&&!isNaN(e),QZ=e=>typeof e=="boolean",ZZ=e=>e instanceof RegExp,gu=e=>e instanceof Map,pu=e=>e instanceof Set,gw=e=>VZ(e)==="Symbol",JZ=e=>e instanceof Date&&!isNaN(e.valueOf()),eJ=e=>e instanceof Error,ax=e=>typeof e=="number"&&isNaN(e),tJ=e=>QZ(e)||KZ(e)||bw(e)||XZ(e)||YZ(e)||gw(e),nJ=e=>typeof e=="bigint",rJ=e=>e===1/0||e===-1/0,sJ=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),iJ=e=>e instanceof URL,pw=e=>e.replace(/\./g,"\\."),Cm=e=>e.map(String).map(pw).join("."),Ql=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 Ks(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const yw=[Ks(bw,"undefined",()=>null,()=>{}),Ks(nJ,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Ks(JZ,"Date",e=>e.toISOString(),e=>new Date(e)),Ks(eJ,"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}),Ks(ZZ,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Ks(pu,"set",e=>[...e.values()],e=>new Set(e)),Ks(gu,"map",e=>[...e.entries()],e=>new Map(e)),Ks(e=>ax(e)||rJ(e),"number",e=>ax(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Ks(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Ks(iJ,"URL",e=>e.toString(),e=>new URL(e))];function kh(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}const Ew=kh((e,t)=>gw(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}),aJ=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),Cw=kh(sJ,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=aJ[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function xw(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}const vw=kh(xw,(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)}),_w=kh((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)}),oJ=[vw,Ew,_w,Cw],ox=(e,t)=>{const n=ix(oJ,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=ix(yw,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},Tw={};yw.forEach(e=>{Tw[e.annotation]=e});const cJ=(e,t,n)=>{if(ta(t))switch(t[0]){case"symbol":return Ew.untransform(e,t,n);case"class":return vw.untransform(e,t,n);case"custom":return _w.untransform(e,t,n);case"typed-array":return Cw.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=Tw[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}},qo=(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 Sw(e){if(of(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(of(e,"prototype"))throw new Error("prototype is not allowed as a property");if(of(e,"constructor"))throw new Error("constructor is not allowed as a property")}const lJ=(e,t)=>{Sw(t);for(let n=0;n<t.length;n++){const r=t[n];if(pu(e))e=qo(e,+r);else if(gu(e)){const s=+r,i=+t[++n]==0?"key":"value",a=qo(e,s);switch(i){case"key":e=a;break;case"value":e=e.get(a);break}}else e=e[r]}return e},Hb=(e,t,n)=>{if(Sw(t),t.length===0)return n(e);let r=e;for(let i=0;i<t.length-1;i++){const a=t[i];if(ta(r)){const o=+a;r=r[o]}else if(bu(r))r=r[a];else if(pu(r)){const o=+a;r=qo(r,o)}else if(gu(r)){if(i===t.length-2)break;const c=+a,l=+t[++i]==0?"key":"value",u=qo(r,c);switch(l){case"key":r=u;break;case"value":r=r.get(u);break}}}const s=t[t.length-1];if(ta(r)?r[+s]=n(r[+s]):bu(r)&&(r[s]=n(r[s])),pu(r)){const i=qo(r,+s),a=n(i);i!==a&&(r.delete(i),r.add(a))}if(gu(r)){const i=+t[t.length-2],a=qo(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 qb(e,t,n=[]){if(!e)return;if(!ta(e)){Uc(e,(i,a)=>qb(i,t,[...n,...Ql(a)]));return}const[r,s]=e;s&&Uc(s,(i,a)=>{qb(i,t,[...n,...Ql(a)])}),t(r,n)}function uJ(e,t,n){return qb(t,(r,s)=>{e=Hb(e,s,i=>cJ(i,r,n))}),e}function dJ(e,t){function n(r,s){const i=lJ(e,Ql(s));r.map(Ql).forEach(a=>{e=Hb(e,a,()=>i)})}if(ta(t)){const[r,s]=t;r.forEach(i=>{e=Hb(e,Ql(i),()=>e)}),s&&Uc(s,n)}else Uc(t,n);return e}const fJ=(e,t)=>bu(e)||ta(e)||gu(e)||pu(e)||xw(e,t);function hJ(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function mJ(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(Cm):n[Cm(i)]=a.map(Cm)}),r?$b(n)?[r]:[r,n]:$b(n)?void 0:n}const ww=(e,t,n,r,s=[],i=[],a=new Map)=>{const o=tJ(e);if(!o){hJ(e,s,t);const h=a.get(e);if(h)return r?{transformedValue:null}:h}if(!fJ(e,n)){const h=ox(e,n),b=h?{transformedValue:h.value,annotations:[h.type]}:{transformedValue:e};return o||a.set(e,b),b}if(of(i,e))return{transformedValue:null};const c=ox(e,n),l=(c==null?void 0:c.value)??e,u=ta(l)?[]:{},f={};Uc(l,(h,b)=>{if(b==="__proto__"||b==="constructor"||b==="prototype")throw new Error(`Detected property ${b}. This is a prototype pollution risk, please remove it from your object.`);const p=ww(h,t,n,r,[...s,b],[...i,e],a);u[b]=p.transformedValue,ta(p.annotations)?f[b]=p.annotations:bu(p.annotations)&&Uc(p.annotations,(E,g)=>{f[pw(b)+"."+g]=E})});const m=$b(f)?{transformedValue:u,annotations:c?[c.type]:void 0}:{transformedValue:u,annotations:c?[c.type,f]:f};return o||a.set(e,m),m};function Aw(e){return Object.prototype.toString.call(e).slice(8,-1)}function cx(e){return Aw(e)==="Array"}function bJ(e){if(Aw(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function gJ(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 jb(e,t={}){if(cx(e))return e.map(s=>jb(s,t));if(!bJ(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((s,i)=>{if(cx(t.props)&&!t.props.includes(i))return s;const a=e[i],o=jb(a,t);return gJ(s,i,o,e,t.nonenumerable),s},{})}class hn{constructor({dedupe:t=!1}={}){this.classRegistry=new qZ,this.symbolRegistry=new mw(n=>n.description??""),this.customTransformerRegistry=new GZ,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const n=new Map,r=ww(t,n,this,this.dedupe),s={json:r.transformedValue};r.annotations&&(s.meta={...s.meta,values:r.annotations});const i=mJ(n,this.dedupe);return i&&(s.meta={...s.meta,referentialEqualities:i}),s}deserialize(t){const{json:n,meta:r}=t;let s=jb(n);return r!=null&&r.values&&(s=uJ(s,r.values,this)),r!=null&&r.referentialEqualities&&(s=dJ(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)}}hn.defaultInstance=new hn;hn.serialize=hn.defaultInstance.serialize.bind(hn.defaultInstance);hn.deserialize=hn.defaultInstance.deserialize.bind(hn.defaultInstance);hn.stringify=hn.defaultInstance.stringify.bind(hn.defaultInstance);hn.parse=hn.defaultInstance.parse.bind(hn.defaultInstance);hn.registerClass=hn.defaultInstance.registerClass.bind(hn.defaultInstance);hn.registerSymbol=hn.defaultInstance.registerSymbol.bind(hn.defaultInstance);hn.registerCustom=hn.defaultInstance.registerCustom.bind(hn.defaultInstance);hn.allowErrorProps=hn.defaultInstance.allowErrorProps.bind(hn.defaultInstance);const pJ=hn.stringify;function yJ(e){return{async build_onFileTree([n],r){r(n);const s=await $Z("apiConsumer",{async remoteCall(f,m){let h,b;return m[0]instanceof ReadableStream?(h=await new Response(m[0]).blob(),b="application/octet-stream"):(h=pJ(m),console.log("[body]",h),b="application/json"),fetch(`${e.oceanPressServer.apiBase}/api/${f}`,{method:"POST",body:h,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})}}),i=await hw(n,{withoutZip:!0}),a=i.size/(1024*1024);console.log("[zip.size in MB]",a.toFixed(2));const o=i.stream(),{chunkCount:c,fileId:l}=await s.API.upload(o);console.log("[res]",{chunkCount:c,fileId:l});const u=await s.API.deploy({zipFileId:l});console.log("[deploy res]",u)}}}class EJ{constructor(t){ge(this,"funMap",{build:zZ,build_renderHTML:Ls,build_onFileTree:t=>{}});ge(this,"pluginCenter",new p4(this.funMap));this.config=t,t.meilisearch.enable&&this.pluginCenter.registerPlugin(new g4(t.meilisearch)),t.s3.enable&&this.pluginCenter.registerPlugin(kZ),t.oceanPressServer.enable&&this.pluginCenter.registerPlugin(yJ(this.config))}async build(t){return this.pluginCenter.fun.build(this.config,t,{renderHtmlFn:this.pluginCenter.fun.build_renderHTML,onFileTree:this.pluginCenter.fun.build_onFileTree})}}function CJ(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Yb(e)}const xJ=bt({setup(){const e=lR(),t=Fe(!1),n=Fe(""),r=ze(()=>Object.entries(Ao).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 Ao?e.warning("不能和已有的配置项重名"):(D2(n.value),t.value=!1)}function i(c){return c.startsWith("__")?(e.warning("名称不能以双下划线开头"),!1):!0}function a(){const c=JSON.stringify(Ao,null,2),u=new TextEncoder().encode(c),f=new Blob([u],{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 u=await(await new Promise(m=>{c.addEventListener("change",()=>{m(c.files[0])})})).text(),f=JSON.parse(u);typeof f=="object"&&(console.log(f),L2(f),e.success("导入成功"))}return{showModal:t,name:n,tabs:r,add:s,validateInput:i,downConfig:a,importConfig:o}},render(){let e;return Be("div",null,[Be(GR,{value:Ao.__current__,"onUpdate:value":t=>Ao.__current__=t,type:"card",animated:!0,addable:!0,closable:!0,onAdd:()=>this.showModal=!0,onClose:t=>delete Ao[t]},CJ(e=this.tabs.map(t=>Be(HR,{name:t.key,tab:t.key},{default:()=>[t.key]})))?e:{default:()=>[e]}),Be(Or,null,null),Be(ER,{align:"center"},{default:()=>[Be(Hi,{onClick:this.importConfig},{default:()=>[zt("导入配置文件")],icon:()=>"📂"}),Be(Hi,{onClick:this.downConfig},{default:()=>[zt("导出配置文件")],icon:()=>"📝"})]}),Be(cR,{show:this.showModal,"onUpdate:show":t=>this.showModal=t},{default:()=>[Be(zx,{style:"width: 600px",title:"输入配置名",bordered:!1,size:"huge",role:"dialog","aria-modal":"true"},{default:()=>[Be(or,{value:this.name,"onUpdate:value":t=>this.name=t,placeholder:"输入配置名",maxlength:30,"show-count":!0,"clearable:allow-input":this.validateInput},null),Be("br",null,null),Be("br",null,null),Be(Hi,{type:"primary",onClick:()=>this.add(),disabled:!this.validateInput(this.name)},{default:()=>[zt("确认")]}),Be("br",null,null),zt("不能以双下划线(__)开头、也不能为空、不能和已有的配置项重名")]})]})])}});function vJ(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Yb(e)}const _J=bt({props:{notebooks:{type:Array,required:!0}},setup(e){const t=ze({get:()=>et.value.notebook.id,set:r=>{Object.assign(et.value.notebook,e.notebooks.find(s=>s.id===r))}}),n=sn(e,"notebooks");return{value:t,notebooks:n}},render(){let e;return Be(Zf,{title:"选择笔记本",description:"选择你需要的笔记本"},{default:()=>[Be(Vk,{value:this.value,"onUpdate:value":t=>this.value=t},vJ(e=this.notebooks.map(t=>Be(qk,{key:t.id,label:t.name,value:t.id},null)))?e:{default:()=>[e]})]})}}),TJ=bt({render(){return Be(Zf,{title:"其他配置"},{default:()=>[Be(Dk,null,{default:()=>[Be(Vu,{title:"打包选项",name:"1",style:"text-align: start"},{default:()=>[Be(Ri,{checked:et.value.compressedZip,"onUpdate:checked":e=>et.value.compressedZip=e},{default:()=>[zt("打包成 zip(在浏览器端打包完毕后会弹出保存对话窗口)")]}),Be(Or,null,null),Be(Ri,{checked:et.value.excludeAssetsCopy,"onUpdate:checked":e=>et.value.excludeAssetsCopy=e},{default:()=>[zt("不复制 assets/ 资源,勾选此选项则需要自行处理资源文件")]}),Be(Or,null,null),Be(Ri,{checked:et.value.sitemap.enable,"onUpdate:checked":e=>et.value.sitemap.enable=e},{default:()=>[zt("输出 sitemap.xml 文件")]}),Be("br",null,null),Be("h4",null,[zt("路径前缀")]),Be(or,{value:et.value.sitemap.sitePrefix,"onUpdate:value":e=>et.value.sitemap.sitePrefix=e},null),zt('默认值为 "." 生成路径例如 "./record/思源笔记.html" '),Be("br",null,null),zt('但 sitemap 并不建议采用相对路径所以应该替换成例如 "https://shenzilong.cn" '),Be("br",null,null),zt('则会生成 "https://shenzilong.cn/record/思源笔记.html" 这样的绝对路径'),Be("br",null,null),zt("参见 https://www.sitemaps.org/protocol.html#escaping"),Be(Or,null,null),Be(Ri,{checked:et.value.enableIncrementalCompilation,"onUpdate:checked":e=>et.value.enableIncrementalCompilation=e},{default:()=>[zt("开启增量编译,当资源的 hash 值没有变化时不会编译"),Be("br",null,null),zt("会根据配置文件中的__skipBuilds__字段跳过一些没有变化不需要重新输出的内容"),Be("br",null,null)]}),Be("br",null,null),Be(Ri,{checked:et.value.enableIncrementalCompilation_doc,"onUpdate:checked":e=>et.value.enableIncrementalCompilation_doc=e},{default:()=>[zt("增量编译文档,当需要重新全量编译文档时不勾选此项,需要上方选项勾选,此选项才能生效")]}),Be(Or,null,null),Be("h3",null,[zt("head")]),zt("此处的代码将添加至 head 标签顶部"),Be(or,{value:et.value.embedCode.head,"onUpdate:value":e=>et.value.embedCode.head=e,type:"textarea"},null),Be("h3",null,[zt("beforeBody")]),zt("此处的代码将添加至 body 标签顶部"),Be(or,{value:et.value.embedCode.beforeBody,"onUpdate:value":e=>et.value.embedCode.beforeBody=e,type:"textarea"},null),Be("h3",null,[zt("afterBody")]),zt("此处的代码将添加至 body 标签底部"),Be(or,{value:et.value.embedCode.afterBody,"onUpdate:value":e=>et.value.embedCode.afterBody=e,type:"textarea"},null)]}),Be(Vu,{title:"meilisearch 配置",name:"3"},{default:()=>[Be(Ri,{checked:et.value.meilisearch.enable,"onUpdate:checked":e=>et.value.meilisearch.enable=e},{default:()=>[zt("启用 meilisearch 搜索引擎")]}),Be("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"},[zt("自建meilisearch搜索")]),Be(Or,null,null),Be(or,{value:et.value.meilisearch.host,"onUpdate:value":e=>et.value.meilisearch.host=e,placeholder:"meilisearch.host"},null),Be(Or,null,null),Be(or,{value:et.value.meilisearch.apiKey,"onUpdate:value":e=>et.value.meilisearch.apiKey=e,placeholder:"meilisearch.apiKey"},null),Be(Or,null,null),Be(or,{value:et.value.meilisearch.indexName,"onUpdate:value":e=>et.value.meilisearch.indexName=e,placeholder:"meilisearch.indexName"},null)]}),Be(Vu,{title:"部署到 S3",name:"4"},{default:()=>[zt("OceanPress 的运算都是在本地,不会收集密钥,请确保网址是 https 加密的 oceanpress.heartstack.space"),Be("br",null,null),Be(Ri,{checked:et.value.s3.enable,"onUpdate:checked":e=>et.value.s3.enable=e},{default:()=>[zt("启用 s3")]}),Be(or,{value:et.value.s3.region,"onUpdate:value":e=>et.value.s3.region=e,placeholder:"s3.region"},null),Be(Or,null,null),Be(or,{value:et.value.s3.bucket,"onUpdate:value":e=>et.value.s3.bucket=e,placeholder:"s3.bucket"},null),Be(Or,null,null),Be(or,{value:et.value.s3.pathPrefix,"onUpdate:value":e=>et.value.s3.pathPrefix=e,placeholder:"s3.pathPrefix"},null),Be(Or,null,null),Be(or,{value:et.value.s3.endpoint,"onUpdate:value":e=>et.value.s3.endpoint=e,placeholder:"s3.endpoint"},null),Be(Or,null,null),Be(or,{value:et.value.s3.accessKeyId,"onUpdate:value":e=>et.value.s3.accessKeyId=e,placeholder:"s3.accessKeyId"},null),Be(Or,null,null),Be(or,{value:et.value.s3.secretAccessKey,"onUpdate:value":e=>et.value.s3.secretAccessKey=e,type:"password",placeholder:"s3.secretAccessKey"},null)]}),Be(Vu,{title:"部署到 OceanPress Server",name:"5"},{default:()=>[Be(Ri,{checked:et.value.oceanPressServer.enable,"onUpdate:checked":e=>et.value.oceanPressServer.enable=e},{default:()=>[zt("启用 OceanPress Server")]}),Be(Or,null,null),Be(or,{value:et.value.oceanPressServer.apiBase,"onUpdate:value":e=>et.value.oceanPressServer.apiBase=e,placeholder:"apiBase"},null),Be(Or,null,null),Be(or,{value:et.value.oceanPressServer.apiKey,"onUpdate:value":e=>et.value.oceanPressServer.apiKey=e,placeholder:"apiKey"},null)]})]})]})}}),SJ=bt({props:{percentage:{type:Number,default:0},log:{type:String,default:""}},emits:{saveToDisk(e){},generateClick(){},uploadS3(){}},setup(e,t){const n=ze(()=>"showDirectoryPicker"in globalThis);async function r(){const s=await showDirectoryPicker({mode:"readwrite"});if(!s){console.log("showDirectoryPicker() 未返回有效值");return}t.emit("saveToDisk",s)}return()=>Be(Zf,{title:"开始生成",description:"点击开始生成后请耐心等待,生成完成后会自动弹出下载"},{default:()=>[Be("div",null,[Be(Hi,{type:"success",loading:e.percentage>0&&e.percentage<100,onClick:()=>t.emit("generateClick")},{default:()=>[zt("开始生成")]})," ",Be(Hi,{disabled:!n,type:"success",loading:e.percentage>0&&e.percentage<100,onClick:()=>r()},{default:()=>[zt("保存到本地磁盘")]}),Be(DR,{type:"line",percentage:e.percentage,"indicator-placement":"inside",style:{marginTop:"12px"}},null),Be("pre",null,[e.log])])]})}}),OJ=bt({setup(){const e=M2.notebook_lsNotebooks(),t=ze(()=>{let a=0;return e.value.fulfilled&&(a=2),a=5,a}),n=Fe(0),r=Fe(!1),s=Fe("");async function i(a){r.value=!0,s.value="";const o=new EJ(et.value);a!=null&&a.dir_ref&&o.pluginCenter.registerPlugin({build_onFileTree([c]){wJ(c,a.dir_ref)}}),await o.build({log:c=>{s.value+=c+`
1735
+ `},percentage:c=>{n.value=c}}),r.value=!1,n.value=100}return()=>Be(na,null,[Be(xJ,null,null),Be(UR,{vertical:!0,current:t.value,status:"process"},{default:()=>[Be(Zf,{title:"鉴权配置"},{default:()=>[zt("http apiPrefix:"),Be(or,{"show-password-on":"mousedown",placeholder:"例如: http:127.0.0.1:6806",value:et.value.apiPrefix,"onUpdate:value":a=>et.value.apiPrefix=a},null),zt("authorized:"),Be(fk,null,{default:()=>[Be(or,{type:"password","show-password-on":"mousedown",placeholder:"输入:siyuan-设置-关于-API授权码",value:et.value.authorized,"onUpdate:value":a=>et.value.authorized=a},null),Be(Hi,{type:"primary",ghost:!0,onClick:e.value.reLoad},{default:()=>[zt("确定")]})]})]}),e.value.fulfilled&&Be(_J,{notebooks:e.value.data.notebooks},null),Be(TJ,null,null),Be(SJ,{percentage:n.value,log:s.value,onGenerateClick:()=>i(),onSaveToDisk:a=>i({dir_ref:a})},null)]})])}});async function wJ(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 u=a[l];u!==""&&(r=await r.getDirectoryHandle(u,{create:!0}))}const c=await(await r.getFileHandle(a[a.length-1],{create:!0})).createWritable();await c.write(i),await c.close()}}export{OJ as default};