You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3869 lines
1.5 MiB
3869 lines
1.5 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[1512],{65030:function(Qt,ct,Le){"use strict";Le.d(ct,{Z:function(){return ye}});var Ne=Le(33885),ot=Le(42978),o=Le(75931),_=Le(43403),j=Le(92310),h=Le.n(j),d=Le(29301),p=Le(76846),b=Le(96452),g=Le(6089),w=Le(80402),c=Le(34280),m=Le(49658),v=Le(59301),y=Le(54476),E=Le(77900),T=Le(8654);function S(V){var Q=V.prefixCls,U=V.align,H=V.arrow,ee=V.arrowPos,W=H||{},M=W.className,$=W.content,ce=ee.x,Ce=ce===void 0?0:ce,Ue=ee.y,_e=Ue===void 0?0:Ue,he=v.useRef();if(!U||!U.points)return null;var Te={position:"absolute"};if(U.autoArrow!==!1){var Pe=U.points[0],Ve=U.points[1],De=Pe[0],Xe=Pe[1],Ke=Ve[0],$e=Ve[1];De===Ke||!["t","b"].includes(De)?Te.top=_e:De==="t"?Te.top=0:Te.bottom=0,Xe===$e||!["l","r"].includes(Xe)?Te.left=Ce:Xe==="l"?Te.left=0:Te.right=0}return v.createElement("div",{ref:he,className:h()("".concat(Q,"-arrow"),M),style:Te},$)}function C(V){var Q=V.prefixCls,U=V.open,H=V.zIndex,ee=V.mask,W=V.motion;return ee?v.createElement(E.default,(0,y.Z)({},W,{motionAppear:!0,visible:U,removeOnLeave:!0}),function(M){var $=M.className;return v.createElement("div",{style:{zIndex:H},className:h()("".concat(Q,"-mask"),$)})}):null}var x=v.memo(function(V){var Q=V.children;return Q},function(V,Q){return Q.cache}),O=x,J=v.forwardRef(function(V,Q){var U=V.popup,H=V.className,ee=V.prefixCls,W=V.style,M=V.target,$=V.onVisibleChanged,ce=V.open,Ce=V.keepDom,Ue=V.fresh,_e=V.onClick,he=V.mask,Te=V.arrow,Pe=V.arrowPos,Ve=V.align,De=V.motion,Xe=V.maskMotion,Ke=V.forceRender,$e=V.getPopupContainer,Je=V.autoDestroy,nt=V.portal,et=V.zIndex,ht=V.onMouseEnter,Et=V.onMouseLeave,zt=V.onPointerEnter,dr=V.onPointerDownCapture,wr=V.ready,hr=V.offsetX,nr=V.offsetY,kt=V.offsetR,Zt=V.offsetB,Xt=V.onAlign,Jt=V.onPrepare,Ot=V.stretch,pr=V.targetWidth,ur=V.targetHeight,Vt=typeof U=="function"?U():U,He=ce||Ce,kr=($e==null?void 0:$e.length)>0,Dt=v.useState(!$e||!kr),Ur=(0,ot.Z)(Dt,2),vr=Ur[0],Wr=Ur[1];if((0,c.Z)(function(){!vr&&kr&&M&&Wr(!0)},[vr,kr,M]),!vr)return null;var er="auto",jt={left:"-1000vw",top:"-1000vh",right:er,bottom:er};if(wr||!ce){var Ar,Hr=Ve.points,tr=Ve.dynamicInset||((Ar=Ve._experimental)===null||Ar===void 0?void 0:Ar.dynamicInset),Jr=tr&&Hr[0][1]==="r",_t=tr&&Hr[0][0]==="b";Jr?(jt.right=kt,jt.left=er):(jt.left=hr,jt.right=er),_t?(jt.bottom=Zt,jt.top=er):(jt.top=nr,jt.bottom=er)}var Or={};return Ot&&(Ot.includes("height")&&ur?Or.height=ur:Ot.includes("minHeight")&&ur&&(Or.minHeight=ur),Ot.includes("width")&&pr?Or.width=pr:Ot.includes("minWidth")&&pr&&(Or.minWidth=pr)),ce||(Or.pointerEvents="none"),v.createElement(nt,{open:Ke||He,getContainer:$e&&function(){return $e(M)},autoDestroy:Je},v.createElement(C,{prefixCls:ee,open:ce,zIndex:et,mask:he,motion:Xe}),v.createElement(d.Z,{onResize:Xt,disabled:!ce},function(un){return v.createElement(E.default,(0,y.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ke,leavedClassName:"".concat(ee,"-hidden")},De,{onAppearPrepare:Jt,onEnterPrepare:Jt,visible:ce,onVisibleChanged:function(vn){var Dr;De==null||(Dr=De.onVisibleChanged)===null||Dr===void 0||Dr.call(De,vn),$(vn)}}),function(Yr,vn){var Dr=Yr.className,Ir=Yr.style,ze=h()(ee,Dr,H);return v.createElement("div",{ref:(0,T.sQ)(un,Q,vn),className:ze,style:(0,Ne.Z)((0,Ne.Z)((0,Ne.Z)((0,Ne.Z)({"--arrow-x":"".concat(Pe.x||0,"px"),"--arrow-y":"".concat(Pe.y||0,"px")},jt),Or),Ir),{},{boxSizing:"border-box",zIndex:et},W),onMouseEnter:ht,onMouseLeave:Et,onPointerEnter:zt,onClick:_e,onPointerDownCapture:dr},Te&&v.createElement(S,{prefixCls:ee,arrow:Te,arrowPos:Pe,align:Ve}),v.createElement(O,{cache:!ce&&!Ue},Vt))})}))}),P=J,X=v.forwardRef(function(V,Q){var U=V.children,H=V.getTriggerDOMNode,ee=(0,T.Yr)(U),W=v.useCallback(function($){(0,T.mH)(Q,H?H($):$)},[H]),M=(0,T.x1)(W,(0,T.C4)(U));return ee?v.cloneElement(U,{ref:M}):U}),B=X,k=v.createContext(null),D=k;function L(V){return V?Array.isArray(V)?V:[V]:[]}function q(V,Q,U,H){return v.useMemo(function(){var ee=L(U!=null?U:Q),W=L(H!=null?H:Q),M=new Set(ee),$=new Set(W);return V&&(M.has("hover")&&(M.delete("hover"),M.add("click")),$.has("hover")&&($.delete("hover"),$.add("click"))),[M,$]},[V,Q,U,H])}var G=Le(29194);function F(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],U=arguments.length>2?arguments[2]:void 0;return U?V[0]===Q[0]:V[0]===Q[0]&&V[1]===Q[1]}function N(V,Q,U,H){for(var ee=U.points,W=Object.keys(V),M=0;M<W.length;M+=1){var $,ce=W[M];if(F(($=V[ce])===null||$===void 0?void 0:$.points,ee,H))return"".concat(Q,"-placement-").concat(ce)}return""}function K(V,Q,U,H){return Q||(U?{motionName:"".concat(V,"-").concat(U)}:H?{motionName:H}:null)}function re(V){return V.ownerDocument.defaultView}function ne(V){for(var Q=[],U=V==null?void 0:V.parentElement,H=["hidden","scroll","clip","auto"];U;){var ee=re(U).getComputedStyle(U),W=ee.overflowX,M=ee.overflowY,$=ee.overflow;[W,M,$].some(function(ce){return H.includes(ce)})&&Q.push(U),U=U.parentElement}return Q}function pe(V){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(V)?Q:V}function ie(V){return pe(parseFloat(V),0)}function Ae(V,Q){var U=(0,Ne.Z)({},V);return(Q||[]).forEach(function(H){if(!(H instanceof HTMLBodyElement||H instanceof HTMLHtmlElement)){var ee=re(H).getComputedStyle(H),W=ee.overflow,M=ee.overflowClipMargin,$=ee.borderTopWidth,ce=ee.borderBottomWidth,Ce=ee.borderLeftWidth,Ue=ee.borderRightWidth,_e=H.getBoundingClientRect(),he=H.offsetHeight,Te=H.clientHeight,Pe=H.offsetWidth,Ve=H.clientWidth,De=ie($),Xe=ie(ce),Ke=ie(Ce),$e=ie(Ue),Je=pe(Math.round(_e.width/Pe*1e3)/1e3),nt=pe(Math.round(_e.height/he*1e3)/1e3),et=(Pe-Ve-Ke-$e)*Je,ht=(he-Te-De-Xe)*nt,Et=De*nt,zt=Xe*nt,dr=Ke*Je,wr=$e*Je,hr=0,nr=0;if(W==="clip"){var kt=ie(M);hr=kt*Je,nr=kt*nt}var Zt=_e.x+dr-hr,Xt=_e.y+Et-nr,Jt=Zt+_e.width+2*hr-dr-wr-et,Ot=Xt+_e.height+2*nr-Et-zt-ht;U.left=Math.max(U.left,Zt),U.top=Math.max(U.top,Xt),U.right=Math.min(U.right,Jt),U.bottom=Math.min(U.bottom,Ot)}}),U}function Y(V){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,U="".concat(Q),H=U.match(/^(.*)\%$/);return H?V*(parseFloat(H[1])/100):parseFloat(U)}function fe(V,Q){var U=Q||[],H=(0,ot.Z)(U,2),ee=H[0],W=H[1];return[Y(V.width,ee),Y(V.height,W)]}function ve(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[V[0],V[1]]}function be(V,Q){var U=Q[0],H=Q[1],ee,W;return U==="t"?W=V.y:U==="b"?W=V.y+V.height:W=V.y+V.height/2,H==="l"?ee=V.x:H==="r"?ee=V.x+V.width:ee=V.x+V.width/2,{x:ee,y:W}}function le(V,Q){var U={t:"b",b:"t",l:"r",r:"l"};return V.map(function(H,ee){return ee===Q?U[H]||"c":H}).join("")}function ue(V,Q,U,H,ee,W,M){var $=v.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:ee[H]||{}}),ce=(0,ot.Z)($,2),Ce=ce[0],Ue=ce[1],_e=v.useRef(0),he=v.useMemo(function(){return Q?ne(Q):[]},[Q]),Te=v.useRef({}),Pe=function(){Te.current={}};V||Pe();var Ve=(0,g.Z)(function(){if(Q&&U&&V){let mr=function(Oe,dn){var Bn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:jr,Li=He.x+Oe,xr=He.y+dn,_r=Li+_t,Vr=xr+Jr,hn=Math.max(Li,Bn.left),gt=Math.max(xr,Bn.top),bt=Math.min(_r,Bn.right),ar=Math.min(Vr,Bn.bottom);return Math.max(0,(bt-hn)*(ar-gt))},Ai=function(){zr=He.y+lr,Un=zr+Jr,En=He.x+ir,fn=En+_t};var Ke,$e,Je,nt,et=Q,ht=et.ownerDocument,Et=re(et),zt=Et.getComputedStyle(et),dr=zt.position,wr=et.style.left,hr=et.style.top,nr=et.style.right,kt=et.style.bottom,Zt=et.style.overflow,Xt=(0,Ne.Z)((0,Ne.Z)({},ee[H]),W),Jt=ht.createElement("div");(Ke=et.parentElement)===null||Ke===void 0||Ke.appendChild(Jt),Jt.style.left="".concat(et.offsetLeft,"px"),Jt.style.top="".concat(et.offsetTop,"px"),Jt.style.position=dr,Jt.style.height="".concat(et.offsetHeight,"px"),Jt.style.width="".concat(et.offsetWidth,"px"),et.style.left="0",et.style.top="0",et.style.right="auto",et.style.bottom="auto",et.style.overflow="hidden";var Ot;if(Array.isArray(U))Ot={x:U[0],y:U[1],width:0,height:0};else{var pr,ur,Vt=U.getBoundingClientRect();Vt.x=(pr=Vt.x)!==null&&pr!==void 0?pr:Vt.left,Vt.y=(ur=Vt.y)!==null&&ur!==void 0?ur:Vt.top,Ot={x:Vt.x,y:Vt.y,width:Vt.width,height:Vt.height}}var He=et.getBoundingClientRect(),kr=Et.getComputedStyle(et),Dt=kr.height,Ur=kr.width;He.x=($e=He.x)!==null&&$e!==void 0?$e:He.left,He.y=(Je=He.y)!==null&&Je!==void 0?Je:He.top;var vr=ht.documentElement,Wr=vr.clientWidth,er=vr.clientHeight,jt=vr.scrollWidth,Ar=vr.scrollHeight,Hr=vr.scrollTop,tr=vr.scrollLeft,Jr=He.height,_t=He.width,Or=Ot.height,un=Ot.width,Yr={left:0,top:0,right:Wr,bottom:er},vn={left:-tr,top:-Hr,right:jt-tr,bottom:Ar-Hr},Dr=Xt.htmlRegion,Ir="visible",ze="visibleFirst";Dr!=="scroll"&&Dr!==ze&&(Dr=Ir);var On=Dr===ze,An=Ae(vn,he),Yt=Ae(Yr,he),jr=Dr===Ir?Yt:An,$t=On?Yt:jr;et.style.left="auto",et.style.top="auto",et.style.right="0",et.style.bottom="0";var Dn=et.getBoundingClientRect();et.style.left=wr,et.style.top=hr,et.style.right=nr,et.style.bottom=kt,et.style.overflow=Zt,(nt=et.parentElement)===null||nt===void 0||nt.removeChild(Jt);var xn=pe(Math.round(_t/parseFloat(Ur)*1e3)/1e3),Nn=pe(Math.round(Jr/parseFloat(Dt)*1e3)/1e3);if(xn===0||Nn===0||(0,p.Sh)(U)&&!(0,G.Z)(U))return;var mn=Xt.offset,hi=Xt.targetOffset,$r=fe(He,mn),Zn=(0,ot.Z)($r,2),qr=Zn[0],pt=Zn[1],Pi=fe(Ot,hi),ln=(0,ot.Z)(Pi,2),Fn=ln[0],ba=ln[1];Ot.x-=Fn,Ot.y-=ba;var pi=Xt.points||[],qi=(0,ot.Z)(pi,2),wa=qi[0],vi=qi[1],gn=ve(vi),en=ve(wa),Pr=be(Ot,gn),ea=be(He,en),Xr=(0,Ne.Z)({},Xt),ir=Pr.x-ea.x+qr,lr=Pr.y-ea.y+pt,yn=mr(ir,lr),Jn=mr(ir,lr,Yt),cn=be(Ot,["t","l"]),Bi=be(He,["t","l"]),_i=be(Ot,["b","r"]),Yn=be(He,["b","r"]),$n=Xt.overflow||{},Aa=$n.adjustX,mi=$n.adjustY,qn=$n.shiftX,Ln=$n.shiftY,ta=function(dn){return typeof dn=="boolean"?dn:dn>=0},zr,Un,En,fn;Ai();var gi=ta(mi),Kr=en[0]===gn[0];if(gi&&en[0]==="t"&&(Un>$t.bottom||Te.current.bt)){var jn=lr;Kr?jn-=Jr-Or:jn=cn.y-Yn.y-pt;var ei=mr(ir,jn),xa=mr(ir,jn,Yt);ei>yn||ei===yn&&(!On||xa>=Jn)?(Te.current.bt=!0,lr=jn,pt=-pt,Xr.points=[le(en,0),le(gn,0)]):Te.current.bt=!1}if(gi&&en[0]==="b"&&(zr<$t.top||Te.current.tb)){var ti=lr;Kr?ti+=Jr-Or:ti=_i.y-Bi.y-pt;var ra=mr(ir,ti),Zr=mr(ir,ti,Yt);ra>yn||ra===yn&&(!On||Zr>=Jn)?(Te.current.tb=!0,lr=ti,pt=-pt,Xr.points=[le(en,0),le(gn,0)]):Te.current.tb=!1}var Mi=ta(Aa),na=en[1]===gn[1];if(Mi&&en[1]==="l"&&(fn>$t.right||Te.current.rl)){var ri=ir;na?ri-=_t-un:ri=cn.x-Yn.x-qr;var Wn=mr(ri,lr),Ni=mr(ri,lr,Yt);Wn>yn||Wn===yn&&(!On||Ni>=Jn)?(Te.current.rl=!0,ir=ri,qr=-qr,Xr.points=[le(en,1),le(gn,1)]):Te.current.rl=!1}if(Mi&&en[1]==="r"&&(En<$t.left||Te.current.lr)){var yi=ir;na?yi+=_t-un:yi=_i.x-Bi.x-qr;var xt=mr(yi,lr),ia=mr(yi,lr,Yt);xt>yn||xt===yn&&(!On||ia>=Jn)?(Te.current.lr=!0,ir=yi,qr=-qr,Xr.points=[le(en,1),le(gn,1)]):Te.current.lr=!1}Ai();var Pn=qn===!0?0:qn;typeof Pn=="number"&&(En<Yt.left&&(ir-=En-Yt.left-qr,Ot.x+un<Yt.left+Pn&&(ir+=Ot.x-Yt.left+un-Pn)),fn>Yt.right&&(ir-=fn-Yt.right-qr,Ot.x>Yt.right-Pn&&(ir+=Ot.x-Yt.right+Pn)));var bi=Ln===!0?0:Ln;typeof bi=="number"&&(zr<Yt.top&&(lr-=zr-Yt.top-pt,Ot.y+Or<Yt.top+bi&&(lr+=Ot.y-Yt.top+Or-bi)),Un>Yt.bottom&&(lr-=Un-Yt.bottom-pt,Ot.y>Yt.bottom-bi&&(lr+=Ot.y-Yt.bottom+bi)));var zn=He.x+ir,wi=zn+_t,Ea=He.y+lr,mo=Ea+Jr,Ha=Ot.x,mt=Ha+un,Br=Ot.y,Xa=Br+Or,go=Math.max(zn,Ha),Ka=Math.min(wi,mt),yo=(go+Ka)/2,bo=yo-zn,Za=Math.max(Ea,Br),wo=Math.min(mo,Xa),Ao=(Za+wo)/2,xo=Ao-Ea;M==null||M(Q,Xr);var Vn=Dn.right-He.x-(ir+He.width),Ca=Dn.bottom-He.y-(lr+He.height);xn===1&&(ir=Math.round(ir),Vn=Math.round(Vn)),Nn===1&&(lr=Math.round(lr),Ca=Math.round(Ca));var Fi={ready:!0,offsetX:ir/xn,offsetY:lr/Nn,offsetR:Vn/xn,offsetB:Ca/Nn,arrowX:bo/xn,arrowY:xo/Nn,scaleX:xn,scaleY:Nn,align:Xr};Ue(Fi)}}),De=function(){_e.current+=1;var $e=_e.current;Promise.resolve().then(function(){_e.current===$e&&Ve()})},Xe=function(){Ue(function($e){return(0,Ne.Z)((0,Ne.Z)({},$e),{},{ready:!1})})};return(0,c.Z)(Xe,[H]),(0,c.Z)(function(){V||Xe()},[V]),[Ce.ready,Ce.offsetX,Ce.offsetY,Ce.offsetR,Ce.offsetB,Ce.arrowX,Ce.arrowY,Ce.scaleX,Ce.scaleY,Ce.align,De]}var ge=Le(94480);function Ee(V,Q,U,H,ee){(0,c.Z)(function(){if(V&&Q&&U){let _e=function(){H(),ee()};var W=Q,M=U,$=ne(W),ce=ne(M),Ce=re(M),Ue=new Set([Ce].concat((0,ge.Z)($),(0,ge.Z)(ce)));return Ue.forEach(function(he){he.addEventListener("scroll",_e,{passive:!0})}),Ce.addEventListener("resize",_e,{passive:!0}),H(),function(){Ue.forEach(function(he){he.removeEventListener("scroll",_e),Ce.removeEventListener("resize",_e)})}}},[V,Q,U])}var ke=Le(48736);function Ie(V,Q,U,H,ee,W,M,$){var ce=v.useRef(V);ce.current=V;var Ce=v.useRef(!1);v.useEffect(function(){if(Q&&H&&(!ee||W)){var _e=function(){Ce.current=!1},he=function(Je){var nt;ce.current&&!M(((nt=Je.composedPath)===null||nt===void 0||(nt=nt.call(Je))===null||nt===void 0?void 0:nt[0])||Je.target)&&!Ce.current&&$(!1)},Te=re(H);Te.addEventListener("pointerdown",_e,!0),Te.addEventListener("mousedown",he,!0),Te.addEventListener("contextmenu",he,!0);var Pe=(0,b.A)(U);if(Pe&&(Pe.addEventListener("mousedown",he,!0),Pe.addEventListener("contextmenu",he,!0)),0)var Ve,De,Xe,Ke;return function(){Te.removeEventListener("pointerdown",_e,!0),Te.removeEventListener("mousedown",he,!0),Te.removeEventListener("contextmenu",he,!0),Pe&&(Pe.removeEventListener("mousedown",he,!0),Pe.removeEventListener("contextmenu",he,!0))}}},[Q,U,H,ee,W]);function Ue(){Ce.current=!0}return Ue}var de=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function Z(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_.Z,Q=v.forwardRef(function(U,H){var ee=U.prefixCls,W=ee===void 0?"rc-trigger-popup":ee,M=U.children,$=U.action,ce=$===void 0?"hover":$,Ce=U.showAction,Ue=U.hideAction,_e=U.popupVisible,he=U.defaultPopupVisible,Te=U.onPopupVisibleChange,Pe=U.afterPopupVisibleChange,Ve=U.mouseEnterDelay,De=U.mouseLeaveDelay,Xe=De===void 0?.1:De,Ke=U.focusDelay,$e=U.blurDelay,Je=U.mask,nt=U.maskClosable,et=nt===void 0?!0:nt,ht=U.getPopupContainer,Et=U.forceRender,zt=U.autoDestroy,dr=U.destroyPopupOnHide,wr=U.popup,hr=U.popupClassName,nr=U.popupStyle,kt=U.popupPlacement,Zt=U.builtinPlacements,Xt=Zt===void 0?{}:Zt,Jt=U.popupAlign,Ot=U.zIndex,pr=U.stretch,ur=U.getPopupClassNameFromAlign,Vt=U.fresh,He=U.alignPoint,kr=U.onPopupClick,Dt=U.onPopupAlign,Ur=U.arrow,vr=U.popupMotion,Wr=U.maskMotion,er=U.popupTransitionName,jt=U.popupAnimation,Ar=U.maskTransitionName,Hr=U.maskAnimation,tr=U.className,Jr=U.getTriggerDOMNode,_t=(0,o.Z)(U,de),Or=zt||dr||!1,un=v.useState(!1),Yr=(0,ot.Z)(un,2),vn=Yr[0],Dr=Yr[1];(0,c.Z)(function(){Dr((0,m.Z)())},[]);var Ir=v.useRef({}),ze=v.useContext(D),On=v.useMemo(function(){return{registerSubPopup:function(bt,ar){Ir.current[bt]=ar,ze==null||ze.registerSubPopup(bt,ar)}}},[ze]),An=(0,w.Z)(),Yt=v.useState(null),jr=(0,ot.Z)(Yt,2),$t=jr[0],Dn=jr[1],xn=v.useRef(null),Nn=(0,g.Z)(function(gt){xn.current=gt,(0,p.Sh)(gt)&&$t!==gt&&Dn(gt),ze==null||ze.registerSubPopup(An,gt)}),mn=v.useState(null),hi=(0,ot.Z)(mn,2),$r=hi[0],Zn=hi[1],qr=v.useRef(null),pt=(0,g.Z)(function(gt){(0,p.Sh)(gt)&&$r!==gt&&(Zn(gt),qr.current=gt)}),Pi=v.Children.only(M),ln=(Pi==null?void 0:Pi.props)||{},Fn={},ba=(0,g.Z)(function(gt){var bt,ar,or=$r;return(or==null?void 0:or.contains(gt))||((bt=(0,b.A)(or))===null||bt===void 0?void 0:bt.host)===gt||gt===or||($t==null?void 0:$t.contains(gt))||((ar=(0,b.A)($t))===null||ar===void 0?void 0:ar.host)===gt||gt===$t||Object.values(Ir.current).some(function(We){return(We==null?void 0:We.contains(gt))||gt===We})}),pi=K(W,vr,jt,er),qi=K(W,Wr,Hr,Ar),wa=v.useState(he||!1),vi=(0,ot.Z)(wa,2),gn=vi[0],en=vi[1],Pr=_e!=null?_e:gn,ea=(0,g.Z)(function(gt){_e===void 0&&en(gt)});(0,c.Z)(function(){en(_e||!1)},[_e]);var Xr=v.useRef(Pr);Xr.current=Pr;var ir=v.useRef([]);ir.current=[];var lr=(0,g.Z)(function(gt){var bt;ea(gt),((bt=ir.current[ir.current.length-1])!==null&&bt!==void 0?bt:Pr)!==gt&&(ir.current.push(gt),Te==null||Te(gt))}),yn=v.useRef(),Jn=function(){clearTimeout(yn.current)},cn=function(bt){var ar=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Jn(),ar===0?lr(bt):yn.current=setTimeout(function(){lr(bt)},ar*1e3)};v.useEffect(function(){return Jn},[]);var Bi=v.useState(!1),_i=(0,ot.Z)(Bi,2),Yn=_i[0],$n=_i[1];(0,c.Z)(function(gt){(!gt||Pr)&&$n(!0)},[Pr]);var Aa=v.useState(null),mi=(0,ot.Z)(Aa,2),qn=mi[0],Ln=mi[1],ta=v.useState(null),zr=(0,ot.Z)(ta,2),Un=zr[0],En=zr[1],fn=function(bt){En([bt.clientX,bt.clientY])},gi=ue(Pr,$t,He&&Un!==null?Un:$r,kt,Xt,Jt,Dt),Kr=(0,ot.Z)(gi,11),jn=Kr[0],ei=Kr[1],xa=Kr[2],ti=Kr[3],ra=Kr[4],Zr=Kr[5],Mi=Kr[6],na=Kr[7],ri=Kr[8],Wn=Kr[9],Ni=Kr[10],yi=q(vn,ce,Ce,Ue),xt=(0,ot.Z)(yi,2),ia=xt[0],Pn=xt[1],bi=ia.has("click"),zn=Pn.has("click")||Pn.has("contextMenu"),wi=(0,g.Z)(function(){Yn||Ni()}),Ea=function(){Xr.current&&He&&zn&&cn(!1)};Ee(Pr,$r,$t,wi,Ea),(0,c.Z)(function(){wi()},[Un,kt]),(0,c.Z)(function(){Pr&&!(Xt!=null&&Xt[kt])&&wi()},[JSON.stringify(Jt)]);var mo=v.useMemo(function(){var gt=N(Xt,W,Wn,He);return h()(gt,ur==null?void 0:ur(Wn))},[Wn,ur,Xt,W,He]);v.useImperativeHandle(H,function(){return{nativeElement:qr.current,popupElement:xn.current,forceAlign:wi}});var Ha=v.useState(0),mt=(0,ot.Z)(Ha,2),Br=mt[0],Xa=mt[1],go=v.useState(0),Ka=(0,ot.Z)(go,2),yo=Ka[0],bo=Ka[1],Za=function(){if(pr&&$r){var bt=$r.getBoundingClientRect();Xa(bt.width),bo(bt.height)}},wo=function(){Za(),wi()},Ao=function(bt){$n(!1),Ni(),Pe==null||Pe(bt)},xo=function(){return new Promise(function(bt){Za(),Ln(function(){return bt})})};(0,c.Z)(function(){qn&&(Ni(),qn(),Ln(null))},[qn]);function Vn(gt,bt,ar,or){Fn[gt]=function(We){var Er;or==null||or(We),cn(bt,ar);for(var tn=arguments.length,Cn=new Array(tn>1?tn-1:0),Cr=1;Cr<tn;Cr++)Cn[Cr-1]=arguments[Cr];(Er=ln[gt])===null||Er===void 0||Er.call.apply(Er,[ln,We].concat(Cn))}}(bi||zn)&&(Fn.onClick=function(gt){var bt;Xr.current&&zn?cn(!1):!Xr.current&&bi&&(fn(gt),cn(!0));for(var ar=arguments.length,or=new Array(ar>1?ar-1:0),We=1;We<ar;We++)or[We-1]=arguments[We];(bt=ln.onClick)===null||bt===void 0||bt.call.apply(bt,[ln,gt].concat(or))});var Ca=Ie(Pr,zn,$r,$t,Je,et,ba,cn),Fi=ia.has("hover"),mr=Pn.has("hover"),Ai,Oe;Fi&&(Vn("onMouseEnter",!0,Ve,function(gt){fn(gt)}),Vn("onPointerEnter",!0,Ve,function(gt){fn(gt)}),Ai=function(bt){(Pr||Yn)&&$t!==null&&$t!==void 0&&$t.contains(bt.target)&&cn(!0,Ve)},He&&(Fn.onMouseMove=function(gt){var bt;(bt=ln.onMouseMove)===null||bt===void 0||bt.call(ln,gt)})),mr&&(Vn("onMouseLeave",!1,Xe),Vn("onPointerLeave",!1,Xe),Oe=function(){cn(!1,Xe)}),ia.has("focus")&&Vn("onFocus",!0,Ke),Pn.has("focus")&&Vn("onBlur",!1,$e),ia.has("contextMenu")&&(Fn.onContextMenu=function(gt){var bt;Xr.current&&Pn.has("contextMenu")?cn(!1):(fn(gt),cn(!0)),gt.preventDefault();for(var ar=arguments.length,or=new Array(ar>1?ar-1:0),We=1;We<ar;We++)or[We-1]=arguments[We];(bt=ln.onContextMenu)===null||bt===void 0||bt.call.apply(bt,[ln,gt].concat(or))}),tr&&(Fn.className=h()(ln.className,tr));var dn=v.useRef(!1);dn.current||(dn.current=Et||Pr||Yn);var Bn=(0,Ne.Z)((0,Ne.Z)({},ln),Fn),Li={},xr=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];xr.forEach(function(gt){_t[gt]&&(Li[gt]=function(){for(var bt,ar=arguments.length,or=new Array(ar),We=0;We<ar;We++)or[We]=arguments[We];(bt=Bn[gt])===null||bt===void 0||bt.call.apply(bt,[Bn].concat(or)),_t[gt].apply(_t,or)})});var _r=v.cloneElement(Pi,(0,Ne.Z)((0,Ne.Z)({},Bn),Li)),Vr={x:Zr,y:Mi},hn=Ur?(0,Ne.Z)({},Ur!==!0?Ur:{}):null;return v.createElement(v.Fragment,null,v.createElement(d.Z,{disabled:!Pr,ref:pt,onResize:wo},v.createElement(B,{getTriggerDOMNode:Jr},_r)),dn.current&&v.createElement(D.Provider,{value:On},v.createElement(P,{portal:V,ref:Nn,prefixCls:W,popup:wr,className:h()(hr,mo),style:nr,target:$r,onMouseEnter:Ai,onMouseLeave:Oe,onPointerEnter:Ai,zIndex:Ot,open:Pr,keepDom:Yn,fresh:Vt,onClick:kr,onPointerDownCapture:Ca,mask:Je,motion:pi,maskMotion:qi,onVisibleChanged:Ao,onPrepare:xo,forceRender:Et,autoDestroy:Or,getPopupContainer:ht,align:Wn,arrow:hn,arrowPos:Vr,ready:jn,offsetX:ei,offsetY:xa,offsetR:ti,offsetB:ra,onAlign:wi,stretch:pr,targetWidth:Br/na,targetHeight:yo/ri})))});return Q}var ye=Z(_.Z)},13683:function(Qt,ct,Le){"use strict";Le.d(ct,{cT:function(){return k},pe:function(){return P}});var Ne=Le(59301),ot=Le(14566),o=Le(6767),_=Le(97013),j=Le(28209),h=Le.n(j),d=Le(1012),p=Le(58106),b=Le(47257),g=Le.n(b),w=Object.defineProperty,c=Object.defineProperties,m=Object.getOwnPropertyDescriptors,v=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,T=(L,q,G)=>q in L?w(L,q,{enumerable:!0,configurable:!0,writable:!0,value:G}):L[q]=G,S=(L,q)=>{for(var G in q||(q={}))y.call(q,G)&&T(L,G,q[G]);if(v)for(var G of v(q))E.call(q,G)&&T(L,G,q[G]);return L},C=(L,q)=>c(L,m(q)),x=(L,q)=>{var G={};for(var F in L)y.call(L,F)&&q.indexOf(F)<0&&(G[F]=L[F]);if(L!=null&&v)for(var F of v(L))q.indexOf(F)<0&&E.call(L,F)&&(G[F]=L[F]);return G},O=(L,q,G)=>new Promise((F,N)=>{var K=pe=>{try{ne(G.next(pe))}catch(ie){N(ie)}},re=pe=>{try{ne(G.throw(pe))}catch(ie){N(ie)}},ne=pe=>pe.done?F(pe.value):Promise.resolve(pe.value).then(K,re);ne((G=G.apply(L,q)).next())});const{Dragger:J}=ot.default,P=L=>{const q="bf3c199c2470cb477d907b1e0917c17b",G="5183666c72eec9e4";var F=h().enc.Utf8.parse(q);let N=h().enc.Utf8.parse(G);var K=h().AES.decrypt(L,F,{iv:N,mode:h().mode.CBC});return K.toString(h().enc.Utf8)};let X;const B=L=>O(void 0,[L],function*({identifier:q,oldFilename:G,newFilename:F}){var N,K,re,ne,pe,ie;const Ae=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});Ae.data=JSON.parse(P(Ae.data));const Y=new OSS({endpoint:(N=Ae==null?void 0:Ae.data)==null?void 0:N.end_point,region:(K=Ae==null?void 0:Ae.data)==null?void 0:K.region,accessKeyId:(re=Ae==null?void 0:Ae.data)==null?void 0:re.access_key_id,accessKeySecret:(ne=Ae==null?void 0:Ae.data)==null?void 0:ne.access_key_secret,bucket:(pe=Ae==null?void 0:Ae.data)==null?void 0:pe.bucket,stsToken:(ie=Ae==null?void 0:Ae.data)==null?void 0:ie.security_token});return new Promise((fe,ve)=>{console.log(11111,`${q}/${G}`,`${q}/${F}`,Ae.data),Y.copy(`/${q}/${G}`,`/${q}/${F}`).then(be=>{console.log("\u62F7\u8D1D\u6210\u529F",be)}).catch(be=>{console.log(be)})})}),k=(L,q,G)=>O(void 0,null,function*(){var F,N,K,re,ne,pe;q.file_name=L.name;const ie=yield(0,_.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",P(ie.data)),ie.data=JSON.parse(P(ie.data));const Ae=L.name.split(".");Ae.pop();const Y=q.realFileName?Ae.join(""):(0,d.Z)(),fe=new(g())({endpoint:(F=ie==null?void 0:ie.data)==null?void 0:F.end_point,region:(N=ie==null?void 0:ie.data)==null?void 0:N.region,accessKeyId:(K=ie==null?void 0:ie.data)==null?void 0:K.access_key_id,accessKeySecret:(re=ie==null?void 0:ie.data)==null?void 0:re.access_key_secret,bucket:(ne=ie==null?void 0:ie.data)==null?void 0:ne.bucket,stsToken:(pe=ie==null?void 0:ie.data)==null?void 0:pe.security_token});return new Promise((ve,be)=>{var le;fe.multipartUpload(`${Y}`,new Blob([L],{type:L.type}),C(S({timeout:200*1e3,partSize:102400},G),{callback:{url:(le=ie==null?void 0:ie.data)==null?void 0:le.callback_url,host:ie==null?void 0:ie.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,_.rz)(q)}})).then(function(ue){var ge;L.response=(ge=ue.data)==null?void 0:ge.data,ve(ue==null?void 0:ue.data)}).catch(function(ue){be(ue),console.log("err:",ue)})})}),D=L=>{var q=L,{user:G,cancelUpload:F}=q,N=x(q,["user","cancelUpload"]);const[K,re]=(0,Ne.useState)([]);let[ne,pe]=(0,Ne.useState)();const ie={onRemove:Y=>{re([...K.filter(fe=>fe.name!==Y.name)]),N.onChange(K.filter(fe=>fe.name!==Y.name))},disabled:N.disabled,multiple:!0,fileList:K==null?void 0:K.map(Y=>Y.file),customRequest:()=>{},beforeUpload:Y=>O(void 0,null,function*(){let fe=N.maxSize||1073741824;if(K.filter(ve=>ve.name===Y.name).length){o.ZP.info(`${Y.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(Y==null?void 0:Y.size)>fe?(o.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${fe/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(K.push({name:Y.name,file:Y}),re([...K]),N.onChange(K),!1)})},Ae=(Y,fe)=>O(void 0,null,function*(){var ve,be,le,ue,ge,Ee;fe.file_name=Y.name;const ke=Y.name,Ie=yield(0,_.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(Ie.data=JSON.parse(P(Ie.data)),(Ie==null?void 0:Ie.status)!==0){K[K.findIndex(ye=>ye.name===ke)].status="error",K[K.findIndex(ye=>ye.name===ke)].file.status="error",N.onChange(K),o.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}ne=new(g())({endpoint:(ve=Ie==null?void 0:Ie.data)==null?void 0:ve.end_point,region:(be=Ie==null?void 0:Ie.data)==null?void 0:be.region,accessKeyId:(le=Ie==null?void 0:Ie.data)==null?void 0:le.access_key_id,accessKeySecret:(ue=Ie==null?void 0:Ie.data)==null?void 0:ue.access_key_secret,bucket:(ge=Ie==null?void 0:Ie.data)==null?void 0:ge.bucket,stsToken:(Ee=Ie==null?void 0:Ie.data)==null?void 0:Ee.security_token}),console.log(Y,"file"),pe(ne);const de=Y.name.split(".");de.pop();const Z=ke.indexOf(".")>-1?fe.realFileName?de.join("."):(0,d.Z)():ke;return new Promise((ye,V)=>{var Q;try{ne.multipartUpload(`${N.identifier}/${Z}${ke.indexOf(".")>-1?"."+ke.split(".").pop():""}`,new Blob([Y.file],{type:Y.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(U,H,ee)=>{try{console.log("\u8FDB\u5EA6",U,H,ee);const W=K.findIndex(M=>M.name===ke);K[W].file.percent=U*100,K[W].tempCheckpoint=H,re([...K])}catch(W){}},checkpoint:K[K.findIndex(U=>U.name===ke)].tempCheckpoint,callback:{customValue:{id:ke+""},url:(Q=Ie==null?void 0:Ie.data)==null?void 0:Q.callback_url,host:Ie==null?void 0:Ie.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,_.rz)(fe)}}).then(function(U){var H,ee,W;const M=K.findIndex(ce=>ce.name===ke);let $="done";if(((H=U.data)==null?void 0:H.status)===0){Y.response=(ee=U.data)==null?void 0:ee.data;const ce=K.findIndex(Ce=>Ce.name===ke);K[ce].status="done",K[ce].file.status="done"}else o.ZP.warning((W=U.data)==null?void 0:W.message),$="error";K[M].status=$,K[M].file.status=$,N.onChange(K),ye(U==null?void 0:U.data)}).catch(function(U){K[K.findIndex(H=>H.name===ke)].status="error",K[K.findIndex(H=>H.name===ke)].file.status="error",o.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),re([...K]),N.onChange(K),V(U),console.log("err:",U)})}catch(U){}})});return(0,Ne.useEffect)(()=>{K.every(Y=>Y==="done"||Y==="error")&&N.onComplete(K)},[K]),(0,Ne.useEffect)(()=>{F&&(ne==null||ne.cancel())},[F]),(0,Ne.useEffect)(()=>{N.uploading&&K.map(Y=>O(void 0,null,function*(){var fe;if((!Y.status||Y.status==="error")&&!F){Y.status="uploading",Y.file.status="uploading";const ve=yield Ae(Y,{login:(fe=G==null?void 0:G.userInfo)==null?void 0:fe.login,container_type:N.container_type,container_id:N.container_id,description:N.description,realFileName:N.realFileName})}}))},[N.uploading]),Ne.createElement(J,C(S({},ie),{height:N.height,className:N.className}),Ne.createElement("p",{className:"ant-upload-hint"},N.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};ct.ZP=(0,p.connect)(({loading:L,globalSetting:q,user:G})=>({globalSetting:q,loading:L.models.competitions,user:G}))(D)},68804:function(Qt,ct,Le){"use strict";Le.r(ct),Le.d(ct,{default:function(){return $0}});var Ne=Le(59301),ot=Le(58106),o=Le(11938),_=Le(10846),j=Le(6767),h=Le(7939),d=Le(77019),p=Le(5269),b=Le(62957),g={flex_box_center:"flex_box_center___uIDcP",flex_space_between:"flex_space_between___l5roZ",flex_box_vertical_center:"flex_box_vertical_center___mj8nW",flex_box_center_end:"flex_box_center_end___v4Eig",flex_box_column:"flex_box_column___SQn0H",bg:"bg___H5S8d",steps:"steps___mrlSw",qrcode:"qrcode___xRSbG"},w=Le(31735),c=Le(22167),m=Le(15845),v=Le.n(m),y=Le(97671),E=Le(19208).lW;var T=function(n,t){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])})(n,t)};function S(n,t){function e(){this.constructor=n}T(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function C(n,t,e,r){return new(e||(e=Promise))(function(i,a){function s(f){try{l(r.next(f))}catch(A){a(A)}}function u(f){try{l(r.throw(f))}catch(A){a(A)}}function l(f){f.done?i(f.value):new e(function(A){A(f.value)}).then(s,u)}l((r=r.apply(n,t||[])).next())})}function x(n,t){var e,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(l){return function(f){return function(A){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,r&&(i=2&A[0]?r.return:A[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,A[1])).done)return i;switch(r=0,i&&(A=[2&A[0],i.value]),A[0]){case 0:case 1:i=A;break;case 4:return s.label++,{value:A[1],done:!1};case 5:s.label++,r=A[1],A=[0];continue;case 7:A=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(A[0]===6||A[0]===2)){s=0;continue}if(A[0]===3&&(!i||A[1]>i[0]&&A[1]<i[3])){s.label=A[1];break}if(A[0]===6&&s.label<i[1]){s.label=i[1],i=A;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(A);break}i[2]&&s.ops.pop(),s.trys.pop();continue}A=t.call(n,s)}catch(I){A=[6,I],r=0}finally{e=i=0}if(5&A[0])throw A[1];return{value:A[0]?A[1]:void 0,done:!0}}([l,f])}}}var O=function(){function n(t){this.global=t,this.flags={},this.flagRegistry={},this.urlFlags={},this.populateURLFlags()}return n.prototype.setPlatform=function(t,e){this.platform!=null&&console.warn("Platform "+this.platformName+" has already been set. Overwriting the platform with "+e+"."),this.platformName=t,this.platform=e},n.prototype.registerFlag=function(t,e,r){if(this.flagRegistry[t]={evaluationFn:e,setHook:r},this.urlFlags[t]!=null){var i=this.urlFlags[t];console.warn("Setting feature override from URL "+t+": "+i+"."),this.set(t,i)}},n.prototype.get=function(t){return t in this.flags?this.flags[t]:(this.flags[t]=this.evaluateFlag(t),this.flags[t])},n.prototype.getNumber=function(t){return this.get(t)},n.prototype.getBool=function(t){return this.get(t)},n.prototype.getFlags=function(){return this.flags},Object.defineProperty(n.prototype,"features",{get:function(){return this.flags},enumerable:!0,configurable:!0}),n.prototype.set=function(t,e){if(this.flagRegistry[t]==null)throw new Error("Cannot set flag "+t+" as it has not been registered.");this.flags[t]=e,this.flagRegistry[t].setHook!=null&&this.flagRegistry[t].setHook(e)},n.prototype.evaluateFlag=function(t){if(this.flagRegistry[t]==null)throw new Error("Cannot evaluate flag '"+t+"': no evaluation function found.");return this.flagRegistry[t].evaluationFn()},n.prototype.setFlags=function(t){this.flags=Object.assign({},t)},n.prototype.reset=function(){this.flags={},this.urlFlags={},this.populateURLFlags()},n.prototype.populateURLFlags=function(){var t=this;if(this.global!==void 0&&this.global.location!==void 0&&this.global.location.search!==void 0){var e,r,i=(e=this.global.location.search,r={},e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,function(a){for(var s=[],u=1;u<arguments.length;u++)s[u-1]=arguments[u];return J(r,s[0],s[1]),s.join("=")}),r);"tfjsflags"in i&&i.tfjsflags.split(",").forEach(function(a){var s=a.split(":"),u=s[0],l=s[1];t.urlFlags[u]=function(f,A){if((A=A.toLowerCase())==="true"||A==="false")return A==="true";if(""+ +A===A)return+A;throw new Error("Could not parse value flag value "+A+" for flag "+f+".")}(u,l)})}},n}();function J(n,t,e){n[decodeURIComponent(t)]=decodeURIComponent(e||"")}function P(){return X}var X=null,B=new Map,k=new Map;function D(n,t){var e=re(n,t);return B.get(e)}function L(n){return k.get(n)}function q(n){for(var t=B.entries(),e=[];;){var r=t.next(),i=r.done,a=r.value;if(i)break;var s=a[0],u=a[1];s.split("_")[0]===n&&e.push(u)}return e}function G(n){var t=n.kernelName,e=n.backendName,r=re(t,e);if(B.has(r))throw new Error("The kernel '"+t+"' for backend '"+e+"' is already registered");B.set(r,n)}function F(n){var t=n.kernelName;k.has(t)&&console.warn("Overriding the gradient for '"+t+"'"),k.set(t,n)}function N(n,t){var e=re(n,t);if(!B.has(e))throw new Error("The kernel '"+n+"' for backend '"+t+"' is not registered");B.delete(e)}function K(n){if(!k.has(n))throw new Error("The gradient '"+n+"' for backend is not registered");k.delete(n)}function re(n,t){return t+"_"+n}function ne(n){for(var t=n.length,e=0,r=0;t>0;)r=Math.random()*t|0,e=n[--t],n[t]=n[r],n[r]=e}function pe(n,t,e){return Math.max(n,Math.min(t,e))}function ie(n){return n%2==0?n:n+1}function Ae(n){for(var t=0,e=0;e<n.length;e++)t+=n[e];return t}function Y(n,t){if(!n)throw new Error(typeof t=="string"?t:t())}function fe(n,t,e){e===void 0&&(e=""),Y(ue(n,t),function(){return e+" Shapes "+n+" and "+t+" must match"})}function ve(n){Y(n!=null,function(){return"The input to the tensor constructor must be a non-null value."})}function be(n,t,e){if(t===void 0&&(t=[]),e===void 0&&(e=!1),t==null&&(t=[]),Array.isArray(n)||M(n)&&!e)for(var r=0;r<n.length;++r)be(n[r],t,e);else t.push(n);return t}function le(n){if(n.length===0)return 1;for(var t=n[0],e=1;e<n.length;e++)t*=n[e];return t}function ue(n,t){if(n===t)return!0;if(n==null||t==null||n.length!==t.length)return!1;for(var e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function ge(n){return n%1==0}function Ee(n){if(Math.tanh!=null)return Math.tanh(n);if(n===1/0)return 1;if(n===-1/0)return-1;var t=Math.exp(2*n);return(t-1)/(t+1)}function ke(n){var t=Math.ceil(Math.sqrt(n));return[t,Math.ceil(n/t)]}function Ie(n,t){return t<=n.length?n:n+" ".repeat(t-n.length)}function de(n,t,e){return t===void 0&&(t=function(r){return 0}),new Promise(function(r,i){var a=0,s=function(){if(n())r();else{a++;var u=t(a);e!=null&&a>=e?i():setTimeout(s,u)}};s()})}function Z(n,t){for(var e=1,r=-1,i=0;i<n.length;++i)if(n[i]>=0)e*=n[i];else if(n[i]===-1){if(r!==-1)throw Error("Shapes can only have 1 implicit size. Found -1 at dim "+r+" and dim "+i);r=i}else if(n[i]<0)throw Error("Shapes can not be < 0. Found "+n[i]+" at dim "+i);if(r===-1){if(t>0&&t!==e)throw Error("Size("+t+") must match the product of shape "+n);return n}if(e===0)throw Error("Cannot infer the missing size in ["+n+"] when there are 0 elements");if(t%e!=0)throw Error("The implicit shape can't be a fractional number. Got "+t+" / "+e);var a=n.slice();return a[r]=t/e,a}function ye(n,t){var e=t.length;return Y((n=n==null?t.map(function(r,i){return i}):[].concat(n)).every(function(r){return r>=-e&&r<e}),function(){return"All values in axis param must be in range [-"+e+", "+e+") but got axis "+n}),Y(n.every(function(r){return ge(r)}),function(){return"All values in axis param must be integers but got axis "+n}),n.map(function(r){return r<0?e+r:r})}function V(n,t){for(var e=[],r=[],i=t!=null&&Array.isArray(t)&&t.length===0,a=t==null||i?null:ye(t,n).sort(),s=0,u=0;u<n.length;++u){if(a!=null){if(a[s]===u&&n[u]!==1)throw new Error("Can't squeeze axis "+u+" since its dim '"+n[u]+"' is not 1");(a[s]==null||a[s]>u)&&n[u]===1&&(e.push(n[u]),r.push(u)),a[s]<=u&&s++}n[u]!==1&&(e.push(n[u]),r.push(u))}return{newShape:e,keptDims:r}}function Q(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else{if(n!=="bool")throw new Error("Unknown data type "+n);e=new Uint8Array(t)}return e}function U(n,t){var e=null;if(n==null||n==="float32")e=new Float32Array(t);else if(n==="int32")e=new Int32Array(t);else if(n==="bool")e=new Uint8Array(t);else{if(n!=="string")throw new Error("Unknown data type "+n);e=new Array(t)}return e}function H(n,t){for(var e=0;e<n.length;e++){var r=n[e];if(isNaN(r)||!isFinite(r))throw Error("A tensor of type "+t+" being uploaded contains "+r+".")}}function ee(n){return n==="bool"||n==="complex64"||n==="float32"||n==="int32"||n==="string"}function W(n,t){return t!=="complex64"&&(t!=="float32"||n==="complex64")&&(t!=="int32"||n==="float32"||n==="complex64")&&(t!=="bool"||n!=="bool")}function M(n){return n instanceof Float32Array||n instanceof Int32Array||n instanceof Uint8Array}function $(n){if(n==="float32"||n==="int32")return 4;if(n==="complex64")return 8;if(n==="bool")return 1;throw new Error("Unknown dtype "+n)}function ce(n){if(n==null)return 0;var t=0;return n.forEach(function(e){return t+=e.length}),t}function Ce(n){return typeof n=="string"||n instanceof String}function Ue(n){return typeof n=="boolean"}function _e(n){return typeof n=="number"}function he(n){return Array.isArray(n)?he(n[0]):n instanceof Float32Array?"float32":n instanceof Int32Array||n instanceof Uint8Array?"int32":_e(n)?"float32":Ce(n)?"string":Ue(n)?"bool":"float32"}function Te(n){return!!(n&&n.constructor&&n.call&&n.apply)}function Pe(n,t){for(var e=t;e<n;++e)if(n%e==0)return e;return n}function Ve(n){var t=n.length;if(t<2)return[];var e=new Array(t-1);e[t-2]=n[t-1];for(var r=t-3;r>=0;--r)e[r]=e[r+1]*n[r+1];return e}function De(n,t,e){if(t==="string")throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(n)&&(n=be(n)),e&&H(n,t),function(a,s){return a instanceof Float32Array&&s==="float32"||a instanceof Int32Array&&s==="int32"||a instanceof Uint8Array&&s==="bool"}(n,t))return n;if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool"){for(var r=new Uint8Array(n.length),i=0;i<r.length;++i)Math.round(n[i])!==0&&(r[i]=1);return r}throw new Error("Unknown data type "+t)}function Xe(n,t){if(n.length===0)return t[0];var e=n.reduce(function(r,i){return r*i});if(e===0)return[];if(e!==t.length)throw new Error("["+n+"] does not match the input size.");return function r(i,a,s){var u=new Array;if(a.length===1)for(var l=a[0],f=0;f<l;f++)u[f]=s[i+f];else{l=a[0];var A=a.slice(1),I=A.reduce(function(R,z){return R*z});for(f=0;f<l;f++)u[f]=r(i+f*I,A,s)}return u}(0,n,t)}function Ke(n,t){for(var e=$e(n,t),r=0;r<e.length;r++)e[r]=1;return e}function $e(n,t){if(t==null||t==="float32"||t==="complex64")return new Float32Array(n);if(t==="int32")return new Int32Array(n);if(t==="bool")return new Uint8Array(n);throw new Error("Unknown data type "+t)}function Je(){return P().platform.now()}function nt(n){n.forEach(function(t){Y(Number.isInteger(t)&&t>=0,function(){return"Tensor must have a shape comprised of positive integers but got shape ["+n+"]."})})}function et(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",P().platform.encode(n,t)}function ht(n,t){return t===void 0&&(t="utf-8"),t=t||"utf-8",P().platform.decode(n,t)}function Et(n,t,e){if(t===0)return 0;if(t===1)return n[0];for(var r=n[n.length-1],i=0;i<n.length-1;++i)r+=e[i]*n[i];return r}function zt(n,t,e){if(t===0)return[];if(t===1)return[n];for(var r=new Array(t),i=0;i<r.length-1;++i)r[i]=Math.floor(n/e[i]),n-=r[i]*e[i];return r[r.length-1]=n,r}var dr=Object.freeze({shuffle:ne,clamp:pe,nearestLargerEven:ie,sum:Ae,randUniform:function(n,t){var e=Math.random();return t*e+(1-e)*n},distSquared:function(n,t){for(var e=0,r=0;r<n.length;r++){var i=Number(n[r])-Number(t[r]);e+=i*i}return e},assert:Y,assertShapesMatch:fe,assertNonNull:ve,flatten:be,sizeFromShape:le,isScalarShape:function(n){return n.length===0},arraysEqual:ue,isInt:ge,tanh:Ee,sizeToSquarishShape:ke,createShuffledIndices:function(n){for(var t=new Uint32Array(n),e=0;e<n;++e)t[e]=e;return ne(t),t},rightPad:Ie,repeatedTry:de,inferFromImplicitShape:Z,parseAxisParam:ye,squeezeShape:V,getTypedArrayFromDType:Q,getArrayFromDType:U,checkConversionForErrors:H,isValidDtype:ee,hasEncodingLoss:W,isTypedArray:M,bytesPerElement:$,bytesFromStringArray:ce,isString:Ce,isBoolean:Ue,isNumber:_e,inferDtype:he,isFunction:Te,nearestDivisor:Pe,computeStrides:Ve,toTypedArray:De,toNestedArray:Xe,makeOnesTypedArray:Ke,makeZerosTypedArray:$e,now:Je,assertNonNegativeIntegerDimensions:nt,fetch:function(n,t){return P().platform.fetch(n,t)},encodeString:et,decodeString:ht,locToIndex:Et,indexToLoc:zt}),wr=function(){function n(t,e){this.backendTimer=t,this.logger=e,e==null&&(this.logger=new hr)}return n.prototype.profileKernel=function(t,e,r){var i,a=this,s=this.backendTimer.time(function(){i=r()});return i.forEach(function(u){u.data().then(function(l){(function(f,A,I){if(A!=="float32")return!1;for(var R=0;R<f.length;R++){var z=f[R];if(isNaN(z)||!isFinite(z))return console.warn("Found "+z+" in the result of '"+I+"'"),!0}})(l,u.dtype,t),s.then(function(f){var A="";f.getExtraProfileInfo!=null&&(A=f.getExtraProfileInfo()),a.logger.logKernelProfile(t,u,l,f.kernelMs,e,A)})})}),i},n}(),hr=function(){function n(){}return n.prototype.logKernelProfile=function(t,e,r,i,a,s){var u=typeof i=="number"?Ie(i+"ms",9):i.error,l=Ie(t,25),f=e.rank,A=e.size,I=Ie(e.shape.toString(),14),R="";for(var z in a){var te=a[z].shape||e.shape,oe=te.length;R+=z+": "+oe+"D "+(oe>0?te:"")+" "}console.log("%c"+l+" %c"+u+" %c"+f+"D "+I+" %c"+A+" %c"+R+" %c"+s,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")},n}(),nr=20,kt=3,Zt=7;function Xt(n,t,e,r){var i=Ve(t),a=function(f,A,I,R){var z=le(A),te=R[R.length-1],oe=new Array(te).fill(0),ae=A.length,se=I==="complex64"?pr(f):f;if(ae>1)for(var we=0;we<z/te;we++)for(var xe=we*te,me=0;me<te;me++)oe[me]=Math.max(oe[me],Jt(se[xe+me],0,I).length);return oe}(n,t,e,i),s=t.length,u=function f(A,I,R,z,te,oe){oe===void 0&&(oe=!0);var ae=R==="complex64"?2:1,se=I[0],we=I.length;if(we===0)return R==="complex64"?[Jt(pr(A)[0],0,R)]:R==="bool"?[Ot(A[0])]:[A[0].toString()];if(we===1){if(se>nr){var xe=kt*ae,me=Array.from(A.slice(0,xe)),Se=Array.from(A.slice((se-kt)*ae,se*ae));return R==="complex64"&&(me=pr(me),Se=pr(Se)),["["+me.map(function(tt,st){return Jt(tt,te[st],R)}).join(", ")+", ..., "+Se.map(function(tt,st){return Jt(tt,te[se-kt+st],R)}).join(", ")+"]"]}return["["+(R==="complex64"?pr(A):Array.from(A)).map(function(tt,st){return Jt(tt,te[st],R)}).join(", ")+"]"]}var Re=I.slice(1),Me=z.slice(1),Fe=z[0]*ae,je=[];if(se>nr){for(var Be=0;Be<kt;Be++){var Ge=(Qe=Be*Fe)+Fe;je.push.apply(je,f(A.slice(Qe,Ge),Re,R,Me,te,!1))}for(je.push("..."),Be=se-kt;Be<se;Be++)Ge=(Qe=Be*Fe)+Fe,je.push.apply(je,f(A.slice(Qe,Ge),Re,R,Me,te,Be===se-1))}else for(Be=0;Be<se;Be++){var Qe;Ge=(Qe=Be*Fe)+Fe,je.push.apply(je,f(A.slice(Qe,Ge),Re,R,Me,te,Be===se-1))}var Ze=we===2?",":"";for(je[0]="["+je[0]+Ze,Be=1;Be<je.length-1;Be++)je[Be]=" "+je[Be]+Ze;var Ye=`,
|
|
`;for(Be=2;Be<we;Be++)Ye+=`
|
|
`;return je[je.length-1]=" "+je[je.length-1]+"]"+(oe?"":Ye),je}(n,t,e,i,a),l=["Tensor"];return r&&(l.push(" dtype: "+e),l.push(" rank: "+s),l.push(" shape: ["+t+"]"),l.push(" values:")),l.push(u.map(function(f){return" "+f}).join(`
|
|
`)),l.join(`
|
|
`)}function Jt(n,t,e){return Ie(Array.isArray(n)?parseFloat(n[0].toFixed(Zt))+" + "+parseFloat(n[1].toFixed(Zt))+"j":Ce(n)?"'"+n+"'":e==="bool"?Ot(n):parseFloat(n.toFixed(Zt)).toString(),t)}function Ot(n){return n===0?"false":"true"}function pr(n){for(var t=[],e=0;e<n.length;e+=2)t.push([n[e],n[e+1]]);return t}var ur=function(){function n(t,e,r){var i=this;if(this.dtype=e,this.shape=t.slice(),this.size=le(t),r!=null){var a=r.length;Y(a===this.size,function(){return"Length of values '"+a+"' does not match the size inferred by the shape '"+i.size+"'."})}if(e==="complex64")throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=r||U(e,this.size),this.strides=Ve(t)}return n.prototype.set=function(t){for(var e=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];r.length===0&&(r=[0]),Y(r.length===this.rank,function(){return"The number of provided coordinates ("+r.length+") must match the rank ("+e.rank+")"});var a=this.locToIndex(r);this.values[a]=t},n.prototype.get=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.length===0&&(t=[0]);for(var r=0,i=0,a=t;i<a.length;i++){var s=a[i];if(s<0||s>=this.shape[r]){var u="Requested out of range element at "+t+". Buffer shape="+this.shape;throw new Error(u)}r++}for(var l=t[t.length-1],f=0;f<t.length-1;++f)l+=this.strides[f]*t[f];return this.values[l]},n.prototype.locToIndex=function(t){if(this.rank===0)return 0;if(this.rank===1)return t[0];for(var e=t[t.length-1],r=0;r<t.length-1;++r)e+=this.strides[r]*t[r];return e},n.prototype.indexToLoc=function(t){if(this.rank===0)return[];if(this.rank===1)return[t];for(var e=new Array(this.shape.length),r=0;r<e.length-1;++r)e[r]=Math.floor(t/this.strides[r]),t-=e[r]*this.strides[r];return e[e.length-1]=t,e},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.toTensor=function(){return Vt().makeTensor(this.values,this.shape,this.dtype)},n}(),Vt=null,He=null,kr=null,Dt=function(){function n(t,e,r,i){this.kept=!1,this.isDisposedInternal=!1,this.shape=t.slice(),this.dtype=e||"float32",this.size=le(t),this.strides=Ve(t),this.dataId=r,this.id=i,this.rankType=this.rank<5?this.rank.toString():"higher"}return n.prototype.flatten=function(){return this.throwIfDisposed(),this.as1D()},n.prototype.asScalar=function(){return this.throwIfDisposed(),Y(this.size===1,function(){return"The array must have only 1 element."}),this.reshape([])},n.prototype.as1D=function(){return this.throwIfDisposed(),this.reshape([this.size])},n.prototype.as2D=function(t,e){return this.throwIfDisposed(),this.reshape([t,e])},n.prototype.as3D=function(t,e,r){return this.throwIfDisposed(),this.reshape([t,e,r])},n.prototype.as4D=function(t,e,r,i){return this.throwIfDisposed(),this.reshape([t,e,r,i])},n.prototype.as5D=function(t,e,r,i,a){return this.throwIfDisposed(),this.reshape([t,e,r,i,a])},n.prototype.asType=function(t){return this.throwIfDisposed(),He.cast(this,t)},Object.defineProperty(n.prototype,"rank",{get:function(){return this.shape.length},enumerable:!0,configurable:!0}),n.prototype.buffer=function(){return C(this,void 0,void 0,function(){var t;return x(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,He.buffer(this.shape,this.dtype,t)]}})})},n.prototype.bufferSync=function(){return He.buffer(this.shape,this.dtype,this.dataSync())},n.prototype.array=function(){return C(this,void 0,void 0,function(){var t;return x(this,function(e){switch(e.label){case 0:return[4,this.data()];case 1:return t=e.sent(),[2,Xe(this.shape,t)]}})})},n.prototype.arraySync=function(){return Xe(this.shape,this.dataSync())},n.prototype.data=function(){return C(this,void 0,void 0,function(){var t,e;return x(this,function(r){switch(r.label){case 0:return this.throwIfDisposed(),t=Vt().read(this.dataId),this.dtype!=="string"?[3,2]:[4,t];case 1:e=r.sent();try{return[2,e.map(function(i){return ht(i)})]}catch(i){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}r.label=2;case 2:return[2,t]}})})},n.prototype.dataSync=function(){this.throwIfDisposed();var t=Vt().readSync(this.dataId);if(this.dtype==="string")try{return t.map(function(e){return ht(e)})}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return t},n.prototype.bytes=function(){return C(this,void 0,void 0,function(){var t;return x(this,function(e){switch(e.label){case 0:return this.throwIfDisposed(),[4,Vt().read(this.dataId)];case 1:return t=e.sent(),this.dtype==="string"?[2,t]:[2,new Uint8Array(t.buffer)]}})})},n.prototype.dispose=function(){this.isDisposed||(Vt().disposeTensor(this),this.isDisposedInternal=!0)},Object.defineProperty(n.prototype,"isDisposed",{get:function(){return this.isDisposedInternal},enumerable:!0,configurable:!0}),n.prototype.throwIfDisposed=function(){if(this.isDisposed)throw new Error("Tensor is disposed.")},n.prototype.toFloat=function(){return this.asType("float32")},n.prototype.toInt=function(){return this.asType("int32")},n.prototype.toBool=function(){return this.asType("bool")},n.prototype.print=function(t){return t===void 0&&(t=!1),He.print(this,t)},n.prototype.reshape=function(t){return this.throwIfDisposed(),He.reshape(this,t)},n.prototype.reshapeAs=function(t){return this.throwIfDisposed(),this.reshape(t.shape)},n.prototype.expandDims=function(t){return t===void 0&&(t=0),He.expandDims(this,t)},n.prototype.cumsum=function(t,e,r){return t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1),He.cumsum(this,t,e,r)},n.prototype.squeeze=function(t){return this.throwIfDisposed(),He.squeeze(this,t)},n.prototype.clone=function(){return this.throwIfDisposed(),He.clone(this)},n.prototype.oneHot=function(t,e,r){return this.throwIfDisposed(),He.oneHot(this,t,e,r)},n.prototype.toString=function(t){return t===void 0&&(t=!1),Xt(this.dataSync(),this.shape,this.dtype,t)},n.prototype.tile=function(t){return this.throwIfDisposed(),He.tile(this,t)},n.prototype.gather=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),He.gather(this,t,e)},n.prototype.matMul=function(t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!1),this.throwIfDisposed(),He.matMul(this,t,e,r)},n.prototype.dot=function(t){return this.throwIfDisposed(),He.dot(this,t)},n.prototype.norm=function(t,e,r){return t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1),this.throwIfDisposed(),He.norm(this,t,e,r)},n.prototype.slice=function(t,e){return this.throwIfDisposed(),He.slice(this,t,e)},n.prototype.reverse=function(t){return this.throwIfDisposed(),He.reverse(this,t)},n.prototype.concat=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),t instanceof n&&(t=[t]),He.concat([this].concat(t),e)},n.prototype.split=function(t,e){return e===void 0&&(e=0),this.throwIfDisposed(),He.split(this,t,e)},n.prototype.stack=function(t,e){return e===void 0&&(e=0),He.stack([this,t],e)},n.prototype.unstack=function(t){return t===void 0&&(t=0),He.unstack(this,t)},n.prototype.pad=function(t,e){return e===void 0&&(e=0),He.pad(this,t,e)},n.prototype.batchNormalization=function(t,e,r,i,a){return r===void 0&&(r=.001),kr("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon"),this.batchNorm(t,e,a,i,r)},n.prototype.batchNorm=function(t,e,r,i,a){return a===void 0&&(a=.001),this.throwIfDisposed(),He.batchNorm(this,t,e,r,i,a)},n.prototype.all=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.all(this,t,e)},n.prototype.any=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.any(this,t,e)},n.prototype.logSumExp=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.logSumExp(this,t,e)},n.prototype.sum=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.sum(this,t,e)},n.prototype.prod=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.prod(this,t,e)},n.prototype.mean=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.mean(this,t,e)},n.prototype.min=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.min(this,t,e)},n.prototype.max=function(t,e){return t===void 0&&(t=null),e===void 0&&(e=!1),this.throwIfDisposed(),He.max(this,t,e)},n.prototype.argMin=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),He.argMin(this,t)},n.prototype.argMax=function(t){return t===void 0&&(t=null),this.throwIfDisposed(),He.argMax(this,t)},n.prototype.cast=function(t){return this.throwIfDisposed(),He.cast(this,t)},n.prototype.add=function(t){return this.throwIfDisposed(),He.add(this,t)},n.prototype.addStrict=function(t){return this.throwIfDisposed(),He.addStrict(this,t)},n.prototype.atan2=function(t){return this.throwIfDisposed(),He.atan2(this,t)},n.prototype.sub=function(t){return this.throwIfDisposed(),He.sub(this,t)},n.prototype.subStrict=function(t){return this.throwIfDisposed(),He.subStrict(this,t)},n.prototype.pow=function(t){return this.throwIfDisposed(),He.pow(this,t)},n.prototype.powStrict=function(t){return this.throwIfDisposed(),He.powStrict(this,t)},n.prototype.mul=function(t){return this.throwIfDisposed(),He.mul(this,t)},n.prototype.mulStrict=function(t){return this.throwIfDisposed(),He.mulStrict(this,t)},n.prototype.div=function(t){return this.throwIfDisposed(),He.div(this,t)},n.prototype.divNoNan=function(t){return this.throwIfDisposed(),He.divNoNan(this,t)},n.prototype.floorDiv=function(t){return this.throwIfDisposed(),He.floorDiv(this,t)},n.prototype.divStrict=function(t){return this.throwIfDisposed(),He.divStrict(this,t)},n.prototype.minimum=function(t){return this.throwIfDisposed(),He.minimum(this,t)},n.prototype.minimumStrict=function(t){return this.throwIfDisposed(),He.minimumStrict(this,t)},n.prototype.maximum=function(t){return this.throwIfDisposed(),He.maximum(this,t)},n.prototype.maximumStrict=function(t){return this.throwIfDisposed(),He.maximumStrict(this,t)},n.prototype.mod=function(t){return this.throwIfDisposed(),He.mod(this,t)},n.prototype.modStrict=function(t){return this.throwIfDisposed(),He.modStrict(this,t)},n.prototype.squaredDifferenceStrict=function(t){return this.throwIfDisposed(),He.squaredDifferenceStrict(this,t)},n.prototype.transpose=function(t){return this.throwIfDisposed(),He.transpose(this,t)},n.prototype.notEqual=function(t){return this.throwIfDisposed(),He.notEqual(this,t)},n.prototype.notEqualStrict=function(t){return this.throwIfDisposed(),He.notEqualStrict(this,t)},n.prototype.less=function(t){return this.throwIfDisposed(),He.less(this,t)},n.prototype.lessStrict=function(t){return this.throwIfDisposed(),He.lessStrict(this,t)},n.prototype.equal=function(t){return this.throwIfDisposed(),He.equal(this,t)},n.prototype.equalStrict=function(t){return this.throwIfDisposed(),He.equalStrict(this,t)},n.prototype.lessEqual=function(t){return this.throwIfDisposed(),He.lessEqual(this,t)},n.prototype.lessEqualStrict=function(t){return this.throwIfDisposed(),He.lessEqualStrict(this,t)},n.prototype.greater=function(t){return this.throwIfDisposed(),He.greater(this,t)},n.prototype.greaterStrict=function(t){return this.throwIfDisposed(),He.greaterStrict(this,t)},n.prototype.greaterEqual=function(t){return this.throwIfDisposed(),He.greaterEqual(this,t)},n.prototype.greaterEqualStrict=function(t){return this.throwIfDisposed(),He.greaterEqualStrict(this,t)},n.prototype.logicalAnd=function(t){return this.throwIfDisposed(),He.logicalAnd(this,t)},n.prototype.logicalOr=function(t){return this.throwIfDisposed(),He.logicalOr(this,t)},n.prototype.logicalNot=function(){return this.throwIfDisposed(),He.logicalNot(this)},n.prototype.logicalXor=function(t){return this.throwIfDisposed(),He.logicalXor(this,t)},n.prototype.where=function(t,e){return this.throwIfDisposed(),He.where(t,this,e)},n.prototype.neg=function(){return this.throwIfDisposed(),He.neg(this)},n.prototype.ceil=function(){return this.throwIfDisposed(),He.ceil(this)},n.prototype.floor=function(){return this.throwIfDisposed(),He.floor(this)},n.prototype.sign=function(){return this.throwIfDisposed(),He.sign(this)},n.prototype.isNaN=function(){return this.throwIfDisposed(),He.isNaN(this)},n.prototype.isInf=function(){return this.throwIfDisposed(),He.isInf(this)},n.prototype.isFinite=function(){return this.throwIfDisposed(),He.isFinite(this)},n.prototype.exp=function(){return this.throwIfDisposed(),He.exp(this)},n.prototype.expm1=function(){return this.throwIfDisposed(),He.expm1(this)},n.prototype.log=function(){return this.throwIfDisposed(),He.log(this)},n.prototype.log1p=function(){return this.throwIfDisposed(),He.log1p(this)},n.prototype.sqrt=function(){return this.throwIfDisposed(),He.sqrt(this)},n.prototype.rsqrt=function(){return this.throwIfDisposed(),He.rsqrt(this)},n.prototype.square=function(){return this.throwIfDisposed(),He.square(this)},n.prototype.reciprocal=function(){return this.throwIfDisposed(),He.reciprocal(this)},n.prototype.abs=function(){return this.throwIfDisposed(),He.abs(this)},n.prototype.clipByValue=function(t,e){return this.throwIfDisposed(),He.clipByValue(this,t,e)},n.prototype.relu=function(){return this.throwIfDisposed(),He.relu(this)},n.prototype.relu6=function(){return this.throwIfDisposed(),He.relu6(this)},n.prototype.elu=function(){return this.throwIfDisposed(),He.elu(this)},n.prototype.selu=function(){return this.throwIfDisposed(),He.selu(this)},n.prototype.leakyRelu=function(t){return t===void 0&&(t=.2),this.throwIfDisposed(),He.leakyRelu(this,t)},n.prototype.prelu=function(t){return this.throwIfDisposed(),He.prelu(this,t)},n.prototype.sigmoid=function(){return this.throwIfDisposed(),He.sigmoid(this)},n.prototype.logSigmoid=function(){return this.throwIfDisposed(),He.logSigmoid(this)},n.prototype.softplus=function(){return this.throwIfDisposed(),He.softplus(this)},n.prototype.zerosLike=function(){return this.throwIfDisposed(),He.zerosLike(this)},n.prototype.onesLike=function(){return this.throwIfDisposed(),He.onesLike(this)},n.prototype.sin=function(){return this.throwIfDisposed(),He.sin(this)},n.prototype.cos=function(){return this.throwIfDisposed(),He.cos(this)},n.prototype.tan=function(){return this.throwIfDisposed(),He.tan(this)},n.prototype.asin=function(){return this.throwIfDisposed(),He.asin(this)},n.prototype.acos=function(){return this.throwIfDisposed(),He.acos(this)},n.prototype.atan=function(){return this.throwIfDisposed(),He.atan(this)},n.prototype.sinh=function(){return this.throwIfDisposed(),He.sinh(this)},n.prototype.cosh=function(){return this.throwIfDisposed(),He.cosh(this)},n.prototype.tanh=function(){return this.throwIfDisposed(),He.tanh(this)},n.prototype.asinh=function(){return this.throwIfDisposed(),He.asinh(this)},n.prototype.acosh=function(){return this.throwIfDisposed(),He.acosh(this)},n.prototype.atanh=function(){return this.throwIfDisposed(),He.atanh(this)},n.prototype.erf=function(){return this.throwIfDisposed(),He.erf(this)},n.prototype.round=function(){return this.throwIfDisposed(),He.round(this)},n.prototype.step=function(t){return t===void 0&&(t=0),this.throwIfDisposed(),He.step(this,t)},n.prototype.softmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),He.softmax(this,t)},n.prototype.logSoftmax=function(t){return t===void 0&&(t=-1),this.throwIfDisposed(),He.logSoftmax(this,t)},n.prototype.resizeBilinear=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),He.image.resizeBilinear(this,t,e)},n.prototype.resizeNearestNeighbor=function(t,e){return e===void 0&&(e=!1),this.throwIfDisposed(),He.image.resizeNearestNeighbor(this,t,e)},n.prototype.conv1d=function(t,e,r,i,a,s){return i===void 0&&(i="NWC"),a===void 0&&(a=1),this.throwIfDisposed(),He.conv1d(this,t,e,r,i,a,s)},n.prototype.conv2d=function(t,e,r,i,a,s){return i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]),this.throwIfDisposed(),He.conv2d(this,t,e,r,i,a,s)},n.prototype.conv2dTranspose=function(t,e,r,i,a){return this.throwIfDisposed(),He.conv2dTranspose(this,t,e,r,i,a)},n.prototype.depthwiseConv2D=function(t,e,r,i,a,s){return i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]),this.throwIfDisposed(),He.depthwiseConv2d(this,t,e,r,i,a,s)},n.prototype.separableConv2d=function(t,e,r,i,a,s){return a===void 0&&(a=[1,1]),s===void 0&&(s="NHWC"),this.throwIfDisposed(),He.separableConv2d(this,t,e,r,i,a,s)},n.prototype.avgPool=function(t,e,r,i){return this.throwIfDisposed(),He.avgPool(this,t,e,r,i)},n.prototype.maxPool=function(t,e,r,i){return this.throwIfDisposed(),He.maxPool(this,t,e,r,i)},n.prototype.localResponseNormalization=function(t,e,r,i){return t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5),He.localResponseNormalization(this,t,e,r,i)},n.prototype.pool=function(t,e,r,i,a){return this.throwIfDisposed(),He.pool(this,t,e,r,i,a)},n.prototype.variable=function(t,e,r){return t===void 0&&(t=!0),this.throwIfDisposed(),Vt().makeVariable(this,t,e,r)},n.prototype.unsortedSegmentSum=function(t,e){return this.throwIfDisposed(),He.unsortedSegmentSum(this,t,e)},n.prototype.batchToSpaceND=function(t,e){return this.throwIfDisposed(),He.batchToSpaceND(this,t,e)},n.prototype.spaceToBatchND=function(t,e){return this.throwIfDisposed(),He.spaceToBatchND(this,t,e)},n.prototype.topk=function(t,e){return t===void 0&&(t=1),e===void 0&&(e=!0),this.throwIfDisposed(),He.topk(this,t,e)},n.prototype.stridedSlice=function(t,e,r,i,a,s,u,l){return i===void 0&&(i=0),a===void 0&&(a=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),this.throwIfDisposed(),He.stridedSlice(this,t,e,r,i,a,s,u,l)},n.prototype.depthToSpace=function(t,e){return this.throwIfDisposed(),He.depthToSpace(this,t,e)},n.prototype.fft=function(){return this.throwIfDisposed(),He.spectral.fft(this)},n.prototype.ifft=function(){return this.throwIfDisposed(),He.spectral.ifft(this)},n.prototype.rfft=function(){return this.throwIfDisposed(),He.spectral.rfft(this)},n.prototype.irfft=function(){return this.throwIfDisposed(),He.spectral.irfft(this)},n}();Object.defineProperty(Dt,Symbol.hasInstance,{value:function(n){return!!n&&n.dataId!=null&&n.shape!=null&&n.dtype!=null}});var Ur,vr,Wr,er,jt,Ar=function(n){function t(e,r,i,a){var s=n.call(this,e.shape,e.dtype,e.dataId,a)||this;return s.trainable=r,s.name=i,s}return S(t,n),t.prototype.assign=function(e){if(e.dtype!==this.dtype)throw new Error("dtype of the new value ("+e.dtype+") and previous value ("+this.dtype+") must match");if(!ue(e.shape,this.shape))throw new Error("shape of the new value ("+e.shape+") and previous value ("+this.shape+") must match");Vt().disposeTensor(this),this.dataId=e.dataId,Vt().incRef(this,null)},t.prototype.dispose=function(){Vt().disposeVariable(this),this.isDisposedInternal=!0},t}(Dt);Object.defineProperty(Ar,Symbol.hasInstance,{value:function(n){return n instanceof Dt&&n.assign!=null&&n.assign instanceof Function}}),function(n){n.R0="R0",n.R1="R1",n.R2="R2",n.R3="R3",n.R4="R4",n.R5="R5",n.R6="R6"}(Ur||(Ur={})),function(n){n.float32="float32",n.int32="int32",n.bool="int32",n.complex64="complex64"}(vr||(vr={})),function(n){n.float32="float32",n.int32="int32",n.bool="bool",n.complex64="complex64"}(Wr||(Wr={})),function(n){n.float32="float32",n.int32="float32",n.bool="float32",n.complex64="complex64"}(er||(er={})),function(n){n.float32="complex64",n.int32="complex64",n.bool="complex64",n.complex64="complex64"}(jt||(jt={}));var Hr={float32:er,int32:vr,bool:Wr,complex64:jt};function tr(n,t){if(n==="string"||t==="string"){if(n==="string"&&t==="string")return"string";throw new Error("Can not upcast "+n+" with "+t)}return Hr[n][t]}function Jr(n){return tr(n,"int32")}function _t(n,t){if(n.dtype===t.dtype)return[n,t];var e=tr(n.dtype,t.dtype);return[n.cast(e),t.cast(e)]}function Or(n,t){Y(n.dtype===t.dtype,function(){return"The dtypes of the first("+n.dtype+") and second("+t.dtype+") input must match"})}function un(n){var t=[];return function e(r,i,a){if(r!=null){if(r instanceof Dt)return void i.push(r);if(s=r,!(!Array.isArray(s)&&typeof s!="object")){var s,u=r;for(var l in u){var f=u[l];a.has(f)||(a.add(f),e(f,i,a))}}}}(n,t,new Set),t}var Yr,vn=Object.freeze({makeTypesMatch:_t,assertTypesMatch:Or,isTensorInList:function(n,t){return t.some(function(e){return e.id===n.id})},getTensorsInContainer:un}),Dr=function(){function n(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null}}return n.prototype.dispose=function(){for(var t in this.registeredVariables)this.registeredVariables[t].dispose()},n}(),Ir=function(){function n(t){this.ENV=t,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new Dr}return n.prototype.ready=function(){return C(this,void 0,void 0,function(){var t,e,r;return x(this,function(i){switch(i.label){case 0:if(this.pendingBackendInit!=null)return[2,this.pendingBackendInit.then(function(){})];if(this.backendInstance!=null)return[2];t=this.getSortedBackends(),e=0,i.label=1;case 1:return e<t.length?(r=t[e],[4,this.initializeBackend(r).success]):[3,5];case 2:return i.sent()?[4,this.setBackend(r)]:[3,4];case 3:return i.sent(),[2];case 4:return e++,[3,1];case 5:throw new Error("Could not initialize any backends, all backend initializations failed.")}})})},Object.defineProperty(n.prototype,"backend",{get:function(){if(this.pendingBackendInit!=null)throw new Error("Backend '"+this.backendName+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");if(this.backendInstance==null){var t=this.initializeBackendsAndReturnBest(),e=t.name;if(t.asyncInit)throw new Error("The highest priority backend '"+e+"' has not yet been initialized. Make sure to await tf.ready() or await tf.setBackend() before calling other methods");this.setBackend(e)}return this.backendInstance},enumerable:!0,configurable:!0}),n.prototype.backendNames=function(){return Object.keys(this.registryFactory)},n.prototype.findBackend=function(t){return!(t in this.registry)&&(!(t in this.registryFactory)||this.initializeBackend(t).asyncInit)?null:this.registry[t]},n.prototype.findBackendFactory=function(t){return t in this.registryFactory?this.registryFactory[t].factory:null},n.prototype.registerBackend=function(t,e,r){return r===void 0&&(r=1),t in this.registryFactory?(console.warn(t+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[t]={factory:e,priority:r},!0)},n.prototype.setBackend=function(t){return C(this,void 0,void 0,function(){var e,r,i;return x(this,function(a){switch(a.label){case 0:if(this.registryFactory[t]==null)throw new Error("Backend name '"+t+"' not found in registry");return this.backendName=t,this.registry[t]!=null?[3,4]:(this.backendInstance=null,e=this.initializeBackend(t),r=e.success,e.asyncInit?[4,r]:[3,2]);case 1:return i=a.sent(),[3,3];case 2:i=r,a.label=3;case 3:if(!i)return[2,!1];a.label=4;case 4:return this.backendInstance=this.registry[t],this.setupRegisteredKernels(),this.profiler=new wr(this.backendInstance),[2,!0]}})})},n.prototype.setupRegisteredKernels=function(){var t=this;q(this.backendName).forEach(function(e){e.setupFunc!=null&&e.setupFunc(t.backendInstance)})},n.prototype.disposeRegisteredKernels=function(t){var e=this;q(t).forEach(function(r){r.disposeFunc!=null&&r.disposeFunc(e.registry[t])})},n.prototype.initializeBackend=function(t){var e=this,r=this.registryFactory[t];if(r==null)throw new Error("Cannot initialize backend "+t+", no registration found.");try{var i=r.factory();if(Promise.resolve(i)===i){var a=++this.pendingBackendInitId,s=i.then(function(u){return!(a<e.pendingBackendInitId)&&(e.registry[t]=u,e.pendingBackendInit=null,!0)}).catch(function(u){return!(a<e.pendingBackendInitId)&&(e.pendingBackendInit=null,console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),!1)});return this.pendingBackendInit=s,{success:s,asyncInit:!0}}return this.registry[t]=i,{success:!0,asyncInit:!1}}catch(u){return console.warn("Initialization of backend "+t+" failed"),console.warn(u.stack||u.message),{success:!1,asyncInit:!1}}},n.prototype.removeBackend=function(t){if(!(t in this.registryFactory))throw new Error(t+" backend not found in registry");this.backendName===t&&this.pendingBackendInit!=null&&this.pendingBackendInitId++,t in this.registry&&(this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t]),delete this.registryFactory[t],this.backendName===t&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)},n.prototype.getSortedBackends=function(){var t=this;if(Object.keys(this.registryFactory).length===0)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort(function(e,r){return t.registryFactory[r].priority-t.registryFactory[e].priority})},n.prototype.initializeBackendsAndReturnBest=function(){for(var t=this.getSortedBackends(),e=0;e<t.length;e++){var r=t[e],i=this.initializeBackend(r),a=i.success,s=i.asyncInit;if(s||a)return{name:r,asyncInit:s}}throw new Error("Could not initialize any backends, all backend initializations failed.")},n.prototype.moveData=function(t,e){var r=this.state.tensorInfo.get(e),i=r.backend,a=this.readSync(e);i.disposeData(e),r.backend=t,t.move(e,a,r.shape,r.dtype),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++},n.prototype.tidy=function(t,e){var r,i=this,a=null;if(e==null){if(typeof t!="function")throw new Error("Please provide a function to tidy()");e=t}else{if(typeof t!="string"&&!(t instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if(typeof e!="function")throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");a=t}return this.scopedRun(function(){return i.startScope(a)},function(){return i.endScope(r)},function(){return(r=e())instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),r})},n.prototype.scopedRun=function(t,e,r){t();try{var i=r();return e(),i}catch(a){throw e(),a}},n.prototype.nextTensorId=function(){return n.nextTensorId++},n.prototype.nextVariableId=function(){return n.nextVariableId++},n.prototype.clone=function(t){var e=this.makeTensorFromDataId(t.dataId,t.shape,t.dtype),r={x:t};return this.addTapeNode(this.state.activeScope.name,r,[e],function(i){return{x:function(){return i.toFloat()}}},[]),e},n.prototype.runKernel=function(t,e,r,i,a){return this.runKernelFunc(null,e,null,t,r,i,a)},n.prototype.shouldCheckForMemLeaks=function(){return this.ENV.getBool("IS_TEST")},n.prototype.checkKernelForMemLeak=function(t,e,r){var i=this.backend.numDataIds(),a=0;r.forEach(function(l){a+=l.dtype==="complex64"?3:1});var s=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],u=i-e-a-s;if(u>0)throw new Error("Backend '"+this.backendName+"' has an internal memory leak ("+u+" data ids) after running '"+t+"'")},n.prototype.runKernelFunc=function(t,e,r,i,a,s,u){var l,f=this;s===void 0&&(s=[]),u===void 0&&(u=[]);var A=[],I=this.isTapeOn();i==null&&(i=this.state.activeScope!=null?this.state.activeScope.name:"");var R,z=function(we){I&&(A=we.map(function(xe){return f.keep(f.clone(xe))}))},te=this.state.numBytes,oe=this.state.numTensors;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0);var ae,se=D(i,this.backendName);return R=se!=null?function(){var we=f.backend.numDataIds();ae=se.kernelFunc({inputs:e,attrs:a,backend:f.backend});var xe=Array.isArray(ae)?ae:[ae];f.shouldCheckForMemLeaks()&&f.checkKernelForMemLeak(i,we,xe);var me=xe.map(function(Re){var Me=Re.dataId,Fe=Re.shape,je=Re.dtype;return f.makeTensorFromDataId(Me,Fe,je)}),Se=me.filter(function(Re,Me){return u[Me]});return z((s||[]).slice().concat(Se)),me}:function(){var we=f.backend.numDataIds();ae=f.tidy(function(){return t(f.backend,z)});var xe=Array.isArray(ae)?ae:[ae];return f.shouldCheckForMemLeaks()&&f.checkKernelForMemLeak(i,we,xe),xe},this.scopedRun(function(){return f.state.kernelDepth++},function(){return f.state.kernelDepth--},function(){l=f.ENV.getBool("DEBUG")?f.profiler.profileKernel(i,e,function(){return R()}):R()}),I&&this.addTapeNode(i,e,l,r,A),this.state.profiling&&this.state.activeProfile.kernels.push({name:i,bytesAdded:this.state.numBytes-te,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-oe,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(e).map(function(we){return e[we].shape}),outputShapes:l.map(function(we){return we.shape})}),Array.isArray(ae)?l:l[0]},n.prototype.makeTensor=function(t,e,r,i){if(t==null)throw new Error("Values passed to engine.makeTensor() are null");r=r||"float32",i=i||this.backend;var a=t;r==="string"&&Ce(t[0])&&(a=t.map(function(A){return et(A)}));var s=i.write(a,e,r),u=new Dt(e,r,s,this.nextTensorId());if(this.incRef(u,i),r==="string"){var l=this.state.tensorInfo.get(s),f=ce(a);this.state.numBytes+=f-l.bytes,l.bytes=f}return u},n.prototype.makeTensorFromDataId=function(t,e,r,i){var a=new Dt(e,r=r||"float32",t,this.nextTensorId());return this.incRef(a,i),a},n.prototype.makeVariable=function(t,e,r,i){e===void 0&&(e=!0),r=r||this.nextVariableId().toString(),i!=null&&i!==t.dtype&&(t=t.asType(i));var a=new Ar(t,e,r,this.nextTensorId());if(this.state.registeredVariables[a.name]!=null)throw new Error("Variable with name "+a.name+" was already registered");return this.state.registeredVariables[a.name]=a,this.incRef(a,this.backend),a},n.prototype.incRef=function(t,e){var r=this.state.tensorInfo.has(t.dataId)?this.state.tensorInfo.get(t.dataId).refCount:0;if(this.state.numTensors++,t.dtype==="string"&&this.state.numStringTensors++,r===0){this.state.numDataBuffers++;var i=0;t.dtype!=="complex64"&&t.dtype!=="string"&&(i=t.size*$(t.dtype)),this.state.tensorInfo.set(t.dataId,{backend:e||this.backend,dtype:t.dtype,shape:t.shape,bytes:i,refCount:0}),this.state.numBytes+=i}this.state.tensorInfo.get(t.dataId).refCount++,t instanceof Ar||this.track(t)},n.prototype.disposeTensor=function(t){if(this.state.tensorInfo.has(t.dataId)){this.state.numTensors--,t.dtype==="string"&&this.state.numStringTensors--;var e=this.state.tensorInfo.get(t.dataId);e.refCount<=1?(t.dtype!=="complex64"&&(this.state.numBytes-=e.bytes),this.state.numDataBuffers--,e.backend.disposeData(t.dataId),this.state.tensorInfo.delete(t.dataId)):this.state.tensorInfo.get(t.dataId).refCount--}},n.prototype.disposeVariables=function(){for(var t in this.state.registeredVariables){var e=this.state.registeredVariables[t];this.disposeVariable(e)}},n.prototype.disposeVariable=function(t){this.disposeTensor(t),this.state.registeredVariables[t.name]!=null&&delete this.state.registeredVariables[t.name]},n.prototype.memory=function(){var t=this.backend.memory();return t.numTensors=this.state.numTensors,t.numDataBuffers=this.state.numDataBuffers,t.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(t.unreliable=!0,t.reasons==null&&(t.reasons=[]),t.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),t},n.prototype.profile=function(t){return C(this,void 0,void 0,function(){var e,r;return x(this,function(i){return this.state.profiling=!0,e=this.state.numBytes,r=this.state.numTensors,this.state.activeProfile.kernels=[],this.state.activeProfile.result=t(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max.apply(Math,this.state.activeProfile.kernels.map(function(a){return a.totalBytesSnapshot})),this.state.activeProfile.newBytes=this.state.numBytes-e,this.state.activeProfile.newTensors=this.state.numTensors-r,[2,this.state.activeProfile]})})},n.prototype.isTapeOn=function(){return this.state.gradientDepth>0&&this.state.kernelDepth===0},n.prototype.addTapeNode=function(t,e,r,i,a){var s=this,u={id:this.state.nextTapeNodeId++,kernelName:t,inputs:e,outputs:r,saved:a},l=L(t);l!=null&&(i=l.gradFunc),i!=null&&(u.gradient=function(f){return f=f.map(function(A,I){if(A==null){var R=r[I],z=$e(R.size,R.dtype);return s.makeTensor(z,R.shape,R.dtype)}return A}),i(f.length>1?f:f[0],a)}),this.state.activeTape.push(u)},n.prototype.keep=function(t){return t.kept=!0,t},n.prototype.startTape=function(){this.state.gradientDepth===0&&(this.state.activeTape=[]),this.state.gradientDepth++},n.prototype.endTape=function(){this.state.gradientDepth--},n.prototype.startScope=function(t){var e={track:[],name:"unnamed scope",id:this.state.nextScopeId++};t&&(e.name=t),this.state.scopeStack.push(e),this.state.activeScope=e},n.prototype.endScope=function(t){for(var e=this,r=un(t),i=new Set(r.map(function(l){return l.id})),a=0;a<this.state.activeScope.track.length;a++){var s=this.state.activeScope.track[a];s.kept||i.has(s.id)||s.dispose()}var u=this.state.scopeStack.pop();this.state.activeScope=this.state.scopeStack.length===0?null:this.state.scopeStack[this.state.scopeStack.length-1],r.forEach(function(l){l.kept||l.scopeId!==u.id||e.track(l)})},n.prototype.gradients=function(t,e,r,i){var a=this;if(i===void 0&&(i=!1),Y(e.length>0,function(){return"gradients() received an empty list of xs."}),r!=null&&r.dtype!=="float32")throw new Error("dy must have 'float32' dtype, but has '"+r.dtype+"'");var s=this.scopedRun(function(){return a.startTape()},function(){return a.endTape()},function(){return a.tidy("forward",t)});Y(s instanceof Dt,function(){return"The result y returned by f() must be a tensor."});var u=function(l,f,A){for(var I={},R={},z=0;z<f.length;z++)I[f[z].id]=!0;for(z=0;z<l.length;z++){var te=(Re=l[z]).inputs;for(var oe in te){for(var ae=te[oe],se=!1,we=0;we<f.length;we++)if(I[ae.id]){Re.outputs.forEach(function(Be){return I[Be.id]=!0}),se=!0,R[Re.id]=!0;break}if(se)break}}var xe={};xe[A.id]=!0;var me={};for(z=l.length-1;z>=0;z--)for(te=(Re=l[z]).inputs,we=0;we<Re.outputs.length;we++)if(xe[Re.outputs[we].id]){for(var oe in te)xe[te[oe].id]=!0,me[Re.id]=!0;break}var Se=[];for(z=0;z<l.length;z++){var Re;if(R[(Re=l[z]).id]&&me[Re.id]){var Me={};for(var oe in Re.inputs){var Fe=Re.inputs[oe];I[Fe.id]&&(Me[oe]=Fe)}var je=Object.assign({},Re);je.inputs=Me,je.outputs=Re.outputs,Se.push(je)}}return Se}(this.state.activeTape,e,s);if(!i&&u.length===0&&e.length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",function(){var l,f,A={};A[s.id]=r==null?(l=s.shape,f=Ke(le(l),"float32"),ze.makeTensor(f,l,"float32")):r,function(R,z,te){for(var oe=function(se){var we=z[se],xe=[];if(we.outputs.forEach(function(Me){var Fe=R[Me.id];Fe!=null?xe.push(Fe):xe.push(null)}),we.gradient==null)throw new Error("Cannot compute gradient: gradient function not found for "+we.kernelName+".");var me=we.gradient(xe),Se=function(Me){if(!(Me in me))throw new Error("Cannot backprop through input "+Me+". Available gradients found: "+Object.keys(me)+".");var Fe=te(function(){return me[Me]()});if(Fe.dtype!=="float32")throw new Error("Error in gradient for op "+we.kernelName+". The gradient of input "+Me+" must have 'float32' dtype, but has '"+Fe.dtype+"'");var je=we.inputs[Me];if(!ue(Fe.shape,je.shape))throw new Error("Error in gradient for op "+we.kernelName+". The gradient of input '"+Me+"' has shape '"+Fe.shape+"', which does not match the shape of the input '"+je.shape+"'");if(R[je.id]==null)R[je.id]=Fe;else{var Be=R[je.id];R[je.id]=Be.add(Fe),Be.dispose()}};for(var Re in we.inputs)Se(Re)},ae=z.length-1;ae>=0;ae--)oe(ae)}(A,u,function(R){return a.tidy(R)});var I=e.map(function(R){return A[R.id]});return a.state.gradientDepth===0&&(a.state.activeTape.forEach(function(R){for(var z=0,te=R.saved;z<te.length;z++)te[z].dispose()}),a.state.activeTape=null),{value:s,grads:I}})},n.prototype.customGrad=function(t){var e=this;return Y(Te(t),function(){return"The f passed in customGrad(f) must be a function."}),function(){for(var r,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];Y(i.every(function(u){return u instanceof Dt}),function(){return"The args passed in customGrad(f)(x1, x2,...) must all be tensors"});var s={};return i.forEach(function(u,l){s[l]=u}),e.runKernelFunc(function(u,l){return Y((r=t.apply(void 0,i.concat([l]))).value instanceof Dt,function(){return"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"}),Y(Te(r.gradFunc),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."}),r.value},s,function(u,l){var f=r.gradFunc(u,l),A=Array.isArray(f)?f:[f];Y(A.length===i.length,function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...)."}),Y(A.every(function(R){return R instanceof Dt}),function(){return"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."});var I={};return A.forEach(function(R,z){I[z]=function(){return R}}),I})}},n.prototype.readSync=function(t){return this.state.tensorInfo.get(t).backend.readSync(t)},n.prototype.read=function(t){return this.state.tensorInfo.get(t).backend.read(t)},n.prototype.time=function(t){return C(this,void 0,void 0,function(){var e,r;return x(this,function(i){switch(i.label){case 0:return e=Je(),[4,this.backend.time(t)];case 1:return(r=i.sent()).wallMs=Je()-e,[2,r]}})})},n.prototype.track=function(t){return this.state.activeScope!=null&&(t.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(t)),t},Object.defineProperty(n.prototype,"registeredVariables",{get:function(){return this.state.registeredVariables},enumerable:!0,configurable:!0}),n.prototype.reset=function(){for(var t in this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new Dr,this.registry)this.disposeRegisteredKernels(t),this.registry[t].dispose(),delete this.registry[t];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null},n.nextTensorId=0,n.nextVariableId=0,n}(),ze=function(){var n=function(){if(Yr==null){var e=void 0;if(typeof window!="undefined")e=window;else if(typeof Le.g!="undefined")e=Le.g;else if(typeof y!="undefined")e=y;else{if(typeof self=="undefined")throw new Error("Could not find a global object");y=self}Yr=e}return Yr}();if(n._tfengine==null){var t=new O(n);n._tfengine=new Ir(t)}return function(e){X=e}(n._tfengine.ENV),Vt=function(){return n._tfengine},n._tfengine}();function On(){return typeof window!="undefined"&&window.document!=null||typeof WorkerGlobalScope!="undefined"}var An=P();An.registerFlag("DEBUG",function(){return!1},function(n){n&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")}),An.registerFlag("IS_BROWSER",function(){return On()}),An.registerFlag("IS_NODE",function(){return typeof y!="undefined"&&y.versions!==void 0&&y.versions.node!==void 0}),An.registerFlag("IS_CHROME",function(){return typeof navigator!="undefined"&&navigator!=null&&navigator.userAgent!=null&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}),An.registerFlag("PROD",function(){return!1}),An.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",function(){return An.getBool("DEBUG")}),An.registerFlag("DEPRECATION_WARNINGS_ENABLED",function(){return!0}),An.registerFlag("IS_TEST",function(){return!1});var Yt,jr,$t,Dn={},xn={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function Nn(n,t){Dn[n]=t}function mn(n){n in Dn||(Dn[n]=function(e){if(e!==1&&e!==2)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");var r=function(i){if(typeof OffscreenCanvas!="undefined"&&i===2)return new OffscreenCanvas(300,150);if(typeof document!="undefined")return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e);return r.addEventListener("webglcontextlost",function(i){i.preventDefault(),delete Dn[e]},!1),e===1?r.getContext("webgl",xn)||r.getContext("experimental-webgl",xn):r.getContext("webgl2",xn)}(n));var t=Dn[n];return t.isContextLost()?(delete Dn[n],mn(n)):(t.disable(t.DEPTH_TEST),t.disable(t.STENCIL_TEST),t.disable(t.BLEND),t.disable(t.DITHER),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SAMPLE_COVERAGE),t.enable(t.SCISSOR_TEST),t.enable(t.CULL_FACE),t.cullFace(t.BACK),Dn[n])}function hi(n,t){return[t,n]}function $r(n){var t=le(n);return ke(Math.ceil(t/4))}function Zn(n,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(n/2))]}function qr(n,t){var e,r,i,a,s,u,l,f,A,I=n;return P().getNumber("WEBGL_VERSION")===2?(e=I.R32F,r=I.R16F,i=I.RGBA16F,a=I.RGBA32F,s=I.RED,u=4,l=1,f=I.HALF_FLOAT,A=I.FLOAT):(e=n.RGBA,r=n.RGBA,i=n.RGBA,a=I.RGBA,s=n.RGBA,u=4,l=4,f=t!=null?t.HALF_FLOAT_OES:null,A=n.FLOAT),{internalFormatFloat:e,internalFormatHalfFloat:r,internalFormatPackedHalfFloat:i,internalFormatPackedFloat:a,textureFormatFloat:s,downloadTextureFormat:n.RGBA,downloadUnpackNumChannels:u,defaultNumChannels:l,textureTypeHalfFloat:f,textureTypeFloat:A}}function pt(n,t,e){var r=e();return t&&function(i){var a=i.getError();if(a!==i.NO_ERROR)throw new Error("WebGL Error: "+ba(i,a))}(n),r}(function(n){n[n.DENSE=0]="DENSE",n[n.SHARED_BATCH=1]="SHARED_BATCH"})(Yt||(Yt={})),function(n){n[n.RENDER=0]="RENDER",n[n.UPLOAD=1]="UPLOAD",n[n.PIXELS=2]="PIXELS",n[n.DOWNLOAD=3]="DOWNLOAD"}(jr||(jr={})),function(n){n[n.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",n[n.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",n[n.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",n[n.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",n[n.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}($t||($t={}));var Pi=596e-10,ln=65504;function Fn(n){return!!(P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||n===0||Pi<Math.abs(n)&&Math.abs(n)<ln)}function ba(n,t){switch(t){case n.NO_ERROR:return"NO_ERROR";case n.INVALID_ENUM:return"INVALID_ENUM";case n.INVALID_VALUE:return"INVALID_VALUE";case n.INVALID_OPERATION:return"INVALID_OPERATION";case n.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case n.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case n.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}function pi(n,t,e){return zr(n,t,function(){return n.getExtension(e)},'Extension "'+e+'" not supported on this browser.')}function qi(n,t,e){var r=zr(n,t,function(){return n.createShader(n.VERTEX_SHADER)},"Unable to create vertex WebGLShader.");if(pt(n,t,function(){return n.shaderSource(r,e)}),pt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw console.log(n.getShaderInfoLog(r)),new Error("Failed to compile vertex shader.");return r}function wa(n,t,e){var r=zr(n,t,function(){return n.createShader(n.FRAGMENT_SHADER)},"Unable to create fragment WebGLShader.");if(pt(n,t,function(){return n.shaderSource(r,e)}),pt(n,t,function(){return n.compileShader(r)}),n.getShaderParameter(r,n.COMPILE_STATUS)===!1)throw function(i,a){var s=en.exec(a);if(s==null)return console.log("Couldn't parse line number in error: "+a),void console.log(i);for(var u=+s[1],l=i.split(`
|
|
`),f=l.length.toString().length+2,A=l.map(function(ae,se){return Ie((se+1).toString(),f)+ae}),I=0,R=0;R<A.length;R++)I=Math.max(A[R].length,I);var z=A.slice(0,u-1),te=A.slice(u-1,u),oe=A.slice(u);console.log(z.join(`
|
|
`)),console.log(a.split(`
|
|
`)[0]),console.log("%c "+Ie(te[0],I),"border:1px solid red; background-color:#e3d2d2; color:#a61717"),console.log(oe.join(`
|
|
`))}(e,n.getShaderInfoLog(r)),new Error("Failed to compile fragment shader.");return r}var vi,gn,en=/ERROR: [0-9]+:([0-9]+):/g;function Pr(n,t){return zr(n,t,function(){return n.createProgram()},"Unable to create WebGLProgram.")}function ea(n,t,e){if(pt(n,t,function(){return n.linkProgram(e)}),n.getProgramParameter(e,n.LINK_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Failed to link vertex and fragment shaders.")}function Xr(n,t,e){if(pt(n,t,function(){return n.validateProgram(e)}),n.getProgramParameter(e,n.VALIDATE_STATUS)===!1)throw console.log(n.getProgramInfoLog(e)),new Error("Shader program validation failed.")}function ir(n,t,e){var r=zr(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return pt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),pt(n,t,function(){return n.bufferData(n.ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function lr(n,t,e){var r=zr(n,t,function(){return n.createBuffer()},"Unable to create WebGLBuffer");return pt(n,t,function(){return n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,r)}),pt(n,t,function(){return n.bufferData(n.ELEMENT_ARRAY_BUFFER,e,n.STATIC_DRAW)}),r}function yn(n,t){return zr(n,t,function(){return n.createTexture()},"Unable to create WebGLTexture.")}function Jn(n,t){var e=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(n<=0||t<=0){var r="["+n+"x"+t+"]";throw new Error("Requested texture size "+r+" is invalid.")}if(n>e||t>e)throw r="["+n+"x"+t+"]",new Error("Requested texture size "+r+" greater than WebGL maximum on this browser / GPU "+("["+e+"x"+e+"]")+".")}function cn(n,t){return zr(n,t,function(){return n.createFramebuffer()},"Unable to create WebGLFramebuffer.")}function Bi(n,t,e,r,i,a,s,u){var l=n.getAttribLocation(e,r);return l!==-1&&(pt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,i)}),pt(n,t,function(){return n.vertexAttribPointer(l,a,n.FLOAT,!1,s,u)}),pt(n,t,function(){return n.enableVertexAttribArray(l)}),!0)}function _i(n,t,e,r){Un(n,r),pt(n,t,function(){return n.activeTexture(n.TEXTURE0+r)}),pt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)})}function Yn(n,t,e,r){return zr(n,t,function(){return n.getUniformLocation(e,r)},'uniform "'+r+'" not present in program.')}function $n(n,t,e){return n.getUniformLocation(t,e)}function Aa(n,t,e,r,i,a){pt(n,t,function(){return _i(n,t,r,a)}),pt(n,t,function(){return n.uniform1i(i,a)})}function mi(n,t,e,r){pt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,r)}),pt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0)})}function qn(n,t,e){pt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,e)}),pt(n,t,function(){return n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,null,0)})}function Ln(n){var t=n.checkFramebufferStatus(n.FRAMEBUFFER);if(t!==n.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+ta(n,t))}function ta(n,t){switch(t){case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}function zr(n,t,e,r){var i=pt(n,t,function(){return e()});if(i==null)throw new Error(r);return i}function Un(n,t){var e=n.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+n.TEXTURE0;if(r<n.TEXTURE0||r>e)throw new Error("textureUnit must be in "+("[gl.TEXTURE0, gl.TEXTURE"+e+"]")+".")}function En(n,t){return t===void 0&&(t=2),le(n.slice(0,n.length-t))}function fn(n){if(n.length===0)throw Error("Cannot get rows and columns of an empty shape array.");return[n.length>1?n[n.length-2]:1,n[n.length-1]]}function gi(n){var t=[1,1,1];return n.length===0||n.length===1&&n[0]===1||(t=[En(n)].concat(fn(n))),t}function Kr(n,t){var e;t===void 0&&(t=!1);var r=P().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(t&&(r*=2,(n=n.map(function(f,A){return A>=n.length-2?ie(n[A]):n[A]})).length===1&&(n=[2,n[0]])),n.length!==2){var i=V(n);n=i.newShape}var a=le(n);if(n.length<=1&&a<=r)return[1,a];if(n.length===2&&n[0]<=r&&n[1]<=r)return n;if(n.length===3&&n[0]*n[1]<=r&&n[2]<=r)return[n[0]*n[1],n[2]];if(n.length===3&&n[0]<=r&&n[1]*n[2]<=r)return[n[0],n[1]*n[2]];if(n.length===4&&n[0]*n[1]*n[2]<=r&&n[3]<=r)return[n[0]*n[1]*n[2],n[3]];if(n.length===4&&n[0]<=r&&n[1]*n[2]*n[3]<=r)return[n[0],n[1]*n[2]*n[3]];if(t){var s=En(n),u=2,l=2;return n.length&&(u=(e=fn(n))[0],l=e[1]),ke(a=s*(u/2)*(l/2)).map(function(f){return 2*f})}return ke(a)}function jn(n){return n%2==0}function ei(n,t){if(ue(n=n.slice(-2),t=t.slice(-2))||!n.length||!t.length||n[0]===0||n[1]===0||t[0]===0||t[1]===0)return!0;if(n.length!==t.length){var e=n.slice(-1)[0],r=t.slice(-1)[0];if(e===r||jn(e)&&jn(r)&&(n[0]===1||t[0]===1))return!0}return n[1]===t[1]&&jn(n[0])&&jn(t[0])}function xa(n){if(vi==null){var t=mn(n);vi=t.getParameter(t.MAX_TEXTURE_SIZE)}return vi}function ti(n){if(gn==null){var t=mn(n);gn=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,gn)}function ra(n){if(n===0)return 0;var t=mn(n);return Zr(t,"EXT_disjoint_timer_query_webgl2")&&n===2?2:Zr(t,"EXT_disjoint_timer_query")?1:0}function Zr(n,t){return n.getExtension(t)!=null}function Mi(n){try{if(mn(n)!=null)return!0}catch(t){return!1}return!1}function na(n){if(n===0)return!1;var t=mn(n);if(n===1){if(!Zr(t,"OES_texture_float"))return!1}else if(!Zr(t,"EXT_color_buffer_float"))return!1;return Wn(t)}function ri(n){if(n===0)return!1;var t=mn(n);if(n!==1){if(Zr(t,"EXT_color_buffer_float"))return Wn(t);if(Zr(t,"EXT_color_buffer_half_float")){var e=t.getExtension("EXT_color_buffer_half_float");return function(r,i){var a=qr(r,i),s=r.createTexture();r.bindTexture(r.TEXTURE_2D,s),r.texImage2D(r.TEXTURE_2D,0,a.internalFormatHalfFloat,1,1,0,a.textureFormatFloat,a.textureTypeHalfFloat,null);var u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,s,0);var l=r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE;return r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteTexture(s),r.deleteFramebuffer(u),l}(t,e)}return!1}return!!Zr(t,"OES_texture_float")&&!!Zr(t,"WEBGL_color_buffer_float")&&Wn(t)}function Wn(n){var t=qr(n),e=n.createTexture();n.bindTexture(n.TEXTURE_2D,e),n.texImage2D(n.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);var r=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,r),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);var i=n.checkFramebufferStatus(n.FRAMEBUFFER)===n.FRAMEBUFFER_COMPLETE;return n.bindTexture(n.TEXTURE_2D,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteTexture(e),n.deleteFramebuffer(r),i}function Ni(n){return n===2&&mn(n).fenceSync!=null}var yi=Object.freeze({callAndCheck:pt,canBeRepresented:Fn,getWebGLErrorMessage:ba,getExtensionOrThrow:pi,createVertexShader:qi,createFragmentShader:wa,createProgram:Pr,linkProgram:ea,validateProgram:Xr,createStaticVertexBuffer:ir,createStaticIndexBuffer:lr,getNumChannels:function(){return P().getNumber("WEBGL_VERSION")===2?1:4},createTexture:yn,validateTextureSize:Jn,createFramebuffer:cn,bindVertexBufferToProgramAttribute:Bi,bindTextureUnit:_i,unbindTextureUnit:function(n,t,e){Un(n,e),pt(n,t,function(){return n.activeTexture(n.TEXTURE0+e)}),pt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})},getProgramUniformLocationOrThrow:Yn,getProgramUniformLocation:$n,bindTextureToProgramUniformSampler:Aa,bindCanvasToFramebuffer:function(n,t){pt(n,t,function(){return n.bindFramebuffer(n.FRAMEBUFFER,null)}),pt(n,t,function(){return n.viewport(0,0,n.canvas.width,n.canvas.height)}),pt(n,t,function(){return n.scissor(0,0,n.canvas.width,n.canvas.height)})},bindColorTextureToFramebuffer:mi,unbindColorTextureFromFramebuffer:qn,validateFramebuffer:Ln,getFramebufferErrorMessage:ta,getBatchDim:En,getRowsCols:fn,getShapeAs3D:gi,getTextureShapeFromLogicalShape:Kr,isReshapeFree:ei,getWebGLMaxTextureSize:xa,resetMaxTextureSize:function(){vi=null},resetMaxTexturesInShader:function(){gn=null},getMaxTexturesInShader:ti,getWebGLDisjointQueryTimerVersion:ra,hasExtension:Zr,isWebGLVersionEnabled:Mi,isCapableOfRenderingToFloatTexture:na,isDownloadFloatTextureEnabled:ri,isWebGLFenceEnabled:Ni}),xt=P();function ia(){P().set("PROD",!0)}function Pn(){P().set("DEBUG",!0)}function bi(){P().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function zn(n){P().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(n+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function wi(){ze.disposeVariables()}function Ea(){return ze}function mo(){return ze.memory()}function Ha(n){return ze.profile(n)}function mt(n,t){return ze.tidy(n,t)}function Br(n){un(n).forEach(function(t){return t.dispose()})}function Xa(n){return ze.keep(n)}function go(n){return ze.time(n)}function Ka(n){return ze.setBackend(n)}function yo(){return ze.ready()}function bo(){return ze.backendName}function Za(n){ze.removeBackend(n)}function wo(n){return ze.findBackend(n)}function Ao(n){return ze.findBackendFactory(n)}function xo(n,t,e){return e===void 0&&(e=1),ze.registerBackend(n,t,e)}function Vn(){return ze.backend}function Ca(n,t){P().setPlatform(n,t)}function Fi(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];P().getBool("IS_TEST")||console.warn.apply(console,n)}function mr(n,t){var e=n;if(M(n))return t==="string"?[]:[n.length];if(!Array.isArray(n))return[];for(var r=[];Array.isArray(e)||M(e)&&t!=="string";)r.push(e.length),e=e[0];return Array.isArray(n)&&P().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function i(a,s,u){if(u=u||[],!Array.isArray(a)&&!M(a))return void Y(s.length===0,function(){return"Element arr["+u.join("][")+"] is a primitive, but should be an array/TypedArray of "+s[0]+" elements"});Y(s.length>0,function(){return"Element arr["+u.join("][")+"] should be a primitive, but is an array of "+a.length+" elements"}),Y(a.length===s[0],function(){return"Element arr["+u.join("][")+"] should have "+s[0]+" elements, but has "+a.length+" elements"});for(var l=s.slice(1),f=0;f<a.length;++f)i(a[f],l,u.concat(f))}(n,r,[]),r}function Ai(n,t,e,r){if(n!=null&&(n!=="numeric"&&n!==t||n==="numeric"&&t==="string"))throw new Error("Argument '"+e+"' passed to '"+r+"' must be "+n+" tensor, but got "+t+" tensor")}function Oe(n,t,e,r){if(r===void 0&&(r="numeric"),n instanceof Dt)return Ai(r,n.dtype,t,e),n;var i=he(n);if(i!=="string"&&["bool","int32","float32"].indexOf(r)>=0&&(i=r),Ai(r,i,t,e),n==null||!M(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string"){var a=n==null?"null":n.constructor.name;throw new Error("Argument '"+t+"' passed to '"+e+"' must be a Tensor or TensorLike, but got '"+a+"'")}var s=mr(n,i);M(n)||Array.isArray(n)||(n=[n]);var u=i!=="string"?De(n,i,P().getBool("DEBUG")):be(n,[],!0);return ze.makeTensor(u,s,i)}function dn(n,t,e,r){if(r===void 0&&(r="numeric"),!Array.isArray(n))throw new Error("Argument "+t+" passed to "+e+" must be a `Tensor[]` or `TensorLike[]`");return n.map(function(i,a){return Oe(i,t+"["+a+"]",e)},r)}function Bn(n,t){for(var e=0;e<n.length;++e)if(n[n.length-e-1]!==t-1-e)return!1;return!0}function Li(n,t,e){for(var r=n.length+t.length,i=[],a=0,s=0,u=0;u<r;u++)e.indexOf(u)===-1?i.push(n[a++]):i.push(t[s++]);return i}function xr(n,t){for(var e=[],r=n.length,i=0;i<r;i++)t.indexOf(i)===-1&&e.push(n[i]);return[e,t.map(function(a){return n[a]})]}function _r(n,t){return Li(n,t.map(function(e){return 1}),t)}function Vr(n,t,e){Y(Bn(t,e),function(){return n+" supports only inner-most axes for now. Got axes "+t+" and rank-"+e+" input."})}function hn(n,t){if(Bn(n,t))return null;for(var e=[],r=0;r<t;++r)n.indexOf(r)===-1&&e.push(r);return n.forEach(function(i){return e.push(i)}),e}function gt(n){return n.map(function(t,e){return[e,t]}).sort(function(t,e){return t[1]-e[1]}).map(function(t){return t[0]})}function bt(n,t){for(var e=[],r=t-n;r<t;++r)e.push(r);return e}function ar(n,t){var e=n[0].length;n.forEach(function(i,a){Y(i.length===e,function(){return"Error in concat"+e+"D: rank of tensors["+a+"] must be the same as the rank of the rest ("+e+")"})}),Y(t>=0&&t<e,function(){return"Error in concat"+e+"D: axis must be between 0 and "+(e-1)+"."});var r=n[0];n.forEach(function(i,a){for(var s=0;s<e;s++)Y(s===t||i[s]===r[s],function(){return"Error in concat"+e+"D: Shape of tensors["+a+"] ("+i+") does not match the shape of the rest ("+r+") along the non-concatenated axis "+a+"."})})}function or(n,t){for(var e=n[0].slice(),r=1;r<n.length;r++)e[t]+=n[r][t];return e}function We(n){var t=Object.keys(n);if(t.length!==1)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+t.length+" keys.");var e=t[0],r=n[e];e.endsWith("_")&&(e=e.substring(0,e.length-1));var i=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];ze.startScope(e);try{var u=r.apply(void 0,a);return u instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),ze.endScope(u),u}catch(l){throw ze.endScope(null),l}};return Object.defineProperty(i,"name",{value:e,configurable:!0}),i}xt.registerFlag("HAS_WEBGL",function(){return xt.getNumber("WEBGL_VERSION")>0}),xt.registerFlag("WEBGL_VERSION",function(){return Mi(2)?2:Mi(1)?1:0}),xt.registerFlag("WEBGL_BUFFER_SUPPORTED",function(){return xt.get("WEBGL_VERSION")===2}),xt.registerFlag("WEBGL_CPU_FORWARD",function(){return!0}),xt.registerFlag("WEBGL_FORCE_F16_TEXTURES",function(){return!1}),xt.registerFlag("WEBGL_PACK",function(){return xt.getBool("HAS_WEBGL")}),xt.registerFlag("WEBGL_PACK_NORMALIZATION",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_PACK_CLIP",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_PACK_DEPTHWISECONV",function(){return!1}),xt.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_PACK_REDUCE",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_LAZILY_UNPACK",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_CONV_IM2COL",function(){return xt.getBool("WEBGL_PACK")}),xt.registerFlag("WEBGL_MAX_TEXTURE_SIZE",function(){return xa(xt.getNumber("WEBGL_VERSION"))}),xt.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",function(){return ti(xt.getNumber("WEBGL_VERSION"))}),xt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",function(){var n=xt.getNumber("WEBGL_VERSION");return n===0?0:ra(n)}),xt.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",function(){return xt.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&(n=navigator.userAgent||navigator.vendor||window.opera,!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4))));var n}),xt.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",function(){return na(xt.getNumber("WEBGL_VERSION"))}),xt.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",function(){return!xt.getBool("WEBGL_FORCE_F16_TEXTURES")&&xt.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")}),xt.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",function(){return ri(xt.getNumber("WEBGL_VERSION"))}),xt.registerFlag("WEBGL_FENCE_API_ENABLED",function(){return Ni(xt.getNumber("WEBGL_VERSION"))}),xt.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",function(){return xt.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0}),kr=zn;var Er=We({complex_:function(n,t){var e=Oe(n,"real","complex"),r=Oe(t,"imag","complex");return fe(e.shape,r.shape,"real and imag shapes, "+e.shape+" and "+r.shape+", must match in call to tf.complex()."),ze.runKernelFunc(function(i){return i.complex(e,r)},{$real:e,$imag:r})}}),tn=We({real_:function(n){var t=Oe(n,"input","real");return ze.runKernelFunc(function(e){return e.real(t)},{$input:t})}}),Cn=We({imag_:function(n){var t=Oe(n,"input","imag");return ze.runKernelFunc(function(e){return e.imag(t)},{$input:t})}});function Cr(n,t,e){return Ui(n,t,mr(n,e),e)}function Ui(n,t,e,r){if(r==null&&(r=he(n)),r==="complex64")throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if(!M(n)&&!Array.isArray(n)&&typeof n!="number"&&typeof n!="boolean"&&typeof n!="string")throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(t!=null){nt(t);var i=le(t),a=le(e);Y(i===a,function(){return"Based on the provided shape, ["+t+"], the tensor should have "+i+" values but has "+a});for(var s=0;s<e.length;++s){var u=e[s],l=s!==e.length-1||u!==le(t.slice(s));Y(e[s]===t[s]||!l,function(){return"Error creating a new Tensor. Inferred shape ("+e+") does not match the provided shape ("+t+"). "})}}return M(n)||Array.isArray(n)||(n=[n]),t=t||e,n=r!=="string"?De(n,r,P().getBool("DEBUG")):be(n,[],!0),ze.makeTensor(n,t,r)}function vt(n,t){if((M(n)&&t!=="string"||Array.isArray(n))&&t!=="complex64")throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if(t==="string"&&M(n)&&!(n instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return Ui(n,[],[],t)}function Tr(n,t){ve(n);var e=mr(n,t);if(e.length!==1)throw new Error("tensor1d() requires values to be a flat/TypedArray");return Ui(n,null,e,t)}function Wi(n,t,e){if(ve(n),t!=null&&t.length!==2)throw new Error("tensor2d() requires shape to have two numbers");var r=mr(n,e);if(r.length!==2&&r.length!==1)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return Ui(n,t,r,e)}function ps(n,t,e){if(ve(n),t!=null&&t.length!==3)throw new Error("tensor3d() requires shape to have three numbers");var r=mr(n,e);if(r.length!==3&&r.length!==1)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return Ui(n,t,r,e)}function bn(n,t,e){if(ve(n),t!=null&&t.length!==4)throw new Error("tensor4d() requires shape to have four numbers");var r=mr(n,e);if(r.length!==4&&r.length!==1)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return Ui(n,t,r,e)}function Dd(n,t,e){if(ve(n),t!=null&&t.length!==5)throw new Error("tensor5d() requires shape to have five numbers");var r=mr(n,e);if(r.length!==5&&r.length!==1)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return Ui(n,t,r,e)}function jd(n,t,e){if(ve(n),t!=null&&t.length!==6)throw new Error("tensor6d() requires shape to have six numbers");var r=mr(n,e);if(r.length!==6&&r.length!==1)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(r.length===1&&t==null)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return Ui(n,t=t||r,r,e)}function Pd(n,t,e,r){return t===void 0&&(t=!0),ze.makeVariable(n,t,e,r)}function Sa(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=Sa(n,"float32"),r=fr(n,"float32");return Er(e,r)}var i=Ke(le(n),t);return ze.makeTensor(i,n,t)}function fr(n,t){if(t===void 0&&(t="float32"),t==="complex64"){var e=fr(n,"float32"),r=fr(n,"float32");return Er(e,r)}var i=$e(le(n),t);return ze.makeTensor(i,n,t)}function ni(n,t,e){return ze.runKernelFunc(function(r){return r.fill(n,t,e)},{})}function Bd(n,t,e){if(e<=0)throw new Error("The number of values should be positive.");return ze.runKernelFunc(function(r){return r.linspace(n,t,e)},{})}function Eo(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e===0)throw new Error("Cannot have a step of zero");if(n===t||n<t&&e<0||t<n&&e>1)return fr([0],r);var i=$e(Math.abs(Math.ceil((t-n)/e)),r);t<n&&e===1&&(e=-1),i[0]=n;for(var a=1;a<i.length;a++)i[a]=i[a-1]+e;return Tr(i,r)}var cl=We({onesLike_:function(n){var t=Oe(n,"x","onesLike");if(t.dtype==="complex64"){var e=cl(tn(t)),r=Gt(Cn(t));return Er(e,r)}return ze.runKernelFunc(function(i){return i.onesLike(t)},{$x:t},function(i,a){return{$x:function(){return Gt(i)}}})}}),Gt=We({zerosLike_:function(n){var t=Oe(n,"x","zerosLike");return ze.runKernelFunc(function(e){return e.zerosLike(t)},{$x:t},function(e,r){return{$x:function(){return Gt(e)}}})}}),Mr=We({concat_:function(n,t){t===void 0&&(t=0),Y(n.length>=1,function(){return"Pass at least one tensor to concat"});var e=dn(n,"tensors","concat");e[0].dtype==="complex64"&&e.forEach(function(u){if(u.dtype!=="complex64")throw new Error(`Cannot concatenate complex64 tensors with a tensor
|
|
with dtype `+u.dtype+". ")}),t=ye(t,e[0].shape)[0];var r=or(e.map(function(u){return u.shape}),t);if(le(r)===0)return Cr([],r);if((e=e.filter(function(u){return u.size>0})).length===1)return e[0];var i=e.map(function(u){return u.shape});ar(i,t);var a=e,s={axis:t};return ze.runKernelFunc(function(u){return u.concat(e,t)},a,function(u){var l=i.map(function(f){return f[t]});return vs(u,l,t).map(function(f){return function(){return f}})},"Concat",s)}}),_d=We({concat1d_:function(n){return Mr(n,0)}}),Md=We({concat2d_:function(n,t){return Mr(n,t)}}),Nd=We({concat3d_:function(n,t){return Mr(n,t)}}),Fd=We({concat4d_:function(n,t){return Mr(n,t)}}),vs=We({split_:function(n,t,e){e===void 0&&(e=0);var r,i=Oe(n,"x","split");return e=ye(e,i.shape)[0],typeof t=="number"?(Y(i.shape[e]%t==0,function(){return"Number of splits must evenly divide the axis."}),r=new Array(t).fill(i.shape[e]/t)):(Y(i.shape[e]===t.reduce(function(a,s){return a+s}),function(){return"The sum of sizes must match the size of the axis dimension."}),r=t),ze.runKernelFunc(function(a){return a.split(i,r,e)},{$x:i},function(a){return{$x:function(){return Mr(a,e)}}})}});typeof globalThis!="undefined"||typeof window!="undefined"||typeof Le.g!="undefined"&&Le.g;function aa(n,t){return n(t={exports:{}},t.exports),t.exports}var Ld=aa(function(n){(function(t,e,r){function i(u){var l,f=this,A=(l=4022871197,function(I){I=I.toString();for(var R=0;R<I.length;R++){var z=.02519603282416938*(l+=I.charCodeAt(R));z-=l=z>>>0,l=(z*=l)>>>0,l+=4294967296*(z-=l)}return 23283064365386963e-26*(l>>>0)});f.next=function(){var I=2091639*f.s0+23283064365386963e-26*f.c;return f.s0=f.s1,f.s1=f.s2,f.s2=I-(f.c=0|I)},f.c=1,f.s0=A(" "),f.s1=A(" "),f.s2=A(" "),f.s0-=A(u),f.s0<0&&(f.s0+=1),f.s1-=A(u),f.s1<0&&(f.s1+=1),f.s2-=A(u),f.s2<0&&(f.s2+=1),A=null}function a(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function s(u,l){var f=new i(u),A=l&&l.state,I=f.next;return I.int32=function(){return 4294967296*f.next()|0},I.double=function(){return I()+11102230246251565e-32*(2097152*I()|0)},I.quick=I,A&&(typeof A=="object"&&a(A,f),I.state=function(){return a(f,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.alea=s})(0,n,!1)}),Ud=aa(function(n){(function(t,e,r){function i(u){var l=this,f="";l.x=0,l.y=0,l.z=0,l.w=0,l.next=function(){var I=l.x^l.x<<11;return l.x=l.y,l.y=l.z,l.z=l.w,l.w^=l.w>>>19^I^I>>>8},u===(0|u)?l.x=u:f+=u;for(var A=0;A<f.length+64;A++)l.x^=0|f.charCodeAt(A),l.next()}function a(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l}function s(u,l){var f=new i(u),A=l&&l.state,I=function(){return(f.next()>>>0)/4294967296};return I.double=function(){do var R=((f.next()>>>11)+(f.next()>>>0)/4294967296)/2097152;while(R===0);return R},I.int32=f.next,I.quick=I,A&&(typeof A=="object"&&a(A,f),I.state=function(){return a(f,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor128=s})(0,n,!1)}),Wd=aa(function(n){(function(t,e,r){function i(u){var l=this,f="";l.next=function(){var I=l.x^l.x>>>2;return l.x=l.y,l.y=l.z,l.z=l.w,l.w=l.v,(l.d=l.d+362437|0)+(l.v=l.v^l.v<<4^I^I<<1)|0},l.x=0,l.y=0,l.z=0,l.w=0,l.v=0,u===(0|u)?l.x=u:f+=u;for(var A=0;A<f.length+64;A++)l.x^=0|f.charCodeAt(A),A==f.length&&(l.d=l.x<<10^l.x>>>4),l.next()}function a(u,l){return l.x=u.x,l.y=u.y,l.z=u.z,l.w=u.w,l.v=u.v,l.d=u.d,l}function s(u,l){var f=new i(u),A=l&&l.state,I=function(){return(f.next()>>>0)/4294967296};return I.double=function(){do var R=((f.next()>>>11)+(f.next()>>>0)/4294967296)/2097152;while(R===0);return R},I.int32=f.next,I.quick=I,A&&(typeof A=="object"&&a(A,f),I.state=function(){return a(f,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorwow=s})(0,n,!1)}),zd=aa(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var f,A,I=l.x,R=l.i;return f=I[R],A=(f^=f>>>7)^f<<24,A^=(f=I[R+1&7])^f>>>10,A^=(f=I[R+3&7])^f>>>3,A^=(f=I[R+4&7])^f<<7,f=I[R+7&7],A^=(f^=f<<13)^f<<9,I[R]=A,l.i=R+1&7,A},function(f,A){var I,R=[];if(A===(0|A))R[0]=A;else for(A=""+A,I=0;I<A.length;++I)R[7&I]=R[7&I]<<15^A.charCodeAt(I)+R[I+1&7]<<13;for(;R.length<8;)R.push(0);for(I=0;I<8&&R[I]===0;++I);for(I==8?R[7]=-1:R[I],f.x=R,f.i=0,I=256;I>0;--I)f.next()}(l,u)}function a(u,l){return l.x=u.x.slice(),l.i=u.i,l}function s(u,l){u==null&&(u=+new Date);var f=new i(u),A=l&&l.state,I=function(){return(f.next()>>>0)/4294967296};return I.double=function(){do var R=((f.next()>>>11)+(f.next()>>>0)/4294967296)/2097152;while(R===0);return R},I.int32=f.next,I.quick=I,A&&(A.x&&a(A,f),I.state=function(){return a(f,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xorshift7=s})(0,n,!1)}),Vd=aa(function(n){(function(t,e,r){function i(u){var l=this;l.next=function(){var f,A,I=l.w,R=l.X,z=l.i;return l.w=I=I+1640531527|0,A=R[z+34&127],f=R[z=z+1&127],A^=A<<13,f^=f<<17,A^=A>>>15,f^=f>>>12,A=R[z]=A^f,l.i=z,A+(I^I>>>16)|0},function(f,A){var I,R,z,te,oe,ae=[],se=128;for(A===(0|A)?(R=A,A=null):(A+="\0",R=0,se=Math.max(se,A.length)),z=0,te=-32;te<se;++te)A&&(R^=A.charCodeAt((te+32)%A.length)),te===0&&(oe=R),R^=R<<10,R^=R>>>15,R^=R<<4,R^=R>>>13,te>=0&&(oe=oe+1640531527|0,z=(I=ae[127&te]^=R+oe)==0?z+1:0);for(z>=128&&(ae[127&(A&&A.length||0)]=-1),z=127,te=512;te>0;--te)R=ae[z+34&127],I=ae[z=z+1&127],R^=R<<13,I^=I<<17,R^=R>>>15,I^=I>>>12,ae[z]=R^I;f.w=oe,f.X=ae,f.i=z}(l,u)}function a(u,l){return l.i=u.i,l.w=u.w,l.X=u.X.slice(),l}function s(u,l){u==null&&(u=+new Date);var f=new i(u),A=l&&l.state,I=function(){return(f.next()>>>0)/4294967296};return I.double=function(){do var R=((f.next()>>>11)+(f.next()>>>0)/4294967296)/2097152;while(R===0);return R},I.int32=f.next,I.quick=I,A&&(A.X&&a(A,f),I.state=function(){return a(f,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.xor4096=s})(0,n,!1)}),Qd=aa(function(n){(function(t,e,r){function i(u){var l=this,f="";l.next=function(){var I=l.b,R=l.c,z=l.d,te=l.a;return I=I<<25^I>>>7^R,R=R-z|0,z=z<<24^z>>>8^te,te=te-I|0,l.b=I=I<<20^I>>>12^R,l.c=R=R-z|0,l.d=z<<16^R>>>16^te,l.a=te-I|0},l.a=0,l.b=0,l.c=-1640531527,l.d=1367130551,u===Math.floor(u)?(l.a=u/4294967296|0,l.b=0|u):f+=u;for(var A=0;A<f.length+20;A++)l.b^=0|f.charCodeAt(A),l.next()}function a(u,l){return l.a=u.a,l.b=u.b,l.c=u.c,l.d=u.d,l}function s(u,l){var f=new i(u),A=l&&l.state,I=function(){return(f.next()>>>0)/4294967296};return I.double=function(){do var R=((f.next()>>>11)+(f.next()>>>0)/4294967296)/2097152;while(R===0);return R},I.int32=f.next,I.quick=I,A&&(typeof A=="object"&&a(A,f),I.state=function(){return a(f,{})}),I}e&&e.exports?e.exports=s:r&&r.amd?r(function(){return s}):this.tychei=s})(0,n,!1)}),oa=aa(function(n){(function(t,e){var r,i=this,a=256,s=6,u="random",l=e.pow(a,s),f=e.pow(2,52),A=2*f,I=a-1;function R(se,we,xe){var me=[],Se=oe(function Fe(je,Be){var Ge,Qe=[],Ze=typeof je;if(Be&&Ze=="object")for(Ge in je)try{Qe.push(Fe(je[Ge],Be-1))}catch(Ye){}return Qe.length?Qe:Ze=="string"?je:je+"\0"}((we=we==1?{entropy:!0}:we||{}).entropy?[se,ae(t)]:se==null?function(){try{var Fe;return r&&(Fe=r.randomBytes)?Fe=Fe(a):(Fe=new Uint8Array(a),(i.crypto||i.msCrypto).getRandomValues(Fe)),ae(Fe)}catch(Ge){var je=i.navigator,Be=je&&je.plugins;return[+new Date,i,Be,i.screen,ae(t)]}}():se,3),me),Re=new z(me),Me=function(){for(var Fe=Re.g(s),je=l,Be=0;Fe<f;)Fe=(Fe+Be)*a,je*=a,Be=Re.g(1);for(;Fe>=A;)Fe/=2,je/=2,Be>>>=1;return(Fe+Be)/je};return Me.int32=function(){return 0|Re.g(4)},Me.quick=function(){return Re.g(4)/4294967296},Me.double=Me,oe(ae(Re.S),t),(we.pass||xe||function(Fe,je,Be,Ge){return Ge&&(Ge.S&&te(Ge,Re),Fe.state=function(){return te(Re,{})}),Be?(e[u]=Fe,je):Fe})(Me,Se,"global"in we?we.global:this==e,we.state)}function z(se){var we,xe=se.length,me=this,Se=0,Re=me.i=me.j=0,Me=me.S=[];for(xe||(se=[xe++]);Se<a;)Me[Se]=Se++;for(Se=0;Se<a;Se++)Me[Se]=Me[Re=I&Re+se[Se%xe]+(we=Me[Se])],Me[Re]=we;(me.g=function(Fe){for(var je,Be=0,Ge=me.i,Qe=me.j,Ze=me.S;Fe--;)je=Ze[Ge=I&Ge+1],Be=Be*a+Ze[I&(Ze[Ge]=Ze[Qe=I&Qe+je])+(Ze[Qe]=je)];return me.i=Ge,me.j=Qe,Be})(a)}function te(se,we){return we.i=se.i,we.j=se.j,we.S=se.S.slice(),we}function oe(se,we){for(var xe,me=se+"",Se=0;Se<me.length;)we[I&Se]=I&(xe^=19*we[I&Se])+me.charCodeAt(Se++);return ae(we)}function ae(se){return String.fromCharCode.apply(0,se)}if(e["seed"+u]=R,oe(e.random(),t),n.exports){n.exports=R;try{r=Le(91423)}catch(se){}}})([],Math)});oa.alea=Ld,oa.xor128=Ud,oa.xorwow=Wd,oa.xorshift7=zd,oa.xor4096=Vd,oa.tychei=Qd;var Co=oa.alea,ms=function(){function n(t,e,r,i,a){this.mean=t,this.stdDev=e,this.dtype=r,this.nextVal=NaN,this.truncated=i,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);var s=a||Math.random();this.random=Co(s.toString())}return n.prototype.nextValue=function(){if(!isNaN(this.nextVal)){var t=this.nextVal;return this.nextVal=NaN,t}for(var e,r,i=!1;!i;){var a=void 0,s=void 0,u=void 0;do u=(a=2*this.random()-1)*a+(s=2*this.random()-1)*s;while(u>=1||u===0);var l=Math.sqrt(-2*Math.log(u)/u);e=this.mean+this.stdDev*a*l,r=this.mean+this.stdDev*s*l,this.truncated&&!this.isValidTruncated(e)||(i=!0)}return this.truncated&&!this.isValidTruncated(r)||(this.nextVal=this.convertValue(r)),this.convertValue(e)},n.prototype.convertValue=function(t){return this.dtype==null||this.dtype==="float32"?t:Math.round(t)},n.prototype.isValidTruncated=function(t){return t<=this.upper&&t>=this.lower},n}(),Gd=function(){function n(t,e,r,i){this.alpha=t,this.beta=1/e,this.dtype=r;var a=i||Math.random();this.randu=Co(a.toString()),this.randn=new ms(0,1,r,!1,this.randu()),this.d=t<1?t+2/3:t-1/3,this.c=1/Math.sqrt(9*this.d)}return n.prototype.nextValue=function(){for(var t,e,r,i,a,s;;){do i=this.randn.nextValue(),s=1+this.c*i;while(s<=0);if(s*=s*s,e=1-.331*(t=i*i)*t,r=.5*t+this.d*(1-s+Math.log(s)),(a=this.randu())<e||Math.log(a)<r)break}return s=1/this.beta*this.d*s,this.alpha<1&&(s*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(s)},n.prototype.convertValue=function(t){return this.dtype==="float32"?t:Math.round(t)},n}(),Hd=function(){function n(t,e,r,i){var a=this;if(t===void 0&&(t=0),e===void 0&&(e=1),this.canReturnFloat=function(){return a.dtype==null||a.dtype==="float32"},this.min=t,this.range=e-t,this.dtype=r,i==null&&(i=Math.random()),typeof i=="number"&&(i=i.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error("The difference between "+t+" - "+e+" <= 1 and dtype is not float");this.random=Co(i)}return n.prototype.convertValue=function(t){return this.canReturnFloat()?t:Math.round(t)},n.prototype.nextValue=function(){return this.convertValue(this.min+this.range*this.random())},n}();function It(n,t,e){return t===void 0&&(t="float32"),t=t||"float32",nt(n),new ur(n,t,e)}function Xd(n,t){t===void 0&&(t=!1),console.log(n.toString(t))}var fl=We({batchToSpaceND_:function(n,t,e){var r=Oe(n,"x","batchToSpaceND"),i=t.reduce(function(a,s){return a*s});return Y(r.rank>=1+t.length,function(){return"input rank is "+r.rank+" but should be > than blockShape.length "+t.length}),Y(e.length===t.length,function(){return"crops.length is "+e.length+" but should be equal to blockShape.length "+t.length}),Y(r.shape[0]%i==0,function(){return"input tensor batch is "+r.shape[0]+" but is not divisible by the product of the elements of blockShape "+t.join(" * ")+" === "+i}),ze.runKernelFunc(function(a){return a.batchToSpaceND(r,t,e)},{$x:r},function(a){return{$x:function(){return a.spaceToBatchND(t,e)}}})}}),Kd=We({broadcastTo_:function(n,t){var e=Oe(n,"broadcastTo","x"),r=e.shape;if(t.some(function(l){return!(l>0)||l%1!=0}))throw new Error("broadcastTo(): Invalid broadcast shape ["+t+"].");if(t.length<e.rank)throw new Error("broadcastTo(): shape.length="+t.length+" < input.rank="+e.rank+".");if(t.length>e.rank){for(var i=e.shape.slice();i.length<t.length;)i.unshift(1);e=e.reshape(i)}for(var a=Array.from(t),s=t.length-1;s>=0;s--)if(e.shape[s]===t[s])a[s]=1;else if(e.shape[s]!==1)throw new Error("broadcastTo(): ["+r+"] cannot be broadcast to ["+t+"].");var u=a.map(function(l,f){return l>1?f:-1}).filter(function(l){return l>=0});return u.length===0?e.clone():ze.runKernelFunc(function(l){return l.tile(e,a)},{input:e},function(l){return{input:function(){return l.sum(u,!0)}}})}}),Zd=We({cast_:function(n,t){var e=Oe(n,"x","cast");if(!ee(t))throw new Error("Failed to cast to unknown dtype "+t);if(t==="string"&&e.dtype!=="string"||t!=="string"&&e.dtype==="string")throw new Error("Only strings can be casted to strings");var r={dtype:t};return ze.runKernelFunc(function(i){return i.cast(e,t)},{x:e},function(i){return{x:function(){return i.clone()}}},"Cast",r)}}),Jd=We({clone_:function(n){var t=Oe(n,"x","clone",null);return ze.runKernelFunc(function(){return ze.makeTensorFromDataId(t.dataId,t.shape,t.dtype)},{$x:t},function(e){return{$x:function(){return e.toFloat()}}})}}),Yd=We({cumsum_:function(n,t,e,r){t===void 0&&(t=0),e===void 0&&(e=!1),r===void 0&&(r=!1);var i=Oe(n,"x","cumsum"),a=hn([t|=0],i.rank),s=i;a!=null&&(s=i.transpose(a));var u=bt(1,i.rank)[0],l=ze.runKernelFunc(function(f){return f.cumsum(s,u,e,r)},{permutedX:s},function(f){return{permutedX:function(){return f.cumsum(t,e,!r)}}});return a!=null&&(l=l.transpose(a)),l}}),$d=We({depthToSpace_:function(n,t,e){e===void 0&&(e="NHWC");var r=Oe(n,"x","depthToSpace"),i=e==="NHWC"?r.shape[1]:r.shape[2],a=e==="NHWC"?r.shape[2]:r.shape[3],s=e==="NHWC"?r.shape[3]:r.shape[1];return Y(i*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
|
|
`+i+" and "+t+` for depthToSpace with input shape
|
|
`+r.shape}),Y(a*t>=0,function(){return`Negative dimension size caused by overflow when multiplying
|
|
`+a+" and "+t+` for depthToSpace with input shape
|
|
`+r.shape}),Y(s%(t*t)==0,function(){return"Dimension size must be evenly divisible by "+t*t+" but is "+s+" for depthToSpace with input shape "+r.shape}),ze.runKernelFunc(function(u){return u.depthToSpace(r,t,e)},{$x:r})}}),_n=We({expandDims_:function(n,t){t===void 0&&(t=0);var e=Oe(n,"x","expandDims",null);Y(t<=e.rank,function(){return"Axis must be <= rank of the tensor"});var r=e.shape.slice();return t<0&&(Y(-(e.rank+1)<=t,function(){return"Axis must be in the interval ["+-(e.rank+1)+", "+e.rank+"]"}),t=e.rank+t+1),r.splice(t,0,1),Qn(e,r)}}),dl=We({eye_:function(n,t,e,r){r===void 0&&(r="float32"),t==null&&(t=n);for(var i=It([n,t],r),a=n<=t?n:t,s=0;s<a;++s)i.set(1,s,s);var u=i.toTensor().as2D(n,t);if(e==null)return u;if(e.length===1)return Ia(_n(u,0),[e[0],1,1]);if(e.length===2)return Ia(_n(_n(u,0),0),[e[0],e[1],1,1]);if(e.length===3)return Ia(_n(_n(_n(u,0),0),0),[e[0],e[1],e[2],1,1]);throw new Error("eye() currently supports only 1D and 2D batchShapes, but received "+e.length+"D.")}}),qd=We({multinomial_:function(n,t,e,r){r===void 0&&(r=!1);var i=Oe(n,"logits","multinomial"),a=i.size,s=i.rank;if(a<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+a+".");if(s>2)throw new Error("Rank of probabilities must be 1 or 2, but is "+s);e=e||Math.random();var u=s===1?i.as2D(1,-1):i,l=ze.runKernelFunc(function(f){return f.multinomial(u,r,t,e)},{logits2D:u});return s===1?l.as1D():l}}),gs=We({oneHot_:function(n,t,e,r){if(e===void 0&&(e=1),r===void 0&&(r=0),t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);var i=Oe(n,"indices","oneHot","int32"),a=i.shape.concat([t]);return i=i.flatten(),ze.runKernelFunc(function(s){return s.oneHot(i,t,e,r)},{$indices:i},function(s){return{$indices:function(){return fr(i.shape,"float32")}}}).reshape(a)}}),sa=We({pad_:function(n,t,e){e===void 0&&(e=0);var r=Oe(n,"x","pad");if(r.rank===0)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");var i={paddings:t,constantValue:e};return ze.runKernelFunc(function(a){return a.pad(r,t,e)},{x:r},function(a){var s=t.map(function(u){return u[0]});return{x:function(){return a.slice(s,r.shape)}}},"PadV2",i)}}),eh=We({pad1d_:function(n,t,e){return e===void 0&&(e=0),Y(t.length===2,function(){return"Invalid number of paddings. Must be length of 2."}),sa(n,[t],e)}}),th=We({pad2d_:function(n,t,e){return e===void 0&&(e=0),Y(t.length===2&&t[0].length===2&&t[1].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),sa(n,t,e)}}),rh=We({pad3d_:function(n,t,e){return e===void 0&&(e=0),Y(t.length===3&&t[0].length===2&&t[1].length===2&&t[2].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),sa(n,t,e)}}),nh=We({pad4d_:function(n,t,e){return e===void 0&&(e=0),Y(t.length===4&&t[0].length===2&&t[1].length===2&&t[2].length===2&&t[3].length===2,function(){return"Invalid number of paddings. Must be length of 2 each."}),sa(n,t,e)}}),ih=We({rand_:function(n,t,e){var r=le(n),i=null;if(e==null||e==="float32")i=new Float32Array(r);else if(e==="int32")i=new Int32Array(r);else{if(e!=="bool")throw new Error("Unknown data type "+e);i=new Uint8Array(r)}for(var a=0;a<r;a++)i[a]=t();return ze.makeTensor(i,n,e)}}),ah=We({randomNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var a=new ms(t,e,r,!1,i),s=It(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),oh=We({randomGamma_:function(n,t,e,r,i){if(e===void 0&&(e=1),r===void 0&&(r="float32"),e==null&&(e=1),r==null&&(r="float32"),r!=="float32"&&r!=="int32")throw new Error("Unsupported data type "+r);for(var a=new Gd(t,e,r,i),s=It(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),hl=We({randomUniform_:function(n,t,e,r,i){t===void 0&&(t=0),e===void 0&&(e=1),r===void 0&&(r="float32");for(var a=It(n,r),s=new Hd(t,e,null,i),u=0;u<a.values.length;u++)a.values[u]=s.nextValue();return a.toTensor()}}),Qn=We({reshape_:function(n,t){var e=Oe(n,"x","reshape",null);t=Z(t,e.size),Y(e.size===le(t),function(){return"new shape and old shape must have the same number of elements."});var r={shape:t};return ze.runKernelFunc(function(i){return i.reshape(e,t)},{x:e},function(i){return{x:function(){return i.reshape(e.shape)}}},"Reshape",r)}}),pl=We({spaceToBatchND_:function(n,t,e){var r=Oe(n,"x","spaceToBatchND");return Y(r.rank>=1+t.length,function(){return"input rank "+r.rank+" should be > than [blockShape] "+t.length}),Y(e.length===t.length,function(){return"paddings.shape[0] "+e.length+" must be equal to [blockShape] "+t.length}),Y(r.shape.reduce(function(i,a,s){return s>0&&s<=t.length?i&&(a+e[s-1][0]+e[s-1][1])%t[s-1]==0:i},!0),function(){return"input spatial dimensions "+r.shape.slice(1)+" with paddings "+e.toString()+" must be divisible by blockShapes "+t.toString()}),ze.runKernelFunc(function(i){return i.spaceToBatchND(r,t,e)},{$x:r},function(i){return{$x:function(){return i.batchToSpaceND(t,e)}}})}}),vl=We({squeeze_:function(n,t){var e=Oe(n,"x","squeeze");return Qn(e,V(e.shape,t).newShape)}}),Sn=We({stack_:function(n,t){t===void 0&&(t=0);var e=dn(n,"tensors","stack");if(Y(e.length>=1,function(){return"Pass at least one tensor to tf.stack"}),e.length===1)return e[0].expandDims(t);var r=e[0].rank,i=e[0].shape,a=e[0].dtype;Y(t<=r,function(){return"Axis must be <= rank of the tensor"}),e.forEach(function(u){fe(i,u.shape,"All tensors passed to stack must have matching shapes")}),e.forEach(function(u){Y(a===u.dtype,function(){return"All tensors passed to stack must have matching dtypes"})});var s=e.map(function(u){return u.expandDims(t)});return Mr(s,t)}}),Ia=We({tile_:function(n,t){var e=Oe(n,"x","tile",null);Y(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of reps "+t+"."});var r=[e],i={reps:t};return ze.runKernelFunc(function(a,s){var u=a.tile(e,t);return s([e]),u},{x:e},function(a,s){var u=s[0];return{x:function(){var l=Gt(u);if(u.rank===1)for(var f=0;f<t[0];++f)l=l.add(a.slice([f*u.shape[0]],[u.shape[0]]));else if(u.rank===2)for(f=0;f<t[0];++f)for(var A=0;A<t[1];++A)l=l.add(a.slice([f*u.shape[0],A*u.shape[1]],[u.shape[0],u.shape[1]]));else if(u.rank===3)for(f=0;f<t[0];++f)for(A=0;A<t[1];++A)for(var I=0;I<t[2];++I)l=l.add(a.slice([f*u.shape[0],A*u.shape[1],I*u.shape[2]],[u.shape[0],u.shape[1],u.shape[2]]));else{if(u.rank!==4)throw new Error("Gradient for tile operation is not implemented for rank-"+u.rank+" tensors yet.");for(f=0;f<t[0];++f)for(A=0;A<t[1];++A)for(I=0;I<t[2];++I)for(var R=0;R<t[3];++R)l=l.add(a.slice([f*u.shape[0],A*u.shape[1],I*u.shape[2],R*u.shape[3]],[u.shape[0],u.shape[1],u.shape[2],u.shape[3]]))}return l}}},"Tile",i,r)}}),sh=We({truncatedNormal_:function(n,t,e,r,i){if(t===void 0&&(t=0),e===void 0&&(e=1),r!=null&&r==="bool")throw new Error("Unsupported data type "+r);for(var a=new ms(t,e,r,!0,i),s=It(n,r),u=0;u<s.values.length;u++)s.values[u]=a.nextValue();return s.toTensor()}}),Nr=We({unstack_:function(n,t){t===void 0&&(t=0),t=t||0;var e=Oe(n,"x","unstack");Y(t>=-e.shape.length&&t<e.shape.length,function(){return"Axis = "+t+" is not in [-"+e.shape.length+", "+e.shape.length+")"}),t<0&&(t+=e.shape.length);var r={axis:t};return ze.runKernelFunc(function(i){return i.unstack(e,t)},{x:e},function(i){return{x:function(){return Sn(i,t)}}},"Unpack",r)}}),uh=function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,f,A,I;return x(this,function(R){switch(R.label){case 0:return e=Oe(n,"x","setdiff1d"),r=Oe(t,"y","setdiff1d"),Y(e.dtype===r.dtype,function(){return"x and y should have the same dtype, but got x ("+e.dtype+") and y ("+r.dtype+")."}),Y(e.rank===1,function(){return"x should be 1D tensor, but got x ("+e.shape+")."}),Y(r.rank===1,function(){return"y should be 1D tensor, but got y ("+r.shape+")."}),[4,e.data()];case 1:return i=R.sent(),[4,r.data()];case 2:for(a=R.sent(),s=new Set(a),u=0,A=0;A<i.length;A++)s.has(i[A])||u++;for(l=new ur([u],e.dtype),f=new ur([u],"int32"),A=0,I=0;A<i.length;A++)s.has(i[A])||(l.values[I]=i[A],f.values[I]=A,I++);return[2,[l.toTensor(),f.toTensor()]]}})})};function So(n,t,e,r){r===void 0&&(r=!0);var i=[];if(r)(i=i.concat(t.slice(0))).push(n[0]/e),i=i.concat(n.slice(1));else{i=i.concat(n[0]);for(var a=t.length,s=0;s<a;++s)i=i.concat([n[s+1]/t[s],t[s]]);i=i.concat(n.slice(a+1))}return i}function Io(n,t,e){e===void 0&&(e=!0);var r=[];if(e){r.push(t);for(var i=t+1;i<n;++i)i<=2*t?(r.push(i),r.push(i-(t+1))):r.push(i)}else{var a=[],s=[];for(i=1;i<n;++i)i>=2*t+1||i%2==1?s.push(i):a.push(i);r.push.apply(r,a),r.push(0),r.push.apply(r,s)}return r}function To(n,t,e,r){r===void 0&&(r=!0);var i=[];r?i.push(n[0]/e):i.push(n[0]*e);for(var a=1;a<n.length;++a)a<=t.length?r?i.push(t[a-1]*n[a]):i.push(n[a]/t[a-1]):i.push(n[a]);return i}function ml(n,t){for(var e=[0],r=0;r<t;++r)e.push(n[r][0]);return e}function gl(n,t,e){for(var r=n.slice(0,1),i=0;i<e;++i)r.push(n[i+1]-t[i][0]-t[i][1]);return r}function ys(n,t){if(n.rank<1)throw new Error("tf.gatherND() expects the input to be rank 1 or higher, but the rank was "+n.rank+".");if(t.rank<1)throw new Error("tf.gatherND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(t.dtype!=="int32")throw new Error("tf.gatherND() expects the indices to be int32 type, but the dtype was "+t.dtype+".");if(t.shape[t.rank-1]>n.rank)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+t.shape[t.rank-1]+" vs. "+n.rank);if(n.size===0)throw new Error("Requested more than 0 entries, but input is empty. Input shape: "+n.shape+".");for(var e=t.shape,r=e[e.length-1],i=1,a=0;a<e.length-1;++a)i*=e[a];var s=n.shape,u=e.slice();u.pop();var l=1;for(a=r;a<n.rank;++a)l*=s[a],u.push(s[a]);var f=Ve(n.shape).map(function(A){return A/l}).concat([1]).slice(0,r);return[u,i,l,f]}var rb=Object.freeze({prepareAndValidate:ys}),bs=30;function Ro(n){return n<=bs?n:Pe(n,Math.floor(Math.sqrt(n)))}function yl(n,t,e){var r=t.rank>1?t.shape[t.rank-1]:1,i=t.rank>1?t.rank-1:1,a="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+e.shape+", indices.shape: "+t.shape+", shape: "+n+", sliceDim: "+r+", and batchDim: "+i+".";if(e.rank<i)throw new Error(a+" update.rank < "+i+". ");if(n.length<r+(e.rank-i))throw new Error(a+" Output shape length < "+(r+(e.rank-i)));if(e.rank!==i+n.length-r)throw new Error(a+" update.rank != "+(i+n.length-r));for(var s=0;s<i;++s)if(e.shape[s]!==t.shape[s])throw new Error(a+" updates.shape["+s+"] ("+e.shape[s]+") != indices.shape["+s+"] ("+t.shape[s]+").");for(s=0;s<e.rank-i;++s)if(e.shape[s+i]!==n[s+r])throw new Error(a+" updates.shape["+(s+i)+"] ("+e.shape[s+i]+") != shape["+(s+i)+"] ("+n[s+i]+")")}function bl(n,t,e){if(t.rank<1)throw new Error("tf.scatterND() expects the indices to be rank 1 or higher, but the rank was "+t.rank+".");if(n.rank<1)throw new Error("tf.scatterND() expects the updates to be rank 1 or higher, but the rank was "+n.rank+".");if(t.dtype!=="int32")throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(e.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+e);if(e.length===0){if(t.size===0)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(n.size===0)throw new Error("Updates specified for empty output. updates shape: "+n.shape)}yl(e,t,n)}function Ja(n,t,e){for(var r=t.shape.length,i=r>1?t.shape[r-1]:1,a=e.length,s=1,u=i;u<a;++u)s*=e[u];var l=i<1?1:i;return{sliceRank:i,numUpdates:le(t.shape)/l,sliceSize:s,strides:Ve(e.slice(0,i)).concat([1]),outputSize:le(e)}}var nb=Object.freeze({validateUpdateShape:yl,validateInput:bl,calculateShapes:Ja});function wl(n,t,e){Y(n.rank===t.length,function(){return"Error in slice"+n.rank+"D: Length of begin "+t+" must match the rank of the array ("+n.rank+")."}),Y(n.rank===e.length,function(){return"Error in slice"+n.rank+"D: Length of size "+e+" must match the rank of the array ("+n.rank+")."});for(var r=function(a){Y(t[a]+e[a]<=n.shape[a],function(){return"Error in slice"+n.rank+"D: begin["+a+"] + size["+a+"] ("+(t[a]+e[a])+") would overflow input.shape["+a+"] ("+n.shape[a]+")"})},i=0;i<n.rank;++i)r(i)}function ws(n){for(var t=[],e=0;n>0;)1&n&&t.push(e),n/=2,e++;return t}function ko(n,t,e){for(var r=[],i=0;i<n.length;i++)r[i]=Math.ceil((t[i]-n[i])/e[i]);return r}function Al(n,t,e,r,i){var a=t[i],s=e[i]||1;(n&1<<i||a==null)&&(a=s>0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);var u=r[i];return a<0&&(a+=u),a=pe(0,a,u-1)}function xl(n,t,e,r,i){var a=t[i],s=e[i]||1;(n&1<<i||a==null)&&(a=s>0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);var u=r[i];return a<0&&(a+=u),a=s>0?pe(0,a,u):pe(-1,a,u-1)}function As(n,t,e){for(var r=e.length,i=0;i<e.length;i++)if(e[i]>1){r=i;break}for(i=r+1;i<e.length;i++)if(t[i]>0||e[i]!==n[i])return!1;return!0}function xs(n,t){for(var e=n.length>0?n[n.length-1]:1,r=0;r<n.length-1;r++)e+=n[r]*t[r];return e}var ib=Object.freeze({assertParamsValid:wl,maskToAxes:ws,computeOutShape:ko,startForAxis:Al,stopForAxis:xl,isSliceContinous:As,computeFlatOffset:xs});function ab(n){return Y(Te(n),function(){return"The f passed in grad(f) must be a function"}),function(t,e){var r=Oe(t,"x","tf.grad",null),i=e!=null?Oe(e,"dy","tf.grad"):null;return ze.tidy(function(){var a=ze.gradients(function(){return n(r)},[r],i),s=a.value,u=a.grads;return i!=null&&fe(s.shape,i.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),Do(u),u[0]})}}function ob(n){return Y(Te(n),function(){return"The f passed in grads(f) must be a function"}),function(t,e){Y(Array.isArray(t),function(){return"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s"});var r=dn(t,"args","tf.grads",null),i=e!=null?Oe(e,"dy","tf.grads"):null;return ze.tidy(function(){var a=ze.gradients(function(){return n.apply(void 0,r)},r,i),s=a.value,u=a.grads;return i!=null&&fe(s.shape,i.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Do(u),u})}}function sb(n){return Y(Te(n),function(){return"The f passed in valueAndGrad(f) must be a function"}),function(t,e){Y(t instanceof Dt,function(){return"The x passed in valueAndGrad(f)(x) must be a tensor"}),Y(e==null||e instanceof Dt,function(){return"The dy passed in valueAndGrad(f)(x, dy) must be a tensor"});var r=ze.gradients(function(){return n(t)},[t],e),i=r.grads,a=r.value;return Do(i),{grad:i[0],value:a}}}function ub(n){return Y(Te(n),function(){return"The f passed in valueAndGrads(f) must be a function"}),function(t,e){Y(Array.isArray(t)&&t.every(function(i){return i instanceof Dt}),function(){return"The args passed in valueAndGrads(f)(args) must be array of tensors"}),Y(e==null||e instanceof Dt,function(){return"The dy passed in valueAndGrads(f)(args, dy) must be a tensor"});var r=ze.gradients(function(){return n.apply(void 0,t)},t,e);return e!=null&&fe(r.value.shape,e.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),Do(r.grads),r}}function lh(n,t){Y(Te(n),function(){return"The f passed in variableGrads(f) must be a function"}),Y(t==null||Array.isArray(t)&&t.every(function(A){return A instanceof Ar}),function(){return"The varList passed in variableGrads(f, varList) must be an array of variables"});var e=t!=null;if(!e)for(var r in t=[],ze.registeredVariables)t.push(ze.registeredVariables[r]);var i=e?t.filter(function(A){return!A.trainable}):null,a=t.length;Y((t=t.filter(function(A){return A.trainable})).length>0,function(){return"variableGrads() expects at least one of the input variables to be trainable, but none of the "+a+" variables is trainable."});var s=ze.gradients(n,t,null,!0),u=s.value,l=s.grads;Y(l.some(function(A){return A!=null}),function(){return"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize()."}),Y(u.rank===0,function(){return"The f passed in variableGrads(f) must return a scalar, but it returned a rank-"+u.rank+" tensor"});var f={};return t.forEach(function(A,I){l[I]!=null&&(f[A.name]=l[I])}),i!=null&&i.forEach(function(A){return f[A.name]=null}),{value:u,grads:f}}function Oo(n){return ze.customGrad(n)}function Do(n){if(n.filter(function(t){return t==null}).length>0)throw new Error(`Cannot compute gradient of y=f(x) with respect to x. Make sure that
|
|
the f you passed encloses all operations that lead from x to y.`)}var xi=We({softmax_:function(n,t){t===void 0&&(t=-1);var e=Oe(n,"logits","softmax","float32");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and dim was "+t);return ze.runKernelFunc(function(r,i){var a=r.softmax(e,t);return i([a]),a},{logits:e},function(r,i){var a=i[0],s=r.mul(a);return{logits:function(){return s.sub(s.sum([t],!0).mul(a))}}},"Softmax",{dim:t},[],[!0])}}),ch=We({logSoftmax_:function(n,t){t===void 0&&(t=-1);var e=Oe(n,"logits","logSoftmax");if(t===-1&&(t=e.rank-1),t!==e.rank-1)throw Error("Log Softmax along a non-last dimension is not yet supported. Logits was rank "+e.rank+" and axis was "+t);return Oo(function(r,i){var a=r.max(t,!0),s=r.sub(a),u=s.toFloat().sub(s.exp().sum(t,!0).log());return i([u]),{value:u,gradFunc:function(l,f){var A=f[0].exp();return l.sub(l.sum(t,!0).mul(A))}}})(e)}}),El=function(){function n(t,e){this.backend=t,this.dataMover=e,this.data=new WeakMap,this.dataIdsCount=0}return n.prototype.get=function(t){return this.data.has(t)||this.dataMover.moveData(this.backend,t),this.data.get(t)},n.prototype.set=function(t,e){this.dataIdsCount++,this.data.set(t,e)},n.prototype.has=function(t){return this.data.has(t)},n.prototype.delete=function(t){return this.dataIdsCount--,this.data.delete(t)},n.prototype.numDataIds=function(){return this.dataIdsCount},n}(),Cl=function(){function n(){}return n.prototype.time=function(t){return qe("time")},n.prototype.read=function(t){return qe("read")},n.prototype.readSync=function(t){return qe("readSync")},n.prototype.numDataIds=function(){return qe("numDataIds")},n.prototype.disposeData=function(t){return qe("disposeData")},n.prototype.write=function(t,e,r){return qe("write")},n.prototype.move=function(t,e,r,i){return qe("move")},n.prototype.memory=function(){return qe("memory")},n.prototype.floatPrecision=function(){return qe("floatPrecision")},n.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},n.prototype.batchMatMul=function(t,e,r,i){return qe("batchMatMul")},n.prototype.fusedBatchMatMul=function(t){return t.a,t.b,t.transposeA,t.transposeB,t.bias,t.activation,t.preluActivationWeights,qe("fusedBatchMatMul")},n.prototype.slice=function(t,e,r){return qe("slice")},n.prototype.stridedSlice=function(t,e,r,i){return qe("stridedSlice")},n.prototype.unstack=function(t,e){return qe("unstack")},n.prototype.reverse=function(t,e){return qe("reverse")},n.prototype.concat=function(t,e){return qe("concat")},n.prototype.neg=function(t){return qe("neg")},n.prototype.add=function(t,e){return qe("add")},n.prototype.addN=function(t){return qe("addN")},n.prototype.subtract=function(t,e){return qe("subtract")},n.prototype.multiply=function(t,e){return qe("multiply")},n.prototype.realDivide=function(t,e){return qe("realDivide")},n.prototype.floorDiv=function(t,e){return qe("floorDiv")},n.prototype.sum=function(t,e){return qe("sum")},n.prototype.prod=function(t,e){return qe("prod")},n.prototype.unsortedSegmentSum=function(t,e,r){return qe("unsortedSegmentSum")},n.prototype.argMin=function(t,e){return qe("argMin")},n.prototype.argMax=function(t,e){return qe("argMax")},n.prototype.equal=function(t,e){return qe("equal")},n.prototype.notEqual=function(t,e){return qe("notEqual")},n.prototype.less=function(t,e){return qe("less")},n.prototype.lessEqual=function(t,e){return qe("lessEqual")},n.prototype.greater=function(t,e){return qe("greater")},n.prototype.greaterEqual=function(t,e){return qe("greaterEqual")},n.prototype.logicalNot=function(t){return qe("logicalNot")},n.prototype.logicalAnd=function(t,e){return qe("logicalAnd")},n.prototype.logicalOr=function(t,e){return qe("logicalOr")},n.prototype.where=function(t){return qe("where")},n.prototype.select=function(t,e,r){return qe("select")},n.prototype.topk=function(t,e,r){return qe("topk")},n.prototype.min=function(t,e){return qe("min")},n.prototype.minimum=function(t,e){return qe("minimum")},n.prototype.mod=function(t,e){return qe("mod")},n.prototype.max=function(t,e){return qe("max")},n.prototype.maximum=function(t,e){return qe("maximum")},n.prototype.all=function(t,e){return qe("all")},n.prototype.any=function(t,e){return qe("any")},n.prototype.squaredDifference=function(t,e){return qe("squaredDifference")},n.prototype.ceil=function(t){return qe("ceil")},n.prototype.floor=function(t){return qe("floor")},n.prototype.round=function(t){return qe("round")},n.prototype.sign=function(t){return qe("sign")},n.prototype.isNaN=function(t){return qe("isNaN")},n.prototype.isInf=function(t){return qe("isInf")},n.prototype.isFinite=function(t){return qe("isFinite")},n.prototype.pow=function(t,e){return qe("pow")},n.prototype.exp=function(t){return qe("exp")},n.prototype.expm1=function(t){return qe("expm1")},n.prototype.softmax=function(t,e){return qe("softmax")},n.prototype.log=function(t){return qe("log")},n.prototype.log1p=function(t){return qe("log1p")},n.prototype.sqrt=function(t){return qe("sqrt")},n.prototype.rsqrt=function(t){return qe("rsqrt")},n.prototype.square=function(t){return qe("square")},n.prototype.reciprocal=function(t){return qe("reciprocal")},n.prototype.relu=function(t){return qe("relu")},n.prototype.relu6=function(t){return qe("relu6")},n.prototype.prelu=function(t,e){return qe("prelu")},n.prototype.elu=function(t){return qe("elu")},n.prototype.eluDer=function(t,e){return qe("eluDer")},n.prototype.selu=function(t){return qe("selu")},n.prototype.int=function(t){return qe("int")},n.prototype.clip=function(t,e,r){return qe("clip")},n.prototype.abs=function(t){return qe("abs")},n.prototype.complexAbs=function(t){return qe("complexAbs")},n.prototype.sigmoid=function(t){return qe("sigmoid")},n.prototype.softplus=function(t){return qe("softplus")},n.prototype.sin=function(t){return qe("sin")},n.prototype.cos=function(t){return qe("cos")},n.prototype.tan=function(t){return qe("tan")},n.prototype.asin=function(t){return qe("asin")},n.prototype.acos=function(t){return qe("acos")},n.prototype.atan=function(t){return qe("atan")},n.prototype.atan2=function(t,e){return qe("atan2")},n.prototype.sinh=function(t){return qe("sinh")},n.prototype.cosh=function(t){return qe("cosh")},n.prototype.tanh=function(t){return qe("tanh")},n.prototype.asinh=function(t){return qe("asinh")},n.prototype.acosh=function(t){return qe("acosh")},n.prototype.atanh=function(t){return qe("atanh")},n.prototype.erf=function(t){return qe("erf")},n.prototype.step=function(t,e){return qe("step")},n.prototype.fusedConv2d=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,qe("fusedConv2d")},n.prototype.conv2d=function(t,e,r){return qe("conv2d")},n.prototype.conv2dDerInput=function(t,e,r){return qe("conv2dDerInput")},n.prototype.conv2dDerFilter=function(t,e,r){return qe("conv2dDerFilter")},n.prototype.fusedDepthwiseConv2D=function(t){return t.input,t.filter,t.convInfo,t.bias,t.activation,t.preluActivationWeights,qe("fusedDepthwiseConv2D")},n.prototype.depthwiseConv2D=function(t,e,r){return qe("depthwiseConv2D")},n.prototype.depthwiseConv2DDerInput=function(t,e,r){return qe("depthwiseConv2DDerInput")},n.prototype.depthwiseConv2DDerFilter=function(t,e,r){return qe("depthwiseConv2DDerFilter")},n.prototype.conv3d=function(t,e,r){return qe("conv3d")},n.prototype.conv3dDerInput=function(t,e,r){return qe("conv3dDerInput")},n.prototype.conv3dDerFilter=function(t,e,r){return qe("conv3dDerFilter")},n.prototype.maxPool=function(t,e){return qe("maxPool")},n.prototype.maxPoolBackprop=function(t,e,r,i){return qe("maxPoolBackprop")},n.prototype.avgPool=function(t,e){return qe("avgPool")},n.prototype.avgPoolBackprop=function(t,e,r){return qe("avgPoolBackprop")},n.prototype.avgPool3d=function(t,e){return qe("avgPool3d")},n.prototype.avgPool3dBackprop=function(t,e,r){return qe("avgPool3dBackprop")},n.prototype.maxPool3d=function(t,e){return qe("maxPool3d")},n.prototype.maxPool3dBackprop=function(t,e,r,i){return qe("maxPool3dBackprop")},n.prototype.reshape=function(t,e){return qe("reshape")},n.prototype.cast=function(t,e){return qe("cast")},n.prototype.tile=function(t,e){return qe("tile")},n.prototype.pad=function(t,e,r){return qe("pad")},n.prototype.transpose=function(t,e){return qe("transpose")},n.prototype.gather=function(t,e,r){return qe("gather")},n.prototype.gatherND=function(t,e){return qe("gatherND")},n.prototype.scatterND=function(t,e,r){return qe("scatterND")},n.prototype.batchToSpaceND=function(t,e,r){return qe("batchToSpaceND")},n.prototype.spaceToBatchND=function(t,e,r){return qe("spaceToBatchND")},n.prototype.resizeBilinear=function(t,e,r,i){return qe("resizeBilinear")},n.prototype.resizeBilinearBackprop=function(t,e,r){return qe("resizeBilinearBackprop")},n.prototype.resizeNearestNeighbor=function(t,e,r,i){return qe("resizeNearestNeighbor")},n.prototype.resizeNearestNeighborBackprop=function(t,e,r){return qe("resizeNearestNeighborBackprop")},n.prototype.batchNormalization=function(t,e,r,i,a,s){return qe("batchNormalization")},n.prototype.localResponseNormalization4D=function(t,e,r,i,a){return qe("localResponseNormalization4D")},n.prototype.LRNGrad=function(t,e,r,i,a,s,u){return qe("LRNGrad")},n.prototype.multinomial=function(t,e,r,i){return qe("multinomial")},n.prototype.oneHot=function(t,e,r,i){return qe("oneHot")},n.prototype.cumsum=function(t,e,r,i){return qe("cumsum")},n.prototype.nonMaxSuppression=function(t,e,r,i,a){return qe("nonMaxSuppression")},n.prototype.fft=function(t){return qe("fft")},n.prototype.ifft=function(t){return qe("ifft")},n.prototype.complex=function(t,e){return qe("complex")},n.prototype.real=function(t){return qe("real")},n.prototype.imag=function(t){return qe("imag")},n.prototype.cropAndResize=function(t,e,r,i,a,s){return qe("cropAndResize")},n.prototype.depthToSpace=function(t,e,r){return qe("depthToSpace")},n.prototype.split=function(t,e,r){return qe("split")},n.prototype.sparseToDense=function(t,e,r,i){return qe("sparseToDense")},n.prototype.diag=function(t){return qe("diag")},n.prototype.fill=function(t,e,r){return qe("fill")},n.prototype.onesLike=function(t){return qe("onesLike")},n.prototype.zerosLike=function(t){return qe("zerosLike")},n.prototype.linspace=function(t,e,r){return qe("linspace")},n.prototype.dispose=function(){return qe("dispose")},n}();function qe(n){throw new Error("'"+n+"' not yet implemented or not found in the registry. Did you forget to import the kernel?")}function Ei(n,t){for(var e=n.length,r=[],i=0;i<e;i++){var a=e-1-i,s=n[a]||1;(t[t.length-1-i]||1)>1&&s===1&&r.unshift(a)}return r}function Rr(n,t){for(var e=[],r=0;r<t.length;r++){var i=n[n.length-r-1],a=t.length-r-1,s=t[a];(i==null||i===1&&s>1)&&e.unshift(a)}return e}function Mt(n,t){for(var e=[],r=Math.max(n.length,t.length),i=0;i<r;i++){var a=n[n.length-i-1];a==null&&(a=1);var s=t[t.length-i-1];if(s==null&&(s=1),a===1)e.unshift(s);else if(s===1)e.unshift(a);else{if(a!==s)throw Error("Operands could not be broadcast together with shapes "+n+" and "+t+".");e.unshift(a)}}return e}function Ta(n,t,e,r,i,a,s){s===void 0&&(s="channelsLast");var u,l=jo(t),f=l[0],A=l[1];if(s==="channelsLast")u=[f,A,n[3],n[3]];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);u=[f,A,n[1],n[1]]}return zi(n,u,e,r,i,a,!1,s)}function Ya(n,t,e,r,i,a,s){s===void 0&&(s="NDHWC");var u,l,f=Cs(t),A=f[0],I=f[1],R=f[2];if(s==="NDHWC")l="channelsLast",u=[A,I,R,n[4],n[4]];else{if(s!=="NCDHW")throw new Error("Unknown dataFormat "+s);l="channelsFirst",u=[A,I,R,n[1],n[1]]}return $a(n,u,e,r,i,!1,l,a)}function zi(n,t,e,r,i,a,s,u){s===void 0&&(s=!1),u===void 0&&(u="channelsLast");var l=[-1,-1,-1,-1],f=l[0],A=l[1],I=l[2],R=l[3];if(u==="channelsLast")f=n[0],A=n[1],I=n[2],R=n[3];else{if(u!=="channelsFirst")throw new Error("Unknown dataFormat "+u);f=n[0],R=n[1],A=n[2],I=n[3]}var z,te=t[0],oe=t[1],ae=t[3],se=jo(e),we=se[0],xe=se[1],me=jo(r),Se=me[0],Re=me[1],Me=Ra(te,Se),Fe=Ra(oe,Re),je=function(Ye,tt,st,at,it,lt,rt,ft){var dt,yt,Ct;if(typeof Ye=="number"){dt={top:Ye,bottom:Ye,left:Ye,right:Ye,type:Ye===0?"VALID":"NUMBER"};var Tt=function(Lt,rr,Ht,sr,yr){sr==null&&(sr=Es(Lt,rr,Ht));var br=Lt[0],ci=Lt[1],fi=qa((br-rr+2*sr)/Ht+1,yr);Y(ge(fi),function(){return"The output # of rows ("+fi+") must be an integer. Change the stride and/or zero pad parameters"});var kn=qa((ci-rr+2*sr)/Ht+1,yr);return Y(ge(kn),function(){return"The output # of columns ("+kn+") must be an integer. Change the stride and/or zero pad parameters"}),[fi,kn]}([tt,st],lt,at,Ye,ft);yt=Tt[0],Ct=Tt[1]}else if(Ye==="same"){yt=Math.ceil(tt/at),Ct=Math.ceil(st/it);var Pt=Math.max(0,(yt-1)*at+lt-tt),Ut=Math.max(0,(Ct-1)*it+rt-st),Ft=Math.floor(Pt/2),Wt=Pt-Ft,Bt=Math.floor(Ut/2);dt={top:Ft,bottom:Wt,left:Bt,right:Ut-Bt,type:"SAME"}}else{if(Ye!=="valid")throw Error("Unknown padding parameter: "+Ye);dt={top:0,bottom:0,left:0,right:0,type:"VALID"},yt=Math.ceil((tt-lt+1)/at),Ct=Math.ceil((st-rt+1)/it)}return{padInfo:dt,outHeight:yt,outWidth:Ct}}(i,A,I,we,xe,Me,Fe,a),Be=je.padInfo,Ge=je.outHeight,Qe=je.outWidth,Ze=s?ae*R:ae;return u==="channelsFirst"?z=[f,Ze,Ge,Qe]:u==="channelsLast"&&(z=[f,Ge,Qe,Ze]),{batchSize:f,dataFormat:u,inHeight:A,inWidth:I,inChannels:R,outHeight:Ge,outWidth:Qe,outChannels:Ze,padInfo:Be,strideHeight:we,strideWidth:xe,filterHeight:te,filterWidth:oe,effectiveFilterHeight:Me,effectiveFilterWidth:Fe,dilationHeight:Se,dilationWidth:Re,inShape:n,outShape:z,filterShape:t}}function $a(n,t,e,r,i,a,s,u){a===void 0&&(a=!1),s===void 0&&(s="channelsLast");var l=[-1,-1,-1,-1,-1],f=l[0],A=l[1],I=l[2],R=l[3],z=l[4];if(s==="channelsLast")f=n[0],A=n[1],I=n[2],R=n[3],z=n[4];else{if(s!=="channelsFirst")throw new Error("Unknown dataFormat "+s);f=n[0],z=n[1],A=n[2],I=n[3],R=n[4]}var te,oe=t[0],ae=t[1],se=t[2],we=t[4],xe=Cs(e),me=xe[0],Se=xe[1],Re=xe[2],Me=Cs(r),Fe=Me[0],je=Me[1],Be=Me[2],Ge=Ra(oe,Fe),Qe=Ra(ae,je),Ze=Ra(se,Be),Ye=function(rt,ft,dt,yt,Ct,Tt,Pt,Ut,Ft,Wt,Bt){var Lt,rr,Ht,sr;if(typeof rt=="number"){Lt={top:rt,bottom:rt,left:rt,right:rt,front:rt,back:rt,type:rt===0?"VALID":"NUMBER"};var yr=function(Qa,ji,al,Ga,di,ol){di==null&&(di=Es(Qa,ji,Ga));var q0=Qa[0],eb=Qa[1],tb=Qa[2],sl=qa((q0-ji+2*di)/Ga+1,ol);Y(ge(sl),function(){return"The output # of depths ("+sl+") must be an integer. Change the stride and/or zero pad parameters"});var ul=qa((eb-ji+2*di)/Ga+1,ol);Y(ge(ul),function(){return"The output # of rows ("+ul+") must be an integer. Change the stride and/or zero pad parameters"});var ll=qa((tb-ji+2*di)/Ga+1,ol);return Y(ge(ll),function(){return"The output # of columns ("+ll+") must be an integer. Change the stride and/or zero pad parameters"}),[sl,ul,ll,al]}([ft,dt,yt,1],Ut,1,Ct,rt,Bt);rr=yr[0],Ht=yr[1],sr=yr[2]}else if(rt==="same"){rr=Math.ceil(ft/Ct),Ht=Math.ceil(dt/Tt),sr=Math.ceil(yt/Pt);var br=(rr-1)*Ct+Ut-ft,ci=(Ht-1)*Tt+Ft-dt,fi=(sr-1)*Pt+Wt-yt,kn=Math.floor(br/2),Va=br-kn,Oi=Math.floor(ci/2),$i=ci-Oi,Di=Math.floor(fi/2);Lt={top:Oi,bottom:$i,left:Di,right:fi-Di,front:kn,back:Va,type:"SAME"}}else{if(rt!=="valid")throw Error("Unknown padding parameter: "+rt);Lt={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},rr=Math.ceil((ft-Ut+1)/Ct),Ht=Math.ceil((dt-Ft+1)/Tt),sr=Math.ceil((yt-Wt+1)/Pt)}return{padInfo:Lt,outDepth:rr,outHeight:Ht,outWidth:sr}}(i,A,I,R,me,Se,Re,Ge,Qe,Ze,u),tt=Ye.padInfo,st=Ye.outDepth,at=Ye.outHeight,it=Ye.outWidth,lt=a?we*z:we;return s==="channelsFirst"?te=[f,lt,st,at,it]:s==="channelsLast"&&(te=[f,st,at,it,lt]),{batchSize:f,dataFormat:s,inDepth:A,inHeight:I,inWidth:R,inChannels:z,outDepth:st,outHeight:at,outWidth:it,outChannels:lt,padInfo:tt,strideDepth:me,strideHeight:Se,strideWidth:Re,filterDepth:oe,filterHeight:ae,filterWidth:se,effectiveFilterDepth:Ge,effectiveFilterHeight:Qe,effectiveFilterWidth:Ze,dilationDepth:Fe,dilationHeight:je,dilationWidth:Be,inShape:n,outShape:te,filterShape:t}}function Es(n,t,e,r){r===void 0&&(r=1);var i=Ra(t,r);return Math.floor((n[0]*(e-1)-e+i)/2)}function jo(n){return typeof n=="number"?[n,n,n]:n.length===2?[n[0],n[1],1]:n}function Cs(n){return typeof n=="number"?[n,n,n]:n}function Ra(n,t){return t<=1?n:n+(n-1)*(t-1)}function qa(n,t){if(!t)return n;switch(t){case"round":return Math.round(n);case"ceil":return Math.ceil(n);case"floor":return Math.floor(n);default:throw new Error("Unknown roundingMode "+t)}}function ua(n){var t=jo(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function pn(n,t){return ua(n)||ua(t)}function Po(n){if(n==="NHWC")return"channelsLast";if(n==="NCHW")return"channelsFirst";throw new Error("Unknown dataFormat "+n)}function Ss(n,t,e){if(t==="complex64"){if(n.dtype==="complex64")return n.clone();var r=fr(n.shape),i=n.toFloat(),a=e.complex(i,r);return r.dispose(),i.dispose(),a}if(!W(n.dtype,t))return ze.makeTensorFromDataId(n.dataId,n.shape,t);if(n.dtype==="complex64"){var s=e.real(n);return a=s.cast(t),s.dispose(),a}if(t==="int32")return e.int(n);if(t==="bool"){var u=vt(0,n.dtype);return a=e.notEqual(n,u),u.dispose(),a}throw new Error("Error in Cast: failed to cast "+n.dtype+" to "+t)}function Bo(n,t){return ze.makeTensorFromDataId(n.dataId,t,n.dtype)}function Is(n,t,e){var r=(t-n)/(e-1),i=$e(e,"float32");i[0]=n;for(var a=1;a<i.length;a++)i[a]=i[a-1]+r;return Tr(i,"float32")}var lb=Object.freeze({castTensor:Ss,reshapeTensor:Bo,linspaceImpl:Is,upcastType:tr,axesAreInnerMostDims:Bn,combineLocations:Li,computeOutAndReduceShapes:xr,expandShapeToKeepDim:_r,assertAxesAreInnerMostDims:Vr,getAxesPermutation:hn,getUndoAxesPermutation:gt,getInnerMostAxes:bt,getBroadcastDims:Ei,getReductionAxes:Rr,assertAndGetBroadcastShape:Mt,assertParamsConsistent:ar,computeOutShape:or,computePool2DInfo:Ta,computePool3DInfo:Ya,computeConv2DInfo:zi,computeConv3DInfo:$a,computeDefaultPad:Es,tupleValuesAreOne:ua,eitherStridesOrDilationsAreOne:pn,convertConv2DDataFormat:Po,PARALLELIZE_THRESHOLD:bs,computeOptimalWindowSize:Ro});function Ts(n,t){if(n.length!==t.length)throw new Error("Cannot merge real and imag arrays of different lengths. real:"+n.length+", imag: "+t.length+".");for(var e=new Float32Array(2*n.length),r=0;r<e.length;r+=2)e[r]=n[r/2],e[r+1]=t[r/2];return e}function Sl(n,t){return{real:n[2*t],imag:n[2*t+1]}}function fh(n,t,e,r){n[2*r]=t,n[2*r+1]=e}function dh(n,t,e){var r=(e?2:-2)*Math.PI*(n/t);return{real:Math.cos(r),imag:Math.sin(r)}}function hh(n,t,e){var r=function(a,s,u){return function(l,f,A){for(var I=0,R=l.length,z=0,te=!1;I<R;){var oe=A(f,l[z=I+(R-I>>>1)]);oe>0?I=z+1:(R=z,te=!oe)}return te?I:-I-1}(a,s,u||ph)}(n,t,e),i=r<0?-(r+1):r;n.splice(i,0,t)}function ph(n,t){return n>t?1:n<t?-1:0}function Rs(n,t,e,r,i){return Il(n,t,e,r,i,0).selectedIndices}function ks(n,t,e,r,i,a){var s=Il(n,t,e,r,i,a,!0);return s.numValidOutputs.dispose(),{selectedIndices:s.selectedIndices,selectedScores:s.selectedScores}}function Il(n,t,e,r,i,a,s,u){s===void 0&&(s=!1),u===void 0&&(u=!1);for(var l=Array.from(t).map(function(me,Se){return{score:me,boxIndex:Se,suppressBeginIndex:0}}).filter(function(me){return me.score>i}).sort(Tl),f=a>0?-.5/a:0,A=[],I=[];A.length<e&&l.length>0;){var R=l.pop(),z=R.score,te=R.boxIndex,oe=R.suppressBeginIndex;if(z<i)break;for(var ae=!1,se=A.length-1;se>=oe;--se){var we=vh(n,te,A[se]);if(we>=r){ae=!0;break}if(R.score=R.score*mh(r,f,we),R.score<=i)break}R.suppressBeginIndex=A.length,ae||(R.score===z?(A.push(te),I.push(R.score)):R.score>i&&hh(l,R,Tl))}var xe=A.length;return u&&(A.fill(0,xe),I.fill(0,xe)),{selectedIndices:Tr(A,"int32"),selectedScores:Tr(I,"float32"),numValidOutputs:vt(xe,"int32")}}function vh(n,t,e){var r=n.subarray(4*t,4*t+4),i=n.subarray(4*e,4*e+4),a=Math.min(r[0],r[2]),s=Math.min(r[1],r[3]),u=Math.max(r[0],r[2]),l=Math.max(r[1],r[3]),f=Math.min(i[0],i[2]),A=Math.min(i[1],i[3]),I=Math.max(i[0],i[2]),R=Math.max(i[1],i[3]),z=(u-a)*(l-s),te=(I-f)*(R-A);if(z<=0||te<=0)return 0;var oe=Math.max(a,f),ae=Math.max(s,A),se=Math.min(u,I),we=Math.min(l,R),xe=Math.max(se-oe,0)*Math.max(we-ae,0);return xe/(z+te-xe)}function mh(n,t,e){var r=Math.exp(t*e*e);return e<=n?r:0}function Tl(n,t){return n.score-t.score||n.score===t.score&&t.boxIndex-n.boxIndex}function Rl(n,t,e){var r=new Array(n.rank).fill(0),i=n.shape.slice();return t.map(function(a){i[e]=a;var s=n.slice(r,i);return r[e]+=a,s})}function kl(n,t){for(var e=new Array(n.rank),r=0;r<e.length;r++)e[r]=n.shape[r]*t[r];var i=It(e,n.dtype);for(r=0;r<i.values.length;++r){for(var a=i.indexToLoc(r),s=new Array(n.rank),u=0;u<s.length;u++)s[u]=a[u]%n.shape[u];var l=n.locToIndex(s);i.values[r]=n.values[l]}return i.toTensor()}function Ol(n,t,e,r,i){for(var a=t[t.length-1],s=[n.length/a,a],u=s[0],l=s[1],f=Q(e,u*r),A=Q("int32",u*r),I=0;I<u;I++){for(var R=I*l,z=n.subarray(R,R+l),te=[],oe=0;oe<z.length;oe++)te.push({value:z[oe],index:oe});te.sort(function(me,Se){return Se.value-me.value});var ae=I*r,se=f.subarray(ae,ae+r),we=A.subarray(ae,ae+r);for(oe=0;oe<r;oe++)se[oe]=te[oe].value,we[oe]=te[oe].index}var xe=t.slice();return xe[xe.length-1]=r,[Cr(f,xe,e),Cr(A,xe,"int32")]}function Os(n,t){for(var e=[],r=0;r<t.length;r++)t[r]&&e.push(r);var i=It(n,"int32"),a=It([e.length,n.length],"int32");for(r=0;r<e.length;r++){var s=i.indexToLoc(e[r]),u=r*n.length;a.values.set(s,u)}return a.toTensor()}var gh=function(n,t){this.outputShape=[],this.outputShape=n,this.variableNames=t.map(function(i,a){return"T"+a});var e=[];this.variableNames.forEach(function(i){e.push("float v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
|
|
void main() {
|
|
`+e.join(`
|
|
`)+`
|
|
|
|
float result = `+r+`;
|
|
setOutput(result);
|
|
}
|
|
`},yh=function(n,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.variableNames=t.map(function(i,a){return"T"+a});var e=[];this.variableNames.forEach(function(i){e.push("vec4 v"+i+" = get"+i+"AtOutCoords();")});var r=this.variableNames.map(function(i){return"v"+i}).join(" + ");this.userCode=`
|
|
void main() {
|
|
`+e.join(`
|
|
`)+`
|
|
|
|
vec4 result = `+r+`;
|
|
setOutput(result);
|
|
}
|
|
`},bh=function(n,t,e){this.variableNames=["A"];var r=n.windowSize,i=n.batchSize,a=n.inSize,s=Math.ceil(a/r);e||this.variableNames.push("bestIndicesA"),this.outputShape=[i,s];var u=t==="max"?">":"<",l=e?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int outIdx = coords[1];
|
|
int inOffset = outIdx * `+r+`;
|
|
|
|
int bestIndex = inOffset;
|
|
float bestValue = getA(batch, bestIndex);
|
|
|
|
for (int i = 0; i < `+r+`; i++) {
|
|
int inIdx = `+l+`;
|
|
float candidate = getA(batch, inIdx);
|
|
if (candidate `+u+` bestValue) {
|
|
bestValue = candidate;
|
|
bestIndex = inIdx;
|
|
}
|
|
}
|
|
setOutput(float(bestIndex));
|
|
}
|
|
`};function Dl(n,t){return["x","y","z","w","u","v"].slice(0,t).map(function(e){return n+"."+e})}function wn(n,t){return t===1?[n]:Dl(n,t)}function rn(){var n,t,e,r,i,a,s,u,l,f;return P().getNumber("WEBGL_VERSION")===2?(n="#version 300 es",t="in",e="out",r="in",i="texture",a="outputColor",s="out vec4 outputColor;",u=`
|
|
bool isnan_custom(float val) {
|
|
return (val > 0.0 || val < 0.0) ? false : val != 0.0;
|
|
}
|
|
|
|
bvec4 isnan_custom(vec4 val) {
|
|
return bvec4(isnan_custom(val.x),
|
|
isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));
|
|
}
|
|
|
|
#define isnan(value) isnan_custom(value)
|
|
`,l="",f=`
|
|
#define round(value) newRound(value)
|
|
int newRound(float value) {
|
|
return int(floor(value + 0.5));
|
|
}
|
|
|
|
ivec4 newRound(vec4 value) {
|
|
return ivec4(floor(value + vec4(0.5)));
|
|
}
|
|
`):(n="",t="attribute",e="varying",r="varying",i="texture2D",a="gl_FragColor",s="",u=`
|
|
#define isnan(value) isnan_custom(value)
|
|
bool isnan_custom(float val) {
|
|
return (val > 0. || val < 1. || val == 0.) ? false : true;
|
|
}
|
|
bvec4 isnan_custom(vec4 val) {
|
|
return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));
|
|
}
|
|
`,l=`
|
|
uniform float INFINITY;
|
|
|
|
bool isinf(float val) {
|
|
return abs(val) == INFINITY;
|
|
}
|
|
bvec4 isinf(vec4 val) {
|
|
return equal(abs(val), vec4(INFINITY));
|
|
}
|
|
`,f=`
|
|
int round(float value) {
|
|
return int(floor(value + 0.5));
|
|
}
|
|
|
|
ivec4 round(vec4 value) {
|
|
return ivec4(floor(value + vec4(0.5)));
|
|
}
|
|
`),{version:n,attribute:t,varyingVs:e,varyingFs:r,texture2D:i,output:a,defineOutput:s,defineSpecialNaN:u,defineSpecialInf:l,defineRound:f}}function la(n,t,e){e===void 0&&(e="index");var r=Ve(t);return r.map(function(i,a){return"int "+n[a]+" = "+e+" / "+i+"; "+(a===r.length-1?"int "+n[a+1]+" = "+e+" - "+n[a]+" * "+i:"index -= "+n[a]+" * "+i)+";"}).join("")}function Ds(n){var t=Ve(n).map(function(e){return e.toString()});return`
|
|
int getFlatIndex(ivec3 coords) {
|
|
return coords.x * `+t[0]+" + coords.y * "+t[1]+` + coords.z;
|
|
}
|
|
`}var jl=`
|
|
const float FLOAT_MAX = 1.70141184e38;
|
|
const float FLOAT_MIN = 1.17549435e-38;
|
|
|
|
lowp vec4 encode_float(highp float v) {
|
|
if (isnan(v)) {
|
|
return vec4(255, 255, 255, 255);
|
|
}
|
|
|
|
highp float av = abs(v);
|
|
|
|
if(av < FLOAT_MIN) {
|
|
return vec4(0.0, 0.0, 0.0, 0.0);
|
|
} else if(v > FLOAT_MAX) {
|
|
return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;
|
|
} else if(v < -FLOAT_MAX) {
|
|
return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;
|
|
}
|
|
|
|
highp vec4 c = vec4(0,0,0,0);
|
|
|
|
highp float e = floor(log2(av));
|
|
highp float m = exp2(fract(log2(av))) - 1.0;
|
|
|
|
c[2] = floor(128.0 * m);
|
|
m -= c[2] / 128.0;
|
|
c[1] = floor(32768.0 * m);
|
|
m -= c[1] / 32768.0;
|
|
c[0] = floor(8388608.0 * m);
|
|
|
|
highp float ebias = e + 127.0;
|
|
c[3] = floor(ebias / 2.0);
|
|
ebias -= c[3] * 2.0;
|
|
c[2] += floor(ebias) * 128.0;
|
|
|
|
c[3] += 128.0 * step(0.0, -v);
|
|
|
|
return c / 255.0;
|
|
}
|
|
`;function wh(n,t,e,r){var i=[];n.forEach(function(z){var te=le(z.shapeInfo.logicalShape);z.shapeInfo.isUniform?i.push("uniform float "+z.name+(te>1?"["+te+"]":"")+";"):(i.push("uniform sampler2D "+z.name+";"),i.push("uniform int offset"+z.name+";"))});var a,s,u=i.join(`
|
|
`),l=n.map(function(z){return function(te,oe,ae){ae===void 0&&(ae=!1);var se="";se+=ae?Pl(te):ka(te);var we=te.shapeInfo.logicalShape,xe=oe.logicalShape;return we.length<=xe.length&&(se+=ae?function(me,Se){var Re,Me=me.name,Fe=Me.charAt(0).toUpperCase()+Me.slice(1),je="get"+Fe+"AtOutCoords",Be=me.shapeInfo.logicalShape.length,Ge=Se.logicalShape.length,Qe=Ei(me.shapeInfo.logicalShape,Se.logicalShape),Ze=cr(Ge),Ye=Ge-Be,tt=["x","y","z","w","u","v"];Re=Be===0?"":Ge<2&&Qe.length>=1?"coords = 0;":Qe.map(function(dt){return"coords."+tt[dt+Ye]+" = 0;"}).join(`
|
|
`);var st="";st=Ge<2&&Be>0?"coords":me.shapeInfo.logicalShape.map(function(dt,yt){return"coords."+tt[yt+Ye]}).join(", ");var at="return outputValue;",it=le(me.shapeInfo.logicalShape)===1,lt=le(Se.logicalShape)===1;if(Be!==1||it||lt){if(it&&!lt)at=Ge===1?`
|
|
return vec4(outputValue.x, outputValue.x, 0., 0.);
|
|
`:`
|
|
return vec4(outputValue.x);
|
|
`;else if(Qe.length){var rt=Be-2,ft=Be-1;Qe.indexOf(rt)>-1&&Qe.indexOf(ft)>-1?at="return vec4(outputValue.x);":Qe.indexOf(rt)>-1?at="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":Qe.indexOf(ft)>-1&&(at="return vec4(outputValue.xx, outputValue.zz);")}}else at=`
|
|
return vec4(outputValue.xy, outputValue.xy);
|
|
`;return`
|
|
vec4 `+je+`() {
|
|
`+Ze+` coords = getOutputCoords();
|
|
`+Re+`
|
|
vec4 outputValue = get`+Fe+"("+st+`);
|
|
`+at+`
|
|
}
|
|
`}(te,oe):function(me,Se){var Re=me.name,Me=Re.charAt(0).toUpperCase()+Re.slice(1),Fe="get"+Me+"AtOutCoords",je=Se.texShape,Be=me.shapeInfo.texShape,Ge=me.shapeInfo.logicalShape.length,Qe=Se.logicalShape.length;if(!me.shapeInfo.isUniform&&Ge===Qe&&me.shapeInfo.flatOffset==null&&ue(Be,je))return`
|
|
float `+Fe+`() {
|
|
return sampleTexture(`+Re+`, resultUV);
|
|
}
|
|
`;var Ze,Ye=cr(Qe),tt=Ei(me.shapeInfo.logicalShape,Se.logicalShape),st=Qe-Ge,at=["x","y","z","w","u","v"];Ze=Ge===0?"":Qe<2&&tt.length>=1?"coords = 0;":tt.map(function(lt){return"coords."+at[lt+st]+" = 0;"}).join(`
|
|
`);var it="";return it=Qe<2&&Ge>0?"coords":me.shapeInfo.logicalShape.map(function(lt,rt){return"coords."+at[rt+st]}).join(", "),`
|
|
float `+Fe+`() {
|
|
`+Ye+` coords = getOutputCoords();
|
|
`+Ze+`
|
|
return get`+Me+"("+it+`);
|
|
}
|
|
`}(te,oe)),se}(z,t,r)}).join(`
|
|
`),f=t.texShape,A=rn(),I=function(z){return`
|
|
float sampleTexture(sampler2D textureSampler, vec2 uv) {
|
|
return `+z.texture2D+`(textureSampler, uv).r;
|
|
}
|
|
`}(A),R=function(z){return z.version+`
|
|
precision highp float;
|
|
precision highp int;
|
|
precision highp sampler2D;
|
|
`+z.varyingFs+` vec2 resultUV;
|
|
`+z.defineOutput+`
|
|
const vec2 halfCR = vec2(0.5, 0.5);
|
|
|
|
struct ivec5
|
|
{
|
|
int x;
|
|
int y;
|
|
int z;
|
|
int w;
|
|
int u;
|
|
};
|
|
|
|
struct ivec6
|
|
{
|
|
int x;
|
|
int y;
|
|
int z;
|
|
int w;
|
|
int u;
|
|
int v;
|
|
};
|
|
|
|
uniform float NAN;
|
|
`+z.defineSpecialNaN+`
|
|
`+z.defineSpecialInf+`
|
|
`+z.defineRound+`
|
|
|
|
int imod(int x, int y) {
|
|
return x - y * (x / y);
|
|
}
|
|
|
|
int idiv(int a, int b, float sign) {
|
|
int res = a / b;
|
|
int mod = imod(a, b);
|
|
if (sign < 0. && mod != 0) {
|
|
res -= 1;
|
|
}
|
|
return res;
|
|
}
|
|
|
|
//Based on the work of Dave Hoskins
|
|
//https://www.shadertoy.com/view/4djSRW
|
|
#define HASHSCALE1 443.8975
|
|
float random(float seed){
|
|
vec2 p = resultUV * seed;
|
|
vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);
|
|
p3 += dot(p3, p3.yzx + 19.19);
|
|
return fract((p3.x + p3.y) * p3.z);
|
|
}
|
|
|
|
`+Ah+`
|
|
`+xh+`
|
|
`+Eh+`
|
|
`}(A);return t.isPacked?(a=function(z,te){switch(z.length){case 0:return`
|
|
int getOutputCoords() {
|
|
return 0;
|
|
}
|
|
`;case 1:return function(me,Se){var Re=[Math.ceil(Se[0]/2),Math.ceil(Se[1]/2)];return Re[0]===1?`
|
|
int getOutputCoords() {
|
|
return 2 * int(resultUV.x * `+Re[1]+`.0);
|
|
}
|
|
`:Re[1]===1?`
|
|
int getOutputCoords() {
|
|
return 2 * int(resultUV.y * `+Re[0]+`.0);
|
|
}
|
|
`:`
|
|
int getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+Re[0]+", "+Re[1]+`));
|
|
return 2 * (resTexRC.x * `+Re[1]+` + resTexRC.y);
|
|
}
|
|
`}(0,te);case 2:return function(me,Se){var Re=[Math.ceil(Se[0]/2),Math.ceil(Se[1]/2)];if(ue(me,Se))return`
|
|
ivec2 getOutputCoords() {
|
|
return 2 * ivec2(resultUV.yx * vec2(`+Re[0]+", "+Re[1]+`));
|
|
}
|
|
`;var Me=Math.ceil(me[1]/2);return`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+Re[0]+", "+Re[1]+`));
|
|
|
|
int index = resTexRC.x * `+Re[1]+` + resTexRC.y;
|
|
int r = 2 * (index / `+Me+`);
|
|
int c = imod(index, `+Me+`) * 2;
|
|
|
|
return ivec2(r, c);
|
|
}
|
|
`}(z,te);case 3:return oe=z,ae=te,se=[Math.ceil(ae[0]/2),Math.ceil(ae[1]/2)],we=Math.ceil(oe[2]/2),xe=we*Math.ceil(oe[1]/2),`
|
|
ivec3 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+se[0]+", "+se[1]+`));
|
|
int index = resTexRC.x * `+se[1]+` + resTexRC.y;
|
|
|
|
int b = index / `+xe+`;
|
|
index -= b * `+xe+`;
|
|
|
|
int r = 2 * (index / `+we+`);
|
|
int c = imod(index, `+we+`) * 2;
|
|
|
|
return ivec3(b, r, c);
|
|
}
|
|
`;default:return function(me,Se){for(var Re=[Math.ceil(Se[0]/2),Math.ceil(Se[1]/2)],Me=Math.ceil(me[me.length-1]/2),Fe=Me*Math.ceil(me[me.length-2]/2),je=Fe,Be="",Ge="b, r, c",Qe=2;Qe<me.length-1;Qe++)je*=me[me.length-Qe-1],Be=`
|
|
int b`+Qe+" = index / "+je+`;
|
|
index -= b`+Qe+" * "+je+`;
|
|
`+Be,Ge="b"+Qe+", "+Ge;return`
|
|
ivec`+me.length+` getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+Re[0]+", "+Re[1]+`));
|
|
int index = resTexRC.x * `+Re[1]+` + resTexRC.y;
|
|
|
|
`+Be+`
|
|
|
|
int b = index / `+Fe+`;
|
|
index -= b * `+Fe+`;
|
|
|
|
int r = 2 * (index / `+Me+`);
|
|
int c = imod(index, `+Me+`) * 2;
|
|
|
|
return ivec`+me.length+"("+Ge+`);
|
|
}
|
|
`}(z,te)}var oe,ae,se,we,xe}(t.logicalShape,f),s=function(z){return`
|
|
void setOutput(vec4 val) {
|
|
`+z.output+` = val;
|
|
}
|
|
`}(A)):(a=function(z,te){switch(z.length){case 0:return`
|
|
int getOutputCoords() {
|
|
return 0;
|
|
}
|
|
`;case 1:return function(se,we){return we[0]===1?`
|
|
int getOutputCoords() {
|
|
return int(resultUV.x * `+we[1]+`.0);
|
|
}
|
|
`:we[1]===1?`
|
|
int getOutputCoords() {
|
|
return int(resultUV.y * `+we[0]+`.0);
|
|
}
|
|
`:`
|
|
int getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
return resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
}
|
|
`}(0,te);case 2:return function(se,we){return ue(se,we)?`
|
|
ivec2 getOutputCoords() {
|
|
return ivec2(resultUV.yx * vec2(`+we[0]+", "+we[1]+`));
|
|
}
|
|
`:se[1]===1?`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
return ivec2(index, 0);
|
|
}
|
|
`:se[0]===1?`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
return ivec2(0, index);
|
|
}
|
|
`:`
|
|
ivec2 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
int r = index / `+se[1]+`;
|
|
int c = index - r * `+se[1]+`;
|
|
return ivec2(r, c);
|
|
}
|
|
`}(z,te);case 3:return oe=te,ae=la(["r","c","d"],z),`
|
|
ivec3 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+oe[0]+", "+oe[1]+`));
|
|
int index = resTexRC.x * `+oe[1]+` + resTexRC.y;
|
|
`+ae+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
`;case 4:return function(se,we){var xe=la(["r","c","d","d2"],se);return`
|
|
ivec4 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
`+xe+`
|
|
return ivec4(r, c, d, d2);
|
|
}
|
|
`}(z,te);case 5:return function(se,we){var xe=la(["r","c","d","d2","d3"],se);return`
|
|
ivec5 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx * vec2(`+we[0]+`,
|
|
`+we[1]+`));
|
|
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
|
|
`+xe+`
|
|
|
|
ivec5 outShape = ivec5(r, c, d, d2, d3);
|
|
return outShape;
|
|
}
|
|
`}(z,te);case 6:return function(se,we){var xe=la(["r","c","d","d2","d3","d4"],se);return`
|
|
ivec6 getOutputCoords() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+we[0]+", "+we[1]+`));
|
|
int index = resTexRC.x * `+we[1]+` + resTexRC.y;
|
|
|
|
`+xe+`
|
|
|
|
ivec6 result = ivec6(r, c, d, d2, d3, d4);
|
|
return result;
|
|
}
|
|
`}(z,te);default:throw new Error(z.length+"-D output sampling is not yet supported")}var oe,ae}(t.logicalShape,f),s=function(z){return`
|
|
void setOutput(float val) {
|
|
`+z.output+` = vec4(val, 0, 0, 0);
|
|
}
|
|
`}(A)),r&&(R+=Ch),[R,I,s,u,a,l,e].join(`
|
|
`)}function ka(n){var t=n.shapeInfo.logicalShape;switch(t.length){case 0:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return"float "+i+"() {return "+r+";}";var a=e.shapeInfo.texShape,s=a[0],u=a[1];if(s===1&&u===1)return`
|
|
float `+i+`() {
|
|
return sampleTexture(`+r+`, halfCR);
|
|
}
|
|
`;var l=e.shapeInfo.texShape,f=l[0],A=l[1],I=ca(r);return`
|
|
float `+i+`() {
|
|
vec2 uv = uvFromFlat(`+f+", "+A+", "+I+`);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`}(n);case 1:return function(e){var r=e.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1);if(e.shapeInfo.isUniform)return`
|
|
float `+i+`(int index) {
|
|
`+Oa(e)+`
|
|
}
|
|
`;var a=e.shapeInfo.texShape,s=a[0],u=a[1];if(u===1&&s===1)return`
|
|
float `+i+`(int index) {
|
|
return sampleTexture(`+r+`, halfCR);
|
|
}
|
|
`;var l=ca(r);return u===1?`
|
|
float `+i+`(int index) {
|
|
vec2 uv = vec2(0.5, (float(index + `+l+") + 0.5) / "+s+`.0);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`:s===1?`
|
|
float `+i+`(int index) {
|
|
vec2 uv = vec2((float(index + `+l+") + 0.5) / "+u+`.0, 0.5);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`:`
|
|
float `+i+`(int index) {
|
|
vec2 uv = uvFromFlat(`+s+", "+u+", index + "+l+`);
|
|
return sampleTexture(`+r+`, uv);
|
|
}
|
|
`}(n);case 2:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=e.shapeInfo.texShape;if(s!=null&&ue(r,s)){var u=s[0],l=s[1];return`
|
|
float `+a+`(int row, int col) {
|
|
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+l+".0, "+u+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}var f=V(r),A=f.newShape,I=f.keptDims,R=A;if(R.length<r.length){var z=Da(e,R);return`
|
|
`+ka(z)+`
|
|
float `+a+`(int row, int col) {
|
|
return `+a+"("+ja(["row","col"],I)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col) {
|
|
int index = round(dot(vec2(row, col), vec2(`+r[1]+`, 1)));
|
|
`+Oa(e)+`
|
|
}
|
|
`;var te=s[0],oe=s[1],ae=ca(i);return oe===1?`
|
|
float `+a+`(int row, int col) {
|
|
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
|
|
vec2 uv = vec2(0.5, (index + 0.5) / `+te+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`:te===1?`
|
|
float `+a+`(int row, int col) {
|
|
float index = dot(vec3(row, col, `+ae+"), vec3("+r[1]+`, 1, 1));
|
|
vec2 uv = vec2((index + 0.5) / `+oe+`.0, 0.5);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`:`
|
|
float `+a+`(int row, int col) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+r[1]+" + col + "+ae+`;
|
|
vec2 uv = uvFromFlat(`+te+", "+oe+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 3:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[1]*r[2],u=r[2],l=V(r),f=l.newShape,A=l.keptDims,I=f;if(I.length<r.length){var R=Da(e,I);return`
|
|
`+ka(R)+`
|
|
float `+a+`(int row, int col, int depth) {
|
|
return `+a+"("+ja(["row","col","depth"],A)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
int index = round(dot(vec3(row, col, depth),
|
|
vec3(`+s+", "+u+`, 1)));
|
|
`+Oa(e)+`
|
|
}
|
|
`;var z=e.shapeInfo.texShape,te=z[0],oe=z[1],ae=e.shapeInfo.flatOffset;if(oe===s&&ae==null)return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
float texR = float(row);
|
|
float texC = dot(vec2(col, depth), vec2(`+u+`, 1));
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+oe+".0, "+te+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(oe===u&&ae==null)return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
float texR = dot(vec2(row, col), vec2(`+r[1]+`, 1));
|
|
float texC = float(depth);
|
|
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+oe+".0, "+te+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var se=ca(i);return`
|
|
float `+a+`(int row, int col, int depth) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+s+" + col * "+u+" + depth + "+se+`;
|
|
vec2 uv = uvFromFlat(`+te+", "+oe+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 4:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[3],u=r[2]*s,l=r[1]*u,f=V(r),A=f.newShape,I=f.keptDims;if(A.length<r.length){var R=Da(e,A);return`
|
|
`+ka(R)+`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
return `+a+"("+ja(["row","col","depth","depth2"],I)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
int index = round(dot(vec4(row, col, depth, depth2),
|
|
vec4(`+l+", "+u+", "+s+`, 1)));
|
|
`+Oa(e)+`
|
|
}
|
|
`;var z=e.shapeInfo.flatOffset,te=e.shapeInfo.texShape,oe=te[0],ae=te[1];if(ae===l&&z==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
float texR = float(row);
|
|
float texC =
|
|
dot(vec3(col, depth, depth2),
|
|
vec3(`+u+", "+s+`, 1));
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+ae+".0, "+oe+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(ae===s&&z==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
float texR = dot(vec3(row, col, depth),
|
|
vec3(`+r[1]*r[2]+", "+r[2]+`, 1));
|
|
float texC = float(depth2);
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+ae+".0, "+oe+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var se=ca(i);return`
|
|
float `+a+`(int row, int col, int depth, int depth2) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+l+" + col * "+u+` +
|
|
depth * `+s+` + depth2;
|
|
vec2 uv = uvFromFlat(`+oe+", "+ae+", index + "+se+`);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 5:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=r[4],u=r[3]*s,l=r[2]*u,f=r[1]*l,A=V(r),I=A.newShape,R=A.keptDims;if(I.length<r.length){var z=Da(e,I);return`
|
|
`+ka(z)+`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
return `+a+"("+ja(["row","col","depth","depth2","depth3"],R)+`);
|
|
}
|
|
`}if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
float index = dot(
|
|
vec4(row, col, depth, depth2),
|
|
vec4(`+f+", "+l+", "+u+", "+s+`)) +
|
|
depth3;
|
|
`+Oa(e)+`
|
|
}
|
|
`;var te=e.shapeInfo.flatOffset,oe=e.shapeInfo.texShape,ae=oe[0],se=oe[1];if(se===f&&te==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
int texR = row;
|
|
float texC = dot(vec4(col, depth, depth2, depth3),
|
|
vec4(`+l+", "+u+", "+s+`, 1));
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+se+".0, "+ae+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(se===s&&te==null)return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
float texR = dot(
|
|
vec4(row, col, depth, depth2),
|
|
vec4(`+r[1]*r[2]*r[3]+`,
|
|
`+r[2]*r[3]+", "+r[3]+`, 1));
|
|
int texC = depth3;
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+se+".0, "+ae+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var we=ca(i);return`
|
|
float `+a+`(int row, int col, int depth, int depth2, int depth3) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+f+" + col * "+l+" + depth * "+u+` +
|
|
depth2 * `+s+" + depth3 + "+we+`;
|
|
vec2 uv = uvFromFlat(`+ae+", "+se+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);case 6:return function(e){var r=e.shapeInfo.logicalShape,i=e.name,a="get"+i.charAt(0).toUpperCase()+i.slice(1),s=V(r),u=s.newShape,l=s.keptDims;if(u.length<r.length){var f=Da(e,u);return`
|
|
`+ka(f)+`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
return `+a+"("+ja(["row","col","depth","depth2","depth3","depth4"],l)+`);
|
|
}
|
|
`}var A=r[5],I=r[4]*A,R=r[3]*I,z=r[2]*R,te=r[1]*z;if(e.shapeInfo.isUniform)return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
int index = round(dot(
|
|
vec4(row, col, depth, depth2),
|
|
vec4(`+te+", "+z+", "+R+", "+I+`)) +
|
|
dot(
|
|
vec2(depth3, depth4),
|
|
vec2(`+A+`, 1)));
|
|
`+Oa(e)+`
|
|
}
|
|
`;var oe=e.shapeInfo.flatOffset,ae=e.shapeInfo.texShape,se=ae[0],we=ae[1];if(we===te&&oe==null)return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
int texR = row;
|
|
float texC = dot(vec4(col, depth, depth2, depth3),
|
|
vec4(`+z+", "+R+", "+I+", "+A+`)) +
|
|
float(depth4);
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+we+".0, "+se+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;if(we===A&&oe==null)return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
float texR = dot(vec4(row, col, depth, depth2),
|
|
vec4(`+r[1]*r[2]*r[3]*r[4]+`,
|
|
`+r[2]*r[3]*r[4]+`,
|
|
`+r[3]*r[4]+`,
|
|
`+r[4]+`)) + float(depth3);
|
|
int texC = depth4;
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+we+".0, "+se+`.0);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`;var xe=ca(i);return`
|
|
float `+a+`(int row, int col, int depth,
|
|
int depth2, int depth3, int depth4) {
|
|
// Explicitly use integer operations as dot() only works on floats.
|
|
int index = row * `+te+" + col * "+z+" + depth * "+R+` +
|
|
depth2 * `+I+" + depth3 * "+A+" + depth4 + "+xe+`;
|
|
vec2 uv = uvFromFlat(`+se+", "+we+`, index);
|
|
return sampleTexture(`+i+`, uv);
|
|
}
|
|
`}(n);default:throw new Error(t.length+"-D input sampling is not yet supported")}}function Pl(n){var t,e,r;switch(n.shapeInfo.logicalShape.length){case 0:return t=n.name,e="get"+t.charAt(0).toUpperCase()+t.slice(1),r=rn(),`
|
|
vec4 `+e+`() {
|
|
return `+r.texture2D+"("+t+`, halfCR);
|
|
}
|
|
`;case 1:return function(i){var a=i.name,s="get"+a.charAt(0).toUpperCase()+a.slice(1),u=i.shapeInfo.texShape,l=[Math.ceil(u[0]/2),Math.ceil(u[1]/2)],f=rn();return`
|
|
vec4 `+s+`(int index) {
|
|
vec2 uv = packedUVfrom1D(
|
|
`+l[0]+", "+l[1]+`, index);
|
|
return `+f.texture2D+"("+a+`, uv);
|
|
}
|
|
`}(n);case 2:return function(i){var a=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,f=l[0],A=l[1],I=rn();if(l!=null&&ue(a,l))return`
|
|
vec4 `+u+`(int row, int col) {
|
|
vec2 uv = (vec2(col, row) + halfCR) / vec2(`+A+".0, "+f+`.0);
|
|
|
|
return `+I.texture2D+"("+s+`, uv);
|
|
}
|
|
`;var R=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)],z=Math.ceil(a[1]/2);return`
|
|
vec4 `+u+`(int row, int col) {
|
|
vec2 uv = packedUVfrom2D(`+z+", "+R[0]+", "+R[1]+`, row, col);
|
|
return `+I.texture2D+"("+s+`, uv);
|
|
}
|
|
`}(n);case 3:return function(i){var a=i.shapeInfo.logicalShape,s=i.name,u="get"+s.charAt(0).toUpperCase()+s.slice(1),l=i.shapeInfo.texShape,f=[Math.ceil(l[0]/2),Math.ceil(l[1]/2)];if(a[0]===1){var A=a.slice(1),I=Da(i,A);return`
|
|
`+Pl(I)+`
|
|
vec4 `+u+`(int b, int row, int col) {
|
|
return `+u+"("+ja(["b","row","col"],[1,2])+`);
|
|
}
|
|
`}var R=f[0],z=f[1],te=Math.ceil(a[2]/2),oe=te*Math.ceil(a[1]/2),ae=rn();return`
|
|
vec4 `+u+`(int b, int row, int col) {
|
|
vec2 uv = packedUVfrom3D(
|
|
`+R+", "+z+", "+oe+", "+te+`, b, row, col);
|
|
return `+ae.texture2D+"("+s+`, uv);
|
|
}
|
|
`}(n);default:return function(i){for(var a=i.shapeInfo.logicalShape,s=a.length,u=i.name,l="get"+u.charAt(0).toUpperCase()+u.slice(1),f=i.shapeInfo.texShape,A=[Math.ceil(f[0]/2),Math.ceil(f[1]/2)],I=A[0],R=A[1],z=Math.ceil(a[s-1]/2),te=z*Math.ceil(a[s-2]/2),oe="int b, int row, int col",ae="b * "+te+" + (row / 2) * "+z+" + (col / 2)",se=2;se<s-1;se++)oe="int b"+se+", "+oe,te*=a[s-se-1],ae="b"+se+" * "+te+" + "+ae;var we=rn();return`
|
|
vec4 `+l+"("+oe+`) {
|
|
int index = `+ae+`;
|
|
int texR = index / `+R+`;
|
|
int texC = index - texR * `+R+`;
|
|
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+R+", "+I+`);
|
|
return `+we.texture2D+"("+u+`, uv);
|
|
}
|
|
`}(n)}}var Ah=`
|
|
vec2 uvFromFlat(int texNumR, int texNumC, int index) {
|
|
int texR = index / texNumC;
|
|
int texC = index - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
vec2 packedUVfrom1D(int texNumR, int texNumC, int index) {
|
|
int texelIndex = index / 2;
|
|
int texR = texelIndex / texNumC;
|
|
int texC = texelIndex - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
`,xh=`
|
|
vec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,
|
|
int texNumC, int row, int col) {
|
|
int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);
|
|
int texR = texelIndex / texNumC;
|
|
int texC = texelIndex - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
`,Eh=`
|
|
vec2 packedUVfrom3D(int texNumR, int texNumC,
|
|
int texelsInBatch, int texelsInLogicalRow, int b,
|
|
int row, int col) {
|
|
int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);
|
|
int texR = index / texNumC;
|
|
int texC = index - texR * texNumC;
|
|
return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);
|
|
}
|
|
`,Ch=`
|
|
float getChannel(vec4 frag, vec2 innerDims) {
|
|
vec2 modCoord = mod(innerDims, 2.);
|
|
return modCoord.x == 0. ?
|
|
(modCoord.y == 0. ? frag.r : frag.g) :
|
|
(modCoord.y == 0. ? frag.b : frag.a);
|
|
}
|
|
float getChannel(vec4 frag, int dim) {
|
|
float modCoord = mod(float(dim), 2.);
|
|
return modCoord == 0. ? frag.r : frag.g;
|
|
}
|
|
`;function ca(n){return"offset"+n}function Oa(n){var t=n.name,e=le(n.shapeInfo.logicalShape);return e<2?"return "+t+";":`
|
|
for (int i = 0; i < `+e+`; i++) {
|
|
if (i == index) {
|
|
return `+t+`[i];
|
|
}
|
|
}
|
|
`}function cr(n){if(n<=1)return"int";if(n===2)return"ivec2";if(n===3)return"ivec3";if(n===4)return"ivec4";if(n===5)return"ivec5";if(n===6)return"ivec6";throw Error("GPU for rank "+n+" is not yet supported")}function Da(n,t){var e=JSON.parse(JSON.stringify(n));return e.shapeInfo.logicalShape=t,e}function ja(n,t){return t.map(function(e){return n[e]}).join(", ")}var Sh=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,Y(n.length>2,function(){return"Packed arg"+(e.charAt(0).toUpperCase()+e.slice(1))+" supports only inputs with rank above 2."});var i=n[n.length-1],a=Math.ceil(i/t);this.outputShape=n.slice(0,-1),a>1&&this.outputShape.push(a),r||this.variableNames.push("bestIndicesA");var s,u,l=this.outputShape,f=l.length,A=cr(f),I=wn("coords",f);if(a===1){var R=cr(u=f+1);s=`
|
|
`+R+" sourceLocR = "+R+"("+I.join()+`, 0);
|
|
++`+I[f-1]+`;
|
|
`+R+" sourceLocG = "+R+"("+I.join()+`, 0);
|
|
++`+I[f-2]+`;
|
|
`+R+" sourceLocA = "+R+"("+I.join()+`, 0);
|
|
--`+I[f-1]+`;
|
|
`+R+" sourceLocB = "+R+"("+I.join()+`, 0);
|
|
--`+I[f-2]+";"}else u=f,s=`
|
|
`+A+` sourceLocR = coords;
|
|
++`+I[f-1]+`;
|
|
`+A+` sourceLocG = coords;
|
|
++`+I[f-2]+`;
|
|
`+A+` sourceLocA = coords;
|
|
--`+I[f-1]+`;
|
|
`+A+` sourceLocB = coords;
|
|
--`+I[f-2]+";";var z=["x","y","z","w","u","v"].slice(0,u),te="."+z[u-1],oe=z.map(function(Fe){return"int "+Fe}),ae=wn("sourceLocR",u-1).concat("inIdx.r"),se=wn("sourceLocG",u-1).concat("inIdx.g"),we=wn("sourceLocB",u-1).concat("inIdx.b"),xe=wn("sourceLocA",u-1).concat("inIdx.a"),me=e==="max"?"greaterThan":"lessThan",Se=r?"":`
|
|
inIdx = round(vec4(getBestIndicesAChannel(`+ae.join()+`),
|
|
getBestIndicesAChannel(`+se.join()+`),
|
|
getBestIndicesAChannel(`+we.join()+`),
|
|
getBestIndicesAChannel(`+xe.join()+")));",Re=`vec4(
|
|
getAChannel(`+ae.join()+`),
|
|
hasNextCol ? getAChannel(`+se.join()+`) : 0.,
|
|
hasNextRow ? getAChannel(`+we.join()+`) : 0.,
|
|
hasNextRow && hasNextCol ? getAChannel(`+xe.join()+") : 0.)",Me=r?"":`
|
|
float getBestIndicesAChannel(`+oe.join()+`) {
|
|
return getChannel(getBestIndicesA(`+z.join()+`),
|
|
vec2(`+z.slice(-2).join()+`));
|
|
}`;this.userCode=`
|
|
float getAChannel(`+oe.join()+`) {
|
|
return getChannel(getA(`+z.join()+`),
|
|
vec2(`+z.slice(-2).join()+`));
|
|
}
|
|
`+Me+`
|
|
void main() {
|
|
`+A+` coords = getOutputCoords();
|
|
bool hasNextCol = `+I[f-1]+" < "+(l[f-1]-1)+`;
|
|
bool hasNextRow = `+I[f-2]+" < "+(l[f-2]-1)+`;
|
|
`+s+`
|
|
ivec4 srcIdx = ivec4(sourceLocR`+te+", sourceLocG"+te+`,
|
|
sourceLocB`+te+", sourceLocA"+te+") * "+t+`;
|
|
ivec4 inIdx = srcIdx;
|
|
vec4 bestIndex = vec4(inIdx);
|
|
vec4 bestValue = `+Re+`;
|
|
|
|
for (int i = 0; i < `+t+`; i++) {
|
|
inIdx = srcIdx;
|
|
`+Se+`
|
|
vec4 candidate = `+Re+`;
|
|
bvec4 nan = isnan(candidate);
|
|
bvec4 replace = bvec4(
|
|
vec4(`+me+`(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));
|
|
|
|
bestValue = vec4(replace.x ? candidate.x : bestValue.x,
|
|
replace.y ? candidate.y : bestValue.y,
|
|
replace.z ? candidate.z : bestValue.z,
|
|
replace.w ? candidate.w : bestValue.w);
|
|
bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));
|
|
srcIdx++;
|
|
}
|
|
setOutput(bestIndex);
|
|
}
|
|
`},Ih=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterHeight,l=n.effectiveFilterWidth,f=u-1-n.padInfo.top,A=l-1-n.padInfo.left,I=1/(t*e);this.userCode=`
|
|
const ivec2 pads = ivec2(`+f+", "+A+`);
|
|
const float avgMultiplier = float(`+I+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 dyRCCorner = coords.yz - pads;
|
|
int dyRCorner = dyRCCorner.x;
|
|
int dyCCorner = dyRCCorner.y;
|
|
|
|
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+u+`;
|
|
wR += `+a+`) {
|
|
float dyR = float(dyRCorner + wR) / `+r+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+l+`;
|
|
wC+= `+s+`) {
|
|
float dyC = float(dyCCorner + wC) / `+i+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(b, idyR, idyC, d);
|
|
|
|
dotProd += dyValue * avgMultiplier;
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Th=function(n){this.variableNames=["dy"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,f=n.dilationWidth,A=n.effectiveFilterDepth,I=n.effectiveFilterHeight,R=n.effectiveFilterWidth,z=A-1-n.padInfo.front,te=I-1-n.padInfo.top,oe=R-1-n.padInfo.left,ae=1/(t*e*r);this.userCode=`
|
|
const ivec3 pads = ivec3(`+z+", "+te+", "+oe+`);
|
|
const float avgMultiplier = float(`+ae+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
|
|
int dyDCorner = dyCorner.x;
|
|
int dyRCorner = dyCorner.y;
|
|
int dyCCorner = dyCorner.z;
|
|
|
|
// Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get
|
|
// dx(xD, xR, xC, ch).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
|
|
for (int wD = 0; wD < `+A+`;
|
|
wD += `+u+`) {
|
|
float dyD = float(dyDCorner + wD) / `+i+`.0;
|
|
|
|
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyD = int(dyD);
|
|
|
|
for (int wR = 0; wR < `+I+`;
|
|
wR += `+l+`) {
|
|
float dyR = float(dyRCorner + wR) / `+a+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
|
|
fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+R+`;
|
|
wC += `+f+`) {
|
|
float dyC = float(dyCCorner + wC) / `+s+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
|
|
|
|
dotProd += dyValue * avgMultiplier;
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Rh=function(n,t,e,r,i,a){this.outputShape=[],this.variableNames=["x","mean","variance"],Mt(n,t),Mt(n,e);var s="0.0";r!=null&&(Mt(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="1.0";i!=null&&(Mt(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
float x = getXAtOutCoords();
|
|
float mean = getMeanAtOutCoords();
|
|
float variance = getVarianceAtOutCoords();
|
|
float offset = `+s+`;
|
|
float scale = `+u+`;
|
|
float inv = scale * inversesqrt(variance + float(`+a+`));
|
|
setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));
|
|
}
|
|
`},kh=function(n,t,e,r,i,a){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],Mt(n,t),Mt(n,e);var s="vec4(0.0)";r!=null&&(Mt(n,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");var u="vec4(1.0)";i!=null&&(Mt(n,i),this.variableNames.push("scale"),u="getScaleAtOutCoords()"),this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
vec4 offset = `+s+`;
|
|
vec4 scale = `+u+`;
|
|
|
|
vec4 x = getXAtOutCoords();
|
|
vec4 mean = getMeanAtOutCoords();
|
|
vec4 variance = getVarianceAtOutCoords();
|
|
|
|
vec4 inv = scale * inversesqrt(variance + vec4(`+a+`));
|
|
|
|
setOutput((x - mean) * inv + offset);
|
|
}
|
|
`},Oh="return areal * breal - aimag * bimag;",Dh="return areal * bimag + aimag * breal;",Bl=function(n,t,e){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=Mt(t,e),this.userCode=`
|
|
float binaryOpComplex(
|
|
float areal, float aimag, float breal, float bimag) {
|
|
`+n+`
|
|
}
|
|
|
|
void main() {
|
|
float areal = getARealAtOutCoords();
|
|
float aimag = getAImagAtOutCoords();
|
|
float breal = getBRealAtOutCoords();
|
|
float bimag = getBImagAtOutCoords();
|
|
setOutput(binaryOpComplex(areal, aimag, breal, bimag));
|
|
}
|
|
`},js="return a + b;",Ps="return a - b;",_l="return a * b;",Ml="return (a < 0.) ? b * a : a;",Sr=function(n,t,e){this.variableNames=["A","B"],this.outputShape=Mt(t,e),this.userCode=`
|
|
float binaryOperation(float a, float b) {
|
|
`+n+`
|
|
}
|
|
|
|
void main() {
|
|
float a = getAAtOutCoords();
|
|
float b = getBAtOutCoords();
|
|
setOutput(binaryOperation(a, b));
|
|
}
|
|
`},Nl=`
|
|
vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));
|
|
return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);
|
|
`,Ci=function(n,t,e,r){r===void 0&&(r=!1),this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=Mt(t,e);var i=this.outputShape.length,a="";if(r)if(i===0||le(this.outputShape)===1)a=`
|
|
result.y = 0.;
|
|
result.z = 0.;
|
|
result.w = 0.;
|
|
`;else if(a=`
|
|
`+cr(i)+` coords = getOutputCoords();
|
|
`,i===1)a+=`
|
|
result.y = (coords + 1) >= `+this.outputShape[0]+` ? 0. : result.y;
|
|
result.z = 0.;
|
|
result.w = 0.;
|
|
`;else{var s=wn("coords",i);a+=`
|
|
bool nextRowOutOfBounds =
|
|
(`+s[i-2]+" + 1) >= "+this.outputShape[i-2]+`;
|
|
bool nextColOutOfBounds =
|
|
(`+s[i-1]+" + 1) >= "+this.outputShape[i-1]+`;
|
|
result.y = nextColOutOfBounds ? 0. : result.y;
|
|
result.z = nextRowOutOfBounds ? 0. : result.z;
|
|
result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;
|
|
`}this.userCode=`
|
|
vec4 binaryOperation(vec4 a, vec4 b) {
|
|
`+n+`
|
|
}
|
|
|
|
void main() {
|
|
vec4 a = getAAtOutCoords();
|
|
vec4 b = getBAtOutCoords();
|
|
|
|
vec4 result = binaryOperation(a, b);
|
|
`+a+`
|
|
|
|
setOutput(result);
|
|
}
|
|
`},jh=function(){function n(t){this.variableNames=["A"],this.outputShape=t,this.userCode=`
|
|
uniform float minVal;
|
|
uniform float maxVal;
|
|
|
|
void main() {
|
|
float value = getAAtOutCoords();
|
|
if (isnan(value)) {
|
|
setOutput(value);
|
|
return;
|
|
}
|
|
|
|
setOutput(clamp(value, minVal, maxVal));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,a){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(a,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(a,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),Ph=function(){function n(t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.userCode=`
|
|
uniform float minVal;
|
|
uniform float maxVal;
|
|
|
|
void main() {
|
|
vec4 value = getAAtOutCoords();
|
|
|
|
if (any(isnan(value))) {
|
|
setOutput(value);
|
|
return;
|
|
}
|
|
|
|
setOutput(clamp(value, vec4(minVal), vec4(maxVal)));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t,e){var r=this;return function(i,a){r.minLoc==null&&(r.minLoc=i.getUniformLocationNoThrow(a,"minVal"),r.maxLoc=i.getUniformLocationNoThrow(a,"maxVal")),i.gl.uniform1f(r.minLoc,t),i.gl.uniform1f(r.maxLoc,e)}},n}(),Bh=function(n){this.variableNames=["real","imag"],this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
float re = abs(getRealAtOutCoords());
|
|
float im = abs(getImagAtOutCoords());
|
|
float mx = max(re, im);
|
|
|
|
// sadly the length function in glsl is not underflow-safe
|
|
// (at least not on Intel GPUs). So the safe solution is
|
|
// to ensure underflow-safety in all cases.
|
|
setOutput(
|
|
mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))
|
|
);
|
|
}
|
|
`},_h=function(n){this.outputShape=[],this.outputShape=or(n,1),this.variableNames=n.map(function(u,l){return"T"+l});var t=new Array(n.length-1);t[0]=n[0][1];for(var e=1;e<t.length;e++)t[e]=t[e-1]+n[e][1];var r=["if (yC < "+t[0]+") setOutput(getT0(yR, yC));"];for(e=1;e<t.length;e++){var i=t[e-1];r.push("else if (yC < "+t[e]+") setOutput(getT"+e+"(yR, yC-"+i+"));")}var a=t.length,s=t[t.length-1];r.push("else setOutput(getT"+a+"(yR, yC-"+s+"));"),this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int yR = coords.x;
|
|
int yC = coords.y;
|
|
|
|
`+r.join(`
|
|
`)+`
|
|
}
|
|
`},Mh=function(n,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=or(n,t);var e=this.outputShape,r=e.length,i=cr(r),a=wn("coords",r),s=["x","y","z","w","u","v"].slice(0,r);this.variableNames=n.map(function(ae,se){return"T"+se});var u=new Array(n.length-1);u[0]=n[0][t];for(var l=1;l<u.length;l++)u[l]=u[l-1]+n[l][t];var f=s[t],A=s.slice(-2),I=s.join(),R="if ("+f+" < "+u[0]+`) {
|
|
return getChannel(
|
|
getT0(`+I+"), vec2("+A.join()+`));
|
|
}`;for(l=1;l<u.length;l++){var z=u[l-1];R+=`
|
|
if (`+f+" < "+u[l]+" && "+f+" >= "+u[l-1]+`) {
|
|
return getChannel(
|
|
getT`+l+"("+_o(s,f,z)+`),
|
|
vec2(`+_o(A,f,z)+`));
|
|
}`}var te=u.length,oe=u[u.length-1];R+=`
|
|
return getChannel(
|
|
getT`+te+"("+_o(s,f,oe)+`),
|
|
vec2(`+_o(A,f,oe)+"));",this.userCode=`
|
|
float getValue(`+s.map(function(ae){return"int "+ae})+`) {
|
|
`+R+`
|
|
}
|
|
|
|
void main() {
|
|
`+i+` coords = getOutputCoords();
|
|
vec4 result = vec4(getValue(`+a+`), 0., 0., 0.);
|
|
|
|
`+a[r-1]+" = "+a[r-1]+` + 1;
|
|
if (`+a[r-1]+" < "+e[r-1]+`) {
|
|
result.g = getValue(`+a+`);
|
|
}
|
|
|
|
`+a[r-2]+" = "+a[r-2]+` + 1;
|
|
if (`+a[r-2]+" < "+e[r-2]+`) {
|
|
result.a = getValue(`+a+`);
|
|
}
|
|
|
|
`+a[r-1]+" = "+a[r-1]+` - 1;
|
|
if (`+a[r-2]+" < "+e[r-2]+` &&
|
|
`+a[r-1]+" < "+e[r-1]+`) {
|
|
result.b = getValue(`+a+`);
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`};function _o(n,t,e){var r=n.indexOf(t);return n.map(function(i,a){return a===r?i+" - "+e:i}).join()}var Nh=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,a=n.dataFormat==="channelsLast";this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int wR = coords.x;
|
|
int wC = coords.y;
|
|
int d1 = coords.z;
|
|
int d2 = coords.w;
|
|
|
|
// Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
|
|
for (int b = 0; b < `+n.batchSize+`; b++) {
|
|
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
|
|
int xR = wR + yR * `+t+" - "+r+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
|
|
int xC = wC + yC * `+e+" - "+i+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
if (`+a+`) {
|
|
float dyValue = getDy(b, yR, yC, d2);
|
|
float xValue = getX(b, xR, xC, d1);
|
|
dotProd += (xValue * dyValue);
|
|
} else {
|
|
float dyValue = getDy(b, d2, yR, yC);
|
|
float xValue = getX(b, d1, xR, xC);
|
|
dotProd += (xValue * dyValue);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Fh=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=n.dataFormat==="channelsLast",s=t-1-n.padInfo.top,u=e-1-n.padInfo.left,l=a?1:2,f=a?2:3,A=a?3:1;this.userCode=`
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d1 = coords[`+A+`];
|
|
|
|
ivec2 dyCorner = ivec2(coords[`+l+"], coords["+f+`]) - pads;
|
|
int dyRCorner = dyCorner.x;
|
|
int dyCCorner = dyCorner.y;
|
|
|
|
// Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+t+`; wR++) {
|
|
float dyR = float(dyRCorner + wR) / `+r+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
int wRPerm = `+t+` - 1 - wR;
|
|
|
|
for (int wC = 0; wC < `+e+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+i+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
int wCPerm = `+e+` - 1 - wC;
|
|
|
|
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
|
|
|
|
if (`+a+`) {
|
|
float xValue = getDy(batch, idyR, idyC, d2);
|
|
float wValue = getW(wRPerm, wCPerm, d1, d2);
|
|
dotProd += xValue * wValue;
|
|
} else {
|
|
float xValue = getDy(batch, d2, idyR, idyC);
|
|
float wValue = getW(wRPerm, wCPerm, d1, d2);
|
|
dotProd += xValue * wValue;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Lh=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.padInfo.front,a=n.padInfo.top,s=n.padInfo.left;this.userCode=`
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int wF = coords.x;
|
|
int wR = coords.y;
|
|
int wC = coords.z;
|
|
int d1 = coords.w;
|
|
int d2 = coords.u;
|
|
|
|
float dotProd = 0.0;
|
|
|
|
for (int b = 0; b < `+n.batchSize+`; b++) {
|
|
for (int yF = 0; yF < `+n.outDepth+`; yF++) {
|
|
int xF = wF + yF * `+t+" - "+i+`;
|
|
|
|
if (xF < 0 || xF >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
|
|
int xR = wR + yR * `+e+" - "+a+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
|
|
int xC = wC + yC * `+r+" - "+s+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float dyValue = getDy(b, yF, yR, yC, d2);
|
|
float xValue = getX(b, xF, xR, xC, d1);
|
|
dotProd += (xValue * dyValue);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Uh=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterDepth,e=n.filterHeight,r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=t-1-n.padInfo.front,l=e-1-n.padInfo.top,f=r-1-n.padInfo.left;this.userCode=`
|
|
const ivec3 pads = ivec3(`+u+", "+l+", "+f+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int d1 = coords.u;
|
|
|
|
|
|
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
|
|
int dyFCorner = dyCorner.x;
|
|
int dyRCorner = dyCorner.y;
|
|
int dyCCorner = dyCorner.z;
|
|
|
|
float dotProd = 0.0;
|
|
for (int wF = 0; wF < `+t+`; wF++) {
|
|
float dyF = float(dyFCorner + wF) / `+i+`.0;
|
|
|
|
if (dyF < 0.0 || dyF >= `+n.outDepth+`.0 || fract(dyF) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyF = int(dyF);
|
|
|
|
int wFPerm = `+t+` - 1 - wF;
|
|
|
|
for (int wR = 0; wR < `+e+`; wR++) {
|
|
float dyR = float(dyRCorner + wR) / `+a+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
|
|
fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
int wRPerm = `+e+` - 1 - wR;
|
|
|
|
for (int wC = 0; wC < `+r+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+s+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
int wCPerm = `+r+` - 1 - wC;
|
|
|
|
for (int d2 = 0; d2 < `+n.outChannels+`; d2++) {
|
|
float xValue = getDy(batch, idyF, idyR, idyC, d2);
|
|
float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);
|
|
dotProd += xValue * wValue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Wh=function(n){this.variableNames=["x","dy"],this.outputShape=n.filterShape;var t=n.strideHeight,e=n.strideWidth,r=n.padInfo.top,i=n.padInfo.left,a=n.outChannels/n.inChannels;this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int wR = coords.x;
|
|
int wC = coords.y;
|
|
int d1 = coords.z;
|
|
int dm = coords.w;
|
|
int d2 = d1 * `+a+` + dm;
|
|
|
|
float dotProd = 0.0;
|
|
|
|
// TO DO: Vec4 over the batch size
|
|
for (int b = 0; b < `+n.batchSize+`; b++) {
|
|
for (int yR = 0; yR < `+n.outHeight+`; yR++) {
|
|
int xR = wR + yR * `+t+" - "+r+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int yC = 0; yC < `+n.outWidth+`; yC++) {
|
|
int xC = wC + yC * `+e+" - "+i+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float dyValue = getDy(b, yR, yC, d2);
|
|
float xValue = getX(b, xR, xC, d1);
|
|
dotProd += (xValue * dyValue);
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},zh=function(n){this.variableNames=["dy","W"],this.outputShape=n.inShape;var t=n.filterHeight,e=n.filterWidth,r=n.strideHeight,i=n.strideWidth,a=t-1-n.padInfo.top,s=e-1-n.padInfo.left,u=n.outChannels/n.inChannels;this.userCode=`
|
|
const ivec2 pads = ivec2(`+a+", "+s+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d1 = coords[3];
|
|
ivec2 dyCorner = coords.yz - pads;
|
|
int dyRCorner = dyCorner.x;
|
|
int dyCCorner = dyCorner.y;
|
|
|
|
float dotProd = 0.0;
|
|
|
|
for (int wR = 0; wR < `+t+`; wR++) {
|
|
float dyR = float(dyRCorner + wR) / `+r+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
int wRPerm = `+t+` - 1 - wR;
|
|
|
|
for (int wC = 0; wC < `+e+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+i+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
int wCPerm = `+e+` - 1 - wC;
|
|
|
|
// TO DO: Vec4 over the channelMul
|
|
for (int dm = 0; dm < `+u+`; dm++) {
|
|
int d2 = d1 * `+u+` + dm;
|
|
float xValue = getDy(batch, idyR, idyC, d2);
|
|
float wValue = getW(wRPerm, wCPerm, d1, dm);
|
|
dotProd += xValue * wValue;
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Fl=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.padInfo.top,a=n.padInfo.left,s=n.strideHeight,u=n.strideWidth,l=n.dilationHeight,f=n.dilationWidth,A=n.filterHeight,I=n.filterWidth,R=4*Math.floor(n.inChannels/4),z=n.inChannels%4,te=n.dataFormat==="channelsLast",oe=te?1:2,ae=te?2:3,se=te?3:1,we="",xe="";e&&(we=r?`float activation(float a) {
|
|
float b = getPreluActivationWeightsAtOutCoords();
|
|
`+e+`
|
|
}`:`
|
|
float activation(float x) {
|
|
`+e+`
|
|
}
|
|
`,xe="result = activation(result);");var me=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+we+`
|
|
|
|
const ivec2 strides = ivec2(`+s+", "+u+`);
|
|
const ivec2 pads = ivec2(`+i+", "+a+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d2 = coords[`+se+`];
|
|
|
|
ivec2 xRCCorner =
|
|
ivec2(coords[`+oe+"], coords["+ae+`]) * strides - pads;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+A+`; wR++) {
|
|
int xR = xRCorner + wR * `+l+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+I+`; wC++) {
|
|
int xC = xCCorner + wC * `+f+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int d1 = 0; d1 < `+R+`; d1 += 4) {
|
|
vec4 wValues = vec4(
|
|
getW(wR, wC, d1, d2),
|
|
getW(wR, wC, d1 + 1, d2),
|
|
getW(wR, wC, d1 + 2, d2),
|
|
getW(wR, wC, d1 + 3, d2)
|
|
);
|
|
|
|
if (`+te+`) {
|
|
vec4 xValues = vec4(
|
|
getX(batch, xR, xC, d1),
|
|
getX(batch, xR, xC, d1 + 1),
|
|
getX(batch, xR, xC, d1 + 2),
|
|
getX(batch, xR, xC, d1 + 3)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else {
|
|
vec4 xValues = vec4(
|
|
getX(batch, d1, xR, xC),
|
|
getX(batch, d1 + 1, xR, xC),
|
|
getX(batch, d1 + 2, xR, xC),
|
|
getX(batch, d1 + 3, xR, xC)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
}
|
|
|
|
if (`+(z===1)+`) {
|
|
|
|
if (`+te+`) {
|
|
dotProd +=
|
|
getX(batch, xR, xC, `+R+`) *
|
|
getW(wR, wC, `+R+`, d2);
|
|
} else {
|
|
dotProd +=
|
|
getX(batch, `+R+`, xR, xC) *
|
|
getW(wR, wC, `+R+`, d2);
|
|
}
|
|
|
|
} else if (`+(z===2)+`) {
|
|
vec2 wValues = vec2(
|
|
getW(wR, wC, `+R+`, d2),
|
|
getW(wR, wC, `+R+` + 1, d2)
|
|
);
|
|
|
|
if (`+te+`) {
|
|
vec2 xValues = vec2(
|
|
getX(batch, xR, xC, `+R+`),
|
|
getX(batch, xR, xC, `+R+` + 1)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else {
|
|
vec2 xValues = vec2(
|
|
getX(batch, `+R+`, xR, xC),
|
|
getX(batch, `+R+` + 1, xR, xC)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
|
|
} else if (`+(z===3)+`) {
|
|
vec3 wValues = vec3(
|
|
getW(wR, wC, `+R+`, d2),
|
|
getW(wR, wC, `+R+` + 1, d2),
|
|
getW(wR, wC, `+R+` + 2, d2)
|
|
);
|
|
|
|
if (`+te+`) {
|
|
vec3 xValues = vec3(
|
|
getX(batch, xR, xC, `+R+`),
|
|
getX(batch, xR, xC, `+R+` + 1),
|
|
getX(batch, xR, xC, `+R+` + 2)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else {
|
|
vec3 xValues = vec3(
|
|
getX(batch, `+R+`, xR, xC),
|
|
getX(batch, `+R+` + 1, xR, xC),
|
|
getX(batch, `+R+` + 2, xR, xC)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
float result = dotProd;
|
|
`+me+`
|
|
`+xe+`
|
|
setOutput(result);
|
|
}
|
|
`},Vh=function(n){this.variableNames=["x","W"],this.outputShape=n.outShape;var t=n.padInfo.front,e=n.padInfo.top,r=n.padInfo.left,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,f=n.dilationWidth,A=n.filterDepth,I=n.filterHeight,R=n.filterWidth,z=4*Math.floor(n.inChannels/4),te=n.inChannels%4;this.userCode=`
|
|
const ivec3 strides = ivec3(`+i+", "+a+", "+s+`);
|
|
const ivec3 pads = ivec3(`+t+", "+e+", "+r+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int d2 = coords.u;
|
|
|
|
ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
|
|
int xFCorner = xFRCCorner.x;
|
|
int xRCorner = xFRCCorner.y;
|
|
int xCCorner = xFRCCorner.z;
|
|
|
|
// Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get
|
|
// y(yF, yR, yC, d2). ? = to be determined. : = across all
|
|
// values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wF = 0; wF < `+A+`; wF++) {
|
|
int xF = xFCorner + wF * `+u+`;
|
|
|
|
if (xF < 0 || xF >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wR = 0; wR < `+I+`; wR++) {
|
|
int xR = xRCorner + wR * `+l+`;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+R+`; wC++) {
|
|
int xC = xCCorner + wC * `+f+`;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int d1 = 0; d1 < `+z+`; d1 += 4) {
|
|
vec4 xValues = vec4(
|
|
getX(batch, xF, xR, xC, d1),
|
|
getX(batch, xF, xR, xC, d1 + 1),
|
|
getX(batch, xF, xR, xC, d1 + 2),
|
|
getX(batch, xF, xR, xC, d1 + 3)
|
|
);
|
|
vec4 wValues = vec4(
|
|
getW(wF, wR, wC, d1, d2),
|
|
getW(wF, wR, wC, d1 + 1, d2),
|
|
getW(wF, wR, wC, d1 + 2, d2),
|
|
getW(wF, wR, wC, d1 + 3, d2)
|
|
);
|
|
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
|
|
if (`+(te===1)+`) {
|
|
dotProd +=
|
|
getX(batch, xF, xR, xC, `+z+`) *
|
|
getW(wF, wR, wC, `+z+`, d2);
|
|
} else if (`+(te===2)+`) {
|
|
vec2 xValues = vec2(
|
|
getX(batch, xF, xR, xC, `+z+`),
|
|
getX(batch, xF, xR, xC, `+z+` + 1)
|
|
);
|
|
vec2 wValues = vec2(
|
|
getW(wF, wR, wC, `+z+`, d2),
|
|
getW(wF, wR, wC, `+z+` + 1, d2)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
} else if (`+(te===3)+`) {
|
|
vec3 xValues = vec3(
|
|
getX(batch, xF, xR, xC, `+z+`),
|
|
getX(batch, xF, xR, xC, `+z+` + 1),
|
|
getX(batch, xF, xR, xC, `+z+` + 2)
|
|
);
|
|
vec3 wValues = vec3(
|
|
getW(wF, wR, wC, `+z+`, d2),
|
|
getW(wF, wR, wC, `+z+` + 1, d2),
|
|
getW(wF, wR, wC, `+z+` + 2, d2)
|
|
);
|
|
dotProd += dot(xValues, wValues);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Ll=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.outputShape=n.outShape;var i=n.inHeight,a=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,f=n.strideWidth,A=n.dilationHeight,I=n.dilationWidth,R=n.filterHeight,z=n.filterWidth,te=n.outChannels/n.inChannels,oe="",ae="";e&&(oe=r?`float activation(float a) {
|
|
float b = getPreluActivationWeightsAtOutCoords();
|
|
`+e+`
|
|
}`:`
|
|
float activation(float x) {
|
|
`+e+`
|
|
}
|
|
`,ae="result = activation(result);");var se=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+oe+`
|
|
|
|
const ivec2 strides = ivec2(`+l+", "+f+`);
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int d2 = coords.w;
|
|
int d1 = d2 / `+te+`;
|
|
int q = d2 - d1 * `+te+`;
|
|
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
// TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.
|
|
for (int wR = 0; wR < `+R+`; wR++) {
|
|
int xR = xRCorner + wR * `+A+`;
|
|
|
|
if (xR < 0 || xR >= `+i+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+z+`; wC++) {
|
|
int xC = xCCorner + wC * `+I+`;
|
|
|
|
if (xC < 0 || xC >= `+a+`) {
|
|
continue;
|
|
}
|
|
|
|
float xVal = getX(batch, xR, xC, d1);
|
|
float wVal = getW(wR, wC, d1, q);
|
|
dotProd += xVal * wVal;
|
|
}
|
|
}
|
|
|
|
float result = dotProd;
|
|
`+se+`
|
|
`+ae+`
|
|
setOutput(result);
|
|
}
|
|
`},Ul=function(n,t,e,r){t===void 0&&(t=!1),e===void 0&&(e=null),r===void 0&&(r=!1),this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n.outShape;for(var i=n.inHeight,a=n.inWidth,s=n.padInfo.top,u=n.padInfo.left,l=n.strideHeight,f=n.strideWidth,A=n.dilationHeight,I=n.dilationWidth,R=n.filterHeight,z=n.filterWidth,te=z,oe="int xR; int xC; int xCOffset;",ae=0;ae<R;ae++)for(var se=0;se<z;se++)oe+=`
|
|
vec4 xTexelR`+ae+"C"+2*se+` = vec4(0.);
|
|
vec4 wR`+ae+"C"+se+` = vec4(0.);
|
|
vec4 xR`+ae+"C"+se+" = vec4(0.);";for(ae=0;ae<R;ae++)for(var we=0;we<te;we++){if(oe+=`
|
|
xR = xRCorner + `+ae*A+`;
|
|
xC = xCCorner + `+(se=2*we)*I+`;
|
|
`,f===1){if(se<z&&(oe+=u%2==1?`
|
|
xCOffset = xC + 1;
|
|
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
|
|
|
|
// Need to manually clear unused channels in case
|
|
// we're reading from recycled texture.
|
|
if(xCOffset + 1 >= `+a+`) {
|
|
xTexelR`+ae+"C"+se+`.zw = vec2(0.);
|
|
}
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
xCOffset = xC + 1 - 2;
|
|
if(xR >= 0 && xR < `+i+" && xCOffset >= 0 && xCOffset < "+a+`) {
|
|
vec4 previous = getX(batch, xR, xCOffset, d1);
|
|
|
|
// Need to manually clear unused channels in case
|
|
// we're reading from recycled texture.
|
|
if(xCOffset + 1 >= `+a+`) {
|
|
previous.zw = vec2(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+" = vec4(previous.zw, xTexelR"+ae+"C"+se+`.xy);
|
|
} else {
|
|
xR`+ae+"C"+se+" = vec4(0, 0, xTexelR"+ae+"C"+se+`.xy);
|
|
}
|
|
`:`
|
|
if(xR >= 0 && xR < `+i+" && xC >= 0 && xC < "+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xC, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+" = xTexelR"+ae+"C"+se+`;
|
|
`,se+1<z)){var xe=u%2==0?ie(I):I;I%2==0&&u%2==1||I%2!=0&&u%2!=1?(oe+=`
|
|
xCOffset = xC + `+u%2+" + "+xe+`;
|
|
|
|
if(xR >= 0 && xR < `+i+` &&
|
|
xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
|
|
}
|
|
`,I>1&&(oe+=`
|
|
xCOffset -= 2;
|
|
if(xR >= 0 && xR < `+i+` &&
|
|
xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
`),oe+=`
|
|
xR`+ae+"C"+(se+1)+` = vec4(
|
|
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.xy);
|
|
`):oe+=`
|
|
xCOffset = xC + `+xe+`;
|
|
|
|
if(xR >= 0 && xR < `+i+` &&
|
|
xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
|
|
}
|
|
|
|
xR`+ae+"C"+(se+1)+" = xTexelR"+ae+"C"+(se+2)+`;
|
|
`}}else se<z&&(oe+=`
|
|
if(xR >= 0 && xR < `+i+`) {
|
|
`,u%2==1?(oe+=`
|
|
xCOffset = xC + 1 - `+f+`;
|
|
if(xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xCOffset, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
if(xC + 1 >= 0 && xC + 1 < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xC + 1, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+(se+2)+` = vec4(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+` = vec4(
|
|
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.zw);
|
|
`,se+1<z&&(oe+=`
|
|
vec4 final = vec4(0.);
|
|
xCOffset = xC + 1 + `+f+`;
|
|
if(xCOffset >= 0 && xCOffset < `+a+`) {
|
|
final = getX(batch, xR, xCOffset, d1);
|
|
}
|
|
xR`+ae+"C"+(se+1)+" = vec4(xTexelR"+ae+"C"+(se+2)+`.xy, final.xy);
|
|
`)):(oe+=`
|
|
if(xC >= 0 && xC < `+a+`) {
|
|
xTexelR`+ae+"C"+se+` = getX(batch, xR, xC, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+se+` = vec4(0.);
|
|
}
|
|
|
|
xCOffset = xC + `+f+`;
|
|
if(xCOffset >= 0 && xCOffset < `+a+`) {
|
|
xTexelR`+ae+"C"+(se+2)+` = getX(batch, xR, xCOffset, d1);
|
|
} else {
|
|
xTexelR`+ae+"C"+(se+2)+` = vec4(0.);
|
|
}
|
|
|
|
xR`+ae+"C"+se+` = vec4(
|
|
xTexelR`+ae+"C"+se+".xy, xTexelR"+ae+"C"+(se+2)+`.xy);
|
|
`,se+1<z&&(oe+=`
|
|
xR`+ae+"C"+(se+1)+` = vec4(
|
|
xTexelR`+ae+"C"+se+".zw, xTexelR"+ae+"C"+(se+2)+`.zw);
|
|
`)),oe+="}");se<z&&(oe+=`
|
|
vec4 wTexelR`+ae+"C"+se+" = getW("+ae+", "+se+`, d1, q);
|
|
wR`+ae+"C"+se+" = vec4(wTexelR"+ae+"C"+se+".xz, wTexelR"+ae+"C"+se+`.xz);
|
|
`,se+1<z&&(oe+=`
|
|
vec4 wTexelR`+ae+"C"+(se+1)+" = getW("+ae+", "+(se+1)+`, d1, q);
|
|
wR`+ae+"C"+(se+1)+` =
|
|
vec4(wTexelR`+ae+"C"+(se+1)+".xz, wTexelR"+ae+"C"+(se+1)+".xz);"))}for(ae=0;ae<R;ae++)for(se=0;se<z;se++)oe+="dotProd += xR"+ae+"C"+se+" * wR"+ae+"C"+se+";";var me="",Se="";e&&(me=r?`vec4 activation(vec4 a) {
|
|
vec4 b = getPreluActivationWeightsAtOutCoords();
|
|
`+e+`
|
|
}`:`vec4 activation(vec4 x) {
|
|
`+e+`
|
|
}`,Se="result = activation(result);");var Re=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+me+`
|
|
|
|
const ivec2 strides = ivec2(`+l+", "+f+`);
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int d2 = coords.w;
|
|
int d1 = d2;
|
|
int q = 0;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
vec4 dotProd = vec4(0.);
|
|
|
|
`+oe+`
|
|
|
|
vec4 result = dotProd;
|
|
`+Re+`
|
|
`+Se+`
|
|
setOutput(result);
|
|
}
|
|
`},Qh=function(n,t,e,r,i){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var a=n[0],s=n[1],u=n[2],l=n[3],f=t[0],A=e[0],I=e[1];this.outputShape=[f,A,I,l];var R=r==="bilinear"?1:0,z=[s-1+".0",u-1+".0"],te=z[0],oe=z[1],ae=A>1?[""+(s-1)/(A-1),"(y2-y1) * height_ratio","y1*"+te+" + float(y)*(height_scale)"]:["0.0","0.0","0.5 * (y1+y2) * "+te],se=ae[0],we=ae[1],xe=ae[2],me=I>1?[""+(u-1)/(I-1),"(x2-x1) * width_ratio","x1*"+oe+" + float(x)*(width_scale)"]:["0.0","0.0","0.5 * (x1+x2) * "+oe],Se=me[0],Re=me[1],Me=me[2];this.userCode=`
|
|
const float height_ratio = float(`+se+`);
|
|
const float width_ratio = float(`+Se+`);
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int y = coords[1];
|
|
int x = coords[2];
|
|
int d = coords[3];
|
|
|
|
// get box vals
|
|
float y1 = getBoxes(b,0);
|
|
float x1 = getBoxes(b,1);
|
|
float y2 = getBoxes(b,2);
|
|
float x2 = getBoxes(b,3);
|
|
|
|
// get image in batch index
|
|
int bInd = round(getBoxInd(b));
|
|
if(bInd < 0 || bInd >= `+a+`) {
|
|
return;
|
|
}
|
|
|
|
float height_scale = `+we+`;
|
|
float width_scale = `+Re+`;
|
|
|
|
float in_y = `+xe+`;
|
|
if( in_y < 0.0 || in_y > `+te+` ) {
|
|
setOutput(float(`+i+`));
|
|
return;
|
|
}
|
|
float in_x = `+Me+`;
|
|
if( in_x < 0.0 || in_x > `+oe+` ) {
|
|
setOutput(float(`+i+`));
|
|
return;
|
|
}
|
|
|
|
vec2 sourceFracIndexCR = vec2(in_x,in_y);
|
|
if(`+R+` == 1) {
|
|
// Compute the four integer indices.
|
|
ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);
|
|
ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));
|
|
|
|
float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);
|
|
float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);
|
|
float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);
|
|
float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);
|
|
|
|
vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);
|
|
|
|
float top = topLeft + (topRight - topLeft) * fracCR.x;
|
|
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;
|
|
float newValue = top + (bottom - top) * fracCR.y;
|
|
setOutput(newValue);
|
|
} else {
|
|
// Compute the coordinators of nearest neighbor point.
|
|
ivec2 sourceNearestCR = ivec2(floor(
|
|
sourceFracIndexCR + vec2(0.5,0.5)));
|
|
float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);
|
|
setOutput(newValue);
|
|
}
|
|
}
|
|
`},Gh=function(n,t,e){this.variableNames=["x"],this.outputShape=n;var r=n.length,i=n[n.length-1],a=e?"<":">";this.userCode=`
|
|
int getIndex(int i) {
|
|
`+(e?"return "+i+" -i - 1;":"return i;")+`
|
|
}
|
|
|
|
void main() {
|
|
`+cr(r)+` coords = getOutputCoords();
|
|
int end = `+Wl(r,"coords")+`;
|
|
float val = 0.0;
|
|
for (int i = `+i+` - 1; i >= 0; i -= 1) {
|
|
int idx = getIndex(i);
|
|
if (idx `+a+` end) {
|
|
continue;
|
|
}
|
|
if (idx == end && `+t+`) {
|
|
continue;
|
|
}
|
|
`+Wl(r,"coords")+` = idx;
|
|
val += getX(`+function(s,u){if(s===1)return""+u;if(s===2)return u+".x, "+u+".y";if(s===3)return u+".x, "+u+".y, "+u+".z";if(s===4)return u+".x, "+u+".y, "+u+".z, "+u+".w";throw Error("Cumulative sum for rank "+s+" is not yet supported")}(r,"coords")+`);
|
|
}
|
|
setOutput(val);
|
|
}
|
|
`};function Wl(n,t){if(n===1)return""+t;if(n===2)return t+".y";if(n===3)return t+".z";if(n===4)return t+".w";throw Error("Cumulative sum for rank "+n+" is not yet supported")}var Hh=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=Yt.DENSE;var t=$r(n),e=rn();this.outputShape=n,this.userCode=`
|
|
ivec3 outCoordsFromFlatIndex(int index) {
|
|
`+la(["r","c","d"],n)+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+t[0]+", "+t[1]+`));
|
|
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
for (int i=0; i<4; i++) {
|
|
int flatIndex = index + i;
|
|
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
|
|
result[i] = getA(rc.x, rc.y, rc.z);
|
|
}
|
|
|
|
`+e.output+` = result;
|
|
}
|
|
`},Xh=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=Yt.DENSE;var t=$r(n),e=rn();this.outputShape=n,this.userCode=`
|
|
ivec3 outCoordsFromFlatIndex(int index) {
|
|
`+la(["r","c","d"],n)+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 resTexRC = ivec2(resultUV.yx *
|
|
vec2(`+t[0]+", "+t[1]+`));
|
|
int index = 4 * (resTexRC.x * `+t[1]+` + resTexRC.y);
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
for (int i=0; i<4; i++) {
|
|
int flatIndex = index + i;
|
|
ivec3 rc = outCoordsFromFlatIndex(flatIndex);
|
|
result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));
|
|
}
|
|
|
|
`+e.output+` = result;
|
|
}
|
|
`},Kh=function(){function n(t,e,r){this.variableNames=["x"],this.outputShape=[],this.outputShape=t,this.blockSize=e,this.dataFormat=r,this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int h = `+this.getHeightCoordString()+`;
|
|
int w = `+this.getWidthCoordString()+`;
|
|
int d = `+this.getDepthCoordString()+`;
|
|
|
|
int in_h = h / `+e+`;
|
|
int offset_h = imod(h, `+e+`);
|
|
int in_w = w / `+e+`;
|
|
int offset_w = imod(w, `+e+`);
|
|
int offset_d = (offset_h * `+e+` + offset_w) *
|
|
`+this.getOutputDepthSize()+`;
|
|
int in_d = d + offset_d;
|
|
|
|
float result = `+this.getInputSamplingString()+`;
|
|
setOutput(result);
|
|
}
|
|
`}return n.prototype.getHeightCoordString=function(){return this.dataFormat==="NHWC"?"coords[1]":"coords[2]"},n.prototype.getWidthCoordString=function(){return this.dataFormat==="NHWC"?"coords[2]":"coords[3]"},n.prototype.getDepthCoordString=function(){return this.dataFormat==="NHWC"?"coords[3]":"coords[1]"},n.prototype.getOutputDepthSize=function(){return this.dataFormat==="NHWC"?this.outputShape[3]:this.outputShape[1]},n.prototype.getInputSamplingString=function(){return this.dataFormat==="NHWC"?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"},n}(),Zh=function(n){this.variableNames=["X"],this.outputShape=[n,n],this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;
|
|
setOutput(val);
|
|
}
|
|
`},Jh=function(n){this.variableNames=["A"],this.outTexUsage=jr.DOWNLOAD;var t=rn();this.outputShape=n,this.userCode=`
|
|
`+jl+`
|
|
|
|
void main() {
|
|
float x = getAAtOutCoords();
|
|
`+t.output+` = encode_float(x);
|
|
}
|
|
`},Yh=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=jr.DOWNLOAD;var t=rn();this.outputShape=n,this.userCode=`
|
|
`+jl+`
|
|
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));
|
|
`+t.output+` = encode_float(x);
|
|
}
|
|
`},$h=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"];var r=rn(),i=t[0],a=t[1];this.outputShape=n;var s="result";e&&(s="floor(result * 255. + 0.5)"),this.userCode=`
|
|
`+Ds(n)+`
|
|
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
|
|
int flatIndex = getFlatIndex(coords);
|
|
int offset = imod(flatIndex, 4);
|
|
|
|
flatIndex = idiv(flatIndex, 4, 1.);
|
|
|
|
int r = flatIndex / `+a+`;
|
|
int c = imod(flatIndex, `+a+`);
|
|
vec2 uv = (vec2(c, r) + halfCR) / vec2(`+a+".0, "+i+`.0);
|
|
vec4 values = `+r.texture2D+`(A, uv);
|
|
|
|
float result;
|
|
|
|
if(offset == 0) {
|
|
result = values[0];
|
|
} else if(offset == 1) {
|
|
result = values[1];
|
|
} else if(offset == 2) {
|
|
result = values[2];
|
|
} else {
|
|
result = values[3];
|
|
}
|
|
|
|
`+r.output+" = vec4("+s+`, 0., 0., 0.);
|
|
}
|
|
`},qh=function(n,t,e){e===void 0&&(e=!1),this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var r=rn(),i=t[0],a=t[1];this.outputShape=n;var s="",u="result";e&&(u="floor(result * 255. + 0.5)");for(var l=0;l<=1;l++)for(var f=0;f<=1;f++){var A=2*l+f;s+=`
|
|
localCoords = coords;
|
|
if(localCoords[2] + `+f+" < "+n[2]+`) {
|
|
localCoords[2] += `+f+`;
|
|
if(localCoords[1] + `+l+" < "+n[1]+`) {
|
|
localCoords[1] += `+l+`;
|
|
|
|
flatIndex = getFlatIndex(localCoords);
|
|
offset = imod(flatIndex, 4);
|
|
|
|
flatIndex = idiv(flatIndex, 4, 1.);
|
|
|
|
r = flatIndex / `+a+`;
|
|
c = imod(flatIndex, `+a+`);
|
|
uv = (vec2(c, r) + halfCR) / vec2(`+a+".0, "+i+`.0);
|
|
values = `+r.texture2D+`(A, uv);
|
|
|
|
if(offset == 0) {
|
|
result[`+A+`] = values[0];
|
|
} else if(offset == 1) {
|
|
result[`+A+`] = values[1];
|
|
} else if(offset == 2) {
|
|
result[`+A+`] = values[2];
|
|
} else {
|
|
result[`+A+`] = values[3];
|
|
}
|
|
}
|
|
}
|
|
`}this.userCode=`
|
|
`+Ds(n)+`
|
|
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
|
|
vec4 result = vec4(0.);
|
|
int flatIndex, r, c, offset;
|
|
ivec3 localCoords;
|
|
vec2 uv;
|
|
vec4 values;
|
|
|
|
`+s+`
|
|
|
|
`+r.output+" = "+u+`;
|
|
}
|
|
`},ep="return real * expR - imag * expI;",tp="return real * expI + imag * expR;",zl=function(n,t,e){this.variableNames=["real","imag"];var r=t[1];this.outputShape=t;var i=e?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,a=e?r+".0":"1.0";this.userCode=`
|
|
const float exponentMultiplier = `+i+`;
|
|
|
|
float unaryOpComplex(float real, float expR, float imag, float expI) {
|
|
`+n+`
|
|
}
|
|
|
|
float mulMatDFT(int batch, int index) {
|
|
float indexRatio = float(index) / float(`+r+`);
|
|
float exponentMultiplierTimesIndexRatio =
|
|
exponentMultiplier * indexRatio;
|
|
|
|
float result = 0.0;
|
|
|
|
for (int i = 0; i < `+r+`; i++) {
|
|
// x = (-2|2 * PI / N) * index * i;
|
|
float x = exponentMultiplierTimesIndexRatio * float(i);
|
|
float expR = cos(x);
|
|
float expI = sin(x);
|
|
float real = getReal(batch, i);
|
|
float imag = getImag(batch, i);
|
|
|
|
result +=
|
|
unaryOpComplex(real, expR, imag, expI) / `+a+`;
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
setOutput(mulMatDFT(coords[0], coords[1]));
|
|
}
|
|
`},rp=function(){function n(t,e){this.outputShape=[],this.variableNames=["x"],this.outputShape=t,this.userCode=`
|
|
uniform float value;
|
|
void main() {
|
|
// Input can be obtained from uniform value.
|
|
setOutput(value);
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.valueLoc==null&&(e.valueLoc=r.getUniformLocationNoThrow(i,"value")),r.gl.uniform1f(e.valueLoc,t)}},n}(),np=function(n,t,e){this.variableNames=["A","indices"];var r=n.slice();r[e]=t,this.outputShape=r,this.rank=r.length;var i=cr(this.rank),a=function(s,u){var l=s.length;if(l>4)throw Error("Gather for rank "+l+" is not yet supported");if(l===1)return"int(getIndices(resRC))";for(var f=["resRC.x","resRC.y","resRC.z","resRC.w"],A=[],I=0;I<s.length;I++)I===u?A.push("int(getIndices("+f[I]+"))"):A.push(""+f[I]);return A.join()}(n,e);this.userCode=`
|
|
void main() {
|
|
`+i+` resRC = getOutputCoords();
|
|
setOutput(getA(`+a+`));
|
|
}
|
|
`},ip=function(n,t,e){this.sliceDim=n,this.strides=t,this.variableNames=["x","indices"],this.outputShape=e;var r=cr(t.length),i=cr(e.length),a=this.sliceDim>1?"strides[j]":"strides";this.userCode=`
|
|
`+r+" strides = "+r+"("+this.strides+`);
|
|
void main() {
|
|
`+i+` coords = getOutputCoords();
|
|
int flattenIndex = 0;
|
|
for (int j = 0; j < `+this.sliceDim+`; j++) {
|
|
int index = round(getIndices(coords[0], j));
|
|
flattenIndex += index * `+a+`;
|
|
}
|
|
setOutput(getX(flattenIndex, coords[1]));
|
|
}
|
|
`};function Vl(n,t){var e=rn();return qi(n,t,e.version+`
|
|
precision highp float;
|
|
`+e.attribute+` vec3 clipSpacePos;
|
|
`+e.attribute+` vec2 uv;
|
|
`+e.varyingVs+` vec2 resultUV;
|
|
|
|
void main() {
|
|
gl_Position = vec4(clipSpacePos, 1);
|
|
resultUV = uv;
|
|
}`)}function Ql(n,t){return ir(n,t,new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]))}function Gl(n,t){return lr(n,t,new Uint16Array([0,1,2,2,1,3]))}function eo(n,t,e,r,i,a,s){Jn(e,r);var u=yn(n,t),l=n.TEXTURE_2D;return pt(n,t,function(){return n.bindTexture(l,u)}),pt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE)}),pt(n,t,function(){return n.texParameteri(l,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE)}),pt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MIN_FILTER,n.NEAREST)}),pt(n,t,function(){return n.texParameteri(l,n.TEXTURE_MAG_FILTER,n.NEAREST)}),pt(n,t,function(){return n.texImage2D(l,0,i,e,r,0,a,s,null)}),pt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)}),u}function Hl(n,t,e,r,i){var a=hi(e,r);return eo(n,t,a[0],a[1],i.internalFormatFloat,i.textureFormatFloat,n.FLOAT)}function Xl(n,t,e,r,i){var a=hi(e,r);return eo(n,t,a[0],a[1],i.internalFormatHalfFloat,i.textureFormatFloat,i.textureTypeHalfFloat)}function Kl(n,t,e,r,i){var a=hi(e,r);return eo(n,t,a[0],a[1],n.RGBA,n.RGBA,n.UNSIGNED_BYTE)}function Zl(n,t,e,r,i){var a=Zn(e,r);return eo(n,t,a[0],a[1],i.internalFormatPackedFloat,n.RGBA,n.FLOAT)}function Jl(n,t,e,r,i){var a=Zn(e,r);return eo(n,t,a[0],a[1],i.internalFormatPackedHalfFloat,n.RGBA,i.textureTypeHalfFloat)}function Yl(n,t,e,r){return pt(n,t,function(){return n.bindBuffer(n.ARRAY_BUFFER,r)}),Bi(n,t,e,"clipSpacePos",r,3,20,0)&&Bi(n,t,e,"uv",r,2,20,12)}function $l(n,t,e,r,i,a,s){var u,l,f;pt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),a instanceof Uint8Array?(u=new Uint8Array(r*i*4),l=n.UNSIGNED_BYTE,f=n.RGBA):(u=new Float32Array(r*i*4),l=n.FLOAT,f=s.internalFormatPackedFloat),u.set(a),pt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,f,r,i,0,n.RGBA,l,u)}),pt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function ql(n,t,e,r){pt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,e)}),r.data instanceof Uint8Array?pt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,r.width,r.height,0,n.RGBA,n.UNSIGNED_BYTE,r.data)}):pt(n,t,function(){return n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r)}),pt(n,t,function(){return n.bindTexture(n.TEXTURE_2D,null)})}function ec(n,t,e,r,i){var a=n.createBuffer();pt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,a)});var s=16*e*r;return pt(n,t,function(){return n.bufferData(n.PIXEL_PACK_BUFFER,s,n.STREAM_READ)}),pt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,0)}),pt(n,t,function(){return n.bindBuffer(n.PIXEL_PACK_BUFFER,null)}),a}function tc(n,t,e){var r=n,i=new Float32Array(e);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,i),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),i}function rc(n,t,e,r,i){var a=hi(e,r),s=a[0],u=a[1],l=new Uint8Array(e*r*4);return pt(n,t,function(){return n.readPixels(0,0,s,u,i.downloadTextureFormat,n.UNSIGNED_BYTE,l)}),new Float32Array(l.buffer)}function nc(n,t,e,r,i,a,s,u){var l=n,f=new Float32Array(function(A,I){var R=Zn(A,I);return R[0]*R[1]*4}(a,s));return l.bindBuffer(l.PIXEL_PACK_BUFFER,t),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,f),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),f}function ic(n,t,e,r){var i=new Float32Array(e*r*4);return pt(n,t,function(){return n.readPixels(0,0,r,e,n.RGBA,n.FLOAT,i)}),i}var ap=Object.freeze({createVertexShader:Vl,createVertexBuffer:Ql,createIndexBuffer:Gl,createFloat32MatrixTexture:Hl,createFloat16MatrixTexture:Xl,createUnsignedBytesMatrixTexture:Kl,createPackedMatrixTexture:Zl,createFloat16PackedMatrixTexture:Jl,bindVertexProgramAttributeStreams:Yl,uploadDenseMatrixToTexture:$l,uploadPixelDataToTexture:ql,createBufferFromOutputTexture:ec,downloadFloat32MatrixFromBuffer:tc,downloadByteEncodedFloatMatrixFromOutputTexture:rc,downloadPackedMatrixFromBuffer:nc,downloadMatrixFromPackedOutputTexture:ic}),ac=function(){function n(t){this.outputTexture=null,this.program=null,this.disposed=!1,this.vertexAttrsAreBound=!1,this.itemsToPoll=[];var e=P().getNumber("WEBGL_VERSION");t!=null?(this.gl=t,Nn(e,t)):this.gl=mn(e);var r="WEBGL_color_buffer_float";if(P().getNumber("WEBGL_VERSION")===1){if(this.textureFloatExtension=pi(this.gl,this.debug,"OES_texture_float"),Zr(this.gl,"OES_texture_half_float"))this.textureHalfFloatExtension=pi(this.gl,this.debug,"OES_texture_half_float");else if(P().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(r),Zr(this.gl,"EXT_color_buffer_half_float"))this.colorBufferHalfFloatExtension=pi(this.gl,this.debug,"EXT_color_buffer_half_float");else if(P().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(r="EXT_color_buffer_float",Zr(this.gl,r))this.colorBufferFloatExtension=this.gl.getExtension(r);else{if(!Zr(this.gl,"EXT_color_buffer_half_float"))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension("EXT_color_buffer_half_float")}this.vertexBuffer=Ql(this.gl,this.debug),this.indexBuffer=Gl(this.gl,this.debug),this.framebuffer=cn(this.gl,this.debug),this.textureConfig=qr(this.gl,this.textureHalfFloatExtension)}return Object.defineProperty(n.prototype,"debug",{get:function(){return P().getBool("DEBUG")},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){var t=this;if(!this.disposed){this.program!=null&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),this.outputTexture!=null&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");var e=this.gl;pt(e,this.debug,function(){return e.finish()}),pt(e,this.debug,function(){return e.bindFramebuffer(e.FRAMEBUFFER,null)}),pt(e,this.debug,function(){return e.deleteFramebuffer(t.framebuffer)}),pt(e,this.debug,function(){return e.bindBuffer(e.ARRAY_BUFFER,null)}),pt(e,this.debug,function(){return e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}),pt(e,this.debug,function(){return e.deleteBuffer(t.indexBuffer)}),this.disposed=!0}},n.prototype.createFloat32MatrixTexture=function(t,e){return this.throwIfDisposed(),Hl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createFloat16MatrixTexture=function(t,e){return this.throwIfDisposed(),Xl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createUnsignedBytesMatrixTexture=function(t,e){return this.throwIfDisposed(),Kl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.uploadPixelDataToTexture=function(t,e){this.throwIfDisposed(),ql(this.gl,this.debug,t,e)},n.prototype.uploadDenseMatrixToTexture=function(t,e,r,i){this.throwIfDisposed(),$l(this.gl,this.debug,t,e,r,i,this.textureConfig)},n.prototype.createFloat16PackedMatrixTexture=function(t,e){return this.throwIfDisposed(),Jl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.createPackedMatrixTexture=function(t,e){return this.throwIfDisposed(),Zl(this.gl,this.debug,t,e,this.textureConfig)},n.prototype.deleteMatrixTexture=function(t){var e=this;this.throwIfDisposed(),this.outputTexture===t&&(qn(this.gl,this.debug,this.framebuffer),this.outputTexture=null),pt(this.gl,this.debug,function(){return e.gl.deleteTexture(t)})},n.prototype.downloadByteEncodedFloatMatrixFromOutputTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return rc(i.gl,i.debug,e,r,i.textureConfig)})},n.prototype.downloadPackedMatrixFromBuffer=function(t,e,r,i,a,s){return nc(this.gl,t,0,0,0,a,s,this.textureConfig)},n.prototype.downloadFloat32MatrixFromBuffer=function(t,e){return tc(this.gl,t,e)},n.prototype.createBufferFromTexture=function(t,e,r){this.bindTextureToFrameBuffer(t);var i=ec(this.gl,this.debug,e,r,this.textureConfig);return this.unbindTextureToFrameBuffer(),i},n.prototype.createAndWaitForFence=function(){var t=this.createFence(this.gl);return this.pollFence(t)},n.prototype.createFence=function(t){var e,r,i=this;if(P().getBool("WEBGL_FENCE_API_ENABLED")){var a=t,s=a.fenceSync(a.SYNC_GPU_COMMANDS_COMPLETE,0);t.flush(),r=function(){var u=a.clientWaitSync(s,0,0);return u===a.ALREADY_SIGNALED||u===a.CONDITION_SATISFIED},e=s}else P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(e=this.beginQuery(),this.endQuery(),r=function(){return i.isQueryAvailable(e,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}):r=function(){return!0};return{query:e,isFencePassed:r}},n.prototype.downloadMatrixFromPackedTexture=function(t,e,r){var i=this;return this.downloadMatrixDriver(t,function(){return ic(i.gl,i.debug,e,r)})},n.prototype.createProgram=function(t){this.throwIfDisposed();var e=this.gl,r=wa(e,this.debug,t),i=Vl(e,this.debug),a=Pr(e,this.debug);return pt(e,this.debug,function(){return e.attachShader(a,i)}),pt(e,this.debug,function(){return e.attachShader(a,r)}),ea(e,this.debug,a),this.debug&&Xr(e,this.debug,a),this.vertexAttrsAreBound||(this.setProgram(a),this.vertexAttrsAreBound=Yl(e,this.debug,this.program,this.vertexBuffer)),a},n.prototype.deleteProgram=function(t){var e=this;this.throwIfDisposed(),t===this.program&&(this.program=null),t!=null&&pt(this.gl,this.debug,function(){return e.gl.deleteProgram(t)})},n.prototype.setProgram=function(t){var e=this;this.throwIfDisposed(),this.program=t,this.program!=null&&this.debug&&Xr(this.gl,this.debug,this.program),pt(this.gl,this.debug,function(){return e.gl.useProgram(t)})},n.prototype.getUniformLocation=function(t,e,r){return r===void 0&&(r=!0),this.throwIfDisposed(),r?Yn(this.gl,this.debug,t,e):$n(this.gl,t,e)},n.prototype.getAttributeLocation=function(t,e){var r=this;return this.throwIfDisposed(),pt(this.gl,this.debug,function(){return r.gl.getAttribLocation(t,e)})},n.prototype.getUniformLocationNoThrow=function(t,e){return this.throwIfDisposed(),this.gl.getUniformLocation(t,e)},n.prototype.setInputMatrixTexture=function(t,e,r){this.throwIfDisposed(),this.throwIfNoProgram(),Aa(this.gl,this.debug,this.program,t,e,r)},n.prototype.setOutputMatrixTexture=function(t,e,r){this.setOutputMatrixTextureDriver(t,r,e)},n.prototype.setOutputPackedMatrixTexture=function(t,e,r){this.throwIfDisposed();var i=Zn(e,r),a=i[0],s=i[1];this.setOutputMatrixTextureDriver(t,a,s)},n.prototype.setOutputMatrixWriteRegion=function(t,e,r,i){this.setOutputMatrixWriteRegionDriver(r,t,i,e)},n.prototype.setOutputPackedMatrixWriteRegion=function(t,e,r,i){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")},n.prototype.debugValidate=function(){this.program!=null&&Xr(this.gl,this.debug,this.program),Ln(this.gl)},n.prototype.executeProgram=function(){this.throwIfDisposed(),this.throwIfNoProgram();var t=this.gl;this.debug&&this.debugValidate(),pt(t,this.debug,function(){return t.drawElements(t.TRIANGLES,6,t.UNSIGNED_SHORT,0)})},n.prototype.blockUntilAllProgramsCompleted=function(){var t=this;this.throwIfDisposed(),pt(this.gl,this.debug,function(){return t.gl.finish()})},n.prototype.getQueryTimerExtension=function(){return this.disjointQueryTimerExtension==null&&(this.disjointQueryTimerExtension=pi(this.gl,this.debug,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension},n.prototype.getQueryTimerExtensionWebGL2=function(){return this.getQueryTimerExtension()},n.prototype.getQueryTimerExtensionWebGL1=function(){return this.getQueryTimerExtension()},n.prototype.beginQuery=function(){if(P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")===2){var t=this.gl,e=this.getQueryTimerExtensionWebGL2(),r=t.createQuery();return t.beginQuery(e.TIME_ELAPSED_EXT,r),r}var i=this.getQueryTimerExtensionWebGL1(),a=i.createQueryEXT();return i.beginQueryEXT(i.TIME_ELAPSED_EXT,a),a},n.prototype.endQuery=function(){if(P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")!==2){var t=this.getQueryTimerExtensionWebGL1();t.endQueryEXT(t.TIME_ELAPSED_EXT)}else{var e=this.gl,r=this.getQueryTimerExtensionWebGL2();e.endQuery(r.TIME_ELAPSED_EXT)}},n.prototype.waitForQueryAndGetTime=function(t){return C(this,void 0,void 0,function(){var e=this;return x(this,function(r){switch(r.label){case 0:return[4,de(function(){return e.disposed||e.isQueryAvailable(t,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))})];case 1:return r.sent(),[2,this.getQueryTime(t,P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))]}})})},n.prototype.getQueryTime=function(t,e){if(e===0)return null;if(e===2){var r=this.gl;return r.getQueryParameter(t,r.QUERY_RESULT)/1e6}var i=this.getQueryTimerExtensionWebGL1();return i.getQueryObjectEXT(t,i.QUERY_RESULT_EXT)/1e6},n.prototype.isQueryAvailable=function(t,e){if(e===0)return!0;if(e===2){var r=this.gl,i=this.getQueryTimerExtensionWebGL2(),a=r.getQueryParameter(t,r.QUERY_RESULT_AVAILABLE);return this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),a&&!this.disjoint}return a=(i=this.getQueryTimerExtensionWebGL1()).getQueryObjectEXT(t,i.QUERY_RESULT_AVAILABLE_EXT),this.disjoint==null&&(this.disjoint=this.gl.getParameter(i.GPU_DISJOINT_EXT)),a&&!this.disjoint},n.prototype.pollFence=function(t){var e=this;return new Promise(function(r){e.addItemToPoll(function(){return t.isFencePassed()},function(){return r()})})},n.prototype.pollItems=function(){for(var t=function(r){for(var i=0;i<r.length&&r[i]();++i);return i-1}(this.itemsToPoll.map(function(r){return r.isDoneFn})),e=0;e<=t;++e)(0,this.itemsToPoll[e].resolveFn)();this.itemsToPoll=this.itemsToPoll.slice(t+1)},n.prototype.addItemToPoll=function(t,e){var r=this;this.itemsToPoll.push({isDoneFn:t,resolveFn:e}),this.itemsToPoll.length>1||de(function(){return r.pollItems(),r.itemsToPoll.length===0})},n.prototype.bindTextureToFrameBuffer=function(t){this.throwIfDisposed(),mi(this.gl,this.debug,t,this.framebuffer),this.debug&&Ln(this.gl)},n.prototype.unbindTextureToFrameBuffer=function(){this.outputTexture!=null?(mi(this.gl,this.debug,this.outputTexture,this.framebuffer),this.debug&&Ln(this.gl)):qn(this.gl,this.debug,this.framebuffer)},n.prototype.downloadMatrixDriver=function(t,e){this.bindTextureToFrameBuffer(t);var r=e();return this.unbindTextureToFrameBuffer(),r},n.prototype.setOutputMatrixTextureDriver=function(t,e,r){this.throwIfDisposed();var i=this.gl;mi(i,this.debug,t,this.framebuffer),this.debug&&Ln(i),this.outputTexture=t,pt(i,this.debug,function(){return i.viewport(0,0,e,r)}),pt(i,this.debug,function(){return i.scissor(0,0,e,r)})},n.prototype.setOutputMatrixWriteRegionDriver=function(t,e,r,i){var a=this;this.throwIfDisposed(),pt(this.gl,this.debug,function(){return a.gl.scissor(t,e,r,i)})},n.prototype.throwIfDisposed=function(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")},n.prototype.throwIfNoProgram=function(){if(this.program==null)throw new Error("No GPU program is currently set.")},n}();function oc(n,t){if(n.length!==t.length)throw Error("Binary was compiled with "+n.length+" inputs, but was executed with "+t.length+" inputs");n.forEach(function(e,r){var i=e.logicalShape,a=t[r],s=a.shape;if(!ue(i,s))throw Error("Binary was compiled with different shapes than the current args. Shapes "+i+" and "+s+" must match");if(!e.isUniform||!a.isUniform){var u=e.texShape,l=a.isUniform?null:a.texData.texShape;if(!ue(u,l))throw Error("Binary was compiled with different texture shapes than the current args. Shape "+u+" and "+l+" must match")}})}var op=function(n,t,e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var r=e.filterWidth,i=e.inChannels,a=e.strideWidth,s=e.strideHeight,u=e.padInfo,l=e.outWidth,f=e.dilationWidth,A=e.dilationHeight,I=e.dataFormat,R=u.left,z=u.top,te=i*r,oe=rn(),ae=I==="channelsLast",se=ae?0:1,we=ae?1:2,xe="",me=0;me<=1;me++)for(var Se=0;Se<=1;Se++)xe+=`
|
|
blockIndex = rc.y + `+Se+`;
|
|
pos = rc.x + `+me+`;
|
|
|
|
if(blockIndex < `+n[1]+" && pos < "+n[0]+`) {
|
|
offsetY = int(blockIndex / (`+l+")) * "+s+" - "+z+`;
|
|
d0 = offsetY + `+A+" * (pos / "+te+`);
|
|
|
|
if(d0 < `+t[se]+` && d0 >= 0) {
|
|
|
|
offsetX = int(mod(float(blockIndex), `+l+".) * "+a+". - "+R+`.);
|
|
d1 = offsetX + `+f+" * (int(mod(float(pos), "+te+".) / "+i+`.));
|
|
|
|
if(d1 < `+t[we]+` && d1 >= 0) {
|
|
|
|
ch = int(mod(float(pos), `+i+`.));
|
|
|
|
if (`+ae+`) {
|
|
innerDims = vec2(d1, ch);
|
|
result[`+(2*me+Se)+`] = getChannel(
|
|
getA(d0, int(innerDims.x),
|
|
int(innerDims.y)), innerDims);
|
|
} else {
|
|
innerDims = vec2(d0, d1);
|
|
result[`+(2*me+Se)+`] = getChannel(
|
|
getA(ch, int(innerDims.x),
|
|
int(innerDims.y)), innerDims);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;this.userCode=`
|
|
void main() {
|
|
ivec2 rc = getOutputCoords();
|
|
|
|
vec4 result = vec4(0);
|
|
|
|
int blockIndex, pos, offsetY, d0, offsetX, d1, ch;
|
|
vec2 innerDims;
|
|
|
|
`+xe+`
|
|
|
|
`+oe.output+` = result;
|
|
}
|
|
`},sp=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[];var a,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";a=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
int d = coords[3];
|
|
float x = getX(b, r, c, d);
|
|
float sum = 0.0;
|
|
for (int j = -`+s+"; j <= "+s+`; j++) {
|
|
int idx = d + j;
|
|
if (idx >= 0 && idx <= `+u+`) {
|
|
float z = getX(b, r, c, idx);
|
|
sum += z * z;
|
|
}
|
|
}
|
|
float val = x * `+a+`;
|
|
setOutput(val);
|
|
}
|
|
`},up=function(n,t,e,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=n,this.depth=n[3],this.depthRadius=t,this.bias=e,this.alpha=r,this.beta=i,this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
|
|
float result = 0.0;
|
|
for (int d = 0; d < `+this.depth+`; ++d) {
|
|
int depthBegin = int(max(0.0, float(d - `+t+`)));
|
|
int depthEnd = int(min(float(`+this.depth+`),
|
|
float(d + `+t+` + 1)));
|
|
|
|
const int MIN_DEPTH_BEGIN = 0;
|
|
const int MAX_DEPTH_END = `+this.depth+`;
|
|
|
|
float norm = 0.0;
|
|
for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {
|
|
if (k < depthBegin){
|
|
continue;
|
|
}
|
|
else if (k >= depthBegin && k < depthEnd) {
|
|
norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);
|
|
}
|
|
else {
|
|
break;
|
|
}
|
|
}
|
|
|
|
norm = float(`+r+") * norm + float("+e+`);
|
|
|
|
for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){
|
|
if (k < depthBegin){
|
|
continue;
|
|
}
|
|
else if (k >= depthBegin && k < depthEnd){
|
|
float dyi = -2.0 * float(`+r+`)
|
|
* float(`+i+`)
|
|
* getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)
|
|
/ norm;
|
|
if (k == d) {
|
|
dyi += pow(norm, -1.0 * `+i+`);
|
|
}
|
|
if (k == coords[3]) {
|
|
dyi *= getDy(b, r, c, d);
|
|
result += dyi;
|
|
}
|
|
}
|
|
else {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`},lp=function(n,t,e,r,i){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var a,s=t,u=n[3]-1;this.outputShape=n;var l="float("+e+") + float("+r+") * sum";a=i===.5?"inversesqrt("+l+")":i===1?"1.0/("+l+")":"exp(log("+l+") * float(-"+i+"));",this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords.x;
|
|
int r = coords.y;
|
|
int c = coords.z;
|
|
int d = coords.w;
|
|
|
|
bool hasNextCol = d < `+this.outputShape[3]+`;
|
|
bool hasNextRow = c < `+this.outputShape[2]+`;
|
|
|
|
vec4 sum = vec4(0.);
|
|
vec4 xFragAtOutputCoords = getX(b, r, c, d);
|
|
|
|
vec4 xAtOutputCoords = vec4(
|
|
getChannel(xFragAtOutputCoords, vec2(c, d)),
|
|
hasNextCol ?
|
|
getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,
|
|
hasNextRow ?
|
|
getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0
|
|
);
|
|
|
|
int firstChannel = d - `+s+`;
|
|
vec2 cache = vec2(0.);
|
|
if(firstChannel >= 0){
|
|
vec4 firstChannelFrag = getX(b, r, c, firstChannel);
|
|
cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));
|
|
if(hasNextRow){
|
|
cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));
|
|
}
|
|
}
|
|
|
|
ivec2 depth = ivec2(d, d + 1);
|
|
for (int j = - `+s+"; j <= "+s+`; j++) {
|
|
ivec2 idx = depth + j;
|
|
bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));
|
|
bvec2 belowUpperBound = lessThanEqual(idx, ivec2(`+u+`));
|
|
|
|
bool depthInRange = aboveLowerBound.x && belowUpperBound.x;
|
|
bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;
|
|
|
|
if(depthInRange || depthPlusOneInRange){
|
|
vec4 z = vec4(0.);
|
|
vec4 xFragAtCurrentDepth;
|
|
z.xz = cache.xy;
|
|
if(depthPlusOneInRange && hasNextCol){
|
|
xFragAtCurrentDepth = idx.y != d ?
|
|
getX(b, r, c, idx.y) : xFragAtOutputCoords;
|
|
z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));
|
|
if(hasNextRow){
|
|
z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));
|
|
}
|
|
}
|
|
cache.xy = z.yw;
|
|
sum += z * z;
|
|
}
|
|
}
|
|
vec4 result = xAtOutputCoords * `+a+`;
|
|
setOutput(result);
|
|
}
|
|
`},cp=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideHeight,e=n.strideWidth,r=n.dilationHeight,i=n.effectiveFilterHeight,a=n.effectiveFilterWidth,s=i-1-n.padInfo.top,u=a-1-n.padInfo.left,l=i*a-1;this.userCode=`
|
|
const ivec2 pads = ivec2(`+s+", "+u+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 dyRCCorner = coords.yz - pads;
|
|
int dyRCorner = dyRCCorner.x;
|
|
int dyCCorner = dyRCCorner.y;
|
|
|
|
// Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
for (int wR = 0; wR < `+i+`;
|
|
wR += `+r+`) {
|
|
float dyR = float(dyRCorner + wR) / `+t+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 || fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+a+`; wC++) {
|
|
float dyC = float(dyCCorner + wC) / `+e+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(b, idyR, idyC, d);
|
|
int maxPosValue = `+l+` - int(getMaxPos(b, idyR, idyC, d));
|
|
|
|
// Get the current value, check it against the value from the
|
|
// position matrix.
|
|
int curPosValue = wR * `+a+` + wC;
|
|
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
|
|
|
|
dotProd += dyValue * mask;
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},fp=function(n){this.variableNames=["dy","maxPos"],this.outputShape=n.inShape;var t=n.strideDepth,e=n.strideHeight,r=n.strideWidth,i=n.dilationDepth,a=n.dilationHeight,s=n.dilationWidth,u=n.effectiveFilterDepth,l=n.effectiveFilterHeight,f=n.effectiveFilterWidth,A=u-1-n.padInfo.front,I=l-1-n.padInfo.top,R=f-1-n.padInfo.left,z=u*l*f-1;this.userCode=`
|
|
const ivec3 pads = ivec3(`+A+", "+I+", "+R+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;
|
|
int dyDCorner = dyCorner.x;
|
|
int dyRCorner = dyCorner.y;
|
|
int dyCCorner = dyCorner.z;
|
|
|
|
// Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get
|
|
// dx(xD, xR, xC, ch).
|
|
// ? = to be determined. : = across all values in that axis.
|
|
float dotProd = 0.0;
|
|
|
|
for (int wD = 0; wD < `+u+`;
|
|
wD += `+i+`) {
|
|
float dyD = float(dyDCorner + wD) / `+t+`.0;
|
|
|
|
if (dyD < 0.0 || dyD >= `+n.outDepth+`.0 || fract(dyD) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyD = int(dyD);
|
|
|
|
for (int wR = 0; wR < `+l+`;
|
|
wR += `+a+`) {
|
|
float dyR = float(dyRCorner + wR) / `+e+`.0;
|
|
|
|
if (dyR < 0.0 || dyR >= `+n.outHeight+`.0 ||
|
|
fract(dyR) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyR = int(dyR);
|
|
|
|
for (int wC = 0; wC < `+f+`;
|
|
wC += `+s+`) {
|
|
float dyC = float(dyCCorner + wC) / `+r+`.0;
|
|
|
|
if (dyC < 0.0 || dyC >= `+n.outWidth+`.0 ||
|
|
fract(dyC) > 0.0) {
|
|
continue;
|
|
}
|
|
int idyC = int(dyC);
|
|
|
|
float dyValue = getDy(batch, idyD, idyR, idyC, ch);
|
|
int maxPosValue = `+z+` -
|
|
int(getMaxPos(batch, idyD, idyR, idyC, ch));
|
|
|
|
// Get the current value, check it against the value from the
|
|
// position matrix.
|
|
int curPosValue =
|
|
wD * `+l+" * "+f+` +
|
|
wR * `+f+` + wC;
|
|
float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);
|
|
|
|
dotProd += dyValue * mask;
|
|
}
|
|
}
|
|
}
|
|
setOutput(dotProd);
|
|
}
|
|
`},Bs=function(n,t,e,r,i,a,s){e===void 0&&(e=!1),r===void 0&&(r=!1),i===void 0&&(i=!1),a===void 0&&(a=null),s===void 0&&(s=!1),this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t;var u=e?n[1]:n[2],l=Math.ceil(u/2),f=e?"i * 2, rc.y":"rc.y, i * 2",A=r?"rc.z, i * 2":"i * 2, rc.z",I=e?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],R=r?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"],z="",te="";a&&(z=s?`vec4 activation(vec4 a) {
|
|
vec4 b = getPreluActivationWeightsAtOutCoords();
|
|
`+a+`
|
|
}`:`vec4 activation(vec4 x) {
|
|
`+a+`
|
|
}`,te="result = activation(result);");var oe=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),this.userCode=`
|
|
`+z+`
|
|
|
|
const float sharedDimension = `+l+`.0;
|
|
|
|
vec4 dot2x2ARowBCol(ivec3 rc) {
|
|
vec4 result = vec4(0);
|
|
for (int i = 0; i < `+l+`; i++) {
|
|
vec4 a = getMatrixA(rc.x, `+f+`);
|
|
vec4 b = getMatrixB(rc.x, `+A+`);
|
|
|
|
// These swizzled products need to be separately added.
|
|
// See: https://github.com/tensorflow/tfjs/issues/1735
|
|
result += (`+I[0]+" * "+R[0]+`);
|
|
result += (`+I[1]+" * "+R[1]+`);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
void main() {
|
|
ivec3 rc = getOutputCoords();
|
|
vec4 result = dot2x2ARowBCol(rc);
|
|
|
|
`+oe+`
|
|
|
|
`+te+`
|
|
|
|
setOutput(result);
|
|
}
|
|
`},dp=function(){function n(t,e,r){this.variableNames=["probs"],this.outputShape=[t,r],this.userCode=`
|
|
uniform float seed;
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
|
|
float r = random(seed);
|
|
float cdf = 0.0;
|
|
|
|
for (int i = 0; i < `+(e-1)+`; i++) {
|
|
cdf += getProbs(batch, i);
|
|
|
|
if (r < cdf) {
|
|
setOutput(float(i));
|
|
return;
|
|
}
|
|
}
|
|
|
|
// If no other event happened, last event happened.
|
|
setOutput(float(`+(e-1)+`));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;return function(r,i){e.seedLoc==null&&(e.seedLoc=r.getUniformLocation(i,"seed")),r.gl.uniform1f(e.seedLoc,t)}},n}(),hp=function(n,t,e,r){this.variableNames=["indices"],this.outputShape=[n,t],this.userCode=`
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int index = round(getIndices(coords.x));
|
|
setOutput(mix(float(`+r+"), float("+e+`),
|
|
float(index == coords.y)));
|
|
}
|
|
`},pp=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=n;var t=n.length;if(t===0)this.userCode=`
|
|
void main() {
|
|
setOutput(vec4(getA(), 0., 0., 0.));
|
|
}
|
|
`;else{var e=wn("rc",t),r=cr(t),i=function(u,l,f){if(u===1)return"rc > "+l[0];for(var A="",I=u-2;I<u;I++)A+=f[I]+" >= "+l[I],I<u-1&&(A+="||");return A}(t,n,e),a=function(u,l,f,A){if(u===1)return"";var I=A.slice(-2);return`
|
|
int r = `+I[0]+`;
|
|
int c = `+I[1]+`;
|
|
int rp1 = r + 1;
|
|
int cp1 = c + 1;
|
|
|
|
bool cEdge = cp1 >= `+l+`;
|
|
bool rEdge = rp1 >= `+f+`;
|
|
`}(t,n[n.length-1],n[n.length-2],e),s=function(u,l){var f=u.length,A=function(I,R){for(var z=[],te=0;te<=1;te++)for(var oe=0;oe<=1;oe++){for(var ae=(te===0?"r":"rp1")+", "+(oe===0?"c":"cp1"),se=2;se<I;se++)ae=R[R.length-1-se]+","+ae;z.push(ae)}return z}(f,l);return f===1?`getA(rc),
|
|
rc + 1 >= `+u[0]+` ? 0. : getA(rc + 1),
|
|
0, 0`:"getA("+A[0]+`),
|
|
cEdge ? 0. : getA(`+A[1]+`),
|
|
rEdge ? 0. : getA(`+A[2]+`),
|
|
rEdge || cEdge ? 0. : getA(`+A[3]+")"}(n,e);this.userCode=`
|
|
void main() {
|
|
`+r+` rc = getOutputCoords();
|
|
|
|
if(`+i+`) {
|
|
setOutput(vec4(0));
|
|
} else {
|
|
`+a+`
|
|
|
|
setOutput(vec4(`+s+`));
|
|
}
|
|
}
|
|
`}},vp=function(n,t,e){this.variableNames=["x"],this.outputShape=t.map(function(l,f){return l[0]+n[f]+l[1]});var r=n.length,i=cr(r),a=t.map(function(l){return l[0]}).join(","),s=t.map(function(l,f){return l[0]+n[f]}).join(","),u=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=r!==1?`
|
|
`+i+" start = "+i+"("+a+`);
|
|
`+i+" end = "+i+"("+s+`);
|
|
|
|
void main() {
|
|
`+i+` outC = getOutputCoords();
|
|
if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {
|
|
setOutput(float(`+e+`));
|
|
} else {
|
|
`+i+` coords = outC - start;
|
|
setOutput(getX(`+u+`));
|
|
}
|
|
}
|
|
`:`
|
|
int start = `+a+`;
|
|
int end = `+s+`;
|
|
|
|
void main() {
|
|
int outC = getOutputCoords();
|
|
if (outC < start || outC >= end) {
|
|
setOutput(float(`+e+`));
|
|
} else {
|
|
setOutput(getX(outC - start));
|
|
}
|
|
}
|
|
`},mp=function(n,t,e){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map(function(ae,se){return ae[0]+n[se]+ae[1]});for(var r=n.length,i=cr(r),a=t.map(function(ae){return ae[0]}).join(","),s=t.map(function(ae,se){return ae[0]+n[se]}).join(","),u=wn("rc",r),l=wn("source",r),f=u[r-1]+" < "+this.outputShape[r-1],A=r===1?"source":"vec2("+l.slice(-2).join()+")",I=[i+" rc = outputLoc;",u[r-1]+` += 1;
|
|
if(`+f+`) {
|
|
`,r===1?"":`}
|
|
rc = outputLoc;
|
|
`+u[r-2]+` += 1;
|
|
if(`+u[r-2]+" < "+this.outputShape[r-2]+") {",r===1?"":" "+u[r-1]+` += 1;
|
|
if(`+f+") {"],R=r===1?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))",z="",te=0,oe=r===1?2:4;te<oe;te++)z+=`
|
|
`+I[te]+`
|
|
if (`+R+`) {
|
|
result[`+te+"] = float("+e+`);
|
|
} else {
|
|
`+i+` source = rc - start;
|
|
result[`+te+"] = getChannel(getX("+l.join()+"), "+A+`);
|
|
}
|
|
`;z+=r===1?"} ":"}}",this.userCode=`
|
|
const `+i+" start = "+i+"("+a+`);
|
|
const `+i+" end = "+i+"("+s+`);
|
|
|
|
void main() {
|
|
`+i+` outputLoc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
`+z+`
|
|
setOutput(result);
|
|
}
|
|
`},_s=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideHeight,a=n.strideWidth,s=n.dilationHeight,u=n.dilationWidth,l=n.effectiveFilterHeight,f=n.effectiveFilterWidth,A=n.padInfo.top,I=n.padInfo.left;this.outputShape=n.outShape;var R=t==="avg",z="0.0";if(R||(z="-1.0 / 1e-20"),e)this.userCode=`
|
|
const ivec2 strides = ivec2(`+i+", "+a+`);
|
|
const ivec2 pads = ivec2(`+A+", "+I+`);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// max/min x(?, ?, d) to get y(yR, yC, d).
|
|
// ? = to be determined
|
|
float minMaxValue = 0.0;
|
|
float minMaxValueFound = 0.0;
|
|
int minMaxPosition = 0;
|
|
float avgValue = 0.0;
|
|
|
|
for (int wR = 0; wR < `+l+`;
|
|
wR += `+s+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+f+`;
|
|
wC += `+u+`) {
|
|
int xC = xCCorner + wC;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float value = getX(batch, xR, xC, d);
|
|
|
|
// If a min / max value has already been found, use it. If not,
|
|
// use the current value.
|
|
float currMinMaxValue = mix(
|
|
value, minMaxValue, minMaxValueFound);
|
|
if (value >= currMinMaxValue) {
|
|
minMaxValue = value;
|
|
minMaxValueFound = 1.0;
|
|
minMaxPosition = wR * `+f+` + wC;
|
|
}
|
|
}
|
|
}
|
|
setOutput(float(minMaxPosition));
|
|
}
|
|
`;else{var te=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(te="avgValue / count");var oe=4*Math.floor(r/4),ae=r%4,se=`
|
|
if (`+R+`) {
|
|
avgValue += dot(values, ones);
|
|
} else {
|
|
minMaxValue = max(values, minMaxValue);
|
|
}
|
|
`;this.userCode=`
|
|
const ivec2 strides = ivec2(`+i+", "+a+`);
|
|
const ivec2 pads = ivec2(`+A+", "+I+`);
|
|
const float initializationValue = `+z+`;
|
|
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
float count = 0.0;
|
|
|
|
float getValue(int batch, int xR, int xC, int d) {
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
return initializationValue;
|
|
}
|
|
count += 1.0;
|
|
return getX(batch, xR, xC, d);
|
|
}
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int d = coords[3];
|
|
|
|
ivec2 xRCCorner = coords.yz * strides - pads;
|
|
int xRCorner = xRCCorner.x;
|
|
int xCCorner = xRCCorner.y;
|
|
|
|
// max/min x(?, ?, d) to get y(yR, yC, d).
|
|
// ? = to be determined
|
|
vec4 minMaxValue = vec4(`+z+`);
|
|
float avgValue = 0.0;
|
|
count = 0.0;
|
|
|
|
for (int wR = 0; wR < `+l+`;
|
|
wR += `+s+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+oe+`; wC += 4) {
|
|
int xC = xCCorner + wC * `+u+`;
|
|
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
getValue(batch, xR, xC + `+u+`, d),
|
|
getValue(batch, xR, xC + 2 * `+u+`, d),
|
|
getValue(batch, xR, xC + 3 * `+u+`, d)
|
|
);
|
|
|
|
`+se+`
|
|
}
|
|
|
|
int xC = xCCorner + `+oe+`;
|
|
if (`+(ae===1)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+se+`
|
|
} else if (`+(ae===2)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
getValue(batch, xR, xC + `+u+`, d),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+se+`
|
|
} else if (`+(ae===3)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xR, xC, d),
|
|
getValue(batch, xR, xC + `+u+`, d),
|
|
getValue(batch, xR, xC + 2 * `+u+`, d),
|
|
initializationValue
|
|
);
|
|
|
|
`+se+`
|
|
}
|
|
}
|
|
setOutput(`+te+`);
|
|
}
|
|
`}},Ms=function(n,t,e){if(this.variableNames=["x"],t==="avg"&&e)throw new Error("Cannot compute positions for average pool.");var r=n.filterWidth,i=n.strideDepth,a=n.strideHeight,s=n.strideWidth,u=n.dilationDepth,l=n.dilationHeight,f=n.dilationWidth,A=n.effectiveFilterDepth,I=n.effectiveFilterHeight,R=n.effectiveFilterWidth,z=n.padInfo.front,te=n.padInfo.top,oe=n.padInfo.left;this.outputShape=n.outShape;var ae=t==="avg",se="0.0";if(ae||(se="-1.0 / 1e-20"),e)this.userCode=`
|
|
const ivec3 strides =
|
|
ivec3(`+i+", "+a+", "+s+`);
|
|
const ivec3 pads = ivec3(`+z+", "+te+", "+oe+`);
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
|
|
int xDCorner = xCorner.x;
|
|
int xRCorner = xCorner.y;
|
|
int xCCorner = xCorner.z;
|
|
|
|
// max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).
|
|
// ? = to be determined
|
|
float minMaxValue = 0.0;
|
|
float minMaxValueFound = 0.0;
|
|
int minMaxPosition = 0;
|
|
|
|
for (int wD = 0; wD < `+A+`;
|
|
wD += `+u+`) {
|
|
int xD = xDCorner + wD;
|
|
|
|
if (xD < 0 || xD >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wR = 0; wR < `+I+`;
|
|
wR += `+l+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+R+`;
|
|
wC += `+f+`) {
|
|
int xC = xCCorner + wC;
|
|
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
continue;
|
|
}
|
|
|
|
float value = getX(batch, xD, xR, xC, ch);
|
|
|
|
// If a min / max value has already been found, use it. If not,
|
|
// use the current value.
|
|
float currMinMaxValue = mix(
|
|
value, minMaxValue, minMaxValueFound);
|
|
if (value >= currMinMaxValue) {
|
|
minMaxValue = value;
|
|
minMaxValueFound = 1.0;
|
|
minMaxPosition =
|
|
wD * `+I+" * "+R+` +
|
|
wR * `+R+` + wC;;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
setOutput(float(minMaxPosition));
|
|
}
|
|
`;else{var we=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="avg"&&(we="avgValue / count");var xe=4*Math.floor(r/4),me=r%4,Se=`
|
|
if (`+ae+`) {
|
|
avgValue += dot(values, ones);
|
|
} else {
|
|
minMaxValue = max(values, minMaxValue);
|
|
}
|
|
`;this.userCode=`
|
|
const ivec3 strides =
|
|
ivec3(`+i+", "+a+", "+s+`);
|
|
const ivec3 pads = ivec3(`+z+", "+te+", "+oe+`);
|
|
const float initializationValue = `+se+`;
|
|
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
float count = 0.0;
|
|
|
|
float getValue(int batch, int xD, int xR, int xC, int ch) {
|
|
if (xC < 0 || xC >= `+n.inWidth+`) {
|
|
return initializationValue;
|
|
}
|
|
count += 1.0;
|
|
return getX(batch, xD, xR, xC, ch);
|
|
}
|
|
|
|
void main() {
|
|
ivec5 coords = getOutputCoords();
|
|
int batch = coords.x;
|
|
int ch = coords.u;
|
|
|
|
ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;
|
|
int xDCorner = xCorner.x;
|
|
int xRCorner = xCorner.y;
|
|
int xCCorner = xCorner.z;
|
|
|
|
// max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).
|
|
// ? = to be determined
|
|
vec4 minMaxValue = vec4(`+se+`);
|
|
float avgValue = 0.0;
|
|
count = 0.0;
|
|
|
|
for (int wD = 0; wD < `+A+`;
|
|
wD += `+u+`) {
|
|
int xD = xDCorner + wD;
|
|
|
|
if (xD < 0 || xD >= `+n.inDepth+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wR = 0; wR < `+I+`;
|
|
wR += `+l+`) {
|
|
int xR = xRCorner + wR;
|
|
|
|
if (xR < 0 || xR >= `+n.inHeight+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int wC = 0; wC < `+xe+`; wC += 4) {
|
|
int xC = xCCorner + wC * `+f+`;
|
|
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
getValue(batch, xD, xR, xC + `+f+`, ch),
|
|
getValue(batch, xD, xR, xC + 2 * `+f+`, ch),
|
|
getValue(batch, xD, xR, xC + 3 * `+f+`, ch)
|
|
);
|
|
|
|
`+Se+`
|
|
}
|
|
|
|
int xC = xCCorner + `+xe+`;
|
|
if (`+(me===1)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+Se+`
|
|
} else if (`+(me===2)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
getValue(batch, xD, xR, xC + `+f+`, ch),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+Se+`
|
|
} else if (`+(me===3)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, xD, xR, xC, ch),
|
|
getValue(batch, xD, xR, xC + `+f+`, ch),
|
|
getValue(batch, xD, xR, xC + 2 * `+f+`, ch),
|
|
initializationValue
|
|
);
|
|
|
|
`+Se+`
|
|
}
|
|
}
|
|
setOutput(`+we+`);
|
|
}
|
|
}
|
|
`}},gp=function(n,t){this.variableNames=["x"];var e=n.windowSize,r=n.batchSize,i=n.inSize,a=Math.ceil(i/e);this.outputShape=[r,a];var s="0.0",u="";t==="prod"?s="1.0":t==="min"?(s="1.0 / 1e-20",u="min"):t==="max"&&(s="-1.0 / 1e-20",u="max");var l=t+"("+t+"("+t+"(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])";t==="sum"?l="sumValue":t==="prod"?l="prodValue":t==="all"?l="allValue":t==="any"&&(l="anyValue");var f=4*Math.floor(e/4),A=e%4,I=`
|
|
if (`+(t==="sum")+`) {
|
|
sumValue += dot(values, ones);
|
|
} else if (`+(t==="prod")+`) {
|
|
vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);
|
|
prodValue *= tmp[0] * tmp[1];
|
|
} else {
|
|
minMaxValue = `+u+`(values, minMaxValue);
|
|
}
|
|
`,R="vec4";t==="all"?(s="1.0",I=`
|
|
bool reducedAllValue = all(values);
|
|
float floatedReducedAllValue = float(reducedAllValue);
|
|
allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);
|
|
`,R="bvec4"):t==="any"&&(s="0.0",I=`
|
|
bool reducedAnyValue = any(values);
|
|
float floatedReducedAnyValue = float(reducedAnyValue);
|
|
anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);
|
|
`,R="bvec4");var z="";i%e>0&&(z=`
|
|
if (inIdx < 0 || inIdx >= `+i+`) {
|
|
return initializationValue;
|
|
}
|
|
`),this.userCode=`
|
|
const float initializationValue = `+s+`;
|
|
const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
float getValue(int batch, int inIdx) {
|
|
`+z+`
|
|
return getX(batch, inIdx);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int outIdx = coords[1];
|
|
int inOffset = outIdx * `+e+`;
|
|
|
|
vec4 minMaxValue = vec4(`+s+`);
|
|
float prodValue = 1.0;
|
|
float sumValue = 0.0;
|
|
float allValue = 1.0;
|
|
float anyValue = 0.0;
|
|
|
|
for (int i = 0; i < `+f+`; i += 4) {
|
|
int inIdx = inOffset + i;
|
|
`+R+" values = "+R+`(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
getValue(batch, inIdx + 3)
|
|
);
|
|
|
|
`+I+`
|
|
}
|
|
|
|
int inIdx = inOffset + `+f+`;
|
|
if (`+(A===1)+`) {
|
|
`+R+" values = "+R+`(
|
|
getValue(batch, inIdx),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+I+`
|
|
} else if (`+(A===2)+`) {
|
|
`+R+" values = "+R+`(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
`+I+`
|
|
} else if (`+(A===3)+`) {
|
|
`+R+" values = "+R+`(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
initializationValue
|
|
);
|
|
|
|
`+I+`
|
|
}
|
|
setOutput(`+l+`);
|
|
}
|
|
`},yp=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n;for(var e="",r=0;r<4;r++){var i="thisRC = rc;";r%2==1&&(i+="thisRC.z += 1;"),r>1&&(i+="thisRC.y += 1;"),e+=`
|
|
`+i+`
|
|
`+(r>0?"if(thisRC.y < rows && thisRC.z < cols){":"")+`
|
|
int flatIndex = getFlatIndex(thisRC);
|
|
|
|
ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);
|
|
vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));
|
|
|
|
result[`+r+`] =
|
|
getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);
|
|
`+(r>0?"}":"")+`
|
|
`}this.userCode=`
|
|
|
|
ivec3 inputCoordsFromReshapedOutCoords(int index) {
|
|
`+la(["r","c","d"],t)+`
|
|
return ivec3(r, c, d);
|
|
}
|
|
|
|
`+Ds(n)+`
|
|
|
|
void main() {
|
|
ivec3 rc = getOutputCoords();
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
ivec3 thisRC;
|
|
int rows = `+n[1]+`;
|
|
int cols = `+n[2]+`;
|
|
|
|
`+e+`
|
|
|
|
setOutput(result);
|
|
}
|
|
`},bp=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],a=r[2],s=n.shape,u=s[1],l=s[2],f=[e&&u>1?i-1:i,e&&l>1?a-1:a],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],I=f[0]/A[0],R=f[1]/A[1],z=1/I,te=1/R,oe=2*Math.ceil(z)+2,ae=2*Math.ceil(te)+2;this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
|
|
float accumulator = 0.0;
|
|
|
|
const float heightScale = float(`+I+`);
|
|
const float widthScale = float(`+R+`);
|
|
|
|
const float invHeightScale = float(`+z+`);
|
|
const float invWidthScale = float(`+te+`);
|
|
|
|
const int winHeight = int(`+oe+`);
|
|
const int winWidth = int(`+ae+`);
|
|
|
|
// Compute bounds for where in dy we will look
|
|
float startRLerp = floor(float(r) * invHeightScale);
|
|
int startDyR = int(startRLerp - float(winHeight / 2));
|
|
|
|
float startCLerp = floor(float(c) * invWidthScale);
|
|
int startDyC = int(startCLerp - float(winWidth / 2));
|
|
|
|
// Loop over dy
|
|
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
|
|
int dyR = dyROffset + startDyR;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyR < 0 || dyR >= `+u+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
|
|
int dyC = dyCOffset + startDyC;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyC < 0 || dyC >= `+l+`) {
|
|
continue;
|
|
}
|
|
|
|
float dxR = float(dyR) * heightScale;
|
|
int topDxRIndex = int(floor(dxR));
|
|
int bottomDxRIndex = int(min(ceil(dxR), `+(i-1)+`.0));
|
|
float dxRLerp = dxR - float(topDxRIndex);
|
|
float inverseDxRLerp = 1.0 - dxRLerp;
|
|
|
|
float dxC = float(dyC) * widthScale;
|
|
int leftDxCIndex = int(floor(dxC));
|
|
int rightDxCIndex = int(min(ceil(dxC), `+(a-1)+`.0));
|
|
float dxCLerp = dxC - float(leftDxCIndex);
|
|
float inverseDxCLerp = 1.0 - dxCLerp;
|
|
|
|
if (r == topDxRIndex && c == leftDxCIndex) {
|
|
// topLeft
|
|
accumulator +=
|
|
getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;
|
|
}
|
|
|
|
if (r == topDxRIndex && c == rightDxCIndex) {
|
|
// topRight
|
|
accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;
|
|
}
|
|
|
|
if (r == bottomDxRIndex && c == leftDxCIndex) {
|
|
// bottomLeft
|
|
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;
|
|
}
|
|
|
|
if (r == bottomDxRIndex && c == rightDxCIndex) {
|
|
// bottomRight
|
|
accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;
|
|
}
|
|
}
|
|
}
|
|
// End loop over dy
|
|
|
|
setOutput(accumulator);
|
|
}
|
|
`},wp=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],f=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
|
|
const vec2 effectiveInputOverOutputRatioRC = vec2(
|
|
`+l[0]/f[0]+`,
|
|
`+l[1]/f[1]+`);
|
|
const vec2 inputShapeRC = vec2(`+a+".0, "+s+`.0);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
ivec2 yRC = coords.yz;
|
|
|
|
// Fractional source index.
|
|
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
|
|
|
|
// Compute the four integer indices.
|
|
ivec2 sourceFloorRC = ivec2(sourceFracIndexRC);
|
|
ivec2 sourceCeilRC = ivec2(
|
|
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
|
|
|
|
float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);
|
|
float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);
|
|
float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);
|
|
float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);
|
|
|
|
vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);
|
|
|
|
float top = topLeft + (topRight - topLeft) * fracRC.y;
|
|
float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;
|
|
float newValue = top + (bottom - top) * fracRC.x;
|
|
|
|
setOutput(newValue);
|
|
}
|
|
`},Ap=function(n,t,e,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],f=[r&&t>1?t-1:t,r&&e>1?e-1:e];this.userCode=`
|
|
const vec3 effectiveInputOverOutputRatioRC = vec3(
|
|
`+l[0]/f[0]+`,
|
|
`+l[1]/f[1]+`,
|
|
`+l[1]/f[1]+`);
|
|
const vec3 inputShapeRC = vec3(`+a+".0, "+s+`.0,
|
|
`+s+`.0);
|
|
|
|
float getAValue(int b, int r, int c, int d) {
|
|
return getChannel(getA(b, r, c, d), vec2(c, d));
|
|
}
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
// Calculate values for next column in yRC.z.
|
|
ivec3 yRC = coords.yzz + ivec3(0, 0, 1);
|
|
|
|
// Fractional source index.
|
|
vec3 sourceFracIndexRC = vec3(yRC) * effectiveInputOverOutputRatioRC;
|
|
|
|
// Compute the four integer indices.
|
|
ivec3 sourceFloorRC = ivec3(sourceFracIndexRC);
|
|
ivec3 sourceCeilRC = ivec3(
|
|
min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));
|
|
|
|
// Should we calculate next column and row elements in 2x2 packed cell.
|
|
bool hasNextCol = d < `+(u-1)+`;
|
|
bool hasNextRow = coords.z < `+(e-1)+`;
|
|
|
|
// In parallel, construct four corners for all four components in
|
|
// packed 2x2 cell.
|
|
vec4 topLeft = vec4(
|
|
getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);
|
|
|
|
vec4 bottomLeft = vec4(
|
|
getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);
|
|
|
|
vec4 topRight = vec4(
|
|
getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);
|
|
|
|
vec4 bottomRight = vec4(
|
|
getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),
|
|
hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)
|
|
: 0.0,
|
|
hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)
|
|
: 0.0,
|
|
(hasNextRow && hasNextCol) ?
|
|
getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);
|
|
|
|
vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);
|
|
|
|
vec4 top = mix(topLeft, topRight, fracRC.yyzz);
|
|
vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);
|
|
vec4 newValue = mix(top, bottom, fracRC.x);
|
|
|
|
setOutput(newValue);
|
|
}
|
|
`},xp=function(n,t,e){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t.shape;var r=t.shape,i=r[1],a=r[2],s=n.shape,u=s[1],l=s[2],f=[e&&u>1?i-1:i,e&&l>1?a-1:a],A=[e&&u>1?u-1:u,e&&l>1?l-1:l],I=f[0]/A[0],R=f[1]/A[1],z=1/I,te=1/R,oe=2*Math.ceil(z)+2,ae=2*Math.ceil(te)+2;this.userCode=`
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
int r = coords[1];
|
|
int c = coords[2];
|
|
|
|
float accumulator = 0.0;
|
|
|
|
const float heightScale = float(`+I+`);
|
|
const float widthScale = float(`+R+`);
|
|
|
|
const float invHeightScale = float(`+z+`);
|
|
const float invWidthScale = float(`+te+`);
|
|
|
|
const int winHeight = int(`+oe+`);
|
|
const int winWidth = int(`+ae+`);
|
|
|
|
// Compute bounds for where in dy we will look
|
|
float startRLerp = floor(float(r) * invHeightScale);
|
|
int startDyR = int(floor(startRLerp - float(winHeight / 2)));
|
|
|
|
float startCLerp = floor(float(c) * invWidthScale);
|
|
int startDyC = int(floor(startCLerp - float(winWidth / 2)));
|
|
|
|
// Loop over dy
|
|
for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {
|
|
int dyR = dyROffset + startDyR;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyR < 0 || dyR >= `+u+`) {
|
|
continue;
|
|
}
|
|
|
|
for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {
|
|
int dyC = dyCOffset + startDyC;
|
|
|
|
// Guard against the window exceeding the bounds of dy
|
|
if (dyC < 0 || dyC >= `+l+`) {
|
|
continue;
|
|
}
|
|
|
|
float sourceFracRow =
|
|
float(`+f[0]+`) *
|
|
(float(dyR) / float(`+A[0]+`));
|
|
|
|
float sourceFracCol =
|
|
float(`+f[1]+`) *
|
|
(float(dyC) / float(`+A[1]+`));
|
|
|
|
int sourceNearestRow = int(min(
|
|
float(int(`+i+`) - 1),
|
|
`+e+` ? float(round(sourceFracRow)) :
|
|
float(floor(sourceFracRow))));
|
|
|
|
int sourceNearestCol = int(min(
|
|
float(int(`+a+`) - 1),
|
|
`+e+` ? float(round(sourceFracCol)) :
|
|
float(floor(sourceFracCol))));
|
|
|
|
if (r == sourceNearestRow && c == sourceNearestCol) {
|
|
accumulator += getDy(b, dyR, dyC, d);
|
|
}
|
|
}
|
|
}
|
|
// End loop over dy
|
|
|
|
setOutput(accumulator);
|
|
}
|
|
`},Ep=function(n,t,e,r){this.variableNames=["A"],this.outputShape=[];var i=n[0],a=n[1],s=n[2],u=n[3];this.outputShape=[i,t,e,u];var l=[r&&t>1?a-1:a,r&&e>1?s-1:s],f=[r&&t>1?t-1:t,r&&e>1?e-1:e],A=r?"0.5":"0.0";this.userCode=`
|
|
const vec2 effectiveInputOverOutputRatioRC = vec2(
|
|
`+l[0]/f[0]+`,
|
|
`+l[1]/f[1]+`);
|
|
const vec2 inputShapeRC = vec2(`+a+".0, "+s+`.0);
|
|
|
|
void main() {
|
|
ivec4 coords = getOutputCoords();
|
|
int b = coords[0];
|
|
int d = coords[3];
|
|
ivec2 yRC = coords.yz;
|
|
|
|
// Fractional source index.
|
|
vec2 sourceFracIndexRC = vec2(yRC) * effectiveInputOverOutputRatioRC;
|
|
|
|
// Compute the coordinators of nearest neighbor point.
|
|
ivec2 sourceNearestRC = ivec2(
|
|
min(inputShapeRC - 1.0, floor(sourceFracIndexRC + `+A+`)));
|
|
|
|
float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);
|
|
|
|
setOutput(newValue);
|
|
}
|
|
`},Cp=function(n,t){this.variableNames=["x"];var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");if(this.outputShape=n,e!==1){var r=n.map(function(a,s){return function(u){return t.indexOf(u)!==-1&&n[u]!==1?n[u]+" - coords["+u+"] - 1":"coords["+u+"]"}(s)}).join(","),i=cr(e);this.userCode=`
|
|
void main() {
|
|
`+i+` coords = getOutputCoords();
|
|
setOutput(getX(`+r+`));
|
|
}
|
|
`}else this.userCode=`
|
|
void main() {
|
|
int coord = getOutputCoords();
|
|
setOutput(getX(`+n[0]+` - coord - 1));
|
|
}
|
|
`},Sp=function(n,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;var e=n.length;if(e>4)throw new Error("WebGL backend: Reverse of rank-"+e+" tensor is not yet supported");this.outputShape=n;var r=wn("rc",e),i=r[e-1]+" + 1 < "+this.outputShape[e-1],a=r[e-2]+" + 1 < "+this.outputShape[e-2],s=cr(e);function u(l){var f=n.map(function(A,I){return function(R,z){return t.indexOf(R)!==-1&&n[R]!==1?n[R]+" - "+z[R]+" - 1":""+z[R]}(I,l)});return"getChannel(getX("+f.join(",")+"), vec2("+f.slice(-2).join(",")+"))"}this.userCode=e===1?`
|
|
void main(){
|
|
int rc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
result.r = getChannel(getX(`+n[0]+` - rc - 1),
|
|
`+n[0]+` - rc - 1);
|
|
if(`+i+`){
|
|
result.g = getChannel(getX(`+n[0]+` - (rc + 1) - 1),
|
|
`+n[0]+` - (rc + 1) - 1);
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`:`
|
|
void main() {
|
|
`+s+` rc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
result.r = `+function(l){return u(l)}(r.slice())+`;
|
|
if(`+i+`){
|
|
result.g = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",u(l)}(r.slice())+`;
|
|
}
|
|
if(`+a+`) {
|
|
result.b = `+function(l){return l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
|
|
if(`+i+`) {
|
|
result.a = `+function(l){return l[e-1]="("+l[e-1]+" + 1)",l[e-2]="("+l[e-2]+" + 1)",u(l)}(r.slice())+`;
|
|
}
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`},sc=function(n,t,e,r,i,a,s){s===void 0&&(s=!0),this.variableNames=["updates","indices","defaultValue"],this.outputShape=a;var u=cr(i.length),l=cr(a.length),f="";e===1?f="i":e===2&&(f="i, j");var A="getIndices("+f+")",I="";r===1?I="i":r===2&&(I="i, coords[1]");var R="getUpdates("+I+")",z=t>1?"strides[j]":"strides";this.userCode=`
|
|
`+u+" strides = "+u+"("+i+`);
|
|
|
|
void main() {
|
|
`+l+` coords = getOutputCoords();
|
|
float sum = 0.0;
|
|
bool found = false;
|
|
for (int i = 0; i < `+n+`; i++) {
|
|
int flattenedIndex = 0;
|
|
for (int j = 0; j < `+t+`; j++) {
|
|
int index = round(`+A+`);
|
|
flattenedIndex += index * `+z+`;
|
|
}
|
|
if (flattenedIndex == coords[0]) {
|
|
sum += `+R+`;
|
|
found = true;
|
|
}
|
|
}
|
|
setOutput(mix(getDefaultValue(), sum, float(found)));
|
|
}
|
|
`},Ip=function(n,t){this.variableNames=["x","segmentIds"];var e=n.windowSize,r=n.batchSize,i=n.inSize,a=n.numSegments,s=a*Math.ceil(i/e);this.outputShape=[r,s];var u=4*Math.floor(e/4),l=e%4,f=`
|
|
sumValue += dot(values, segFilter);
|
|
`,A="";i%e>0&&(A=`
|
|
if (inIdx < 0 || inIdx >= `+i+`) {
|
|
return initializationValue;
|
|
}
|
|
`);var I="";i%e>0&&(I=`
|
|
if (inIdx < 0 || inIdx >= `+i+`) {
|
|
return -1.0;
|
|
}
|
|
`),this.userCode=`
|
|
const float initializationValue = 0.0;
|
|
|
|
float getValue(int batch, int inIdx) {
|
|
`+A+`
|
|
return getX(batch, inIdx);
|
|
}
|
|
|
|
float getSegmentIdAtIndex(int inIdx) {
|
|
`+I+`
|
|
return getSegmentIds(inIdx);
|
|
}
|
|
|
|
void main() {
|
|
ivec2 coords = getOutputCoords();
|
|
int batch = coords[0];
|
|
int outIdx = coords[1];
|
|
int inOffset = int(floor(float(outIdx) / float(
|
|
`+a+")) * float("+e+`));
|
|
int currentSeg = int(mod(float(outIdx), float(`+a+`)));
|
|
|
|
float sumValue = 0.0;
|
|
|
|
for (int i = 0; i < `+u+`; i += 4) {
|
|
int inIdx = inOffset + i;
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
getValue(batch, inIdx + 3)
|
|
);
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0
|
|
);
|
|
|
|
`+f+`
|
|
}
|
|
|
|
int inIdx = inOffset + `+u+`;
|
|
if (`+(l===1)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
initializationValue,
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
int inIdxSeg = int(getSegmentIdAtIndex(inIdx));
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
0,
|
|
0,
|
|
0
|
|
);
|
|
|
|
`+f+`
|
|
} else if (`+(l===2)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
initializationValue,
|
|
initializationValue
|
|
);
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
|
|
0,
|
|
0
|
|
);
|
|
|
|
`+f+`
|
|
} else if (`+(l===3)+`) {
|
|
vec4 values = vec4(
|
|
getValue(batch, inIdx),
|
|
getValue(batch, inIdx + 1),
|
|
getValue(batch, inIdx + 2),
|
|
initializationValue
|
|
);
|
|
|
|
vec4 segFilter = vec4(
|
|
int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,
|
|
int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,
|
|
0
|
|
);
|
|
|
|
`+f+`
|
|
}
|
|
setOutput(sumValue);
|
|
}
|
|
`},Tp=function(n,t,e){var r,i;if(this.variableNames=["c","a","b"],this.outputShape=t,e>4)throw Error("Where for rank "+e+" is not yet supported");if(e===1)i="resRC",r="resRC";else{for(var a=["resRC.x","resRC.y","resRC.z","resRC.w"],s=[],u=[],l=0;l<t.length;l++)u.push(""+a[l]),l<n&&s.push(""+a[l]);r=s.join(),i=u.join()}var f=cr(e);this.userCode=`
|
|
void main() {
|
|
`+f+` resRC = getOutputCoords();
|
|
float cVal = getC(`+r+`);
|
|
if (cVal >= 1.0) {
|
|
setOutput(getA(`+i+`));
|
|
} else {
|
|
setOutput(getB(`+i+`));
|
|
}
|
|
}
|
|
`},Rp=function(){function n(t){this.variableNames=["source"],this.outputShape=t,this.rank=t.length;var e,r=cr(this.rank),i="uniform int start["+this.rank+"];",a=function(s){if(s===1)return"sourceLoc";if(s<=6)return Ns.slice(0,s).map(function(u){return"sourceLoc."+u}).join(",");throw Error("Slicing for rank "+s+" is not yet supported")}(this.rank);e=`
|
|
`+r+` sourceLoc;
|
|
`+r+` coords = getOutputCoords();
|
|
`+t.map(function(s,u){return"sourceLoc."+Ns[u]+" = start["+u+"] + coords."+Ns[u]+";"}).join(`
|
|
`)+`
|
|
`,this.userCode=`
|
|
`+i+`
|
|
void main() {
|
|
`+e+`
|
|
setOutput(getSource(`+a+`));
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),Ns=["x","y","z","w","u","v"],kp=function(){function n(t){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t,this.rank=t.length;var e=cr(this.rank),r=wn("coords",this.rank),i=wn("sourceLoc",this.rank),a=this.rank===1?"sourceLoc":"vec2("+i.slice(-2).join()+")",s="getChannel(getSource("+i.join()+"), "+a+")",u=`
|
|
result.x = `+s+`;
|
|
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
|
|
++`+i[this.rank-1]+`;
|
|
result.y = `+s+`;
|
|
--`+i[this.rank-1]+`;
|
|
}
|
|
`,l=this.rank===1?"":`
|
|
--`+r[this.rank-1]+`;
|
|
if (++`+r[this.rank-2]+" < "+t[this.rank-2]+`) {
|
|
++`+i[this.rank-2]+`;
|
|
result.z = `+s+`;
|
|
if (++`+r[this.rank-1]+" < "+t[this.rank-1]+`) {
|
|
++`+i[this.rank-1]+`;
|
|
result.w = `+s+`;
|
|
}
|
|
}
|
|
`,f=this.rank<=4?`sourceLoc = coords +
|
|
`+e+"("+t.map(function(A,I){return"start["+I+"]"}).join()+");":t.map(function(A,I){return i[I]+" = "+r[I]+" + start["+I+"];"}).join(`
|
|
`);this.userCode=`
|
|
uniform int start[`+this.rank+`];
|
|
void main() {
|
|
`+e+` coords = getOutputCoords();
|
|
`+e+` sourceLoc;
|
|
`+f+`
|
|
vec4 result = vec4(0.);
|
|
`+u+`
|
|
`+l+`
|
|
setOutput(result);
|
|
}
|
|
`}return n.prototype.getCustomSetupFunc=function(t){var e=this;if(t.length!==this.rank)throw Error("The rank ("+this.rank+") of the program must match the length of start ("+t.length+")");return function(r,i){e.startLoc==null&&(e.startLoc=r.getUniformLocationNoThrow(i,"start"),e.startLoc==null)||r.gl.uniform1iv(e.startLoc,t)}},n}(),Op=function(n,t,e){this.variableNames=["x"],this.outputShape=e;var r=e.length,i=cr(e.length),a=cr(e.length),s="";if(r===1)s="coords * strides + begin";else{var u=0;s=e.map(function(l,f){return u++,e.length===1?"coords * strides["+f+"] + begin["+f+"]":"coords["+(u-1)+"] * strides["+f+"] + begin["+f+"]"}).join(",")}this.userCode=`
|
|
`+i+" begin = "+i+"("+n+`);
|
|
`+i+" strides = "+i+"("+t+`);
|
|
|
|
void main() {
|
|
`+a+` coords = getOutputCoords();
|
|
setOutput(getX(`+s+`));
|
|
}
|
|
`},Dp=function(){function n(t){this.gpgpu=t,this.numUsedTextures=0,this.numFreeTextures=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}return n.prototype.acquireTexture=function(t,e,r){var i,a=uc(e,r),s=lc(t,a,r);if(s in this.freeTextures||(this.freeTextures[s]=[]),s in this.usedTextures||(this.usedTextures[s]=[]),this.freeTextures[s].length>0){this.numFreeTextures--,this.numUsedTextures++,this.log();var u=this.freeTextures[s].shift();return this.usedTextures[s].push(u),u}return this.numUsedTextures++,this.log(),a===$t.PACKED_2X2_FLOAT32?i=this.gpgpu.createPackedMatrixTexture(t[0],t[1]):a===$t.PACKED_2X2_FLOAT16?i=this.gpgpu.createFloat16PackedMatrixTexture(t[0],t[1]):a===$t.UNPACKED_FLOAT32?i=this.gpgpu.createFloat32MatrixTexture(t[0],t[1]):a===$t.UNPACKED_FLOAT16?i=this.gpgpu.createFloat16MatrixTexture(t[0],t[1]):a===$t.PACKED_4X1_UNSIGNED_BYTE&&(i=this.gpgpu.createUnsignedBytesMatrixTexture(t[0],t[1])),this.usedTextures[s].push(i),i},n.prototype.releaseTexture=function(t,e,r,i){if(this.freeTextures!=null){var a=lc(e,uc(r,i),i);a in this.freeTextures||(this.freeTextures[a]=[]),this.freeTextures[a].push(t),this.numFreeTextures++,this.numUsedTextures--;var s=this.usedTextures[a],u=s.indexOf(t);if(u<0)throw new Error("Cannot release a texture that was never provided by this texture manager");s.splice(u,1),this.log()}},n.prototype.log=function(){if(this.logEnabled){var t=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",this.numFreeTextures+" / "+this.numUsedTextures,"("+t+")")}},n.prototype.getNumUsedTextures=function(){return this.numUsedTextures},n.prototype.getNumFreeTextures=function(){return this.numFreeTextures},n.prototype.dispose=function(){var t=this;if(this.freeTextures!=null){for(var e in this.freeTextures)this.freeTextures[e].forEach(function(r){t.gpgpu.deleteMatrixTexture(r)});for(var e in this.usedTextures)this.usedTextures[e].forEach(function(i){t.gpgpu.deleteMatrixTexture(i)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0}},n}();function uc(n,t){if(n===jr.UPLOAD)return $t.PACKED_2X2_FLOAT32;if(n===jr.RENDER||n==null)return function(e){return P().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?$t.PACKED_2X2_FLOAT32:$t.UNPACKED_FLOAT32:e?$t.PACKED_2X2_FLOAT16:$t.UNPACKED_FLOAT16}(t);if(n===jr.DOWNLOAD||n===jr.PIXELS)return $t.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+n)}function lc(n,t,e){return n[0]+"_"+n[1]+"_"+t+"_"+e}var jp=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[r]*t[r];this.outputShape=e,this.rank=e.length;var i=cr(this.rank),a=function(s){var u=s.length;if(u>5)throw Error("Tile for rank "+u+" is not yet supported");if(u===1)return"imod(resRC, "+s[0]+")";for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],f=[],A=0;A<s.length;A++)f.push("imod("+l[A]+", "+s[A]+")");return f.join()}(n);this.userCode=`
|
|
void main() {
|
|
`+i+` resRC = getOutputCoords();
|
|
setOutput(getA(`+a+`));
|
|
}
|
|
`},Pp=function(n,t){this.variableNames=["A"];for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];this.outputShape=e,this.rank=e.length;var i=cr(this.rank),a=function(s){var u=s.length;if(u>6)throw Error("Transpose for rank "+u+" is not yet supported");for(var l=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],f=new Array(u),A=0;A<s.length;A++)f[s[A]]=l[A];return f.join()}(t);this.userCode=`
|
|
void main() {
|
|
`+i+` resRC = getOutputCoords();
|
|
setOutput(getA(`+a+`));
|
|
}
|
|
`},Bp=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;for(var e=new Array(n.length),r=0;r<e.length;r++)e[r]=n[t[r]];if(this.outputShape=e,this.rank=e.length,this.rank>6)throw Error("Packed transpose for rank "+this.rank+" is not yet supported.");var i=cr(this.rank),a=Dl("rc",this.rank),s=new Array(this.rank);for(r=0;r<t.length;r++)s[t[r]]=a[r];var u="vec2("+s.slice(-2).join()+")",l="++"+a[this.rank-1]+" < "+e[this.rank-1],f="getChannel(getA("+s.join()+"), "+u+")";this.userCode=`
|
|
void main() {
|
|
`+i+` rc = getOutputCoords();
|
|
vec4 result = vec4(0.);
|
|
result[0] = `+f+`;
|
|
if(`+l+`) {
|
|
result[1] = `+f+`;
|
|
}
|
|
--`+a[this.rank-1]+`;
|
|
if(++`+a[this.rank-2]+" < "+e[this.rank-2]+`) {
|
|
result[2] = `+f+`;
|
|
if(`+l+`) {
|
|
result[3] = `+f+`;
|
|
}
|
|
}
|
|
setOutput(result);
|
|
}
|
|
`},Fs=1.7580993408473768,Ls=1.0507009873554805,Rt=function(n,t){this.variableNames=["A"],this.outputShape=n,this.userCode=`
|
|
float unaryOperation(float x) {
|
|
`+t+`
|
|
}
|
|
|
|
void main() {
|
|
float x = getAAtOutCoords();
|
|
float y = unaryOperation(x);
|
|
|
|
setOutput(y);
|
|
}
|
|
`},Gn="if (isnan(x)) return x;",_p="return x;",cc="return abs(x);",fc=Gn+`
|
|
return (x < 0.0) ? 0.0 : x;
|
|
`,dc=Gn+`
|
|
return (x < 0.0) ? 0.0 : min(6.0, x);
|
|
`,hc="return (x >= 0.0) ? x : (exp(x) - 1.0);",Mp=`
|
|
// Stable and Attracting Fixed Point (0, 1) for Normalized Weights.
|
|
// see: https://arxiv.org/abs/1706.02515
|
|
float scaleAlpha = `+Fs+`;
|
|
float scale = `+Ls+`;
|
|
return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);
|
|
`,pc="return -x;",vc="return ceil(x);",mc="return floor(x);",gc="return exp(x);",yc="return exp(x) - 1.0;",Np=Gn+`
|
|
return sin(x);
|
|
`,Fp=Gn+`
|
|
return cos(x);
|
|
`,Lp=Gn+`
|
|
if (abs(x) > 1.) {
|
|
return NAN;
|
|
}
|
|
return asin(x);
|
|
`,Up=Gn+`
|
|
if (abs(x) > 1.) {
|
|
return NAN;
|
|
}
|
|
return acos(x);
|
|
`,Wp=Gn+`
|
|
return atan(x);
|
|
`,zp=Gn+"return log(x + sqrt(x * x + 1.0));",Vp=Gn+`
|
|
if (x < 1.0) return NAN;
|
|
return log(x + sqrt(x * x - 1.0));`,Qp=Gn+`
|
|
if ((x < -1.0) || (x > 1.0)) return NAN;
|
|
return (log(1.0 + x) - log(1.0 - x)) / 2.0;`,Mo="return x;",Gp="return x;",bc=`
|
|
vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));
|
|
bvec4 isNaN = isnan(x);
|
|
|
|
result.r = isNaN.r ? x.r : result.r;
|
|
result.g = isNaN.g ? x.g : result.g;
|
|
result.b = isNaN.b ? x.b : result.b;
|
|
result.a = isNaN.a ? x.a : result.a;
|
|
|
|
return result;
|
|
`,wc=`
|
|
vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));
|
|
bvec4 isNaN = isnan(x);
|
|
|
|
result.r = isNaN.r ? x.r : result.r;
|
|
result.g = isNaN.g ? x.g : result.g;
|
|
result.b = isNaN.b ? x.b : result.b;
|
|
result.a = isNaN.a ? x.a : result.a;
|
|
|
|
return result;
|
|
`,Ac=`
|
|
vec4 result;
|
|
|
|
result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);
|
|
result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);
|
|
result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);
|
|
result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);
|
|
|
|
return result;
|
|
`,to=function(n,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.userCode=`
|
|
vec4 unaryOperation(vec4 x) {
|
|
`+t+`
|
|
}
|
|
|
|
void main() {
|
|
vec4 x = getAAtOutCoords();
|
|
vec4 y = unaryOperation(x);
|
|
|
|
setOutput(y);
|
|
}
|
|
`},Hp=function(n){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=n;var t=n.length,e=wn("rc",t),r=cr(t),i=function(u,l){if(u===1)return"rc";for(var f="",A=0;A<u;A++)f+=l[A],A<u-1&&(f+=",");return f}(t,e),a=e.slice(-2),s=t<=1?"rc":"vec2("+a.join(",")+")";this.userCode=`
|
|
void main() {
|
|
`+r+` rc = getOutputCoords();
|
|
vec4 packedInput = getA(`+i+`);
|
|
|
|
setOutput(getChannel(packedInput, `+s+`));
|
|
}
|
|
`},No={};function Fo(n,t){if(t===void 0&&(t=!1),n==="linear")return t?Gp:_p;if(n==="relu")return t?bc:fc;if(n==="elu")return t?Ac:hc;if(n==="relu6")return t?wc:dc;if(n==="prelu")return t?Nl:Ml;throw new Error("Activation "+n+" has not been implemented for the WebGL backend.")}var Xp=600,xc=function(n){function t(e){var r,i=n.call(this)||this;if(i.pendingRead=new WeakMap,i.pendingDisposal=new WeakSet,i.dataRefCount=new WeakMap,i.numBytesInGPU=0,i.uploadWaitMs=0,i.downloadWaitMs=0,i.warnedAboutMemory=!1,i.pendingDeletes=0,i.disposed=!1,!P().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");if(e==null){var a=mn(P().getNumber("WEBGL_VERSION"));i.binaryCache=((r=P().getNumber("WEBGL_VERSION"))in No||(No[r]={}),No[r]),i.gpgpu=new ac(a),i.canvas=a.canvas,i.gpgpuCreatedLocally=!0}else i.gpgpu=e,i.binaryCache={},i.gpgpuCreatedLocally=!1,i.canvas=e.gl.canvas;return i.textureManager=new Dp(i.gpgpu),i.numMBBeforeWarning=P().global.screen==null?1024:P().global.screen.height*P().global.screen.width*window.devicePixelRatio*Xp/1024/1024,i.texData=new El(i,ze),i}return S(t,n),t.prototype.numDataIds=function(){return this.texData.numDataIds()+(this.cpuBackend?this.cpuBackend.numDataIds():0)-this.pendingDeletes},t.prototype.write=function(e,r,i){if(P().getBool("DEBUG")&&this.checkNumericalProblems(e),i==="complex64"&&e!=null)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");var a={};return this.texData.set(a,{shape:r,dtype:i,values:e,usage:jr.UPLOAD}),a},t.prototype.move=function(e,r,i,a){if(P().getBool("DEBUG")&&this.checkNumericalProblems(r),a==="complex64")throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:i,dtype:a,values:r,usage:jr.UPLOAD})},t.prototype.readSync=function(e){var r=this.texData.get(e),i=r.values,a=r.dtype,s=r.complexTensors,u=r.slice,l=r.shape,f=r.isPacked;if(u!=null){var A=void 0;A=f?new to(l,Mo):new Rt(l,Mo);var I=this.runWebGLProgram(A,[{dataId:e,shape:l,dtype:a}],a),R=this.readSync(I.dataId);return this.disposeData(I.dataId),R}if(i!=null)return this.convertAndCacheOnCPU(e);if(a==="string")return i;var z,te,oe=this.activeTimers!=null;return oe&&(z=Je()),a==="complex64"?te=Ts(s.real.dataSync(),s.imag.dataSync()):te=this.getValuesFromTexture(e),oe&&(this.downloadWaitMs+=Je()-z),this.convertAndCacheOnCPU(e,te)},t.prototype.read=function(e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,f,A,I,R,z,te,oe,ae,se,we,xe,me,Se,Re,Me,Fe;return x(this,function(je){switch(je.label){case 0:if(this.pendingRead.has(e))return r=this.pendingRead.get(e),[2,new Promise(function(Be){return r.push(Be)})];if(i=this.texData.get(e),a=i.values,s=i.shape,u=i.slice,l=i.dtype,f=i.complexTensors,A=i.isPacked,u!=null)return I=void 0,I=A?new to(s,Mo):new Rt(s,Mo),R=this.runWebGLProgram(I,[{dataId:e,shape:s,dtype:l}],l),z=this.read(R.dataId),this.disposeData(R.dataId),[2,z];if(a!=null)return[2,this.convertAndCacheOnCPU(e)];if(!P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&P().getNumber("WEBGL_VERSION")===2)throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");return te=null,l!=="complex64"&&P().get("WEBGL_BUFFER_SUPPORTED")&&(oe=this.decode(e),ae=this.texData.get(oe.dataId),te=(Fe=this.gpgpu).createBufferFromTexture.apply(Fe,[ae.texture].concat($r(s)))),this.pendingRead.set(e,[]),l==="complex64"?[3,2]:[4,this.gpgpu.createAndWaitForFence()];case 1:je.sent(),je.label=2;case 2:return l!=="complex64"?[3,4]:[4,Promise.all([f.real.data(),f.imag.data()])];case 3:return we=je.sent(),xe=we[0],me=we[1],se=Ts(xe,me),[3,5];case 4:te==null?se=this.getValuesFromTexture(e):(Se=le(s),se=this.gpgpu.downloadFloat32MatrixFromBuffer(te,Se)),je.label=5;case 5:return oe!=null&&this.disposeData(oe.dataId),Re=this.convertAndCacheOnCPU(e,se),Me=this.pendingRead.get(e),this.pendingRead.delete(e),Me.forEach(function(Be){return Be(Re)}),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e),this.pendingDeletes--),[2,Re]}})})},t.prototype.checkNumericalProblems=function(e){if(e!=null)for(var r=0;r<e.length;r++){var i=e[r];if(!Fn(i))throw P().getBool("WEBGL_RENDER_FLOAT32_CAPABLE")?Error("The value "+i+" cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'"):Error("The value "+i+" cannot be represented on this device.")}},t.prototype.getValuesFromTexture=function(e){var r,i=this.texData.get(e),a=i.shape,s=i.dtype,u=i.isPacked,l=le(a);if(P().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){var f=this.decode(e),A=this.texData.get(f.dataId),I=(r=this.gpgpu).downloadMatrixFromPackedTexture.apply(r,[A.texture].concat($r(a))).subarray(0,l);return this.disposeData(f.dataId),I}var R=P().getBool("WEBGL_PACK")&&u===!0,z=R?gi(a):a,te=R?new Yh(z):new Jh(z),oe=this.runWebGLProgram(te,[{shape:z,dtype:s,dataId:e}],"float32"),ae=this.texData.get(oe.dataId),se=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(ae.texture,ae.texShape[0],ae.texShape[1]).subarray(0,l);return this.disposeData(oe.dataId),se},t.prototype.time=function(e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,f;return x(this,function(A){switch(A.label){case 0:return r=this.activeTimers,i=[],a=!1,this.programTimersStack==null?(this.programTimersStack=i,a=!0):this.activeTimers.push(i),this.activeTimers=i,e(),s=be(this.activeTimers.map(function(I){return I.query})).filter(function(I){return I!=null}),u=be(this.activeTimers.map(function(I){return I.name})).filter(function(I){return I!=null}),this.activeTimers=r,a&&(this.programTimersStack=null),l={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null},P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[4,Promise.all(s)]:[3,2];case 1:return f=A.sent(),l.kernelMs=Ae(f),l.getExtraProfileInfo=function(){return f.map(function(I,R){return{name:u[R],ms:I}}).map(function(I){return I.name+": "+I.ms}).join(", ")},[3,3];case 2:l.kernelMs={error:"WebGL query timers are not supported in this environment."},A.label=3;case 3:return this.uploadWaitMs=0,this.downloadWaitMs=0,[2,l]}})})},t.prototype.memory=function(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU}},t.prototype.startTimer=function(){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:Je(),endMs:null}},t.prototype.endTimer=function(e){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=Je(),e)},t.prototype.getQueryTime=function(e){return C(this,void 0,void 0,function(){var r;return x(this,function(i){return P().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?[2,this.gpgpu.waitForQueryAndGetTime(e)]:[2,(r=e).endMs-r.startMs]})})},t.prototype.disposeData=function(e){if(!this.pendingDisposal.has(e)){if(this.pendingRead.has(e))return this.pendingDisposal.add(e),void this.pendingDeletes++;if(this.texData.has(e)){this.releaseGPUData(e);var r=this.texData.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.texData.delete(e)}}},t.prototype.releaseGPUData=function(e){var r=this.texData.get(e),i=r.texture,a=r.dtype,s=r.texShape,u=r.usage,l=r.isPacked,f=r.slice,A=f&&f.origDataId||e,I=this.dataRefCount.get(A);I>1?this.dataRefCount.set(A,I-1):(this.dataRefCount.delete(A),i!=null&&(this.numBytesInGPU-=this.computeBytes(s,a),this.textureManager.releaseTexture(i,s,u,l)));var R=this.texData.get(e);R.texture=null,R.texShape=null,R.isPacked=!1,R.slice=null},t.prototype.getTexture=function(e){return this.uploadToGPU(e),this.texData.get(e).texture},t.prototype.getDataInfo=function(e){return this.texData.get(e)},t.prototype.getCPUBackend=function(){return P().getBool("WEBGL_CPU_FORWARD")?(this.cpuBackend==null&&(this.cpuBackend=ze.findBackend("cpu")),this.cpuBackend):null},t.prototype.shouldExecuteOnCPU=function(e,r){var i=this;return r===void 0&&(r=128),this.getCPUBackend()!=null&&e.every(function(a){return i.texData.get(a.dataId).texture==null&&a.size<r})},t.prototype.getGPGPUContext=function(){return this.gpgpu},t.prototype.complex=function(e,r){var i=this.makeOutput(e.shape,"complex64");return this.texData.get(i.dataId).complexTensors={real:ze.keep(e.clone()),imag:ze.keep(r.clone())},i},t.prototype.real=function(e){return this.texData.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.texData.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.slice(e,r,i);if(le(i)===0)return Cr([],i,e.dtype);var a=this.texData.get(e.dataId).isPacked,s=As(e.shape,r,i);if(a||!s){var u=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new kp(i):new Rp(i),l=u.getCustomSetupFunc(r);return this.compileAndRun(u,[e],null,l)}return this.uploadToGPU(e.dataId),this.shallowSlice(e,r,i)},t.prototype.shallowSlice=function(e,r,i){var a=this.texData.get(e.dataId),s=this.makeOutput(i,e.dtype),u=this.texData.get(s.dataId);Object.assign(u,a),u.shape=i,u.dtype=e.dtype;var l=xs(r,e.strides);a.slice&&(l+=a.slice.flatOffset),u.slice={flatOffset:l,origDataId:a.slice&&a.slice.origDataId||e.dataId};var f=this.dataRefCount.get(u.slice.origDataId)||1;return this.dataRefCount.set(u.slice.origDataId,f+1),s},t.prototype.stridedSlice=function(e,r,i,a){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.stridedSlice(e,r,i,a);var s=ko(r,i,a);if(s.some(function(l){return l===0}))return Cr([],s);var u=new Op(r,a,s);return this.compileAndRun(u,[e])},t.prototype.reverse=function(e,r){var i=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Sp(e.shape,r):new Cp(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.concat=function(e,r){if(e[0].dtype==="complex64"){var i=e.map(function(z){return tn(z)}),a=e.map(function(z){return Cn(z)});return Er(this.concat(i,r),this.concat(a,r))}if(this.shouldExecuteOnCPU(e))return this.cpuBackend.concat(e,r);if(e.length===1)return e[0];if(e.length>P().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){var s=Math.floor(e.length/2),u=this.concat(e.slice(0,s),r),l=this.concat(e.slice(s),r);return this.concat([u,l],r)}if(P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&e[0].rank>1){var f=new Mh(e.map(function(z){return z.shape}),r);return this.compileAndRun(f,e)}var A=or(e.map(function(z){return z.shape}),r),I=e.map(function(z){return z.as2D(-1,le(z.shape.slice(r)))}),R=new _h(I.map(function(z){return z.shape}));return this.compileAndRun(R,I).reshape(A)},t.prototype.neg=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.neg(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,pc,e.dtype);var r=new Rt(e.shape,pc);return this.compileAndRun(r,[e])},t.prototype.batchMatMul=function(e,r,i,a){var s=i?e.shape[2]:e.shape[1],u=a?r.shape[1]:r.shape[2],l=i?e.shape[1]:e.shape[2],f=e.shape[0];if((s===1||u===1)&&l>1e3){i&&(e=e.transpose([0,2,1])),a&&(r=r.transpose([0,2,1]));var A=u===1?e:e.as3D(f,l,1),I=u===1?2:1,R=u===1?r.as3D(f,1,l):r;return this.multiply(A,R).sum(I,!0)}var z=tr(e.dtype,r.dtype),te=new Bs(e.shape,[f,s,u],i,a);return this.compileAndRun(te,[e,r],z)},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,a=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,f=e.preluActivationWeights,A=a?r.shape[2]:r.shape[1],I=s?i.shape[1]:i.shape[2],R=r.shape[0],z=tr(r.dtype,i.dtype),te=u!=null,oe=f!=null,ae=l?Fo(l,!0):null,se=new Bs(r.shape,[R,A,I],a,s,te,ae,oe),we=[r,i];return u&&we.push(u),f&&we.push(f),this.compileAndRun(se,we,z)},t.prototype.multiply=function(e,r){if(e.dtype==="complex64"){var i=this.texData.get(e.dataId),a=this.texData.get(r.dataId),s=new Bl(Oh,e.shape,r.shape),u=new Bl(Dh,e.shape,r.shape),l=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag),this.makeComplexComponentTensorInfo(r,a.complexTensors.real),this.makeComplexComponentTensorInfo(r,a.complexTensors.imag)],f=this.compileAndRun(s,l),A=this.compileAndRun(u,l),I=this.complex(f,A);return f.dispose(),A.dispose(),I}if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.multiply(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,_l,e.dtype);var R=new Sr(_l,e.shape,r.shape);return this.compileAndRun(R,[e,r],e.dtype)},t.prototype.batchNormalization=function(e,r,i,a,s,u){var l=[e,r,i],f=null;u!=null&&(f=u.shape,l.push(u));var A=null;if(s!=null&&(A=s.shape,l.push(s)),P().getBool("WEBGL_PACK_NORMALIZATION")){var I=new kh(e.shape,r.shape,i.shape,f,A,a);return this.compileAndRun(I,l)}var R=new Rh(e.shape,r.shape,i.shape,f,A,a);return this.compileAndRun(R,l)},t.prototype.localResponseNormalization4D=function(e,r,i,a,s){var u=P().getBool("WEBGL_PACK_NORMALIZATION")?new lp(e.shape,r,i,a,s):new sp(e.shape,r,i,a,s);return this.compileAndRun(u,[e])},t.prototype.LRNGrad=function(e,r,i,a,s,u,l){var f=new up(r.shape,a,s,u,l);return this.compileAndRun(f,[r,i,e])},t.prototype.tile=function(e,r){if(e.dtype==="string"){var i=this.readSync(e.dataId).map(function(s){return ht(s)});return kl(It(e.shape,e.dtype,i),r)}var a=new jp(e.shape,r);return this.compileAndRun(a,[e])},t.prototype.pad=function(e,r,i){var a=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new mp(e.shape,r,i):new vp(e.shape,r,i);return this.compileAndRun(a,[e])},t.prototype.transpose=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.transpose(e,r);var i=P().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Bp(e.shape,r):new Pp(e.shape,r);return this.compileAndRun(i,[e])},t.prototype.gather=function(e,r,i){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.gather(e,r,i);var a=new np(e.shape,r.size,i);return this.compileAndRun(a,[e,r])},t.prototype.batchToSpaceND=function(e,r,i){Y(e.rank<=4,function(){return"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"});var a=r.reduce(function(I,R){return I*R}),s=So(e.shape,r,a),u=Io(s.length,r.length),l=To(e.shape,r,a),f=ml(i,r.length),A=gl(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(f,A)},t.prototype.spaceToBatchND=function(e,r,i){Y(e.rank<=4,function(){return"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"});var a=r.reduce(function(R,z){return R*z}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),f=So(l.shape,r,a,!1),A=Io(f.length,r.length,!1),I=To(l.shape,r,a,!1);return l.reshape(f).transpose(A).reshape(I)},t.prototype.reduce=function(e,r,i){var a=e.shape[0],s=e.shape[1],u=Ro(s),l=new gp({windowSize:u,inSize:s,batchSize:a},r),f=this.compileAndRun(l,[e],i);return f.shape[1]===1?f:this.reduce(f,r,i)},t.prototype.argReduce=function(e,r,i){i===void 0&&(i=null);var a=e.shape[0],s=e.shape[1];i!=null&&(a=i.shape[0],s=i.shape[1]);var u=Ro(s),l=new bh({windowSize:u,inSize:s,batchSize:a},r,i==null),f=[e];i!=null&&f.push(i);var A=this.compileAndRun(l,f,"int32");return A.shape[1]===1?A:this.argReduce(e,r,A)},t.prototype.argReducePacked=function(e,r,i){i===void 0&&(i=null);var a=i!=null?i.shape:e.shape,s=Ro(a[a.length-1]),u=new Sh(a,s,r,i==null),l=i==null?[e]:[e,i],f=this.compileAndRun(u,l,"int32");return f.rank===e.rank?this.argReducePacked(e,r,f):f},t.prototype.sum=function(e,r){Vr("sum",r,e.rank);var i=xr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s),l=Jr(e.dtype);return this.reduce(u,"sum",l).reshape(a)},t.prototype.prod=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.prod(e,r);var i=xr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s),l=Jr(e.dtype);return this.reduce(u,"prod",l).reshape(a)},t.prototype.unsortedSegmentSum=function(e,r,i){var a=0,s=hn([a],e.rank),u=e;s!=null&&(u=e.transpose(s),a=bt(1,e.rank)[0]);var l=function(z,te,oe){for(var ae=[],se=z.length,we=0;we<se;we++)we!==te?ae.push(z[we]):ae.push(oe);return ae}(u.shape,a,i),f=le([u.shape[a]]),A=u.as2D(-1,f),I=Jr(e.dtype),R=this.segOpCompute(A,"unsortedSegmentSum",r,I,i).reshape(l);return s!=null&&(R=R.transpose(gt(s))),R},t.prototype.segOpCompute=function(e,r,i,a,s){var u=e.shape[0],l=e.shape[1],f=function(R,z){var te,oe=!1;for(R<=bs?(te=R,oe=!0):te=Pe(R,Math.floor(Math.sqrt(R)));!oe;)te>z||te===R?oe=!0:te=Pe(R,te+1);return te}(l,s),A=new Ip({windowSize:f,inSize:l,batchSize:u,numSegments:s},r),I=this.compileAndRun(A,[e,i],a);return I.shape[1]===s?I:(i=Eo(0,s).tile([l/f]),this.segOpCompute(I,r,i,a,s))},t.prototype.argMinMaxReduce=function(e,r,i){var a=[r];if(Vr("arg"+i.charAt(0).toUpperCase()+i.slice(1),a,e.rank),!P().getBool("WEBGL_PACK_REDUCE")||e.rank<=2){var s=xr(e.shape,a),u=s[0],l=le(s[1]),f=e.as2D(-1,l);return this.argReduce(f,i).reshape(u)}return this.argReducePacked(e,i)},t.prototype.argMin=function(e,r){return this.argMinMaxReduce(e,r,"min")},t.prototype.argMax=function(e,r){return this.argMinMaxReduce(e,r,"max")},t.prototype.cumsum=function(e,r,i,a){if(r!==e.rank-1)throw new Error("WebGL cumsum shader expects an inner-most axis="+(e.rank-1)+" but got axis="+r);var s=new Gh(e.shape,i,a);return this.compileAndRun(s,[e])},t.prototype.equal=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(equal(a, b));
|
|
`,"bool");var i=new Sr("return float(a == b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.notEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(notEqual(a, b));
|
|
`,"bool");var i=new Sr("return float(a != b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.less=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.less(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(lessThan(a, b));
|
|
`,"bool");var i=new Sr("return float(a < b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.lessEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(lessThanEqual(a, b));
|
|
`,"bool");var i=new Sr("return float(a <= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greater=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.greater(e,r);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(greaterThan(a, b));
|
|
`,"bool");var i=new Sr("return float(a > b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.greaterEqual=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(greaterThanEqual(a, b));
|
|
`,"bool");var i=new Sr("return float(a >= b);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalNot=function(e){var r=new Rt(e.shape,"return float(!(x >= 1.0));");return this.compileAndRun(r,[e])},t.prototype.logicalAnd=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return vec4(
|
|
vec4(greaterThanEqual(a, vec4(1.0))) *
|
|
vec4(greaterThanEqual(b, vec4(1.0))));
|
|
`,"bool");var i=new Sr("return float(a >= 1.0 && b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.logicalOr=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
return min(
|
|
vec4(greaterThanEqual(a, vec4(1.0))) +
|
|
vec4(greaterThanEqual(b, vec4(1.0))),
|
|
vec4(1.0));
|
|
`,"bool");var i=new Sr("return float(a >= 1.0 || b >= 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r],"bool")},t.prototype.select=function(e,r,i){var a=new Tp(e.rank,r.shape,r.rank);return this.compileAndRun(a,[e,r,i],tr(r.dtype,i.dtype))},t.prototype.where=function(e){Fi("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var r=e.dataSync();return Os(e.shape,r)},t.prototype.topk=function(e,r,i){return Ol(e.dataSync(),e.shape,e.dtype,r)},t.prototype.min=function(e,r){Vr("min",r,e.rank);var i=xr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"min",u.dtype).reshape(a)},t.prototype.minimum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.minimum(e,r);var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci(`
|
|
vec4 result = vec4(min(a, b));
|
|
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new Sr(`
|
|
if (isnan(a)) return a;
|
|
if (isnan(b)) return b;
|
|
|
|
return min(a, b);
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.mod=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci(`
|
|
vec4 result = mod(a, b);
|
|
vec4 isNaN = vec4(equal(b, vec4(0.0)));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new Sr(`if (b == 0.0) return NAN;
|
|
return mod(a, b);`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.max=function(e,r){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.max(e,r);Vr("max",r,e.rank);var i=xr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"max",u.dtype).reshape(a)},t.prototype.maximum=function(e,r){if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.maximum(e,r);var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci(`
|
|
vec4 result = vec4(max(a, b));
|
|
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new Sr(`
|
|
if (isnan(a)) return a;
|
|
if (isnan(b)) return b;
|
|
|
|
return max(a, b);
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.all=function(e,r){Vr("all",r,e.rank);var i=xr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"all",u.dtype).reshape(a)},t.prototype.any=function(e,r){Vr("any",r,e.rank);var i=xr(e.shape,r),a=i[0],s=le(i[1]),u=e.as2D(-1,s);return this.reduce(u,"any",u.dtype).reshape(a)},t.prototype.realDivide=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
// vec4 one = vec4(equal(a, b));
|
|
// return one + (vec4(1.0) - one) * a / b;
|
|
vec4 result = a / b;
|
|
if(a.x == b.x) {
|
|
result.x = 1.;
|
|
}
|
|
if(a.y == b.y) {
|
|
result.y = 1.;
|
|
}
|
|
if(a.z == b.z) {
|
|
result.z = 1.;
|
|
}
|
|
if(a.w == b.w) {
|
|
result.w = 1.;
|
|
}
|
|
|
|
return result;
|
|
`,"float32",!0);var i=new Sr(`
|
|
if (a == b) {
|
|
return 1.0;
|
|
};
|
|
return a / b;`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"float32")},t.prototype.floorDiv=function(e,r){if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,`
|
|
ivec4 ia = round(a);
|
|
ivec4 ib = round(b);
|
|
bvec4 cond = notEqual(ib, ivec4(0));
|
|
ivec4 result = ivec4(0);
|
|
vec4 s = sign(a) * sign(b);
|
|
|
|
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
|
|
if (cond[0]) {
|
|
result[0] = idiv(ia[0], ib[0], s[0]);
|
|
}
|
|
if (cond[1]) {
|
|
result[1] = idiv(ia[1], ib[1], s[1]);
|
|
}
|
|
if (cond[2]) {
|
|
result[2] = idiv(ia[2], ib[2], s[2]);
|
|
}
|
|
if (cond[3]) {
|
|
result[3] = idiv(ia[3], ib[3], s[3]);
|
|
}
|
|
return vec4(result);
|
|
`,"int32");var i=new Sr(`
|
|
float s = sign(a) * sign(b);
|
|
int ia = round(a);
|
|
int ib = round(b);
|
|
if (ib != 0) {
|
|
// Windows (D3D) wants guaranteed non-zero int division at compile-time.
|
|
return float(idiv(ia, ib, s));
|
|
} else {
|
|
return NAN;
|
|
}
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r],"int32")},t.prototype.add=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,js);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.add(e,r);var i=tr(e.dtype,r.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,js,i);var a=new Sr(js,e.shape,r.shape);return this.compileAndRun(a,[e,r],i)},t.prototype.packedUnaryOp=function(e,r,i){var a=new to(e.shape,r);return this.compileAndRun(a,[e],i)},t.prototype.packedBinaryOp=function(e,r,i,a,s){s===void 0&&(s=!1);var u=new Ci(i,e.shape,r.shape,s);return this.compileAndRun(u,[e,r],a)},t.prototype.complexSeparableBinaryOp=function(e,r,i){var a=this,s=this.texData.get(e.dataId),u=this.texData.get(r.dataId),l=[[s.complexTensors.real,u.complexTensors.real],[s.complexTensors.imag,u.complexTensors.imag]].map(function(R){var z=R[0],te=R[1],oe=a.makeComplexComponentTensorInfo(e,z),ae=a.makeComplexComponentTensorInfo(r,te),se=new Sr(i,e.shape,r.shape);return a.compileAndRun(se,[oe,ae],tr(z.dtype,te.dtype))}),f=l[0],A=l[1],I=this.complex(f,A);return f.dispose(),A.dispose(),I},t.prototype.makeComplexComponentTensorInfo=function(e,r){return{dataId:r.dataId,dtype:r.dtype,shape:e.shape}},t.prototype.addN=function(e){if(e.length===1)return e[0];if(e.length>P().get("WEBGL_MAX_TEXTURES_IN_SHADER")){var r=Math.floor(e.length/2),i=this.addN(e.slice(0,r)),a=this.addN(e.slice(r));return this.addN([i,a])}var s=e.map(function(f){return f.dtype}).reduce(function(f,A){return tr(f,A)}),u=e.map(function(f){return f.shape}),l=P().getBool("WEBGL_PACK")?new yh(e[0].shape,u):new gh(e[0].shape,u);return this.compileAndRun(l,e,s)},t.prototype.subtract=function(e,r){if(e.dtype==="complex64"&&r.dtype==="complex64")return this.complexSeparableBinaryOp(e,r,Ps);if(this.shouldExecuteOnCPU([e,r]))return this.cpuBackend.subtract(e,r);var i=tr(e.dtype,r.dtype);if(P().getBool("WEBGL_PACK_BINARY_OPERATIONS"))return this.packedBinaryOp(e,r,Ps,e.dtype);var a=new Sr(Ps,e.shape,r.shape);return this.compileAndRun(a,[e,r],i)},t.prototype.pow=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci(`
|
|
// isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.
|
|
vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));
|
|
vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);
|
|
vec4 result = multiplier * pow(abs(a), b);
|
|
|
|
// Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS
|
|
bvec4 isExpZero = equal(b, vec4(0.0));
|
|
result.r = isExpZero.r ? 1.0 : result.r;
|
|
result.g = isExpZero.g ? 1.0 : result.g;
|
|
result.b = isExpZero.b ? 1.0 : result.b;
|
|
result.a = isExpZero.a ? 1.0 : result.a;
|
|
|
|
vec4 isNaN = vec4(lessThan(a, vec4(0.0))) * vec4(lessThan(floor(b), b));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new Sr(`
|
|
if(a < 0.0 && floor(b) < b){
|
|
return NAN;
|
|
}
|
|
if (b == 0.0) {
|
|
return 1.0;
|
|
}
|
|
return (round(mod(b, 2.0)) != 1) ?
|
|
pow(abs(a), b) : sign(a) * pow(abs(a), b);
|
|
`,e.shape,r.shape),a=tr(e.dtype,r.dtype);return this.compileAndRun(i,[e,r],a)},t.prototype.ceil=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.ceil(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,vc,e.dtype);var r=new Rt(e.shape,vc);return this.compileAndRun(r,[e])},t.prototype.floor=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.floor(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,mc,e.dtype);var r=new Rt(e.shape,mc);return this.compileAndRun(r,[e])},t.prototype.sign=function(e){var r=new Rt(e.shape,`
|
|
if (isnan(x)) { return 0.0; }
|
|
return sign(x);
|
|
`);return this.compileAndRun(r,[e])},t.prototype.isNaN=function(e){var r=new Rt(e.shape,"return float(isnan(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isInf=function(e){var r=new Rt(e.shape,"return float(isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.isFinite=function(e){var r=new Rt(e.shape,"return float(!isnan(x) && !isinf(x));");return this.compileAndRun(r,[e],"bool")},t.prototype.round=function(e){var r=new Rt(e.shape,`
|
|
// OpenGL ES does not support round function.
|
|
// The algorithm is based on banker's rounding.
|
|
float base = floor(x);
|
|
if ((x - base) < 0.5) {
|
|
return floor(x);
|
|
} else if ((x - base) > 0.5) {
|
|
return ceil(x);
|
|
} else {
|
|
if (mod(base, 2.0) == 0.0) {
|
|
return base;
|
|
} else {
|
|
return base + 1.0;
|
|
}
|
|
}
|
|
`);return this.compileAndRun(r,[e])},t.prototype.exp=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.exp(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,gc,e.dtype);var r=new Rt(e.shape,gc);return this.compileAndRun(r,[e])},t.prototype.expm1=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.expm1(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,yc,e.dtype);var r=new Rt(e.shape,yc);return this.compileAndRun(r,[e])},t.prototype.softmax=function(e,r){var i=ye([r],e.shape),a=this.max(e,i),s=_r(a.shape,i),u=this.subtract(e,a.reshape(s)),l=this.exp(u),f=this.sum(l,i).reshape(s);return this.realDivide(l,f)},t.prototype.log=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.log(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,`
|
|
vec4 result = log(x);
|
|
vec4 isNaN = vec4(lessThan(x, vec4(0.0)));
|
|
result.r = isNaN.r == 1.0 ? NAN : result.r;
|
|
result.g = isNaN.g == 1.0 ? NAN : result.g;
|
|
result.b = isNaN.b == 1.0 ? NAN : result.b;
|
|
result.a = isNaN.a == 1.0 ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.dtype);var r=new Rt(e.shape,`if (x < 0.0) return NAN;
|
|
return log(x);`);return this.compileAndRun(r,[e])},t.prototype.log1p=function(e){var r=new Rt(e.shape,"return log(1.0 + x);");return this.compileAndRun(r,[e])},t.prototype.sqrt=function(e){var r=new Rt(e.shape,"return sqrt(x);");return this.compileAndRun(r,[e])},t.prototype.rsqrt=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.rsqrt(e);var r=new Rt(e.shape,"return inversesqrt(x);");return this.compileAndRun(r,[e])},t.prototype.reciprocal=function(e){var r=new Rt(e.shape,"return 1.0 / x;");return this.compileAndRun(r,[e])},t.prototype.relu=function(e){var r;return r=P().getBool("WEBGL_PACK")?new to(e.shape,bc):new Rt(e.shape,fc),this.compileAndRun(r,[e])},t.prototype.relu6=function(e){var r;return r=P().getBool("WEBGL_PACK")?new to(e.shape,wc):new Rt(e.shape,dc),this.compileAndRun(r,[e])},t.prototype.prelu=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci(Nl,e.shape,r.shape):new Sr(Ml,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.elu=function(e){if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,Ac,e.dtype);var r=new Rt(e.shape,hc);return this.compileAndRun(r,[e])},t.prototype.eluDer=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci(`
|
|
vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));
|
|
return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));
|
|
`,e.shape,r.shape):new Sr("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.selu=function(e){var r=new Rt(e.shape,Mp);return this.compileAndRun(r,[e])},t.prototype.int=function(e){var r=new Rt(e.shape,"return float(int(x));");return this.compileAndRun(r,[e],"int32")},t.prototype.clip=function(e,r,i){var a,s=(a=P().getBool("WEBGL_PACK_CLIP")?new Ph(e.shape):new jh(e.shape)).getCustomSetupFunc(r,i);return this.compileAndRun(a,[e],null,s)},t.prototype.abs=function(e){if(this.shouldExecuteOnCPU([e]))return this.cpuBackend.abs(e);if(P().getBool("WEBGL_PACK_UNARY_OPERATIONS"))return this.packedUnaryOp(e,cc,e.dtype);var r=new Rt(e.shape,cc);return this.compileAndRun(r,[e])},t.prototype.complexAbs=function(e){var r=this.texData.get(e.dataId),i=new Bh(e.shape),a=[this.makeComplexComponentTensorInfo(e,r.complexTensors.real),this.makeComplexComponentTensorInfo(e,r.complexTensors.imag)];return this.compileAndRun(i,a)},t.prototype.sigmoid=function(e){var r=new Rt(e.shape,"return 1.0 / (1.0 + exp(-1.0 * x));");return this.compileAndRun(r,[e])},t.prototype.softplus=function(e){var r=new Rt(e.shape,`
|
|
float epsilon = 1.1920928955078125e-7;
|
|
float threshold = log(epsilon) + 2.0;
|
|
|
|
bool too_large = x > -threshold;
|
|
bool too_small = x < threshold;
|
|
|
|
float result;
|
|
float exp_x = exp(x);
|
|
|
|
if (too_large){
|
|
result = x;
|
|
}
|
|
else if (too_small){
|
|
result = exp_x;
|
|
}
|
|
else{
|
|
result = log(exp_x + 1.0);
|
|
}
|
|
return result;
|
|
`);return this.compileAndRun(r,[e])},t.prototype.sin=function(e){var r=new Rt(e.shape,Np);return this.compileAndRun(r,[e])},t.prototype.cos=function(e){var r=new Rt(e.shape,Fp);return this.compileAndRun(r,[e])},t.prototype.tan=function(e){var r=new Rt(e.shape,"return tan(x);");return this.compileAndRun(r,[e])},t.prototype.asin=function(e){var r=new Rt(e.shape,Lp);return this.compileAndRun(r,[e])},t.prototype.acos=function(e){var r=new Rt(e.shape,Up);return this.compileAndRun(r,[e])},t.prototype.atan=function(e){var r=new Rt(e.shape,Wp);return this.compileAndRun(r,[e])},t.prototype.atan2=function(e,r){var i=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci(`
|
|
vec4 result = atan(a, b);
|
|
vec4 isNaN = min(vec4(isnan(a)) + vec4(isnan(b)), vec4(1.0));
|
|
|
|
result.r = isNaN.r > 0. ? NAN : result.r;
|
|
result.g = isNaN.g > 0. ? NAN : result.g;
|
|
result.b = isNaN.b > 0. ? NAN : result.b;
|
|
result.a = isNaN.a > 0. ? NAN : result.a;
|
|
|
|
return result;
|
|
`,e.shape,r.shape):new Sr(`
|
|
if (isnan(a)) return a;
|
|
if (isnan(b)) return b;
|
|
|
|
return atan(a, b);
|
|
`,e.shape,r.shape);return this.compileAndRun(i,[e,r])},t.prototype.sinh=function(e){var r=new Rt(e.shape,`
|
|
float e2x = exp(x);
|
|
return (e2x - 1.0 / e2x) / 2.0;
|
|
`);return this.compileAndRun(r,[e])},t.prototype.cosh=function(e){var r=new Rt(e.shape,`
|
|
float e2x = exp(-x);
|
|
return (e2x + 1.0 / e2x) / 2.0;
|
|
`);return this.compileAndRun(r,[e])},t.prototype.tanh=function(e){var r=new Rt(e.shape,`
|
|
float e2x = exp(-2.0 * abs(x));
|
|
return sign(x) * (1.0 - e2x) / (1.0 + e2x);
|
|
`);return this.compileAndRun(r,[e])},t.prototype.asinh=function(e){var r=new Rt(e.shape,zp);return this.compileAndRun(r,[e])},t.prototype.acosh=function(e){var r=new Rt(e.shape,Vp);return this.compileAndRun(r,[e])},t.prototype.atanh=function(e){var r=new Rt(e.shape,Qp);return this.compileAndRun(r,[e])},t.prototype.erf=function(e){var r=new Rt(e.shape,`
|
|
// Error function is calculated approximately with elementary function.
|
|
// See "Handbook of Mathematical Functions with Formulas,
|
|
// Graphs, and Mathematical Tables", Abramowitz and Stegun.
|
|
float p = 0.3275911;
|
|
float a1 = 0.254829592;
|
|
float a2 = -0.284496736;
|
|
float a3 = 1.421413741;
|
|
float a4 = -1.453152027;
|
|
float a5 = 1.061405429;
|
|
|
|
float sign = sign(x);
|
|
x = abs(x);
|
|
float t = 1.0 / (1.0 + p * x);
|
|
return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));
|
|
`);return this.compileAndRun(r,[e])},t.prototype.step=function(e,r){var i=new Rt(e.shape,function(a){return a===void 0&&(a=0),Gn+`
|
|
return x > 0.0 ? 1.0 : float(`+a+`);
|
|
`}(r));return this.compileAndRun(i,[e])},t.prototype.conv2dByMatMul=function(e,r,i,a,s,u){var l=e.shape,f=this.texData.get(e.dataId),A=i.inChannels,I=l[0]*l[1]*l[2],R=i.outChannels,z=i.dataFormat==="channelsLast",te=(I===1||R===1)&&A>1e3,oe=l[2]%2!=0&&!!f.isPacked;if(te||!P().getBool("WEBGL_LAZILY_UNPACK")||!P().getBool("WEBGL_PACK_BINARY_OPERATIONS")||!oe){var ae=z?l[0]*l[1]*l[2]:l[0]*l[2]*l[3],se=this.reshape(e,[1,ae,i.inChannels]),we=this.reshape(r,[1,i.inChannels,i.outChannels]);return this.reshape(this.fusedBatchMatMul({a:se,b:we,transposeA:!1,transposeB:!1,bias:a,activation:s,preluActivationWeights:u}),i.outShape)}var xe=z?l[0]*l[1]*(l[2]+1):l[0]*l[2]*(l[3]+1),me={dataId:e.dataId,shape:[1,xe,i.inChannels],dtype:e.dtype},Se=f.shape;f.shape=f.shape.slice(),f.shape[f.shape.length-2]++,Y(ei(f.shape,me.shape),function(){return"packed reshape "+f.shape+" to "+me.shape+" isn't free"});var Re=this.reshape(r,[1,i.inChannels,i.outChannels]),Me=this.fusedBatchMatMul({a:me,b:Re,transposeA:!1,transposeB:!1,bias:a,activation:s,preluActivationWeights:u}),Fe=this.texData.get(Me.dataId);return Y(Fe.isPacked,function(){return"batchMatMul result is expected to be packed"}),f.shape=Se,Fe.shape=i.outShape,ze.makeTensorFromDataId(Me.dataId,i.outShape,Me.dtype)},t.prototype.conv2dWithIm2Row=function(e,r,i,a,s,u){var l=i.filterWidth,f=i.filterHeight,A=i.inChannels,I=i.outWidth,R=i.outHeight,z=i.dataFormat==="channelsLast",te=l*f*A,oe=R*I,ae=[te,oe],se=e.squeeze([0]),we=r.reshape([1,te,-1]),xe=new op(ae,se.shape,i),me=this.compileAndRun(xe,[se]).reshape([1,ae[0],ae[1]]),Se=a!=null,Re=u!=null,Me=s?Fo(s,!0):null,Fe=new Bs(me.shape,[1,oe,i.outChannels],!0,!1,Se,Me,Re),je=[me,we];a&&je.push(a),Re&&je.push(u);var Be=this.compileAndRun(Fe,je);return z?Be.reshape([1,R,I,i.outChannels]):Be.reshape([1,i.outChannels,R,I])},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights;if(a.filterHeight===1&&a.filterWidth===1&&a.dilationHeight===1&&a.dilationWidth===1&&a.strideHeight===1&&a.strideWidth===1&&(a.padInfo.type==="SAME"||a.padInfo.type==="VALID"))return this.conv2dByMatMul(r,i,a,s,u,l);if(P().getBool("WEBGL_CONV_IM2COL")&&r.shape[0]===1)return this.conv2dWithIm2Row(r,i,a,s,u,l);var f=s!=null,A=l!=null,I=u?Fo(u,!1):null,R=new Fl(a,f,I,A),z=[r,i];return s&&z.push(s),l&&z.push(l),this.compileAndRun(R,z)},t.prototype.conv2d=function(e,r,i){if(i.filterHeight===1&&i.filterWidth===1&&i.dilationHeight===1&&i.dilationWidth===1&&i.strideHeight===1&&i.strideWidth===1&&(i.padInfo.type==="SAME"||i.padInfo.type==="VALID"))return this.conv2dByMatMul(e,r,i);if(P().getBool("WEBGL_CONV_IM2COL")&&e.shape[0]===1)return this.conv2dWithIm2Row(e,r,i);var a=new Fl(i);return this.compileAndRun(a,[e,r])},t.prototype.conv2dDerInput=function(e,r,i){var a=new Fh(i);return this.compileAndRun(a,[e,r])},t.prototype.conv2dDerFilter=function(e,r,i){var a=new Nh(i);return this.compileAndRun(a,[e,r])},t.prototype.fusedDepthwiseConv2D=function(e){var r,i=e.input,a=e.filter,s=e.convInfo,u=e.bias,l=e.activation,f=e.preluActivationWeights,A=P().getBool("WEBGL_PACK_DEPTHWISECONV")&&s.strideWidth<=2&&s.outChannels/s.inChannels==1,I=l?Fo(l,A):null,R=[i,a],z=u!=null,te=f!=null;return z&&R.push(u),te&&R.push(f),A?(r=new Ul(s,z,I,te),this.compileAndRun(r,R)):(r=new Ll(s,z,I,te),this.compileAndRun(r,R))},t.prototype.depthwiseConv2D=function(e,r,i){var a;return P().getBool("WEBGL_PACK_DEPTHWISECONV")&&i.strideWidth<=2&&i.outChannels/i.inChannels==1?(a=new Ul(i),this.compileAndRun(a,[e,r])):(a=new Ll(i),this.compileAndRun(a,[e,r]))},t.prototype.depthwiseConv2DDerInput=function(e,r,i){var a=new zh(i);return this.compileAndRun(a,[e,r])},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){var a=new Wh(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3d=function(e,r,i){var a=new Vh(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3dDerInput=function(e,r,i){var a=new Uh(i);return this.compileAndRun(a,[e,r])},t.prototype.conv3dDerFilter=function(e,r,i){var a=new Lh(i);return this.compileAndRun(a,[e,r])},t.prototype.maxPool=function(e,r){var i=new _s(r,"max",!1);return this.compileAndRun(i,[e])},t.prototype.avgPool=function(e,r){var i=new _s(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPoolBackprop=function(e,r,i,a){var s=new _s(a,"max",!0),u=this.compileAndRun(s,[r]),l=new cp(a),f=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),f},t.prototype.avgPoolBackprop=function(e,r,i){var a=new Ih(i);return this.compileAndRun(a,[e],r.dtype)},t.prototype.cast=function(e,r){return Ss(e,r,this)},t.prototype.unstack=function(e,r){for(var i=e.shape[r],a=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(a[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),f=e.shape.slice();f[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,f).reshape(a);return A},t.prototype.avgPool3d=function(e,r){var i=new Ms(r,"avg",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.avgPool3dBackprop=function(e,r,i){var a=new Th(i);return this.compileAndRun(a,[e],r.dtype)},t.prototype.maxPool3d=function(e,r){var i=new Ms(r,"max",!1);return this.compileAndRun(i,[e],"float32")},t.prototype.maxPool3dBackprop=function(e,r,i,a){var s=new Ms(a,"max",!0),u=this.compileAndRun(s,[r]),l=new fp(a),f=this.compileAndRun(l,[e,u],r.dtype);return u.dispose(),f},t.prototype.reshape=function(e,r){var i=this.texData.get(e.dataId);if(i.isPacked&&!ei(e.shape,r)&&(i.texture===null||!ei(i.shape,r))){var a=this.packedReshape(e,r);return ze.makeTensorFromDataId(a.dataId,a.shape,a.dtype)}return Bo(e,r)},t.prototype.resizeBilinear=function(e,r,i,a){var s=P().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new Ap(e.shape,r,i,a):new wp(e.shape,r,i,a);return this.compileAndRun(s,[e],"float32")},t.prototype.resizeBilinearBackprop=function(e,r,i){var a=new bp(e,r,i);return this.compileAndRun(a,[e])},t.prototype.resizeNearestNeighbor=function(e,r,i,a){var s=new Ep(e.shape,r,i,a);return this.compileAndRun(s,[e])},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){var a=new xp(e,r,i);return this.compileAndRun(a,[e])},t.prototype.multinomial=function(e,r,i,a){var s=r?e:xi(e),u=s.shape[0],l=s.shape[1],f=new dp(u,l,i),A=f.getCustomSetupFunc(a);return this.compileAndRun(f,[s],"int32",A)},t.prototype.oneHot=function(e,r,i,a){var s=new hp(e.size,r,i,a);return this.compileAndRun(s,[e])},t.prototype.diag=function(e){var r=new Zh(e.size);return this.compileAndRun(r,[e])},t.prototype.nonMaxSuppression=function(e,r,i,a,s){return Fi("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead"),Rs(e.dataSync(),r.dataSync(),i,a,s)},t.prototype.cropAndResize=function(e,r,i,a,s,u){var l=new Qh(e.shape,r.shape,a,s,u);return this.compileAndRun(l,[e,r,i],"float32")},t.prototype.depthToSpace=function(e,r,i){Y(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});var a=e.shape[0],s=i==="NHWC"?e.shape[1]:e.shape[2],u=i==="NHWC"?e.shape[2]:e.shape[3],l=i==="NHWC"?e.shape[3]:e.shape[1],f=s*r,A=u*r,I=l/(r*r),R=new Kh(i==="NHWC"?[a,f,A,I]:[a,I,f,A],r,i);return this.compileAndRun(R,[e])},t.prototype.split=function(e,r,i){return Rl(e,r,i)},t.prototype.scatterND=function(e,r,i){var a=Ja(0,e,i),s=a.sliceRank,u=a.numUpdates,l=a.sliceSize,f=a.strides,A=a.outputSize,I=[A/l,l],R=e.reshape([u,s]),z=r.reshape([u,l]);if(A===0)return Bo(Cr([]),i);var te=vt(0),oe=new sc(u,s,R.rank,z.rank,f,I);return this.compileAndRun(oe,[z,R,te]).reshape(i)},t.prototype.sparseToDense=function(e,r,i,a){var s=Ja(0,e,i),u=s.sliceRank,l=s.numUpdates,f=s.strides,A=s.outputSize,I=new sc(l,u,e.rank,r.rank,f,[A,1],!1);return this.compileAndRun(I,[r,e,a]).reshape(i)},t.prototype.fft=function(e){return this.fftImpl(e,!1)},t.prototype.ifft=function(e){return this.fftImpl(e,!0)},t.prototype.fftImpl=function(e,r){var i=this.texData.get(e.dataId),a=new zl(ep,e.shape,r),s=new zl(tp,e.shape,r),u=[this.makeComplexComponentTensorInfo(e,i.complexTensors.real),this.makeComplexComponentTensorInfo(e,i.complexTensors.imag)],l=this.compileAndRun(a,u),f=this.compileAndRun(s,u),A=this.complex(l,f).as2D(e.shape[0],e.shape[1]);return l.dispose(),f.dispose(),A},t.prototype.gatherND=function(e,r){var i=r.shape,a=i[i.length-1],s=ys(e,r),u=s[0],l=s[1],f=s[2],A=s[3],I=r.reshape([l,a]),R=e.reshape([e.size/f,f]),z=new ip(a,A,[l,f]);return this.compileAndRun(z,[R,I]).reshape(u)},t.prototype.fill=function(e,r,i){if((i=i||he(r))==="string"){var a=U(i,le(e));return a.fill(r),ze.makeTensor(a,e,i,this)}var s=new rp(e,r),u=s.getCustomSetupFunc(r);return this.compileAndRun(s,[],i,u)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported under string dtype");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){return this.fill(e.shape,e.dtype==="string"?"":0,e.dtype)},t.prototype.linspace=function(e,r,i){return Is(e,r,i)},t.prototype.makeTensorInfo=function(e,r){var i=this.write(null,e,r);return this.texData.get(i).usage=null,{dataId:i,shape:e,dtype:r}},t.prototype.makeOutput=function(e,r){var i=this.makeTensorInfo(e,r).dataId;return ze.makeTensorFromDataId(i,e,r,this)},t.prototype.unpackTensor=function(e){var r=new Hp(e.shape);return this.runWebGLProgram(r,[e],e.dtype)},t.prototype.packTensor=function(e){var r=new pp(e.shape);return this.runWebGLProgram(r,[e],e.dtype,null,!0)},t.prototype.packedReshape=function(e,r){var i=[En(e.shape)].concat(fn(e.shape)),a={dtype:e.dtype,shape:i,dataId:e.dataId},s=[En(r)].concat(fn(r)),u=new yp(s,i),l=this.runWebGLProgram(u,[a],e.dtype,null,!0);return{dataId:l.dataId,shape:r,dtype:l.dtype}},t.prototype.decode=function(e){var r,i=this.texData.get(e),a=i.isPacked,s=i.shape,u=i.dtype,l=gi(s);return r=a?new Xh(l):new Hh(l),{dtype:u,shape:s,dataId:this.runWebGLProgram(r,[{shape:l,dtype:u,dataId:e}],u,null,!0).dataId}},t.prototype.runWebGLProgram=function(e,r,i,a,s){var u=this;s===void 0&&(s=!1);var l=this.makeTensorInfo(e.outputShape,i),f=this.texData.get(l.dataId);if(e.packedOutput&&(f.isPacked=!0),e.outPackingScheme===Yt.DENSE){var A=$r(e.outputShape);f.texShape=A.map(function(xe){return 2*xe})}if(e.outTexUsage!=null&&(f.usage=e.outTexUsage),le(l.shape)===0)return f.values=Q(l.dtype,0),l;var I=[],R=r.map(function(xe){if(xe.dtype==="complex64")throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");var me=u.texData.get(xe.dataId);if(me.texture==null){if(!e.packedInputs&&le(xe.shape)<=P().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:xe.shape,texData:null,isUniform:!0,uniformValues:me.values};e.packedInputs&&(me.isPacked=!0,me.shape=xe.shape)}else if(!!me.isPacked!=!!e.packedInputs)xe=me.isPacked?u.unpackTensor(xe):u.packTensor(xe),I.push(xe),me=u.texData.get(xe.dataId);else if(me.isPacked&&!ei(me.shape,xe.shape)){var Se=xe,Re=xe.shape;xe.shape=me.shape,xe=u.packedReshape(xe,Re),I.push(xe),me=u.texData.get(xe.dataId),Se.shape=Re}return u.uploadToGPU(xe.dataId),{shape:xe.shape,texData:me,isUniform:!1}});this.uploadToGPU(l.dataId);var z,te={shape:l.shape,texData:f,isUniform:!1},oe=function(xe,me,Se){var Re="";me.concat(Se).forEach(function(je){var Be=je.texData!=null&&je.texData.slice!=null&&je.texData.slice.flatOffset>0,Ge=je.isUniform?"uniform":je.texData.texShape;Re+=je.shape+"_"+Ge+"_"+Be});var Me=xe.userCode,Fe=xe.constructor.name;return Fe+="_"+Re+"_"+Me}(e,R,te),ae=this.getAndSaveBinary(oe,function(){return function(xe,me,Se,Re){var Me=me.userCode,Fe=Se.map(function(it,lt){var rt={logicalShape:it.shape,texShape:it.isUniform?null:it.texData.texShape,isUniform:it.isUniform,isPacked:!it.isUniform&&it.texData.isPacked,flatOffset:null};return it.texData!=null&&it.texData.slice!=null&&it.texData.slice.flatOffset>0&&(rt.flatOffset=it.texData.slice.flatOffset),{name:me.variableNames[lt],shapeInfo:rt}}),je=Fe.map(function(it){return it.shapeInfo}),Be={logicalShape:Re.shape,texShape:Re.texData.texShape,isUniform:!1,isPacked:Re.texData.isPacked,flatOffset:null},Ge=wh(Fe,Be,Me,me.packedInputs),Qe=xe.createProgram(Ge),Ze=null,Ye=xe.getUniformLocation(Qe,"NAN",!1);P().getNumber("WEBGL_VERSION")===1&&(Ze=xe.getUniformLocation(Qe,"INFINITY",!1));for(var tt={},st=0;st<me.variableNames.length;st++){var at=me.variableNames[st];tt[at]=xe.getUniformLocation(Qe,at,!1),tt["offset"+at]=xe.getUniformLocation(Qe,"offset"+at,!1)}return{program:me,source:Ge,webGLProgram:Qe,uniformLocations:tt,inShapeInfos:je,outShapeInfo:Be,infLoc:Ze,nanLoc:Ye}}(u.gpgpu,e,R,te)}),se=this.activeTimers!=null;if(se&&(z=this.startTimer()),function(xe,me,Se,Re,Me){oc(me.inShapeInfos,Se),oc([me.outShapeInfo],[Re]);var Fe=Re.texData.texture,je=Re.texData.texShape;Re.texData.isPacked?xe.setOutputPackedMatrixTexture(Fe,je[0],je[1]):xe.setOutputMatrixTexture(Fe,je[0],je[1]),xe.setProgram(me.webGLProgram),P().getNumber("WEBGL_VERSION")===1&&me.infLoc!==null&&xe.gl.uniform1f(me.infLoc,1/0),me.nanLoc!==null&&xe.gl.uniform1f(me.nanLoc,NaN),Se.forEach(function(Be,Ge){var Qe=me.program.variableNames[Ge],Ze=me.uniformLocations[Qe],Ye=me.uniformLocations["offset"+Qe];if(Ze!=null)if(Be.isUniform)if(le(Be.shape)<2)xe.gl.uniform1f(Ze,Be.uniformValues[0]);else{var tt=Be.uniformValues;tt instanceof Float32Array||(tt=new Float32Array(tt)),xe.gl.uniform1fv(Ze,tt)}else Be.texData.slice!=null&&Ye!=null&&xe.gl.uniform1i(Ye,Be.texData.slice.flatOffset),xe.setInputMatrixTexture(Be.texData.texture,Ze,Ge)}),Me!=null&&Me(xe,me.webGLProgram),xe.executeProgram()}(this.gpgpu,ae,R,te,a),I.forEach(function(xe){return u.disposeData(xe.dataId)}),se&&(z=this.endTimer(z),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(z)})),!P().getBool("WEBGL_LAZILY_UNPACK")&&f.isPacked&&s===!1){var we=this.unpackTensor(l);return this.disposeData(l.dataId),we}return l},t.prototype.compileAndRun=function(e,r,i,a,s){s===void 0&&(s=!1),i=i||r[0].dtype;var u=this.runWebGLProgram(e,r,i,a,s);return ze.makeTensorFromDataId(u.dataId,u.shape,u.dtype)},t.prototype.getAndSaveBinary=function(e,r){return e in this.binaryCache||(this.binaryCache[e]=r()),this.binaryCache[e]},t.prototype.getTextureManager=function(){return this.textureManager},t.prototype.dispose=function(){var e=this;this.disposed||(P().getBool("IS_TEST")||Object.keys(this.binaryCache).forEach(function(r){e.gpgpu.deleteProgram(e.binaryCache[r].webGLProgram),delete e.binaryCache[r]}),this.textureManager.dispose(),this.canvas!=null&&typeof HTMLCanvasElement!="undefined"&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0)},t.prototype.floatPrecision=function(){var e=this;return this.floatPrecisionValue==null&&(this.floatPrecisionValue=mt(function(){if(!P().get("WEBGL_RENDER_FLOAT32_ENABLED")){var r=P().getBool("DEBUG");P().set("DEBUG",!1);var i=e.abs(vt(1e-8)).dataSync()[0];if(P().set("DEBUG",r),i>0)return 32}return 16})),this.floatPrecisionValue},t.prototype.epsilon=function(){return this.floatPrecision()===32?1e-7:1e-4},t.prototype.uploadToGPU=function(e){var r,i=this.texData.get(e),a=i.shape,s=i.dtype,u=i.values,l=i.texture,f=i.usage,A=i.isPacked;if(l==null){var I,R=this.activeTimers!=null;R&&(I=Je());var z=i.texShape;if(z==null&&(z=Kr(a,A),i.texShape=z),u!=null){var te=gi(a),oe=void 0,ae=z[1],se=z[0],we=u instanceof Uint8Array;A?(ae=(r=Zn(z[0],z[1]))[0],se=r[1],oe=new qh(te,[se,ae],we)):oe=new $h(te,[se,ae],we);var xe=this.makeTensorInfo([se,ae],s);this.texData.get(xe.dataId).usage=we?jr.PIXELS:jr.UPLOAD,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(xe.dataId),ae,se,u);var me=this.runWebGLProgram(oe,[xe],s,null,!0),Se=this.texData.get(me.dataId);i.texture=Se.texture,i.texShape=Se.texShape,i.isPacked=Se.isPacked,i.usage=Se.usage,this.disposeData(xe.dataId),this.texData.delete(me.dataId),i.values=null,R&&(this.uploadWaitMs+=Je()-I)}else{var Re=this.acquireTexture(z,f,s,A);i.texture=Re}}},t.prototype.convertAndCacheOnCPU=function(e,r){var i=this.texData.get(e),a=i.dtype;return this.releaseGPUData(e),r!=null&&(i.values=function(s,u){if(u==="float32"||u==="complex64")return s;if(u==="int32"||u==="bool"){for(var l=u==="int32"?new Int32Array(s.length):new Uint8Array(s.length),f=0;f<l.length;++f)l[f]=Math.round(s[f]);return l}throw new Error("Unknown dtype "+u)}(r,a)),i.values},t.prototype.acquireTexture=function(e,r,i,a){if(this.numBytesInGPU+=this.computeBytes(e,i),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024){var s=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn("High memory usage in GPU: "+s+" MB, most likely due to a memory leak")}return this.textureManager.acquireTexture(e,r,a)},t.prototype.computeBytes=function(e,r){return e[0]*e[1]*$(r)},t}(Cl);On()&&ze.registerBackend("webgl",function(){return new xc},2);var Kp=We({square_:function(n){var t=Oe(n,"x","square"),e=[t];return ze.runKernelFunc(function(r,i){return i([t]),r.square(t)},{x:t},null,"Square",{},e,[])}}),ro="SquaredDifference",Ec=We({squaredDifference_:function(n,t){var e,r=Oe(n,"a","squaredDifference"),i=Oe(t,"b","squaredDifference");e=_t(r,i),r=e[0],i=e[1],Mt(r.shape,i.shape);var a={a:r,b:i},s=[r,i];return ze.runKernelFunc(function(u,l){var f=u.squaredDifference(r,i);return l([r,i]),f},a,function(u,l){var f=l[0],A=l[1],I=vt(2);return{a:function(){return u.mul(f.sub(A).mul(I))},b:function(){return u.mul(A.sub(f).mul(I))}}},ro,{},s,[])}}),Zp=We({abs_:function(n){var t=Oe(n,"x","abs");return t.dtype==="complex64"?ze.runKernelFunc(function(e){return e.complexAbs(t)},{$x:t}):ze.runKernelFunc(function(e,r){var i=e.abs(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.toFloat().step(-1))}}},"Abs")}}),Jp=We({acos_:function(n){var t=Oe(n,"x","acos");return ze.runKernelFunc(function(e,r){var i=e.acos(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(vt(1).sub(i.toFloat().square()).sqrt()).neg()}}})}}),Yp=We({acosh_:function(n){var t=Oe(n,"x","acosh");return ze.runKernelFunc(function(e,r){var i=e.acosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(i.toFloat().square().sub(1).sqrt())}}})}}),$p=We({asin_:function(n){var t=Oe(n,"x","asin");return ze.runKernelFunc(function(e,r){var i=e.asin(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(vt(1).sub(i.toFloat().square()).sqrt())}}})}}),qp=We({asinh_:function(n){var t=Oe(n,"x","asinh");return ze.runKernelFunc(function(e,r){var i=e.asinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.divStrict(vt(1).add(i.toFloat().square()).sqrt())}}})}}),ev=We({atan_:function(n){var t=Oe(n,"x","atan");return ze.runKernelFunc(function(e,r){var i=e.atan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().square().add(1))}}})}}),tv=We({atanh_:function(n){var t=Oe(n,"x","atanh");return ze.runKernelFunc(function(e,r){var i=e.atanh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(vt(1).sub(i.toFloat().square()))}}})}}),rv=We({ceil_:function(n){var t=Oe(n,"x","ceil");return ze.runKernelFunc(function(e){return e.ceil(t)},{$x:t},function(e){return{$x:function(){return Gt(e)}}})}}),Us=We({clipByValue_:function(n,t,e){var r=Oe(n,"x","clipByValue");Y(t<=e,function(){return"Error in clip: min ("+t+") must be less than or equal to max ("+e+")."});var i=[r],a={min:t,max:e};return ze.runKernelFunc(function(s,u){var l=s.clip(r,t,e);return u([r]),l},{x:r},function(s,u){var l=u[0];return{x:function(){return s.where(l.greaterEqual(t).logicalAnd(l.lessEqual(e)),Gt(s))}}},"ClipByValue",a,i)}}),nv=We({cos_:function(n){var t=Oe(n,"x","cos"),e=[t];return ze.runKernelFunc(function(r,i){var a=r.cos(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return a.toFloat().sin().neg().mul(r)}}},"Cos",{},e)}}),iv=We({cosh_:function(n){var t=Oe(n,"x","cosh");return ze.runKernelFunc(function(e,r){var i=e.cosh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().sinh().mulStrict(e)}}})}}),av=We({erf_:function(n){var t=Oe(n,"x","erf");return Y(t.dtype==="int32"||t.dtype==="float32",function(){return"Input dtype must be `int32` or `float32`."}),t.dtype==="int32"&&(t=t.toFloat()),ze.runKernelFunc(function(e,r){var i=e.erf(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.square().neg().exp().mul(2/Math.sqrt(Math.PI)))}}})}}),Ws=We({exp_:function(n){var t=Oe(n,"x","exp");return ze.runKernelFunc(function(e,r){var i=e.exp(t);return r([i]),i},{x:t},function(e,r){return{x:function(){return e.mulStrict(r[0])}}},"Exp",{},[],[!0])}}),ov=We({expm1_:function(n){var t=Oe(n,"x","expm1");return ze.runKernelFunc(function(e,r){var i=e.expm1(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.exp())}}})}}),sv=We({floor_:function(n){var t=Oe(n,"x","floor");return ze.runKernelFunc(function(e){return e.floor(t)},{$x:t},function(e){return{$x:function(){return Gt(e)}}})}}),uv=We({log_:function(n){var t=Oe(n,"x","log"),e=[t];return ze.runKernelFunc(function(r,i){var a=r.log(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return r.div(a.toFloat())}}},"Log",{},e)}}),lv=We({log1p_:function(n){var t=Oe(n,"x","log1p");return ze.runKernelFunc(function(e,r){var i=e.log1p(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.add(1))}}})}}),cv=We({logSigmoid_:function(n){var t=Oe(n,"x","logSigmoid");return ze.runKernelFunc(function(e,r){var i=e.softplus(t.neg()).neg();return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.neg().sigmoid())}}})}}),Lo=We({neg_:function(n){var t=Oe(n,"x","neg"),e=[t];return ze.runKernelFunc(function(r){return r.neg(t)},{x:t},function(r){return{x:function(){return r.neg()}}},"Neg",{},e)}}),fv=We({reciprocal_:function(n){var t=Oe(n,"x","reciprocal");return ze.runKernelFunc(function(e,r){var i=e.reciprocal(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.square().neg())}}})}}),dv=We({round_:function(n){var t=Oe(n,"x","round");return ze.runKernelFunc(function(e){return e.round(t)},{$x:t},function(e){return{$x:function(){return Gt(e)}}})}}),Cc=We({rsqrt_:function(n){var t=Oe(n,"x","rsqrt"),e=[t];return ze.runKernelFunc(function(r,i){var a=r.rsqrt(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return r.div(a.pow(1.5).mul(2)).neg()}}},"Rsqrt",{},e)}}),Sc=We({sigmoid_:function(n){var t=Oe(n,"x","sigmoid");return ze.runKernelFunc(function(e,r){var i=e.sigmoid(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mul(i.mul(vt(1).sub(i)))}}},"Sigmoid")}}),hv=We({sign_:function(n){var t=Oe(n,"x","sign");return ze.runKernelFunc(function(e){return e.sign(t)},{$x:t},function(e){return{$x:function(){return Gt(e)}}})}}),pv=We({isNaN_:function(n){var t=Oe(n,"x","isNaN");return ze.runKernelFunc(function(e){return e.isNaN(t)},{$x:t},function(e){return{$x:function(){return Gt(e)}}})}}),vv=We({isInf_:function(n){var t=Oe(n,"x","isInf");return ze.runKernelFunc(function(e){return e.isInf(t)},{$x:t},function(e){return{$x:function(){return Gt(e)}}})}}),mv=We({isFinite_:function(n){var t=Oe(n,"x","isFinite");return ze.runKernelFunc(function(e){return e.isFinite(t)},{$x:t},function(e){return{$x:function(){return Gt(e)}}})}}),gv=We({sin_:function(n){var t=Oe(n,"x","sin"),e=[t];return ze.runKernelFunc(function(r,i){var a=r.sin(t);return i([t]),a},{x:t},function(r,i){var a=i[0];return{x:function(){return a.toFloat().cos().mul(r)}}},"Sin",{},e)}}),yv=We({sinh_:function(n){var t=Oe(n,"x","sinh");return ze.runKernelFunc(function(e,r){var i=e.sinh(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return i.toFloat().cosh().mulStrict(e)}}})}}),bv=We({softplus_:function(n){var t=Oe(n,"x","softplus");return ze.runKernelFunc(function(e,r){var i=e.softplus(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.mul(i.sigmoid())}}})}}),wv=We({sqrt_:function(n){var t=Oe(n,"x","sqrt");return ze.runKernelFunc(function(e,r){var i=e.sqrt(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.toFloat().sqrt().mul(2))}}})}}),Av=We({step_:function(n,t){t===void 0&&(t=0);var e=Oe(n,"x","step");return ze.runKernelFunc(function(r){return r.step(e,t)},{$x:e},function(r){return{$x:function(){return Gt(r)}}})}}),xv=We({tan_:function(n){var t=Oe(n,"x","tan");return ze.runKernelFunc(function(e,r){var i=e.tan(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return e.div(i.cos().square())}}})}}),Ev=We({tanh_:function(n){var t=Oe(n,"x","tanh");return ze.runKernelFunc(function(e,r){var i=e.tanh(t);return r([i]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return vt(1).sub(i.square()).mulStrict(e)}}},"Tanh",{},null,[!0])}});function Ic(n,t,e,r,i,a){var s,u,l=Oe(n,"x","batchNorm"),f=Oe(t,"mean","batchNorm"),A=Oe(e,"variance","batchNorm");return i!=null&&(s=Oe(i,"scale","batchNorm")),r!=null&&(u=Oe(r,"offset","batchNorm")),Y(l.rank===2,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),Y(f.rank===2||f.rank===1,function(){return"Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank "+f.rank+"."}),Y(A.rank===2||A.rank===1,function(){return"Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank "+A.rank+"."}),s!=null&&Y(s.rank===2||s.rank===1,function(){return"Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank "+s.rank+"."}),u!=null&&Y(u.rank===2||u.rank===1,function(){return"Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank "+u.rank+"."}),no(l,f,A,u,s,a)}function Tc(n,t,e,r,i,a){var s,u,l=Oe(n,"x","batchNorm"),f=Oe(t,"mean","batchNorm"),A=Oe(e,"variance","batchNorm");return i!=null&&(s=Oe(i,"scale","batchNorm")),r!=null&&(u=Oe(r,"offset","batchNorm")),Y(l.rank===3,function(){return"Error in batchNorm3D: x must be rank 3 but got rank "+l.rank+"."}),Y(f.rank===3||f.rank===1,function(){return"Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank "+f.rank+"."}),Y(A.rank===3||A.rank===1,function(){return"Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank "+A.rank+"."}),s!=null&&Y(s.rank===3||s.rank===1,function(){return"Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank "+s.rank+"."}),u!=null&&Y(u.rank===3||u.rank===1,function(){return"Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank "+u.rank+"."}),no(l,f,A,u,s,a)}function Rc(n,t,e,r,i,a){var s,u,l=Oe(n,"x","batchNorm"),f=Oe(t,"mean","batchNorm"),A=Oe(e,"variance","batchNorm");return i!=null&&(s=Oe(i,"scale","batchNorm")),r!=null&&(u=Oe(r,"offset","batchNorm")),Y(l.rank===4,function(){return"Error in batchNorm4D: x must be rank 4 but got rank "+l.rank+"."}),Y(f.rank===4||f.rank===1,function(){return"Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank "+f.rank+"."}),Y(A.rank===4||A.rank===1,function(){return"Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank "+A.rank+"."}),s!=null&&Y(s.rank===4||s.rank===1,function(){return"Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank "+s.rank+"."}),u!=null&&Y(u.rank===4||u.rank===1,function(){return"Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank "+u.rank+"."}),no(l,f,A,u,s,a)}function no(n,t,e,r,i,a){a==null&&(a=.001);var s,u,l,f=Oe(n,"x","batchNorm"),A=Oe(t,"mean","batchNorm"),I=Oe(e,"variance","batchNorm");i!=null&&(s=Oe(i,"scale","batchNorm")),r!=null&&(u=Oe(r,"offset","batchNorm")),Y(A.rank===I.rank,function(){return"Batch normalization gradient requires mean and variance to have equal ranks."}),Y(u==null||A.rank===u.rank,function(){return"Batch normalization gradient requires mean and offset to have equal ranks."}),Y(s==null||A.rank===s.rank,function(){return"Batch normalization gradient requires mean and scale to have equal ranks."}),l=f.rank===0||f.rank===1?f.as4D(1,1,1,f.size):f.rank===2?f.as4D(1,1,f.shape[0],f.shape[1]):f.rank===3?f.as4D(1,f.shape[0],f.shape[1],f.shape[2]):f;var R=[f,A,I,s];return ze.runKernelFunc(function(z,te){var oe=z.batchNormalization(l,Uo(A),Uo(I),a,Uo(s),Uo(u));return te([f,A,I,s]),oe},{x:f,mean:A,variance:I,scale:s,offset:u},function(z,te){var oe=te,ae=oe[0],se=oe[1],we=oe[2],xe=oe[3],me=xe==null?vt(1):xe,Se=Rr(se.shape,l.shape),Re=[];if(se.rank===1){for(var Me=0;Me<l.shape.length-1;++Me)Re.push(l.shape[Me]);Re.push(1)}var Fe=ae.sub(se),je=z.mul(me),Be=Cc(we.add(vt(a))),Ge=Be.mul(Be).mul(Be).mul(vt(-.5));return{x:function(){return se.rank===1?z.mul(Ia(Be.as4D(1,1,1,se.shape[0]),Re)).mul(me).reshape(ae.shape):z.mul(Be).mul(me).reshape(ae.shape)},mean:function(){var Qe=Be.mul(vt(-1)).mul(je);return se.rank===1&&(Qe=Qe.sum(Se)),Qe.reshape(se.shape)},variance:function(){var Qe=Ge.mul(Fe).mul(je);return se.rank===1&&(Qe=Qe.sum(Se)),Qe.reshape(se.shape)},scale:function(){var Qe=Fe.mul(Be),Ze=z.mul(Qe);return se.rank===1&&(Ze=Ze.sum(Se)),Ze.reshape(se.shape)},offset:function(){var Qe=z;return se.rank===1&&(Qe=Qe.sum(Se)),Qe.reshape(se.shape)}}},"BatchNormalization",{varianceEpsilon:a},R).reshape(f.shape)}function Uo(n){return n==null?null:n.rank===0?n.as1D():n.rank===1?n:n.rank===2?n.as4D(1,1,n.shape[0],n.shape[1]):n.rank===3?n.as4D(1,n.shape[0],n.shape[1],n.shape[2]):n}function Wo(){zn("tf.batchNormalization() is going away. Use tf.batchNorm() instead, and note the positional argument change of scale, offset, and varianceEpsilon")}var Cv=We({batchNormalization2d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),Ic(n,t,e,a,i,r)}}),Sv=We({batchNormalization3d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),Tc(n,t,e,a,i,r)}}),Iv=We({batchNormalization4d_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),Rc(n,t,e,a,i,r)}}),Tv=We({batchNormalization_:function(n,t,e,r,i,a){return r===void 0&&(r=.001),Wo(),no(n,t,e,a,i,r)}}),kc=We({batchNorm_:no}),Rv=We({batchNorm2d_:Ic}),kv=We({batchNorm3d_:Tc}),Ov=We({batchNorm4d_:Rc}),zo=We({logicalAnd_:function(n,t){var e=Oe(n,"a","logicalAnd","bool"),r=Oe(t,"b","logicalAnd","bool");return Mt(e.shape,r.shape),ze.runKernelFunc(function(i){return i.logicalAnd(e,r)},{a:e,b:r},null,"LogicalAnd")}}),Dv=We({logicalNot_:function(n){var t=Oe(n,"x","logicalNot","bool");return ze.runKernelFunc(function(e){return e.logicalNot(t)},{$x:t})}}),Oc=We({logicalOr_:function(n,t){var e=Oe(n,"a","logicalOr","bool"),r=Oe(t,"b","logicalOr","bool");return Mt(e.shape,r.shape),ze.runKernelFunc(function(i){return i.logicalOr(e,r)},{$a:e,$b:r})}}),jv=We({logicalXor_:function(n,t){var e=Oe(n,"a","logicalXor","bool"),r=Oe(t,"b","logicalXor","bool");return Mt(e.shape,r.shape),Oc(n,t).logicalAnd(zo(n,t).logicalNot())}}),fa=We({where_:function(n,t,e){var r=Oe(t,"a","where"),i=Oe(e,"b","where"),a=Oe(n,"condition","where","bool");return fe(r.shape,i.shape,"Error in where: "),a.rank===1?Y(a.shape[0]===r.shape[0],function(){return"The first dimension of `a` must match the size of `condition`."}):fe(a.shape,i.shape,"Error in where: "),ze.runKernelFunc(function(s,u){var l=s.select(a,r,i);return u([a]),l},{$condition:a,$a:r,$b:i},function(s,u){var l=u[0];return{$condition:function(){return Gt(l).toFloat()},$a:function(){return s.mul(l.cast(s.dtype))},$b:function(){return s.mul(l.logicalNot().cast(s.dtype))}}})}}),Dc=function(n){return C(this,void 0,void 0,function(){var t,e,r;return x(this,function(i){switch(i.label){case 0:return[4,(t=Oe(n,"condition","whereAsync","bool")).data()];case 1:return e=i.sent(),r=Os(t.shape,e),n!==t&&t.dispose(),[2,r]}})})},Nt=We({add_:function(n,t){var e,r=Oe(n,"a","add"),i=Oe(t,"b","add");e=_t(r,i),r=e[0],i=e[1];var a=Mt(r.shape,i.shape);return ze.runKernelFunc(function(s){return s.add(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=Rr(r.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=Rr(i.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(i.shape)}}},"Add")}}),Pv=We({addN_:function(n){Y(Array.isArray(n),function(){return"The argument passed to tf.addN() must be a list of tensors"}),Y(n.length>=1,function(){return"Must pass at least one tensor to tf.addN(), but got "+n.length});var t=n.map(function(i,a){return Oe(i,"tensors"+a,"addN")}),e=t[0];t.forEach(function(i){if(i.dtype!==e.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(function(i){if(!ue(i.shape,e.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});var r=t;return ze.runKernelFunc(function(i){return i.addN(t)},r,function(i){var a={};return t.forEach(function(s,u){a[u]=function(){return i.clone()}}),a},"AddN")}}),Bv=We({addStrict_:function(n,t){var e=Oe(n,"a","addStrict"),r=Oe(t,"b","addStrict");return fe(e.shape,r.shape,"Error in addStrict: "),e.add(r)}}),_v=We({atan2_:function(n,t){var e,r=Oe(n,"a","atan2"),i=Oe(t,"b","atan2");e=_t(r,i),r=e[0],i=e[1];var a=Mt(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.atan2(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],f=u[1];return{$a:function(){var A=Nt(l.square(),f.square()),I=s.mul(f.div(A)),R=Rr(l.shape,a);return R.length>0&&(I=I.sum(R)),I.reshape(l.shape)},$b:function(){var A=Nt(l.square(),f.square()),I=Lo(s.mul(l.div(A))),R=Rr(f.shape,a);return R.length>0&&(I=I.sum(R)),I.reshape(f.shape)}}})}}),Hn=We({div_:function(n,t){var e,r=Oe(n,"a","div"),i=Oe(t,"b","div");if(e=_t(r,i),r=e[0],i=e[1],r.dtype==="int32"&&i.dtype==="int32")return jc(r,i);var a=Mt(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.realDivide(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],f=u[1];return{a:function(){var A=s.div(f.toFloat()),I=Rr(l.shape,a);return I.length>0?A.sum(I).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),I=Rr(f.shape,a);I.length>0&&(A=A.sum(I).reshape(f.shape));var R=f.square();return A.div(R.toFloat()).neg()}}},"Div")}}),Mv=We({divNoNan_:function(n,t){var e,r=Oe(n,"a","div"),i=Oe(t,"b","div");r=(e=_t(r,i))[0],i=e[1];var a=Hn(r,i),s=Gt(a),u=i.equal(s);return fa(u,s,a)}}),Nv=We({divStrict_:function(n,t){var e=Oe(n,"a","div"),r=Oe(t,"b","div");return fe(e.shape,r.shape,"Error in divideStrict: "),e.div(r)}}),jc=We({floorDiv_:function(n,t){var e,r=Oe(n,"a","floorDiv"),i=Oe(t,"b","floorDiv");e=_t(r,i),r=e[0],i=e[1];var a=Mt(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.floorDiv(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],f=u[1];return{a:function(){var A=s.div(f.toFloat()),I=Rr(l.shape,a);return I.length>0?A.sum(I).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),I=Rr(f.shape,a);I.length>0&&(A=A.sum(I).reshape(f.shape));var R=f.square();return A.div(R.toFloat()).neg()}}},"FloorDiv")}}),zs=We({maximum_:function(n,t){var e,r=Oe(n,"a","maximum"),i=Oe(t,"b","maximum");return e=_t(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),Mt(r.shape,i.shape),ze.runKernelFunc(function(a,s){var u=a.maximum(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return a.mul(u.greaterEqual(l).toFloat())},b:function(){return a.mul(u.less(l).toFloat())}}},"Maximum")}}),Fv=We({maximumStrict_:function(n,t){var e=Oe(n,"a","maximumStrict"),r=Oe(t,"b","maximumStrict");return fe(e.shape,r.shape,"Error in maximumStrict: "),e.maximum(r)}}),Pc=We({minimum_:function(n,t){var e,r=Oe(n,"a","minimum"),i=Oe(t,"b","minimum");return e=_t(r,i),r=e[0],i=e[1],r.dtype==="bool"&&(r=r.toInt(),i=i.toInt()),Mt(r.shape,i.shape),ze.runKernelFunc(function(a,s){var u=a.minimum(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return a.mul(u.lessEqual(l).toFloat())},b:function(){return a.mul(u.greater(l).toFloat())}}},"Minimum")}}),Lv=We({minimumStrict_:function(n,t){var e=Oe(n,"a","minimumStrict"),r=Oe(t,"b","minimumStrict");return fe(e.shape,r.shape,"Error in minimumStrict: "),e.minimum(r)}}),Uv=We({mod_:function(n,t){var e,r=Oe(n,"a","mod"),i=Oe(t,"b","mod");e=_t(r,i),r=e[0],i=e[1];var a=Mt(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.mod(r,i);return u([r,i]),l},{$a:r,$b:i},function(s,u){var l=u[0],f=u[1];return{$a:function(){var A=Rr(l.shape,a);return A.length>0?s.sum(A).reshape(l.shape):s},$b:function(){var A=s.mul(l.div(f).floor().neg()),I=Rr(f.shape,a);return I.length>0?A.sum(I).reshape(f.shape):A}}})}}),Wv=We({modStrict_:function(n,t){var e=Oe(n,"a","modStrict"),r=Oe(t,"b","modStrict");return fe(e.shape,r.shape,"Error in modStrict: "),e.mod(r)}}),nn=We({mul_:function(n,t){var e,r=Oe(n,"a","mul"),i=Oe(t,"b","mul");e=_t(r,i),r=e[0],i=e[1];var a=Mt(r.shape,i.shape);return ze.runKernelFunc(function(s,u){var l=s.multiply(r,i);return u([r,i]),l},{a:r,b:i},function(s,u){var l=u[0],f=u[1];return{a:function(){var A=s.mul(f.toFloat()),I=Rr(l.shape,a);return I.length>0?A.sum(I).reshape(l.shape):A},b:function(){var A=s.mul(l.toFloat()),I=Rr(f.shape,a);return I.length>0?A.sum(I).reshape(f.shape):A}}},"Mul")}}),zv=We({mulStrict_:function(n,t){var e=Oe(n,"a","mul"),r=Oe(t,"b","mul");return fe(e.shape,r.shape,"Error in multiplyStrict: "),e.mul(r)}}),Vo=We({pow_:function(n,t){var e,r=Oe(n,"base","pow"),i=Oe(t,"exp","pow");e=_t(r,i),r=e[0],i=e[1];var a=Mt(r.shape,i.shape),s=[r,i];return ze.runKernelFunc(function(u,l){var f=u.pow(r,i);return l([r,i,f]),f},{a:r,b:i},function(u,l){var f=l[0],A=l[1],I=l[2];return{a:function(){var R=A.toFloat(),z=u.mul(R.mul(f.pow(R.sub(vt(1))))),te=Rr(f.shape,a);return te.length>0&&(z=z.sum(te)),z.reshape(f.shape)},b:function(){var R=f.greater(0),z=f.log().where(R,Gt(f)),te=u.mul(I.mul(z)),oe=Rr(A.shape,a);return oe.length>0&&(te=te.sum(oe)),te.reshape(A.shape)}}},"Pow",{},s,[!0])}}),Vv=We({powStrict_:function(n,t){return fe(n.shape,t.shape,"Error in powStrict: "),n.pow(t)}}),Qv=We({squaredDifferenceStrict_:function(n,t){var e=Oe(n,"a","squaredDifferenceStrict"),r=Oe(t,"b","squaredDifferenceStrict");return fe(e.shape,r.shape,"Error in squaredDifferenceStrict: "),e.squaredDifference(r)}}),Fr=We({sub_:function(n,t){var e,r=Oe(n,"a","sub"),i=Oe(t,"b","sub");e=_t(r,i),r=e[0],i=e[1];var a=Mt(r.shape,i.shape);return ze.runKernelFunc(function(s){return s.subtract(r,i)},{a:r,b:i},function(s){return{a:function(){var u=s,l=Rr(r.shape,a);return l.length>0&&(u=u.sum(l)),u.reshape(r.shape)},b:function(){var u=s,l=Rr(i.shape,a);return l.length>0&&(u=u.sum(l)),u.neg().reshape(i.shape)}}},"Sub")}}),Gv=We({subStrict_:function(n,t){var e=Oe(n,"a","subStrict"),r=Oe(t,"b","subStrict");return fe(e.shape,r.shape,"Error in subStrict: "),e.sub(r)}}),Bc=We({equal_:function(n,t){var e,r=Oe(n,"a","equal"),i=Oe(t,"b","equal");return e=_t(r,i),r=e[0],i=e[1],Mt(r.shape,i.shape),ze.runKernelFunc(function(a){return a.equal(r,i)},{$a:r,$b:i})}}),Hv=We({equalStrict_:function(n,t){var e=Oe(n,"a","equalStrict"),r=Oe(t,"b","equalStrict");return fe(e.shape,r.shape,"Error in equalStrict: "),e.equal(r)}}),Xv=We({greater_:function(n,t){var e,r=Oe(n,"a","greater"),i=Oe(t,"b","greater");return e=_t(r,i),r=e[0],i=e[1],Mt(r.shape,i.shape),ze.runKernelFunc(function(a){return a.greater(r,i)},{a:r,b:i},null,"Greater")}}),_c=We({greaterEqual_:function(n,t){var e,r=Oe(n,"a","greaterEqual"),i=Oe(t,"b","greaterEqual");return e=_t(r,i),r=e[0],i=e[1],Mt(r.shape,i.shape),ze.runKernelFunc(function(a,s){var u=a.greaterEqual(r,i);return s([r,i]),u},{a:r,b:i},function(a,s){var u=s[0],l=s[1];return{a:function(){return Gt(u)},b:function(){return Gt(l)}}},"GreaterEqual")}}),Kv=We({greaterEqualStrict_:function(n,t){var e=Oe(n,"a","greaterEqualStrict"),r=Oe(t,"b","greaterEqualStrict");return fe(e.shape,r.shape,"Error in greaterEqualStrict: "),e.greaterEqual(r)}}),Zv=We({greaterStrict_:function(n,t){var e=Oe(n,"a","greaterStrict"),r=Oe(t,"b","greaterStrict");return fe(e.shape,r.shape,"Error in greaterStrict: "),e.greater(r)}}),Jv=We({less_:function(n,t){var e,r=Oe(n,"a","less"),i=Oe(t,"b","less");return e=_t(r,i),r=e[0],i=e[1],Mt(r.shape,i.shape),ze.runKernelFunc(function(a){return a.less(r,i)},{a:r,b:i},null,"Less")}}),Yv=We({lessEqual_:function(n,t){var e,r=Oe(n,"a","lessEqual"),i=Oe(t,"b","lessEqual");return e=_t(r,i),r=e[0],i=e[1],Mt(r.shape,i.shape),ze.runKernelFunc(function(a,s){var u=a.lessEqual(r,i);return s([r,i]),u},{a:r,b:i},null,"LessEqual")}}),$v=We({lessEqualStrict_:function(n,t){var e=Oe(n,"a","lessEqualStrict"),r=Oe(t,"b","lessEqualStrict");return fe(e.shape,r.shape,"Error in lessEqualStrict: "),e.lessEqual(r)}}),qv=We({lessStrict_:function(n,t){var e=Oe(n,"a","lessStrict"),r=Oe(t,"b","lessStrict");return fe(e.shape,r.shape,"Error in lessStrict: "),e.less(r)}}),em=We({notEqual_:function(n,t){var e,r=Oe(n,"a","notEqual"),i=Oe(t,"b","notEqual");return e=_t(r,i),r=e[0],i=e[1],Mt(r.shape,i.shape),ze.runKernelFunc(function(a){return a.notEqual(r,i)},{a:r,b:i},null,"NotEqual")}}),tm=We({notEqualStrict_:function(n,t){var e=Oe(n,"a","notEqualStrict"),r=Oe(t,"b","notEqualStrict");return fe(e.shape,r.shape,"Error in notEqualStrict: "),e.notEqual(r)}});function Mc(n,t){for(var e=[],r=n;r<t;++r)e.push(r);return e}function Nc(n){for(var t=[],e=0;e<n.length;++e)for(var r=0;r<n[e].length;++r)t.push(n[e][r]);return t}var Vs=We({gather_:function(n,t,e){e===void 0&&(e=0);var r=Oe(n,"x","gather"),i=Oe(t,"indices","gather","int32");e=ye(e,r.shape)[0];var a=function(s,u,l){for(var f=s.shape[l],A=[],I=1,R=1,z=0;z<l;z++)A.push(s.shape[z]),I*=s.shape[z];for(z=0;z<u.rank;z++)A.push(u.shape[z]);for(z=l+1;z<s.rank;z++)A.push(s.shape[z]),R*=s.shape[z];return{batchSize:I,sliceSize:R,dimSize:f,outputShape:A}}(r,i,e);return ze.runKernelFunc(function(s,u){var l=s.gather(r,i.flatten(),e);return u([i]),l},{x:r,indices:i},function(s,u){var l=u[0];return{x:function(){var f=r.shape,A=l.size,I=f.slice(0,e),R=I.length,z=f.slice(e,f.length).slice(1),te=z.length,oe=Mc(0,R),ae=Mc(R+1,R+1+te),se=Nc([I,[A],z]),we=s.reshape(se),xe=l.reshape([A]),me=Nc([[R],oe,ae]),Se=we.transpose(me),Re=Fc(Se,xe,r.shape[e]),Me=gt(me);return Re=Re.transpose(Me)},indices:function(){return l}}},"Gather",{axis:e}).reshape(a.outputShape)}}),Fc=We({unsortedSegmentSum_:function(n,t,e){var r=Oe(n,"x","unsortedSegmentSum"),i=Oe(t,"segmentIds","unsortedSegmentSum","int32");return Y(ge(e),function(){return"numSegments must be of dtype int"}),ze.runKernelFunc(function(a,s){var u=a.unsortedSegmentSum(r,i,e);return s([i]),u},{$x:r},function(a,s){var u=s[0];return{$x:function(){return function(l,f){for(var A=zs(f,Gt(f)),I=Vs(l,A),R=_c(f,vt(0,"int32")),z=I.rank-R.rank,te=0;te<z;++te)R=_n(R,te+1);R=zo(R,Sa(I.shape,"bool"));var oe=Gt(I);return fa(R,I,oe)}(a,u)}}})}}),rm=function(n,t,e){return C(this,void 0,void 0,function(){var r,i,a,s,u,l,f,A,I,R,z,te,oe;return x(this,function(ae){switch(ae.label){case 0:for(r=Oe(n,"tensor","boolMask"),i=Oe(t,"mask","boolMask","bool"),a=e==null?0:e,s=i.rank,u=r.shape,Y(s>0,function(){return"mask cannot be scalar"}),fe(u.slice(a,a+s),i.shape,"mask's shape must match the first K dimensions of tensor's shape,"),l=1,f=a;f<a+s;f++)l*=u[f];return A=u.slice(0,a).concat([l],u.slice(a+s)),I=r.reshape(A),R=i.reshape([-1]),[4,Dc(R)];case 1:return z=ae.sent(),te=z.squeeze([1]),oe=Vs(I,te,a),n!==r&&r.dispose(),t!==i&&i.dispose(),te.dispose(),I.dispose(),R.dispose(),z.dispose(),[2,oe]}})})};function Lc(n,t,e,r,i,a,s){a===void 0&&(a="NHWC"),Y(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var u=n,l=t,f=!1;t.rank===3&&(f=!0,l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]),u=[1,n[0],n[1],n[2]]),Y(u.length===4,function(){return"Error in conv2dDerInput: inShape must be length 4, but got length "+u.length+"."}),Y(l.rank===4,function(){return"Error in conv2dDerInput: dy must be rank 4, but got rank "+l.rank}),Y(e.rank===4,function(){return"Error in conv2dDerInput: filter must be rank 4, but got rank "+e.rank});var A=a==="NHWC"?u[3]:u[1],I=a==="NHWC"?l.shape[3]:l.shape[1];Y(A===e.shape[2],function(){return"Error in conv2dDerInput: depth of input ("+A+") must match input depth for filter "+e.shape[2]+"."}),Y(I===e.shape[3],function(){return"Error in conv2dDerInput: depth of output ("+I+") must match output depth for filter "+e.shape[3]+"."}),s!=null&&Y(ge(i),function(){return"Error in conv2dDerInput: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var R=Po(a),z=zi(u,e.shape,r,1,i,s,!1,R),te=ze.runKernelFunc(function(oe,ae){var se=oe.conv2dDerInput(l,e,z);return ae([e,l]),se},{dy4D:l,filter:e},function(oe,ae){var se=ae[0],we=ae[1];return{dy4D:function(){return Mn(oe,se,r,i,a,1,s)},filter:function(){return Gs(oe,we,se.shape,r,i,a,s)}}});return f?te.as3D(te.shape[1],te.shape[2],te.shape[3]):te}function Qs(n){var t=function(a){return typeof a=="number"?[a,a,a]:a.length===2?[a[0],a[1],1]:a}(n),e=t[0],r=t[1],i=t[2];return e===1&&r===1&&i===1}function Uc(n,t,e,r,i){Y(n.length===t.rank,function(){return"Length of inShape ("+n.length+") and rank of dy ("+t.rank+") must match"});var a=n,s=t,u=!1;t.rank===4&&(u=!0,s=t.as5D(1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]),a=[1,n[0],n[1],n[2],n[3]]);var l=a[4],f=s.shape[4];Y(a.length===5,function(){return"Error in conv3dDerInput: inShape must be length 5, but got length "+a.length+"."}),Y(s.rank===5,function(){return"Error in conv3dDerInput: dy must be rank 5, but got rank "+s.rank}),Y(e.rank===5,function(){return"Error in conv3dDerInput: filter must be rank 5, but got rank "+e.rank}),Y(l===e.shape[3],function(){return"Error in conv3dDerInput: depth of input ("+l+") must match input depth for filter "+e.shape[3]+"."}),Y(f===e.shape[4],function(){return"Error in conv3dDerInput: depth of output ("+f+") must match output depth for filter "+e.shape[4]+"."});var A=$a(a,e.shape,r,1,i),I=ze.runKernelFunc(function(R){return R.conv3dDerInput(s,e,A)},{dy5D:s});return u?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}var nm=We({conv1d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NWC"),a===void 0&&(a=1);var u=Oe(n,"x","conv1d"),l=Oe(t,"filter","conv1d"),f=u,A=!1;u.rank===2&&(A=!0,f=u.as3D(1,u.shape[0],u.shape[1])),Y(f.rank===3,function(){return"Error in conv1d: input must be rank 3, but got rank "+f.rank+"."}),Y(l.rank===3,function(){return"Error in conv1d: filter must be rank 3, but got rank "+l.rank+"."}),s!=null&&Y(ge(r),function(){return"Error in conv1d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."}),Y(f.shape[2]===l.shape[1],function(){return"Error in conv1d: depth of input ("+f.shape[2]+") must match input depth for filter "+l.shape[1]+"."}),Y(pn(e,a),function(){return"Error in conv1D: Either stride or dilation must be 1. Got stride "+e+" and dilation '"+a+"'"}),Y(i==="NWC",function(){return"Error in conv1d: got dataFormat of "+i+" but only NWC is currently supported."});var I=l.as4D(1,l.shape[0],l.shape[1],l.shape[2]),R=f.as4D(f.shape[0],1,f.shape[1],f.shape[2]),z=Mn(R,I,[1,e],r,"NHWC",[1,a],s);return A?z.as2D(z.shape[2],z.shape[3]):z.as3D(z.shape[0],z.shape[2],z.shape[3])}}),Mn=We({conv2d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]);var u=Oe(n,"x","conv2d"),l=Oe(t,"filter","conv2d"),f=u,A=!1;u.rank===3&&(A=!0,f=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),Y(f.rank===4,function(){return"Error in conv2d: input must be rank 4, but got rank "+f.rank+"."}),Y(l.rank===4,function(){return"Error in conv2d: filter must be rank 4, but got rank "+l.rank+"."}),s!=null&&Y(ge(r),function(){return"Error in conv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var I=i==="NHWC"?f.shape[3]:f.shape[1];Y(I===l.shape[2],function(){return"Error in conv2d: depth of input ("+I+") must match input depth for filter "+l.shape[2]+"."}),Y(pn(e,a),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"});var R=Po(i),z=zi(f.shape,l.shape,e,a,r,s,!1,R),te=[l,f],oe=ze.runKernelFunc(function(ae,se){var we=ae.conv2d(f,l,z);return se([l,f]),we},{x:f,filter:l},function(ae,se){var we=se,xe=we[0],me=we[1];return Y(ua(a),function(){return"Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"}),{x:function(){return Wc(me.shape,ae,xe,e,r,i)},filter:function(){return Gs(me,ae,xe.shape,e,r,i)}}},"Conv2D",z,te);return A?oe.as3D(oe.shape[1],oe.shape[2],oe.shape[3]):oe}}),im=We({conv3d_:function(n,t,e,r,i,a){i===void 0&&(i="NDHWC"),a===void 0&&(a=[1,1,1]);var s=Oe(n,"x","conv3d"),u=Oe(t,"filter","conv3d"),l=s,f=!1;s.rank===4&&(f=!0,l=s.as5D(1,s.shape[0],s.shape[1],s.shape[2],s.shape[3])),Y(l.rank===5,function(){return"Error in conv3d: input must be rank 5, but got rank "+l.rank+"."}),Y(u.rank===5,function(){return"Error in conv3d: filter must be rank 5, but got rank "+u.rank+"."}),Y(l.shape[4]===u.shape[3],function(){return"Error in conv3d: depth of input ("+l.shape[4]+") must match input depth for filter "+u.shape[3]+"."}),Y(function(R,z){return Qs(R)||Qs(z)}(e,a),function(){return"Error in conv3D: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"}),Y(i==="NDHWC",function(){return"Error in conv3d: got dataFormat of "+i+" but only NDHWC is currently supported."});var A=$a(l.shape,u.shape,e,a,r),I=ze.runKernelFunc(function(R,z){var te=R.conv3d(l,u,A);return z([l,u]),te},{x:l,$filter:u},function(R,z){Y(Qs(a),function(){return"Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+a+"'"});var te=z[0],oe=z[1];return{x:function(){return Uc(te.shape,R,oe,e,r)},$filter:function(){return function(ae,se,we,xe,me){var Se=ae;ae.rank===4&&(Se=ae.as5D(1,ae.shape[0],ae.shape[1],ae.shape[2],ae.shape[3]));var Re=se;Re.rank===4&&(Re=se.as5D(1,se.shape[0],se.shape[1],se.shape[2],se.shape[3])),Y(Se.rank===5,function(){return"Error in conv3dDerFilter: input must be rank 5, but got shape "+Se.shape+"."}),Y(Re.rank===5,function(){return"Error in conv3dDerFilter: dy must be rank 5, but got shape "+Re.shape+"."}),Y(we.length===5,function(){return"Error in conv3dDerFilter: filterShape must be length 5, but got "+we+"."}),Y(Se.shape[4]===we[3],function(){return"Error in conv3dDerFilter: depth of input "+Se.shape[4]+") must match input depth in filter ("+we[3]+"."}),Y(Re.shape[4]===we[4],function(){return"Error in conv3dDerFilter: depth of dy ("+Re.shape[4]+") must match output depth for filter ("+we[4]+")."});var Me=$a(Se.shape,we,xe,1,me);return ze.runKernelFunc(function(Fe){return Fe.conv3dDerFilter(Se,Re,Me)},{x5D:Se,dy5D:Re})}(te,R,oe.shape,e,r)}}});return f?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}}),Gs=We({conv2dDerFilter_:function(n,t,e,r,i,a,s){a===void 0&&(a="NHWC");var u=n;n.rank===3&&(u=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var l=t;l.rank===3&&(l=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),Y(u.rank===4,function(){return"Error in conv2dDerFilter: input must be rank 4, but got shape "+u.shape+"."}),Y(l.rank===4,function(){return"Error in conv2dDerFilter: dy must be rank 4, but got shape "+l.shape+"."}),Y(e.length===4,function(){return"Error in conv2dDerFilter: filterShape must be length 4, but got "+e+"."});var f=a==="NHWC"?u.shape[3]:u.shape[1],A=a==="NHWC"?l.shape[3]:l.shape[1];Y(f===e[2],function(){return"Error in conv2dDerFilter: depth of input "+f+") must match input depth in filter ("+e[2]+"."}),Y(A===e[3],function(){return"Error in conv2dDerFilter: depth of dy ("+A+") must match output depth for filter ("+e[3]+")."}),s!=null&&Y(ge(i),function(){return"Error in conv2dDerFilter: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+i+"."});var I=Po(a),R=zi(u.shape,e,r,1,i,s,!1,I);return ze.runKernelFunc(function(z){return z.conv2dDerFilter(u,l,R)},{x4D:u,dy4D:l})}}),Wc=We({conv2dDerInput_:Lc}),Qo=We({depthwiseConv2d_:function(n,t,e,r,i,a,s){i===void 0&&(i="NHWC"),a===void 0&&(a=[1,1]);var u=Oe(n,"x","depthwiseConv2d"),l=Oe(t,"filter","depthwiseConv2d"),f=u,A=!1;u.rank===3&&(A=!0,f=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),Y(f.rank===4,function(){return"Error in depthwiseConv2d: input must be rank 4, but got rank "+f.rank+"."}),Y(l.rank===4,function(){return"Error in depthwiseConv2d: filter must be rank 4, but got rank "+l.rank+"."}),Y(f.shape[3]===l.shape[2],function(){return"Error in depthwiseConv2d: number of input channels ("+f.shape[3]+") must match the inChannels dimension in filter "+l.shape[2]+"."}),a==null&&(a=[1,1]),Y(pn(e,a),function(){return"Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+a+"'"}),s!=null&&Y(ge(r),function(){return"Error in depthwiseConv2d: pad must be an integer when using, dimRoundingMode "+s+" but got pad "+r+"."});var I=zi(f.shape,l.shape,e,a,r,s,!0),R=[f,l],z=ze.runKernelFunc(function(te,oe){var ae=te.depthwiseConv2D(f,l,I);return oe([f,l]),ae},{x:f,filter:l},function(te,oe){Y(ua(a),function(){return"Error in gradient of depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+a+"'"});var ae=oe[0],se=oe[1];return{x:function(){return zc(ae.shape,te,se,I)},filter:function(){return Vc(ae,te,se.shape,I)}}},"DepthwiseConv2dNative",I,R);return A?z.as3D(z.shape[1],z.shape[2],z.shape[3]):z}}),zc=We({depthwiseConv2dDerInput_:function(n,t,e,r){var i=t,a=!1;t.rank===3&&(a=!0,i=t.as4D(1,t.shape[0],t.shape[1],t.shape[2]));var s=ze.runKernelFunc(function(u){return u.depthwiseConv2DDerInput(i,e,r)},{dy4D:i});return a?s.as3D(s.shape[1],s.shape[2],s.shape[3]):s}}),Vc=We({depthwiseConv2dDerFilter_:function(n,t,e,r){var i=n;n.rank===3&&(i=n.as4D(1,n.shape[0],n.shape[1],n.shape[2]));var a=t;return a.rank===3&&(a=t.as4D(1,t.shape[0],t.shape[1],t.shape[2])),ze.runKernelFunc(function(s){return s.depthwiseConv2DDerFilter(i,a,r)},{x4D:i,dy4D:a})}}),Hs=We({separableConv2d_:function(n,t,e,r,i,a,s){a===void 0&&(a=[1,1]),s===void 0&&(s="NHWC");var u=Oe(n,"x","separableConv2d"),l=Oe(t,"depthwiseFilter","separableConv2d"),f=Oe(e,"pointwiseFilter","separableConv2d"),A=u,I=!1;if(u.rank===3&&(I=!0,A=u.as4D(1,u.shape[0],u.shape[1],u.shape[2])),s==="NCHW")throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");Y(A.rank===4,function(){return"Error in separableConv2d: input must be rank 4, but got rank "+A.rank+"."}),Y(l.rank===4,function(){return"Error in separableConv2d: depthwise filter must be rank 4, but got rank "+l.rank+"."}),Y(f.rank===4,function(){return"Error in separableConv2d: pointwise filter must be rank 4, but got rank "+l.rank+"."}),Y(f.shape[0]===1,function(){return"Error in separableConv2d: the first dimension of pointwise filter must be 1, but got "+f.shape[0]+"."}),Y(f.shape[1]===1,function(){return"Error in separableConv2d: the second dimension of pointwise filter must be 1, but got "+f.shape[1]+"."});var R=l.shape[2],z=l.shape[3];Y(f.shape[2]===R*z,function(){return"Error in separableConv2d: the third dimension of pointwise filter must be "+R*z+", but got "+f.shape[2]+"."});var te=Qo(A,l,r,i,s,a),oe=Mn(te,f,1,"valid",s);return I?oe.as3D(oe.shape[1],oe.shape[2],oe.shape[3]):oe}}),am=We({conv2dTranspose_:function(n,t,e,r,i,a){return Lc(e,Oe(n,"x","conv2dTranspose"),Oe(t,"filter","conv2dTranspose"),r,i,"NHWC",a)}}),om=We({conv3dTranspose_:function(n,t,e,r,i){return Uc(e,Oe(n,"x","conv3dTranspose"),Oe(t,"filter","conv3dTranspose"),r,i)}}),Go=We({matMul_:function(n,t,e,r){var i;e===void 0&&(e=!1),r===void 0&&(r=!1);var a=Oe(n,"a","matMul"),s=Oe(t,"b","matMul");i=_t(a,s),a=i[0],s=i[1];var u=e?a.shape[a.rank-2]:a.shape[a.rank-1],l=r?s.shape[s.rank-1]:s.shape[s.rank-2],f=e?a.shape[a.rank-1]:a.shape[a.rank-2],A=r?s.shape[s.rank-2]:s.shape[s.rank-1],I=a.shape.slice(0,-2),R=s.shape.slice(0,-2),z=le(I),te=le(R);Y(a.rank>=2&&s.rank>=2&&a.rank===s.rank,function(){return"Error in matMul: inputs must have the same rank of at least 2, got ranks "+a.rank+" and "+s.rank+"."}),Y(ue(I,R),function(){return"Error in matMul: outer dimensions ("+I+") and ("+R+") of Tensors with shapes "+a.shape+" and "+s.shape+" must match."}),Y(u===l,function(){return"Error in matMul: inner shapes ("+u+") and ("+l+") of Tensors with shapes "+a.shape+" and "+s.shape+" and transposeA="+e+" and transposeB="+r+" must match."});var oe=a.shape.slice(0,-2).concat([f,A]),ae=e?a.as3D(z,u,f):a.as3D(z,f,u),se=r?s.as3D(te,A,l):s.as3D(te,l,A),we={transposeA:e,transposeB:r};return ze.runKernelFunc(function(xe,me){var Se=xe.batchMatMul(ae,se,e,r);return me([ae,se]),Se},{a:ae,b:se},function(xe,me){var Se=me,Re=Se[0],Me=Se[1];return e||r?!e&&r?{a:function(){return xe.matMul(Me,!1,!1)},b:function(){return xe.matMul(Re,!0,!1)}}:e&&!r?{a:function(){return Me.matMul(xe,!1,!0)},b:function(){return Re.matMul(xe,!1,!1)}}:{a:function(){return Me.matMul(xe,!0,!0)},b:function(){return xe.matMul(Re,!0,!0)}}:{a:function(){return xe.matMul(Me,!1,!0)},b:function(){return Re.matMul(xe,!0,!1)}}},"BatchMatMul",we).reshape(oe)}}),sm=We({dot_:function(n,t){var e=Oe(n,"t1","dot"),r=Oe(t,"t2","dot");Y(!(e.rank!==1&&e.rank!==2||r.rank!==1&&r.rank!==2),function(){return"Error in dot: inputs must all be rank 1 or 2, but got ranks "+e.rank+" and "+r.rank+"."});var i=e.rank===1?e.size:e.shape[1],a=r.rank===1?r.size:r.shape[0];return Y(i===a,function(){return"Error in dot: inner dimensions of inputs must match, but got "+i+" and "+a+"."}),e.rank===1&&r.rank===1?e.as2D(1,-1).matMul(r.as2D(-1,1)).asScalar():e.rank===1&&r.rank===2?e.as2D(1,-1).matMul(r.as2D(r.shape[0],r.shape[1])).as1D():e.rank===2&&r.rank===1?e.matMul(r.as2D(-1,1)).as1D():e.matMul(r.as2D(r.shape[0],r.shape[1]))}}),um=We({outerProduct_:function(n,t){var e=Oe(n,"v1","outerProduct"),r=Oe(t,"v2","outerProduct");return Y(e.rank===1&&r.rank===1,function(){return"Error in outerProduct: inputs must be rank 1, but got ranks "+e.rank+" and "+r.rank+"."}),e.as2D(-1,1).matMul(r.as2D(1,-1))}}),io=We({reverse_:function(n,t){var e=Oe(n,"x","reverse");if(e.rank===0)return e.clone();var r=ye(t,e.shape);return ze.runKernelFunc(function(i){return i.reverse(e,r)},{$x:e},function(i){return{$x:function(){return i.reverse(r)}}}).reshapeAs(e)}}),lm=We({reverse1d_:function(n){var t=Oe(n,"x","reverse");return Y(t.rank===1,function(){return"Error in reverse1D: x must be rank 1 but got rank "+t.rank+"."}),io(t,0)}}),cm=We({reverse2d_:function(n,t){var e=Oe(n,"x","reverse");return Y(e.rank===2,function(){return"Error in reverse2D: x must be rank 2 but got rank "+e.rank+"."}),io(e,t)}}),fm=We({reverse3d_:function(n,t){var e=Oe(n,"x","reverse");return Y(e.rank===3,function(){return"Error in reverse3D: x must be rank 3 but got rank "+e.rank+"."}),io(e,t)}}),dm=We({reverse4d_:function(n,t){var e=Oe(n,"x","reverse");return Y(e.rank===4,function(){return"Error in reverse4D: x must be rank 4 but got rank "+e.rank+"."}),io(e,t)}});function Qc(n,t,e,r,i,a){var s=Oe(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),r==null&&(r=[1,1]),Y(u.rank===4,function(){return"Error in maxPool: input must be rank 4 but got rank "+u.rank+"."}),Y(pn(e,r),function(){return"Error in maxPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"}),a!=null&&Y(ge(i),function(){return"Error in maxPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var f=Ta(u.shape,t,e,r,i,a);if(f.filterWidth===1&&f.filterHeight===1&&ue(f.inShape,f.outShape))return s.clone();var A=[u],I=ze.runKernelFunc(function(R,z){var te=R.maxPool(u,f);return z([u,te]),te},{x:u},function(R,z){var te=z[0],oe=z[1];return{x:function(){return function(ae,se,we,xe,me,Se,Re,Me){var Fe=Oe(ae,"dy","maxPoolBackprop"),je=Oe(se,"input","maxPoolBackprop"),Be=Oe(we,"output","maxPoolBackprop");Y(je.rank===Fe.rank,function(){return"Rank of input ("+je.rank+") does not match rank of dy ("+Fe.rank+")"}),Se==null&&(Se=[1,1]),Y(pn(me,Se),function(){return"Error in maxPoolBackProp: Either strides or dilations must be 1. Got strides "+me+" and dilations '"+Se+"'"}),Y(Fe.rank===4,function(){return"Error in maxPoolBackprop: dy must be rank 4 but got rank "+Fe.rank+"."}),Y(je.rank===4,function(){return"Error in maxPoolBackprop: input must be rank 4 but got rank "+je.rank+"."}),Me!=null&&Y(ge(Re),function(){return"Error in maxPoolBackprop: pad must be an integer when using, dimRoundingMode "+Me+" but got pad "+Re+"."});var Ge=Ta(je.shape,xe,me,Se,Re,Me);return ze.runKernelFunc(function(Qe){return Qe.maxPoolBackprop(Fe,je,Be,Ge)},{$dy:Fe,$input:je})}(R,te,oe,t,e,r,i)}}},"MaxPool",f,A);return l?I.as3D(I.shape[1],I.shape[2],I.shape[3]):I}function Gc(n,t,e,r,i,a){var s=Oe(n,"x","avgPool","float32");r==null&&(r=[1,1]),Y(pn(e,r),function(){return"Error in avgPool: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+r+"'"});var u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),Y(u.rank===4,function(){return"Error in avgPool: x must be rank 4 but got rank "+u.rank+"."}),a!=null&&Y(ge(i),function(){return"Error in avgPool: pad must be an integer when using, dimRoundingMode "+a+" but got pad "+i+"."});var f=Ta(u.shape,t,e,r,i,a);if(f.filterWidth===1&&f.filterHeight===1&&ue(f.inShape,f.outShape))return s.clone();var A=ze.runKernelFunc(function(I){return I.avgPool(u,f)},{x:u},function(I){return{x:function(){return function(R,z,te,oe,ae,se){var we=Oe(R,"dy","avgPoolBackprop"),xe=Oe(z,"input","avgPoolBackprop");Y(xe.rank===we.rank,function(){return"Rank of input ("+xe.rank+") does not match rank of dy ("+we.rank+")"}),ae==null&&(ae=[1,1]),Y(pn(oe,ae),function(){return"Error in avgPoolBackprop: Either strides or dilations must be 1. Got strides "+oe+" and dilations '"+ae+"'"});var me=xe,Se=we,Re=!1;xe.rank===3&&(Re=!0,me=xe.as4D(1,xe.shape[0],xe.shape[1],xe.shape[2]),Se=we.as4D(1,we.shape[0],we.shape[1],we.shape[2])),Y(Se.rank===4,function(){return"Error in avgPoolBackprop: dy must be rank 4 but got rank "+Se.rank+"."}),Y(me.rank===4,function(){return"Error in avgPoolBackprop: input must be rank 4 but got rank "+me.rank+"."});var Me=Ta(me.shape,te,oe,ae,se),Fe=ze.runKernelFunc(function(je){return je.avgPoolBackprop(Se,me,Me)},{dy4D:Se,input4D:me});return Re?Fe.as3D(Fe.shape[1],Fe.shape[2],Fe.shape[3]):Fe}(I,u,t,e,r,i)}}},"AvgPool",f);return A=A.cast(s.dtype),l?A.as3D(A.shape[1],A.shape[2],A.shape[3]):A}var Qr=We({maxPool_:function(n,t,e,r,i){return Qc(n,t,e,1,r,i)}}),ao=We({avgPool_:function(n,t,e,r,i){return Gc(n,t,e,1,r,i)}}),hm=We({pool_:function(n,t,e,r,i,a){i==null&&(i=[1,1]),a==null&&(a=1),r===0&&(r="valid");var s=Oe(n,"x","maxPool"),u=s,l=!1;s.rank===3&&(l=!0,u=s.as4D(1,s.shape[0],s.shape[1],s.shape[2])),Y(pn(a,i),function(){return"Error in pool: Either strides or dilations must be 1. Got strides "+a+" and dilations '"+i+"'"});var f,A=Ta(u.shape,t,a,i,r),I=[A.dilationHeight,A.dilationWidth];f=r==="same"?function(me,Se){var Re=me.map(function(je,Be){return je+(je-1)*(Se[Be]-1)}).map(function(je){return je-1}),Me=Re.map(function(je){return Math.floor(je/2)}),Fe=Re.map(function(je,Be){return je-Me[Be]});return Re.map(function(je,Be){return[Me[Be],Fe[Be]]})}([A.filterHeight,A.filterWidth],I):[[0,0],[0,0]];var R=I[0]===1&&I[1]===1,z=function(me,Se,Re){var Me=Re.map(function(Ye){return Ye[0]}),Fe=Re.map(function(Ye){return Ye[1]}),je=me.concat(Me,Fe),Be=Se.map(function(Ye,tt){return(Ye-je[tt]%Ye)%Ye}),Ge=Fe.map(function(Ye,tt){return Ye+Be[tt]}),Qe=Se.map(function(Ye,tt){return[Me[tt],Ge[tt]]}),Ze=Se.map(function(Ye,tt){return[0,Be[tt]]});return[Qe,Ze]}([A.inHeight,A.inWidth],I,f),te=z[0],oe=z[1],ae=R?r:"valid",se=R?u:pl(u,I,te),we=(e==="avg"?function(){return Gc(se,t,a,1,ae)}:function(){return Qc(se,t,a,1,ae)})(),xe=R?we:fl(we,I,oe);return l?xe.as3D(xe.shape[1],xe.shape[2],xe.shape[3]):xe}}),pm=We({maxPool3d_:function(n,t,e,r,i,a,s){a===void 0&&(a="NDHWC");var u=Oe(n,"x","maxPool3d"),l=u,f=!1;u.rank===4&&(f=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),Y(l.rank===5,function(){return"Error in maxPool3d: x must be rank 5 but got rank "+l.rank+"."}),Y(a==="NDHWC",function(){return"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+a}),Y(pn(e,s),function(){return"Error in maxPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&Y(ge(r),function(){return"Error in maxPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=Ya(l.shape,t,e,s,r,i,a),I=ze.runKernelFunc(function(R,z){var te=R.maxPool3d(l,A);return z([l,te]),te},{x:l},function(R,z){var te=z[0],oe=z[1];return{x:function(){return function(ae,se,we,xe,me,Se,Re,Me){var Fe=Oe(ae,"dy","maxPool3dBackprop"),je=Oe(se,"input","maxPool3dBackprop"),Be=Oe(we,"output","maxPool3dBackprop"),Ge=Fe,Qe=je,Ze=Be,Ye=!1;je.rank===4&&(Ye=!0,Ge=Fe.as5D(1,Fe.shape[0],Fe.shape[1],Fe.shape[2],Fe.shape[3]),Qe=je.as5D(1,je.shape[0],je.shape[1],je.shape[2],je.shape[3]),Ze=Be.as5D(1,Be.shape[0],Be.shape[1],Be.shape[2],Be.shape[3])),Y(Ge.rank===5,function(){return"Error in maxPool3dBackprop: dy must be rank 5 but got rank "+Ge.rank+"."}),Y(Qe.rank===5,function(){return"Error in maxPool3dBackprop: input must be rank 5 but got rank "+Qe.rank+"."}),Y(Ze.rank===5,function(){return"Error in maxPool3dBackprop: output must be rank 5 but got rank "+Ze.rank+"."}),Se==null&&(Se=[1,1,1]),Y(pn(me,Se),function(){return"Error in maxPool3dBackprop: Either strides or dilations must be 1. Got strides "+me+" and dilations '"+Se+"'"}),Me!=null&&Y(ge(Re),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+Me+" but got pad "+Re+"."});var tt=Ya(Qe.shape,xe,me,Se,Re,Me),st=ze.runKernelFunc(function(at){return at.maxPool3dBackprop(Ge,Qe,Ze,tt)},{dy5D:Ge,input5D:Qe});return Ye?st.as4D(st.shape[1],st.shape[2],st.shape[3],st.shape[4]):st}(R,te,oe,t,e,s,r,i)}}});return f?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}}),vm=We({avgPool3d_:function(n,t,e,r,i,a,s){a===void 0&&(a="NDHWC");var u=Oe(n,"x","avgPool3d","float32"),l=u,f=!1;u.rank===4&&(f=!0,l=u.as5D(1,u.shape[0],u.shape[1],u.shape[2],u.shape[3])),s==null&&(s=[1,1,1]),Y(l.rank===5,function(){return"Error in avgPool3d: x must be rank 5 but got rank "+l.rank+"."}),Y(a==="NDHWC",function(){return"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+a}),Y(pn(e,s),function(){return"Error in avgPool3d: Either strides or dilations must be 1. Got strides "+e+" and dilations '"+s+"'"}),i!=null&&Y(ge(r),function(){return"Error in avgPool3d: pad must be an integer when using, dimRoundingMode "+i+" but got pad "+r+"."});var A=Ya(l.shape,t,e,s,r,i,a),I=ze.runKernelFunc(function(R){return R.avgPool3d(l,A)},{x:l},function(R){return{x:function(){return function(z,te,oe,ae,se,we,xe){var me=Oe(z,"dy","avgPool3dBackprop"),Se=Oe(te,"input","avgPool3dBackprop"),Re=me,Me=Se,Fe=!1;Se.rank===4&&(Fe=!0,Re=me.as5D(1,me.shape[0],me.shape[1],me.shape[2],me.shape[3]),Me=Se.as5D(1,Se.shape[0],Se.shape[1],Se.shape[2],Se.shape[3])),Y(Re.rank===5,function(){return"Error in avgPool3dBackprop: dy must be rank 5 but got rank "+Re.rank+"."}),Y(Me.rank===5,function(){return"Error in avgPool3dBackprop: input must be rank 5 but got rank "+Me.rank+"."}),se==null&&(se=[1,1,1]),Y(pn(ae,se),function(){return"Error in avgPool3dBackprop: Either strides or dilations must be 1. Got strides "+ae+" and dilations '"+se+"'"}),xe!=null&&Y(ge(we),function(){return"Error in maxPool3dBackprop: pad must be an integer when using, dimRoundingMode "+xe+" but got pad "+we+"."});var je=Ya(Me.shape,oe,ae,se,we,xe),Be=ze.runKernelFunc(function(Ge){return Ge.avgPool3dBackprop(Re,Me,je)},{dy5D:Re,input5D:Me});return Fe?Be.as4D(Be.shape[1],Be.shape[2],Be.shape[3],Be.shape[4]):Be}(R,l,t,e,s,r,i)}}});return I=I.cast(l.dtype),f?I.as4D(I.shape[1],I.shape[2],I.shape[3],I.shape[4]):I}}),ii=We({slice_:function(n,t,e){var r,i,a=Oe(n,"x","slice");if(a.rank===0)throw new Error("Slicing scalar is not possible");(r=typeof t=="number"?[t].concat(new Array(a.rank-1).fill(0)):t.length<a.rank?t.concat(new Array(a.rank-t.length).fill(0)):t.slice()).forEach(function(l){Y(l!==-1,function(){return"slice() does not support negative begin indexing."})}),i=(i=e==null?new Array(a.rank).fill(-1):typeof e=="number"?[e].concat(new Array(a.rank-1).fill(-1)):e.length<a.rank?e.concat(new Array(a.rank-e.length).fill(-1)):e).map(function(l,f){return l>=0?l:(Y(l===-1,function(){return"Negative size values should be exactly -1 but got "+l+" for the slice() size at index "+f+"."}),a.shape[f]-r[f])}),wl(a,r,i);var s=a.shape,u={begin:r,size:i};return ze.runKernelFunc(function(l){return l.slice(a,r,i)},{x:a},function(l){for(var f=[],A=0;A<l.rank;A++)f.push([r[A],s[A]-r[A]-i[A]]);return{x:function(){return l.pad(f)}}},"Slice",u)}}),mm=We({slice1d_:function(n,t,e){var r=Oe(n,"x","slice1d");return Y(r.rank===1,function(){return"slice1d expects a rank-1 tensor, but got a rank-"+r.rank+" tensor"}),ii(r,[t],[e])}}),gm=We({slice2d_:function(n,t,e){var r=Oe(n,"x","slice2d");return Y(r.rank===2,function(){return"slice2d expects a rank-2 tensor, but got a rank-"+r.rank+" tensor"}),ii(r,t,e)}}),Hc=We({slice3d_:function(n,t,e){var r=Oe(n,"x","slice3d");return Y(r.rank===3,function(){return"slice3d expects a rank-3 tensor, but got a rank-"+r.rank+" tensor"}),ii(r,t,e)}}),ym=We({slice4d_:function(n,t,e){var r=Oe(n,"x","slice4d");return Y(r.rank===4,function(){return"slice4d expects a rank-4 tensor, but got a rank-"+r.rank+" tensor"}),ii(r,t,e)}});function Xc(n,t,e,r,i){return t.rank<e.rank&&(t=t.reshape(_r(t.shape,r))),n.rank<e.rank&&(n=n.reshape(_r(n.shape,r))),{x:function(){var a=n.mul(e.equal(t).cast(n.dtype));return i==null?a:a.transpose(i)}}}var bm=We({all_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","all","bool"),i=ye(t,r.shape),a=i,s=hn(a,r.rank);s!=null&&(r=r.transpose(s),a=bt(a.length,r.rank));var u=ze.runKernelFunc(function(f){return f.all(r,a)},{$x:r});if(e){var l=_r(u.shape,i);return u.reshape(l)}return u}}),wm=We({any_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","any","bool"),i=ye(t,r.shape),a=i,s=hn(a,r.rank);s!=null&&(r=r.transpose(s),a=bt(a.length,r.rank));var u=ze.runKernelFunc(function(f){return f.any(r,a)},{$x:r});if(e){var l=_r(u.shape,i);return u.reshape(l)}return u}}),Am=We({argMax_:function(n,t){t===void 0&&(t=0);var e=Oe(n,"x","argMax");t==null&&(t=0);var r=ye(t,e.shape),i=hn(r,e.rank);i!=null&&(e=e.transpose(i),r=bt(r.length,e.rank));var a={axis:r[0]},s=[e];return ze.runKernelFunc(function(u,l){var f=u.argMax(e,r[0]);return l([e]),f},{x:e},function(u,l){var f=l[0];return{x:function(){return Gt(f)}}},"ArgMax",a,s)}}),xm=We({argMin_:function(n,t){t===void 0&&(t=0);var e=Oe(n,"x","argMin");t==null&&(t=0);var r=ye(t,e.shape),i=hn(r,e.rank);return i!=null&&(e=e.transpose(i),r=bt(r.length,e.rank)),ze.runKernelFunc(function(a,s){var u=a.argMin(e,r[0]);return s([e]),u},{$x:e},function(a,s){var u=s[0];return{$x:function(){return Gt(u)}}})}}),Em=We({logSumExp_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","logSumExp"),i=ye(t,r.shape),a=r.max(i,!0),s=r.sub(a).exp().sum(i).log(),u=a.reshape(s.shape).add(s);if(e){var l=_r(u.shape,i);return u.reshape(l)}return u}}),Ho=We({max_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","max"),i=r,a=ye(t,r.shape),s=a,u=hn(s,r.rank);u!=null&&(r=r.transpose(u),s=bt(s.length,r.rank));var l=[r],f=ze.runKernelFunc(function(I,R){var z=I.max(r,s);return R([i,z]),z},{x:r},function(I,R){return Xc(I,R[1],R[0],a,u)},"Max",{axes:s},l,[!0]);if(e){var A=_r(f.shape,a);f=f.reshape(A)}return f}}),Cm=We({mean_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","mean"),i=ye(t,r.shape),a=le(xr(r.shape,i)[1]);return Oo(function(s){var u=vt(a);return{value:(u.dtype===s.dtype?s:s.cast(u.dtype)).div(u).sum(t,e),gradFunc:function(l){var f=s.shape.slice();return i.forEach(function(A){f[A]=1}),l.reshape(f).mul(Sa(s.shape,"float32")).div(a)}}})(r)}}),Sm=We({min_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","min"),i=r,a=ye(t,r.shape),s=a,u=hn(s,r.rank);u!=null&&(r=r.transpose(u),s=bt(s.length,r.rank));var l=[r],f=ze.runKernelFunc(function(I,R){var z=I.min(r,s);return R([i,z]),z},{x:r},function(I,R){return Xc(I,R[1],R[0],a,u)},"Min",{axes:s},l,[!0]);if(e){var A=_r(f.shape,a);f=f.reshape(A)}return f}}),Im=We({moments_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=ye(t,(n=Oe(n,"x","moments")).shape),i=n.mean(r,e),a=i.shape;e||(a=_r(i.shape,r));var s=n.toFloat().sub(i.reshape(a)).square();return{mean:i,variance:s.mean(r,e)}}}),Kc=We({sum_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","sum");r.dtype==="bool"&&(r=r.toInt());var i=ye(t,r.shape);return Oo(function(a){var s=hn(i,a.rank),u=i,l=a;s!=null&&(l=a.transpose(s),u=bt(u.length,a.rank));var f=function(z){var te=a.shape.slice();return i.forEach(function(oe){te[oe]=1}),z.reshape(te).mul(Sa(a.shape,"float32"))},A={axes:u},I=ze.runKernelFunc(function(z){return z.sum(l,u)},{x:l},function(z){return{x:function(){return f(z)}}},"Sum",A);if(e){var R=_r(I.shape,i);I=I.reshape(R)}return{value:I,gradFunc:f}})(r)}}),Tm=We({prod_:function(n,t,e){t===void 0&&(t=null),e===void 0&&(e=!1);var r=Oe(n,"x","prod");r.dtype==="bool"&&(r=r.toInt());var i=ye(t,r.shape),a=hn(i,r.rank),s=i,u=r;a!=null&&(u=r.transpose(a),s=bt(s.length,r.rank));var l=ze.runKernelFunc(function(A){return A.prod(u,s)},{permutedX:u});if(e){var f=_r(l.shape,i);l=l.reshape(f)}return l}}),Zc=We({elu_:function(n){var t=Oe(n,"x","elu");return ze.runKernelFunc(function(e,r){var i=e.elu(t);return r([i]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){return ze.runKernelFunc(function(a){return a.eluDer(e,i)},{dy:e,y:i})}}})}}),Rm=We({leakyRelu_:function(n,t){t===void 0&&(t=.2);var e=Oe(n,"x","leakyRelu");return zs(vt(t).mul(e),e)}}),Jc=We({prelu_:function(n,t){var e=Oe(n,"x","prelu"),r=Oe(t,"alpha","prelu");return ze.runKernelFunc(function(i,a){var s=i.prelu(e,r);return a([e,r]),s},{x:e,alpha:r},function(i,a){var s=a[0],u=a[1],l=s.greater(0);return{x:function(){return fa(l,i,i.mul(u))},alpha:function(){var f=fa(l,Gt(i),i.mul(s)),A=Rr(u.shape,i.shape);return A.length>0&&(f=f.sum(A)),f.reshape(u.shape)}}},"Prelu")}}),gr=We({relu_:function(n){var t=Oe(n,"x","relu");return t.dtype==="bool"?t.toInt():ze.runKernelFunc(function(e,r){var i=e.relu(t);return r([t]),i},{x:t},function(e,r){var i=r[0];return{x:function(){return e.mulStrict(i.step().toFloat())}}},"Relu")}}),Yc=We({relu6_:function(n){var t=Oe(n,"x","relu6");return t.dtype==="bool"?t.toInt():ze.runKernelFunc(function(e,r){var i=e.relu6(t);return r([t]),i},{x:t},function(e,r){var i=r[0],a=i.lessEqual(6).mul(i.step());return{x:function(){return e.mulStrict(a.toFloat())}}},"Relu6")}}),km=We({selu_:function(n){var t=Oe(n,"x","selu");return ze.runKernelFunc(function(e,r){var i=e.selu(t);return r([t]),i},{$x:t},function(e,r){var i=r[0];return{$x:function(){var a=i.greater(vt(0)),s=vt(Fs),u=vt(Ls),l=e.mul(u),f=e.mul(s).mul(i.toFloat().exp());return fa(a,l,f)}}})}}),Vi=We({transpose_:function(n,t){var e=Oe(n,"x","transpose");if(t==null&&(t=e.shape.map(function(i,a){return a}).reverse()),Y(e.rank===t.length,function(){return"Error in transpose: rank of input "+e.rank+" must match length of perm "+t+"."}),t.forEach(function(i){Y(i>=0&&i<e.rank,function(){return"All entries in 'perm' must be between 0 and "+(e.rank-1)+" but got "+t})}),e.rank<=1)return e.clone();var r={perm:t};return ze.runKernelFunc(function(i){return i.transpose(e,t)},{x:e},function(i){var a=gt(t);return{x:function(){return i.transpose(a)}}},"Transpose",r)}}),Om=We({localResponseNormalization_:function(n,t,e,r,i){t===void 0&&(t=5),e===void 0&&(e=1),r===void 0&&(r=1),i===void 0&&(i=.5);var a=Oe(n,"x","localResponseNormalization");Y(a.rank===4||a.rank===3,function(){return`Error in localResponseNormalization: x must be rank 3 or 4 but got
|
|
rank `+a.rank+"."}),Y(ge(t),function(){return"Error in localResponseNormalization: depthRadius must be an integer but got depthRadius "+t+"."});var s=a,u=!1;a.rank===3&&(u=!0,s=a.as4D(1,a.shape[0],a.shape[1],a.shape[2]));var l=ze.runKernelFunc(function(f,A){var I=f.localResponseNormalization4D(s,t,e,r,i);return A([s,I]),I},{x4D:s},function(f,A){var I=A[0],R=A[1];return{x4D:function(){return ze.runKernelFunc(function(z){return z.LRNGrad(f,I,R,t,e,r,i)},{})}}});return u?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),$c=We({norm_:function(n,t,e,r){t===void 0&&(t="euclidean"),e===void 0&&(e=null),r===void 0&&(r=!1);var i=function u(l,f,A){if(A===void 0&&(A=null),l.rank===0)return l.abs();if(l.rank!==1&&A===null)return u(l.reshape([-1]),f,A);if(l.rank===1||typeof A=="number"||Array.isArray(A)&&A.length===1){if(f===1)return l.abs().sum(A);if(f===1/0)return l.abs().max(A);if(f===-1/0)return l.abs().min(A);if(f==="euclidean"||f===2)return l.abs().pow(vt(2,"int32")).sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+f)}if(Array.isArray(A)&&A.length===2){if(f===1)return l.abs().sum(A[0]).max(A[1]-1);if(f===1/0)return l.abs().sum(A[1]).max(A[0]);if(f===-1/0)return l.abs().sum(A[1]).min(A[0]);if(f==="fro"||f==="euclidean")return l.square().sum(A).sqrt();throw new Error("Error in norm: invalid ord value: "+f)}throw new Error("Error in norm: invalid axis: "+A)}(n=Oe(n,"x","norm"),t,e),a=i.shape;if(r){var s=ye(e,n.shape);a=_r(i.shape,s)}return i.reshape(a)}}),Dm=We({basicLSTMCell_:function(n,t,e,r,i,a){var s=Oe(n,"forgetBias","basicLSTMCell"),u=Oe(t,"lstmKernel","basicLSTMCell"),l=Oe(e,"lstmBias","basicLSTMCell"),f=Oe(r,"data","basicLSTMCell"),A=Oe(i,"c","basicLSTMCell"),I=Oe(a,"h","basicLSTMCell"),R=f.concat(I,1).matMul(u).add(l),z=R.shape[0],te=R.shape[1]/4,oe=[z,te],ae=R.slice([0,0],oe),se=R.slice([0,te],oe),we=R.slice([0,2*te],oe),xe=R.slice([0,3*te],oe),me=ae.sigmoid().mulStrict(se.tanh()).addStrict(A.mulStrict(s.add(we).sigmoid())),Se=me.tanh().mulStrict(xe.sigmoid());return[me,Se]}}),jm=We({multiRNNCell_:function(n,t,e,r){for(var i=Oe(t,"data","multiRNNCell"),a=dn(e,"c","multiRNNCell"),s=dn(r,"h","multiRNNCell"),u=i,l=[],f=0;f<n.length;f++){var A=n[f](u,a[f],s[f]);l.push(A[0]),l.push(A[1]),u=A[1]}var I=[],R=[];for(f=0;f<l.length;f+=2)I.push(l[f]),R.push(l[f+1]);return[I,R]}}),Pm=We({movingAverage_:function(n,t,e,r,i){i===void 0&&(i=!0);var a=Oe(n,"v","movingAverage"),s=Oe(t,"x","movingAverage"),u=Oe(e,"decay","movingAverage");Or(a,s),Y(ue(a.shape,s.shape),function(){return"Shape mismatch in v and x"});var l=vt(1),f=l.sub(u),A=s.sub(a).mul(f);if(i){Y(r!=null,function(){return"When using zeroDebias: true, step is required."});var I=Oe(r,"step","movingAverage");A=A.div(l.sub(Vo(u,I)))}return a.add(A)}}),Bm=We({stridedSlice_:function(n,t,e,r,i,a,s,u,l){if(i===void 0&&(i=0),a===void 0&&(a=0),s===void 0&&(s=0),u===void 0&&(u=0),l===void 0&&(l=0),r==null&&(r=new Array(t.length)),s!==0)throw new Error("ellipsis mask is not yet supported");var f=Oe(n,"x","stridedSlice"),A=ws(u),I=f.shape.slice();A.forEach(function(ae){t[ae]=0,e[ae]=1,I.splice(ae,0,1)}),f=f.reshape(I);for(var R=0;R<f.rank;R++)t[R]=Al(i,t,r,f.shape,R),e[R]=xl(a,e,r,f.shape,R),r[R]=r[R]||1;var z=ws(l);z.forEach(function(ae){e[ae]=t[ae]+1,r[ae]=1});var te=ko(t,e,r),oe=te.filter(function(ae,se){return z.indexOf(se)===-1});return r.every(function(ae){return ae===1})?ii(f,t,te).reshape(oe):ze.runKernelFunc(function(ae){return ae.stridedSlice(f,t,e,r)},{$x:f}).reshape(oe)}}),_m=We({topk_:function(n,t,e){t===void 0&&(t=1),e===void 0&&(e=!0);var r=Oe(n,"x","topk");if(r.rank===0)throw new Error("topk() expects the input to be of rank 1 or higher");var i=r.shape[r.shape.length-1];if(t>i)throw new Error("'k' passed to topk() must be <= the last dimension ("+i+") but got "+t);var a=ze.runKernelFunc(function(s){return s.topk(r,t,e)},{$x:r});return{values:a[0],indices:a[1]}}}),Mm=We({scatterND_:function(n,t,e){var r=Oe(n,"indices","scatterND","int32"),i=Oe(t,"updates","scatterND");return bl(i,r,e),ze.runKernelFunc(function(a){return a.scatterND(r,i,e)},{indices:r,updates:i},null,"ScatterNd",{shape:e})}}),Xs=We({fft_:function(n){Y(n.dtype==="complex64",function(){return"The dtype for tf.spectral.fft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return ze.runKernelFunc(function(i){return i.fft(r)},{input:n}).reshape(n.shape)}}),Xo=We({ifft_:function(n){Y(n.dtype==="complex64",function(){return"The dtype for tf.spectral.ifft() must be complex64 but got "+n.dtype+"."});var t=n.shape[n.shape.length-1],e=n.size/t,r=n.as2D(e,t);return ze.runKernelFunc(function(i){return i.ifft(r)},{input:n}).reshape(n.shape)}}),Ks=We({rfft_:function(n,t){Y(n.dtype==="float32",function(){return"The dtype for rfft() must be real value but got "+n.dtype});var e,r=n.shape[n.shape.length-1],i=n.size/r;if(t!=null&&t<r){var a=n.shape.map(function(se){return 0}),s=n.shape.map(function(se){return se});s[n.shape.length-1]=t,e=n.slice(a,s),r=t}else if(t!=null&&t>r){var u=n.shape.map(function(se){return se});u[n.shape.length-1]=t-r,e=n.concat(fr(u),n.shape.length-1),r=t}else e=n;var l=e.zerosLike(),f=Er(e,l).as2D(i,r),A=Xs(f),I=Math.floor(r/2)+1,R=tn(A),z=Cn(A),te=R.split([I,r-I],R.shape.length-1),oe=z.split([I,r-I],z.shape.length-1),ae=e.shape.slice();return ae[e.shape.length-1]=I,Er(te[0],oe[0]).reshape(ae)}}),qc=We({irfft_:function(n){var t=n.shape[n.shape.length-1],e=n.size/t;if(t<=2){var r=n.as2D(e,t),i=Xo(r);return tn(i)}var a=[e,2*(t-1)],s=tn(n).as2D(e,t),u=Cn(n).as2D(e,t),l=s.slice([0,1],[e,t-2]).reverse(1),f=u.slice([0,1],[e,t-2]).reverse(1).mul(vt(-1)),A=s.concat(l,1),I=u.concat(f,1);return r=Er(A,I).as2D(a[0],a[1]),i=Xo(r),tn(i)}}),Nm=Object.freeze({fft:Xs,ifft:Xo,rfft:Ks,irfft:qc}),Fm=We({sparseToDense_:function(n,t,e,r){r===void 0&&(r=0);var i=Oe(n,"sparseIndices","sparseToDense","int32"),a=Oe(t,"sparseValues","sparseToDense"),s=Oe(r,"defaultValue","sparseToDense",a.dtype);return function(u,l,f,A){if(u.dtype!=="int32")throw new Error("tf.sparseToDense() expects the indices to be int32 type, but the dtype was "+u.dtype+".");if(u.rank>2)throw new Error("sparseIndices should be a scalar, vector, or matrix, but got shape "+u.shape+".");var I=u.rank>0?u.shape[0]:1,R=u.rank>1?u.shape[1]:1;if(f.length!==R)throw new Error("outputShape has incorrect number of elements:, "+f.length+", should be: "+R+".");var z=l.size;if(l.rank!==0&&(l.rank!==1||z!==I))throw new Error("sparseValues has incorrect shape "+l.shape+", should be [] or ["+I+"]");if(l.dtype!==A.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(i,a,e,s),ze.runKernelFunc(function(u){return u.sparseToDense(i,a,e,s)},{$sparseIndices:i,$sparseValues:a,$defaultValue:s})}}),Lm=We({gatherND_:function(n,t){var e=Oe(t,"indices","gatherND","int32"),r=Oe(n,"x","gatherND");return ze.runKernelFunc(function(i){return i.gatherND(r,e)},{x:r,indices:e},null,"GatherNd")}}),Um=We({diag_:function(n){var t=Oe(n,"x","diag").flatten(),e=n.shape.concat(n.shape);return ze.runKernelFunc(function(r){return r.diag(t)},{$x:t}).reshape(e)}}),Wm=We({dropout_:function(n,t,e,r){var i=Oe(n,"x","dropout");if(Y(i.dtype==="float32",function(){return"x has to be a floating point tensor since it's going to be scaled, but got a "+i.dtype+" tensor instead."}),Y(t>=0&&t<1,function(){return"rate must be a float in the range [0, 1), but got "+t+"."}),t===0)return n instanceof Dt?i.clone():i;var a=function(l,f){if(f==null)return l.shape.slice();if(ue(l.shape,f))return f;if(l.shape.length===f.length){for(var A=[],I=0;I<l.shape.length;I++)f[I]==null&&l.shape[I]!=null?A.push(l.shape[I]):A.push(f[I]);return A}return f}(i,e),s=1-t,u=hl(a,0,1,"float32",r).add(s).floor().div(s);return i.mul(u)}});function ef(n,t,e){for(var r=1-n%2,i=new Float32Array(n),a=0;a<n;++a){var s=2*Math.PI*a/(n+r-1);i[a]=t-e*Math.cos(s)}return Tr(i,"float32")}var Zs=We({hannWindow_:function(n){return ef(n,.5,.5)}}),tf=We({hammingWindow_:function(n){return ef(n,.54,.46)}}),Js=We({frame_:function(n,t,e,r,i){r===void 0&&(r=!1),i===void 0&&(i=0);for(var a=0,s=[];a+t<=n.size;)s.push(ii(n,a,t)),a+=e;if(r)for(;a<n.size;){var u=a+t-n.size,l=Mr([ii(n,a,t-u),ni([u],i)]);s.push(l),a+=e}return s.length===0?Wi([],[0,t]):Mr(s).as2D(s.length,t)}}),rf=We({stft_:function(n,t,e,r,i){var a;i===void 0&&(i=Zs),r==null&&(a=t,r=Math.floor(Math.pow(2,Math.ceil(Math.log(a)/Math.log(2)))));for(var s=Js(n,t,e),u=nn(s,i(t)),l=[],f=0;f<s.shape[0];f++)l.push(Ks(u.slice([f,0],[1,t]),r));return Mr(l)}}),zm=Object.freeze({hannWindow:Zs,hammingWindow:tf,frame:Js,stft:rf}),an,Vm=function(n,t,e){return e===void 0&&(e=1),C(this,void 0,void 0,function(){var r,i,a,s,u,l,f,A,I,R,z,te,oe,ae;return x(this,function(se){switch(se.label){case 0:return r=Oe(n,"predictions","inTopK"),i=Oe(t,"targets","inTopK"),Y(r.rank>1,function(){return"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank}),Y(r.rank-1===i.rank,function(){return"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+i.rank}),fe(r.shape.slice(0,r.shape.length-1),i.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),a=r.shape[r.shape.length-1],Y(e>0&&e<=a,function(){return"'k' passed to inTopK() must be > 0 && <= the predictions last dimension ("+a+"), but got "+e}),[4,r.data()];case 1:return s=se.sent(),[4,i.data()];case 2:for(u=se.sent(),l=[s.length/a,a],A=l[1],I=Q("bool",f=l[0]),R=0;R<f;R++){for(z=R*A,te=s.subarray(z,z+A),oe=[],ae=0;ae<te.length;ae++)oe.push({value:te[ae],index:ae});for(oe.sort(function(we,xe){return xe.value-we.value}),I[R]=0,ae=0;ae<e;ae++)if(oe[ae].index===u[R]){I[R]=1;break}}return n!==r&&r.dispose(),t!==i&&i.dispose(),[2,Cr(I,i.shape,"bool")]}})})};(function(n){n[n.NONE=0]="NONE",n[n.MEAN=1]="MEAN",n[n.SUM=2]="SUM",n[n.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"})(an||(an={}));var Qm=We({absoluteDifference_:function(n,t,e,r){r===void 0&&(r=an.SUM_BY_NONZERO_WEIGHTS);var i=Oe(n,"labels","absoluteDifference"),a=Oe(t,"predictions","absoluteDifference"),s=null;e!=null&&(s=Oe(e,"weights","absoluteDifference")),fe(i.shape,a.shape,"Error in absoluteDifference: ");var u=i.sub(a).abs();return Si(u,s,r)}}),Si=We({computeWeightedLoss_:function(n,t,e){e===void 0&&(e=an.SUM_BY_NONZERO_WEIGHTS);var r=Oe(n,"losses","computeWeightedLoss"),i=null;t!=null&&(i=Oe(t,"weights","computeWeightedLoss"));var a=i==null?r:r.mul(i);if(e===an.NONE)return a;if(e===an.SUM)return a.sum();if(e===an.MEAN){if(i==null)return a.mean();var s=r.size/i.size,u=a.sum().div(i.sum());return s>1?u.div(vt(s)):u}if(e===an.SUM_BY_NONZERO_WEIGHTS){if(i==null)return a.sum().div(vt(r.size));var l=i.mul(Sa(r.shape)).notEqual(vt(0)).sum().toFloat();return a.sum().div(l)}throw Error("Unknown reduction: "+e)}}),Gm=We({cosineDistance_:function(n,t,e,r,i){i===void 0&&(i=an.SUM_BY_NONZERO_WEIGHTS);var a=Oe(n,"labels","cosineDistance"),s=Oe(t,"predictions","cosineDistance"),u=null;r!=null&&(u=Oe(r,"weights","cosineDistance")),fe(a.shape,s.shape,"Error in cosineDistance: ");var l=vt(1).sub(a.mul(s).sum(e,!0));return Si(l,u,i)}}),Hm=We({hingeLoss_:function(n,t,e,r){r===void 0&&(r=an.SUM_BY_NONZERO_WEIGHTS);var i=Oe(n,"labels","hingeLoss"),a=Oe(t,"predictions","hingeLoss"),s=null;e!=null&&(s=Oe(e,"weights","hingeLoss")),fe(i.shape,a.shape,"Error in hingeLoss: ");var u=vt(1);i=vt(2).mul(i).sub(u);var l=u.sub(i.mul(a)).relu();return Si(l,s,r)}}),Xm=We({huberLoss_:function(n,t,e,r,i){r===void 0&&(r=1),i===void 0&&(i=an.SUM_BY_NONZERO_WEIGHTS);var a=Oe(n,"labels","huberLoss"),s=Oe(t,"predictions","huberLoss"),u=null;e!=null&&(u=Oe(e,"weights","huberLoss")),fe(a.shape,s.shape,"Error in huberLoss: ");var l=vt(r),f=s.sub(a).abs(),A=Pc(f,l),I=f.sub(A),R=vt(.5).mul(A.square()).add(l.mul(I));return Si(R,u,i)}}),Km=We({logLoss_:function(n,t,e,r,i){r===void 0&&(r=1e-7),i===void 0&&(i=an.SUM_BY_NONZERO_WEIGHTS);var a=Oe(n,"labels","logLoss"),s=Oe(t,"predictions","logLoss"),u=null;e!=null&&(u=Oe(e,"weights","logLoss")),fe(a.shape,s.shape,"Error in logLoss: ");var l=vt(1),f=vt(r),A=a.mul(s.add(f).log()).neg().sub(l.sub(a).mul(l.sub(s).add(f).log()));return Si(A,u,i)}}),Zm=We({meanSquaredError_:function(n,t,e,r){r===void 0&&(r=an.SUM_BY_NONZERO_WEIGHTS);var i=Oe(n,"labels","meanSquaredError"),a=Oe(t,"predictions","meanSquaredError"),s=null;e!=null&&(s=Oe(e,"weights","meanSquaredError")),fe(i.shape,a.shape,"Error in meanSquaredError: ");var u=i.squaredDifference(a);return Si(u,s,r)}}),Jm=We({sigmoidCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=an.SUM_BY_NONZERO_WEIGHTS);var a=Oe(n,"multiClassLabels","sigmoidCrossEntropy"),s=Oe(t,"logits","sigmoidCrossEntropy"),u=null;if(e!=null&&(u=Oe(e,"weights","sigmoidCrossEntropy")),fe(a.shape,s.shape,"Error in sigmoidCrossEntropy: "),r>0){var l=vt(r),f=vt(1),A=vt(.5);a=a.mul(f.sub(l)).add(A.mul(l))}var I=function(R,z){var te=Oe(R,"labels","sigmoidCrossEntropyWithLogits"),oe=Oe(z,"logits","sigmoidCrossEntropyWithLogits");fe(te.shape,oe.shape,"Error in sigmoidCrossEntropyWithLogits: ");var ae=oe.relu(),se=oe.mul(te),we=oe.abs().neg().exp().log1p();return ae.sub(se).add(we)}(a,s);return Si(I,u,i)}}),Ym=We({softmaxCrossEntropy_:function(n,t,e,r,i){r===void 0&&(r=0),i===void 0&&(i=an.SUM_BY_NONZERO_WEIGHTS);var a=Oe(n,"onehotLabels","softmaxCrossEntropy"),s=Oe(t,"logits","softmaxCrossEntropy"),u=null;if(e!=null&&(u=Oe(e,"weights","softmaxCrossEntropy")),fe(a.shape,s.shape,"Error in softmaxCrossEntropy: "),r>0){var l=vt(r),f=vt(1),A=vt(a.shape[1]);a=a.mul(f.sub(l)).add(l.div(A))}var I=function(R,z,te){if(te===void 0&&(te=-1),te===-1&&(te=z.rank-1),te!==z.rank-1)throw Error("Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank "+z.rank+" and dim was "+te);return Oo(function(oe,ae,se){var we=ae.logSumExp([te],!0),xe=ae.toFloat().sub(we);return se([oe,xe]),{value:xe.mul(oe).neg().sum([te]),gradFunc:function(me,Se){var Re=Se[0],Me=Se[1],Fe=_r(me.shape,[te]);return[me.reshape(Fe).mul(Re.toFloat().sub(Me.exp())),me.reshape(Fe).mul(Me.exp().sub(Re.toFloat()))]}}})(R,z)}(a,s);return Si(I,u,i)}}),$m=Object.freeze({get Reduction(){return an},absoluteDifference:Qm,computeWeightedLoss:Si,cosineDistance:Gm,hingeLoss:Hm,huberLoss:Xm,logLoss:Km,meanSquaredError:Zm,sigmoidCrossEntropy:Jm,softmaxCrossEntropy:Ym});function nf(n,t){return t===void 0&&(t=!1),ze.tidy(function(){if(n.shape.length!==2)throw new Error("qr2d() requires a 2D Tensor, but got a "+n.shape.length+"D Tensor.");for(var e=n.shape[0],r=n.shape[1],i=dl(e),a=n.clone(),s=Wi([[1]],[1,1]),u=s.clone(),l=e>=r?r:e,f=function(I){var R,z=a,te=u,oe=i;R=ze.tidy(function(){var ae=a.slice([I,I],[e-I,1]),se=ae.norm(),we=a.slice([I,I],[1,1]),xe=Wi([[-1]]).where(we.greater(0),Wi([[1]])),me=we.sub(xe.mul(se)),Se=ae.div(me);u=Se.shape[0]===1?s.clone():s.concat(Se.slice([1,0],[Se.shape[0]-1,Se.shape[1]]),0);var Re=xe.matMul(me).div(se).neg(),Me=a.slice([I,0],[e-I,r]),Fe=Re.mul(u);if(I===0)a=Me.sub(Fe.matMul(u.transpose().matMul(Me)));else{var je=Me.sub(Fe.matMul(u.transpose().matMul(Me)));a=a.slice([0,0],[I,r]).concat(je,0)}var Be=i.slice([0,I],[e,i.shape[1]-I]);if(I===0)i=Be.sub(Be.matMul(u).matMul(Fe.transpose()));else{var Ge=Be.sub(Be.matMul(u).matMul(Fe.transpose()));i=i.slice([0,0],[e,I]).concat(Ge,1)}return[u,a,i]}),u=R[0],a=R[1],i=R[2],Br([z,te,oe])},A=0;A<l;++A)f(A);return!t&&e>r&&(i=i.slice([0,0],[e,r]),a=a.slice([0,0],[r,r])),[i,a]})}var qm=We({bandPart_:function(n,t,e){if(t%1!=0)throw new Error("bandPart(): numLower must be an integer, got "+t+".");if(e%1!=0)throw new Error("bandPart(): numUpper must be an integer, got "+e+".");var r=Oe(n,"a","bandPart");if(r.rank<2)throw new Error("bandPart(): Rank must be at least 2, got "+r.rank+".");var i=r.shape,a=r.shape.slice(-2),s=a[0],u=a[1];if(!(t<=s))throw new Error("bandPart(): numLower ("+t+") must not be greater than the number of rows ("+s+").");if(!(e<=u))throw new Error("bandPart(): numUpper ("+e+") must not be greater than the number of columns ("+u+").");t<0&&(t=s),e<0&&(e=u);var l=Eo(0,s,1,"int32").reshape([-1,1]),f=Eo(0,u,1,"int32"),A=Fr(l,f),I=zo(A.lessEqual(vt(+t,"int32")),A.greaterEqual(vt(-e,"int32"))),R=fr([s,u],r.dtype);return Sn(Nr(r.reshape([-1,s,u])).map(function(z){return fa(I,z,R)})).reshape(i)}}),eg=We({gramSchmidt_:function(n){var t;if(Array.isArray(n)){t=!1,Y(n!=null&&n.length>0,function(){return"Gram-Schmidt process: input must not be null, undefined, or empty"});for(var e=n[0].shape[0],r=function(l){Y(n[l].shape[0]===e,function(){return"Gram-Schmidt: Non-unique lengths found in the input vectors: ("+n[l].shape[0]+" vs. "+e+")"})},i=1;i<n.length;++i)r(i)}else t=!0,n=vs(n,n.shape[0],0).map(function(l){return vl(l,[0])});Y(n.length<=n[0].shape[0],function(){return"Gram-Schmidt: Number of vectors ("+n.length+") exceeds number of dimensions ("+n[0].shape[0]+")."});var a=[],s=n,u=function(l){a.push(ze.tidy(function(){var f=s[l];if(l>0)for(var A=0;A<l;++A){var I=Kc(a[A].mulStrict(f)).mul(a[A]);f=f.sub(I)}return f.div($c(f,"euclidean"))}))};for(i=0;i<n.length;++i)u(i);return t?Sn(a,0):a}}),tg=We({qr_:function(n,t){if(t===void 0&&(t=!1),n.rank<2)throw new Error("qr() requires input tensor to have a rank >= 2, but got rank "+n.rank);if(n.rank===2)return nf(n,t);var e=n.shape.slice(0,n.shape.length-2).reduce(function(s,u){return s*u}),r=Nr(n.reshape([e,n.shape[n.shape.length-2],n.shape[n.shape.length-1]]),0),i=[],a=[];return r.forEach(function(s){var u=nf(s,t),l=u[0],f=u[1];i.push(l),a.push(f)}),[Sn(i,0).reshape(n.shape),Sn(a,0).reshape(n.shape)]}}),rg=Object.freeze({bandPart:qm,gramSchmidt:eg,qr:tg});function Ko(n,t,e,r,i,a){r==null&&(r=.5),i==null&&(i=Number.NEGATIVE_INFINITY),a==null&&(a=0);var s=n.shape[0];return e=Math.min(e,s),Y(0<=r&&r<=1,function(){return"iouThreshold must be in [0, 1], but was '"+r+"'"}),Y(n.rank===2,function(){return"boxes must be a 2D tensor, but was of rank '"+n.rank+"'"}),Y(n.shape[1]===4,function(){return"boxes must have 4 columns, but 2nd dimension was "+n.shape[1]}),Y(t.rank===1,function(){return"scores must be a 1D tensor"}),Y(t.shape[0]===s,function(){return"scores has incompatible shape with boxes. Expected "+s+", but was "+t.shape[0]}),Y(0<=a&&a<=1,function(){return"softNmsSigma must be in [0, 1], but was '"+a+"'"}),{maxOutputSize:e,iouThreshold:r,scoreThreshold:i,softNmsSigma:a}}var ng=We({resizeBilinear_:function(n,t,e){e===void 0&&(e=!1);var r=Oe(n,"images","resizeBilinear");Y(r.rank===3||r.rank===4,function(){return"Error in resizeBilinear: x must be rank 3 or 4, but got rank "+r.rank+"."}),Y(t.length===2,function(){return"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."});var i=r,a=!1;r.rank===3&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=ze.runKernelFunc(function(f,A){return A([i]),f.resizeBilinear(i,s,u,e)},{x:i},function(f,A){return{x:function(){return ze.runKernelFunc(function(I){return I.resizeBilinearBackprop(f,A[0],e)},{})}}},"ResizeBilinear",{alignCorners:e,newHeight:s,newWidth:u});return a?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),ig=We({resizeNearestNeighbor_:function(n,t,e){e===void 0&&(e=!1);var r=Oe(n,"images","resizeNearestNeighbor");Y(r.rank===3||r.rank===4,function(){return"Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank "+r.rank+"."}),Y(t.length===2,function(){return"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."}),Y(r.dtype==="float32"||r.dtype==="int32",function(){return"`images` must have `int32` or `float32` as dtype"});var i=r,a=!1;r.rank===3&&(a=!0,i=r.as4D(1,r.shape[0],r.shape[1],r.shape[2]));var s=t[0],u=t[1],l=ze.runKernelFunc(function(f,A){return A([i]),f.resizeNearestNeighbor(i,s,u,e)},{batchImages:i},function(f,A){return{batchImages:function(){return ze.runKernelFunc(function(I){return I.resizeNearestNeighborBackprop(f,A[0],e)},{})}}});return a?l.as3D(l.shape[1],l.shape[2],l.shape[3]):l}}),ag=We({nonMaxSuppression_:function(n,t,e,r,i){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY);var a=Oe(n,"boxes","nonMaxSuppression"),s=Oe(t,"scores","nonMaxSuppression"),u=Ko(a,s,e,r,i);e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold;var l={maxOutputSize:e,iouThreshold:r,scoreThreshold:i};return ze.runKernelFunc(function(f){return f.nonMaxSuppression(a,s,e,r,i)},{boxes:a,scores:s},null,"NonMaxSuppressionV3",l)}}),og=function(n,t,e,r,i){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),C(this,void 0,void 0,function(){var a,s,u,l,f,A,I;return x(this,function(R){switch(R.label){case 0:return a=Oe(n,"boxes","nonMaxSuppressionAsync"),s=Oe(t,"scores","nonMaxSuppressionAsync"),u=Ko(a,s,e,r,i),e=u.maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold,[4,Promise.all([a.data(),s.data()])];case 1:return l=R.sent(),f=l[0],A=l[1],I=Rs(f,A,e,r,i),a!==n&&a.dispose(),s!==t&&s.dispose(),[2,I]}})})},sg=We({nonMaxSuppressionWithScore_:function(n,t,e,r,i,a){r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),a===void 0&&(a=0);var s=Oe(n,"boxes","nonMaxSuppression"),u=Oe(t,"scores","nonMaxSuppression"),l=Ko(s,u,e,r,i,a),f={maxOutputSize:e=l.maxOutputSize,iouThreshold:r=l.iouThreshold,scoreThreshold:i=l.scoreThreshold,softNmsSigma:a=l.softNmsSigma},A=ze.runKernel("NonMaxSuppressionV5",{boxes:s,scores:u},f);return{selectedIndices:A[0],selectedScores:A[1]}}}),ug=function(n,t,e,r,i,a){return r===void 0&&(r=.5),i===void 0&&(i=Number.NEGATIVE_INFINITY),a===void 0&&(a=0),C(this,void 0,void 0,function(){var s,u,l,f,A,I,R;return x(this,function(z){switch(z.label){case 0:return s=Oe(n,"boxes","nonMaxSuppressionAsync"),u=Oe(t,"scores","nonMaxSuppressionAsync"),l=Ko(s,u,e,r,i,a),e=l.maxOutputSize,r=l.iouThreshold,i=l.scoreThreshold,a=l.softNmsSigma,[4,Promise.all([s.data(),u.data()])];case 1:return f=z.sent(),A=f[0],I=f[1],R=ks(A,I,e,r,i,a),s!==n&&s.dispose(),u!==t&&u.dispose(),[2,R]}})})},lg=We({cropAndResize_:function(n,t,e,r,i,a){var s=Oe(n,"image","cropAndResize"),u=Oe(t,"boxes","cropAndResize","float32"),l=Oe(e,"boxInd","cropAndResize","int32");i=i||"bilinear",a=a||0;var f=u.shape[0];return Y(s.rank===4,function(){return"Error in cropAndResize: image must be rank 4,but got rank "+s.rank+"."}),Y(u.rank===2&&u.shape[1]===4,function(){return"Error in cropAndResize: boxes must be have size ["+f+",4] but had shape "+u.shape+"."}),Y(l.rank===1&&l.shape[0]===f,function(){return"Error in cropAndResize: boxInd must be have size ["+f+"] but had shape "+u.shape+"."}),Y(r.length===2,function(){return"Error in cropAndResize: cropSize must be of length 2, but got length "+r.length+"."}),Y(r[0]>=1&&r[1]>=1,function(){return"cropSize must be atleast [1,1], but was "+r}),Y(i==="bilinear"||i==="nearest",function(){return"method must be bilinear or nearest, but was "+i}),ze.runKernelFunc(function(A,I){return A.cropAndResize(s,u,l,r,i,a)},{images:s,boxes:u,boxInd:l},null,"CropAndResize",{method:i,extrapolationValue:a,cropSize:r})}}),Ys=Object.freeze({resizeBilinear:ng,resizeNearestNeighbor:ig,nonMaxSuppression:ag,nonMaxSuppressionAsync:og,nonMaxSuppressionWithScore:sg,nonMaxSuppressionWithScoreAsync:ug,cropAndResize:lg}),$s=function(n,t){return!(n>0)||t==="linear"},eu=function(n,t,e){if(e==null||e==="linear")return n;if(e==="relu")return n.mul(t.step());throw new Error("Gradient for activation "+e+" has not been implemented yet.")},tu=function(n,t){var e=t,r=Rr(n.shape,t.shape);return r.length>0&&(e=e.sum(r)),e.reshape(n.shape)},ru=function(n,t,e){if(t==="linear")return n;if(t==="relu")return gr(n);if(t==="elu")return Zc(n);if(t==="relu6")return Yc(n);if(t==="prelu")return Jc(n,e);throw new Error("Unknown fused activation "+t+".")},cg=We({fusedMatMul_:function(n){var t,e=n.a,r=n.b,i=n.transposeA,a=i!==void 0&&i,s=n.transposeB,u=s!==void 0&&s,l=n.bias,f=n.activation,A=f===void 0?"linear":f,I=n.preluActivationWeights;if($s(ze.state.gradientDepth,A)===!1){var R=Go(e,r,a,u);return l!=null&&(R=Nt(R,l)),ru(R,A,I)}var z=Oe(e,"a","fused matMul"),te=Oe(r,"b","fused matMul");t=_t(z,te),z=t[0],te=t[1];var oe=a?z.shape[z.rank-2]:z.shape[z.rank-1],ae=u?te.shape[te.rank-1]:te.shape[te.rank-2],se=a?z.shape[z.rank-1]:z.shape[z.rank-2],we=u?te.shape[te.rank-2]:te.shape[te.rank-1],xe=z.shape.slice(0,-2),me=te.shape.slice(0,-2),Se=le(xe),Re=le(me);Y(z.rank>=2&&te.rank>=2&&z.rank===te.rank,function(){return"Error in fused matMul: inputs must have the same rank of at least 2, got ranks "+z.rank+" and "+te.rank+"."}),Y(ue(xe,me),function(){return"Error in fused matMul: outer dimensions ("+xe+") and ("+me+") of Tensors with shapes "+z.shape+" and "+te.shape+" must match."}),Y(oe===ae,function(){return"Error in fused matMul: inner shapes ("+oe+") and ("+ae+") of Tensors with shapes "+z.shape+" and "+te.shape+" and transposeA="+a+" and transposeB="+u+" must match."});var Me,Fe,je=z.shape.slice(0,-2).concat([se,we]),Be=a?z.as3D(Se,oe,se):z.as3D(Se,se,oe),Ge=u?te.as3D(Re,we,ae):te.as3D(Re,ae,we);l!=null&&Mt(je,(Me=_t(Me=Oe(l,"bias","fused matMul"),z)[0]).shape),I!=null&&(Fe=Oe(I,"prelu weights","fused matMul"));var Qe={a:Be,b:Ge};l!=null&&(Qe.bias=Me),I!=null&&(Qe.preluActivationWeights=Fe);var Ze=[Be,Ge];return ze.runKernelFunc(function(Ye,tt){var st=Ye.fusedBatchMatMul({a:Be,b:Ge,transposeA:a,transposeB:u,bias:Me,activation:A,preluActivationWeights:Fe});return tt([Be,Ge,st]),st},Qe,function(Ye,tt){var st=tt[0],at=tt[1],it=tt[2],lt=eu(Ye,it,A),rt={};return l!=null&&(rt={bias:function(){return tu(Me,lt)}}),Object.assign(a||u?!a&&u?{a:function(){return lt.matMul(at,!1,!1)},b:function(){return lt.matMul(st,!0,!1)}}:a&&!u?{a:function(){return at.matMul(lt,!1,!0)},b:function(){return st.matMul(lt,!1,!1)}}:{a:function(){return at.matMul(lt,!0,!0)},b:function(){return lt.matMul(st,!0,!0)}}:{a:function(){return lt.matMul(at,!1,!0)},b:function(){return st.matMul(lt,!0,!1)}},rt)},"_FusedMatMul",{transposeA:a,transposeB:u,activation:A},Ze,[!0]).reshape(je)}}),fg=We({fusedConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,a=n.dataFormat,s=a===void 0?"NHWC":a,u=n.dilations,l=u===void 0?[1,1]:u,f=n.dimRoundingMode,A=n.bias,I=n.activation,R=I===void 0?"linear":I,z=n.preluActivationWeights;if(R=R||"linear",$s(ze.state.gradientDepth,R)===!1){var te=Mn(t,e,r,i,s,l,f);return A!=null&&(te=Nt(te,A)),ru(te,R,z)}var oe=Oe(t,"x","conv2d"),ae=Oe(e,"filter","conv2d"),se=oe,we=!1;oe.rank===3&&(we=!0,se=oe.as4D(1,oe.shape[0],oe.shape[1],oe.shape[2])),Y(se.rank===4,function(){return"Error in fused conv2d: input must be rank 4, but got rank "+se.rank+"."}),Y(ae.rank===4,function(){return"Error in fused conv2d: filter must be rank 4, but got rank "+ae.rank+"."}),f!=null&&Y(ge(i),function(){return"Error in fused conv2d: pad must be an integer when using, dimRoundingMode "+f+" but got pad "+i+"."}),Y(se.shape[3]===ae.shape[2],function(){return"Error in conv2d: depth of input ("+se.shape[3]+") must match input depth for filter "+ae.shape[2]+"."}),Y(pn(r,l),function(){return"Error in conv2D: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),Y(s==="NHWC",function(){return"Error in conv2d: got dataFormat of "+s+" but only NHWC is currently supported."});var xe,me,Se=zi(se.shape,ae.shape,r,l,i,f);A!=null&&(xe=_t(xe=Oe(A,"bias","fused conv2d"),oe)[0],Mt(Se.outShape,xe.shape)),z!=null&&(me=Oe(z,"prelu weights","fused conv2d"));var Re={x:se,filter:ae};A!=null&&(Re.bias=xe),z!=null&&(Re.preluActivationWeights=me);var Me=[ae,se],Fe=ze.runKernelFunc(function(je,Be){var Ge=je.fusedConv2d({input:se,filter:ae,convInfo:Se,bias:xe,activation:R,preluActivationWeights:me});return Be([ae,se,Ge]),Ge},Re,function(je,Be){var Ge=Be,Qe=Ge[0],Ze=Ge[1],Ye=Ge[2],tt=eu(je,Ye,R);Y(ua(l),function(){return"Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '"+l+"'"});var st={};return A!=null&&(st={bias:function(){return tu(xe,tt)}}),Object.assign({x:function(){return Wc(Ze.shape,tt,Qe,r,i)},filter:function(){return Gs(Ze,tt,Qe.shape,r,i)}},st)},"FusedConv2D",{convInfo:Se,activation:R},Me,[!0]);return we?Fe.as3D(Fe.shape[1],Fe.shape[2],Fe.shape[3]):Fe}}),dg=We({fusedDepthwiseConv2d_:function(n){var t=n.x,e=n.filter,r=n.strides,i=n.pad,a=n.dataFormat,s=a===void 0?"NHWC":a,u=n.dilations,l=u===void 0?[1,1]:u,f=n.dimRoundingMode,A=n.bias,I=n.activation,R=I===void 0?"linear":I,z=n.preluActivationWeights;if($s(ze.state.gradientDepth,R)===!1){var te=Qo(t,e,r,i,s,l,f);return A!=null&&(te=Nt(te,A)),ru(te,R,z)}var oe=Oe(t,"x","depthwiseConv2d"),ae=Oe(e,"filter","depthwiseConv2d"),se=oe,we=!1;oe.rank===3&&(we=!0,se=oe.as4D(1,oe.shape[0],oe.shape[1],oe.shape[2])),Y(se.rank===4,function(){return"Error in fused depthwiseConv2d: input must be rank 4, but got rank "+se.rank+"."}),Y(ae.rank===4,function(){return"Error in fused depthwiseConv2d: filter must be rank 4, but got rank "+ae.rank+"."}),Y(se.shape[3]===ae.shape[2],function(){return"Error in fused depthwiseConv2d: number of input channels ("+se.shape[3]+") must match the inChannels dimension in filter "+ae.shape[2]+"."}),l==null&&(l=[1,1]),Y(pn(r,l),function(){return"Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides "+r+" and dilations '"+l+"'"}),f!=null&&Y(ge(i),function(){return"Error in fused depthwiseConv2d: pad must be an integer when using dimRoundingMode "+f+" but got pad "+i+"."});var xe,me,Se=zi(se.shape,ae.shape,r,l,i,f,!0);A!=null&&(xe=_t(xe=Oe(A,"bias","fused conv2d"),oe)[0],Mt(Se.outShape,xe.shape)),z!=null&&(me=Oe(z,"prelu weights","fused depthwiseConv2d"));var Re={x:se,filter:ae};A!=null&&(Re.bias=xe),z!=null&&(Re.preluActivationWeights=me);var Me=[ae,se],Fe=ze.runKernelFunc(function(je,Be){var Ge=je.fusedDepthwiseConv2D({input:se,filter:ae,convInfo:Se,bias:xe,activation:R,preluActivationWeights:me});return Be([ae,se,Ge]),Ge},Re,function(je,Be){Y(ua(l),function(){return"Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '"+l+"'"});var Ge=Be[0],Qe=Be[1],Ze=Be[2],Ye=eu(je,Ze,R),tt={};return A!=null&&(tt={bias:function(){return tu(xe,Ye)}}),Object.assign({x:function(){return zc(Qe.shape,Ye,Ge,Se)},filter:function(){return Vc(Qe,Ye,Ge.shape,Se)}},tt)},"FusedDepthwiseConv2D",{convInfo:Se,activation:R},Me,[!0]);return we?Fe.as3D(Fe.shape[1],Fe.shape[2],Fe.shape[3]):Fe}}),hg=Object.freeze({matMul:cg,conv2d:fg,depthwiseConv2d:dg}),pg=Object.freeze({image:Ys,linalg:rg,losses:$m,spectral:Nm,fused:hg,signal:zm,square:Kp,squaredDifference:Ec,conv1d:nm,conv2d:Mn,conv3d:im,depthwiseConv2d:Qo,separableConv2d:Hs,conv2dTranspose:am,conv3dTranspose:om,op:We,batchNormalization2d:Cv,batchNormalization3d:Sv,batchNormalization4d:Iv,batchNormalization:Tv,batchNorm:kc,batchNorm2d:Rv,batchNorm3d:kv,batchNorm4d:Ov,booleanMaskAsync:rm,complex:Er,real:tn,imag:Cn,concat:Mr,concat1d:_d,concat2d:Md,concat3d:Nd,concat4d:Fd,split:vs,matMul:Go,dot:sm,outerProduct:um,reverse:io,reverse1d:lm,reverse2d:cm,reverse3d:fm,reverse4d:dm,maxPool:Qr,avgPool:ao,pool:hm,maxPool3d:pm,avgPool3d:vm,slice:ii,slice1d:mm,slice2d:gm,slice3d:Hc,slice4d:ym,abs:Zp,acos:Jp,acosh:Yp,asin:$p,asinh:qp,atan:ev,atanh:tv,ceil:rv,clipByValue:Us,cos:nv,cosh:iv,erf:av,exp:Ws,expm1:ov,floor:sv,log:uv,log1p:lv,logSigmoid:cv,neg:Lo,reciprocal:fv,round:dv,rsqrt:Cc,sigmoid:Sc,sign:hv,isNaN:pv,isInf:vv,isFinite:mv,sin:gv,sinh:yv,softplus:bv,sqrt:wv,step:Av,tan:xv,tanh:Ev,all:bm,any:wm,argMax:Am,argMin:xm,logSumExp:Em,max:Ho,mean:Cm,min:Sm,moments:Im,sum:Kc,prod:Tm,equal:Bc,equalStrict:Hv,greater:Xv,greaterEqual:_c,greaterEqualStrict:Kv,greaterStrict:Zv,less:Jv,lessEqual:Yv,lessEqualStrict:$v,lessStrict:qv,notEqual:em,notEqualStrict:tm,add:Nt,addN:Pv,addStrict:Bv,atan2:_v,div:Hn,divNoNan:Mv,divStrict:Nv,floorDiv:jc,maximum:zs,maximumStrict:Fv,minimum:Pc,minimumStrict:Lv,mod:Uv,modStrict:Wv,mul:nn,mulStrict:zv,pow:Vo,powStrict:Vv,squaredDifferenceStrict:Qv,sub:Fr,subStrict:Gv,elu:Zc,leakyRelu:Rm,prelu:Jc,relu:gr,relu6:Yc,selu:km,logicalAnd:zo,logicalNot:Dv,logicalOr:Oc,logicalXor:jv,where:fa,whereAsync:Dc,buffer:It,print:Xd,batchToSpaceND:fl,broadcastTo:Kd,cast:Zd,clone:Jd,cumsum:Yd,depthToSpace:$d,expandDims:_n,eye:dl,multinomial:qd,oneHot:gs,pad:sa,pad1d:eh,pad2d:th,pad3d:rh,pad4d:nh,rand:ih,randomNormal:ah,randomGamma:oh,randomUniform:hl,reshape:Qn,spaceToBatchND:pl,squeeze:vl,stack:Sn,tile:Ia,truncatedNormal:sh,unstack:Nr,setdiff1dAsync:uh,fill:ni,linspace:Bd,ones:Sa,range:Eo,scalar:vt,tensor:Cr,tensor1d:Tr,tensor2d:Wi,tensor3d:ps,tensor4d:bn,tensor5d:Dd,tensor6d:jd,variable:Pd,zeros:fr,onesLike:cl,zerosLike:Gt,transpose:Vi,softmax:xi,logSoftmax:ch,localResponseNormalization:Om,norm:$c,gather:Vs,unsortedSegmentSum:Fc,basicLSTMCell:Dm,multiRNNCell:jm,movingAverage:Pm,stridedSlice:Bm,topk:_m,scatterND:Mm,fft:Xs,ifft:Xo,rfft:Ks,irfft:qc,sparseToDense:Fm,gatherND:Lm,diag:Um,dropout:Wm,hannWindow:Zs,hammingWindow:tf,frame:Js,stft:rf,inTopKAsync:Vm});function ut(n,t){Array.isArray(n)||(n=[n]),n.forEach(function(e){e!=null&&Y(e.dtype!=="complex64",function(){return t+" does not support complex64 tensors."})})}function nu(n,t,e,r){if(e==="linear")return n.linear(t);if(e==="relu")return n.relu(t);if(e==="elu")return n.elu(t);if(e==="relu6")return n.relu6(t);if(e==="prelu")return n.prelu(t,r);throw new Error("Activation "+e+" has not been implemented for the CPU backend.")}var vg=function(n){function t(){var e=n.call(this)||this;return e.blockSize=48,e.firstUse=!0,e.data=new El(e,ze),e}return S(t,n),t.prototype.write=function(e,r,i){this.firstUse&&(this.firstUse=!1,P().get("IS_NODE")&&Fi(`
|
|
============================
|
|
Hi there \u{1F44B}. Looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, which binds to TensorFlow C++, by running npm i @tensorflow/tfjs-node, or npm i @tensorflow/tfjs-node-gpu if you have CUDA. Then call require('@tensorflow/tfjs-node'); (-gpu suffix for CUDA) at the start of your program. Visit https://github.com/tensorflow/tfjs-node for more details.
|
|
============================`));var a={};return this.data.set(a,{values:e,dtype:i}),a},t.prototype.move=function(e,r,i,a){this.data.set(e,{values:r,dtype:a})},t.prototype.numDataIds=function(){return this.data.numDataIds()},t.prototype.read=function(e){return C(this,void 0,void 0,function(){return x(this,function(r){return[2,this.readSync(e)]})})},t.prototype.readSync=function(e){var r=this.data.get(e),i=r.dtype,a=r.complexTensors;return i==="complex64"?Ts(this.readSync(a.real.dataId),this.readSync(a.imag.dataId)):this.data.get(e).values},t.prototype.bufferSync=function(e){var r=this.readSync(e.dataId),i=r;if(e.dtype==="string")try{i=r.map(function(a){return ht(a)})}catch(a){throw new Error("Failed to decode encoded string bytes into utf-8")}return It(e.shape,e.dtype,i)},t.prototype.makeOutput=function(e,r,i){var a=this.write(e,r,i);return ze.makeTensorFromDataId(a,r,i,this)},t.prototype.disposeData=function(e){if(this.data.has(e)){var r=this.data.get(e).complexTensors;r!=null&&(r.real.dispose(),r.imag.dispose()),this.data.delete(e)}},t.prototype.time=function(e){return C(this,void 0,void 0,function(){var r;return x(this,function(i){return r=Je(),e(),[2,{kernelMs:Je()-r}]})})},t.prototype.memory=function(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}},t.prototype.complex=function(e,r){var i=this.makeOutput(null,e.shape,"complex64");return this.data.get(i.dataId).complexTensors={real:ze.keep(e.clone()),imag:ze.keep(r.clone())},i},t.prototype.real=function(e){return this.data.get(e.dataId).complexTensors.real.clone()},t.prototype.imag=function(e){return this.data.get(e.dataId).complexTensors.imag.clone()},t.prototype.slice=function(e,r,i){if(ut(e,"slice"),As(e.shape,r,i)){var a=xs(r,e.strides),s=le(i);return Cr(this.readSync(e.dataId).subarray(a,a+s),i,e.dtype)}for(var u=It(i,e.dtype),l=this.bufferSync(e),f=0;f<u.size;++f){var A=u.indexToLoc(f).map(function(I,R){return I+r[R]});u.values[f]=l.get.apply(l,A)}return u.toTensor()},t.prototype.stridedSlice=function(e,r,i,a){ut(e,"stridedSlice");var s=ko(r,i,a);if(s.some(function(z){return z===0}))return Cr([],s);for(var u=It(s,e.dtype),l=this.bufferSync(e),f=0;f<u.size;f++){for(var A=u.indexToLoc(f),I=new Array(A.length),R=0;R<I.length;R++)I[R]=A[R]*a[R]+r[R];u.set.apply(u,[l.get.apply(l,I)].concat(A))}return u.toTensor()},t.prototype.diag=function(e){for(var r=this.readSync(e.dataId),i=It([e.size,e.size],e.dtype),a=i.values,s=0;s<r.length;s++)a[s*e.size+s]=r[s];return i.toTensor()},t.prototype.unstack=function(e,r){for(var i=e.shape[r],a=new Array(e.rank-1),s=0,u=0;u<e.rank;u++)u!==r&&(a[s++]=e.shape[u]);var l=new Array(e.rank).fill(0),f=e.shape.slice();f[r]=1;var A=new Array(i);for(u=0;u<A.length;u++)l[r]=u,A[u]=this.slice(e,l,f).reshape(a);return A},t.prototype.reverse=function(e,r){ut(e,"reverse");for(var i=It(e.shape,e.dtype),a=this.bufferSync(e),s=function(l){var f=i.indexToLoc(l),A=f.slice();r.forEach(function(I){return A[I]=e.shape[I]-1-A[I]}),i.set.apply(i,[a.get.apply(a,A)].concat(f))},u=0;u<i.size;u++)s(u);return i.toTensor()},t.prototype.concat=function(e,r){var i=this;if(e[0].dtype==="complex64"){var a=e.map(function(z){return tn(z)}),s=e.map(function(z){return Cn(z)});return Er(this.concat(a,r),this.concat(s,r))}var u=e.map(function(z){var te=le(z.shape.slice(r));return z.as2D(-1,te)}),l=or(u.map(function(z){return z.shape}),1),f=It(l,e[0].dtype).values;if(u[0].shape[0]===1){var A=0;u.forEach(function(z){f.set(i.readSync(z.dataId),A),A+=z.size})}else{var I=0;u.forEach(function(z){for(var te=i.readSync(z.dataId),oe=0,ae=0;ae<z.shape[0];++ae)for(var se=ae*l[1]+I,we=0;we<z.shape[1];++we)f[se+we]=te[oe++];I+=z.shape[1]})}var R=or(e.map(function(z){return z.shape}),r);return Cr(f,R,e[0].dtype)},t.prototype.neg=function(e){return ut(e,"neg"),this.multiply(vt(-1),e)},t.prototype.add=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i+s,imag:a+u}}):this.broadcastedBinaryOp(e,r,tr(e.dtype,r.dtype),function(i,a){return i+a})},t.prototype.addN=function(e){var r=this;ut(e,"addN");for(var i=e.map(function(A){return r.readSync(A.dataId)}),a=It(e[0].shape,e[0].dtype),s=a.values,u=0;u<e.length;u++)for(var l=i[u],f=0;f<s.length;f++)s[f]+=l[f];return a.toTensor()},t.prototype.softmax=function(e,r){var i=ye([r],e.shape),a=this.max(e,i),s=_r(a.shape,i),u=this.subtract(e,a.reshape(s)),l=this.exp(u),f=this.sum(l,i).reshape(s);return this.realDivide(l,f)},t.prototype.subtract=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i-s,imag:a-u}}):this.broadcastedBinaryOp(e,r,tr(e.dtype,r.dtype),function(i,a){return i-a})},t.prototype.pow=function(e,r){return ut([e,r],"pow"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.pow(i,a)})},t.prototype.batchMatMul=function(e,r,i,a){ut([e,r],"matMul");for(var s=i?e.shape[1]:e.shape[2],u=i?e.shape[2]:e.shape[1],l=a?r.shape[1]:r.shape[2],f=e.shape[0],A=this.readSync(e.dataId),I=this.readSync(r.dataId),R=i?[e.strides[0],1,e.strides[1]]:[e.strides[0],e.strides[1],1],z=R[0],te=R[1],oe=R[2],ae=a?[1,r.strides[1],r.strides[0]]:[r.strides[1],1,r.strides[0]],se=ae[0],we=ae[1],xe=ae[2],me=u*l,Se=It([f,u,l],e.dtype),Re=Se.values,Me=this.blockSize,Fe=0;Fe<f;Fe++)for(var je=0;je<u;je+=Me)for(var Be=0;Be<l;Be+=Me)for(var Ge=0;Ge<s;Ge+=Me)for(var Qe=Math.min(je+Me,u),Ze=Math.min(Be+Me,l),Ye=Math.min(Ge+Me,s),tt=je;tt<Qe;tt++)for(var st=Be;st<Ze;st++){for(var at=0,it=Ge;it<Ye;it++)at+=A[Fe*z+tt*te+it*oe]*I[it*se+st*we+Fe*xe];Re[Fe*me+(tt*l+st)]+=at}return Se.toTensor()},t.prototype.fusedBatchMatMul=function(e){var r=e.a,i=e.b,a=e.transposeA,s=e.transposeB,u=e.bias,l=e.activation,f=e.preluActivationWeights,A=this.batchMatMul(r,i,a,s);return u&&(A=this.add(A,u)),l&&(A=nu(this,A,l,f)),A},t.prototype.multiply=function(e,r){return e.dtype==="complex64"||r.dtype==="complex64"?this.broadcastedBinaryComplexOp(e.cast("complex64"),r.cast("complex64"),function(i,a,s,u){return{real:i*s-a*u,imag:i*u+a*s}}):this.broadcastedBinaryOp(e,r,tr(e.dtype,r.dtype),function(i,a){return i*a})},t.prototype.realDivide=function(e,r){return ut([e,r],"realDivide"),this.broadcastedBinaryOp(e,r,"float32",function(i,a){return i/a})},t.prototype.floorDiv=function(e,r){return ut([e,r],"floorDiv"),this.broadcastedBinaryOp(e,r,"int32",function(i,a){return Math.floor(i/a)})},t.prototype.sum=function(e,r){ut(e,"sum"),Vr("sum",r,e.rank);for(var i=xr(e.shape,r),a=i[0],s=i[1],u=fr(a,tr(e.dtype,"int32")),l=le(s),f=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<f.length;++I){for(var R=I*l,z=0,te=0;te<l;++te)z+=A[R+te];f[I]=z}return u},t.prototype.prod=function(e,r){ut(e,"sum");for(var i=xr(e.shape,r),a=i[0],s=i[1],u=fr(a,tr(e.dtype,"int32")),l=le(s),f=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<f.length;++I){for(var R=I*l,z=1,te=0;te<l;++te)z*=A[R+te];f[I]=z}return u},t.prototype.unsortedSegmentSum=function(e,r,i){ut(e,"unsortedSegmentSum");for(var a=[],s=e.rank-r.rank,u=0;u<s;++u)r=r.expandDims(u+1);for(u=0;u<i;++u){var l=vt(u,"int32"),f=Bc(l,r).asType("float32").mul(e).sum(0);a.push(f)}return Sn(a)},t.prototype.argMin=function(e,r){ut(e,"argMin");var i=[r];Vr("argMin",i,e.rank);for(var a=xr(e.shape,i),s=a[0],u=a[1],l=fr(s,"int32"),f=le(u),A=this.readSync(l.dataId),I=this.readSync(e.dataId),R=0;R<A.length;++R){for(var z=R*f,te=I[z],oe=0,ae=0;ae<f;++ae){var se=I[z+ae];se<te&&(te=se,oe=ae)}A[R]=oe}return l},t.prototype.argMax=function(e,r){ut(e,"argMax");var i=[r];Vr("argMax",i,e.rank);for(var a=xr(e.shape,i),s=a[0],u=a[1],l=fr(s,"int32"),f=le(u),A=this.readSync(l.dataId),I=this.readSync(e.dataId),R=0;R<A.length;++R){for(var z=R*f,te=I[z],oe=0,ae=0;ae<f;++ae){var se=I[z+ae];se>te&&(te=se,oe=ae)}A[R]=oe}return l},t.prototype.cumsum=function(e,r,i,a){if(ut(e,"cumsum"),r!==e.rank-1)throw new Error("backend.cumsum in CPU expects an inner-most axis="+(e.rank-1)+" but got axis="+r);for(var s=tr(e.dtype,"int32"),u=fr(e.shape,s),l=this.readSync(u.dataId),f=this.readSync(e.dataId),A=e.shape[e.rank-1],I=a?function(ae,se){return ae+A-se-1}:function(ae,se){return ae+se},R=0;R<f.length;R+=A)for(var z=0;z<A;z++){var te=I(R,z);if(z===0)l[te]=i?0:f[te];else{var oe=I(R,z-1);l[te]=i?f[oe]+l[oe]:f[te]+l[oe]}}return u},t.prototype.equal=function(e,r){return ut([e,r],"equal"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i===a?1:0})},t.prototype.notEqual=function(e,r){return ut([e,r],"notEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i!==a?1:0})},t.prototype.less=function(e,r){return ut([e,r],"less"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i<a?1:0})},t.prototype.lessEqual=function(e,r){return ut([e,r],"lessEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i<=a?1:0})},t.prototype.greater=function(e,r){return ut([e,r],"greater"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i>a?1:0})},t.prototype.greaterEqual=function(e,r){return ut([e,r],"greaterEqual"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i>=a?1:0})},t.prototype.logicalNot=function(e){ut(e,"logicalNot");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)i[a]=r[a]?0:1;return this.makeOutput(i,e.shape,"bool")},t.prototype.logicalAnd=function(e,r){return ut([e,r],"logicalAnd"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i&&a})},t.prototype.logicalOr=function(e,r){return ut([e,r],"logicalOr"),this.broadcastedBinaryOp(e,r,"bool",function(i,a){return i||a})},t.prototype.select=function(e,r,i){ut([e,r,i],"select");for(var a=this.readSync(e.dataId),s=this.readSync(r.dataId),u=this.readSync(i.dataId),l=fr(r.shape,tr(r.dtype,i.dtype)),f=this.readSync(l.dataId),A=0,I=e.rank===0||e.rank>1||r.rank===1?1:le(r.shape.slice(1)),R=0;R<a.length;R++)for(var z=0;z<I;z++)a[R]===1?f[A++]=s[R]:f[A++]=u[R];return l},t.prototype.where=function(e){ut([e],"where");var r=this.readSync(e.dataId);return Os(e.shape,r)},t.prototype.topk=function(e,r,i){return ut(e,"topk"),Ol(this.readSync(e.dataId),e.shape,e.dtype,r)},t.prototype.min=function(e,r){ut(e,"min"),Vr("min",r,e.rank);for(var i=xr(e.shape,r),a=i[0],s=i[1],u=fr(a,e.dtype),l=le(s),f=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<f.length;++I){for(var R=I*l,z=A[R],te=0;te<l;++te){var oe=A[R+te];oe<z&&(z=oe)}f[I]=z}return u},t.prototype.minimum=function(e,r){return ut([e,r],"minimum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.min(i,a)})},t.prototype.mod=function(e,r){return ut([e,r],"mod"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){var s=i%a;return i<0&&a<0||i>=0&&a>=0?s:(s+a)%a})},t.prototype.max=function(e,r){ut(e,"max"),Vr("max",r,e.rank);for(var i=xr(e.shape,r),a=i[0],s=i[1],u=fr(a,e.dtype),l=le(s),f=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<f.length;++I){for(var R=I*l,z=A[R],te=0;te<l;++te){var oe=A[R+te];oe>z&&(z=oe)}f[I]=z}return u},t.prototype.maximum=function(e,r){return ut([e,r],"maximum"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.max(i,a)})},t.prototype.all=function(e,r){ut(e,"all"),Vr("all",r,e.rank);for(var i=xr(e.shape,r),a=i[0],s=i[1],u=fr(a,e.dtype),l=le(s),f=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<f.length;++I){for(var R=I*l,z=A[R],te=0;te<l;++te){var oe=A[R+te];z=z&&oe}f[I]=z}return u},t.prototype.any=function(e,r){ut(e,"any"),Vr("any",r,e.rank);for(var i=xr(e.shape,r),a=i[0],s=i[1],u=fr(a,e.dtype),l=le(s),f=this.readSync(u.dataId),A=this.readSync(e.dataId),I=0;I<f.length;++I){for(var R=I*l,z=A[R],te=0;te<l;++te){var oe=A[R+te];z=z||oe}f[I]=z}return u},t.prototype.squaredDifference=function(e,r){return ut([e,r],"squaredDifference"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){var s=i-a;return s*s})},t.prototype.ceil=function(e){ut(e,"ceil");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.ceil(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.floor=function(e){ut(e,"floor");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.floor(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.sign=function(e){ut(e,"x");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)r[a]<0?i[a]=-1:r[a]>0?i[a]=1:i[a]=0;return this.makeOutput(i,e.shape,"float32")},t.prototype.isNaN=function(e){ut(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Number.isNaN(r[a])&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isInf=function(e){ut(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Math.abs(r[a])===1/0&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.isFinite=function(e){ut(e,"x");for(var r=this.readSync(e.dataId),i=new Uint8Array(r.length),a=0;a<r.length;++a)Number.isFinite(r[a])&&(i[a]=1);return this.makeOutput(i,e.shape,"bool")},t.prototype.round=function(e){ut(e,"round");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=Math.floor(r[a]);r[a]-s<.5?i[a]=Math.floor(r[a]):r[a]-s>.5?i[a]=Math.ceil(r[a]):i[a]=s%2==0?s:s+1}return this.makeOutput(i,e.shape,"float32")},t.prototype.exp=function(e){ut(e,"exp");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.exp(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.expm1=function(e){ut(e,"expm1");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=Math.expm1(r[a]);return this.makeOutput(i,e.shape,"float32")},t.prototype.log=function(e){ut(e,"log");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.log(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.log1p=function(e){ut(e,"log1p");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.log1p(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.sqrt=function(e){ut(e,"sqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.rsqrt=function(e){ut(e,"rsqrt");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a){var s=r[a];i[a]=1/Math.sqrt(s)}return this.makeOutput(i,e.shape,"float32")},t.prototype.reciprocal=function(e){ut(e,"reciprocal");for(var r=this.readSync(e.dataId),i=new Float32Array(r.length),a=0;a<r.length;++a)i[a]=1/r[a];return this.makeOutput(i,e.shape,"float32")},t.prototype.linear=function(e){return e},t.prototype.relu=function(e){ut(e,"relu");for(var r=fr(e.shape,e.dtype),i=this.readSync(r.dataId),a=this.readSync(e.dataId),s=0;s<a.length;++s)i[s]=Math.max(0,a[s]);return r},t.prototype.relu6=function(e){ut(e,"relu");for(var r=fr(e.shape,e.dtype),i=this.readSync(r.dataId),a=this.readSync(e.dataId),s=0;s<a.length;++s)i[s]=Math.min(Math.max(0,a[s]),6);return r},t.prototype.prelu=function(e,r){return ut([e,r],"prelu"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return i<0?a*i:i})},t.prototype.elu=function(e){ut(e,"elu");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a){var s=i[a];r[a]=s>=0?s:Math.exp(s)-1}return this.makeOutput(r,e.shape,"float32")},t.prototype.eluDer=function(e,r){ut([e,r],"eluDer");for(var i=new Float32Array(r.size),a=this.readSync(r.dataId),s=this.readSync(e.dataId),u=0;u<a.length;++u){var l=a[u];i[u]=l>=1?s[u]:s[u]*(l+1)}return this.makeOutput(i,r.shape,"float32")},t.prototype.selu=function(e){ut(e,"selu");for(var r=Fs,i=Ls,a=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];a[u]=l>=0?i*l:r*(Math.exp(l)-1)}return this.makeOutput(a,e.shape,"float32")},t.prototype.clip=function(e,r,i){ut(e,"clip");for(var a=new Float32Array(e.size),s=this.readSync(e.dataId),u=0;u<s.length;++u){var l=s[u];a[u]=l>i?i:l<r?r:l}return this.makeOutput(a,e.shape,"float32")},t.prototype.abs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.abs(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.complexAbs=function(e){for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<e.size;++a){var s=i[2*a],u=i[2*a+1];r[a]=Math.hypot(s,u)}return this.makeOutput(r,e.shape,"float32")},t.prototype.int=function(e){ut(e,"int");for(var r=new Int32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=i[a];return this.makeOutput(r,e.shape,"int32")},t.prototype.sigmoid=function(e){ut(e,"sigmoid");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=1/(1+Math.exp(-i[a]));return this.makeOutput(r,e.shape,"float32")},t.prototype.softplus=function(e){ut(e,"softplus");for(var r=Math.log(11920928955078125e-23)+2,i=new Float32Array(e.size),a=this.readSync(e.dataId),s=0;s<a.length;++s){var u=a[s]>-r,l=a[s]<r,f=Math.exp(a[s]),A=void 0;A=l?f:u?a[s]:Math.log(1+f),i[s]=A}return this.makeOutput(i,e.shape,"float32")},t.prototype.sin=function(e){ut(e,"sin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.sin(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cos=function(e){ut(e,"cos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.cos(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tan=function(e){ut(e,"tan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.tan(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asin=function(e){ut(e,"asin");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.asin(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acos=function(e){ut(e,"acos");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.acos(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan=function(e){ut(e,"atan");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.atan(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atan2=function(e,r){return ut([e,r],"atan2"),this.broadcastedBinaryOp(e,r,e.dtype,function(i,a){return Math.atan2(i,a)})},t.prototype.sinh=function(e){ut(e,"sinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.sinh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.cosh=function(e){ut(e,"cosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.cosh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.tanh=function(e){ut(e,"tanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Ee(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.asinh=function(e){ut(e,"asinh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.asinh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.acosh=function(e){ut(e,"acosh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.acosh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.atanh=function(e){ut(e,"atanh");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a)r[a]=Math.atanh(i[a]);return this.makeOutput(r,e.shape,"float32")},t.prototype.erf=function(e){ut(e,"erf");for(var r=new Float32Array(e.size),i=this.readSync(e.dataId),a=0;a<i.length;++a){var s=Math.sign(i[a]),u=Math.abs(i[a]),l=1/(1+.3275911*u);r[a]=s*(1-((((1.061405429*l-1.453152027)*l+1.421413741)*l-.284496736)*l+.254829592)*l*Math.exp(-u*u))}return this.makeOutput(r,e.shape,"float32")},t.prototype.step=function(e,r){r===void 0&&(r=0),ut(e,"step");for(var i=new Float32Array(e.size),a=this.readSync(e.dataId),s=0;s<a.length;++s){var u=a[s];isNaN(u)?i[s]=NaN:i[s]=u>0?1:r}return this.makeOutput(i,e.shape,"float32")},t.prototype.fusedConv2d=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,f=this.conv2d(r,i,a);return s&&(f=this.add(f,s)),u&&(f=nu(this,f,u,l)),f},t.prototype.conv2d=function(e,r,i){ut([e,r],"conv2d");for(var a=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,f=i.padInfo.left,A=i.padInfo.top,I=i.dataFormat==="channelsLast",R=It(i.outShape,e.dtype),z=e.strides[0],te=I?e.strides[1]:e.strides[2],oe=I?e.strides[2]:1,ae=I?1:e.strides[1],se=R.strides[0],we=I?R.strides[1]:R.strides[2],xe=I?R.strides[2]:1,me=I?1:R.strides[1],Se=this.readSync(e.dataId),Re=this.readSync(r.dataId),Me=R.values,Fe=0;Fe<i.batchSize;++Fe)for(var je=Fe*z,Be=Fe*se,Ge=0;Ge<i.outHeight;++Ge)for(var Qe=Be+Ge*we,Ze=Ge*i.strideHeight-A,Ye=0;Ye<a;Ye++){var tt=Ze+Ye*u;if(!(tt<0||tt>=i.inHeight))for(var st=Ye*r.strides[0],at=je+tt*te,it=0;it<i.outWidth;++it)for(var lt=Qe+it*xe,rt=it*i.strideWidth-f,ft=0;ft<s;ft++){var dt=rt+ft*l;if(!(dt<0||dt>=i.inWidth))for(var yt=at+dt*oe,Ct=st+ft*r.strides[1],Tt=0;Tt<i.inChannels;++Tt){for(var Pt=Se[yt+Tt*ae],Ut=0;Ut<i.outChannels;++Ut)Me[lt+Ut*me]+=Pt*Re[Ct+Ut];Ct+=i.outChannels}}}return R.toTensor()},t.prototype.conv3d=function(e,r,i){for(var a=i.filterDepth,s=i.filterHeight,u=i.filterWidth,l=i.dilationDepth,f=i.dilationHeight,A=i.dilationWidth,I=i.padInfo.front,R=i.padInfo.left,z=i.padInfo.top,te=It(i.outShape,e.dtype),oe=this.readSync(e.dataId),ae=this.readSync(r.dataId),se=te.values,we=0;we<i.batchSize;++we)for(var xe=we*e.strides[0],me=we*te.strides[0],Se=0;Se<i.outDepth;++Se)for(var Re=me+Se*te.strides[1],Me=Se*i.strideDepth-I,Fe=0;Fe<a;Fe++){var je=Me+Fe*l;if(!(je<0||je>=i.inDepth))for(var Be=Fe*r.strides[0],Ge=xe+je*e.strides[1],Qe=0;Qe<i.outHeight;++Qe)for(var Ze=Re+Qe*te.strides[2],Ye=Qe*i.strideHeight-z,tt=0;tt<s;tt++){var st=Ye+tt*f;if(!(st<0||st>=i.inHeight))for(var at=Be+tt*r.strides[1],it=Ge+st*e.strides[2],lt=0;lt<i.outWidth;++lt)for(var rt=Ze+lt*i.outChannels,ft=lt*i.strideWidth-R,dt=0;dt<u;dt++){var yt=ft+dt*A;if(!(yt<0||yt>=i.inWidth))for(var Ct=at+dt*r.strides[2],Tt=it+yt*i.inChannels,Pt=Ct,Ut=0;Ut<i.inChannels;++Ut){for(var Ft=oe[Tt+Ut],Wt=0;Wt<i.outChannels;++Wt)se[rt+Wt]+=Ft*ae[Pt+Wt];Pt+=i.outChannels}}}}return te.toTensor()},t.prototype.conv2dDerInput=function(e,r,i){ut([e,r],"conv2dDerInput");for(var a=It(i.inShape,"float32"),s=a.values,u=this.readSync(e.dataId),l=this.readSync(r.dataId),f=r.strides,A=f[0],I=f[1],R=f[2],z=i.batchSize,te=i.filterHeight,oe=i.filterWidth,ae=i.inChannels,se=i.inHeight,we=i.inWidth,xe=i.outChannels,me=i.outHeight,Se=i.outWidth,Re=i.strideHeight,Me=i.strideWidth,Fe=i.dataFormat,je=te-1-i.padInfo.top,Be=oe-1-i.padInfo.left,Ge=Fe==="channelsLast",Qe=a.strides[0],Ze=Ge?a.strides[1]:a.strides[2],Ye=Ge?a.strides[2]:1,tt=Ge?1:a.strides[1],st=e.strides[0],at=Ge?e.strides[1]:e.strides[2],it=Ge?e.strides[2]:1,lt=Ge?1:e.strides[1],rt=0;rt<z;++rt)for(var ft=0;ft<ae;++ft)for(var dt=0;dt<se;++dt)for(var yt=dt-je,Ct=Math.max(0,Math.ceil(yt/Re)),Tt=Math.min(me,(te+yt)/Re),Pt=0;Pt<we;++Pt){for(var Ut=Pt-Be,Ft=Math.max(0,Math.ceil(Ut/Me)),Wt=Math.min(Se,(oe+Ut)/Me),Bt=0,Lt=Ct;Lt<Tt;++Lt)for(var rr=Lt*Re-yt,Ht=Ft;Ht<Wt;++Ht)for(var sr=st*rt+at*Lt+it*Ht,yr=A*(te-1-rr)+I*(oe-1-(Ht*Me-Ut))+R*ft,br=0;br<xe;++br)Bt+=u[sr+lt*br]*l[yr+br];s[Qe*rt+Ze*dt+Ye*Pt+tt*ft]=Bt}return a.toTensor()},t.prototype.conv3dDerInput=function(e,r,i){for(var a=It(i.inShape,"float32"),s=a.values,u=a.strides,l=u[0],f=u[1],A=u[2],I=u[3],R=this.readSync(e.dataId),z=e.strides,te=z[0],oe=z[1],ae=z[2],se=z[3],we=this.readSync(r.dataId),xe=r.strides,me=xe[0],Se=xe[1],Re=xe[2],Me=xe[3],Fe=i.batchSize,je=i.filterDepth,Be=i.filterHeight,Ge=i.filterWidth,Qe=i.inChannels,Ze=i.inDepth,Ye=i.inHeight,tt=i.inWidth,st=i.outChannels,at=i.outDepth,it=i.outHeight,lt=i.outWidth,rt=i.strideDepth,ft=i.strideHeight,dt=i.strideWidth,yt=je-1-i.padInfo.front,Ct=Be-1-i.padInfo.top,Tt=Ge-1-i.padInfo.left,Pt=0;Pt<Fe;++Pt)for(var Ut=0;Ut<Qe;++Ut)for(var Ft=0;Ft<Ze;++Ft)for(var Wt=Ft-yt,Bt=Math.max(0,Math.ceil(Wt/rt)),Lt=Math.min(at,(je+Wt)/rt),rr=0;rr<Ye;++rr)for(var Ht=rr-Ct,sr=Math.max(0,Math.ceil(Ht/ft)),yr=Math.min(it,(Be+Ht)/ft),br=0;br<tt;++br){for(var ci=br-Tt,fi=Math.max(0,Math.ceil(ci/dt)),kn=Math.min(lt,(Ge+ci)/dt),Va=0,Oi=Bt;Oi<Lt;++Oi)for(var $i=Oi*rt-Wt,Di=sr;Di<yr;++Di)for(var Qa=Di*ft-Ht,ji=fi;ji<kn;++ji)for(var al=te*Pt+oe*Oi+ae*Di+se*ji,Ga=me*(je-1-$i)+Se*(Be-1-Qa)+Re*(Ge-1-(ji*dt-ci))+Me*Ut,di=0;di<st;++di)Va+=R[al+di]*we[Ga+di];s[l*Pt+f*Ft+A*rr+I*br+Ut]=Va}return a.toTensor()},t.prototype.conv2dDerFilter=function(e,r,i){ut([e,r],"conv2dDerFilter");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,f=i.dataFormat==="channelsLast",A=It(i.filterShape,"float32"),I=i.padInfo.left,R=i.padInfo.top,z=this.bufferSync(e),te=this.bufferSync(r),oe=0;oe<u;++oe)for(var ae=Math.max(0,Math.ceil((R-oe)/a)),se=Math.min(i.outHeight,(i.inHeight+R-oe)/a),we=0;we<l;++we)for(var xe=Math.max(0,Math.ceil((I-we)/s)),me=Math.min(i.outWidth,(i.inWidth+I-we)/s),Se=0;Se<i.inChannels;++Se)for(var Re=0;Re<i.outChannels;++Re){for(var Me=0,Fe=0;Fe<i.batchSize;++Fe)for(var je=ae;je<se;++je)for(var Be=oe+je*a-R,Ge=xe;Ge<me;++Ge){var Qe=we+Ge*s-I;Me+=f?z.get(Fe,Be,Qe,Se)*te.get(Fe,je,Ge,Re):z.get(Fe,Se,Be,Qe)*te.get(Fe,Re,je,Ge)}A.set(Me,oe,we,Se,Re)}return A.toTensor()},t.prototype.conv3dDerFilter=function(e,r,i){for(var a=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,f=i.filterHeight,A=i.filterWidth,I=It(i.filterShape,"float32"),R=I.values,z=I.strides,te=z[0],oe=z[1],ae=z[2],se=z[3],we=this.readSync(r.dataId),xe=r.strides,me=xe[0],Se=xe[1],Re=xe[2],Me=xe[3],Fe=this.readSync(e.dataId),je=e.strides,Be=je[0],Ge=je[1],Qe=je[2],Ze=je[3],Ye=i.padInfo.front,tt=i.padInfo.left,st=i.padInfo.top,at=0;at<l;++at)for(var it=Math.max(0,Math.ceil((Ye-at)/a)),lt=Math.min(i.outDepth,(i.inDepth+Ye-at)/a),rt=at*te,ft=0;ft<f;++ft)for(var dt=Math.max(0,Math.ceil((st-ft)/s)),yt=Math.min(i.outHeight,(i.inHeight+st-ft)/s),Ct=ft*oe+rt,Tt=0;Tt<A;++Tt)for(var Pt=Math.max(0,Math.ceil((tt-Tt)/u)),Ut=Math.min(i.outWidth,(i.inWidth+tt-Tt)/u),Ft=Tt*ae+Ct,Wt=0;Wt<i.inChannels;++Wt)for(var Bt=Wt*se+Ft,Lt=0;Lt<i.outChannels;++Lt){for(var rr=0,Ht=0;Ht<i.batchSize;++Ht)for(var sr=Ht*Be,yr=Ht*me,br=it;br<lt;++br)for(var ci=(at+br*a-Ye)*Ge+sr,fi=br*Se+yr,kn=dt;kn<yt;++kn)for(var Va=(ft+kn*s-st)*Qe+ci,Oi=kn*Re+fi,$i=Pt;$i<Ut;++$i){var Di=$i*Me+Oi;rr+=Fe[(Tt+$i*u-tt)*Ze+Va+Wt]*we[Di+Lt]}R[Bt+Lt]=rr}return I.toTensor()},t.prototype.fusedDepthwiseConv2D=function(e){var r=e.input,i=e.filter,a=e.convInfo,s=e.bias,u=e.activation,l=e.preluActivationWeights,f=this.depthwiseConv2D(r,i,a);return s&&(f=this.add(f,s)),u&&(f=nu(this,f,u,l)),f},t.prototype.depthwiseConv2D=function(e,r,i){ut([e,r],"depthwiseConv2D");for(var a=i.filterHeight,s=i.filterWidth,u=i.dilationHeight,l=i.dilationWidth,f=i.padInfo.left,A=i.padInfo.top,I=i.outChannels/i.inChannels,R=It(i.outShape,e.dtype),z=this.readSync(e.dataId),te=this.readSync(r.dataId),oe=R.values,ae=0;ae<i.batchSize;++ae)for(var se=ae*e.strides[0],we=ae*R.strides[0],xe=0;xe<i.outHeight;++xe)for(var me=we+xe*R.strides[1],Se=xe*i.strideHeight-f,Re=0;Re<a;++Re){var Me=Se+Re*u;if(!(Me<0||Me>=i.inHeight))for(var Fe=Re*r.strides[0],je=se+Me*e.strides[1],Be=0;Be<i.outWidth;++Be)for(var Ge=me+Be*R.strides[2],Qe=Be*i.strideWidth-A,Ze=0;Ze<s;++Ze){var Ye=Qe+Ze*l;if(!(Ye<0||Ye>=i.inWidth))for(var tt=Fe+Ze*r.strides[1],st=je+Ye*i.inChannels,at=Ge,it=tt,lt=0;lt<i.inChannels;++lt){for(var rt=z[st+lt],ft=0;ft<I;++ft)oe[at+ft]+=rt*te[it+ft];at+=I,it+=I}}}return R.toTensor()},t.prototype.depthwiseConv2DDerInput=function(e,r,i){ut([e,r],"depthwiseConv2DDerInput");for(var a=It(i.inShape,"float32"),s=a.values,u=a.strides,l=u[0],f=u[1],A=u[2],I=this.readSync(e.dataId),R=e.strides,z=R[0],te=R[1],oe=R[2],ae=this.readSync(r.dataId),se=r.strides,we=se[0],xe=se[1],me=se[2],Se=i.batchSize,Re=i.filterHeight,Me=i.filterWidth,Fe=i.inChannels,je=i.inHeight,Be=i.inWidth,Ge=i.outChannels,Qe=i.outHeight,Ze=i.outWidth,Ye=i.strideHeight,tt=i.strideWidth,st=Re-1-i.padInfo.top,at=Me-1-i.padInfo.left,it=Ge/Fe,lt=0;lt<Se;++lt)for(var rt=0;rt<Fe;++rt)for(var ft=0;ft<je;++ft)for(var dt=ft-st,yt=Math.max(0,Math.ceil(dt/Ye)),Ct=Math.min(Qe,(Re+dt)/Ye),Tt=0;Tt<Be;++Tt){for(var Pt=Tt-at,Ut=Math.max(0,Math.ceil(Pt/tt)),Ft=Math.min(Ze,(Me+Pt)/tt),Wt=0,Bt=yt;Bt<Ct;++Bt)for(var Lt=Bt*Ye-dt,rr=Ut;rr<Ft;++rr)for(var Ht=z*lt+te*Bt+oe*rr,sr=we*(Re-1-Lt)+xe*(Me-1-(rr*tt-Pt))+me*rt,yr=0;yr<it;++yr)Wt+=I[Ht+(rt*it+yr)]*ae[sr+yr];s[l*lt+f*ft+A*Tt+rt]=Wt}return a.toTensor()},t.prototype.depthwiseConv2DDerFilter=function(e,r,i){ut([e,r],"depthwiseConv2DDerFilter");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,f=It(i.filterShape,"float32"),A=i.padInfo.left,I=i.padInfo.top,R=i.outChannels/i.inChannels,z=this.bufferSync(e),te=this.bufferSync(r),oe=0;oe<u;++oe)for(var ae=Math.max(0,Math.ceil((I-oe)/a)),se=Math.min(i.outHeight,(i.inHeight+I-oe)/a),we=0;we<l;++we)for(var xe=Math.max(0,Math.ceil((A-we)/s)),me=Math.min(i.outWidth,(i.inWidth+A-we)/s),Se=0;Se<i.outChannels;++Se){for(var Re=Math.trunc(Se/R),Me=Se%R,Fe=0,je=0;je<i.batchSize;++je)for(var Be=ae;Be<se;++Be)for(var Ge=oe+Be*a-I,Qe=xe;Qe<me;++Qe){var Ze=we+Qe*s-A;Fe+=z.get(je,Ge,Ze,Re)*te.get(je,Be,Qe,Se)}f.set(Fe,oe,we,Re,Me)}return f.toTensor()},t.prototype.tile=function(e,r){return ut(e,"tile"),kl(this.bufferSync(e),r)},t.prototype.pad=function(e,r,i){ut(e,"pad");var a=r.map(function(R,z){return R[0]+e.shape[z]+R[1]}),s=r.map(function(R){return R[0]}),u=this.bufferSync(e),l=It(a,e.dtype);i!==0&&l.values.fill(i);for(var f=0;f<e.size;f++){var A=u.indexToLoc(f),I=A.map(function(R,z){return R+s[z]});l.set.apply(l,[u.get.apply(u,A)].concat(I))}return l.toTensor()},t.prototype.transpose=function(e,r){ut(e,"transpose");for(var i=new Array(e.rank),a=0;a<i.length;a++)i[a]=e.shape[r[a]];var s=this.readSync(e.dataId),u=It(i,e.dtype),l=this.bufferSync(e);for(a=0;a<e.size;++a){for(var f=l.indexToLoc(a),A=new Array(f.length),I=0;I<A.length;I++)A[I]=f[r[I]];var R=u.locToIndex(A);u.values[R]=s[a]}return u.toTensor()},t.prototype.gather=function(e,r,i){ut([e,r],"gather");var a=e.shape.slice(),s=this.readSync(r.dataId);a[i]=s.length;for(var u=It(a,e.dtype),l=this.bufferSync(e),f=0;f<u.size;++f){var A=u.indexToLoc(f),I=A.slice();I[i]=s[A[i]];var R=l.locToIndex(I);u.values[f]=l.values[R]}return u.toTensor()},t.prototype.batchToSpaceND=function(e,r,i){ut([e],"batchToSpaceND");var a=r.reduce(function(I,R){return I*R}),s=So(e.shape,r,a),u=Io(s.length,r.length),l=To(e.shape,r,a),f=ml(i,r.length),A=gl(l,i,r.length);return e.reshape(s).transpose(u).reshape(l).slice(f,A)},t.prototype.spaceToBatchND=function(e,r,i){ut([e],"spaceToBatchND");var a=r.reduce(function(R,z){return R*z}),s=[[0,0]];s.push.apply(s,i);for(var u=1+r.length;u<e.shape.length;++u)s.push([0,0]);var l=e.pad(s),f=So(l.shape,r,a,!1),A=Io(f.length,r.length,!1),I=To(l.shape,r,a,!1);return l.reshape(f).transpose(A).reshape(I)},t.prototype.pool=function(e,r,i){ut(e,"pool");for(var a=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,f=r.effectiveFilterHeight,A=r.effectiveFilterWidth,I=r.padInfo.top,R=r.padInfo.left,z=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,te=this.readSync(e.dataId),oe=It(r.outShape,e.dtype),ae=oe.values,se=r.outShape[1]*r.outShape[2]*r.outShape[3],we=r.outShape[2]*r.outShape[3],xe=r.outShape[3],me=0;me<r.batchSize;++me)for(var Se=me*se,Re=me*e.strides[0],Me=0;Me<r.inChannels;++Me)for(var Fe=0;Fe<r.outHeight;++Fe)for(var je=Fe*a-I,Be=Math.max(0,je),Ge=Math.min(r.inHeight,f+je),Qe=Se+Fe*we,Ze=0;Ze<r.outWidth;++Ze){for(var Ye=Ze*s-R,tt=Math.max(0,Ye),st=Math.min(r.inWidth,A+Ye),at=z,it=0,lt=0,rt=Be;rt<Ge;rt+=u){for(var ft=Re+rt*e.strides[1],dt=tt;dt<st;dt+=l){var yt=te[ft+dt*e.strides[2]+Me];i==="max"&&yt>at?at=yt:i==="avg"&&(it+=yt,lt++)}if(isNaN(at))break}ae[Qe+Ze*xe+Me]=i==="avg"?it/lt:at}return oe.toTensor()},t.prototype.maxPool=function(e,r){return this.pool(e,r,"max")},t.prototype.maxPoolPositions=function(e,r){for(var i=It(r.outShape,"int32"),a=r.strideHeight,s=r.strideWidth,u=r.dilationHeight,l=r.dilationWidth,f=r.effectiveFilterHeight,A=r.effectiveFilterWidth,I=r.padInfo.top,R=r.padInfo.left,z=this.bufferSync(e),te=0;te<r.batchSize;++te)for(var oe=0;oe<r.inChannels;++oe)for(var ae=0;ae<r.outHeight;++ae){for(var se=ae*a-I,we=se;we<0;)we+=u;for(var xe=Math.min(r.inHeight,f+se),me=0;me<r.outWidth;++me){for(var Se=me*s-R,Re=Se;Re<0;)Re+=l;for(var Me=Math.min(r.inWidth,A+Se),Fe=Number.NEGATIVE_INFINITY,je=-1,Be=we;Be<xe;Be+=u)for(var Ge=Be-se,Qe=Re;Qe<Me;Qe+=l){var Ze=Qe-Se,Ye=z.get(te,Be,Qe,oe);Ye>Fe&&(Fe=Ye,je=Ge*A+Ze)}i.set(je,te,ae,me,oe)}}return i.toTensor()},t.prototype.maxPoolBackprop=function(e,r,i,a){ut([r,i],"maxPoolBackprop");for(var s=this.maxPoolPositions(r,a),u=a.strideHeight,l=a.strideWidth,f=a.dilationHeight,A=a.dilationWidth,I=a.effectiveFilterHeight,R=a.effectiveFilterWidth,z=R-1-a.padInfo.left,te=I-1-a.padInfo.top,oe=It(r.shape,"float32"),ae=this.bufferSync(s),se=this.bufferSync(e),we=0;we<a.batchSize;++we)for(var xe=0;xe<a.inChannels;++xe)for(var me=0;me<a.inHeight;++me)for(var Se=0;Se<a.inWidth;++Se){for(var Re=me-te,Me=Se-z,Fe=0,je=0;je<I;je+=f){var Be=(Re+je)/u;if(!(Be<0||Be>=a.outHeight||Math.floor(Be)!==Be))for(var Ge=0;Ge<R;Ge+=A){var Qe=(Me+Ge)/l;if(!(Qe<0||Qe>=a.outWidth||Math.floor(Qe)!==Qe)){var Ze=I*R-1-ae.get(we,Be,Qe,xe)===je*R+Ge?1:0;Ze!==0&&(Fe+=se.get(we,Be,Qe,xe)*Ze)}}}oe.set(Fe,we,me,Se,xe)}return oe.toTensor()},t.prototype.avgPoolBackprop=function(e,r,i){ut([e,r],"avgPoolBackprop");for(var a=i.strideHeight,s=i.strideWidth,u=i.filterHeight,l=i.filterWidth,f=i.dilationHeight,A=i.dilationWidth,I=i.effectiveFilterHeight,R=i.effectiveFilterWidth,z=R-1-i.padInfo.left,te=I-1-i.padInfo.top,oe=It(r.shape,"float32"),ae=1/(u*l),se=this.bufferSync(e),we=0;we<i.batchSize;++we)for(var xe=0;xe<i.inChannels;++xe)for(var me=0;me<i.inHeight;++me)for(var Se=0;Se<i.inWidth;++Se){for(var Re=me-te,Me=Se-z,Fe=0,je=0;je<I;je+=f){var Be=(Re+je)/a;if(!(Be<0||Be>=i.outHeight||Math.floor(Be)!==Be))for(var Ge=0;Ge<R;Ge+=A){var Qe=(Me+Ge)/s;Qe<0||Qe>=i.outWidth||Math.floor(Qe)!==Qe||(Fe+=se.get(we,Be,Qe,xe))}}oe.set(Fe*ae,we,me,Se,xe)}return oe.toTensor()},t.prototype.pool3d=function(e,r,i){ut(e,"pool3d");for(var a=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,f=r.dilationHeight,A=r.dilationWidth,I=r.effectiveFilterDepth,R=r.effectiveFilterHeight,z=r.effectiveFilterWidth,te=r.padInfo.front,oe=r.padInfo.top,ae=r.padInfo.left,se=i==="max"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,we=this.readSync(e.dataId),xe=It(r.outShape,e.dtype),me=xe.values,Se=r.outShape[1]*r.outShape[2]*r.outShape[3]*r.outShape[4],Re=r.outShape[2]*r.outShape[3]*r.outShape[4],Me=r.outShape[3]*r.outShape[4],Fe=r.outShape[4],je=0;je<r.batchSize;++je)for(var Be=je*Se,Ge=je*e.strides[0],Qe=0;Qe<r.inChannels;++Qe)for(var Ze=0;Ze<r.outDepth;++Ze){for(var Ye=Ze*a-te,tt=Ye;tt<0;)tt+=l;for(var st=Math.min(r.inDepth,I+Ye),at=Be+Ze*Re,it=0;it<r.outHeight;++it){for(var lt=it*s-oe,rt=lt;rt<0;)rt+=f;for(var ft=Math.min(r.inHeight,R+lt),dt=at+it*Me,yt=0;yt<r.outWidth;++yt){for(var Ct=yt*u-ae,Tt=Ct;Tt<0;)Tt+=A;for(var Pt=Math.min(r.inWidth,z+Ct),Ut=dt+yt*Fe,Ft=se,Wt=0,Bt=0,Lt=tt;Lt<st;Lt+=l){for(var rr=Ge+Lt*e.strides[1],Ht=rt;Ht<ft;Ht+=f){for(var sr=rr+Ht*e.strides[2],yr=Tt;yr<Pt;yr+=A){var br=we[sr+yr*e.strides[3]+Qe];if(i==="max"&&br>Ft?Ft=br:i==="avg"&&(Wt+=br,Bt++),isNaN(Ft))break}if(isNaN(Ft))break}if(isNaN(Ft))break}me[Ut+Qe]=i==="avg"?Wt/Bt:Ft}}}return xe.toTensor()},t.prototype.avgPool3d=function(e,r){return ut(e,"avgPool3d"),this.pool3d(e,r,"avg").toFloat()},t.prototype.avgPool3dBackprop=function(e,r,i){ut([e,r],"avgPool3dBackprop");for(var a=i.strideDepth,s=i.strideHeight,u=i.strideWidth,l=i.filterDepth,f=i.filterHeight,A=i.filterWidth,I=i.dilationDepth,R=i.dilationHeight,z=i.dilationWidth,te=i.effectiveFilterDepth,oe=i.effectiveFilterHeight,ae=i.effectiveFilterWidth,se=te-1-i.padInfo.front,we=ae-1-i.padInfo.left,xe=oe-1-i.padInfo.top,me=It(r.shape,"float32"),Se=1/(l*f*A),Re=this.bufferSync(e),Me=0;Me<i.batchSize;++Me)for(var Fe=0;Fe<i.inChannels;++Fe)for(var je=0;je<i.inDepth;++je)for(var Be=0;Be<i.inHeight;++Be)for(var Ge=0;Ge<i.inWidth;++Ge){for(var Qe=je-se,Ze=Be-xe,Ye=Ge-we,tt=0,st=0;st<te;st+=I){var at=(Qe+st)/a;if(!(at<0||at>=i.outDepth||Math.floor(at)!==at))for(var it=0;it<oe;it+=R){var lt=(Ze+it)/s;if(!(lt<0||lt>=i.outHeight||Math.floor(lt)!==lt))for(var rt=0;rt<ae;rt+=z){var ft=(Ye+rt)/u;ft<0||ft>=i.outWidth||Math.floor(ft)!==ft||(tt+=Re.get(Me,at,lt,ft,Fe))}}}me.set(tt*Se,Me,je,Be,Ge,Fe)}return me.toTensor()},t.prototype.maxPool3d=function(e,r){return ut(e,"maxPool3d"),this.pool3d(e,r,"max").toFloat()},t.prototype.maxPool3dPositions=function(e,r){for(var i=It(r.outShape,"int32"),a=r.strideDepth,s=r.strideHeight,u=r.strideWidth,l=r.dilationDepth,f=r.dilationHeight,A=r.dilationWidth,I=r.effectiveFilterDepth,R=r.effectiveFilterHeight,z=r.effectiveFilterWidth,te=r.padInfo.front,oe=r.padInfo.top,ae=r.padInfo.left,se=this.bufferSync(e),we=0;we<r.batchSize;++we)for(var xe=0;xe<r.inChannels;++xe)for(var me=0;me<r.outDepth;++me){for(var Se=me*a-te,Re=Se;Re<0;)Re+=l;for(var Me=Math.min(r.inDepth,I+Se),Fe=0;Fe<r.outHeight;++Fe){for(var je=Fe*s-oe,Be=je;Be<0;)Be+=f;for(var Ge=Math.min(r.inHeight,R+je),Qe=0;Qe<r.outWidth;++Qe){for(var Ze=Qe*u-ae,Ye=Ze;Ye<0;)Ye+=A;for(var tt=Math.min(r.inWidth,z+Ze),st=Number.NEGATIVE_INFINITY,at=-1,it=Re;it<Me;it+=l)for(var lt=it-Se,rt=Be;rt<Ge;rt+=f)for(var ft=rt-je,dt=Ye;dt<tt;dt+=A){var yt=dt-Ze,Ct=se.get(we,it,rt,dt,xe);Ct>=st&&(st=Ct,at=lt*R*z+ft*R+yt)}i.set(at,we,me,Fe,Qe,xe)}}}return i.toTensor()},t.prototype.maxPool3dBackprop=function(e,r,i,a){ut([r,i],"maxPool3dBackprop");for(var s=this.maxPool3dPositions(r,a),u=a.strideDepth,l=a.strideHeight,f=a.strideWidth,A=a.dilationDepth,I=a.dilationHeight,R=a.dilationWidth,z=a.effectiveFilterDepth,te=a.effectiveFilterHeight,oe=a.effectiveFilterWidth,ae=z-1-a.padInfo.front,se=oe-1-a.padInfo.left,we=te-1-a.padInfo.top,xe=It(r.shape,"float32"),me=this.bufferSync(s),Se=this.bufferSync(e),Re=0;Re<a.batchSize;++Re)for(var Me=0;Me<a.inChannels;++Me)for(var Fe=0;Fe<a.inDepth;++Fe)for(var je=0;je<a.inHeight;++je)for(var Be=0;Be<a.inWidth;++Be){for(var Ge=Fe-ae,Qe=je-we,Ze=Be-se,Ye=0,tt=0;tt<z;tt+=A){var st=(Ge+tt)/u;if(!(st<0||st>=a.outDepth||Math.floor(st)!==st))for(var at=0;at<te;at+=I){var it=(Qe+at)/l;if(!(it<0||it>=a.outHeight||Math.floor(it)!==it))for(var lt=0;lt<oe;lt+=R){var rt=(Ze+lt)/f;if(!(rt<0||rt>=a.outWidth||Math.floor(rt)!==rt)){var ft=z*te*oe-1-me.get(Re,st,it,rt,Me)===tt*te*oe+at*oe+lt?1:0;ft!==0&&(Ye+=Se.get(Re,st,it,rt,Me)*ft)}}}}xe.set(Ye,Re,Fe,je,Be,Me)}return xe.toTensor()},t.prototype.cast=function(e,r){return Ss(e,r,this)},t.prototype.reshape=function(e,r){return Bo(e,r)},t.prototype.avgPool=function(e,r){return ut(e,"avgPool"),this.pool(e,r,"avg").toFloat()},t.prototype.resizeBilinear=function(e,r,i,a){ut(e,"resizeBilinear");for(var s=e.shape,u=s[0],l=s[1],f=s[2],A=s[3],I=this.readSync(e.dataId),R=new Float32Array(le([u,r,i,A])),z=[a&&r>1?l-1:l,a&&i>1?f-1:f],te=[a&&r>1?r-1:r,a&&i>1?i-1:i],oe=0,ae=z[0]/te[0],se=z[1]/te[1],we=0;we<u;we++)for(var xe=0;xe<r;xe++)for(var me=ae*xe,Se=Math.floor(me),Re=me-Se,Me=Math.min(l-1,Math.ceil(me)),Fe=we*e.strides[0]+Se*e.strides[1],je=we*e.strides[0]+Me*e.strides[1],Be=0;Be<i;Be++)for(var Ge=se*Be,Qe=Math.floor(Ge),Ze=Ge-Qe,Ye=Math.min(f-1,Math.ceil(Ge)),tt=Fe+Qe*e.strides[2],st=je+Qe*e.strides[2],at=Fe+Ye*e.strides[2],it=je+Ye*e.strides[2],lt=0;lt<A;lt++){var rt=I[tt+lt],ft=I[st+lt],dt=rt+(I[at+lt]-rt)*Ze,yt=dt+(ft+(I[it+lt]-ft)*Ze-dt)*Re;R[oe++]=yt}return Cr(R,[u,r,i,A])},t.prototype.resizeBilinearBackprop=function(e,r,i){ut([e,r],"resizeBilinearBackprop");for(var a=r.shape,s=a[0],u=a[1],l=a[2],f=a[3],A=e.shape,I=A[1],R=A[2],z=new Float32Array(s*u*l*f),te=[i&&I>1?u-1:u,i&&R>1?l-1:l],oe=[i&&I>1?I-1:I,i&&R>1?R-1:R],ae=te[0]/oe[0],se=te[1]/oe[1],we=this.readSync(e.dataId),xe=0,me=0;me<s;me++)for(var Se=me*r.strides[0],Re=0;Re<I;Re++)for(var Me=Re*ae,Fe=Math.floor(Me),je=Math.min(Math.ceil(Me),u-1),Be=Se+Fe*r.strides[1],Ge=Se+je*r.strides[1],Qe=Me-Fe,Ze=1-Qe,Ye=0;Ye<R;Ye++)for(var tt=Ye*se,st=Math.floor(tt),at=Math.min(Math.ceil(tt),l-1),it=tt-st,lt=1-it,rt=Be+st*r.strides[2],ft=Be+at*r.strides[2],dt=Ge+st*r.strides[2],yt=Ge+at*r.strides[2],Ct=Ze*lt,Tt=Ze*it,Pt=Qe*lt,Ut=Qe*it,Ft=0;Ft<f;Ft++){var Wt=we[xe++];z[rt+Ft]+=Wt*Ct,z[ft+Ft]+=Wt*Tt,z[dt+Ft]+=Wt*Pt,z[yt+Ft]+=Wt*Ut}return bn(z,[s,l,u,f],r.dtype)},t.prototype.resizeNearestNeighbor=function(e,r,i,a){ut(e,"resizeNearestNeighbor");for(var s=e.shape,u=s[0],l=s[1],f=s[2],A=s[3],I=this.readSync(e.dataId),R=new Float32Array(u*r*i*A),z=[a&&r>1?l-1:l,a&&i>1?f-1:f],te=[a&&r>1?r-1:r,a&&i>1?i-1:i],oe=z[0]/te[0],ae=z[1]/te[1],se=0,we=0;we<u;we++)for(var xe=we*e.strides[0],me=0;me<r;me++)for(var Se=oe*me,Re=xe+Math.min(l-1,a?Math.round(Se):Math.floor(Se))*e.strides[1],Me=0;Me<i;Me++)for(var Fe=ae*Me,je=Re+Math.min(f-1,a?Math.round(Fe):Math.floor(Fe))*e.strides[2],Be=0;Be<A;Be++){var Ge=I[je+Be];R[se++]=Ge}return Cr(R,[u,r,i,A],e.dtype)},t.prototype.resizeNearestNeighborBackprop=function(e,r,i){ut([e,r],"resizeNearestNeighborBackprop");for(var a=r.shape,s=a[0],u=a[1],l=a[2],f=a[3],A=e.shape,I=A[1],R=A[2],z=new Float32Array(s*u*l*f),te=this.readSync(e.dataId),oe=[i&&I>1?u-1:u,i&&R>1?l-1:l],ae=[i&&I>1?I-1:I,i&&R>1?R-1:R],se=oe[0]/ae[0],we=oe[1]/ae[1],xe=1/se,me=1/we,Se=2*Math.ceil(xe)+2,Re=2*Math.ceil(me)+2,Me=0;Me<s;Me++)for(var Fe=Me*r.strides[0],je=0;je<u;je++)for(var Be=Fe+je*r.strides[1],Ge=Math.floor(je*xe),Qe=Math.floor(Ge-Se/2),Ze=0;Ze<l;Ze++)for(var Ye=Be+Ze*r.strides[2],tt=Math.floor(Ze*me),st=Math.floor(tt-Re/2),at=0;at<f;at++){for(var it=0,lt=0;lt<Se;lt++){var rt=lt+Qe;if(!(rt<0||rt>=I)){var ft=Fe+rt*e.strides[1],dt=rt*se;if(je===Math.min(u-1,i?Math.round(dt):Math.floor(dt)))for(var yt=0;yt<Re;yt++){var Ct=yt+st;if(!(Ct<0||Ct>=R)){var Tt=ft+Ct*e.strides[2],Pt=Ct*we;Ze===Math.min(l-1,i?Math.round(Pt):Math.floor(Pt))&&(it+=te[Tt+at])}}}}z[Ye+at]=it}return bn(z,r.shape,r.dtype)},t.prototype.batchNormalization=function(e,r,i,a,s,u){ut([e,r,i,s,u],"batchNorm");for(var l=this.readSync(e.dataId),f=this.readSync(r.dataId),A=this.readSync(i.dataId),I=s?this.readSync(s.dataId):new Float32Array([1]),R=u?this.readSync(u.dataId):new Float32Array([0]),z=new Float32Array(l.length),te=R.length,oe=I.length,ae=A.length,se=f.length,we=0,xe=0,me=0,Se=0,Re=0;Re<l.length;++Re)z[Re]=R[we++]+(l[Re]-f[xe++])*I[me++]/Math.sqrt(A[Se++]+a),we>=te&&(we=0),xe>=se&&(xe=0),me>=oe&&(me=0),Se>=ae&&(Se=0);return bn(z,e.shape)},t.prototype.localResponseNormalization4D=function(e,r,i,a,s){ut(e,"localResponseNormalization4D");var u=e.shape[3],l=u-1,f=this.readSync(e.dataId),A=e.size,I=new Float32Array(A);function R(ae){for(var se=ae%u,we=ae-se+Math.max(0,se-r),xe=ae-se+Math.min(se+r,l),me=0;we<=xe;we++){var Se=f[we];me+=Se*Se}return me}for(var z=0;z<A;z++){var te=R(z),oe=f[z]*Math.pow(i+a*te,-s);I[z]=oe}return bn(I,e.shape)},t.prototype.LRNGrad=function(e,r,i,a,s,u,l){ut(e,"LRNGrad");for(var f=e.shape[3],A=this.readSync(e.dataId),I=this.readSync(r.dataId),R=this.readSync(i.dataId),z=new Float32Array(e.size),te=e.size,oe=0;oe<te;oe++){for(var ae=oe%f,se=oe-ae+Math.max(0,ae-a),we=oe-ae+Math.min(f,ae+a+1),xe=0,me=se;me<we;me++)xe+=Math.pow(I[me],2);for(xe=u*xe+s,me=se;me<we;me++){var Se=-2*u*l*I[me]*R[oe]/xe;oe===me&&(Se+=Math.pow(xe,-l)),Se*=A[oe],z[me]+=Se}}return bn(z,e.shape)},t.prototype.multinomial=function(e,r,i,a){ut(e,"multinomial");for(var s=r?e:xi(e),u=s.shape[0],l=s.shape[1],f=fr([u,i],"int32"),A=this.readSync(f.dataId),I=this.readSync(s.dataId),R=0;R<u;++R){var z=R*l,te=new Float32Array(l-1);te[0]=I[z];for(var oe=1;oe<te.length;++oe)te[oe]=te[oe-1]+I[z+oe];for(var ae=Co(a.toString()),se=R*i,we=0;we<i;++we){var xe=ae();A[se+we]=te.length;for(var me=0;me<te.length;me++)if(xe<te[me]){A[se+we]=me;break}}}return f},t.prototype.oneHot=function(e,r,i,a){ut(e,"oneHot");var s=new Float32Array(e.size*r);s.fill(a);for(var u=this.readSync(e.dataId),l=0;l<e.size;++l)u[l]>=0&&u[l]<r&&(s[l*r+u[l]]=i);return Wi(s,[e.size,r],"int32")},t.prototype.nonMaxSuppression=function(e,r,i,a,s){return ut(e,"nonMaxSuppression"),Rs(this.readSync(e.dataId),this.readSync(r.dataId),i,a,s)},t.prototype.fft=function(e){return this.fftBatch(e,!1)},t.prototype.ifft=function(e){return this.fftBatch(e,!0)},t.prototype.fftBatch=function(e,r){for(var i=e.shape[0],a=e.shape[1],s=It(e.shape,"float32"),u=It(e.shape,"float32"),l=tn(e).as2D(i,a),f=Cn(e).as2D(i,a),A=0;A<i;A++)for(var I=l.slice([A,0],[1,a]),R=f.slice([A,0],[1,a]),z=Er(I,R),te=this.readSync(this.fftImpl(z,r).dataId),oe=0;oe<a;oe++){var ae=Sl(te,oe);s.values[A*a+oe]=ae.real,u.values[A*a+oe]=ae.imag}return Er(s.toTensor(),u.toTensor()).as2D(i,a)},t.prototype.fftImpl=function(e,r){var i=e.as1D(),a=i.size;if(this.isExponentOf2(a)){var s=this.fftRadix2(i,a,r).as2D(e.shape[0],e.shape[1]);return r&&(s=Er(tn(s).div(vt(a)),Cn(s).div(vt(a)))),s}var u=this.readSync(e.dataId),l=function(f){for(var A=new Float32Array(f.length/2),I=new Float32Array(f.length/2),R=0;R<f.length;R+=2)A[R/2]=f[R],I[R/2]=f[R+1];return{real:A,imag:I}}(this.fourierTransformByMatmul(u,a,r));return Er(l.real,l.imag).as2D(e.shape[0],e.shape[1])},t.prototype.isExponentOf2=function(e){return(e&e-1)==0},t.prototype.fftRadix2=function(e,r,i){if(r===1)return e;var a=this.readSync(e.dataId),s=r/2,u=function(se){for(var we=Math.ceil(se.length/4),xe=new Float32Array(we),me=new Float32Array(we),Se=0;Se<se.length;Se+=4)xe[Math.floor(Se/4)]=se[Se],me[Math.floor(Se/4)]=se[Se+1];return{real:xe,imag:me}}(a),l=Er(u.real,u.imag).as1D(),f=function(se){for(var we=Math.floor(se.length/4),xe=new Float32Array(we),me=new Float32Array(we),Se=2;Se<se.length;Se+=4)xe[Math.floor(Se/4)]=se[Se],me[Math.floor(Se/4)]=se[Se+1];return{real:xe,imag:me}}(a),A=Er(f.real,f.imag).as1D();l=this.fftRadix2(l,s,i),A=this.fftRadix2(A,s,i);var I=function(se,we){for(var xe=new Float32Array(se/2),me=new Float32Array(se/2),Se=0;Se<Math.ceil(se/2);Se++){var Re=(we?2:-2)*Math.PI*(Se/se);xe[Se]=Math.cos(Re),me[Se]=Math.sin(Re)}return{real:xe,imag:me}}(r,i),R=Er(I.real,I.imag).mul(A),z=l.add(R),te=l.sub(R),oe=tn(z).concat(tn(te)),ae=Cn(z).concat(Cn(te));return Er(oe,ae).as1D()},t.prototype.fourierTransformByMatmul=function(e,r,i){for(var a=new Float32Array(2*r),s=0;s<r;s++){for(var u=0,l=0,f=0;f<r;f++){var A=dh(s*f,r,i),I=Sl(e,f);u+=I.real*A.real-I.imag*A.imag,l+=I.real*A.imag+I.imag*A.real}i&&(u/=r,l/=r),fh(a,u,l,s)}return a},t.prototype.depthToSpace=function(e,r,i){Y(i==="NHWC",function(){return"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+i}),Y(r>1,function(){return"blockSize should be > 1 for depthToSpace, but was: "+r});for(var a=e.shape[0],s=e.shape[1],u=e.shape[2],l=e.shape[3],f=s*r,A=u*r,I=l/(r*r),R=this.readSync(e.dataId),z=new Float32Array(a*f*A*I),te=0,oe=0;oe<a;++oe)for(var ae=0;ae<f;++ae)for(var se=Math.floor(ae/r),we=ae%r,xe=0;xe<A;++xe)for(var me=Math.floor(xe/r),Se=(we*r+xe%r)*I,Re=0;Re<I;++Re){var Me=Re+Se+l*(me+u*(se+s*oe));z[te++]=R[Me]}return bn(z,[a,f,A,I])},t.prototype.broadcastedBinaryOp=function(e,r,i,a){var s=Mt(e.shape,r.shape),u=It(s,i),l=this.readSync(e.dataId),f=this.readSync(r.dataId),A=Ei(e.shape,s),I=Ei(r.shape,s),R=u.values;if(A.length+I.length===0)for(var z=0;z<R.length;++z)R[z]=a(l[z%l.length],f[z%f.length]);else{var te=this.bufferSync(e),oe=this.bufferSync(r),ae=function(se){var we=u.indexToLoc(se),xe=we.slice(-e.rank);A.forEach(function(Me){return xe[Me]=0});var me=te.locToIndex(xe),Se=we.slice(-r.rank);I.forEach(function(Me){return Se[Me]=0});var Re=oe.locToIndex(Se);R[se]=a(l[me],f[Re])};for(z=0;z<R.length;++z)ae(z)}return u.toTensor()},t.prototype.broadcastedBinaryComplexOp=function(e,r,i){var a=Mt(e.shape,r.shape),s=It(a,"float32"),u=It(a,"float32"),l=this.readSync(e.dataId),f=this.readSync(r.dataId),A=Ei(e.shape,a),I=Ei(r.shape,a),R=s.values,z=u.values;if(A.length+I.length===0)for(var te=0;te<R.length;te++){var oe=te%l.length,ae=te%f.length,se=i(l[2*oe],l[2*oe+1],f[2*ae],f[2*ae+1]);R[te]=se.real,z[te]=se.imag}else{var we=this.bufferSync(this.data.get(e.dataId).complexTensors.real),xe=this.bufferSync(this.data.get(r.dataId).complexTensors.real),me=function(Se){var Re=s.indexToLoc(Se),Me=Re.slice(-e.rank);A.forEach(function(Qe){return Me[Qe]=0});var Fe=we.locToIndex(Me),je=Re.slice(-r.rank);I.forEach(function(Qe){return je[Qe]=0});var Be=xe.locToIndex(je),Ge=i(l[2*Fe],l[2*Fe+1],f[2*Be],f[2*Be+1]);R[Se]=Ge.real,z[Se]=Ge.imag};for(te=0;te<R.length;te++)me(te)}return this.complex(s.toTensor(),u.toTensor())},t.prototype.split=function(e,r,i){return Rl(e,r,i)},t.prototype.dispose=function(){},t.prototype.floatPrecision=function(){return 32},t.prototype.epsilon=function(){return 1e-7},t.prototype.cropAndResize=function(e,r,i,a,s,u){for(var l=e.shape,f=l[0],A=l[1],I=l[2],R=l[3],z=r.shape[0],te=a[0],oe=a[1],ae=It([z,te,oe,R],"float32"),se=this.readSync(r.dataId),we=this.readSync(i.dataId),xe=this.readSync(e.dataId),me=e.strides,Se=ae.strides,Re=0;Re<z;Re++){var Me=4*Re,Fe=se[Me],je=se[Me+1],Be=se[Me+2],Ge=se[Me+3],Qe=we[Re];if(!(Qe>=f))for(var Ze=te>1?(Be-Fe)*(A-1)/(te-1):0,Ye=oe>1?(Ge-je)*(I-1)/(oe-1):0,tt=0;tt<te;tt++){var st=te>1?Fe*(A-1)+tt*Ze:.5*(Fe+Be)*(A-1);if(st<0||st>A-1)for(var at=0;at<oe;at++)for(var it=0;it<R;it++){var lt=it+at*Se[2]+tt*Se[1]+Re*Se[0];ae.values[lt]=u}else if(s==="bilinear"){var rt=Math.floor(st),ft=Math.ceil(st),dt=st-rt;for(at=0;at<oe;at++)if((Lt=oe>1?je*(I-1)+at*Ye:.5*(je+Ge)*(I-1))<0||Lt>I-1)for(it=0;it<R;it++)lt=it+at*Se[2]+tt*Se[1]+Re*Se[0],ae.values[lt]=u;else{var yt=Math.floor(Lt),Ct=Math.ceil(Lt),Tt=Lt-yt;for(it=0;it<R;it++){var Pt=xe[lt=it+yt*me[2]+rt*me[1]+Qe*me[0]],Ut=xe[lt=it+Ct*me[2]+rt*me[1]+Qe*me[0]],Ft=xe[lt=it+yt*me[2]+ft*me[1]+Qe*me[0]],Wt=Pt+(Ut-Pt)*Tt,Bt=Ft+(xe[lt=it+Ct*me[2]+ft*me[1]+Qe*me[0]]-Ft)*Tt;lt=it+at*Se[2]+tt*Se[1]+Re*Se[0],ae.values[lt]=Wt+(Bt-Wt)*dt}}}else for(at=0;at<oe;++at){var Lt;if((Lt=oe>1?je*(I-1)+at*Ye:.5*(je+Ge)*(I-1))<0||Lt>I-1)for(it=0;it<R;it++)lt=it+at*Se[2]+tt*Se[1]+Re*Se[0],ae.values[lt]=u;else{var rr=Math.round(Lt),Ht=Math.round(st);for(it=0;it<R;it++){var sr=it+rr*me[2]+Ht*me[1]+Qe*me[0],yr=it+at*Se[2]+tt*Se[1]+Re*Se[0];ae.values[yr]=xe[sr]}}}}}return ae.toTensor()},t.prototype.sparseToDense=function(e,r,i,a){var s=Ja(0,e,i),u=s.sliceRank,l=s.numUpdates,f=s.sliceSize,A=s.strides,I=s.outputSize;return this.scatter(e,r,i,I,f,l,u,A,a,!1)},t.prototype.gatherND=function(e,r){var i=r.shape,a=i[i.length-1],s=ys(e,r),u=s[0],l=s[1],f=s[2],A=s[3];if(l===0)return Cr([],u,e.dtype);for(var I=new ur([l,f],e.dtype),R=this.readSync(r.dataId),z=this.readSync(e.dataId),te=0;te<l;te++){for(var oe=[],ae=0,se=0;se<a;se++){var we=R[te*a+se];ae+=we*A[se],oe.push(we)}if(ae<0||ae>=e.size/f)throw new Error("Invalid indices: "+oe+" does not index into "+e.shape);for(var xe=0;xe<f;xe++)I.values[te*f+xe]=z[ae*f+xe]}return I.toTensor().reshape(u)},t.prototype.scatterND=function(e,r,i){var a=Ja(0,e,i),s=a.sliceRank,u=a.numUpdates,l=a.sliceSize,f=a.strides,A=a.outputSize,I=vt(0);return this.scatter(e,r,i,A,l,u,s,f,I,!0)},t.prototype.fill=function(e,r,i){var a=U(i=i||he(r),le(e));return a.fill(r),ze.makeTensor(a,e,i,this)},t.prototype.onesLike=function(e){if(e.dtype==="string")throw new Error("onesLike is not supported for string tensors");return this.fill(e.shape,1,e.dtype)},t.prototype.zerosLike=function(e){var r=U(e.dtype,le(e.shape));return this.makeOutput(r,e.shape,e.dtype)},t.prototype.linspace=function(e,r,i){return Is(e,r,i)},t.prototype.scatter=function(e,r,i,a,s,u,l,f,A,I){var R=[a/s,s],z=this.readSync(e.dataId),te=this.readSync(r.dataId);if(a===0)return Cr([],i,r.dtype);var oe=new ur(R,r.dtype);oe.values.fill(this.readSync(A.dataId)[0]);for(var ae=0;ae<u;ae++){for(var se=[],we=0,xe=0;xe<l;xe++){var me=z[ae*l+xe];se.push(me),we+=me*f[xe]}if(we<0||we>=a/s)throw new Error("Invalid indices: "+se+" does not index into "+i);for(var Se=0;Se<s;Se++)I?oe.values[we*s+Se]+=te[ae*s+Se]:oe.values[we*s+Se]=r.rank===0?te[0]:te[ae*s+Se]}return oe.toTensor().reshape(i)},t}(Cl);ze.registerBackend("cpu",function(){return new vg},1);for(var iu=0,af=[{kernelName:"NonMaxSuppressionV5",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t,a=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,f=u.iouThreshold,A=u.scoreThreshold,I=u.softNmsSigma,R=e;ut(a,"NonMaxSuppressionWithScore");var z=ks(R.data.get(a.dataId).values,R.data.get(s.dataId).values,l,f,A,I);return[z.selectedIndices,z.selectedScores]}},{kernelName:"Square",backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e;ut(r,"square");for(var a=i.data.get(r.dataId).values,s=new Float32Array(a.length),u=0;u<a.length;++u){var l=a[u];s[u]=l*l}return{dataId:i.write(s,r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}},{kernelName:ro,backendName:"cpu",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,a=r.b,s=e;ut([i,a],ro);var u=s.data.get(i.dataId).values,l=s.data.get(a.dataId).values,f=function(R,z,te,oe,ae,se){var we=Mt(R,z),xe=we.length,me=Ve(we),Se=Q(ae,le(we)),Re=R.length,Me=z.length,Fe=Ve(R),je=Ve(z),Be=Ei(R,we),Ge=Ei(z,we);if(Be.length+Ge.length===0)for(var Qe=0;Qe<Se.length;++Qe)Se[Qe]=se(te[Qe%te.length],oe[Qe%oe.length]);else{var Ze=function(Ye){var tt=zt(Ye,xe,me),st=tt.slice(-Re);Be.forEach(function(rt){return st[rt]=0});var at=Et(st,Re,Fe),it=tt.slice(-Me);Ge.forEach(function(rt){return it[rt]=0});var lt=Et(it,Me,je);Se[Ye]=se(te[at],oe[lt])};for(Qe=0;Qe<Se.length;++Qe)Ze(Qe)}return[Se,we]}(i.shape,a.shape,u,l,i.dtype,function(R,z){var te=R-z;return te*te}),A=f[0],I=f[1];return{dataId:s.write(A,I,i.dtype),shape:I,dtype:i.dtype}}}];iu<af.length;iu++)G(af[iu]);for(var Pa,mg=function(n){this.variableNames=["A"];var t=rn(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
int texR = coords[0];
|
|
int texC = coords[1];
|
|
int depth = coords[2];
|
|
vec2 uv = (vec2(texC, texR) + halfCR) / vec2(`+r+".0, "+e+`.0);
|
|
|
|
vec4 values = `+t.texture2D+`(A, uv);
|
|
float value;
|
|
if (depth == 0) {
|
|
value = values.r;
|
|
} else if (depth == 1) {
|
|
value = values.g;
|
|
} else if (depth == 2) {
|
|
value = values.b;
|
|
} else if (depth == 3) {
|
|
value = values.a;
|
|
}
|
|
|
|
setOutput(floor(value * 255.0 + 0.5));
|
|
}
|
|
`},gg=function(n){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var t=rn(),e=n[0],r=n[1];this.outputShape=n,this.userCode=`
|
|
void main() {
|
|
ivec3 coords = getOutputCoords();
|
|
int texR = coords[0];
|
|
int texC = coords[1];
|
|
int depth = coords[2];
|
|
|
|
vec4 result = vec4(0.);
|
|
|
|
for(int row=0; row<=1; row++) {
|
|
for(int col=0; col<=1; col++) {
|
|
texC = coords[1] + row;
|
|
depth = coords[2] + col;
|
|
|
|
vec2 uv = (vec2(texC, texR) + halfCR) /
|
|
vec2(`+r+".0, "+e+`.0);
|
|
vec4 values = `+t.texture2D+`(A, uv);
|
|
float value;
|
|
if (depth == 0) {
|
|
value = values.r;
|
|
} else if (depth == 1) {
|
|
value = values.g;
|
|
} else if (depth == 2) {
|
|
value = values.b;
|
|
} else if (depth == 3) {
|
|
value = values.a;
|
|
}
|
|
|
|
result[row * 2 + col] = floor(value * 255.0 + 0.5);
|
|
}
|
|
}
|
|
|
|
`+t.output+` = result;
|
|
}
|
|
`},au=0,of=[{kernelName:"FromPixels",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs,i=t.pixels,a=r.numChannels,s=typeof HTMLVideoElement!="undefined"&&i instanceof HTMLVideoElement,u=typeof HTMLImageElement!="undefined"&&i instanceof HTMLImageElement,l=s?[i.videoWidth,i.videoHeight]:[i.width,i.height],f=l[0],A=l[1],I=[A,f],R=[A,f,a];(u||s)&&(Pa==null&&(Pa=document.createElement("canvas").getContext("2d")),Pa.canvas.width=f,Pa.canvas.height=A,Pa.drawImage(i,0,0,f,A),i=Pa.canvas);var z=e.makeTensorInfo(I,"int32");e.texData.get(z.dataId).usage=jr.PIXELS,e.gpgpu.uploadPixelDataToTexture(e.getTexture(z.dataId),i);var te=P().getBool("WEBGL_PACK")?new gg(R):new mg(R),oe=e.runWebGLProgram(te,[z],"int32");return e.disposeData(z.dataId),oe}},{kernelName:"NonMaxSuppressionV5",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=n.attrs;Fi("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");var i=t,a=i.boxes,s=i.scores,u=r,l=u.maxOutputSize,f=u.iouThreshold,A=u.scoreThreshold,I=u.softNmsSigma,R=e,z=ks(R.readSync(a.dataId),R.readSync(s.dataId),l,f,A,I);return[z.selectedIndices,z.selectedScores]}},{kernelName:"Square",backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t.x,i=e,a=new Rt(r.shape,"return x * x;");return i.runWebGLProgram(a,[r],r.dtype)}},{kernelName:ro,backendName:"webgl",kernelFunc:function(n){var t=n.inputs,e=n.backend,r=t,i=r.a,a=r.b,s=e,u=P().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ci("return (a - b) * (a - b);",i.shape,a.shape):new Sr("return (a - b) * (a - b);",i.shape,a.shape);return s.compileAndRun(u,[i,a])}}];au<of.length;au++)G(of[au]);for(var ou=0,sf=[{kernelName:"Square",gradFunc:function(n,t){var e=t[0];return{x:function(){return n.mul(e.toFloat().mul(2))}}}},{kernelName:ro,gradFunc:function(n,t){var e=t[0],r=t[1],i=vt(2);return{a:function(){return nn(n,nn(i,Fr(e,r)))},b:function(){return nn(n,nn(i,Fr(r,e)))}}}}];ou<sf.length;ou++)F(sf[ou]);var yg=function(){function n(){}return n.prototype.fetch=function(t,e){return fetch(t,e)},n.prototype.now=function(){return performance.now()},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Browser's encoder only supports utf-8, but got "+e);return this.textEncoder==null&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return new TextDecoder(e).decode(t)},n}();P().get("IS_BROWSER")&&P().setPlatform("browser",new yg);var su,bg=function(){return Le(22591)},wg=function(){function n(){this.util=Le(24726),this.textEncoder=new this.util.TextEncoder}return n.prototype.fetch=function(t,e){return P().global.fetch!=null?P().global.fetch(t,e):(su==null&&(su=bg()),su(t,e))},n.prototype.now=function(){var t=y.hrtime();return 1e3*t[0]+t[1]/1e6},n.prototype.encode=function(t,e){if(e!=="utf-8"&&e!=="utf8")throw new Error("Node built-in encoder only supports utf-8, but got "+e);return this.textEncoder.encode(t)},n.prototype.decode=function(t,e){return t.length===0?"":new this.util.TextDecoder(e).decode(t)},n}();P().get("IS_NODE")&&P().setPlatform("node",new wg);var uu={float32:4,int32:4,uint16:2,uint8:1,bool:1},Zo=4;function uf(n,t){for(var e={},r=0,i=function(u){var l=u.name,f=u.dtype,A=u.shape,I=le(A),R=void 0;if("quantization"in u){var z=u.quantization;if(z.dtype!=="uint8"&&z.dtype!=="uint16")throw new Error("Weight "+u.name+" has unknown quantization dtype "+z.dtype+". Supported quantization dtypes are: 'uint8' and 'uint16'.");var te=uu[z.dtype],oe=n.slice(r,r+I*te),ae=z.dtype==="uint8"?new Uint8Array(oe):new Uint16Array(oe);if(f==="float32")R=Float32Array.from(ae,function(Re){return Re*z.scale+z.min});else{if(f!=="int32")throw new Error("Unsupported dtype in weight '"+l+"': "+f);R=Int32Array.from(ae,function(Re){return Math.round(Re*z.scale+z.min)})}r+=I*te}else if(f==="string"){var se=le(u.shape);R=[];for(var we=0;we<se;we++){var xe=new Uint32Array(n.slice(r,r+Zo))[0];r+=Zo;var me=new Uint8Array(n.slice(r,r+xe));R.push(me),r+=xe}}else{var Se=uu[f];if(oe=n.slice(r,r+I*Se),f==="float32")R=new Float32Array(oe);else if(f==="int32")R=new Int32Array(oe);else{if(f!=="bool")throw new Error("Unsupported dtype in weight '"+l+"': "+f);R=new Uint8Array(oe)}r+=I*Se}e[l]=Cr(R,A,f)},a=0,s=t;a<s.length;a++)i(s[a]);return e}function Ag(n){if(n===null)throw new Error("Invalid input value: "+JSON.stringify(n));var t=0,e=[];n.forEach(function(a){if(t+=a.byteLength,e.push(a.byteLength===a.buffer.byteLength?a:new a.constructor(a)),!(a instanceof Float32Array||a instanceof Int32Array||a instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+a.constructor.name)});var r=new Uint8Array(t),i=0;return e.forEach(function(a){r.set(new Uint8Array(a.buffer),i),i+=a.byteLength}),r.buffer}var lu=typeof E!="undefined"&&(typeof Blob=="undefined"||typeof atob=="undefined"||typeof btoa=="undefined");function lf(n){return lu?E.byteLength(n):new Blob([n]).size}function cu(n){var t=0;n.forEach(function(i){t+=i.byteLength});var e=new Uint8Array(t),r=0;return n.forEach(function(i){e.set(new Uint8Array(i),r),r+=i.byteLength}),e.buffer}function cf(n){for(n=n.trim();n.endsWith("/");)n=n.slice(0,n.length-1);var t=n.split("/");return t[t.length-1]}function oo(n){if(n.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:n.modelTopology==null?0:lf(JSON.stringify(n.modelTopology)),weightSpecsBytes:n.weightSpecs==null?0:lf(JSON.stringify(n.weightSpecs)),weightDataBytes:n.weightData==null?0:n.weightData.byteLength}}var In=function(){function n(){this.saveRouters=[],this.loadRouters=[]}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerSaveRouter=function(t){n.getInstance().saveRouters.push(t)},n.registerLoadRouter=function(t){n.getInstance().loadRouters.push(t)},n.getSaveHandlers=function(t){return n.getHandlers(t,"save")},n.getLoadHandlers=function(t,e){return n.getHandlers(t,"load",e)},n.getHandlers=function(t,e,r){var i=[];return(e==="load"?n.getInstance().loadRouters:n.getInstance().saveRouters).forEach(function(a){var s=a(t,r);s!==null&&i.push(s)}),i},n}(),Ba="://",Qi=function(){function n(){this.managers={}}return n.getInstance=function(){return n.instance==null&&(n.instance=new n),n.instance},n.registerManager=function(t,e){Y(t!=null,function(){return"scheme must not be undefined or null."}),t.endsWith(Ba)&&(t=t.slice(0,t.indexOf(Ba))),Y(t.length>0,function(){return"scheme must not be an empty string."});var r=n.getInstance();Y(r.managers[t]==null,function(){return"A model store manager is already registered for scheme '"+t+"'."}),r.managers[t]=e},n.getManager=function(t){var e=this.getInstance().managers[t];if(e==null)throw new Error("Cannot find model manager for scheme '"+t+"'");return e},n.getSchemes=function(){return Object.keys(this.getInstance().managers)},n}();function Jo(n){if(n.indexOf(Ba)===-1)throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+Qi.getSchemes().join(","));return{scheme:n.split(Ba)[0],path:n.split(Ba)[1]}}function ff(n,t,e){return e===void 0&&(e=!1),C(this,void 0,void 0,function(){var r,i,a,s,u,l,f,A,I;return x(this,function(R){switch(R.label){case 0:return Y(n!==t,function(){return"Old path and new path are the same: '"+n+"'"}),Y((r=In.getLoadHandlers(n)).length>0,function(){return"Copying failed because no load handler is found for source URL "+n+"."}),Y(r.length<2,function(){return"Copying failed because more than one ("+r.length+") load handlers for source URL "+n+"."}),i=r[0],Y((a=In.getSaveHandlers(t)).length>0,function(){return"Copying failed because no save handler is found for destination URL "+t+"."}),Y(a.length<2,function(){return"Copying failed because more than one ("+r.length+") save handlers for destination URL "+t+"."}),s=a[0],u=Jo(n).scheme,l=Jo(n).path,f=u===Jo(n).scheme,[4,i.load()];case 1:return A=R.sent(),e&&f?[4,Qi.getManager(u).removeModel(l)]:[3,3];case 2:R.sent(),R.label=3;case 3:return[4,s.save(A)];case 4:return I=R.sent(),!e||f?[3,6]:[4,Qi.getManager(u).removeModel(l)];case 5:R.sent(),R.label=6;case 6:return[2,I.modelArtifactsInfo]}})})}var da="models_store",Gi="model_info_store";function df(){if(!P().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var n=window||self,t=n.indexedDB||n.mozIndexedDB||n.webkitIndexedDB||n.msIndexedDB||n.shimIndexedDB;if(t==null)throw new Error("The current browser does not appear to support IndexedDB.");return t}function fu(n){var t=n.result;t.createObjectStore(da,{keyPath:"modelPath"}),t.createObjectStore(Gi,{keyPath:"modelPath"})}var _a=function(){function n(t){if(this.indexedDB=df(),t==null||!t)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=t}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){return x(this,function(e){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return[2,this.databaseAction(this.modelPath,t)]})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){return x(this,function(t){return[2,this.databaseAction(this.modelPath)]})})},n.prototype.databaseAction=function(t,e){var r=this;return new Promise(function(i,a){var s=r.indexedDB.open("tensorflowjs",1);s.onupgradeneeded=function(){return fu(s)},s.onsuccess=function(){var u=s.result;if(e==null){var l=u.transaction(da,"readonly"),f=l.objectStore(da).get(r.modelPath);f.onsuccess=function(){if(f.result==null)return u.close(),a(new Error("Cannot find model with path '"+r.modelPath+"' in IndexedDB."));i(f.result.modelArtifacts)},f.onerror=function(oe){return u.close(),a(f.error)},l.oncomplete=function(){return u.close()}}else{var A,I=oo(e),R=u.transaction(Gi,"readwrite"),z=R.objectStore(Gi),te=z.put({modelPath:r.modelPath,modelArtifactsInfo:I});te.onsuccess=function(){var oe=(A=u.transaction(da,"readwrite")).objectStore(da).put({modelPath:r.modelPath,modelArtifacts:e,modelArtifactsInfo:I});oe.onsuccess=function(){return i({modelArtifactsInfo:I})},oe.onerror=function(ae){var se=(z=R.objectStore(Gi)).delete(r.modelPath);se.onsuccess=function(){return u.close(),a(oe.error)},se.onerror=function(we){return u.close(),a(oe.error)}}},te.onerror=function(oe){return u.close(),a(te.error)},R.oncomplete=function(){A==null?u.close():A.oncomplete=function(){return u.close()}}}},s.onerror=function(u){return a(s.error)}})},n.URL_SCHEME="indexeddb://",n}(),hf=function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(_a.URL_SCHEME)?(t=n.slice(_a.URL_SCHEME.length),new _a(t)):null;var t};In.registerSaveRouter(hf),In.registerLoadRouter(hf);var xg=function(){function n(){this.indexedDB=df()}return n.prototype.listModels=function(){return C(this,void 0,void 0,function(){var t=this;return x(this,function(e){return[2,new Promise(function(r,i){var a=t.indexedDB.open("tensorflowjs",1);a.onupgradeneeded=function(){return fu(a)},a.onsuccess=function(){var s=a.result,u=s.transaction(Gi,"readonly"),l=u.objectStore(Gi).getAll();l.onsuccess=function(){for(var f={},A=0,I=l.result;A<I.length;A++){var R=I[A];f[R.modelPath]=R.modelArtifactsInfo}r(f)},l.onerror=function(f){return s.close(),i(l.error)},u.oncomplete=function(){return s.close()}},a.onerror=function(s){return i(a.error)}})]})})},n.prototype.removeModel=function(t){return C(this,void 0,void 0,function(){var e=this;return x(this,function(r){var i;return t=(i=t).startsWith(_a.URL_SCHEME)?i.slice(_a.URL_SCHEME.length):i,[2,new Promise(function(a,s){var u=e.indexedDB.open("tensorflowjs",1);u.onupgradeneeded=function(){return fu(u)},u.onsuccess=function(){var l,f=u.result,A=f.transaction(Gi,"readwrite"),I=A.objectStore(Gi),R=I.get(t);R.onsuccess=function(){if(R.result==null)return f.close(),s(new Error("Cannot find model with path '"+t+"' in IndexedDB."));var z=I.delete(t),te=function(){var oe=(l=f.transaction(da,"readwrite")).objectStore(da).delete(t);oe.onsuccess=function(){return a(R.result.modelArtifactsInfo)},oe.onerror=function(ae){return s(R.error)}};z.onsuccess=te,z.onerror=function(oe){return te(),f.close(),s(R.error)}},R.onerror=function(z){return f.close(),s(R.error)},A.oncomplete=function(){l==null?f.close():l.oncomplete=function(){return f.close()}}},u.onerror=function(l){return s(u.error)}})]})})},n}();if(P().getBool("IS_BROWSER"))try{Qi.registerManager(_a.URL_SCHEME,new xg)}catch(n){}var Ii="/",Ma="tensorflowjs_models",pf="info",Eg="model_topology",Cg="weight_specs",Sg="weight_data",Ig="model_metadata";function vf(n){return{info:[Ma,n,pf].join(Ii),topology:[Ma,n,Eg].join(Ii),weightSpecs:[Ma,n,Cg].join(Ii),weightData:[Ma,n,Sg].join(Ii),modelMetadata:[Ma,n,Ig].join(Ii)}}function Tg(n){var t=n.split(Ii);if(t.length<3)throw new Error("Invalid key format: "+n);return t.slice(1,t.length-1).join(Ii)}var Na=function(){function n(t){if(!P().getBool("IS_BROWSER")||typeof window=="undefined"||window.localStorage===void 0)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,t==null||!t)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=t,this.keys=vf(this.modelPath)}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i;return x(this,function(a){if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");e=JSON.stringify(t.modelTopology),r=JSON.stringify(t.weightSpecs),i=oo(t);try{return this.LS.setItem(this.keys.info,JSON.stringify(i)),this.LS.setItem(this.keys.topology,e),this.LS.setItem(this.keys.weightSpecs,r),this.LS.setItem(this.keys.weightData,function(s){if(lu)return E.from(s).toString("base64");for(var u=new Uint8Array(s),l="",f=0,A=u.length;f<A;f++)l+=String.fromCharCode(u[f]);return btoa(l)}(t.weightData)),this.LS.setItem(this.keys.modelMetadata,JSON.stringify({format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata})),[2,{modelArtifactsInfo:i}]}catch(s){throw this.LS.removeItem(this.keys.info),this.LS.removeItem(this.keys.topology),this.LS.removeItem(this.keys.weightSpecs),this.LS.removeItem(this.keys.weightData),this.LS.removeItem(this.keys.modelMetadata),new Error("Failed to save model '"+this.modelPath+"' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes="+i.modelTopologyBytes+", weightSpecsBytes="+i.weightSpecsBytes+", weightDataBytes="+i.weightDataBytes+".")}return[2]})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s,u;return x(this,function(l){if((t=JSON.parse(this.LS.getItem(this.keys.info)))==null)throw new Error("In local storage, there is no model with name '"+this.modelPath+"'");if(t.modelTopologyType!=="JSON")throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");if(e={},(r=JSON.parse(this.LS.getItem(this.keys.topology)))==null)throw new Error("In local storage, the topology of model '"+this.modelPath+"' is missing.");if(e.modelTopology=r,(i=JSON.parse(this.LS.getItem(this.keys.weightSpecs)))==null)throw new Error("In local storage, the weight specs of model '"+this.modelPath+"' are missing.");if(e.weightSpecs=i,(a=this.LS.getItem(this.keys.modelMetadata))!=null&&(s=JSON.parse(a),e.format=s.format,e.generatedBy=s.generatedBy,e.convertedBy=s.convertedBy,e.userDefinedMetadata=s.userDefinedMetadata),(u=this.LS.getItem(this.keys.weightData))==null)throw new Error("In local storage, the binary weight values of model '"+this.modelPath+"' are missing.");return e.weightData=function(f){if(lu){var A=E.from(f,"base64");return A.buffer.slice(A.byteOffset,A.byteOffset+A.byteLength)}for(var I=atob(f),R=new Uint8Array(I.length),z=0;z<I.length;++z)R.set([I.charCodeAt(z)],z);return R.buffer}(u),[2,e]})})},n.URL_SCHEME="localstorage://",n}(),mf=function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(Na.URL_SCHEME)?(t=n.slice(Na.URL_SCHEME.length),new Na(t)):null;var t};In.registerSaveRouter(mf),In.registerLoadRouter(mf);var Rg=function(){function n(){Y(P().getBool("IS_BROWSER"),function(){return"Current environment is not a web browser"}),Y(typeof window=="undefined"||window.localStorage!==void 0,function(){return"Current browser does not appear to support localStorage"}),this.LS=window.localStorage}return n.prototype.listModels=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s;return x(this,function(u){for(t={},e=Ma+Ii,r=Ii+pf,i=0;i<this.LS.length;++i)(a=this.LS.key(i)).startsWith(e)&&a.endsWith(r)&&(s=Tg(a),t[s]=JSON.parse(this.LS.getItem(a)));return[2,t]})})},n.prototype.removeModel=function(t){return C(this,void 0,void 0,function(){var e,r;return x(this,function(i){var a;if(t=(a=t).startsWith(Na.URL_SCHEME)?a.slice(Na.URL_SCHEME.length):a,e=vf(t),this.LS.getItem(e.info)==null)throw new Error("Cannot find model at path '"+t+"'");return r=JSON.parse(this.LS.getItem(e.info)),this.LS.removeItem(e.info),this.LS.removeItem(e.topology),this.LS.removeItem(e.weightSpecs),this.LS.removeItem(e.weightData),[2,r]})})},n}();if(P().getBool("IS_BROWSER"))try{Qi.registerManager(Na.URL_SCHEME,new Rg)}catch(n){}var kg="model",Og=".json",Dg=".weights.bin";function gf(n){return new Promise(function(t){return setTimeout(t)}).then(n)}var du=function(){function n(t){if(!P().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");t.startsWith(n.URL_SCHEME)&&(t=t.slice(n.URL_SCHEME.length)),t!=null&&t.length!==0||(t=kg),this.modelTopologyFileName=t+Og,this.weightDataFileName=t+Dg}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u;return x(this,function(l){switch(l.label){case 0:if(typeof document=="undefined")throw new Error("Browser downloads are not supported in this environment since `document` is not present");if(e=window.URL.createObjectURL(new Blob([t.weightData],{type:"application/octet-stream"})),!(t.modelTopology instanceof ArrayBuffer))return[3,1];throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");case 1:return r=[{paths:["./"+this.weightDataFileName],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,weightsManifest:r},a=window.URL.createObjectURL(new Blob([JSON.stringify(i)],{type:"application/json"})),(s=this.jsonAnchor==null?document.createElement("a"):this.jsonAnchor).download=this.modelTopologyFileName,s.href=a,[4,gf(function(){return s.dispatchEvent(new MouseEvent("click"))})];case 2:return l.sent(),t.weightData==null?[3,4]:((u=this.weightDataAnchor==null?document.createElement("a"):this.weightDataAnchor).download=this.weightDataFileName,u.href=e,[4,gf(function(){return u.dispatchEvent(new MouseEvent("click"))})]);case 3:l.sent(),l.label=4;case 4:return[2,{modelArtifactsInfo:oo(t)}]}})})},n.URL_SCHEME="downloads://",n}(),jg=function(){function n(t){if(t==null||t.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+t);this.files=t}return n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r=this;return x(this,function(i){return t=this.files[0],e=this.files.slice(1),[2,new Promise(function(a,s){var u=new FileReader;u.onload=function(l){var f=JSON.parse(l.target.result),A=f.modelTopology;if(A!=null){e.length===0&&a({modelTopology:A});var I=f.weightsManifest;if(I!=null){var R;try{R=r.checkManifestAndWeightFiles(I,e)}catch(ae){return void s(ae)}var z=[],te=[],oe=[];I.forEach(function(ae){ae.paths.forEach(function(se){te.push(se),oe.push(null)}),z.push.apply(z,ae.weights)}),I.forEach(function(ae){ae.paths.forEach(function(se){var we=new FileReader;we.onload=function(xe){var me=xe.target.result,Se=te.indexOf(se);oe[Se]=me,oe.indexOf(null)===-1&&a({modelTopology:A,weightSpecs:z,weightData:cu(oe),format:f.format,generatedBy:f.generatedBy,convertedBy:f.convertedBy,userDefinedMetadata:f.userDefinedMetadata})},we.onerror=function(xe){return s("Failed to weights data from file of path '"+se+"'.")},we.readAsArrayBuffer(R[se])})})}else s(new Error("weightManifest field is missing from file "+t.name))}else s(new Error("modelTopology field is missing from file "+t.name))},u.onerror=function(l){return s("Failed to read model topology and weights manifest JSON from file '"+t.name+"'. BrowserFiles supports loading Keras-style tf.Model artifacts only.")},u.readAsText(t)})]})})},n.prototype.checkManifestAndWeightFiles=function(t,e){for(var r=[],i=e.map(function(l){return cf(l.name)}),a={},s=0,u=t;s<u.length;s++)u[s].paths.forEach(function(l){var f=cf(l);if(r.indexOf(f)!==-1)throw new Error("Duplicate file basename found in weights manifest: '"+f+"'");if(r.push(f),i.indexOf(f)===-1)throw new Error("Weight file with basename '"+f+"' is not provided.");a[l]=e[i.indexOf(f)]});if(r.length!==e.length)throw new Error("Mismatch in the number of files in weights manifest ("+r.length+") and the number of weight files provided ("+e.length+").");return a},n}();function yf(n,t,e,r){(function(a){Y(a!=null&&Array.isArray(a)&&a.length>0,function(){return"promises must be a none empty array"})})(n),function(a,s){Y(a>=0&&a<=1,function(){return"Progress fraction must be in range [0, 1], but got startFraction "+a}),Y(s>=0&&s<=1,function(){return"Progress fraction must be in range [0, 1], but got endFraction "+s}),Y(s>=a,function(){return"startFraction must be no more than endFraction, but got startFraction "+a+" and endFraction "+s})}(e=e==null?0:e,r=r==null?1:r);var i=0;return Promise.all(n.map(function(a){return a.then(function(s){var u=e+ ++i/n.length*(r-e);return t(u),s}),a}))}function bf(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,f,A;return x(this,function(I){switch(I.label){case 0:return t==null&&(t={}),e=t.fetchFunc==null?P().platform.fetch:t.fetchFunc,r=n.map(function(R){return e(R,t.requestInit,{isBinary:!0})}),i=0,a=.5,t.onProgress!=null?[3,2]:[4,Promise.all(r)];case 1:return s=I.sent(),[3,4];case 2:return[4,yf(r,t.onProgress,i,a)];case 3:s=I.sent(),I.label=4;case 4:return u=s.map(function(R){return R.arrayBuffer()}),l=.5,f=1,t.onProgress!=null?[3,6]:[4,Promise.all(u)];case 5:return A=I.sent(),[3,8];case 6:return[4,yf(u,t.onProgress,l,f)];case 7:A=I.sent(),I.label=8;case 8:return[2,A]}})})}function wf(n){var t=this;return function(e,r,i){return r===void 0&&(r=""),C(t,void 0,void 0,function(){var a,s,u,l,f,A,I,R,z,te;return x(this,function(oe){switch(oe.label){case 0:if(a=e.map(function(){return!1}),s={},u=i!=null?i.map(function(){return!1}):[],l=[],e.forEach(function(ae,se){var we=0;ae.weights.forEach(function(xe){var me="quantization"in xe?xe.quantization.dtype:xe.dtype,Se=uu[me]*le(xe.shape),Re=function(){a[se]=!0,s[se]==null&&(s[se]=[]),s[se].push({manifestEntry:xe,groupOffset:we,sizeBytes:Se})};i!=null?i.forEach(function(Me,Fe){Me===xe.name&&(Re(),u[Fe]=!0)}):Re(),l.push(xe.name),we+=Se})}),!u.every(function(ae){return ae}))throw f=i.filter(function(ae,se){return!u[se]}),new Error("Could not find weights in manifest with names: "+f.join(", ")+`.
|
|
Manifest JSON has weights with names: `+l.join(", ")+".");return A=a.reduce(function(ae,se,we){return se&&ae.push(we),ae},[]),I=[],A.forEach(function(ae){e[ae].paths.forEach(function(se){var we=r+(r.endsWith("/")?"":"/")+se;I.push(we)})}),[4,n(I)];case 1:return R=oe.sent(),z={},te=0,A.forEach(function(ae){for(var se=e[ae].paths.length,we=0,xe=0;xe<se;xe++)we+=R[te+xe].byteLength;for(var me=new ArrayBuffer(we),Se=new Uint8Array(me),Re=0,Me=0;Me<se;Me++){var Fe=new Uint8Array(R[te+Me]);Se.set(Fe,Re),Re+=Fe.byteLength}s[ae].forEach(function(je){var Be=uf(me.slice(je.groupOffset,je.groupOffset+je.sizeBytes),[je.manifestEntry]);for(var Ge in Be)z[Ge]=Be[Ge]}),te+=se}),[2,z]}})})}}In.registerSaveRouter(function(n){return P().getBool("IS_BROWSER")&&!Array.isArray(n)&&n.startsWith(du.URL_SCHEME)?function(t){return t===void 0&&(t="model"),new du(t)}(n.slice(du.URL_SCHEME.length)):null});var Af=function(){function n(t,e){if(this.DEFAULT_METHOD="POST",e==null&&(e={}),this.weightPathPrefix=e.weightPathPrefix,this.onProgress=e.onProgress,e.fetchFunc!=null?(Y(typeof e.fetchFunc=="function",function(){return"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"}),this.fetch=e.fetchFunc):this.fetch=P().platform.fetch,Y(t!=null&&t.length>0,function(){return"URL path for http must not be null, undefined or empty."}),Array.isArray(t)&&Y(t.length===2,function(){return"URL paths for http must have a length of 2, (actual length is "+t.length+")."}),this.path=t,e.requestInit!=null&&e.requestInit.body!=null)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=e.requestInit||{}}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){var e,r,i,a;return x(this,function(s){switch(s.label){case 0:if(t.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");return(e=Object.assign({method:this.DEFAULT_METHOD},this.requestInit)).body=new FormData,r=[{paths:["./model.weights.bin"],weights:t.weightSpecs}],i={modelTopology:t.modelTopology,format:t.format,generatedBy:t.generatedBy,convertedBy:t.convertedBy,userDefinedMetadata:t.userDefinedMetadata,weightsManifest:r},e.body.append("model.json",new Blob([JSON.stringify(i)],{type:"application/json"}),"model.json"),t.weightData!=null&&e.body.append("model.weights.bin",new Blob([t.weightData],{type:"application/octet-stream"}),"model.weights.bin"),[4,this.fetch(this.path,e)];case 1:if((a=s.sent()).ok)return[2,{modelArtifactsInfo:oo(t),responses:[a]}];throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+a.status+".")}})})},n.prototype.load=function(){return C(this,void 0,void 0,function(){var t,e,r,i,a,s,u,l,f,A,I,R;return x(this,function(z){switch(z.label){case 0:return[4,this.fetch(this.path,this.requestInit)];case 1:if(!(t=z.sent()).ok)throw new Error("Request to "+this.path+" failed with status code "+t.status+". Please verify this URL points to the model JSON of the model to load.");z.label=2;case 2:return z.trys.push([2,4,,5]),[4,t.json()];case 3:return e=z.sent(),[3,5];case 4:throw z.sent(),r="Failed to parse model JSON of response from "+this.path+".",this.path.endsWith(".pb")?r+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":r+=" Please make sure the server is serving valid JSON for this request.",new Error(r);case 5:if(i=e.modelTopology,a=e.weightsManifest,s=e.generatedBy,u=e.convertedBy,l=e.format,f=e.userDefinedMetadata,i==null&&a==null)throw new Error("The JSON from HTTP path "+this.path+" contains neither model topology or manifest for weights.");return a==null?[3,7]:[4,this.loadWeights(a)];case 6:R=z.sent(),A=R[0],I=R[1],z.label=7;case 7:return[2,{modelTopology:i,weightSpecs:A,weightData:I,userDefinedMetadata:f,generatedBy:s,convertedBy:u,format:l}]}})})},n.prototype.loadWeights=function(t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,f,A,I,R;return x(this,function(z){switch(z.label){case 0:for(e=Array.isArray(this.path)?this.path[1]:this.path,r=function(te){var oe=te.lastIndexOf("/"),ae=te.lastIndexOf("?"),se=te.substring(0,oe),we=ae>oe?te.substring(ae):"";return[se+"/",we]}(e),i=r[0],a=r[1],s=this.weightPathPrefix||i,u=[],l=0,f=t;l<f.length;l++)A=f[l],u.push.apply(u,A.weights);return I=[],t.forEach(function(te){te.paths.forEach(function(oe){I.push(s+oe+a)})}),[4,bf(I,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress})];case 1:return R=z.sent(),[2,[u,cu(R)]]}})})},n.URL_SCHEME_REGEX=/^https?:\/\//,n}();function hu(n){return n.match(Af.URL_SCHEME_REGEX)!=null}var xf=function(n,t){return typeof fetch=="undefined"?null:(Array.isArray(n)?n.every(function(e){return hu(e)}):hu(n))?pu(n,{onProgress:t}):null};function pu(n,t){return new Af(n,t)}In.registerSaveRouter(xf),In.registerLoadRouter(xf);var vu=function(){function n(t){this.modelArtifacts=t}return n.prototype.load=function(){return C(this,void 0,void 0,function(){return x(this,function(t){return[2,this.modelArtifacts]})})},n}(),Pg=function(){function n(t){this.saveHandler=t}return n.prototype.save=function(t){return C(this,void 0,void 0,function(){return x(this,function(e){return[2,this.saveHandler(t)]})})},n}(),Ef=Object.freeze({browserFiles:function(n){return new jg(n)},browserHTTPRequest:function(n,t){return pu(n,t)},concatenateArrayBuffers:cu,decodeWeights:uf,encodeWeights:function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u=this;return x(this,function(l){switch(l.label){case 0:for(e=[],r=[],i=Array.isArray(n)?n.map(function(f){return f.name}):Object.keys(n),a=function(f){var A=i[f],I=Array.isArray(n)?n[f].tensor:n[A];if(I.dtype!=="float32"&&I.dtype!=="int32"&&I.dtype!=="bool"&&I.dtype!=="string")throw new Error("Unsupported dtype in weight '"+A+"': "+I.dtype);var R={name:A,shape:I.shape,dtype:I.dtype};if(I.dtype==="string"){var z=new Promise(function(te){return C(u,void 0,void 0,function(){var oe,ae,se,we,xe,me,Se;return x(this,function(Re){switch(Re.label){case 0:return[4,I.bytes()];case 1:for(oe=Re.sent(),ae=oe.reduce(function(Me,Fe){return Me+Fe.length},0)+Zo*oe.length,se=new Uint8Array(ae),we=0,xe=0;xe<oe.length;xe++)me=oe[xe],Se=new Uint8Array(new Uint32Array([me.length]).buffer),se.set(Se,we),we+=Zo,se.set(me,we),we+=me.length;return te(se),[2]}})})});r.push(z)}else r.push(I.data());t!=null&&(R.group=t),e.push(R)},s=0;s<i.length;++s)a(s);return[4,Promise.all(r)];case 1:return[2,{data:Ag(l.sent()),specs:e}]}})})},fromMemory:function(n,t,e,r){return arguments.length===1?n.modelTopology!=null||n.weightSpecs!=null?new vu(n):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new vu({modelTopology:n})):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new vu({modelTopology:n,weightSpecs:t,weightData:e,trainingConfig:r}))},getLoadHandlers:function(n,t){return In.getLoadHandlers(n,t)},getModelArtifactsInfoForJSON:oo,getSaveHandlers:function(n){return In.getSaveHandlers(n)},http:pu,isHTTPScheme:hu,loadWeights:function(n,t,e,r){return t===void 0&&(t=""),C(this,void 0,void 0,function(){return x(this,function(i){return[2,wf(function(a){return bf(a,{requestInit:r})})(n,t,e)]})})},registerLoadRouter:function(n){return In.registerLoadRouter(n)},registerSaveRouter:function(n){return In.registerSaveRouter(n)},weightsLoaderFactory:wf,withSaveHandler:function(n){return new Pg(n)},copyModel:function(n,t){return C(this,void 0,void 0,function(){return x(this,function(e){return[2,ff(n,t,!1)]})})},listModels:function(){return C(this,void 0,void 0,function(){var n,t,e,r,i,a,s;return x(this,function(u){switch(u.label){case 0:n=Qi.getSchemes(),t={},e=0,r=n,u.label=1;case 1:return e<r.length?(i=r[e],[4,Qi.getManager(i).listModels()]):[3,4];case 2:for(s in a=u.sent())t[i+Ba+s]=a[s];u.label=3;case 3:return e++,[3,1];case 4:return[2,t]}})})},moveModel:function(n,t){return C(this,void 0,void 0,function(){return x(this,function(e){return[2,ff(n,t,!0)]})})},removeModel:function(n){return C(this,void 0,void 0,function(){var t;return x(this,function(e){return t=Jo(n),[2,Qi.getManager(t.scheme).removeModel(t.path)]})})}}),Fa,Bg=We({confusionMatrix_:function(n,t,e){var r=Oe(n,"labels","confusionMatrix"),i=Oe(t,"predictions","confusionMatrix");Y(e==null||e>0&&Number.isInteger(e),function(){return"If provided, numClasses must be a positive integer, but got "+e}),Y(r.rank===1,function(){return"Expected the rank of labels to be 1, but got "+r.rank}),Y(i.rank===1,function(){return"Expected the rank of predictions to be 1, but got "+i.rank}),Y(r.shape[0]===i.shape[0],function(){return"Mismatch in the number of examples: "+r.shape[0]+" vs. "+i.shape[0]+". Labels and predictions should have the same number of elements."}),Y(e>0&&Number.isInteger(e),function(){return"numClasses is required to be a positive integer, but got "+e});var a=gs(r.asType("int32"),e),s=gs(i.asType("int32"),e);return a.transpose().matMul(s).asType("int32")}}),cb=Object.freeze({confusionMatrix:Bg}),_g=We({fromPixels_:function(n,t){if(t===void 0&&(t=3),t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(n==null)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");var e=!1,r=!1,i=!1,a=!1,s=!1;if(n.data instanceof Uint8Array)e=!0;else if(typeof ImageData!="undefined"&&n instanceof ImageData)r=!0;else if(typeof HTMLVideoElement!="undefined"&&n instanceof HTMLVideoElement)i=!0;else if(typeof HTMLImageElement!="undefined"&&n instanceof HTMLImageElement)a=!0;else{if(n.getContext==null)throw new Error("pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was "+n.constructor.name);s=!0}if(i&&i&&n.readyState<2)throw new Error("The video element has not loaded data yet. Please wait for `loadeddata` event on the <video> element.");if(D("FromPixels",ze.backendName)!=null)return ze.runKernel("FromPixels",{pixels:n},{numChannels:t});var u,l,f=i?[n.videoWidth,n.videoHeight]:[n.width,n.height],A=f[0],I=f[1];if(s?u=n.getContext("2d").getImageData(0,0,A,I).data:r||e?u=n.data:(a||i)&&(Fa==null&&(Fa=document.createElement("canvas").getContext("2d")),Fa.canvas.width=A,Fa.canvas.height=I,Fa.drawImage(n,0,0,A,I),u=Fa.getImageData(0,0,A,I).data),t===4)l=new Int32Array(u);else{var R=A*I;l=new Int32Array(R*t);for(var z=0;z<R;z++)for(var te=0;te<t;++te)l[z*t+te]=u[4*z+te]}return ps(l,[I,A,t],"int32")}}),mu=Object.freeze({toPixels:function(n,t){return C(this,void 0,void 0,function(){var e,r,i,a,s,u,l,f,A,I,R,z,te,oe,ae,se,we,xe,me,Se,Re,Me,Fe;return x(this,function(je){switch(je.label){case 0:if(e=Oe(n,"img","toPixels"),n instanceof Dt||(e=e.toInt()),e.rank!==2&&e.rank!==3)throw new Error("toPixels only supports rank 2 or 3 tensors, got rank "+e.rank+".");if(r=e.shape.slice(0,2),i=r[0],a=r[1],(s=e.rank===2?1:e.shape[2])>4||s===2)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+s);return[4,e.data()];case 1:return u=je.sent(),l=e.min(),f=e.max(),[4,Promise.all([l.data(),f.data()])];case 2:if(A=je.sent(),I=A[0],R=A[1],z=I[0],te=R[0],l.dispose(),f.dispose(),e.dtype==="float32"){if(z<0||te>1)throw new Error("Tensor values for a float32 Tensor must be in the range [0 - 1] but got range ["+z+" - "+te+"].")}else{if(e.dtype!=="int32")throw new Error("Unsupported type for toPixels: "+e.dtype+". Please use float32 or int32 tensors.");if(z<0||te>255)throw new Error("Tensor values for a int32 Tensor must be in the range [0 - 255] but got range ["+z+" - "+te+"].")}for(oe=e.dtype==="float32"?255:1,ae=new Uint8ClampedArray(a*i*4),se=0;se<i*a;++se)we=void 0,xe=void 0,me=void 0,Se=void 0,s===1?(we=u[se]*oe,xe=u[se]*oe,me=u[se]*oe,Se=255):s===3?(we=u[3*se]*oe,xe=u[3*se+1]*oe,me=u[3*se+2]*oe,Se=255):s===4&&(we=u[4*se]*oe,xe=u[4*se+1]*oe,me=u[4*se+2]*oe,Se=u[4*se+3]*oe),ae[(Re=4*se)+0]=Math.round(we),ae[Re+1]=Math.round(xe),ae[Re+2]=Math.round(me),ae[Re+3]=Math.round(Se);return t!=null&&(t.width=a,t.height=i,Me=t.getContext("2d"),Fe=new ImageData(ae,a,i),Me.putImageData(Fe,0,0)),e!==n&&e.dispose(),[2,ae]}})})},fromPixels:_g}),Cf=function(){function n(){}return n.prototype.getClassName=function(){return this.constructor.className},n.fromConfig=function(t,e){return new t(e)},n}(),Sf=function(){function n(){this.classNameMap={}}return n.getMap=function(){return n.instance==null&&(n.instance=new n),n.instance},n.register=function(t){n.getMap().classNameMap[t.className]=[t,t.fromConfig]},n}();function Hi(n){Y(n.className!=null,function(){return"Class being registered does not have the static className property defined."}),Y(typeof n.className=="string",function(){return"className is required to be a string, but got type "+typeof n.className}),Y(n.className.length>0,function(){return"Class being registered has an empty-string as its className, which is disallowed."}),Sf.register(n)}var fb=Object.freeze({Serializable:Cf,SerializationMap:Sf,registerClass:Hi}),Mg=.001,If=.1;function gu(){return ze.backend.floatPrecision()===32?Mg:If}function yu(n,t,e){var r=!0;if((M(n)||M(t))&&(r=!1),M(n)&&M(t)&&(r=!0),r){var i=n.constructor.name,a=t.constructor.name;if(i!==a)throw new Error("Arrays are of different type. Actual: "+i+". Expected: "+a)}if(Array.isArray(n)&&Array.isArray(t)){var s=mr(n),u=mr(t);if(!ue(s,u))throw new Error("Arrays have different shapes. Actual: ["+s+"]. Expected: ["+u+"]")}var l=M(n)?n:be(n),f=M(t)?t:be(t);if(l.length!==f.length)throw new Error("Arrays have different lengths actual: "+l.length+" vs expected: "+f.length+`.
|
|
Actual: `+l+`.
|
|
Expected: `+f+".");for(var A=0;A<f.length;++A){var I=l[A],R=f[A];if(!e(I,R))throw new Error("Arrays differ: actual["+A+"] = "+I+", expected["+A+"] = "+R+`.
|
|
Actual: `+l+`.
|
|
Expected: `+f+".")}}function bu(n,t,e){return!isFinite(n)&&!isFinite(t)||!(isNaN(n)||isNaN(t)||Math.abs(n-t)>e)}var db=Object.freeze({TEST_EPSILON_FLOAT16:If,expectArraysClose:function(n,t,e){return e==null&&(e=gu()),yu(n,t,function(r,i){return bu(r,i,e)})},testEpsilon:gu,expectPromiseToFail:function(n,t){n().then(function(){return t.fail()},function(){return t()})},expectArraysEqual:function(n,t){var e=typeof t=="string"||typeof t=="number"||typeof t=="boolean"?[t]:t;return Ce(n)||Ce(n[0])||Ce(t)||Ce(t[0])?yu(n,e,function(r,i){return r==i}):yu(n,t,function(r,i){return bu(r,i,0)})},expectNumbersClose:function(n,t,e){if(e==null&&(e=gu()),!bu(n,t,e))throw new Error("Numbers differ: actual === "+n+", expected === "+t)},expectValuesInRange:function(n,t,e){for(var r=0;r<n.length;r++)if(n[r]<t||n[r]>e)throw new Error("Value out of range:"+n[r]+" low: "+t+", high: "+e)},expectArrayBuffersEqual:function(n,t){expect(new Float32Array(n)).toEqual(new Float32Array(t))}}),hb="1.7.0",pb=Object.freeze({gpgpu_util:ap,webgl_util:yi,forceHalfFloat:function(){P().set("WEBGL_FORCE_F16_TEXTURES",!0)},MathBackendWebGL:xc,setWebGLContext:Nn,GPGPUContext:ac}),ha=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return S(t,n),t.prototype.minimize=function(e,r,i){r===void 0&&(r=!1);var a=this.computeGradients(e,i),s=a.value,u=a.grads;if(i!=null){var l=i.map(function(f){return{name:f.name,tensor:u[f.name]}});this.applyGradients(l)}else this.applyGradients(u);return Br(u),r?s:(s.dispose(),null)},Object.defineProperty(t.prototype,"iterations",{get:function(){return this.iterations_==null&&(this.iterations_=0),this.iterations_},enumerable:!0,configurable:!0}),t.prototype.incrementIterations=function(){this.iterations_=this.iterations+1},t.prototype.computeGradients=function(e,r){return lh(e,r)},t.prototype.dispose=function(){this.iterations_!=null&&Br(this.iterations_)},t.prototype.saveIterations=function(){return C(this,void 0,void 0,function(){return x(this,function(e){return this.iterations_==null&&(this.iterations_=0),[2,{name:"iter",tensor:vt(this.iterations_,"int32")}]})})},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return x(this,function(e){throw new Error("getWeights() is not implemented for this optimizer yet.")})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return x(this,function(r){throw new Error("setWeights() is not implemented for this optimizer class "+this.getClassName())})})},t.prototype.extractIterations=function(e){return C(this,void 0,void 0,function(){var r;return x(this,function(i){switch(i.label){case 0:return r=this,[4,e[0].tensor.data()];case 1:return r.iterations_=i.sent()[0],[2,e.slice(1)]}})})},t}(Cf);Object.defineProperty(ha,Symbol.hasInstance,{value:function(n){return n.minimize!=null&&n.computeGradients!=null&&n.applyGradients!=null}});var Tf=function(n){function t(e,r,i){i===void 0&&(i=null);var a=n.call(this)||this;return a.learningRate=e,a.rho=r,a.epsilon=i,a.accumulatedGrads=[],a.accumulatedUpdates=[],i==null&&(a.epsilon=ze.backend.epsilon()),a}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=ze.registeredVariables[i];r.accumulatedGrads[a]==null&&(r.accumulatedGrads[a]={originalName:i+"/accum_grad",variable:mt(function(){return Gt(s).variable(!1)})}),r.accumulatedUpdates[a]==null&&(r.accumulatedUpdates[a]={originalName:i+"/accum_var",variable:mt(function(){return Gt(s).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[a].variable,f=r.accumulatedUpdates[a].variable;mt(function(){var A=l.mul(r.rho).add(u.square().mul(1-r.rho)),I=f.add(r.epsilon).sqrt().div(l.add(r.epsilon).sqrt()).mul(u),R=f.mul(r.rho).add(I.square().mul(1-r.rho));l.assign(A),f.assign(R);var z=I.mul(-r.learningRate).add(s);s.assign(z)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedUpdates!=null&&(Br(this.accumulatedGrads.map(function(e){return e.variable})),Br(this.accumulatedUpdates.map(function(e){return e.variable})))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return x(this,function(r){switch(r.label){case 0:return e=this.accumulatedGrads.concat(this.accumulatedUpdates),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r;return x(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=e.length/2,this.accumulatedGrads=e.slice(0,r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.accumulatedUpdates=e.slice(r,2*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.rho,r.epsilon)},t.className="Adadelta",t}(ha);Hi(Tf);var Rf=function(n){function t(e,r){r===void 0&&(r=.1);var i=n.call(this)||this;return i.learningRate=e,i.initialAccumulatorValue=r,i.accumulatedGrads=[],i}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=ze.registeredVariables[i];r.accumulatedGrads[a]==null&&(r.accumulatedGrads[a]={originalName:i+"/accumulator",variable:mt(function(){return ni(s.shape,r.initialAccumulatorValue).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedGrads[a].variable;mt(function(){var f=l.add(u.square());l.assign(f);var A=u.div(f.add(ze.backend.epsilon()).sqrt()).mul(-r.learningRate).add(s);s.assign(A)})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedGrads!=null&&Br(this.accumulatedGrads.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulatedGrads.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulatedGrads=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}},t.fromConfig=function(e,r){return new e(r.learningRate,r.initialAccumulatorValue)},t.className="Adagrad",t}(ha);Hi(Rf);var kf=function(n){function t(e,r,i,a){a===void 0&&(a=null);var s=n.call(this)||this;return s.learningRate=e,s.beta1=r,s.beta2=i,s.epsilon=a,s.accumulatedFirstMoment=[],s.accumulatedSecondMoment=[],mt(function(){s.accBeta1=vt(r).variable(),s.accBeta2=vt(i).variable()}),a==null&&(s.epsilon=ze.backend.epsilon()),s}return S(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(a){return a.name}):Object.keys(e);mt(function(){var a=Fr(1,r.accBeta1),s=Fr(1,r.accBeta2);i.forEach(function(u,l){var f=ze.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:mt(function(){return Gt(f).variable(!1)})}),r.accumulatedSecondMoment[l]==null&&(r.accumulatedSecondMoment[l]={originalName:u+"/v",variable:mt(function(){return Gt(f).variable(!1)})});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var I=r.accumulatedFirstMoment[l].variable,R=r.accumulatedSecondMoment[l].variable,z=I.mul(r.beta1).add(A.mul(1-r.beta1)),te=R.mul(r.beta2).add(A.square().mul(1-r.beta2)),oe=z.div(a),ae=te.div(s);I.assign(z),R.assign(te);var se=oe.div(ae.sqrt().add(r.epsilon)).mul(-r.learningRate).add(f);f.assign(se)}}),r.accBeta1.assign(r.accBeta1.mul(r.beta1)),r.accBeta2.assign(r.accBeta2.mul(r.beta2))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.accBeta2.dispose(),this.accumulatedFirstMoment!=null&&Br(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedSecondMoment!=null&&Br(this.accumulatedSecondMoment.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return x(this,function(r){switch(r.label){case 0:return e=this.accumulatedFirstMoment.concat(this.accumulatedSecondMoment),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r,i=this;return x(this,function(a){switch(a.label){case 0:return[4,this.extractIterations(e)];case 1:return e=a.sent(),mt(function(){i.accBeta1.assign(Vo(i.beta1,i.iterations_+1)),i.accBeta2.assign(Vo(i.beta2,i.iterations_+1))}),r=e.length/2,this.accumulatedFirstMoment=e.slice(0,r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),this.accumulatedSecondMoment=e.slice(r,2*r).map(function(s){return{originalName:s.name,variable:s.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon)},t.className="Adam",t}(ha);Hi(kf);var Of=function(n){function t(e,r,i,a,s){a===void 0&&(a=null),s===void 0&&(s=0);var u=n.call(this)||this;return u.learningRate=e,u.beta1=r,u.beta2=i,u.epsilon=a,u.decay=s,u.accumulatedFirstMoment=[],u.accumulatedWeightedInfNorm=[],mt(function(){u.iteration=vt(0).variable(),u.accBeta1=vt(r).variable()}),a==null&&(u.epsilon=ze.backend.epsilon()),u}return S(t,n),t.prototype.applyGradients=function(e){var r=this,i=Array.isArray(e)?e.map(function(a){return a.name}):Object.keys(e);mt(function(){var a=Fr(1,r.accBeta1),s=Hn(-r.learningRate,r.iteration.mul(r.decay).add(1));i.forEach(function(u,l){var f=ze.registeredVariables[u];r.accumulatedFirstMoment[l]==null&&(r.accumulatedFirstMoment[l]={originalName:u+"/m",variable:Gt(f).variable(!1)}),r.accumulatedWeightedInfNorm[l]==null&&(r.accumulatedWeightedInfNorm[l]={originalName:u+"/v",variable:Gt(f).variable(!1)});var A=Array.isArray(e)?e[l].tensor:e[u];if(A!=null){var I=r.accumulatedFirstMoment[l].variable,R=r.accumulatedWeightedInfNorm[l].variable,z=I.mul(r.beta1).add(A.mul(1-r.beta1)),te=R.mul(r.beta2),oe=A.abs(),ae=te.maximum(oe);I.assign(z),R.assign(ae);var se=s.div(a).mul(z.div(ae.add(r.epsilon))).add(f);f.assign(se)}}),r.iteration.assign(r.iteration.add(1)),r.accBeta1.assign(r.accBeta1.mul(r.beta1))}),this.incrementIterations()},t.prototype.dispose=function(){this.accBeta1.dispose(),this.iteration.dispose(),this.accumulatedFirstMoment!=null&&Br(this.accumulatedFirstMoment.map(function(e){return e.variable})),this.accumulatedWeightedInfNorm!=null&&Br(this.accumulatedWeightedInfNorm.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return x(this,function(e){throw new Error("getWeights() is not implemented for Adamax yet.")})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return x(this,function(r){throw new Error("setWeights() is not implemented for Adamax yet.")})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}},t.fromConfig=function(e,r){return new e(r.learningRate,r.beta1,r.beta2,r.epsilon,r.decay)},t.className="Adamax",t}(ha);Hi(Of);var wu=function(n){function t(e){var r=n.call(this)||this;return r.learningRate=e,r.setLearningRate(e),r}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=Array.isArray(e)?e[a].tensor:e[i];if(s!=null){var u=ze.registeredVariables[i];mt(function(){var l=r.c.mul(s).add(u);u.assign(l)})}}),this.incrementIterations()},t.prototype.setLearningRate=function(e){this.learningRate=e,this.c!=null&&this.c.dispose(),this.c=Xa(vt(-e))},t.prototype.dispose=function(){this.c.dispose()},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()]]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:if((e=r.sent()).length!==0)throw new Error("SGD optimizer does not have settable weights.");return[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate}},t.fromConfig=function(e,r){return new e(r.learningRate)},t.className="SGD",t}(ha);Hi(wu);var Df=function(n){function t(e,r,i){i===void 0&&(i=!1);var a=n.call(this,e)||this;return a.learningRate=e,a.momentum=r,a.useNesterov=i,a.accumulations=[],a.m=vt(a.momentum),a}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=ze.registeredVariables[i];r.accumulations[a]==null&&(r.accumulations[a]={originalName:i+"/momentum",variable:mt(function(){return Gt(s).variable(!1)})});var u=r.accumulations[a].variable,l=Array.isArray(e)?e[a].tensor:e[i];l!=null&&mt(function(){var f,A=r.m.mul(u).add(l);f=r.useNesterov?r.c.mul(l.add(A.mul(r.m))).add(s):r.c.mul(A).add(s),u.assign(A),s.assign(f)})}),this.incrementIterations()},t.prototype.dispose=function(){this.m.dispose(),this.accumulations!=null&&Br(this.accumulations.map(function(e){return e.variable}))},t.prototype.setMomentum=function(e){this.momentum=e},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){return x(this,function(e){switch(e.label){case 0:return[4,this.saveIterations()];case 1:return[2,[e.sent()].concat(this.accumulations.map(function(r){return{name:r.originalName,tensor:r.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){return x(this,function(r){switch(r.label){case 0:return[4,this.extractIterations(e)];case 1:return e=r.sent(),this.accumulations=e.map(function(i){return{originalName:i.name,variable:i.tensor.variable(!1)}}),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}},t.fromConfig=function(e,r){return new e(r.learningRate,r.momentum,r.useNesterov)},t.className="Momentum",t}(wu);Hi(Df);var jf=function(n){function t(e,r,i,a,s){r===void 0&&(r=.9),i===void 0&&(i=0),a===void 0&&(a=null),s===void 0&&(s=!1);var u=n.call(this)||this;if(u.learningRate=e,u.decay=r,u.momentum=i,u.epsilon=a,u.accumulatedMeanSquares=[],u.accumulatedMoments=[],u.accumulatedMeanGrads=[],u.centered=s,a==null&&(u.epsilon=ze.backend.epsilon()),e==null)throw new Error("learningRate for RMSPropOptimizer must be defined.");return u}return S(t,n),t.prototype.applyGradients=function(e){var r=this;(Array.isArray(e)?e.map(function(i){return i.name}):Object.keys(e)).forEach(function(i,a){var s=ze.registeredVariables[i];r.accumulatedMeanSquares[a]==null&&(r.accumulatedMeanSquares[a]={originalName:i+"/rms",variable:mt(function(){return Gt(s).variable(!1)})}),r.accumulatedMoments[a]==null&&(r.accumulatedMoments[a]={originalName:i+"/momentum",variable:mt(function(){return Gt(s).variable(!1)})}),r.accumulatedMeanGrads[a]==null&&r.centered&&(r.accumulatedMeanGrads[a]={originalName:i+"/mg",variable:mt(function(){return Gt(s).variable(!1)})});var u=Array.isArray(e)?e[a].tensor:e[i];if(u!=null){var l=r.accumulatedMeanSquares[a].variable,f=r.accumulatedMoments[a].variable;mt(function(){var A=l.mul(r.decay).add(u.square().mul(1-r.decay));if(r.centered){var I=r.accumulatedMeanGrads[a].variable,R=I.mul(r.decay).add(u.mul(1-r.decay)),z=f.mul(r.momentum).add(u.mul(r.learningRate).div(A.sub(R.square().add(r.epsilon)).sqrt()));l.assign(A),I.assign(R),f.assign(z);var te=s.sub(z);s.assign(te)}else{var oe=l.mul(r.decay).add(u.square().mul(1-r.decay));z=f.mul(r.momentum).add(u.mul(r.learningRate).div(oe.add(r.epsilon).sqrt())),l.assign(oe),f.assign(z),te=s.sub(z),s.assign(te)}})}}),this.incrementIterations()},t.prototype.dispose=function(){this.accumulatedMeanSquares!=null&&Br(this.accumulatedMeanSquares.map(function(e){return e.variable})),this.accumulatedMeanGrads!=null&&this.centered&&Br(this.accumulatedMeanGrads.map(function(e){return e.variable})),this.accumulatedMoments!=null&&Br(this.accumulatedMoments.map(function(e){return e.variable}))},t.prototype.getWeights=function(){return C(this,void 0,void 0,function(){var e;return x(this,function(r){switch(r.label){case 0:return e=this.accumulatedMeanSquares.concat(this.accumulatedMoments),this.centered&&e.push.apply(e,this.accumulatedMeanGrads),[4,this.saveIterations()];case 1:return[2,[r.sent()].concat(e.map(function(i){return{name:i.originalName,tensor:i.variable}}))]}})})},t.prototype.setWeights=function(e){return C(this,void 0,void 0,function(){var r;return x(this,function(i){switch(i.label){case 0:return[4,this.extractIterations(e)];case 1:return e=i.sent(),r=this.centered?e.length/3:e.length/2,this.accumulatedMeanSquares=e.slice(0,r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.accumulatedMoments=e.slice(r,2*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}}),this.centered&&(this.accumulatedMeanGrads=e.slice(2*r,3*r).map(function(a){return{originalName:a.name,variable:a.tensor.variable(!1)}})),[2]}})})},t.prototype.getConfig=function(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}},t.fromConfig=function(e,r){return new e(r.learningRate,r.decay,r.momentum,r.epsilon,r.centered)},t.className="RMSProp",t}(ha);Hi(jf);var pa=function(){function n(){}return n.sgd=function(t){return new wu(t)},n.momentum=function(t,e,r){return r===void 0&&(r=!1),new Df(t,e,r)},n.rmsprop=function(t,e,r,i,a){return e===void 0&&(e=.9),r===void 0&&(r=0),i===void 0&&(i=null),a===void 0&&(a=!1),new jf(t,e,r,i,a)},n.adam=function(t,e,r,i){return t===void 0&&(t=.001),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),new kf(t,e,r,i)},n.adadelta=function(t,e,r){return t===void 0&&(t=.001),e===void 0&&(e=.95),r===void 0&&(r=null),new Tf(t,e,r)},n.adamax=function(t,e,r,i,a){return t===void 0&&(t=.002),e===void 0&&(e=.9),r===void 0&&(r=.999),i===void 0&&(i=null),a===void 0&&(a=0),new Of(t,e,r,i,a)},n.adagrad=function(t,e){return e===void 0&&(e=.1),new Rf(t,e)},n}(),vb={sgd:pa.sgd,momentum:pa.momentum,adadelta:pa.adadelta,adagrad:pa.adagrad,rmsprop:pa.rmsprop,adamax:pa.adamax,adam:pa.adam},Ng=typeof requestAnimationFrame!="undefined"?requestAnimationFrame:typeof setImmediate!="undefined"?setImmediate:function(n){return n()};function mb(){return new Promise(function(n){return Ng(function(){return n()})})}Dt.prototype.squaredDifference=function(n){return Ec(this,n)},He=pg;function va(n,t,e){if(e===void 0&&(e=!1),n.beginPath(),t.slice(1).forEach(function(a,s){var u=a.x,l=a.y,f=t[s];n.moveTo(f.x,f.y),n.lineTo(u,l)}),e){var r=t[t.length-1],i=t[0];if(!r||!i)return;n.moveTo(r.x,r.y),n.lineTo(i.x,i.y)}n.stroke()}var Au=function(n,t){return Au=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])},Au(n,t)};function St(n,t){Au(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var on=function(){return on=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++){e=arguments[r];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},on.apply(this,arguments)};function gb(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(e[r[i]]=n[r[i]]);return e}function yb(n,t,e,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(n,t,e,r);else for(var u=n.length-1;u>=0;u--)(s=n[u])&&(a=(i<3?s(a):i>3?s(t,e,a):s(t,e))||a);return i>3&&a&&Object.defineProperty(t,e,a),a}function bb(n,t){return function(e,r){t(e,r,n)}}function wb(n,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,t)}function wt(n,t,e,r){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function u(A){try{f(r.next(A))}catch(I){s(I)}}function l(A){try{f(r.throw(A))}catch(I){s(I)}}function f(A){A.done?a(A.value):i(A.value).then(u,l)}f((r=r.apply(n,t||[])).next())})}function At(n,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(f){return function(A){return l([f,A])}}function l(f){if(r)throw new TypeError("Generator is already executing.");for(;e;)try{if(r=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return e.label++,{value:f[1],done:!1};case 5:e.label++,i=f[1],f=[0];continue;case 7:f=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){e=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){e.label=f[1];break}if(f[0]===6&&e.label<a[1]){e.label=a[1],a=f;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(f);break}a[2]&&e.ops.pop(),e.trys.pop();continue}f=t.call(n,e)}catch(A){f=[6,A],i=0}finally{r=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function Ab(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}function xb(n,t){for(var e in n)e!=="default"&&!t.hasOwnProperty(e)&&(t[e]=n[e])}function Pf(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Fg(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(s)throw s.error}}return a}function Eb(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(Fg(arguments[t]));return n}function so(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;for(var r=Array(n),i=0,t=0;t<e;t++)for(var a=arguments[t],s=0,u=a.length;s<u;s++,i++)r[i]=a[s];return r}function Yo(n){return this instanceof Yo?(this.v=n,this):new Yo(n)}function Cb(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e.apply(n,t||[]),i,a=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(R){r[R]&&(i[R]=function(z){return new Promise(function(te,oe){a.push([R,z,te,oe])>1||u(R,z)})})}function u(R,z){try{l(r[R](z))}catch(te){I(a[0][3],te)}}function l(R){R.value instanceof Yo?Promise.resolve(R.value.v).then(f,A):I(a[0][2],R)}function f(R){u("next",R)}function A(R){u("throw",R)}function I(R,z){R(z),a.shift(),a.length&&u(a[0][0],a[0][1])}}function Sb(n){var t,e;return t={},r("next"),r("throw",function(i){throw i}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(i,a){t[i]=n[i]?function(s){return(e=!e)?{value:Yo(n[i](s)),done:i==="return"}:a?a(s):s}:a}}function Ib(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof Pf=="function"?Pf(n):n[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(a){e[a]=n[a]&&function(s){return new Promise(function(u,l){s=n[a](s),i(u,l,s.done,s.value)})}}function i(a,s,u,l){Promise.resolve(l).then(function(f){a({value:f,done:u})},s)}}function Tb(n,t){return Object.defineProperty?Object.defineProperty(n,"raw",{value:t}):n.raw=t,n}function Rb(n){if(n&&n.__esModule)return n;var t={};if(n!=null)for(var e in n)Object.hasOwnProperty.call(n,e)&&(t[e]=n[e]);return t.default=n,t}function kb(n){return n&&n.__esModule?n:{default:n}}function Ob(n,t){if(!t.has(n))throw new TypeError("attempted to get private field on non-instance");return t.get(n)}function Db(n,t,e){if(!t.has(n))throw new TypeError("attempted to set private field on non-instance");return t.set(n,e),e}var ma=function(){function n(t,e){if(!ga(t)||!ga(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),n.prototype.reverse=function(){return new n(1/this.width,1/this.height)},n}();function uo(n,t){return n instanceof Dt&&n.shape.length===t}function jb(n){return uo(n,1)}function Lg(n){return uo(n,2)}function $o(n){return uo(n,3)}function Xi(n){return uo(n,4)}function Ug(n){return n%1!==0}function Bf(n){return n%2===0}function xu(n,t){t===void 0&&(t=2);var e=Math.pow(10,t);return Math.floor(n*e)/e}function _f(n){return n&&n.width&&n.height}function Wg(n,t){var e=n.width,r=n.height,i=t/Math.max(r,e);return new ma(Math.round(e*i),Math.round(r*i))}function Eu(n){return n.reduce(function(t,e){return t.add(e)},new Kt(0,0)).div(new Kt(n.length,n.length))}function lo(n,t,e){return Array(n).fill(0).map(function(r,i){return t+i*e})}function ga(n){return!!n&&n!==1/0&&n!==-1/0&&!isNaN(n)||n===0}function Mf(n){return ga(n)&&0<=n&&n<=1}var Kt=function(){function n(t,e){this._x=t,this._y=e}return Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),n.prototype.add=function(t){return new n(this.x+t.x,this.y+t.y)},n.prototype.sub=function(t){return new n(this.x-t.x,this.y-t.y)},n.prototype.mul=function(t){return new n(this.x*t.x,this.y*t.y)},n.prototype.div=function(t){return new n(this.x/t.x,this.y/t.y)},n.prototype.abs=function(){return new n(Math.abs(this.x),Math.abs(this.y))},n.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},n.prototype.floor=function(){return new n(Math.floor(this.x),Math.floor(this.y))},n}(),ai=function(){function n(t,e){e===void 0&&(e=!0);var r=t||{},i=[r.left,r.top,r.right,r.bottom].every(ga),a=[r.x,r.y,r.width,r.height].every(ga);if(!a&&!i)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var s=a?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],u=s[0],l=s[1],f=s[2],A=s[3];n.assertIsValidBox({x:u,y:l,width:f,height:A},"Box.constructor",e),this._x=u,this._y=l,this._width=f,this._height=A}return n.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(ga)},n.assertIsValidBox=function(t,e,r){if(r===void 0&&(r=!1),!n.isRect(t))throw new Error(e+" - invalid box: "+JSON.stringify(t)+", expected object with properties x, y, width, height");if(!r&&(t.width<0||t.height<0))throw new Error(e+" - width ("+t.width+") and height ("+t.height+") must be positive numbers")},Object.defineProperty(n.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topLeft",{get:function(){return new Kt(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"topRight",{get:function(){return new Kt(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomLeft",{get:function(){return new Kt(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"bottomRight",{get:function(){return new Kt(this.right,this.bottom)},enumerable:!0,configurable:!0}),n.prototype.round=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.round(s)}),e=t[0],r=t[1],i=t[2],a=t[3];return new n({x:e,y:r,width:i,height:a})},n.prototype.floor=function(){var t=[this.x,this.y,this.width,this.height].map(function(s){return Math.floor(s)}),e=t[0],r=t[1],i=t[2],a=t[3];return new n({x:e,y:r,width:i,height:a})},n.prototype.toSquare=function(){var t=this,e=t.x,r=t.y,i=t.width,a=t.height,s=Math.abs(i-a);return i<a&&(e-=s/2,i+=s),a<i&&(r-=s/2,a+=s),new n({x:e,y:r,width:i,height:a})},n.prototype.rescale=function(t){var e=_f(t)?t.width:t,r=_f(t)?t.height:t;return new n({x:this.x*e,y:this.y*r,width:this.width*e,height:this.height*r})},n.prototype.pad=function(t,e){var r=[this.x-t/2,this.y-e/2,this.width+t,this.height+e],i=r[0],a=r[1],s=r[2],u=r[3];return new n({x:i,y:a,width:s,height:u})},n.prototype.clipAtImageBorders=function(t,e){var r=this,i=r.x,a=r.y,s=r.right,u=r.bottom,l=Math.max(i,0),f=Math.max(a,0),A=s-l,I=u-f,R=Math.min(A,t-l),z=Math.min(I,e-f);return new n({x:l,y:f,width:R,height:z}).floor()},n.prototype.shift=function(t,e){var r=this,i=r.width,a=r.height,s=this.x+t,u=this.y+e;return new n({x:s,y:u,width:i,height:a})},n.prototype.padAtBorders=function(t,e){var r=this.width+1,i=this.height+1,a=1,s=1,u=r,l=i,f=this.left,A=this.top,I=this.right,R=this.bottom;return I>e&&(u=-I+e+r,I=e),R>t&&(l=-R+t+i,R=t),f<1&&(l=2-f,f=1),A<1&&(l=2-A,A=1),{dy:s,edy:l,dx:a,edx:u,y:A,ey:R,x:f,ex:I,w:r,h:i}},n.prototype.calibrate=function(t){return new n({left:this.left+t.left*this.width,top:this.top+t.top*this.height,right:this.right+t.right*this.width,bottom:this.bottom+t.bottom*this.height}).toSquare().round()},n}(),qo=function(n){St(t,n);function t(e,r,i,a,s){return s===void 0&&(s=!1),n.call(this,{left:e,top:r,right:i,bottom:a},s)||this}return t}(ai),Nf=function(){function n(t,e,r,i,a){this._imageDims=new ma(a.width,a.height),this._score=t,this._classScore=e,this._className=r,this._box=new ai(i).rescale(this._imageDims)}return Object.defineProperty(n.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativeBox",{get:function(){return new ai(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new n(this.score,this.classScore,this.className,this.relativeBox,{width:t,height:e})},n}(),Tn=function(n){St(t,n);function t(e,r,i){return n.call(this,e,e,"",r,i)||this}return t.prototype.forSize=function(e,r){var i=n.prototype.forSize.call(this,e,r),a=i.score,s=i.relativeBox,u=i.imageDims;return new t(a,s,u)},t}(Nf);function zg(n){var t=n.map(function(u){return u.x}),e=n.map(function(u){return u.y}),r=t.reduce(function(u,l){return l<u?l:u},1/0),i=e.reduce(function(u,l){return l<u?l:u},1/0),a=t.reduce(function(u,l){return u<l?l:u},0),s=e.reduce(function(u,l){return u<l?l:u},0);return new qo(r,i,a,s)}function Vg(n,t,e){e===void 0&&(e=!0);var r=Math.max(0,Math.min(n.right,t.right)-Math.max(n.left,t.left)),i=Math.max(0,Math.min(n.bottom,t.bottom)-Math.max(n.top,t.top)),a=r*i;return e?a/(n.area+t.area-a):a/Math.min(n.area,t.area)}function co(n,t,e,r){r===void 0&&(r=!0);for(var i=t.map(function(u,l){return{score:u,boxIndex:l}}).sort(function(u,l){return u.score-l.score}).map(function(u){return u.boxIndex}),a=[],s=function(){var u=i.pop();a.push(u);for(var l=i,f=[],A=0;A<l.length;A++){var I=l[A],R=n[u],z=n[I];f.push(Vg(R,z,r))}i=i.filter(function(te,oe){return f[oe]<=e})};i.length>0;)s();return a}function fo(n,t){return mt(function(){var e=t[0],r=t[1],i=t[2],a=ni(so(n.shape.slice(0,3),[1]),e),s=ni(so(n.shape.slice(0,3),[1]),r),u=ni(so(n.shape.slice(0,3),[1]),i),l=Mr([a,s,u],3);return Fr(n,l)})}function Qg(n,t){return t===void 0&&(t=!1),mt(function(){var e=n.shape.slice(1),r=e[0],i=e[1];if(r===i)return n;var a=Math.abs(r-i),s=Math.round(a*(t?.5:1)),u=r>i?2:1,l=function(z){var te=n.shape.slice();return te[u]=z,ni(te,0)},f=l(s),A=a-f.shape[u],I=t&&A?l(A):null,R=[I,n,f].filter(function(z){return!!z}).map(function(z){return z.toFloat()});return Mr(R,u)})}function Cu(n){return 1/(1+Math.exp(-n))}function Pb(n){return Math.log(n/(1-n))}var Su=function(n){St(t,n);function t(e,r,i,a,s){return s===void 0&&(s=!1),n.call(this,{x:e,y:r,width:i,height:a},s)||this}return t}(ai),Gg=.5,Hg=.43,Xg=.45,La=function(){function n(t,e,r){r===void 0&&(r=new Kt(0,0));var i=e.width,a=e.height;this._imgDims=new ma(i,a),this._shift=r,this._positions=t.map(function(s){return s.mul(new Kt(i,a)).add(r)})}return Object.defineProperty(n.prototype,"shift",{get:function(){return new Kt(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map(function(e){return e.sub(t._shift).div(new Kt(t.imageWidth,t.imageHeight))})},enumerable:!0,configurable:!0}),n.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},n.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new Kt(t,e))},n.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},n.prototype.align=function(t,e){if(e===void 0&&(e={}),t){var r=t instanceof Tn?t.box.floor():new ai(t);return this.shiftBy(r.x,r.y).align(null,e)}var i=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),a=i.useDlibAlignment,s=i.minBoxPadding;return a?this.alignDlib():this.alignMinBbox(s)},n.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],r=t[1],i=t[2],a=function(I){return i.sub(I).magnitude()},s=(a(e)+a(r))/2,u=Math.floor(s/Xg),l=Eu(t),f=Math.floor(Math.max(0,l.x-Gg*u)),A=Math.floor(Math.max(0,l.y-Hg*u));return new Su(f,A,Math.min(u,this.imageWidth+f),Math.min(u,this.imageHeight+A))},n.prototype.alignMinBbox=function(t){var e=zg(this.positions);return e.pad(e.width*t,e.height*t)},n.prototype.getRefPointsForAlignment=function(){throw new Error("getRefPointsForAlignment not implemented by base class")},n}(),Kg=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getRefPointsForAlignment=function(){var e=this.positions;return[e[0],e[1],Eu([e[3],e[4]])]},t}(La),Ff=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getJawOutline=function(){return this.positions.slice(0,17)},t.prototype.getLeftEyeBrow=function(){return this.positions.slice(17,22)},t.prototype.getRightEyeBrow=function(){return this.positions.slice(22,27)},t.prototype.getNose=function(){return this.positions.slice(27,36)},t.prototype.getLeftEye=function(){return this.positions.slice(36,42)},t.prototype.getRightEye=function(){return this.positions.slice(42,48)},t.prototype.getMouth=function(){return this.positions.slice(48,68)},t.prototype.getRefPointsForAlignment=function(){return[this.getLeftEye(),this.getRightEye(),this.getMouth()].map(Eu)},t}(La),Lf=function(){function n(t,e){this._label=t,this._distance=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){return t===void 0&&(t=!0),""+this.label+(t?" ("+xu(this.distance)+")":"")},n}(),Uf=function(n){St(t,n);function t(e,r){var i=n.call(this,e)||this;return i._label=r,i}return t.assertIsValidLabeledBox=function(e,r){if(ai.assertIsValidBox(e,r),!ga(e.label))throw new Error(r+" - expected property label ("+e.label+") to be a number")},Object.defineProperty(t.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),t}(ai),es=function(){function n(t,e){if(typeof t!="string")throw new Error("LabeledFaceDescriptors - constructor expected label to be a string");if(!Array.isArray(e)||e.some(function(r){return!(r instanceof Float32Array)}))throw new Error("LabeledFaceDescriptors - constructor expected descriptors to be an array of Float32Array");this._label=t,this._descriptors=e}return Object.defineProperty(n.prototype,"label",{get:function(){return this._label},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"descriptors",{get:function(){return this._descriptors},enumerable:!0,configurable:!0}),n.prototype.toJSON=function(){return{label:this.label,descriptors:this.descriptors.map(function(t){return Array.from(t)})}},n.fromJSON=function(t){var e=t.descriptors.map(function(r){return new Float32Array(r)});return new n(t.label,e)},n}(),Bb=function(n){St(t,n);function t(e,r,i,a){var s=n.call(this,e,r)||this;return s._score=i,s._classScore=a,s}return t.assertIsValidPredictedBox=function(e,r){if(Uf.assertIsValidLabeledBox(e,r),!Mf(e.score)||!Mf(e.classScore))throw new Error(r+" - expected properties score ("+e.score+") and ("+e.classScore+") to be a number between [0, 1]")},Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),t}(Uf);function ho(n){return n.detection instanceof Tn}function po(n,t){var e={detection:t};return Object.assign({},n,e)}function Wf(){var n=window.fetch||function(){throw new Error("fetch - missing fetch implementation for browser environment")},t=function(){throw new Error("readFile - filesystem not available for browser environment")};return{Canvas:HTMLCanvasElement,CanvasRenderingContext2D,Image:HTMLImageElement,ImageData,Video:HTMLVideoElement,createCanvasElement:function(){return document.createElement("canvas")},createImageElement:function(){return document.createElement("img")},fetch:n,readFile:t}}function zf(n){var t="";if(!n)try{n=Le(90872)}catch(r){t=r.toString()}var e=n?function(r){return new Promise(function(i,a){n.readFile(r,function(s,u){return s?a(s):i(u)})})}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+t)};return{readFile:e}}function Vf(){var n=Le.g.Canvas||Le.g.HTMLCanvasElement,t=Le.g.Image||Le.g.HTMLImageElement,e=function(){if(n)return new n;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},r=function(){if(t)return new t;throw new Error("createImageElement - missing Image implementation for nodejs environment")},i=Le.g.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},a=zf();return on({Canvas:n||function(){function s(){}return s}(),CanvasRenderingContext2D:Le.g.CanvasRenderingContext2D||function(){function s(){}return s}(),Image:t||function(){function s(){}return s}(),ImageData:Le.g.ImageData||function(){function s(){}return s}(),Video:Le.g.HTMLVideoElement||function(){function s(){}return s}(),createCanvasElement:e,createImageElement:r,fetch:i},a)}function Qf(){return typeof window=="object"&&typeof document!="undefined"&&typeof HTMLImageElement!="undefined"&&typeof HTMLCanvasElement!="undefined"&&typeof HTMLVideoElement!="undefined"&&typeof ImageData!="undefined"&&typeof CanvasRenderingContext2D!="undefined"}var Gf=Le(97671);function Hf(){return typeof Le.g=="object"&&!0&&!0&&typeof Gf!="undefined"&&!!Gf.version}var Lr;function Zg(){if(!Lr)throw new Error("getEnv - environment is not defined, check isNodejs() and isBrowser()");return Lr}function Iu(n){Lr=n}function Tu(){Qf()&&Iu(Wf()),Hf()&&Iu(Vf())}function Jg(n){if(Lr||Tu(),!Lr)throw new Error("monkeyPatch - environment is not defined, check isNodejs() and isBrowser()");var t=n.Canvas,e=t===void 0?Lr.Canvas:t,r=n.Image,i=r===void 0?Lr.Image:r;Lr.Canvas=e,Lr.Image=i,Lr.createCanvasElement=n.createCanvasElement||function(){return new e},Lr.createImageElement=n.createImageElement||function(){return new i},Lr.ImageData=n.ImageData||Lr.ImageData,Lr.Video=n.Video||Lr.Video,Lr.fetch=n.fetch||Lr.fetch,Lr.readFile=n.readFile||Lr.readFile}var sn={getEnv:Zg,setEnv:Iu,initialize:Tu,createBrowserEnv:Wf,createFileSystem:zf,createNodejsEnv:Vf,monkeyPatch:Jg,isBrowser:Qf,isNodejs:Hf};Tu();function Ru(n){return!sn.isNodejs()&&typeof n=="string"?document.getElementById(n):n}function oi(n){var t=sn.getEnv(),e=t.Canvas,r=t.CanvasRenderingContext2D;if(n instanceof r)return n;var i=Ru(n);if(!(i instanceof e))throw new Error("resolveContext2d - expected canvas to be of instance of Canvas");var a=i.getContext("2d");if(!a)throw new Error("resolveContext2d - canvas 2d context is null");return a}var Ki;(function(n){n.TOP_LEFT="TOP_LEFT",n.TOP_RIGHT="TOP_RIGHT",n.BOTTOM_LEFT="BOTTOM_LEFT",n.BOTTOM_RIGHT="BOTTOM_RIGHT"})(Ki||(Ki={}));var Xf=function(){function n(t){t===void 0&&(t={});var e=t.anchorPosition,r=t.backgroundColor,i=t.fontColor,a=t.fontSize,s=t.fontStyle,u=t.padding;this.anchorPosition=e||Ki.TOP_LEFT,this.backgroundColor=r||"rgba(0, 0, 0, 0.5)",this.fontColor=i||"rgba(255, 255, 255, 1)",this.fontSize=a||14,this.fontStyle=s||"Georgia",this.padding=u||4}return n}(),Kf=function(){function n(t,e,r){r===void 0&&(r={}),this.text=typeof t=="string"?[t]:t instanceof n?t.text:t,this.anchor=e,this.options=new Xf(r)}return n.prototype.measureWidth=function(t){var e=this.options.padding;return this.text.map(function(r){return t.measureText(r).width}).reduce(function(r,i){return r<i?i:r},0)+2*e},n.prototype.measureHeight=function(){var t=this.options,e=t.fontSize,r=t.padding;return this.text.length*e+2*r},n.prototype.getUpperLeft=function(t,e){var r=this.options.anchorPosition,i=r===Ki.BOTTOM_RIGHT||r===Ki.TOP_RIGHT,a=r===Ki.BOTTOM_LEFT||r===Ki.BOTTOM_RIGHT,s=this.measureWidth(t),u=this.measureHeight(),l=i?this.anchor.x-s:this.anchor.x,f=a?this.anchor.y-u:this.anchor.y;if(e){var A=e.width,I=e.height,R=Math.max(Math.min(l,A-s),0),z=Math.max(Math.min(f,I-u),0);return{x:R,y:z}}return{x:l,y:f}},n.prototype.draw=function(t){var e=Ru(t),r=oi(e),i=this.options,a=i.backgroundColor,s=i.fontColor,u=i.fontSize,l=i.fontStyle,f=i.padding;r.font=u+"px "+l;var A=this.measureWidth(r),I=this.measureHeight();r.fillStyle=a;var R=this.getUpperLeft(r,e);r.fillRect(R.x,R.y,A,I),r.fillStyle=s,this.text.forEach(function(z,te){var oe=f+R.x,ae=f+R.y+(te+1)*u;r.fillText(z,oe,ae)})},n}(),Yg=function(){function n(t){t===void 0&&(t={});var e=t.boxColor,r=t.lineWidth,i=t.label,a=t.drawLabelOptions;this.boxColor=e||"rgba(0, 0, 255, 1)",this.lineWidth=r||2,this.label=i;var s={anchorPosition:Ki.BOTTOM_LEFT,backgroundColor:this.boxColor};this.drawLabelOptions=new Xf(Object.assign({},s,a))}return n}(),$g=function(){function n(t,e){e===void 0&&(e={}),this.box=new ai(t),this.options=new Yg(e)}return n.prototype.draw=function(t){var e=oi(t),r=this.options,i=r.boxColor,a=r.lineWidth,s=this.box,u=s.x,l=s.y,f=s.width,A=s.height;e.strokeStyle=i,e.lineWidth=a,e.strokeRect(u,l,f,A);var I=this.options.label;I&&new Kf([I],{x:u-a/2,y:l},this.options.drawLabelOptions).draw(t)},n}();function qg(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof Tn?r.score:ho(r)?r.detection.score:void 0,a=r instanceof Tn?r.box:ho(r)?r.detection.box:new ai(r),s=i?""+xu(i):void 0;new $g(a,{label:s}).draw(n)})}function Zf(n){var t=sn.getEnv(),e=t.Image,r=t.Video;return n instanceof e&&n.complete||n instanceof r&&n.readyState>=3}function ey(n){return new Promise(function(t,e){if(n instanceof sn.getEnv().Canvas||Zf(n))return t();function r(a){a.currentTarget&&(a.currentTarget.removeEventListener("load",r),a.currentTarget.removeEventListener("error",i),t(a))}function i(a){a.currentTarget&&(a.currentTarget.removeEventListener("load",r),a.currentTarget.removeEventListener("error",i),e(a))}n.addEventListener("load",r),n.addEventListener("error",i)})}function _b(n){return new Promise(function(t,e){if(!(n instanceof Blob))return e("bufferToImage - expected buf to be of type: Blob");var r=new FileReader;r.onload=function(){if(typeof r.result!="string")return e("bufferToImage - expected reader.result to be a string, in onload");var i=env.getEnv().createImageElement();i.onload=function(){return t(i)},i.onerror=e,i.src=r.result},r.onerror=e,r.readAsDataURL(n)})}function ku(n){var t=sn.getEnv(),e=t.Image,r=t.Video;return n instanceof e?new ma(n.naturalWidth,n.naturalHeight):n instanceof r?new ma(n.videoWidth,n.videoHeight):new ma(n.width,n.height)}function ts(n){var t=n.width,e=n.height,r=sn.getEnv().createCanvasElement,i=r();return i.width=t,i.height=e,i}function Ou(n,t){var e=sn.getEnv().ImageData;if(!(n instanceof e)&&!Zf(n))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=t||ku(n),i=r.width,a=r.height,s=ts({width:i,height:a});return n instanceof e?oi(s).putImageData(n,0,0):oi(s).drawImage(n,0,0,i,a),s}function ty(n,t){return wt(this,void 0,void 0,function(){var e,r,i,a,s,u;return At(this,function(l){switch(l.label){case 0:return e=t||sn.getEnv().createCanvasElement(),r=n.shape.slice(Xi(n)?1:0),i=r[0],a=r[1],s=r[2],u=mt(function(){return n.as3D(i,a,s).toInt()}),[4,mu.toPixels(u,e)];case 1:return l.sent(),u.dispose(),[2,e]}})})}function Jf(n){var t=sn.getEnv(),e=t.Image,r=t.Canvas,i=t.Video;return n instanceof e||n instanceof r||n instanceof i}function ry(n,t,e){e===void 0&&(e=!1);var r=sn.getEnv(),i=r.Image,a=r.Canvas;if(!(n instanceof i||n instanceof a))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var s=ku(n),u=t/Math.max(s.height,s.width),l=u*s.width,f=u*s.height,A=ts({width:t,height:t}),I=n instanceof a?n:Ou(n),R=Math.abs(l-f)/2,z=e&&l<f?R:0,te=e&&f<l?R:0;return oi(A).drawImage(I,z,te,l,f),A}var rs=function(){function n(t,e){var r=this;if(e===void 0&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach(function(i,a){if($o(i)){r._imageTensors[a]=i,r._inputDimensions[a]=i.shape;return}if(Xi(i)){var s=i.shape[0];if(s!==1)throw new Error("NetInput - tf.Tensor4D with batchSize "+s+" passed, but not supported in input array");r._imageTensors[a]=i,r._inputDimensions[a]=i.shape.slice(1);return}var u=i instanceof sn.getEnv().Canvas?i:Ou(i);r._canvases[a]=u,r._inputDimensions[a]=[u.height,u.width,3]})}return Object.defineProperty(n.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"reshapedInputDimensions",{get:function(){var t=this;return lo(this.batchSize,0,1).map(function(e,r){return t.getReshapedInputDimensions(r)})},enumerable:!0,configurable:!0}),n.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},n.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},n.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},n.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},n.prototype.getReshapedInputDimensions=function(t){if(typeof this.inputSize!="number")throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");var e=this.getInputWidth(t),r=this.getInputHeight(t);return Wg({width:e,height:r},this.inputSize)},n.prototype.toBatchTensor=function(t,e){var r=this;return e===void 0&&(e=!0),this._inputSize=t,mt(function(){var i=lo(r.batchSize,0,1).map(function(s){var u=r.getInput(s);if(u instanceof Dt){var l=Xi(u)?u:u.expandDims();return l=Qg(l,e),(l.shape[1]!==t||l.shape[2]!==t)&&(l=Ys.resizeBilinear(l,[t,t])),l.as3D(t,t,3)}if(u instanceof sn.getEnv().Canvas)return mu.fromPixels(ry(u,t,e));throw new Error("toBatchTensor - at batchIdx "+s+", expected input to be instanceof tf.Tensor or instanceof HTMLCanvasElement, instead have "+u)}),a=Sn(i.map(function(s){return s.toFloat()})).as4D(r.batchSize,t,t,3);return a})},n}();function Gr(n){return wt(this,void 0,void 0,function(){var t,e,r;return At(this,function(i){switch(i.label){case 0:if(n instanceof rs)return[2,n];if(t=Array.isArray(n)?n:[n],!t.length)throw new Error("toNetInput - empty array passed as input");return e=function(a){return Array.isArray(n)?" at input index "+a+":":""},r=t.map(Ru),r.forEach(function(a,s){if(!Jf(a)&&!$o(a)&&!Xi(a))throw typeof t[s]=="string"?new Error("toNetInput -"+e(s)+" string passed, but could not resolve HTMLElement for element id "+t[s]):new Error("toNetInput -"+e(s)+" expected media to be of type HTMLImageElement | HTMLVideoElement | HTMLCanvasElement | tf.Tensor3D, or to be an element id");if(Xi(a)){var u=a.shape[0];if(u!==1)throw new Error("toNetInput -"+e(s)+" tf.Tensor4D with batchSize "+u+" passed, but not supported in input array")}}),[4,Promise.all(r.map(function(a){return Jf(a)&&ey(a)}))];case 1:return i.sent(),[2,new rs(r,Array.isArray(n))]}})})}function Du(n,t){return wt(this,void 0,void 0,function(){var e,r,i,a,s,u,l;return At(this,function(f){switch(f.label){case 0:return e=sn.getEnv().Canvas,r=n,n instanceof e?[3,5]:[4,Gr(n)];case 1:if(i=f.sent(),i.batchSize>1)throw new Error("extractFaces - batchSize > 1 not supported");return a=i.getInput(0),a instanceof e?(s=a,[3,4]):[3,2];case 2:return[4,ty(a)];case 3:s=f.sent(),f.label=4;case 4:r=s,f.label=5;case 5:return u=oi(r),l=t.map(function(A){return A instanceof Tn?A.forSize(r.width,r.height).box.floor():A}).map(function(A){return A.clipAtImageBorders(r.width,r.height)}),[2,l.map(function(A){var I=A.x,R=A.y,z=A.width,te=A.height,oe=ts({width:z,height:te});return oi(oe).putImageData(u.getImageData(I,R,z,te),0,0),oe})]}})})}function ju(n,t){return wt(this,void 0,void 0,function(){return At(this,function(e){if(!$o(n)&&!Xi(n))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(Xi(n)&&n.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,mt(function(){var r=n.shape.slice(Xi(n)?1:0),i=r[0],a=r[1],s=r[2],u=t.map(function(f){return f instanceof Tn?f.forSize(a,i).box:f}).map(function(f){return f.clipAtImageBorders(a,i)}),l=u.map(function(f){var A=f.x,I=f.y,R=f.width,z=f.height;return Hc(n.as3D(i,a,s),[I,A,0],[z,R,s])});return l})]})})}function ny(n,t){return wt(this,void 0,void 0,function(){var e,r;return At(this,function(i){switch(i.label){case 0:return e=sn.getEnv().fetch,[4,e(n,t)];case 1:if(r=i.sent(),!(r.status<400))throw new Error("failed to fetch: ("+r.status+") "+r.statusText+", from url: "+r.url);return[2,r]}})})}function Mb(n){return __awaiter(this,void 0,void 0,function(){var t,e;return __generator(this,function(r){switch(r.label){case 0:return[4,fetchOrThrow(n)];case 1:return t=r.sent(),[4,t.blob()];case 2:if(e=r.sent(),!e.type.startsWith("image/"))throw new Error("fetchImage - expected blob type to be of type image/*, instead have: "+e.type+", for url: "+t.url);return[2,bufferToImage(e)]}})})}function iy(n){return wt(this,void 0,void 0,function(){return At(this,function(t){switch(t.label){case 0:return[4,ny(n)];case 1:return[2,t.sent().json()]}})})}function Nb(n){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return t=Float32Array.bind,[4,fetchOrThrow(n)];case 1:return[4,e.sent().arrayBuffer()];case 2:return[2,new(t.apply(Float32Array,[void 0,e.sent()]))]}})})}function Yf(n,t){var e=t+"-weights_manifest.json";if(!n)return{modelBaseUri:"",manifestUri:e};if(n==="/")return{modelBaseUri:"/",manifestUri:"/"+e};var r=n.startsWith("http://")?"http://":n.startsWith("https://")?"https://":"";n=n.replace(r,"");var i=n.split("/").filter(function(u){return u}),a=n.endsWith(".json")?i[i.length-1]:e,s=r+(n.endsWith(".json")?i.slice(0,i.length-1):i).join("/");return s=n.startsWith("/")?"/"+s:s,{modelBaseUri:s,manifestUri:s==="/"?"/"+a:s+"/"+a}}function ay(n,t){return wt(this,void 0,void 0,function(){var e,r,i,a;return At(this,function(s){switch(s.label){case 0:return e=Yf(n,t),r=e.manifestUri,i=e.modelBaseUri,[4,iy(r)];case 1:return a=s.sent(),[2,Ef.loadWeights(a,i)]}})})}function Fb(n,t,e){e===void 0&&(e=!1);var r=e?getMediaDimensions(t):t,i=r.width,a=r.height;return n.width=i,n.height=a,{width:i,height:a}}var Ti=function(){function n(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(n.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),n.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t),r=e.obj,i=e.objProp;return r[i]},n.prototype.reassignParamFromPath=function(t,e){var r=this.traversePropertyPath(t),i=r.obj,a=r.objProp;i[a].dispose(),i[a]=e},n.prototype.getParamList=function(){var t=this;return this._paramMappings.map(function(e){var r=e.paramPath;return{path:r,tensor:t.getParamFromPath(r)}})},n.prototype.getTrainableParams=function(){return this.getParamList().filter(function(t){return t.tensor instanceof Ar})},n.prototype.getFrozenParams=function(){return this.getParamList().filter(function(t){return!(t.tensor instanceof Ar)})},n.prototype.variable=function(){var t=this;this.getFrozenParams().forEach(function(e){var r=e.path,i=e.tensor;t.reassignParamFromPath(r,i.variable())})},n.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach(function(e){var r=e.path,i=e.tensor,a=Cr(i.dataSync());i.dispose(),t.reassignParamFromPath(r,a)})},n.prototype.dispose=function(t){t===void 0&&(t=!0),this.getParamList().forEach(function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()}),this._params=void 0},n.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map(function(t){var e=t.tensor;return Array.from(e.dataSync())}).reduce(function(t,e){return t.concat(e)}))},n.prototype.load=function(t){return wt(this,void 0,void 0,function(){return At(this,function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}})})},n.prototype.loadFromUri=function(t){return wt(this,void 0,void 0,function(){var e;return At(this,function(r){switch(r.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromUri - expected model uri");return[4,ay(t,this.getDefaultModelName())];case 1:return e=r.sent(),this.loadFromWeightMap(e),[2]}})})},n.prototype.loadFromDisk=function(t){return wt(this,void 0,void 0,function(){var e,r,i,a,s,u,l,f,A,I;return At(this,function(R){switch(R.label){case 0:if(t&&typeof t!="string")throw new Error(this._name+".loadFromDisk - expected model file path");return e=sn.getEnv().readFile,r=Yf(t,this.getDefaultModelName()),i=r.manifestUri,a=r.modelBaseUri,s=function(z){return Promise.all(z.map(function(te){return e(te).then(function(oe){return oe.buffer})}))},u=Ef.weightsLoaderFactory(s),A=(f=JSON).parse,[4,e(i)];case 1:return l=A.apply(f,[R.sent().toString()]),[4,u(l,a)];case 2:return I=R.sent(),this.loadFromWeightMap(I),[2]}})})},n.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.extractWeights=function(t){var e=this.extractParams(t),r=e.paramMappings,i=e.params;this._paramMappings=r,this._params=i},n.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce(function(a,s){if(!a.nextObj.hasOwnProperty(s))throw new Error("traversePropertyPath - object does not have property "+s+", for path "+t);return{obj:a.nextObj,objProp:s,nextObj:a.nextObj[s]}},{nextObj:this.params}),r=e.obj,i=e.objProp;if(!r||!i||!(r[i]instanceof Dt))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:r,objProp:i}},n}();function Rn(n,t,e){return mt(function(){var r=Hs(n,t.depthwise_filter,t.pointwise_filter,e,"same");return r=Nt(r,t.bias),r})}function Pu(n,t,e){return e===void 0&&(e=!1),mt(function(){var r=gr(e?Nt(Mn(n,t.conv0.filters,[2,2],"same"),t.conv0.bias):Rn(n,t.conv0,[2,2])),i=Rn(r,t.conv1,[1,1]),a=gr(Nt(r,i)),s=Rn(a,t.conv2,[1,1]);return gr(Nt(r,Nt(i,s)))})}function ns(n,t,e,r){return e===void 0&&(e=!1),r===void 0&&(r=!0),mt(function(){var i=gr(e?Nt(Mn(n,t.conv0.filters,r?[2,2]:[1,1],"same"),t.conv0.bias):Rn(n,t.conv0,r?[2,2]:[1,1])),a=Rn(i,t.conv1,[1,1]),s=gr(Nt(i,a)),u=Rn(s,t.conv2,[1,1]),l=gr(Nt(i,Nt(a,u))),f=Rn(l,t.conv3,[1,1]);return gr(Nt(i,Nt(a,Nt(u,f))))})}function Xn(n,t,e,r){return e===void 0&&(e="same"),r===void 0&&(r=!1),mt(function(){var i=Nt(Mn(n,t.filters,[1,1],e),t.bias);return r?gr(i):i})}function Ri(n,t){Object.keys(n).forEach(function(e){t.some(function(r){return r.originalPath===e})||n[e].dispose()})}function is(n,t){return function(e,r,i,a){var s=bn(n(e*r*i*i),[i,i,e,r]),u=Tr(n(r));return t.push({paramPath:a+"/filters"},{paramPath:a+"/bias"}),{filters:s,bias:u}}}function Bu(n,t){return function(e,r,i){var a=Wi(n(e*r),[e,r]),s=Tr(n(r));return t.push({paramPath:i+"/weights"},{paramPath:i+"/bias"}),{weights:a,bias:s}}}var $f=function(){function n(t,e,r){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=r}return n}();function _u(n,t){return function(e,r,i){var a=bn(n(9*e),[3,3,e,1]),s=bn(n(e*r),[1,1,e,r]),u=Tr(n(r));return t.push({paramPath:i+"/depthwise_filter"},{paramPath:i+"/pointwise_filter"},{paramPath:i+"/bias"}),new $f(a,s,u)}}function Mu(n){return function(t){var e=n(t+"/depthwise_filter",4),r=n(t+"/pointwise_filter",4),i=n(t+"/bias",1);return new $f(e,r,i)}}function Zi(n,t){return function(e,r,i){var a=n[e];if(!uo(a,r))throw new Error("expected weightMap["+e+"] to be a Tensor"+r+"D, instead have "+a);return t.push({originalPath:e,paramPath:i||e}),a}}function ki(n){var t=n;function e(i){var a=t.slice(0,i);return t=t.slice(i),a}function r(){return t}return{extractWeights:e,getRemainingWeights:r}}function qf(n,t){var e=is(n,t),r=_u(n,t);function i(s,u,l,f){f===void 0&&(f=!1);var A=f?e(s,u,3,l+"/conv0"):r(s,u,l+"/conv0"),I=r(u,u,l+"/conv1"),R=r(u,u,l+"/conv2");return{conv0:A,conv1:I,conv2:R}}function a(s,u,l,f){f===void 0&&(f=!1);var A=i(s,u,l,f),I=A.conv0,R=A.conv1,z=A.conv2,te=r(u,u,l+"/conv3");return{conv0:I,conv1:R,conv2:z,conv3:te}}return{extractDenseBlock3Params:i,extractDenseBlock4Params:a}}function oy(n){var t=[],e=ki(n),r=e.extractWeights,i=e.getRemainingWeights,a=qf(r,t).extractDenseBlock4Params,s=a(3,32,"dense0",!0),u=a(32,64,"dense1"),l=a(64,128,"dense2"),f=a(128,256,"dense3");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l,dense3:f}}}function ed(n){return function(t){var e=n(t+"/filters",4),r=n(t+"/bias",1);return{filters:e,bias:r}}}function td(n,t){var e=Zi(n,t),r=ed(e),i=Mu(e);function a(u,l){l===void 0&&(l=!1);var f=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),I=i(u+"/conv2");return{conv0:f,conv1:A,conv2:I}}function s(u,l){l===void 0&&(l=!1);var f=l?r(u+"/conv0"):i(u+"/conv0"),A=i(u+"/conv1"),I=i(u+"/conv2"),R=i(u+"/conv3");return{conv0:f,conv1:A,conv2:I,conv3:R}}return{extractDenseBlock3Params:a,extractDenseBlock4Params:s}}function sy(n){var t=[],e=td(n,t).extractDenseBlock4Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2"),dense3:e("dense3")};return Ri(n,t),{params:r,paramMappings:t}}var rd=function(n){St(t,n);function t(){return n.call(this,"FaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceFeatureExtractor - load model before inference");return mt(function(){var i=e.toBatchTensor(112,!0),a=[122.782,117.001,104.298],s=fo(i,a).div(vt(255)),u=ns(s,r.dense0,!0);return u=ns(u,r.dense1),u=ns(u,r.dense2),u=ns(u,r.dense3),u=ao(u,[7,7],[2,2],"valid"),u})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},t.prototype.extractParamsFromWeigthMap=function(e){return sy(e)},t.prototype.extractParams=function(e){return oy(e)},t}(Ti);function si(n,t){return mt(function(){return Nt(Go(n,t.weights),t.bias)})}function uy(n,t,e){var r=[],i=ki(n),a=i.extractWeights,s=i.getRemainingWeights,u=Bu(a,r),l=u(t,e,"fc");if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{paramMappings:r,params:{fc:l}}}function ly(n){var t=[],e=Zi(n,t);function r(a){var s=e(a+"/weights",2),u=e(a+"/bias",1);return{weights:s,bias:u}}var i={fc:r("fc")};return Ri(n,t),{params:i,paramMappings:t}}function nd(n){var t={},e={};return Object.keys(n).forEach(function(r){var i=r.startsWith("fc")?e:t;i[r]=n[r]}),{featureExtractorMap:t,classifierMap:e}}var id=function(n){St(t,n);function t(e,r){var i=n.call(this,e)||this;return i._faceFeatureExtractor=r,i}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return mt(function(){var a=e instanceof rs?r.faceFeatureExtractor.forwardInput(e):e;return si(a.as2D(a.shape[0],-1),i.fc)})},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,a=r.paramMappings;this._params=i,this._paramMappings=a},t.prototype.extractClassifierParams=function(e){return uy(e,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},t.prototype.extractParamsFromWeigthMap=function(e){var r=nd(e),i=r.featureExtractorMap,a=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),ly(a)},t.prototype.extractParams=function(e){var r=this.getClassifierChannelsIn(),i=this.getClassifierChannelsOut(),a=i*r+i,s=e.slice(0,e.length-a),u=e.slice(e.length-a);return this.faceFeatureExtractor.extractWeights(s),this.extractClassifierParams(u)},t}(Ti),ad=["neutral","happy","sad","angry","fearful","disgusted","surprised"],Nu=function(){function n(t){var e=this;if(t.length!==7)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);ad.forEach(function(r,i){e[r]=t[i]})}return n.prototype.asSortedArray=function(){var t=this;return ad.map(function(e){return{expression:e,probability:t[e]}}).sort(function(e,r){return r.probability-e.probability})},n}(),cy=function(n){St(t,n);function t(e){return e===void 0&&(e=new rd),n.call(this,"FaceExpressionNet",e)||this}return t.prototype.forwardInput=function(e){var r=this;return mt(function(){return xi(r.runNet(e))})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictExpressions=function(e){return wt(this,void 0,void 0,function(){var r,i,a,s,u=this;return At(this,function(l){switch(l.label){case 0:return[4,Gr(e)];case 1:return r=l.sent(),[4,this.forwardInput(r)];case 2:return i=l.sent(),[4,Promise.all(Nr(i).map(function(f){return wt(u,void 0,void 0,function(){var A;return At(this,function(I){switch(I.label){case 0:return[4,f.data()];case 1:return A=I.sent(),f.dispose(),[2,A]}})})}))];case 3:return a=l.sent(),i.dispose(),s=a.map(function(f){return new Nu(f)}),[2,r.isBatchInput?s:s[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_expression_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t.prototype.getClassifierChannelsOut=function(){return 7},t}(id);function fy(n){return n.expressions instanceof Nu}function od(n,t){var e={expressions:t};return Object.assign({},n,e)}function Lb(n,t,e,r){e===void 0&&(e=.1);var i=Array.isArray(t)?t:[t];i.forEach(function(a){var s=a instanceof Nu?a:fy(a)?a.expressions:void 0;if(!s)throw new Error("drawFaceExpressions - expected faceExpressions to be FaceExpressions | WithFaceExpressions<{}> or array thereof");var u=s.asSortedArray(),l=u.filter(function(I){return I.probability>e}),f=ho(a)?a.detection.box.bottomLeft:r||new Kt(0,0),A=new Kf(l.map(function(I){return I.expression+" ("+xu(I.probability)+")"}),f);A.draw(n)})}function Fu(n){return ho(n)&&n.landmarks instanceof La&&n.unshiftedLandmarks instanceof La&&n.alignedRect instanceof Tn}function as(n,t){var e=n.detection.box,r=t.shiftBy(e.x,e.y),i=r.align(),a=n.detection.imageDims,s=new Tn(n.detection.score,i.rescale(a.reverse()),a),u={landmarks:r,unshiftedLandmarks:t,alignedRect:s};return Object.assign({},n,u)}var dy=function(){function n(t){t===void 0&&(t={});var e=t.drawLines,r=e===void 0?!0:e,i=t.drawPoints,a=i===void 0?!0:i,s=t.lineWidth,u=t.lineColor,l=t.pointSize,f=t.pointColor;this.drawLines=r,this.drawPoints=a,this.lineWidth=s||1,this.pointSize=l||2,this.lineColor=u||"rgba(0, 255, 255, 1)",this.pointColor=f||"rgba(255, 0, 255, 1)"}return n}(),hy=function(){function n(t,e){e===void 0&&(e={}),this.faceLandmarks=t,this.options=new dy(e)}return n.prototype.draw=function(t){var e=oi(t),r=this.options,i=r.drawLines,a=r.drawPoints,s=r.lineWidth,u=r.lineColor,l=r.pointSize,f=r.pointColor;if(i&&this.faceLandmarks instanceof Ff&&(e.strokeStyle=u,e.lineWidth=s,va(e,this.faceLandmarks.getJawOutline()),va(e,this.faceLandmarks.getLeftEyeBrow()),va(e,this.faceLandmarks.getRightEyeBrow()),va(e,this.faceLandmarks.getNose()),va(e,this.faceLandmarks.getLeftEye(),!0),va(e,this.faceLandmarks.getRightEye(),!0),va(e,this.faceLandmarks.getMouth(),!0)),a){e.strokeStyle=f,e.fillStyle=f;var A=function(I){e.beginPath(),e.arc(I.x,I.y,l,0,2*Math.PI),e.fill()};this.faceLandmarks.positions.forEach(A)}},n}();function Ub(n,t){var e=Array.isArray(t)?t:[t];e.forEach(function(r){var i=r instanceof La?r:Fu(r)?r.landmarks:void 0;if(!i)throw new Error("drawFaceLandmarks - expected faceExpressions to be FaceLandmarks | WithFaceLandmarks<WithFaceDetection<{}>> or array thereof");new hy(i).draw(n)})}function py(n,t){var e=is(n,t),r=_u(n,t);function i(s,u,l){var f=r(s,u,l+"/separable_conv0"),A=r(u,u,l+"/separable_conv1"),I=e(s,u,1,l+"/expansion_conv");return{separable_conv0:f,separable_conv1:A,expansion_conv:I}}function a(s,u){var l=r(s,s,u+"/separable_conv0"),f=r(s,s,u+"/separable_conv1"),A=r(s,s,u+"/separable_conv2");return{separable_conv0:l,separable_conv1:f,separable_conv2:A}}return{extractConvParams:e,extractSeparableConvParams:r,extractReductionBlockParams:i,extractMainBlockParams:a}}function vy(n,t){var e=[],r=ki(n),i=r.extractWeights,a=r.getRemainingWeights,s=py(i,e),u=s.extractConvParams,l=s.extractSeparableConvParams,f=s.extractReductionBlockParams,A=s.extractMainBlockParams,I=u(3,32,3,"entry_flow/conv_in"),R=f(32,64,"entry_flow/reduction_block_0"),z=f(64,128,"entry_flow/reduction_block_1"),te={conv_in:I,reduction_block_0:R,reduction_block_1:z},oe={};lo(t,0,1).forEach(function(xe){oe["main_block_"+xe]=A(128,"middle_flow/main_block_"+xe)});var ae=f(128,256,"exit_flow/reduction_block"),se=l(256,512,"exit_flow/separable_conv"),we={reduction_block:ae,separable_conv:se};if(a().length!==0)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:e,params:{entry_flow:te,middle_flow:oe,exit_flow:we}}}function my(n,t){var e=Zi(n,t),r=ed(e),i=Mu(e);function a(u){var l=i(u+"/separable_conv0"),f=i(u+"/separable_conv1"),A=r(u+"/expansion_conv");return{separable_conv0:l,separable_conv1:f,expansion_conv:A}}function s(u){var l=i(u+"/separable_conv0"),f=i(u+"/separable_conv1"),A=i(u+"/separable_conv2");return{separable_conv0:l,separable_conv1:f,separable_conv2:A}}return{extractConvParams:r,extractSeparableConvParams:i,extractReductionBlockParams:a,extractMainBlockParams:s}}function gy(n,t){var e=[],r=my(n,e),i=r.extractConvParams,a=r.extractSeparableConvParams,s=r.extractReductionBlockParams,u=r.extractMainBlockParams,l=i("entry_flow/conv_in"),f=s("entry_flow/reduction_block_0"),A=s("entry_flow/reduction_block_1"),I={conv_in:l,reduction_block_0:f,reduction_block_1:A},R={};lo(t,0,1).forEach(function(ae){R["main_block_"+ae]=u("middle_flow/main_block_"+ae)});var z=s("exit_flow/reduction_block"),te=a("exit_flow/separable_conv"),oe={reduction_block:z,separable_conv:te};return Ri(n,e),{params:{entry_flow:I,middle_flow:R,exit_flow:oe},paramMappings:e}}function sd(n,t,e){return Nt(Mn(n,t.filters,e,"same"),t.bias)}function Lu(n,t,e){e===void 0&&(e=!0);var r=e?gr(n):n;return r=Rn(r,t.separable_conv0,[1,1]),r=Rn(gr(r),t.separable_conv1,[1,1]),r=Qr(r,[3,3],[2,2],"same"),r=Nt(r,sd(n,t.expansion_conv,[2,2])),r}function yy(n,t){var e=Rn(gr(n),t.separable_conv0,[1,1]);return e=Rn(gr(e),t.separable_conv1,[1,1]),e=Rn(gr(e),t.separable_conv2,[1,1]),e=Nt(e,n),e}var by=function(n){St(t,n);function t(e){var r=n.call(this,"TinyXception")||this;return r._numMainBlocks=e,r}return t.prototype.forwardInput=function(e){var r=this,i=this.params;if(!i)throw new Error("TinyXception - load model before inference");return mt(function(){var a=e.toBatchTensor(112,!0),s=[122.782,117.001,104.298],u=fo(a,s).div(vt(256)),l=gr(sd(u,i.entry_flow.conv_in,[2,2]));return l=Lu(l,i.entry_flow.reduction_block_0,!1),l=Lu(l,i.entry_flow.reduction_block_1),lo(r._numMainBlocks,0,1).forEach(function(f){l=yy(l,i.middle_flow["main_block_"+f])}),l=Lu(l,i.exit_flow.reduction_block),l=gr(Rn(l,i.exit_flow.separable_conv,[1,1])),l})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"tiny_xception_model"},t.prototype.extractParamsFromWeigthMap=function(e){return gy(e,this._numMainBlocks)},t.prototype.extractParams=function(e){return vy(e,this._numMainBlocks)},t}(Ti);function wy(n){var t=[],e=ki(n),r=e.extractWeights,i=e.getRemainingWeights,a=Bu(r,t),s=a(512,1,"fc/age"),u=a(512,2,"fc/gender");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{fc:{age:s,gender:u}}}}function Ay(n){var t=[],e=Zi(n,t);function r(a){var s=e(a+"/weights",2),u=e(a+"/bias",1);return{weights:s,bias:u}}var i={fc:{age:r("fc/age"),gender:r("fc/gender")}};return Ri(n,t),{params:i,paramMappings:t}}var os;(function(n){n.FEMALE="female",n.MALE="male"})(os||(os={}));var xy=function(n){St(t,n);function t(e){e===void 0&&(e=new by(2));var r=n.call(this,"AgeGenderNet")||this;return r._faceFeatureExtractor=e,r}return Object.defineProperty(t.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),t.prototype.runNet=function(e){var r=this,i=this.params;if(!i)throw new Error(this._name+" - load model before inference");return mt(function(){var a=e instanceof rs?r.faceFeatureExtractor.forwardInput(e):e,s=ao(a,[7,7],[2,2],"valid").as2D(a.shape[0],-1),u=si(s,i.fc.age).as1D(),l=si(s,i.fc.gender);return{age:u,gender:l}})},t.prototype.forwardInput=function(e){var r=this;return mt(function(){var i=r.runNet(e),a=i.age,s=i.gender;return{age:a,gender:xi(s)}})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.predictAgeAndGender=function(e){return wt(this,void 0,void 0,function(){var r,i,a,s,u,l,f=this;return At(this,function(A){switch(A.label){case 0:return[4,Gr(e)];case 1:return r=A.sent(),[4,this.forwardInput(r)];case 2:return i=A.sent(),a=Nr(i.age),s=Nr(i.gender),u=a.map(function(I,R){return{ageTensor:I,genderTensor:s[R]}}),[4,Promise.all(u.map(function(I){var R=I.ageTensor,z=I.genderTensor;return wt(f,void 0,void 0,function(){var te,oe,ae,se,we;return At(this,function(xe){switch(xe.label){case 0:return[4,R.data()];case 1:return te=xe.sent()[0],[4,z.data()];case 2:return oe=xe.sent()[0],ae=oe>.5,se=ae?os.MALE:os.FEMALE,we=ae?oe:1-oe,R.dispose(),z.dispose(),[2,{age:te,gender:se,genderProbability:we}]}})})}))];case 3:return l=A.sent(),i.age.dispose(),i.gender.dispose(),[2,r.isBatchInput?l:l[0]]}})})},t.prototype.getDefaultModelName=function(){return"age_gender_model"},t.prototype.dispose=function(e){e===void 0&&(e=!0),this.faceFeatureExtractor.dispose(e),n.prototype.dispose.call(this,e)},t.prototype.loadClassifierParams=function(e){var r=this.extractClassifierParams(e),i=r.params,a=r.paramMappings;this._params=i,this._paramMappings=a},t.prototype.extractClassifierParams=function(e){return wy(e)},t.prototype.extractParamsFromWeigthMap=function(e){var r=nd(e),i=r.featureExtractorMap,a=r.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(i),Ay(a)},t.prototype.extractParams=function(e){var r=1539,i=e.slice(0,e.length-r),a=e.slice(e.length-r);return this.faceFeatureExtractor.extractWeights(i),this.extractClassifierParams(a)},t}(Ti),ud=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postProcess=function(e,r,i){var a=i.map(function(u){var l=u.width,f=u.height,A=r/Math.max(f,l);return{width:l*A,height:f*A}}),s=a.length;return mt(function(){var u=function(R,z){return Sn([ni([68],R),ni([68],z)],1).as2D(1,136).as1D()},l=function(R,z){var te=a[R],oe=te.width,ae=te.height;return z(oe,ae)?Math.abs(oe-ae)/2:0},f=function(R){return l(R,function(z,te){return z<te})},A=function(R){return l(R,function(z,te){return te<z})},I=e.mul(ni([s,136],r)).sub(Sn(Array.from(Array(s),function(R,z){return u(f(z),A(z))}))).div(Sn(Array.from(Array(s),function(R,z){return u(a[z].width,a[z].height)})));return I})},t.prototype.forwardInput=function(e){var r=this;return mt(function(){var i=r.runNet(e);return r.postProcess(i,e.inputSize,e.inputDimensions.map(function(a){var s=a[0],u=a[1];return{height:s,width:u}}))})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.detectLandmarks=function(e){return wt(this,void 0,void 0,function(){var r,i,a,s=this;return At(this,function(u){switch(u.label){case 0:return[4,Gr(e)];case 1:return r=u.sent(),i=mt(function(){return Nr(s.forwardInput(r))}),[4,Promise.all(i.map(function(l,f){return wt(s,void 0,void 0,function(){var A,I,R,z,te;return At(this,function(oe){switch(oe.label){case 0:return R=(I=Array).from,[4,l.data()];case 1:return A=R.apply(I,[oe.sent()]),z=A.filter(function(ae,se){return Bf(se)}),te=A.filter(function(ae,se){return!Bf(se)}),[2,new Ff(Array(68).fill(0).map(function(ae,se){return new Kt(z[se],te[se])}),{height:r.getInputHeight(f),width:r.getInputWidth(f)})]}})})}))];case 2:return a=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?a:a[0]]}})})},t.prototype.getClassifierChannelsOut=function(){return 136},t}(id),ld=function(n){St(t,n);function t(e){return e===void 0&&(e=new rd),n.call(this,"FaceLandmark68Net",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_model"},t.prototype.getClassifierChannelsIn=function(){return 256},t}(ud);function Ey(n){var t=[],e=td(n,t).extractDenseBlock3Params,r={dense0:e("dense0",!0),dense1:e("dense1"),dense2:e("dense2")};return Ri(n,t),{params:r,paramMappings:t}}function Cy(n){var t=[],e=ki(n),r=e.extractWeights,i=e.getRemainingWeights,a=qf(r,t).extractDenseBlock3Params,s=a(3,32,"dense0",!0),u=a(32,64,"dense1"),l=a(64,128,"dense2");if(i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:t,params:{dense0:s,dense1:u,dense2:l}}}var Sy=function(n){St(t,n);function t(){return n.call(this,"TinyFaceFeatureExtractor")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("TinyFaceFeatureExtractor - load model before inference");return mt(function(){var i=e.toBatchTensor(112,!0),a=[122.782,117.001,104.298],s=fo(i,a).div(vt(255)),u=Pu(s,r.dense0,!0);return u=Pu(u,r.dense1),u=Pu(u,r.dense2),u=ao(u,[14,14],[2,2],"valid"),u})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.getDefaultModelName=function(){return"face_feature_extractor_tiny_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Ey(e)},t.prototype.extractParams=function(e){return Cy(e)},t}(Ti),Iy=function(n){St(t,n);function t(e){return e===void 0&&(e=new Sy),n.call(this,"FaceLandmark68TinyNet",e)||this}return t.prototype.getDefaultModelName=function(){return"face_landmark_68_tiny_model"},t.prototype.getClassifierChannelsIn=function(){return 128},t}(ud),Wb=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(ld);function Ty(n,t){return Nt(nn(n,t.weights),t.biases)}function Uu(n,t,e,r,i){i===void 0&&(i="same");var a=t.conv,s=a.filters,u=a.bias,l=Mn(n,s,e,i);return l=Nt(l,u),l=Ty(l,t.scale),r?gr(l):l}function Ry(n,t){return Uu(n,t,[1,1],!0)}function cd(n,t){return Uu(n,t,[1,1],!1)}function fd(n,t){return Uu(n,t,[2,2],!0,"valid")}function ky(n,t){function e(u,l,f){var A=n(u),I=A.length/(l*f*f);if(Ug(I))throw new Error("depth has to be an integer: "+I+", weights.length: "+A.length+", numFilters: "+l+", filterSize: "+f);return mt(function(){return Vi(bn(A,[l,I,f,f]),[2,3,1,0])})}function r(u,l,f,A){var I=e(u,l,f),R=Tr(n(l));return t.push({paramPath:A+"/filters"},{paramPath:A+"/bias"}),{filters:I,bias:R}}function i(u,l){var f=Tr(n(u)),A=Tr(n(u));return t.push({paramPath:l+"/weights"},{paramPath:l+"/biases"}),{weights:f,biases:A}}function a(u,l,f,A){var I=r(u,l,f,A+"/conv"),R=i(l,A+"/scale");return{conv:I,scale:R}}function s(u,l,f,A,I){I===void 0&&(I=!1);var R=a((I?.5:1)*u,l,f,A+"/conv1"),z=a(u,l,f,A+"/conv2");return{conv1:R,conv2:z}}return{extractConvLayerParams:a,extractResidualLayerParams:s}}function Oy(n){var t=ki(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],a=ky(e,i),s=a.extractConvLayerParams,u=a.extractResidualLayerParams,l=s(4704,32,7,"conv32_down"),f=u(9216,32,3,"conv32_1"),A=u(9216,32,3,"conv32_2"),I=u(9216,32,3,"conv32_3"),R=u(36864,64,3,"conv64_down",!0),z=u(36864,64,3,"conv64_1"),te=u(36864,64,3,"conv64_2"),oe=u(36864,64,3,"conv64_3"),ae=u(147456,128,3,"conv128_down",!0),se=u(147456,128,3,"conv128_1"),we=u(147456,128,3,"conv128_2"),xe=u(589824,256,3,"conv256_down",!0),me=u(589824,256,3,"conv256_1"),Se=u(589824,256,3,"conv256_2"),Re=u(589824,256,3,"conv256_down_out"),Me=mt(function(){return Vi(Wi(e(256*128),[128,256]),[1,0])});if(i.push({paramPath:"fc"}),r().length!==0)throw new Error("weights remaing after extract: "+r().length);var Fe={conv32_down:l,conv32_1:f,conv32_2:A,conv32_3:I,conv64_down:R,conv64_1:z,conv64_2:te,conv64_3:oe,conv128_down:ae,conv128_1:se,conv128_2:we,conv256_down:xe,conv256_1:me,conv256_2:Se,conv256_down_out:Re,fc:Me};return{params:Fe,paramMappings:i}}function Dy(n,t){var e=Zi(n,t);function r(s){var u=e(s+"/scale/weights",1),l=e(s+"/scale/biases",1);return{weights:u,biases:l}}function i(s){var u=e(s+"/conv/filters",4),l=e(s+"/conv/bias",1),f=r(s);return{conv:{filters:u,bias:l},scale:f}}function a(s){return{conv1:i(s+"/conv1"),conv2:i(s+"/conv2")}}return{extractConvLayerParams:i,extractResidualLayerParams:a}}function jy(n){var t=[],e=Dy(n,t),r=e.extractConvLayerParams,i=e.extractResidualLayerParams,a=r("conv32_down"),s=i("conv32_1"),u=i("conv32_2"),l=i("conv32_3"),f=i("conv64_down"),A=i("conv64_1"),I=i("conv64_2"),R=i("conv64_3"),z=i("conv128_down"),te=i("conv128_1"),oe=i("conv128_2"),ae=i("conv256_down"),se=i("conv256_1"),we=i("conv256_2"),xe=i("conv256_down_out"),me=n.fc;if(t.push({originalPath:"fc",paramPath:"fc"}),!Lg(me))throw new Error("expected weightMap[fc] to be a Tensor2D, instead have "+me);var Se={conv32_down:a,conv32_1:s,conv32_2:u,conv32_3:l,conv64_down:f,conv64_1:A,conv64_2:I,conv64_3:R,conv128_down:z,conv128_1:te,conv128_2:oe,conv256_down:ae,conv256_1:se,conv256_2:we,conv256_down_out:xe,fc:me};return Ri(n,t),{params:Se,paramMappings:t}}function ui(n,t){var e=Ry(n,t.conv1);return e=cd(e,t.conv2),e=Nt(e,n),e=gr(e),e}function ss(n,t){var e=fd(n,t.conv1);e=cd(e,t.conv2);var r=ao(n,2,2,"valid"),i=fr(r.shape),a=r.shape[3]!==e.shape[3],s=r.shape[1]!==e.shape[1]||r.shape[2]!==e.shape[2];if(s){var u=so(e.shape);u[1]=1;var l=fr(u);e=Mr([e,l],1);var f=so(e.shape);f[2]=1;var A=fr(f);e=Mr([e,A],2)}return r=a?Mr([r,i],3):r,e=Nt(r,e),e=gr(e),e}var Py=function(n){St(t,n);function t(){return n.call(this,"FaceRecognitionNet")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("FaceRecognitionNet - load model before inference");return mt(function(){var i=e.toBatchTensor(150,!0).toFloat(),a=[122.782,117.001,104.298],s=fo(i,a).div(vt(256)),u=fd(s,r.conv32_down);u=Qr(u,3,2,"valid"),u=ui(u,r.conv32_1),u=ui(u,r.conv32_2),u=ui(u,r.conv32_3),u=ss(u,r.conv64_down),u=ui(u,r.conv64_1),u=ui(u,r.conv64_2),u=ui(u,r.conv64_3),u=ss(u,r.conv128_down),u=ui(u,r.conv128_1),u=ui(u,r.conv128_2),u=ss(u,r.conv256_down),u=ui(u,r.conv256_1),u=ui(u,r.conv256_2),u=ss(u,r.conv256_down_out);var l=u.mean([1,2]),f=Go(l,r.fc);return f})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.computeFaceDescriptor=function(e){return wt(this,void 0,void 0,function(){var r,i,a,s=this;return At(this,function(u){switch(u.label){case 0:return[4,Gr(e)];case 1:return r=u.sent(),i=mt(function(){return Nr(s.forwardInput(r))}),[4,Promise.all(i.map(function(l){return l.data()}))];case 2:return a=u.sent(),i.forEach(function(l){return l.dispose()}),[2,r.isBatchInput?a:a[0]]}})})},t.prototype.getDefaultModelName=function(){return"face_recognition_model"},t.prototype.extractParamsFromWeigthMap=function(e){return jy(e)},t.prototype.extractParams=function(e){return Oy(e)},t}(Ti);function zb(n){var t=new FaceRecognitionNet;return t.extractWeights(n),t}function Vb(n){return(n.gender===Gender.MALE||n.gender===Gender.FEMALE)&&isValidProbablitiy(n.genderProbability)}function dd(n,t,e){var r={gender:t,genderProbability:e};return Object.assign({},n,r)}var hd=function(){function n(t){var e=t===void 0?{}:t,r=e.minFaceSize,i=e.scaleFactor,a=e.maxNumScales,s=e.scoreThresholds,u=e.scaleSteps;if(this._name="MtcnnOptions",this._minFaceSize=r||20,this._scaleFactor=i||.709,this._maxNumScales=a||10,this._scoreThresholds=s||[.6,.7,.7],this._scaleSteps=u,typeof this._minFaceSize!="number"||this._minFaceSize<0)throw new Error(this._name+" - expected minFaceSize to be a number > 0");if(typeof this._scaleFactor!="number"||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if(typeof this._maxNumScales!="number"||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||this._scoreThresholds.length!==3||this._scoreThresholds.some(function(l){return typeof l!="number"}))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some(function(l){return typeof l!="number"})))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(n.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),n}();function By(n,t){function e(l,f){var A=bn(n(9*l),[3,3,l,1]),I=Tr(n(l)),R=Tr(n(l)),z=Tr(n(l)),te=Tr(n(l));return t.push({paramPath:f+"/filters"},{paramPath:f+"/batch_norm_scale"},{paramPath:f+"/batch_norm_offset"},{paramPath:f+"/batch_norm_mean"},{paramPath:f+"/batch_norm_variance"}),{filters:A,batch_norm_scale:I,batch_norm_offset:R,batch_norm_mean:z,batch_norm_variance:te}}function r(l,f,A,I,R){var z=bn(n(l*f*A*A),[A,A,l,f]),te=Tr(n(f));return t.push({paramPath:I+"/filters"},{paramPath:I+"/"+(R?"batch_norm_offset":"bias")}),{filters:z,bias:te}}function i(l,f,A,I){var R=r(l,f,A,I,!0),z=R.filters,te=R.bias;return{filters:z,batch_norm_offset:te}}function a(l,f,A){var I=e(l,A+"/depthwise_conv"),R=i(l,f,1,A+"/pointwise_conv");return{depthwise_conv:I,pointwise_conv:R}}function s(){var l=i(3,32,3,"mobilenetv1/conv_0"),f=a(32,64,"mobilenetv1/conv_1"),A=a(64,128,"mobilenetv1/conv_2"),I=a(128,128,"mobilenetv1/conv_3"),R=a(128,256,"mobilenetv1/conv_4"),z=a(256,256,"mobilenetv1/conv_5"),te=a(256,512,"mobilenetv1/conv_6"),oe=a(512,512,"mobilenetv1/conv_7"),ae=a(512,512,"mobilenetv1/conv_8"),se=a(512,512,"mobilenetv1/conv_9"),we=a(512,512,"mobilenetv1/conv_10"),xe=a(512,512,"mobilenetv1/conv_11"),me=a(512,1024,"mobilenetv1/conv_12"),Se=a(1024,1024,"mobilenetv1/conv_13");return{conv_0:l,conv_1:f,conv_2:A,conv_3:I,conv_4:R,conv_5:z,conv_6:te,conv_7:oe,conv_8:ae,conv_9:se,conv_10:we,conv_11:xe,conv_12:me,conv_13:Se}}function u(){var l=i(1024,256,1,"prediction_layer/conv_0"),f=i(256,512,3,"prediction_layer/conv_1"),A=i(512,128,1,"prediction_layer/conv_2"),I=i(128,256,3,"prediction_layer/conv_3"),R=i(256,128,1,"prediction_layer/conv_4"),z=i(128,256,3,"prediction_layer/conv_5"),te=i(256,64,1,"prediction_layer/conv_6"),oe=i(64,128,3,"prediction_layer/conv_7"),ae=r(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),se=r(512,9,1,"prediction_layer/box_predictor_0/class_predictor"),we=r(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),xe=r(1024,18,1,"prediction_layer/box_predictor_1/class_predictor"),me=r(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),Se=r(512,18,1,"prediction_layer/box_predictor_2/class_predictor"),Re=r(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),Me=r(256,18,1,"prediction_layer/box_predictor_3/class_predictor"),Fe=r(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),je=r(256,18,1,"prediction_layer/box_predictor_4/class_predictor"),Be=r(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),Ge=r(128,18,1,"prediction_layer/box_predictor_5/class_predictor"),Qe={box_encoding_predictor:ae,class_predictor:se},Ze={box_encoding_predictor:we,class_predictor:xe},Ye={box_encoding_predictor:me,class_predictor:Se},tt={box_encoding_predictor:Re,class_predictor:Me},st={box_encoding_predictor:Fe,class_predictor:je},at={box_encoding_predictor:Be,class_predictor:Ge};return{conv_0:l,conv_1:f,conv_2:A,conv_3:I,conv_4:R,conv_5:z,conv_6:te,conv_7:oe,box_predictor_0:Qe,box_predictor_1:Ze,box_predictor_2:Ye,box_predictor_3:tt,box_predictor_4:st,box_predictor_5:at}}return{extractMobilenetV1Params:s,extractPredictionLayerParams:u}}function _y(n){var t=[],e=ki(n),r=e.extractWeights,i=e.getRemainingWeights,a=By(r,t),s=a.extractMobilenetV1Params,u=a.extractPredictionLayerParams,l=s(),f=u(),A=ps(r(5118*4),[1,5118,4]),I={extra_dim:A};if(t.push({paramPath:"output_layer/extra_dim"}),i().length!==0)throw new Error("weights remaing after extract: "+i().length);return{params:{mobilenetv1:l,prediction_layer:f,output_layer:I},paramMappings:t}}function My(n,t){var e=Zi(n,t);function r(f,A,I){var R=e(f+"/Conv2d_"+A+"_pointwise/weights",4,I+"/filters"),z=e(f+"/Conv2d_"+A+"_pointwise/convolution_bn_offset",1,I+"/batch_norm_offset");return{filters:R,batch_norm_offset:z}}function i(f){var A="mobilenetv1/conv_"+f,I="MobilenetV1/Conv2d_"+f+"_depthwise",R=A+"/depthwise_conv",z=A+"/pointwise_conv",te=e(I+"/depthwise_weights",4,R+"/filters"),oe=e(I+"/BatchNorm/gamma",1,R+"/batch_norm_scale"),ae=e(I+"/BatchNorm/beta",1,R+"/batch_norm_offset"),se=e(I+"/BatchNorm/moving_mean",1,R+"/batch_norm_mean"),we=e(I+"/BatchNorm/moving_variance",1,R+"/batch_norm_variance");return{depthwise_conv:{filters:te,batch_norm_scale:oe,batch_norm_offset:ae,batch_norm_mean:se,batch_norm_variance:we},pointwise_conv:r("MobilenetV1",f,z)}}function a(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:i(1),conv_2:i(2),conv_3:i(3),conv_4:i(4),conv_5:i(5),conv_6:i(6),conv_7:i(7),conv_8:i(8),conv_9:i(9),conv_10:i(10),conv_11:i(11),conv_12:i(12),conv_13:i(13)}}function s(f,A){var I=e(f+"/weights",4,A+"/filters"),R=e(f+"/biases",1,A+"/bias");return{filters:I,bias:R}}function u(f){var A=s("Prediction/BoxPredictor_"+f+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+f+"/box_encoding_predictor"),I=s("Prediction/BoxPredictor_"+f+"/ClassPredictor","prediction_layer/box_predictor_"+f+"/class_predictor");return{box_encoding_predictor:A,class_predictor:I}}function l(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:u(0),box_predictor_1:u(1),box_predictor_2:u(2),box_predictor_3:u(3),box_predictor_4:u(4),box_predictor_5:u(5)}}return{extractMobilenetV1Params:a,extractPredictionLayerParams:l}}function Ny(n){var t=[],e=My(n,t),r=e.extractMobilenetV1Params,i=e.extractPredictionLayerParams,a=n["Output/extra_dim"];if(t.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!$o(a))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+a);var s={mobilenetv1:r(),prediction_layer:i(),output_layer:{extra_dim:a}};return Ri(n,t),{params:s,paramMappings:t}}function li(n,t,e){return mt(function(){var r=Mn(n,t.filters,e,"same");return r=Nt(r,t.batch_norm_offset),Us(r,0,6)})}var Fy=.0010000000474974513;function Ly(n,t,e){return mt(function(){var r=Qo(n,t.filters,e,"same");return r=kc(r,t.batch_norm_mean,t.batch_norm_variance,t.batch_norm_offset,t.batch_norm_scale,Fy),Us(r,0,6)})}function Uy(n){return[2,4,6,12].some(function(t){return t===n})?[2,2]:[1,1]}function Wy(n,t){return mt(function(){var e=null,r=li(n,t.conv_0,[2,2]),i=[t.conv_1,t.conv_2,t.conv_3,t.conv_4,t.conv_5,t.conv_6,t.conv_7,t.conv_8,t.conv_9,t.conv_10,t.conv_11,t.conv_12,t.conv_13];if(i.forEach(function(a,s){var u=s+1,l=Uy(u);r=Ly(r,a.depthwise_conv,l),r=li(r,a.pointwise_conv,[1,1]),u===11&&(e=r)}),e===null)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:e}})}function zy(n,t,e,r,i){var a=n.shape[0],s=Math.min(e,a),u=t.map(function(A,I){return{score:A,boxIndex:I}}).filter(function(A){return A.score>i}).sort(function(A,I){return I.score-A.score}),l=function(A){return A<=r?1:0},f=[];return u.forEach(function(A){if(!(f.length>=s)){for(var I=A.score,R=f.length-1;R>=0;--R){var z=Vy(n,A.boxIndex,f[R]);if(z!==0&&(A.score*=l(z),A.score<=i))break}I===A.score&&f.push(A.boxIndex)}}),f}function Vy(n,t,e){var r=n.arraySync(),i=Math.min(r[t][0],r[t][2]),a=Math.min(r[t][1],r[t][3]),s=Math.max(r[t][0],r[t][2]),u=Math.max(r[t][1],r[t][3]),l=Math.min(r[e][0],r[e][2]),f=Math.min(r[e][1],r[e][3]),A=Math.max(r[e][0],r[e][2]),I=Math.max(r[e][1],r[e][3]),R=(s-i)*(u-a),z=(A-l)*(I-f);if(R<=0||z<=0)return 0;var te=Math.max(i,l),oe=Math.max(a,f),ae=Math.min(s,A),se=Math.min(u,I),we=Math.max(ae-te,0)*Math.max(se-oe,0);return we/(R+z-we)}function Qy(n){var t=Nr(Vi(n,[1,0])),e=[Fr(t[2],t[0]),Fr(t[3],t[1])],r=[Nt(t[0],Hn(e[0],vt(2))),Nt(t[1],Hn(e[1],vt(2)))];return{sizes:e,centers:r}}function Gy(n,t){var e=Qy(n),r=e.sizes,i=e.centers,a=Nr(Vi(t,[1,0])),s=Hn(nn(Ws(Hn(a[2],vt(5))),r[0]),vt(2)),u=Nt(nn(Hn(a[0],vt(10)),r[0]),i[0]),l=Hn(nn(Ws(Hn(a[3],vt(5))),r[1]),vt(2)),f=Nt(nn(Hn(a[1],vt(10)),r[1]),i[1]);return Vi(Sn([Fr(u,s),Fr(f,l),Nt(u,s),Nt(f,l)]),[1,0])}function Hy(n,t,e){return mt(function(){var r=n.shape[0],i=Gy(Qn(Ia(e.extra_dim,[r,1,1]),[-1,4]),Qn(n,[-1,4]));i=Qn(i,[r,i.shape[0]/r,4]);var a=Sc(ii(t,[0,0,1],[-1,-1,-1])),s=ii(a,[0,0,0],[-1,-1,1]);s=Qn(s,[r,s.shape[1]]);var u=Nr(i),l=Nr(s);return{boxes:u,scores:l}})}function Ua(n,t){return mt(function(){var e=n.shape[0],r=Qn(Xn(n,t.box_encoding_predictor),[e,-1,1,4]),i=Qn(Xn(n,t.class_predictor),[e,-1,3]);return{boxPredictionEncoding:r,classPrediction:i}})}function Xy(n,t,e){return mt(function(){var r=li(n,e.conv_0,[1,1]),i=li(r,e.conv_1,[2,2]),a=li(i,e.conv_2,[1,1]),s=li(a,e.conv_3,[2,2]),u=li(s,e.conv_4,[1,1]),l=li(u,e.conv_5,[2,2]),f=li(l,e.conv_6,[1,1]),A=li(f,e.conv_7,[2,2]),I=Ua(t,e.box_predictor_0),R=Ua(n,e.box_predictor_1),z=Ua(i,e.box_predictor_2),te=Ua(s,e.box_predictor_3),oe=Ua(l,e.box_predictor_4),ae=Ua(A,e.box_predictor_5),se=Mr([I.boxPredictionEncoding,R.boxPredictionEncoding,z.boxPredictionEncoding,te.boxPredictionEncoding,oe.boxPredictionEncoding,ae.boxPredictionEncoding],1),we=Mr([I.classPrediction,R.classPrediction,z.classPrediction,te.classPrediction,oe.classPrediction,ae.classPrediction],1);return{boxPredictions:se,classPredictions:we}})}var us=function(){function n(t){var e=t===void 0?{}:t,r=e.minConfidence,i=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=r||.5,this._maxResults=i||100,typeof this._minConfidence!="number"||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if(typeof this._maxResults!="number")throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(n.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),n}(),pd=function(n){St(t,n);function t(){return n.call(this,"SsdMobilenetv1")||this}return t.prototype.forwardInput=function(e){var r=this.params;if(!r)throw new Error("SsdMobilenetv1 - load model before inference");return mt(function(){var i=e.toBatchTensor(512,!1).toFloat(),a=Fr(nn(i,vt(.007843137718737125)),vt(1)),s=Wy(a,r.mobilenetv1),u=Xy(s.out,s.conv11,r.prediction_layer),l=u.boxPredictions,f=u.classPredictions;return Hy(l,f,r.output_layer)})},t.prototype.forward=function(e){return wt(this,void 0,void 0,function(){var r;return At(this,function(i){switch(i.label){case 0:return r=this.forwardInput,[4,Gr(e)];case 1:return[2,r.apply(this,[i.sent()])]}})})},t.prototype.locateFaces=function(e,r){return r===void 0&&(r={}),wt(this,void 0,void 0,function(){var i,a,s,u,l,f,A,I,R,z,te,oe,ae,se,we,xe,me,Se,Re,Me,Fe;return At(this,function(je){switch(je.label){case 0:return i=new us(r),a=i.maxResults,s=i.minConfidence,[4,Gr(e)];case 1:for(u=je.sent(),l=this.forwardInput(u),f=l.boxes,A=l.scores,I=f[0],R=A[0],z=1;z<f.length;z++)f[z].dispose(),A[z].dispose();return ae=(oe=Array).from,[4,R.data()];case 2:return te=ae.apply(oe,[je.sent()]),se=.5,we=zy(I,te,a,se,s),xe=u.getReshapedInputDimensions(0),me=u.inputSize,Se=me/xe.width,Re=me/xe.height,Me=I.arraySync(),Fe=we.map(function(Be){var Ge=[Math.max(0,Me[Be][0]),Math.min(1,Me[Be][2])].map(function(at){return at*Re}),Qe=Ge[0],Ze=Ge[1],Ye=[Math.max(0,Me[Be][1]),Math.min(1,Me[Be][3])].map(function(at){return at*Se}),tt=Ye[0],st=Ye[1];return new Tn(te[Be],new Su(tt,Qe,st-tt,Ze-Qe),{height:u.getInputHeight(0),width:u.getInputWidth(0)})}),I.dispose(),R.dispose(),[2,Fe]}})})},t.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},t.prototype.extractParamsFromWeigthMap=function(e){return Ny(e)},t.prototype.extractParams=function(e){return _y(e)},t}(Ti);function Ky(n){var t=new SsdMobilenetv1;return t.extractWeights(n),t}function Qb(n){return Ky(n)}var Gb=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t}(pd),Zy=.4,Jy=[new Kt(.738768,.874946),new Kt(2.42204,2.65704),new Kt(4.30971,7.04493),new Kt(10.246,4.59428),new Kt(12.6868,11.8741)],Yy=[new Kt(1.603231,2.094468),new Kt(6.041143,7.080126),new Kt(2.882459,3.518061),new Kt(4.266906,5.178857),new Kt(9.041765,10.66308)],$y=[117.001,114.697,97.404],qy="tiny_yolov2_model",e0="tiny_yolov2_separable_conv_model",ls=function(n){return typeof n=="number"};function t0(n){if(!n)throw new Error("invalid config: "+n);if(typeof n.withSeparableConvs!="boolean")throw new Error("config.withSeparableConvs has to be a boolean, have: "+n.withSeparableConvs);if(!ls(n.iouThreshold)||n.iouThreshold<0||n.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+n.iouThreshold);if(!Array.isArray(n.classes)||!n.classes.length||!n.classes.every(function(t){return typeof t=="string"}))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(n.classes));if(!Array.isArray(n.anchors)||!n.anchors.length||!n.anchors.map(function(t){return t||{}}).every(function(t){return ls(t.x)&&ls(t.y)}))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(n.anchors));if(n.meanRgb&&(!Array.isArray(n.meanRgb)||n.meanRgb.length!==3||!n.meanRgb.every(ls)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(n.meanRgb))}function Wu(n){return mt(function(){var t=nn(n,vt(.10000000149011612));return Nt(gr(Fr(n,t)),t)})}function Ji(n,t){return mt(function(){var e=sa(n,[[0,0],[1,1],[1,1],[0,0]]);return e=Mn(e,t.conv.filters,[1,1],"valid"),e=Fr(e,t.bn.sub),e=nn(e,t.bn.truediv),e=Nt(e,t.conv.bias),Wu(e)})}function Yi(n,t){return mt(function(){var e=sa(n,[[0,0],[1,1],[1,1],[0,0]]);return e=Hs(e,t.depthwise_filter,t.pointwise_filter,[1,1],"valid"),e=Nt(e,t.bias),Wu(e)})}function r0(n,t){var e=is(n,t);function r(s,u){var l=Tr(n(s)),f=Tr(n(s));return t.push({paramPath:u+"/sub"},{paramPath:u+"/truediv"}),{sub:l,truediv:f}}function i(s,u,l){var f=e(s,u,3,l+"/conv"),A=r(u,l+"/bn");return{conv:f,bn:A}}var a=_u(n,t);return{extractConvParams:e,extractConvWithBatchNormParams:i,extractSeparableConvParams:a}}function n0(n,t,e,r){var i=ki(n),a=i.extractWeights,s=i.getRemainingWeights,u=[],l=r0(a,u),f=l.extractConvParams,A=l.extractConvWithBatchNormParams,I=l.extractSeparableConvParams,R;if(t.withSeparableConvs){var z=r[0],te=r[1],oe=r[2],ae=r[3],se=r[4],we=r[5],xe=r[6],me=r[7],Se=r[8],Re=t.isFirstLayerConv2d?f(z,te,3,"conv0"):I(z,te,"conv0"),Me=I(te,oe,"conv1"),Fe=I(oe,ae,"conv2"),je=I(ae,se,"conv3"),Be=I(se,we,"conv4"),Ge=I(we,xe,"conv5"),Qe=me?I(xe,me,"conv6"):void 0,Ze=Se?I(me,Se,"conv7"):void 0,Ye=f(Se||me||xe,5*e,1,"conv8");R={conv0:Re,conv1:Me,conv2:Fe,conv3:je,conv4:Be,conv5:Ge,conv6:Qe,conv7:Ze,conv8:Ye}}else{var z=r[0],te=r[1],oe=r[2],ae=r[3],se=r[4],we=r[5],xe=r[6],me=r[7],Se=r[8],Re=A(z,te,"conv0"),Me=A(te,oe,"conv1"),Fe=A(oe,ae,"conv2"),je=A(ae,se,"conv3"),Be=A(se,we,"conv4"),Ge=A(we,xe,"conv5"),Qe=A(xe,me,"conv6"),Ze=A(me,Se,"conv7"),Ye=f(Se,5*e,1,"conv8");R={conv0:Re,conv1:Me,conv2:Fe,conv3:je,conv4:Be,conv5:Ge,conv6:Qe,conv7:Ze,conv8:Ye}}if(s().length!==0)throw new Error("weights remaing after extract: "+s().length);return{params:R,paramMappings:u}}function i0(n,t){var e=Zi(n,t);function r(u){var l=e(u+"/sub",1),f=e(u+"/truediv",1);return{sub:l,truediv:f}}function i(u){var l=e(u+"/filters",4),f=e(u+"/bias",1);return{filters:l,bias:f}}function a(u){var l=i(u+"/conv"),f=r(u+"/bn");return{conv:l,bn:f}}var s=Mu(e);return{extractConvParams:i,extractConvWithBatchNormParams:a,extractSeparableConvParams:s}}function a0(n,t){var e=[],r=i0(n,e),i=r.extractConvParams,a=r.extractConvWithBatchNormParams,s=r.extractSeparableConvParams,u;if(t.withSeparableConvs){var l=t.filterSizes&&t.filterSizes.length||9;u={conv0:t.isFirstLayerConv2d?i("conv0"):s("conv0"),conv1:s("conv1"),conv2:s("conv2"),conv3:s("conv3"),conv4:s("conv4"),conv5:s("conv5"),conv6:l>7?s("conv6"):void 0,conv7:l>8?s("conv7"):void 0,conv8:i("conv8")}}else u={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return Ri(n,e),{params:u,paramMappings:e}}var vd;(function(n){n[n.XS=224]="XS",n[n.SM=320]="SM",n[n.MD=416]="MD",n[n.LG=608]="LG"})(vd||(vd={}));var zu=function(){function n(t){var e=t===void 0?{}:t,r=e.inputSize,i=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=r||416,this._scoreThreshold=i||.5,typeof this._inputSize!="number"||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if(typeof this._scoreThreshold!="number"||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(n.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),n}(),md=function(n){St(t,n);function t(e){var r=n.call(this,"TinyYolov2")||this;return t0(e),r._config=e,r}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),t.prototype.runTinyYolov2=function(e,r){var i=Ji(e,r.conv0);return i=Qr(i,[2,2],[2,2],"same"),i=Ji(i,r.conv1),i=Qr(i,[2,2],[2,2],"same"),i=Ji(i,r.conv2),i=Qr(i,[2,2],[2,2],"same"),i=Ji(i,r.conv3),i=Qr(i,[2,2],[2,2],"same"),i=Ji(i,r.conv4),i=Qr(i,[2,2],[2,2],"same"),i=Ji(i,r.conv5),i=Qr(i,[2,2],[1,1],"same"),i=Ji(i,r.conv6),i=Ji(i,r.conv7),Xn(i,r.conv8,"valid",!1)},t.prototype.runMobilenet=function(e,r){var i=this.config.isFirstLayerConv2d?Wu(Xn(e,r.conv0,"valid",!1)):Yi(e,r.conv0);return i=Qr(i,[2,2],[2,2],"same"),i=Yi(i,r.conv1),i=Qr(i,[2,2],[2,2],"same"),i=Yi(i,r.conv2),i=Qr(i,[2,2],[2,2],"same"),i=Yi(i,r.conv3),i=Qr(i,[2,2],[2,2],"same"),i=Yi(i,r.conv4),i=Qr(i,[2,2],[2,2],"same"),i=Yi(i,r.conv5),i=Qr(i,[2,2],[1,1],"same"),i=r.conv6?Yi(i,r.conv6):i,i=r.conv7?Yi(i,r.conv7):i,Xn(i,r.conv8,"valid",!1)},t.prototype.forwardInput=function(e,r){var i=this,a=this.params;if(!a)throw new Error("TinyYolov2 - load model before inference");return mt(function(){var s=e.toBatchTensor(r,!1).toFloat();return s=i.config.meanRgb?fo(s,i.config.meanRgb):s,s=s.div(vt(256)),i.config.withSeparableConvs?i.runMobilenet(s,a):i.runTinyYolov2(s,a)})},t.prototype.forward=function(e,r){return wt(this,void 0,void 0,function(){var i;return At(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Gr(e)];case 1:return[4,i.apply(this,[a.sent(),r])];case 2:return[2,a.sent()]}})})},t.prototype.detect=function(e,r){return r===void 0&&(r={}),wt(this,void 0,void 0,function(){var i,a,s,u,l,f,A,I,R,z,te,oe,ae,se,we=this;return At(this,function(xe){switch(xe.label){case 0:return i=new zu(r),a=i.inputSize,s=i.scoreThreshold,[4,Gr(e)];case 1:return u=xe.sent(),[4,this.forwardInput(u,a)];case 2:return l=xe.sent(),f=mt(function(){return Nr(l)[0].expandDims()}),A={width:u.getInputWidth(0),height:u.getInputHeight(0)},[4,this.extractBoxes(f,u.getReshapedInputDimensions(0),s)];case 3:return I=xe.sent(),l.dispose(),f.dispose(),R=I.map(function(me){return me.box}),z=I.map(function(me){return me.score}),te=I.map(function(me){return me.classScore}),oe=I.map(function(me){return we.config.classes[me.label]}),ae=co(R.map(function(me){return me.rescale(a)}),z,this.config.iouThreshold,!0),se=ae.map(function(me){return new Nf(z[me],te[me],oe[me],R[me],A)}),[2,se]}})})},t.prototype.getDefaultModelName=function(){return""},t.prototype.extractParamsFromWeigthMap=function(e){return a0(e,this.config)},t.prototype.extractParams=function(e){var r=this.config.filterSizes||t.DEFAULT_FILTER_SIZES,i=r?r.length:void 0;if(i!==7&&i!==8&&i!==9)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+i+" filterSizes in config");return n0(e,this.config,this.boxEncodingSize,r)},t.prototype.extractBoxes=function(e,r,i){return wt(this,void 0,void 0,function(){var a,s,u,l,f,A,I,R,z,te,oe,ae,se,we,xe,me,Se,Re,Me,Fe,je,Be,Ge,Qe,Ze,Ye,tt,st,at,it=this;return At(this,function(lt){switch(lt.label){case 0:return a=r.width,s=r.height,u=Math.max(a,s),l=u/a,f=u/s,A=e.shape[1],I=this.config.anchors.length,R=mt(function(){var rt=e.reshape([A,A,I,it.boxEncodingSize]),ft=rt.slice([0,0,0,0],[A,A,I,4]),dt=rt.slice([0,0,0,4],[A,A,I,1]),yt=it.withClassScores?xi(rt.slice([0,0,0,5],[A,A,I,it.config.classes.length]),3):vt(0);return[ft,dt,yt]}),z=R[0],te=R[1],oe=R[2],ae=[],[4,te.array()];case 1:return se=lt.sent(),[4,z.array()];case 2:we=lt.sent(),xe=0,lt.label=3;case 3:if(!(xe<A))return[3,12];me=0,lt.label=4;case 4:if(!(me<A))return[3,11];Se=0,lt.label=5;case 5:return Se<I?(Re=Cu(se[xe][me][Se][0]),!i||Re>i?(Me=(me+Cu(we[xe][me][Se][0]))/A*l,Fe=(xe+Cu(we[xe][me][Se][1]))/A*f,je=Math.exp(we[xe][me][Se][2])*this.config.anchors[Se].x/A*l,Be=Math.exp(we[xe][me][Se][3])*this.config.anchors[Se].y/A*f,Ge=Me-je/2,Qe=Fe-Be/2,Ze={row:xe,col:me,anchor:Se},this.withClassScores?[4,this.extractPredictedClass(oe,Ze)]:[3,7]):[3,9]):[3,10];case 6:return at=lt.sent(),[3,8];case 7:at={classScore:1,label:0},lt.label=8;case 8:Ye=at,tt=Ye.classScore,st=Ye.label,ae.push(on({box:new qo(Ge,Qe,Ge+je,Qe+Be),score:Re,classScore:Re*tt,label:st},Ze)),lt.label=9;case 9:return Se++,[3,5];case 10:return me++,[3,4];case 11:return xe++,[3,3];case 12:return z.dispose(),te.dispose(),oe.dispose(),[2,ae]}})})},t.prototype.extractPredictedClass=function(e,r){return wt(this,void 0,void 0,function(){var i,a,s,u;return At(this,function(l){switch(l.label){case 0:return i=r.row,a=r.col,s=r.anchor,[4,e.array()];case 1:return u=l.sent(),[2,Array(this.config.classes.length).fill(0).map(function(f,A){return u[i][a][s][A]}).map(function(f,A){return{classScore:f,label:A}}).reduce(function(f,A){return f.classScore>A.classScore?f:A})]}})})},t.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],t}(Ti),o0=function(n){St(t,n);function t(e){e===void 0&&(e=!0);var r=this,i=Object.assign({},{withSeparableConvs:e,iouThreshold:Zy,classes:["face"]},e?{anchors:Yy,meanRgb:$y}:{anchors:Jy,withClassScores:!0});return r=n.call(this,i)||this,r}return Object.defineProperty(t.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return wt(this,void 0,void 0,function(){var i;return At(this,function(a){switch(a.label){case 0:return[4,this.detect(e,r)];case 1:return i=a.sent(),[2,i.map(function(s){return new Tn(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return this.withSeparableConvs?e0:qy},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(md);function Hb(n,t){t===void 0&&(t=!0);var e=new TinyYolov2(t);return e.extractWeights(n),e}var gd=function(n){St(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return t}(zu),vo=function(){function n(){}return n.prototype.then=function(t){return wt(this,void 0,void 0,function(){var e;return At(this,function(r){switch(r.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[r.sent()])]}})})},n.prototype.run=function(){return wt(this,void 0,void 0,function(){return At(this,function(t){throw new Error("ComposableTask - run is not implemented")})})},n}();function yd(n,t){var e={descriptor:t};return Object.assign({},n,e)}function cs(n,t,e,r,i){return i===void 0&&(i=function(a){var s=a.alignedRect;return s}),wt(this,void 0,void 0,function(){var a,s,u,l,f;return At(this,function(A){switch(A.label){case 0:return a=n.map(function(I){return Fu(I)?i(I):I.detection}),u=r,u?[3,5]:t instanceof Dt?[4,ju(t,a)]:[3,2];case 1:return l=A.sent(),[3,4];case 2:return[4,Du(t,a)];case 3:l=A.sent(),A.label=4;case 4:u=l,A.label=5;case 5:return s=u,[4,e(s)];case 6:return f=A.sent(),s.forEach(function(I){return I instanceof Dt&&I.dispose()}),[2,f]}})})}function Vu(n,t,e,r,i){return wt(this,void 0,void 0,function(){var a=this;return At(this,function(s){return[2,cs([n],t,function(u){return wt(a,void 0,void 0,function(){return At(this,function(l){return[2,e(u[0])]})})},r,i)]})})}function s0(n){return mt(function(){return Sn(Nr(n,3).reverse(),3)})}var fs=2,ds=12;function u0(n,t){var e=is(n,t),r=Bu(n,t);function i(f,A){var I=Tr(n(f));return t.push({paramPath:A}),I}function a(f,A,I){I===void 0&&(I=!1);var R=e(f[0],f[1],3,A+"/conv1"),z=i(f[1],A+"/prelu1_alpha"),te=e(f[1],f[2],3,A+"/conv2"),oe=i(f[2],A+"/prelu2_alpha"),ae=e(f[2],f[3],I?2:3,A+"/conv3"),se=i(f[3],A+"/prelu3_alpha");return{conv1:R,prelu1_alpha:z,conv2:te,prelu2_alpha:oe,conv3:ae,prelu3_alpha:se}}function s(){var f=a([3,10,16,32],"pnet"),A=e(32,2,1,"pnet/conv4_1"),I=e(32,4,1,"pnet/conv4_2");return on(on({},f),{conv4_1:A,conv4_2:I})}function u(){var f=a([3,28,48,64],"rnet",!0),A=r(576,128,"rnet/fc1"),I=i(128,"rnet/prelu4_alpha"),R=r(128,2,"rnet/fc2_1"),z=r(128,4,"rnet/fc2_2");return on(on({},f),{fc1:A,prelu4_alpha:I,fc2_1:R,fc2_2:z})}function l(){var f=a([3,32,64,64],"onet"),A=e(64,128,2,"onet/conv4"),I=i(128,"onet/prelu4_alpha"),R=r(1152,256,"onet/fc1"),z=i(256,"onet/prelu5_alpha"),te=r(256,2,"onet/fc2_1"),oe=r(256,4,"onet/fc2_2"),ae=r(256,10,"onet/fc2_3");return on(on({},f),{conv4:A,prelu4_alpha:I,fc1:R,prelu5_alpha:z,fc2_1:te,fc2_2:oe,fc2_3:ae})}return{extractPNetParams:s,extractRNetParams:u,extractONetParams:l}}function l0(n){var t=ki(n),e=t.extractWeights,r=t.getRemainingWeights,i=[],a=u0(e,i),s=a.extractPNetParams,u=a.extractRNetParams,l=a.extractONetParams,f=s(),A=u(),I=l();if(r().length!==0)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:f,rnet:A,onet:I},paramMappings:i}}function c0(n,t){var e=Zi(n,t);function r(A){var I=e(A+"/weights",4,A+"/filters"),R=e(A+"/bias",1);return{filters:I,bias:R}}function i(A){var I=e(A+"/weights",2),R=e(A+"/bias",1);return{weights:I,bias:R}}function a(A){return e(A,1)}function s(A){var I=r(A+"/conv1"),R=a(A+"/prelu1_alpha"),z=r(A+"/conv2"),te=a(A+"/prelu2_alpha"),oe=r(A+"/conv3"),ae=a(A+"/prelu3_alpha");return{conv1:I,prelu1_alpha:R,conv2:z,prelu2_alpha:te,conv3:oe,prelu3_alpha:ae}}function u(){var A=s("pnet"),I=r("pnet/conv4_1"),R=r("pnet/conv4_2");return on(on({},A),{conv4_1:I,conv4_2:R})}function l(){var A=s("rnet"),I=i("rnet/fc1"),R=a("rnet/prelu4_alpha"),z=i("rnet/fc2_1"),te=i("rnet/fc2_2");return on(on({},A),{fc1:I,prelu4_alpha:R,fc2_1:z,fc2_2:te})}function f(){var A=s("onet"),I=r("onet/conv4"),R=a("onet/prelu4_alpha"),z=i("onet/fc1"),te=a("onet/prelu5_alpha"),oe=i("onet/fc2_1"),ae=i("onet/fc2_2"),se=i("onet/fc2_3");return on(on({},A),{conv4:I,prelu4_alpha:R,fc1:z,prelu5_alpha:te,fc2_1:oe,fc2_2:ae,fc2_3:se})}return{extractPNetParams:u,extractRNetParams:l,extractONetParams:f}}function f0(n){var t=[],e=c0(n,t),r=e.extractPNetParams,i=e.extractRNetParams,a=e.extractONetParams,s=r(),u=i(),l=a();return Ri(n,t),{params:{pnet:s,rnet:u,onet:l},paramMappings:t}}function Qu(n,t){var e=t[0],r=t[1];return{height:Math.floor(e*n),width:Math.floor(r*n)}}function d0(n,t,e){for(var r=e[0],i=e[1],a=ds/n,s=[],u=Math.min(r,i)*a,l=0;u>=12;)s.push(a*Math.pow(t,l)),u=u*t,l+=1;return s}var Gu=function(n){St(t,n);function t(e,r,i,a){return n.call(this,{left:e,top:r,right:i,bottom:a},!0)||this}return t}(ai);function bd(n){return mt(function(){return nn(Fr(n,vt(127.5)),vt(.0078125))})}function Wa(n,t){return mt(function(){return Nt(gr(n),nn(t,Lo(gr(Lo(n)))))})}function Hu(n,t,e){return e===void 0&&(e=!1),mt(function(){var r=Xn(n,t.conv1,"valid");return r=Wa(r,t.prelu1_alpha),r=Qr(r,e?[2,2]:[3,3],[2,2],"same"),r=Xn(r,t.conv2,"valid"),r=Wa(r,t.prelu2_alpha),r=e?r:Qr(r,[3,3],[2,2],"valid"),r=Xn(r,t.conv3,"valid"),r=Wa(r,t.prelu3_alpha),r})}function h0(n,t){return mt(function(){var e=Hu(n,t,!0),r=Xn(e,t.conv4_1,"valid"),i=_n(Ho(r,3),3),a=xi(Fr(r,i),3),s=Xn(e,t.conv4_2,"valid");return{prob:a,regions:s}})}function p0(n,t){return mt(function(){var e=Qu(t,n.shape.slice(1)),r=e.height,i=e.width,a=Ys.resizeBilinear(n,[r,i]),s=bd(a);return Vi(s,[0,2,1,3])})}function v0(n,t,e,r){for(var i=[],a=n.arraySync(),s=0;s<n.shape[0];s++)for(var u=0;u<n.shape[1];u++)a[s][u]>=r&&i.push(new Kt(u,s));var l=i.map(function(f){var A=new qo(Math.round((f.y*fs+1)/e),Math.round((f.x*fs+1)/e),Math.round((f.y*fs+ds)/e),Math.round((f.x*fs+ds)/e)),I=a[f.y][f.x],R=t.arraySync(),z=new Gu(R[f.y][f.x][0],R[f.y][f.x][1],R[f.y][f.x][2],R[f.y][f.x][3]);return{cell:A,score:I,region:z}});return l}function m0(n,t,e,r,i){i.stage1=[];var a=t.map(function(R){return mt(function(){var z={scale:R},te=p0(n,R),oe=Date.now(),ae=h0(te,r),se=ae.prob,we=ae.regions;z.pnet=Date.now()-oe;var xe=Nr(Nr(se,3)[1])[0],me=Nr(we)[0];return{scoresTensor:xe,regionsTensor:me,scale:R,statsForScale:z}})}),s=a.map(function(R){var z=R.scoresTensor,te=R.regionsTensor,oe=R.scale,ae=R.statsForScale,se=v0(z,te,oe,e);if(z.dispose(),te.dispose(),!se.length)return i.stage1.push(ae),[];var we=Date.now(),xe=co(se.map(function(me){return me.cell}),se.map(function(me){return me.score}),.5);return ae.nms=Date.now()-we,ae.numBoxes=xe.length,i.stage1.push(ae),xe.map(function(me){return se[me]})}),u=s.reduce(function(R,z){return R.concat(z)},[]),l=[],f=[];if(u.length>0){var A=Date.now(),I=co(u.map(function(R){return R.cell}),u.map(function(R){return R.score}),.7);i.stage1_nms=Date.now()-A,f=I.map(function(R){return u[R].score}),l=I.map(function(R){return u[R]}).map(function(R){var z=R.cell,te=R.region;return new qo(z.left+te.left*z.width,z.top+te.top*z.height,z.right+te.right*z.width,z.bottom+te.bottom*z.height).toSquare().round()})}return{boxes:l,scores:f}}function wd(n,t,e){var r=e.width,i=e.height;return wt(this,void 0,void 0,function(){var a,s,u,l=this;return At(this,function(f){switch(f.label){case 0:return a=oi(n),[4,Promise.all(t.map(function(A){return wt(l,void 0,void 0,function(){var I,R,z,te,oe,ae,se,we;return At(this,function(xe){return I=A.padAtBorders(n.height,n.width),R=I.y,z=I.ey,te=I.x,oe=I.ex,ae=te-1,se=R-1,we=a.getImageData(ae,se,oe-ae,z-se),[2,sn.isNodejs()?Ou(we):createImageBitmap(we)]})})}))];case 1:return s=f.sent(),u=[],s.forEach(function(A){var I=ts({width:r,height:i}),R=oi(I);R.drawImage(A,0,0,r,i);for(var z=R.getImageData(0,0,r,i).data,te=[],oe=0;oe<z.length;oe+=4)te.push(z[oe+2]),te.push(z[oe+1]),te.push(z[oe]);u.push(te)}),[2,u.map(function(A){var I=mt(function(){var R=Vi(bn(A,[1,r,i,3]),[0,2,1,3]).toFloat();return bd(R)});return I})]}})})}function g0(n,t){return mt(function(){var e=Hu(n,t),r=Qn(e,[e.shape[0],t.fc1.weights.shape[0]]),i=si(r,t.fc1),a=Wa(i,t.prelu4_alpha),s=si(a,t.fc2_1),u=_n(Ho(s,1),1),l=xi(Fr(s,u),1),f=si(a,t.fc2_2),A=Nr(l,1)[1];return{scores:A,regions:f}})}function y0(n,t,e,r,i){return wt(this,void 0,void 0,function(){var a,s,u,l,f,A,I,R,z,te,oe,ae,se,we;return At(this,function(xe){switch(xe.label){case 0:return a=Date.now(),[4,wd(n,t,{width:24,height:24})];case 1:return s=xe.sent(),i.stage2_extractImagePatches=Date.now()-a,a=Date.now(),u=s.map(function(me){var Se=g0(me,r);return me.dispose(),Se}),i.stage2_rnet=Date.now()-a,l=u.length>1?Mr(u.map(function(me){return me.scores})):u[0].scores,I=(A=Array).from,[4,l.data()];case 2:return f=I.apply(A,[xe.sent()]),l.dispose(),R=f.map(function(me,Se){return{score:me,idx:Se}}).filter(function(me){return me.score>e}).map(function(me){var Se=me.idx;return Se}),z=R.map(function(me){return t[me]}),te=R.map(function(me){return f[me]}),oe=[],ae=[],z.length>0&&(a=Date.now(),se=co(z,te,.7),i.stage2_nms=Date.now()-a,we=se.map(function(me){var Se=u[R[me]].regions.arraySync();return new Gu(Se[0][0],Se[0][1],Se[0][2],Se[0][3])}),ae=se.map(function(me){return te[me]}),oe=se.map(function(me,Se){return z[me].calibrate(we[Se])})),u.forEach(function(me){me.regions.dispose(),me.scores.dispose()}),[2,{boxes:oe,scores:ae}]}})})}function b0(n,t){return mt(function(){var e=Hu(n,t);e=Qr(e,[2,2],[2,2],"same"),e=Xn(e,t.conv4,"valid"),e=Wa(e,t.prelu4_alpha);var r=Qn(e,[e.shape[0],t.fc1.weights.shape[0]]),i=si(r,t.fc1),a=Wa(i,t.prelu5_alpha),s=si(a,t.fc2_1),u=_n(Ho(s,1),1),l=xi(Fr(s,u),1),f=si(a,t.fc2_2),A=si(a,t.fc2_3),I=Nr(l,1)[1];return{scores:I,regions:f,points:A}})}function w0(n,t,e,r,i){return wt(this,void 0,void 0,function(){var a,s,u,l,f,A,I,R,z,te,oe,ae,se,we,xe;return At(this,function(me){switch(me.label){case 0:return a=Date.now(),[4,wd(n,t,{width:48,height:48})];case 1:return s=me.sent(),i.stage3_extractImagePatches=Date.now()-a,a=Date.now(),u=s.map(function(Se){var Re=b0(Se,r);return Se.dispose(),Re}),i.stage3_onet=Date.now()-a,l=u.length>1?Mr(u.map(function(Se){return Se.scores})):u[0].scores,I=(A=Array).from,[4,l.data()];case 2:return f=I.apply(A,[me.sent()]),l.dispose(),R=f.map(function(Se,Re){return{score:Se,idx:Re}}).filter(function(Se){return Se.score>e}).map(function(Se){var Re=Se.idx;return Re}),z=R.map(function(Se){var Re=u[Se].regions.arraySync();return new Gu(Re[0][0],Re[0][1],Re[0][2],Re[0][3])}),te=R.map(function(Se,Re){return t[Se].calibrate(z[Re])}),oe=R.map(function(Se){return f[Se]}),ae=[],se=[],we=[],te.length>0&&(a=Date.now(),xe=co(te,oe,.7,!1),i.stage3_nms=Date.now()-a,ae=xe.map(function(Se){return te[Se]}),se=xe.map(function(Se){return oe[Se]}),we=xe.map(function(Se,Re){return Array(5).fill(0).map(function(Me,Fe){var je=u[Se].points.arraySync();return new Kt(je[0][Fe]*(ae[Re].width+1)+ae[Re].left,je[0][Fe+5]*(ae[Re].height+1)+ae[Re].top)})})),u.forEach(function(Se){Se.regions.dispose(),Se.scores.dispose(),Se.points.dispose()}),[2,{boxes:ae,scores:se,points:we}]}})})}var A0=function(n){St(t,n);function t(){return n.call(this,"Mtcnn")||this}return t.prototype.load=function(e){return wt(this,void 0,void 0,function(){return At(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.load.call(this,e)]})})},t.prototype.loadFromDisk=function(e){return wt(this,void 0,void 0,function(){return At(this,function(r){return console.warn("mtcnn is deprecated and will be removed soon"),[2,n.prototype.loadFromDisk.call(this,e)]})})},t.prototype.forwardInput=function(e,r){return r===void 0&&(r={}),wt(this,void 0,void 0,function(){var i,a,s,u,l,f,A,I,R,z,te,oe,ae,se,we,xe,me,Se,Re,Me,Fe;return At(this,function(je){switch(je.label){case 0:if(i=this.params,!i)throw new Error("Mtcnn - load model before inference");if(a=e.canvases[0],!a)throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return s={},u=Date.now(),l=mt(function(){return s0(_n(mu.fromPixels(a)).toFloat())}),f=function(Be){return l.dispose(),s.total=Date.now()-u,Be},A=l.shape.slice(1),I=A[0],R=A[1],z=new hd(r),te=z.minFaceSize,oe=z.scaleFactor,ae=z.maxNumScales,se=z.scoreThresholds,we=z.scaleSteps,xe=(we||d0(te,oe,[I,R])).filter(function(Be){var Ge=Qu(Be,[I,R]);return Math.min(Ge.width,Ge.height)>ds}).slice(0,ae),s.scales=xe,s.pyramid=xe.map(function(Be){return Qu(Be,[I,R])}),me=Date.now(),[4,m0(l,xe,se[0],i.pnet,s)];case 1:return Se=je.sent(),s.total_stage1=Date.now()-me,Se.boxes.length?(s.stage2_numInputBoxes=Se.boxes.length,me=Date.now(),[4,y0(a,Se.boxes,se[1],i.rnet,s)]):[2,f({results:[],stats:s})];case 2:return Re=je.sent(),s.total_stage2=Date.now()-me,Re.boxes.length?(s.stage3_numInputBoxes=Re.boxes.length,me=Date.now(),[4,w0(a,Re.boxes,se[2],i.onet,s)]):[2,f({results:[],stats:s})];case 3:return Me=je.sent(),s.total_stage3=Date.now()-me,Fe=Me.boxes.map(function(Be,Ge){return as(po({},new Tn(Me.scores[Ge],new Su(Be.left/R,Be.top/I,Be.width/R,Be.height/I),{height:I,width:R})),new Kg(Me.points[Ge].map(function(Qe){return Qe.sub(new Kt(Be.left,Be.top)).div(new Kt(Be.width,Be.height))}),{width:Be.width,height:Be.height}))}),[2,f({results:Fe,stats:s})]}})})},t.prototype.forward=function(e,r){return r===void 0&&(r={}),wt(this,void 0,void 0,function(){var i;return At(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Gr(e)];case 1:return[4,i.apply(this,[a.sent(),r])];case 2:return[2,a.sent().results]}})})},t.prototype.forwardWithStats=function(e,r){return r===void 0&&(r={}),wt(this,void 0,void 0,function(){var i;return At(this,function(a){switch(a.label){case 0:return i=this.forwardInput,[4,Gr(e)];case 1:return[2,i.apply(this,[a.sent(),r])]}})})},t.prototype.getDefaultModelName=function(){return"mtcnn_model"},t.prototype.extractParamsFromWeigthMap=function(e){return f0(e)},t.prototype.extractParams=function(e){return l0(e)},t}(Ti),x0=.4,E0=[new Kt(1.603231,2.094468),new Kt(6.041143,7.080126),new Kt(2.882459,3.518061),new Kt(4.266906,5.178857),new Kt(9.041765,10.66308)],C0=[117.001,114.697,97.404],S0=function(n){St(t,n);function t(){var e=this,r={withSeparableConvs:!0,iouThreshold:x0,classes:["face"],anchors:E0,meanRgb:C0,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return e=n.call(this,r)||this,e}return Object.defineProperty(t.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),t.prototype.locateFaces=function(e,r){return wt(this,void 0,void 0,function(){var i;return At(this,function(a){switch(a.label){case 0:return[4,this.detect(e,r)];case 1:return i=a.sent(),[2,i.map(function(s){return new Tn(s.score,s.relativeBox,{width:s.imageWidth,height:s.imageHeight})})]}})})},t.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},t.prototype.extractParamsFromWeigthMap=function(e){return n.prototype.extractParamsFromWeigthMap.call(this,e)},t}(md),qt={ssdMobilenetv1:new pd,tinyFaceDetector:new S0,tinyYolov2:new o0,mtcnn:new A0,faceLandmark68Net:new ld,faceLandmark68TinyNet:new Iy,faceRecognitionNet:new Py,faceExpressionNet:new cy,ageGenderNet:new xy},Xb=function(n,t){return qt.ssdMobilenetv1.locateFaces(n,t)},Kb=function(n,t){return qt.tinyFaceDetector.locateFaces(n,t)},Zb=function(n,t){return qt.tinyYolov2.locateFaces(n,t)},Jb=function(n,t){return qt.mtcnn.forward(n,t)},Yb=function(n){return qt.faceLandmark68Net.detectLandmarks(n)},$b=function(n){return qt.faceLandmark68TinyNet.detectLandmarks(n)},qb=function(n){return qt.faceRecognitionNet.computeFaceDescriptor(n)},e1=function(n){return qt.faceExpressionNet.predictExpressions(n)},t1=function(n){return qt.ageGenderNet.predictAgeAndGender(n)},r1=function(n){return qt.ssdMobilenetv1.load(n)},I0=function(n){return qt.tinyFaceDetector.load(n)},n1=function(n){return qt.mtcnn.load(n)},i1=function(n){return qt.tinyYolov2.load(n)},T0=function(n){return qt.faceLandmark68Net.load(n)},a1=function(n){return qt.faceLandmark68TinyNet.load(n)},R0=function(n){return qt.faceRecognitionNet.load(n)},o1=function(n){return qt.faceExpressionNet.load(n)},s1=function(n){return qt.ageGenderNet.load(n)},u1=null,l1=null,c1=null;function f1(n){return typeof n.age=="number"}function Ad(n,t){var e={age:t};return Object.assign({},n,e)}var xd=function(n){St(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.extractedFaces=i,a}return t}(vo),Xu=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r,i=this;return At(this,function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return e=a.sent(),[4,cs(e,this.input,function(s){return wt(i,void 0,void 0,function(){return At(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return qt.faceExpressionNet.predictExpressions(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=a.sent(),[2,e.map(function(s,u){return od(s,r[u])})]}})})},t.prototype.withAgeAndGender=function(){return new Yu(this,this.input)},t}(xd),Ku=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r;return At(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Vu(e,this.input,function(a){return qt.faceExpressionNet.predictExpressions(a)},this.extractedFaces)]:[2];case 2:return r=i.sent(),[2,od(e,r)]}})})},t.prototype.withAgeAndGender=function(){return new $u(this,this.input)},t}(xd),Zu=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Xu),Ju=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}(Ku),Ed=function(n){St(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.extractedFaces=i,a}return t}(vo),Yu=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r,i=this;return At(this,function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return e=a.sent(),[4,cs(e,this.input,function(s){return wt(i,void 0,void 0,function(){return At(this,function(u){switch(u.label){case 0:return[4,Promise.all(s.map(function(l){return qt.ageGenderNet.predictAgeAndGender(l)}))];case 1:return[2,u.sent()]}})})},this.extractedFaces)];case 2:return r=a.sent(),[2,e.map(function(s,u){var l=r[u],f=l.age,A=l.gender,I=l.genderProbability;return Ad(dd(s,A,I),f)})]}})})},t.prototype.withFaceExpressions=function(){return new Xu(this,this.input)},t}(Ed),$u=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r,i,a,s;return At(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?[4,Vu(e,this.input,function(l){return qt.ageGenderNet.predictAgeAndGender(l)},this.extractedFaces)]:[2];case 2:return r=u.sent(),i=r.age,a=r.gender,s=r.genderProbability,[2,Ad(dd(e,a,s),i)]}})})},t.prototype.withFaceExpressions=function(){return new Ku(this,this.input)},t}(Ed),qu=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Yu),el=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}($u),Cd=function(n){St(t,n);function t(e,r){var i=n.call(this)||this;return i.parentTask=e,i.input=r,i}return t}(vo),tl=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r;return At(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),[4,cs(e,this.input,function(a){return Promise.all(a.map(function(s){return qt.faceRecognitionNet.computeFaceDescriptor(s)}))},null,function(a){return a.landmarks.align(null,{useDlibAlignment:!0})})];case 2:return r=i.sent(),[2,r.map(function(a,s){return yd(e[s],a)})]}})})},t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t}(Cd),rl=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r;return At(this,function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return e=i.sent(),e?[4,Vu(e,this.input,function(a){return qt.faceRecognitionNet.computeFaceDescriptor(a)},null,function(a){return a.landmarks.align(null,{useDlibAlignment:!0})})]:[2];case 2:return r=i.sent(),[2,yd(e,r)]}})})},t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t}(Cd),Sd=function(n){St(t,n);function t(e,r,i){var a=n.call(this)||this;return a.parentTask=e,a.input=r,a.useTinyLandmarkNet=i,a}return Object.defineProperty(t.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?qt.faceLandmark68TinyNet:qt.faceLandmark68Net},enumerable:!0,configurable:!0}),t}(vo),k0=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r,i,a,s,u=this;return At(this,function(l){switch(l.label){case 0:return[4,this.parentTask];case 1:return e=l.sent(),r=e.map(function(f){return f.detection}),this.input instanceof Dt?[4,ju(this.input,r)]:[3,3];case 2:return a=l.sent(),[3,5];case 3:return[4,Du(this.input,r)];case 4:a=l.sent(),l.label=5;case 5:return i=a,[4,Promise.all(i.map(function(f){return u.landmarkNet.detectLandmarks(f)}))];case 6:return s=l.sent(),i.forEach(function(f){return f instanceof Dt&&f.dispose()}),[2,e.map(function(f,A){return as(f,s[A])})]}})})},t.prototype.withFaceExpressions=function(){return new Zu(this,this.input)},t.prototype.withAgeAndGender=function(){return new qu(this,this.input)},t.prototype.withFaceDescriptors=function(){return new tl(this,this.input)},t}(Sd),O0=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r,i,a,s;return At(this,function(u){switch(u.label){case 0:return[4,this.parentTask];case 1:return e=u.sent(),e?(r=e.detection,this.input instanceof Dt?[4,ju(this.input,[r])]:[3,3]):[2];case 2:return a=u.sent(),[3,5];case 3:return[4,Du(this.input,[r])];case 4:a=u.sent(),u.label=5;case 5:return i=a,[4,this.landmarkNet.detectLandmarks(i[0])];case 6:return s=u.sent(),i.forEach(function(l){return l instanceof Dt&&l.dispose()}),[2,as(e,s)]}})})},t.prototype.withFaceExpressions=function(){return new Ju(this,this.input)},t.prototype.withAgeAndGender=function(){return new el(this,this.input)},t.prototype.withFaceDescriptor=function(){return new rl(this,this.input)},t}(Sd),Id=function(n){St(t,n);function t(e,r){r===void 0&&(r=new us);var i=n.call(this)||this;return i.input=e,i.options=r,i}return t}(vo),D0=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r,i,a;return At(this,function(s){switch(s.label){case 0:return e=this,r=e.input,i=e.options,i instanceof hd?[4,qt.mtcnn.forward(r,i)]:[3,2];case 1:return[2,s.sent().map(function(u){return u.detection})];case 2:if(a=i instanceof gd?function(u){return qt.tinyFaceDetector.locateFaces(u,i)}:i instanceof us?function(u){return qt.ssdMobilenetv1.locateFaces(u,i)}:i instanceof zu?function(u){return qt.tinyYolov2.locateFaces(u,i)}:null,!a)throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,a(r)]}})})},t.prototype.runAndExtendWithFaceDetections=function(){var e=this;return new Promise(function(r){return wt(e,void 0,void 0,function(){var i;return At(this,function(a){switch(a.label){case 0:return[4,this.run()];case 1:return i=a.sent(),[2,r(i.map(function(s){return po({},s)}))]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new k0(this.runAndExtendWithFaceDetections(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Xu(this.runAndExtendWithFaceDetections(),this.input)},t.prototype.withAgeAndGender=function(){return new Yu(this.runAndExtendWithFaceDetections(),this.input)},t}(Id),j0=function(n){St(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.run=function(){return wt(this,void 0,void 0,function(){var e,r;return At(this,function(i){switch(i.label){case 0:return[4,new D0(this.input,this.options)];case 1:return e=i.sent(),r=e[0],e.forEach(function(a){a.score>r.score&&(r=a)}),[2,r]}})})},t.prototype.runAndExtendWithFaceDetection=function(){var e=this;return new Promise(function(r){return wt(e,void 0,void 0,function(){var i;return At(this,function(a){switch(a.label){case 0:return[4,this.run()];case 1:return i=a.sent(),[2,r(i?po({},i):void 0)]}})})})},t.prototype.withFaceLandmarks=function(e){return e===void 0&&(e=!1),new O0(this.runAndExtendWithFaceDetection(),this.input,e)},t.prototype.withFaceExpressions=function(){return new Ku(this.runAndExtendWithFaceDetection(),this.input)},t.prototype.withAgeAndGender=function(){return new $u(this.runAndExtendWithFaceDetection(),this.input)},t}(Id);function nl(n,t){return t===void 0&&(t=new us),new j0(n,t)}function d1(n,t){return t===void 0&&(t=new SsdMobilenetv1Options),new DetectAllFacesTask(n,t)}function h1(n,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesSsdMobilenetv1 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new SsdMobilenetv1Options(t?{minConfidence:t}:{})).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function p1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesTinyYolov2 is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new TinyYolov2Options(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}function v1(n,t){return t===void 0&&(t={}),__awaiter(this,void 0,void 0,function(){return __generator(this,function(e){switch(e.label){case 0:return console.warn("allFacesMtcnn is deprecated and will be removed soon, use the high level api instead"),[4,detectAllFaces(n,new MtcnnOptions(t)).withFaceLandmarks().withFaceDescriptors()];case 1:return[2,e.sent()]}})})}var m1=null;function P0(n,t){if(n.length!==t.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var e=Array.from(n),r=Array.from(t);return Math.sqrt(e.map(function(i,a){return i-r[a]}).reduce(function(i,a){return i+Math.pow(a,2)},0))}var B0=function(){function n(t,e){e===void 0&&(e=.6),this._distanceThreshold=e;var r=Array.isArray(t)?t:[t];if(!r.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var i=1,a=function(){return"person "+i++};this._labeledDescriptors=r.map(function(s){if(s instanceof es)return s;if(s instanceof Float32Array)return new es(a(),[s]);if(s.descriptor&&s.descriptor instanceof Float32Array)return new es(a(),[s.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array | Array<LabeledFaceDescriptors | WithFaceDescriptor<any> | Float32Array>")})}return Object.defineProperty(n.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),n.prototype.computeMeanDistance=function(t,e){return e.map(function(r){return P0(r,t)}).reduce(function(r,i){return r+i},0)/(e.length||1)},n.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map(function(r){var i=r.descriptors,a=r.label;return new Lf(a,e.computeMeanDistance(t,i))}).reduce(function(r,i){return r.distance<i.distance?r:i})},n.prototype.findBestMatch=function(t){var e=this.matchDescriptor(t);return e.distance<this.distanceThreshold?e:new Lf("unknown",e.distance)},n.prototype.toJSON=function(){return{distanceThreshold:this.distanceThreshold,labeledDescriptors:this.labeledDescriptors.map(function(t){return t.toJSON()})}},n.fromJSON=function(t){var e=t.labeledDescriptors.map(function(r){return es.fromJSON(r)});return new n(e,t.distanceThreshold)},n}();function g1(n){var t=new Mtcnn;return t.extractWeights(n),t}function y1(n){var t=new TinyFaceDetector;return t.extractWeights(n),t}function Td(n,t){var e=new ma(t.width,t.height),r=e.width,i=e.height;if(r<=0||i<=0)throw new Error("resizeResults - invalid dimensions: "+JSON.stringify({width:r,height:i}));if(Array.isArray(n))return n.map(function(u){return Td(u,{width:r,height:i})});if(Fu(n)){var a=n.detection.forSize(r,i),s=n.unshiftedLandmarks.forSize(a.box.width,a.box.height);return as(po(n,a),s)}return ho(n)?po(n,n.detection.forSize(r,i)):n instanceof La||n instanceof Tn?n.forSize(r,i):n}var _0=Le(29787),M0=Le(47257),N0=Le.n(M0),F0=Le(1012),L0=Le(13683),U0=Le(97013),W0={wrp:"wrp___x6ffm"},za=Le(59301),Kn=(n,t,e)=>new Promise((r,i)=>{var a=l=>{try{u(e.next(l))}catch(f){i(f)}},s=l=>{try{u(e.throw(l))}catch(f){i(f)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);u((e=e.apply(n,t)).next())});const z0=function(t,e){const r=t.split(","),i=r[0].match(/:(.*?);/)[1],a=atob(r[1]);let s=a.length;const u=new Uint8Array(s);for(;s--;)u[s]=a.charCodeAt(s);return new Blob([u],{type:i})},V0=n=>Kn(void 0,null,function*(){return new Promise((t,e)=>{let r=new Image;(n==null?void 0:n.indexOf("educoder.net"))>-1?r.setAttribute("crossOrigin","educoder.net"):r.setAttribute("crossOrigin","aliyuncs.com"),r.onload=function(){let i=document.createElement("canvas");i.width=this.naturalWidth,i.height=this.naturalHeight,i.getContext("2d").drawImage(r,0,0);let a=i.toDataURL("image/png");t(a)},r.src=n,r.onerror=()=>{e(new Error("\u56FE\u7247\u6D41\u5F02\u5E38")),j.ZP.error("\u60A8\u7684\u8EAB\u4EFD\u7167\u7247\u5F02\u5E38\uFF0C\u8BF7\u62CD\u7167\u540E\u63D0\u4EA4\u81F3\u4EBA\u5DE5\u5BA1\u6838")}})});var Q0=(0,Ne.forwardRef)(({outputResult:n,identity_url:t,onCameraReady:e,defaultOpen:r},i)=>{const a=(0,ot.useParams)(),s=(0,Ne.useRef)(),u=(0,Ne.useRef)(),l=(0,Ne.useRef)(),f=(0,Ne.useRef)(!1);let A=(0,Ne.useRef)();const[I,R]=(0,Ne.useState)(!0),[z,te]=(0,Ne.useState)(""),[oe,ae]=(0,Ne.useState)(""),se=(0,Ne.useRef)(!1),we=(0,Ne.useRef)(""),[xe]=(0,Ne.useState)(!0),me=.7,Se=224,Re="\u5BA1\u6838\u5931\u8D25",Me=(0,Ne.useMemo)(()=>new gd({inputSize:Se,scoreThreshold:me}),[]),Fe=()=>Kn(void 0,null,function*(){yield qt.ssdMobilenetv1.loadFromUri("https://www-cdn.educoder.net/weights/"),yield I0("https://www-cdn.educoder.net/weights/"),yield T0("https://www-cdn.educoder.net/weights/"),yield R0("https://www-cdn.educoder.net/weights/"),at(!0)});(0,Ne.useEffect)(()=>{r&&Fe()},[r]),(0,Ne.useImperativeHandle)(i,()=>({handleStop:st,handleRemove:tt,handlePlay:at,startDiscern:Ze,handleUploadImage:Qe}));const je=rt=>Kn(void 0,null,function*(){if(!s.current){setTimeout(()=>je(rt));return}navigator.mediaDevices.getUserMedia({video:{width:640,height:360}}).then(ft=>Kn(void 0,null,function*(){if("srcObject"in s.current?s.current.srcObject=ft:s.current.src=window.URL.createObjectURL(ft),s.current.onloadedmetadata=function(dt){R(!1),s.current.play()},rt){const dt=document.createElement("img");dt.src=yield V0(t+"?t="+new Date().getTime()),A.current=yield nl(dt,Me).withFaceLandmarks().withFaceDescriptor()}})).catch(function(ft){console.log("err:",ft,ft.message),ft.message==="Permission denied"||ft.name==="NotAllowedError"?j.ZP.error("\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934"):ft.message!="\u56FE\u7247\u6D41\u5F02\u5E38"&&j.ZP.error("\u6444\u50CF\u5934\u83B7\u53D6\u5931\u8D25\uFF0C\u6216\u60A8\u5DF2\u62D2\u7EDD\u4E86\u83B7\u53D6\u6444\u50CF\u5934")})}),Be=(rt,ft)=>Kn(void 0,null,function*(){return new Promise(dt=>Kn(void 0,null,function*(){var yt,Ct,Tt,Pt,Ut,Ft,Wt;const Bt=yield(0,U0.ZP)("/api/buckets/get_upload_token.json",{method:"get"});Bt.data=JSON.parse((0,L0.pe)(Bt.data));const Lt=(0,F0.Z)(),rr=new(N0())({endpoint:(yt=Bt==null?void 0:Bt.data)==null?void 0:yt.end_point,region:(Ct=Bt==null?void 0:Bt.data)==null?void 0:Ct.region,accessKeyId:(Tt=Bt==null?void 0:Bt.data)==null?void 0:Tt.access_key_id,accessKeySecret:(Pt=Bt==null?void 0:Bt.data)==null?void 0:Pt.access_key_secret,bucket:(Ut=Bt==null?void 0:Bt.data)==null?void 0:Ut.bucket,stsToken:(Ft=Bt==null?void 0:Bt.data)==null?void 0:Ft.security_token}),Ht=z0(rt,Lt);rr.multipartUpload(`${Lt}.png`,Ht,{timeout:10*1e3,partSize:10485760,callback:{url:(Wt=Bt==null?void 0:Bt.data)==null?void 0:Wt.callback_url,host:Bt==null?void 0:Bt.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&login="+a.login+"&container_id="+a.categoryId+"&container_type=ExerciseIdentity&p="+ft}}).then(function(sr){dt(sr),console.log("result:",sr)}).catch(function(sr){console.log("err:",sr)})}))}),Ge=rt=>Kn(void 0,null,function*(){try{u.current.width=s.current.videoWidth,u.current.height=360,yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),we.current=u.current.toDataURL("image/png"),rt===1&&Be(we.current,rt)}catch(ft){}}),Qe=rt=>Kn(void 0,null,function*(){return new Promise(ft=>Kn(void 0,null,function*(){yield u.current.getContext("2d").drawImage(s.current,0,0,u.current.width,u.current.height),yield Be(we.current,rt),ft()}))}),Ze=()=>Kn(void 0,null,function*(){f.current=!0;const rt=yield nl(s.current,Me).withFaceLandmarks().withFaceDescriptor();if(rt&&A.current){const dt=new B0(rt).findBestMatch(A.current.descriptor);te(dt._distance<.43?"\u8BC6\u522B\u6210\u529F":Re),Ge(dt._distance<.43?1:0),setTimeout(()=>{n==null||n({content:dt._distance<.43?"\u8BC6\u522B\u6210\u529F":Re,success:dt._distance<.43})},1e3),se.current=!0}else Ge(0),te(Re),setTimeout(()=>{n==null||n({content:Re,success:!1})},1e3);setTimeout(()=>{s.current.pause()},600)}),Ye=()=>Kn(void 0,null,function*(){var rt,ft;if((rt=s.current)!=null&&rt.paused||(ft=s.current)!=null&&ft.ended)return setTimeout(()=>Ye());const dt=yield nl(s.current,Me).withFaceLandmarks().withFaceDescriptor();f.current||(f.current=!0,e(!0)),dt&&s.current?(ae(""),it(s.current,l.current,[dt],xe)):ae("\u8BF7\u5C06\u8138\u90E8\u79FB\u52A8\u81F3\u53D6\u666F\u6846\u5185"),se.current||setTimeout(()=>Ye())}),tt=()=>{try{s.current.srcObject.getTracks().forEach(function(dt){dt.stop()}),f.current=!1}catch(rt){}},st=()=>{R(!1);try{f.current=!1}catch(rt){}},at=rt=>{f.current=!1,se.current=!1,u.current.getContext("2d").clearRect(0,0,640,480),te(""),R(!0);try{je(rt||!1)}catch(ft){}},it=(rt,ft,dt,yt=!0)=>{const Ct=lt(rt,ft,dt);yt&&qg(ft,Ct.map(Tt=>Tt.detection))},lt=(rt,ft,dt)=>{const{width:yt,height:Ct}=rt instanceof HTMLVideoElement?ku(rt):rt;return ft.width=yt,ft.height=Ct,Td(dt,{width:yt,height:Ct})};return za.createElement("div",{className:W0.wrp},za.createElement(_0.Z,{spinning:I,tip:"\u6B63\u5728\u542F\u52A8\u6444\u50CF\u5934\uFF0C\u8BF7\u7A0D\u540E..."},za.createElement("video",{onPlay:Ye,ref:s,id:"inputVideo",autoPlay:!0,muted:!0}),za.createElement("canvas",{style:{zIndex:2},ref:l}),za.createElement("canvas",{ref:u}),za.createElement("div",{className:"c-red mt5 tc",style:{height:22}},z," ",oe)))}),G0="data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAABEAAAAHoCAYAAABJiJprAAAAAXNSR0IArs4c6QAAQABJREFUeAHsnQegXFW1/r+Z23vqTe89IYEAoQpBRBBFLIiU518BeYoFffr08RQVEbF3fE9AEaygwEOUJh1CaIkEEpIQ0utNQurtbe7815q5J/fM3Jkz7ZwzZ858S4c5ZZ9dfvvumzvfrL1WAHEWDocDcZd4SgIkQAIkQAIkQAIkQAIkQAIkQAIkQAIFRSAQCITNHT4idlD4MGPhMQmQAAmQAAmQAAmQAAmQAAmQAAmQgB8IGEJIRABJV/y4/vrrjwgmfoDAMZAACZAACZAACZAACZAACZAACZAACRQugeuuuy7GyyPZSFQESSmAHBE9rrsO1/XXdPfdd1MISUaV10mABEiABEiABEiABEiABEiABEiABBwlcOGFF0aEj+u1lesj/4WVGBIRQJJ5fxjCh1QQcrTXrJwESIAESIAESIAESIAESIAESIAESIAEciQgOkaJVpFMCAkmqj8ifojHx9y5c+npkQgQr5EACZAACZAACZAACZAACZAACZAACXiKQETDEC3DcOiI79wgAeSI+MFtLvGseE4CJEACJEACJEACJEACJEACJEACJOBhAnNVy0giggwSQHQckQfkfeTIkfQA8fDEsmskQAIkQAIkQAIkQAIkQAIkQAIkQAJRAoaGYWga8VxiBBD1/pC9MpEy+uCbb75JASSeGM9JgARIgARIgARIgARIgARIgARIgAQ8R0A1DEMEUW0jfitMjACivdcML2v6xY+hQ4dSAPHclLJDJEACJEACJEACJEACJEACJEACJEAC8QRUw1ARRDWNRNlrYwWQfu+PxVrLccdh9+7dFEDiifKcBEiABEiABEiABEiABEiABEiABEjAcwQiGoZoGRFNQ3vXr3EYHT0igES2v/RfVcVk6KZNgenTpxvl+E4CJEACJEACJEACJEACJEACJEACJEACniWgGoZqGUY4Dw3wYd4Gc0QAMUawZs2aI14fe/bsOXJs3Oc7CZAACZAACZAACZAACZAACZAACZAACXiNgFnDMGsbRj9jBJDIHpnFUWcRbn8xEPGdBEiABEiABEiABEiABEiABEiABEigEAgc0TJE24iPA1KacACyZwZ79+Jgays9QBIC4kUSIAESIAESIAESIAESIAESIAESIAEvEThYUxMoHTUqjMZGoKVlUNdiPEAG3eUFEiABEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IUADxwSRyCCRAAiRAAiRAAiRAAiRAAiRAAiRAAtYEKIBY8+FdEiABEiABEiABEiABEiABEiABEiABHxCgAOKDSeQQSIAESIAESIAESIAESIAESIAESIAErAlQALHmw7skQAIkQAIkQAIkQAIkQAIkQAIkQAI+IEABxAeTyCGQAAmQAAmQAAmQAAmQAAmQAAmQAAlYE6AAYs2Hd0mABEiABEiABEiABEiABEiABEiABHxAgAKIDyaRQyABEiABEiABEiABEiABEiABEiABErAmQAHEmg/vkgAJkAAJkAAJkAAJkAAJkAAJkAAJ+IAABRAfTCKHQAIkQAIkQAIkQAIkQAIkQAIkQAIkYE2AAog1H94lARIgARIgARIgARIgARIgARIgARLwAQEKID6YRA6BBEiABEiABEiABEiABEiABEiABEjAmgAFEGs+vEsCJEACJEACJEACJEACJEACJEACJOADAhRAfDCJHAIJkAAJkAAJkAAJkAAJkAAJkAAJkIA1AQog1nx4lwRIgARIgARIgARIgARIgARIgARIwAcEKID4YBI5BBIgARIgARIgARIgARIgARIgARIgAWsCFECs+fAuCZAACZAACZAACZAACZAACZAACZCADwhQAPHBJHIIJEACJEACJEACJEACJEACJEACJEAC1gQogFjz4V0SIAESIAESIAESIAESIAESIAESIAEfEKAA4oNJ5BBIgARIgARIgARIgARIgARIgARIgASsCVAAsebDuyRAAiRAAiRAAiRAAiRAAiRAAiRAAj4gQAHEB5PIIZAACZAACZAACZAACZAACZAACZAACVgToABizYd3SYAESIAESIAESIAESIAESIAESIAEfECAAogPJpFDIAESIAESIAESIAESIAESIAESIAESsCZAAcSaD++SAAmQAAmQAAmQAAmQAAmQAAmQAAn4gAAFEB9MIodAAiRAAiRAAiRAAiRAAiRAAiRAAiRgTYACiDUf3iUBEiABEiABEiABEiABEiABEiABEvABAQogPphEDoEESIAESIAESIAESIAESIAESIAESMCaAAUQaz68SwIkQAIkQAIkQAIkQAIkQAIkQAIk4AMCFEB8MIkcAgmQAAmQAAmQAAmQAAmQAAmQAAmQgDUBCiDWfHiXBEiABEiABEiABEiABEiABEiABEjABwQogPhgEjkEEiABEiABEiABEiABEiABEiABEiABawIUQKz58C4JkAAJkAAJkAAJkAAJkAAJkAAJkIAPCFAA8cEkcggkQAIkQAIkQAIkQAIkQAIkQAIkQALWBCiAWPPhXRIgARIgARIgARIgARIgARIgARIgAR8QoADig0nkEEiABEiABEiABEiABEiABEiABEiABKwJUACx5sO7JEACJEACJEACJEACJEACJEACJEACPiBAAcQHk8ghkAAJkAAJkAAJkAAJkAAJkAAJkAAJWBOgAGLNh3dJgARIgARIgARIgARIgARIgARIgAR8QIACiA8mkUMgARIgARIgARIgARIgARIgARIgARKwJkABxJoP75IACZAACZAACZAACZAACZAACZAACfiAAAUQH0wih0ACJEACJEACJEACJEACJEACJEACJGBNgAKINR/eJQESIAESIAESIAESIAESIAESIAES8AEBCiA+mEQOgQRIgARIgARIgARIgARIgARIgARIwJoABRBrPrxLAiRAAiRAAiRAAiRAAiRAAiRAAiTgAwIUQHwwiRwCCZAACZAACZAACZAACZAACZAACZCANQEKINZ8eJcESIAESIAESIAESIAESIAESIAESMAHBCiA+GASOQQSIAESIAESIAESIAESIAESIAESIAFrAhRArPnwLgmQAAmQAAmQAAmQAAmQAAmQAAmQgA8IlPpgDBwCCZAACZAACZAACZBACgJdPcCWPcDGJnntBjbJ+75moK0TaJVX5L0j+q5V1VQCtVX973Ks5yPqgaljgGmj5SXvk0cBFWUpGuZtEiABcP3xh4AEvEGAAog35iFlL3r7gG75T6gvgL6+cMryLEACJEACJJCcQDAYQEkwjPLSIOT/NBLwJYENInA8v0Zea4FVW4Cd+yF/Q6Q/1O5W4KC8rCwo62fccGD+ZOCUOfKaC0wXYYRGAsVOgOuv2H8COH6vEqAA4tWZ6e9XSMSOju6wCB9GRyl+GCT4TgIkQALZElAhWT8I9oiwXCIf4KrKVRAJZFsdnyMBTxBQseLRV4Cl/aLH3kPOd0vX0fa3oq+HlkXbaxwSFUNOFTHk7GOBobXO94MtkEC+CXD95XsG2D4JpEeAAkh6nPJSSr0+2ruAcL/mUVEWQFlJAPptC/9Mz8uUsFESIAEfENBfqRHxIxQWl+SowNwmv2urK0BvEB/Mb7ENobsXeHwFcO9S4OlVKurln4AKL397Ifr66u+AM+YDF5wKnLUQ4nWV//6xByRgFwGuP7tIsh4ScI8A/xlyj3VGLannR1T8CEe+nayuCIJfTmaEkIVJgARIICEBFZDV60M9PspLA/K7VrcXRn/n1ogIQk+QhNh40WMEVm4G7noW+MdLwOE2j3XO1B0VZB4TgUZfDTXAe08ELj4dWDDFVIiHJFBgBLj+CmzC2F0SMBGgAGKC4aVD3fainh/6R3pNZZAeH16aHPaFBEjANwRUWNbfsW2d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ysQfqZx0Mr/7kPRBw0nrySFfYoKAICAICAKCgCAgCAgCgkARIBD7F3QRDE6GIAhkFYE+g7PafCqNNyxcSnWz5lHTspVkrWWvk1gpdTkVatPyVbRy6iya/+n39Mcr7/PnA2pYkAdZPyAu25G1UArclq1qoxBuCuO2+PwuWx37ONbUX6iB0+D279qDNt58B0V4dGPPj+FD1wuTH9aK1eqI/fv1p+b61dShvJw01gIZvslWVNlQT01za8maHcokk0LXpKogIAikiUBdXR09/PDD9NZbb6XZUmZ2b2xsTKmhr7/+ms4880z6/vvvU9pv7Nix9P777ye1z+eff05TpkxJqq5UKl0EVqxYQatXh/6vyzYKd999N/32228xDzN//nxCne+++y5mHe+GpUuXeotirj/wwAOET6asublZtZfoPp43bx499NBDtHZt7N8kmeqTtCMIZAoB8QDJFJLSTukhAC0QeIKsSv4/qGyA1Lh4Gc356OuIpqEoAq8OfAx4d3D2FZMzgQQbmzj9abSAZrAhtR+4EQfLxAqyw/QemImW2r2N5XVrKTjXos4dGf9kst6k2GOTSSyQH41rY2vMaJxFR5s/lyr1Vk+P8eN/YH2PAA1hbRCEZNk4511C4TALF82n+vpWTRvDZAFXlrTRehS2HkuK0Ep1QSArCLz44os0adKkqLYPOugg2nzzzaPK77vvPnrhhRf4sa3RwIEDaeONN46q4y344YcfCMRJOjZs2DDq169fRBNo84wzzqD111+frrjiCtWniAo+KwMGDFCTvJ49e9JWW23lU8O/6P7776empibac889IyqgrMLltRbklN7nn38+7bXXXnTdddeF6yKL1cSJE5PCK7yTLBQtAiDuTj31VDJYn+2ee+6h7t3591qLvf7667Rs2TJnNanvwYMH0+jRo33r/vzzz/T444/TjBkz6Pbbb1d1li9fTtXV1RQIhKZaCxcuVHWqqqpo66239m3HXfjMM88QngVXX3017bbbbuFNsUiR9957T9U5/PDDw3XdCzU1NeG+uMtjLYPQALGB55BzH1v8+3Hu3Lk0a9Ys9fnmm28IhCfK0X6sY8c6hpQLAu2FgBAg7YW8HLc4EOjDk/Y6TonrQyrkaoBGRTkZnGbWVDojoaMilanJniD4sD+Ir+Ftf4eeXal6YD+qHjzAt07OCrv05MwxLAZbJLa6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",H0=Le(89392),X0=Object.defineProperty,hs=Object.getOwnPropertySymbols,Rd=Object.prototype.hasOwnProperty,kd=Object.prototype.propertyIsEnumerable,Od=(n,t,e)=>t in n?X0(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,il=(n,t)=>{for(var e in t||(t={}))Rd.call(t,e)&&Od(n,e,t[e]);if(hs)for(var e of hs(t))kd.call(t,e)&&Od(n,e,t[e]);return n},K0=(n,t)=>{var e={};for(var r in n)Rd.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&hs)for(var r of hs(n))t.indexOf(r)<0&&kd.call(n,r)&&(e[r]=n[r]);return e},ya=(n,t,e)=>new Promise((r,i)=>{var a=l=>{try{u(e.next(l))}catch(f){i(f)}},s=l=>{try{u(e.throw(l))}catch(f){i(f)}},u=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);u((e=e.apply(n,t)).next())});const{Countdown:Z0}=o.default,{Step:J0}=_.default,w1=null,A1={0:"c-red-ee4",1:"c-green"},x1=null,Y0=n=>{var t=n,{globalSetting:e,loading:r,user:i,exercise:a,dispatch:s}=t,u=K0(t,["globalSetting","loading","user","exercise","dispatch"]),l;const f=(0,ot.useParams)(),[A,I]=(0,Ne.useState)(0),[R,z]=(0,Ne.useState)(!1),[te,oe]=(0,Ne.useState)(!1),[ae,se]=(0,Ne.useState)(!1),[we,xe]=(0,Ne.useState)(0),[me,Se]=(0,Ne.useState)({}),Re=(0,Ne.useRef)(),Me=(0,Ne.useRef)(!0),Fe=[{title:"\u91C7\u96C6\u7167\u7247",content:"First-content"},{title:"\u5BA1\u6838\u7ED3\u679C",content:"Second-content"},{title:"\u5F00\u542F\u624B\u673A\u5F55\u5236",content:"Last-content"}].filter(Ze=>me!=null&&me.open_phone_video_recording?!0:Ze.content!=="Last-content"),je=()=>ya(void 0,null,function*(){return new Promise(Ze=>ya(void 0,null,function*(){const Ye=yield(0,c.PJ)(il({},f));Se(il({},Ye)),Ze(Ye)}))}),Be=()=>ya(void 0,null,function*(){var Ze;const Ye=yield je();Ye!=null&&Ye.identity_verify||I(2),Ye!=null&&Ye.can_start&&Ye.countdown_time===0?I(2):(Ye==null?void 0:Ye.identity_photo_state)==="rejected"?(Me.current=!1,xe(1)):(Ye==null?void 0:Ye.identity_photo_state)==="passed"&&(Me.current=!1,(Ze=Re==null?void 0:Re.current)==null||Ze.handleStop(),me!=null&&me.open_phone_video_recording||I(2))}),Ge=()=>ya(void 0,null,function*(){var Ze;const Ye=yield je();(Ye==null?void 0:Ye.identity_photo_state)==="submitted"||((Ye==null?void 0:Ye.identity_photo_state)==="rejected"?(Me.current=!1,xe(2)):(Ye==null?void 0:Ye.identity_photo_state)==="passed"&&(Me.current=!1,(Ze=Re==null?void 0:Re.current)==null||Ze.handleStop(),xe(1),me!=null&&me.open_phone_video_recording||I(2))),(Ye==null?void 0:Ye.identity_photo_state)!=="passed"&&Me.current&&setTimeout(()=>{Ge()},30*1e3)}),Qe=()=>{var Ze;z(!1),(Ze=Re==null?void 0:Re.current)==null||Ze.startDiscern()};return(0,Ne.useEffect)(()=>(Be(),console.log("captureRef:",Re),()=>{xe(0),se(!1),oe(!1),I(0)}),[]),Ne.createElement("div",{className:"p30 bg-white minHb100 edu-container mt20"},(me==null?void 0:me.identity_verify)&&Ne.createElement(Ne.Fragment,null,Ne.createElement("div",{className:"tc font16 blod"},"\u8EAB\u4EFD\u9A8C\u8BC1"),Ne.createElement("div",{className:g.steps},Ne.createElement(_.default,{current:A},Fe.map(Ze=>Ne.createElement(J0,{key:Ze.title,title:Ze.title}))))),Ne.createElement("div",{className:A===0?"":"hide"},Ne.createElement("div",{className:"tc mt50"},"\u8BF7\u4FDD\u8BC1\u5468\u56F4\u5149\u7EBF\u5145\u8DB3\uFF0C\u4E94\u5B98\u6E05\u6670\u53EF\u89C1\uFF01"),!te&&Ne.createElement("div",{className:"tc"},Ne.createElement("img",{width:536,src:G0,className:"mt30"})),Ne.createElement("div",{className:te?"":"hide"},Ne.createElement(Q0,{ref:Re,onCameraReady:Ze=>{z(Ze)},defaultOpen:me==null?void 0:me.identity_verify,identity_url:(0,w.Tv)((l=i==null?void 0:i.userInfo)==null?void 0:l.identity_url),outputResult:Ze=>{Ze.success?(j.ZP.success({content:"\u4EBA\u8138\u8BC6\u522B\u6210\u529F",key:"checkapi"}),I(2)):se(!0),z(!1)}})),te&&Ne.createElement(Ne.Fragment,null,ae?Ne.createElement("div",{className:"tc mb30 mt15"},Ne.createElement(h.ZP,{type:"primary",onClick:()=>{var Ze;(Ze=Re==null?void 0:Re.current)==null||Ze.handlePlay(),Se(il({},{})),se(!1)}},"\u91CD\u65B0\u8BC6\u522B"),Ne.createElement(h.ZP,{type:"primary",className:"ml90",onClick:()=>ya(void 0,null,function*(){var Ze;yield(Ze=Re==null?void 0:Re.current)==null?void 0:Ze.handleUploadImage(0),Me.current=!0,I(1),xe(0),se(!1),Ge()})},"\u4EBA\u5DE5\u5BA1\u6838")):R&&Ne.createElement("div",{className:"tc mb30 mt15"},Ne.createElement(h.ZP,{type:"primary",onClick:(0,H0.throttle)(Qe,2e3)},"\u5F00\u59CB\u8BC6\u522B"))),!te&&Ne.createElement("div",{className:"tc mb30 mt15"},Ne.createElement(h.ZP,{type:"primary",onClick:()=>{oe(!0)}},"\u5F00\u59CB\u91C7\u96C6"))),A===1&&Ne.createElement("div",{className:"tc"},we===0&&Ne.createElement(Ne.Fragment,null,Ne.createElement("div",{className:"tc mt50"},Ne.createElement("span",{className:"c-blue font50 iconfont icon-dengdaishenhe"}),Ne.createElement("br",null),"\u4EBA\u5DE5\u5BA1\u6838\u4E2D...",Ne.createElement("br",null),"\u7533\u8BF7\u5DF2\u63D0\u4EA4\uFF0C\u76D1\u63A7\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF01"),Ne.createElement(h.ZP,{type:"primary",className:"mt50",onClick:()=>ya(void 0,null,function*(){const Ze=yield je();(Ze==null?void 0:Ze.identity_photo_state)==="submitted"?j.ZP.warning({content:"\u6B63\u5728\u7B49\u5F85\u8001\u5E08\u5BA1\u6838\u4E2D\uFF0C\u8BF7\u7A0D\u540E...",key:"sh1"}):(Ze==null?void 0:Ze.identity_photo_state)==="rejected"?(xe(2),Me.current=!1):(Ze==null?void 0:Ze.identity_photo_state)==="passed"&&(Me.current=!1,xe(1),me!=null&&me.open_phone_video_recording||I(2))})},"\u67E5\u770B\u5BA1\u6838\u7ED3\u679C")),we===1&&Ne.createElement(Ne.Fragment,null,Ne.createElement("div",{className:"tc mt50"},Ne.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),Ne.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002"),(me==null?void 0:me.open_phone_video_recording)&&Ne.createElement(h.ZP,{type:"primary",className:"mt50",onClick:()=>I(2)},"\u4E0B\u4E00\u6B65")),we===2&&Ne.createElement(Ne.Fragment,null,Ne.createElement("div",{className:"tc mt50"},Ne.createElement("span",{className:"c-red font50 iconfont icon-hongsejingshi"}),Ne.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u4E0D\u901A\u8FC7\u3002\u8BF7\u91CD\u65B0\u62CD\u7167\u9A8C\u8BC1\u3002"),Ne.createElement("div",{className:"mt20"},Ne.createElement(d.Z,null,Ne.createElement(p.Z,{className:"tr",flex:"430px"},"\u5931\u8D25\u539F\u56E0\uFF1A"),Ne.createElement(p.Z,null,me==null?void 0:me.identity_photo_comment)),Ne.createElement(d.Z,{className:"mt30"},Ne.createElement(p.Z,{className:"tr",flex:"430px"},"\u91C7\u96C6\u7167\u7247\uFF1A"),Ne.createElement(p.Z,null,Ne.createElement("img",{src:(0,w.Tv)(me==null?void 0:me.identity_photo_url),width:200}))),Ne.createElement(d.Z,null,Ne.createElement(p.Z,{className:"tr",flex:"430px"}),Ne.createElement(p.Z,null,Ne.createElement(h.ZP,{type:"primary",className:"mt50",onClick:()=>{var Ze;I(0),z(!1),se(!1),oe(!1),(Ze=Re==null?void 0:Re.current)==null||Ze.handlePlay()}},"\u91CD\u65B0\u8BA4\u8BC1")))))),A===2&&Ne.createElement(Ne.Fragment,null,Ne.createElement("div",{className:"tc mt50"},!(me!=null&&me.open_phone_video_recording)&&Ne.createElement(Ne.Fragment,null,(me==null?void 0:me.countdown_time)<=0?Ne.createElement(Ne.Fragment,null,Ne.createElement("div",{className:"tc mt50"},Ne.createElement("span",{className:"c-green font50 iconfont icon-tongguo"}),Ne.createElement("br",null),"\u8EAB\u4EFD\u9A8C\u8BC1\u5BA1\u6838\u901A\u8FC7\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85..."),(me==null?void 0:me.open_phone_video_recording)&&Ne.createElement(Ne.Fragment,null,(me==null?void 0:me.countdown_time)<=0?Ne.createElement("div",{className:"tc"},"\u6839\u636E\u8003\u8BD5\u89C4\u5B9A\uFF0C\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u626B\u7801\u4E0B\u9762\u7684\u4E8C\u7EF4\u7801\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891",Ne.createElement("br",null),Ne.createElement("span",{className:"c-blue",style:{cursor:"default"},onClick:()=>{b.default.info({icon:null,title:"\u67E5\u770B\u64CD\u4F5C\u6307\u5F15",className:"custom-modal-divider",width:540,content:Ne.createElement(d.Z,null,Ne.createElement(p.Z,{flex:"178px"},Ne.createElement("img",{width:148,src:"/images/operation_guidance.png"})),Ne.createElement(p.Z,{flex:"1"},"\u8BF7\u70B9\u51FB\u53F3\u4E0A\u89D2\u201C\u2026\u201D\uFF0C\u9009\u62E9",Ne.createElement("span",{className:"c-orange"},"Safari\u4E2D\u6253\u5F00"),"\u6216\u8005",Ne.createElement("span",{className:"c-orange"},"\u201C\u5728\u9ED8\u8BA4\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00\u201D"),"\u540E\uFF0C\u6D4F\u89C8\u5668\u6253\u5F00\u540E\u8BF7\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u6309\u94AE\uFF0C\u53EF\u4EE5\u5F00\u542F\u624B\u673A\u5F55\u5236\u89C6\u9891\u3002"))})}},"\u5982\u82F9\u679C\u624B\u673A\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801\u540E\uFF0C\u51FA\u73B0\u70B9\u51FB\u5F00\u59CB\u5F55\u5236\u65E0\u54CD\u5E94\uFF0C\u8BF7\u67E5\u770B\u64CD\u4F5C\u6307\u5F15\u3002")):"\u8003\u8BD5\u5373\u5C06\u5F00\u59CB\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...")),(me==null?void 0:me.open_phone_video_recording)&&Ne.createElement("div",{className:g.qrcode},Ne.createElement(v(),{value:`https://${document.domain}/live-push.html?id=${f.categoryId}&login=${f.login}&cookie=${(0,w.ej)("_educoder_session")}`})),(me==null?void 0:me.countdown_time)>0&&Ne.createElement("div",{className:"tc mt20"},Ne.createElement(Z0,{value:Date.now()+(me==null?void 0:me.countdown_time)*1e3,valueStyle:{color:"#cf1322",fontSize:40},onFinish:()=>{je()}})),Ne.createElement("div",{className:"tc mb30 mt50"},Ne.createElement(h.ZP,{type:"primary",onClick:()=>ya(void 0,null,function*(){var Ze;const Ye=yield je();Ye!=null&&Ye.can_start&&(Ye==null?void 0:Ye.countdown_time)<=0?((Ze=Re==null?void 0:Re.current)==null||Ze.handleRemove(),me!=null&&me.open_phone_video_recording?Ye!=null&&Ye.video_url&&setTimeout(()=>{location.href=`/classrooms/${f.coursesId}/exercise/${f.categoryId}/users/${f.login}`},300):setTimeout(()=>{location.href=`/classrooms/${f.coursesId}/exercise/${f.categoryId}/users/${f.login}`},300)):(Ye==null?void 0:Ye.countdown_time)>0?j.ZP.warning({content:"\u8003\u8BD5\u6682\u672A\u5F00\u59CB\uFF0C\u8BF7\u7A0D\u540E..."}):j.ZP.warning({content:"\u8BF7\u6253\u5F00\u5FAE\u4FE1\u626B\u4E00\u626B\uFF0C\u5F00\u542F\u624B\u673A\u89C6\u9891\u5F55\u5236"})})},"\u5F00\u59CB\u8003\u8BD5"))))};var $0=(0,ot.connect)(({loading:n,user:t,exercise:e,globalSetting:r})=>({globalSetting:r,user:t,exercise:e,loading:n.effects}))(Y0)},47257:function(Qt){(function(ct){(function(Le){if(1)Qt.exports=Le();else var Ne})(function(){var Le,Ne,ot;return function(){function o(_,j,h){function d(g,w){if(!j[g]){if(!_[g]){var c=void 0;if(!w&&c)return require(g,!0);if(p)return p(g,!0);var m=new Error("Cannot find module '"+g+"'");throw m.code="MODULE_NOT_FOUND",m}var v=j[g]={exports:{}};_[g][0].call(v.exports,function(y){var E=_[g][1][y];return d(E||y)},v,v.exports,o,_,j,h)}return j[g].exports}for(var p=void 0,b=0;b<h.length;b++)d(h[b]);return d}return o}()({1:[function(o,_,j){"use strict";var h=o("./browser/client");h.Buffer=o("buffer").Buffer,h.urllib=o("../shims/xhr"),h.version=o("./browser/version").version,_.exports=h},{"../shims/xhr":475,"./browser/client":3,"./browser/version":6,buffer:90}],2:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.slice.js");var b=o("assert"),g=o("../common/utils/checkBucketName"),w=g.checkBucketName,c=j;function m(y){return Array.isArray?Array.isArray(y):Object.prototype.toString.call(y)==="[object Array]"}function v(y){return y?m(y)?y:[y]:[]}c.useBucket=function(E){return w(E),this.options.bucket=E,this},c.setBucket=function(E){return w(E),this.options.bucket=E,this},c.getBucket=function(){return this.options.bucket},c.deleteBucket=function(){var y=(0,p.default)(d.default.mark(function T(S,C){var x,O;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return x=this._bucketRequestParams("DELETE",S,"",C),P.next=3,this.request(x);case 3:if(O=P.sent,!(O.status===200||O.status===204)){P.next=6;break}return P.abrupt("return",{res:O.res});case 6:return P.next=8,this.requestError(O);case 8:throw P.sent;case 9:case"end":return P.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c.putBucketACL=function(){var y=(0,p.default)(d.default.mark(function T(S,C,x){var O,J;return d.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return O=this._bucketRequestParams("PUT",S,"acl",x),O.headers={"x-oss-acl":C},O.successStatuses=[200],X.next=5,this.request(O);case 5:return J=X.sent,X.abrupt("return",{bucket:J.headers.location&&J.headers.location.substring(1)||null,res:J.res});case 7:case"end":return X.stop()}},T,this)}));function E(T,S,C){return y.apply(this,arguments)}return E}(),c.getBucketACL=function(){var y=(0,p.default)(d.default.mark(function T(S,C){var x,O;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return x=this._bucketRequestParams("GET",S,"acl",C),x.successStatuses=[200],x.xmlResponse=!0,P.next=5,this.request(x);case 5:return O=P.sent,P.abrupt("return",{acl:O.data.AccessControlList.Grant,owner:{id:O.data.Owner.ID,displayName:O.data.Owner.DisplayName},res:O.res});case 7:case"end":return P.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c.putBucketLogging=function(){var y=(0,p.default)(d.default.mark(function T(S,C,x){var O,J,P;return d.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return O=this._bucketRequestParams("PUT",S,"logging",x),J=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<BucketLoggingStatus>
|
|
<LoggingEnabled>
|
|
<TargetBucket>`.concat(S,`</TargetBucket>
|
|
`),C&&(J+="<TargetPrefix>".concat(C,`</TargetPrefix>
|
|
`)),J+=`</LoggingEnabled>
|
|
</BucketLoggingStatus>`,O.content=J,O.mime="xml",O.successStatuses=[200],B.next=9,this.request(O);case 9:return P=B.sent,B.abrupt("return",{res:P.res});case 11:case"end":return B.stop()}},T,this)}));function E(T,S,C){return y.apply(this,arguments)}return E}(),c.getBucketLogging=function(){var y=(0,p.default)(d.default.mark(function T(S,C){var x,O,J;return d.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return x=this._bucketRequestParams("GET",S,"logging",C),x.successStatuses=[200],x.xmlResponse=!0,X.next=5,this.request(x);case 5:return O=X.sent,J=O.data.LoggingEnabled,X.abrupt("return",{enable:!!J,prefix:J&&J.TargetPrefix||null,res:O.res});case 8:case"end":return X.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c.deleteBucketLogging=function(){var y=(0,p.default)(d.default.mark(function T(S,C){var x,O;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return x=this._bucketRequestParams("DELETE",S,"logging",C),x.successStatuses=[204,200],P.next=4,this.request(x);case 4:return O=P.sent,P.abrupt("return",{res:O.res});case 6:case"end":return P.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c.putBucketCORS=function(){var y=(0,p.default)(d.default.mark(function T(S,C,x){var O,J,P,X,B,k,D,L,q,G;return d.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:for(C=C||[],b(C.length,"rules is required"),C.forEach(function(K){b(K.allowedOrigin,"allowedOrigin is required"),b(K.allowedMethod,"allowedMethod is required")}),O=this._bucketRequestParams("PUT",S,"cors",x),J=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CORSConfiguration>`,P=function(re){J+="<AllowedOrigin>".concat(re,"</AllowedOrigin>")},X=function(re){J+="<AllowedMethod>".concat(re,"</AllowedMethod>")},B=function(re){J+="<AllowedHeader>".concat(re,"</AllowedHeader>")},k=function(re){J+="<ExposeHeader>".concat(re,"</ExposeHeader>")},D=0,L=C.length;D<L;D++)q=C[D],J+="<CORSRule>",v(q.allowedOrigin).forEach(P),v(q.allowedMethod).forEach(X),v(q.allowedHeader).forEach(B),v(q.exposeHeader).forEach(k),q.maxAgeSeconds&&(J+="<MaxAgeSeconds>".concat(q.maxAgeSeconds,"</MaxAgeSeconds>")),J+="</CORSRule>";return J+="</CORSConfiguration>",O.content=J,O.mime="xml",O.successStatuses=[200],N.next=16,this.request(O);case 16:return G=N.sent,N.abrupt("return",{res:G.res});case 18:case"end":return N.stop()}},T,this)}));function E(T,S,C){return y.apply(this,arguments)}return E}(),c.getBucketCORS=function(){var y=(0,p.default)(d.default.mark(function T(S,C){var x,O,J,P;return d.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return x=this._bucketRequestParams("GET",S,"cors",C),x.successStatuses=[200],x.xmlResponse=!0,B.next=5,this.request(x);case 5:return O=B.sent,J=[],O.data&&O.data.CORSRule&&(P=O.data.CORSRule,m(P)||(P=[P]),P.forEach(function(k){var D={};Object.keys(k).forEach(function(L){D[L.slice(0,1).toLowerCase()+L.slice(1,L.length)]=k[L]}),J.push(D)})),B.abrupt("return",{rules:J,res:O.res});case 9:case"end":return B.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c.deleteBucketCORS=function(){var y=(0,p.default)(d.default.mark(function T(S,C){var x,O;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return x=this._bucketRequestParams("DELETE",S,"cors",C),x.successStatuses=[204],P.next=4,this.request(x);case 4:return O=P.sent,P.abrupt("return",{res:O.res});case 6:case"end":return P.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c.putBucketReferer=function(){var y=(0,p.default)(d.default.mark(function T(S,C,x,O){var J,P,X,B;return d.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(J=this._bucketRequestParams("PUT",S,"referer",O),P=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<RefererConfiguration>
|
|
`,P+=" <AllowEmptyReferer>".concat(C?"true":"false",`</AllowEmptyReferer>
|
|
`),x&&x.length>0){for(P+=` <RefererList>
|
|
`,X=0;X<x.length;X++)P+=" <Referer>".concat(x[X],`</Referer>
|
|
`);P+=` </RefererList>
|
|
`}else P+=` <RefererList />
|
|
`;return P+="</RefererConfiguration>",J.content=P,J.mime="xml",J.successStatuses=[200],D.next=10,this.request(J);case 10:return B=D.sent,D.abrupt("return",{res:B.res});case 12:case"end":return D.stop()}},T,this)}));function E(T,S,C,x){return y.apply(this,arguments)}return E}(),c.getBucketReferer=function(){var y=(0,p.default)(d.default.mark(function T(S,C){var x,O,J;return d.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return x=this._bucketRequestParams("GET",S,"referer",C),x.successStatuses=[200],x.xmlResponse=!0,X.next=5,this.request(x);case 5:return O=X.sent,J=O.data.RefererList.Referer||null,J&&(m(J)||(J=[J])),X.abrupt("return",{allowEmpty:O.data.AllowEmptyReferer==="true",referers:J,res:O.res});case 9:case"end":return X.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c.deleteBucketReferer=function(){var y=(0,p.default)(d.default.mark(function T(S,C){return d.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,this.putBucketReferer(S,!0,null,C);case 2:return O.abrupt("return",O.sent);case 3:case"end":return O.stop()}},T,this)}));function E(T,S){return y.apply(this,arguments)}return E}(),c._bucketRequestParams=function(E,T,S,C){return{method:E,bucket:T,subres:S,timeout:C&&C.timeout,ctx:C&&C.ctx}}},{"../common/utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,assert:82,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],3:[function(o,_,j){(function(h,d){(function(){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),b=p(o("@babel/runtime/regenerator")),g=p(o("@babel/runtime/helpers/asyncToGenerator"));o("core-js/modules/es.function.name.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.symbol.js"),o("core-js/modules/es.symbol.description.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.to-string.js");var w=o("debug")("ali-oss"),c=o("xml2js"),m=o("agentkeepalive"),v=o("merge-descriptors"),y=o("platform"),E=o("utility"),T=o("urllib"),S=o("./version"),C=o("bowser"),x=o("../common/signUtils"),O=o("../common/client/initOptions"),J=o("../common/utils/createRequest"),P=J.createRequest,X=o("../common/utils/encoder"),B=X.encoder,k=o("../common/client/getReqUrl"),D=k.getReqUrl,L=o("../common/utils/setSTSToken"),q=L.setSTSToken,G=o("../common/utils/retry"),F=G.retry,N=o("../common/utils/isFunction"),K=N.isFunction,re=new m;function ne(){var ve=y.name,be=y.version;ve&&ve.toLowerCase&&ve.toLowerCase()==="ie"&&be.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function pe(){return location&&location.protocol==="https:"}function ie(ve,be){if(ne(),!(this instanceof ie))return new ie(ve,be);ve&&ve.inited?this.options=ve:this.options=ie.initOptions(ve),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=T,this.agent=this.options.agent||re),this.ctx=be,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}_.exports=ie,ie.initOptions=function(be){be.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var le=Object.assign({secure:pe(),useFetch:!1},be);return O(le)};var Ae=ie.prototype;Ae.debug=w,v(Ae,o("./object")),v(Ae,o("./bucket")),v(Ae,o("../common/bucket/getBucketWebsite")),v(Ae,o("../common/bucket/putBucketWebsite")),v(Ae,o("../common/bucket/deleteBucketWebsite")),v(Ae,o("../common/bucket/getBucketLifecycle")),v(Ae,o("../common/bucket/putBucketLifecycle")),v(Ae,o("../common/bucket/deleteBucketLifecycle")),v(Ae,o("../common/bucket/putBucketVersioning")),v(Ae,o("../common/bucket/getBucketVersioning")),v(Ae,o("../common/bucket/getBucketInventory")),v(Ae,o("../common/bucket/deleteBucketInventory")),v(Ae,o("../common/bucket/listBucketInventory")),v(Ae,o("../common/bucket/putBucketInventory")),v(Ae,o("../common/bucket/abortBucketWorm")),v(Ae,o("../common/bucket/completeBucketWorm")),v(Ae,o("../common/bucket/extendBucketWorm")),v(Ae,o("../common/bucket/getBucketWorm")),v(Ae,o("../common/bucket/initiateBucketWorm")),v(Ae,o("./managed-upload")),v(Ae,o("../common/multipart-copy")),v(Ae,o("../common/multipart")),v(Ae,o("../common/parallel")),Ae.signature=function(be){return this.debug("authorization stringToSign: %s",be,"info"),x.computeSignature(this.options.accessKeySecret,be,this.options.headerEncoding)},Ae._getReqUrl=D,Ae.authorization=function(be,le,ue,ge){var Ee=x.buildCanonicalString(be.toUpperCase(),le,{headers:ge,parameters:ue});return x.authorization(this.options.accessKeyId,this.options.accessKeySecret,Ee,this.options.headerEncoding)},Ae.request=function(){var ve=(0,g.default)(b.default.mark(function be(le){var ue=this;return b.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(!this.options.retryMax){Ee.next=6;break}return Ee.next=3,F(Y.bind(this),this.options.retryMax,{errorHandler:function(Ie){var de=function(ye){if(le.stream)return!1;var V=[-1,-2].includes(ye.status),Q=ue.options.requestErrorRetryHandle||function(){return!0};return V&&Q(ye)};return!!de(Ie)}})(le);case 3:return Ee.abrupt("return",Ee.sent);case 6:return Ee.abrupt("return",Y.call(this,le));case 7:case"end":return Ee.stop()}},be,this)}));return function(be){return ve.apply(this,arguments)}}();function Y(ve){return fe.apply(this,arguments)}function fe(){return fe=(0,g.default)(b.default.mark(function ve(be){var le,ue,ge,Ee,ke,Ie;return b.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(!(this.options.stsToken&&K(this.options.refreshSTSToken))){Z.next=3;break}return Z.next=3,q.call(this);case 3:return le=P.call(this,be),this.options.useFetch||(le.params.mode="disable-fetch"),Ee=!!be.stream,Z.prev=6,Z.next=9,this.urllib.request(le.url,le.params);case 9:ue=Z.sent,this.debug("response %s %s, got %s, headers: %j",be.method,le.url,ue.status,ue.headers,"info"),Z.next=16;break;case 13:Z.prev=13,Z.t0=Z.catch(6),ge=Z.t0;case 16:if(!(ue&&be.successStatuses&&be.successStatuses.indexOf(ue.status)===-1)){Z.next=28;break}return Z.next=19,this.requestError(ue);case 19:if(ke=Z.sent,!(ke.code==="RequestTimeTooSkewed"&&!Ee)){Z.next=25;break}return this.options.amendTimeSkewed=+new Date(ke.serverTime)-new Date,Z.next=24,this.request(be);case 24:return Z.abrupt("return",Z.sent);case 25:ke.params=be,Z.next=32;break;case 28:if(!ge){Z.next=32;break}return Z.next=31,this.requestError(ge);case 31:ke=Z.sent;case 32:if(!ke){Z.next=34;break}throw ke;case 34:if(!be.xmlResponse){Z.next=39;break}return Z.next=37,this.parseXML(ue.data);case 37:Ie=Z.sent,ue.data=Ie;case 39:return Z.abrupt("return",ue);case 40:case"end":return Z.stop()}},ve,this,[[6,13]])})),fe.apply(this,arguments)}Ae._getResource=function(be){var le="/";return be.bucket&&(le+="".concat(be.bucket,"/")),be.object&&(le+=B(be.object,this.options.headerEncoding)),le},Ae._escape=function(be){return E.encodeURIComponent(be).replace(/%2F/g,"/")},Ae._getUserAgent=function(){var be=d&&d.browser?"js":"nodejs",le="aliyun-sdk-".concat(be,"/").concat(S.version),ue=y.description;return!ue&&d&&(ue="Node.js ".concat(d.version.slice(1)," on ").concat(d.platform," ").concat(d.arch)),this._checkUserAgent("".concat(le," ").concat(ue))},Ae._checkUserAgent=function(be){var le=be.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return le},Ae.checkBrowserAndVersion=function(be,le){return C.name===be&&C.version.split(".")[0]===le},Ae.parseXML=function(be){return new Promise(function(le,ue){h.isBuffer(be)&&(be=be.toString()),c.parseString(be,{explicitRoot:!1,explicitArray:!1},function(ge,Ee){ge?ue(ge):le(Ee)})})},Ae.requestError=function(){var ve=(0,g.default)(b.default.mark(function le(ue){var ge,Ee,ke,Ie;return b.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(ge=null,!(!ue.data||!ue.data.length)){Z.next=5;break}ue.status===-1||ue.status===-2?(ge=new Error(ue.message),ge.name=ue.name,ge.status=ue.status,ge.code=ue.name):(ue.status===404?(ge=new Error("Object not exists"),ge.name="NoSuchKeyError",ge.status=404,ge.code="NoSuchKey"):ue.status===412?(ge=new Error("Pre condition failed"),ge.name="PreconditionFailedError",ge.status=412,ge.code="PreconditionFailed"):(ge=new Error("Unknow error, status: ".concat(ue.status)),ge.name="UnknownError",ge.status=ue.status),ge.requestId=ue.headers["x-oss-request-id"],ge.host=""),Z.next=32;break;case 5:return Ee=String(ue.data),this.debug("request response error data: %s",Ee,"error"),Z.prev=7,Z.next=10,this.parseXML(Ee);case 10:if(Z.t0=Z.sent,Z.t0){Z.next=13;break}Z.t0={};case 13:ke=Z.t0,Z.next=23;break;case 16:return Z.prev=16,Z.t1=Z.catch(7),this.debug(Ee,"error"),Z.t1.message+=`
|
|
raw xml: `.concat(Ee),Z.t1.status=ue.status,Z.t1.requestId=ue.headers["x-oss-request-id"],Z.abrupt("return",Z.t1);case 23:Ie=ke.Message||"unknow request error, status: ".concat(ue.status),ke.Condition&&(Ie+=" (condition: ".concat(ke.Condition,")")),ge=new Error(Ie),ge.name=ke.Code?"".concat(ke.Code,"Error"):"UnknownError",ge.status=ue.status,ge.code=ke.Code,ge.requestId=ke.RequestId,ge.hostId=ke.HostId,ge.serverTime=ke.ServerTime;case 32:return this.debug("generate error %j",ge,"error"),Z.abrupt("return",ge);case 34:case"end":return Z.stop()}},le,this,[[7,16]])}));function be(le){return ve.apply(this,arguments)}return be}()}).call(this)}).call(this,{isBuffer:o("../../node_modules/is-buffer/index.js")},o("_process"))},{"../../node_modules/is-buffer/index.js":366,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":49,"../common/signUtils":50,"../common/utils/createRequest":56,"../common/utils/encoder":59,"../common/utils/isFunction":68,"../common/utils/retry":74,"../common/utils/setSTSToken":76,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,agentkeepalive:81,bowser:88,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.split.js":307,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.js":313,debug:465,"merge-descriptors":372,platform:379,urllib:475,utility:474,xml2js:426}],4:[function(o,_,j){(function(h){(function(){"use strict";var d=o("@babel/runtime/helpers/interopRequireDefault"),p=d(o("@babel/runtime/regenerator"));o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.typed-array.uint8-array.js"),o("core-js/modules/es.typed-array.copy-within.js"),o("core-js/modules/es.typed-array.every.js"),o("core-js/modules/es.typed-array.fill.js"),o("core-js/modules/es.typed-array.filter.js"),o("core-js/modules/es.typed-array.find.js"),o("core-js/modules/es.typed-array.find-index.js"),o("core-js/modules/es.typed-array.for-each.js"),o("core-js/modules/es.typed-array.includes.js"),o("core-js/modules/es.typed-array.index-of.js"),o("core-js/modules/es.typed-array.iterator.js"),o("core-js/modules/es.typed-array.join.js"),o("core-js/modules/es.typed-array.last-index-of.js"),o("core-js/modules/es.typed-array.map.js"),o("core-js/modules/es.typed-array.reduce.js"),o("core-js/modules/es.typed-array.reduce-right.js"),o("core-js/modules/es.typed-array.reverse.js"),o("core-js/modules/es.typed-array.set.js"),o("core-js/modules/es.typed-array.slice.js"),o("core-js/modules/es.typed-array.some.js"),o("core-js/modules/es.typed-array.sort.js"),o("core-js/modules/es.typed-array.subarray.js"),o("core-js/modules/es.typed-array.to-locale-string.js"),o("core-js/modules/es.typed-array.to-string.js");var b=d(o("@babel/runtime/helpers/asyncToGenerator")),g=o("util"),w=o("path"),c=o("mime"),m=o("copy-to"),v=o("../common/utils/isBlob"),y=v.isBlob,E=o("../common/utils/isFile"),T=E.isFile,S=o("../common/utils/isBuffer"),C=S.isBuffer,x=j;x.multipartUpload=function(){var B=(0,b.default)(p.default.mark(function D(L,q){var G,F,N,K,re,ne,pe,ie,Ae,Y=arguments;return p.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(G=Y.length>2&&Y[2]!==void 0?Y[2]:{},this.resetCancelFlag(),G.disabledMD5=G.disabledMD5===void 0?!0:!!G.disabledMD5,!(G.checkpoint&&G.checkpoint.uploadId)){ve.next=8;break}return q&&T(q)&&(G.checkpoint.file=q),ve.next=7,this._resumeMultipart(G.checkpoint,G);case 7:return ve.abrupt("return",ve.sent);case 8:return F=102400,G.mime||(T(q)?G.mime=c.getType(w.extname(q.name)):y(q)?G.mime=q.type:C(q)?G.mime="":G.mime=c.getType(w.extname(q))),G.headers=G.headers||{},this._convertMetaToHeaders(G.meta,G.headers),ve.next=14,this._getFileSize(q);case 14:if(N=ve.sent,!(N<F)){ve.next=26;break}return G.contentLength=N,ve.next=19,this.put(L,q,G);case 19:if(K=ve.sent,!(G&&G.progress)){ve.next=23;break}return ve.next=23,G.progress(1);case 23:return re={res:K.res,bucket:this.options.bucket,name:L,etag:K.res.headers.etag},(G.headers&&G.headers["x-oss-callback"]||G.callback)&&(re.data=K.data),ve.abrupt("return",re);case 26:if(!(G.partSize&&parseInt(G.partSize,10)!==G.partSize)){ve.next=28;break}throw new Error("partSize must be int number");case 28:if(!(G.partSize&&G.partSize<F)){ve.next=30;break}throw new Error("partSize must not be smaller than ".concat(F));case 30:return ve.next=32,this.initMultipartUpload(L,G);case 32:if(ne=ve.sent,pe=ne.uploadId,ie=this._getPartSize(N,G.partSize),Ae={file:q,name:L,fileSize:N,partSize:ie,uploadId:pe,doneParts:[]},!(G&&G.progress)){ve.next=39;break}return ve.next=39,G.progress(0,Ae,ne.res);case 39:return ve.next=41,this._resumeMultipart(Ae,G);case 41:return ve.abrupt("return",ve.sent);case 42:case"end":return ve.stop()}},D,this)}));function k(D,L){return B.apply(this,arguments)}return k}(),x._resumeMultipart=function(){var B=(0,b.default)(p.default.mark(function D(L,q){var G,F,N,K,re,ne,pe,ie,Ae,Y,fe,ve,be,le,ue,ge,Ee,ke,Ie;return p.default.wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(G=this,!this.isCancel()){Z.next=3;break}throw this._makeCancelEvent();case 3:return F=L.file,N=L.fileSize,K=L.partSize,re=L.uploadId,ne=L.doneParts,pe=L.name,ie=[],ne.length>0&&m(ne).to(ie),Ae=this._divideParts(N,K),Y=Ae.length,fe=!1,ve=function(V,Q){return new Promise(function(){var U=(0,b.default)(p.default.mark(function H(ee,W){var M,$,ce,Ce,Ue;return p.default.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(he.prev=0,V.isCancel()){he.next=29;break}return M=Ae[Q-1],he.next=5,V._createBuffer(F,M.start,M.end);case 5:return $=he.sent,ce={content:$,size:M.end-M.start},he.prev=7,he.next=10,V._uploadPart(pe,re,Q,ce,q);case 10:Ce=he.sent,he.next=18;break;case 13:if(he.prev=13,he.t0=he.catch(7),he.t0.status!==404){he.next=17;break}throw V._makeAbortEvent();case 17:throw he.t0;case 18:if(!(!V.isCancel()&&!fe)){he.next=26;break}if(L.doneParts.push({number:Q,etag:Ce.res.headers.etag}),!q.progress){he.next=23;break}return he.next=23,q.progress(ne.length/(Y+1),L,Ce.res);case 23:ee({number:Q,etag:Ce.res.headers.etag}),he.next=27;break;case 26:ee();case 27:he.next=30;break;case 29:ee();case 30:he.next=41;break;case 32:he.prev=32,he.t1=he.catch(0),Ue=new Error,Ue.name=he.t1.name,Ue.message=he.t1.message,Ue.stack=he.t1.stack,Ue.partNum=Q,m(he.t1).to(Ue),W(Ue);case 41:case"end":return he.stop()}},H,null,[[0,32],[7,13]])}));return function(H,ee){return U.apply(this,arguments)}}())},be=Array.from(new Array(Y),function(ye,V){return V+1}),le=ie.map(function(ye){return ye.number}),ue=be.filter(function(ye){return le.indexOf(ye)<0}),ge=5,Ee=q.parallel||ge,Z.next=17,this._parallel(ue,Ee,function(ye){return new Promise(function(V,Q){ve(G,ye).then(function(U){U&&ie.push(U),V()}).catch(function(U){Q(U)})})});case 17:if(ke=Z.sent,fe=!0,Ie=ke.find(function(ye){return ye.name==="abort"}),!Ie){Z.next=22;break}throw Ie;case 22:if(!this.isCancel()){Z.next=25;break}throw ve=null,this._makeCancelEvent();case 25:if(!(ke&&ke.length>0)){Z.next=28;break}throw ke[0].message="Failed to upload some parts with error: ".concat(ke[0].toString()," part_num: ").concat(ke[0].partNum),ke[0];case 28:return Z.next=30,this.completeMultipartUpload(pe,re,ie,q);case 30:return Z.abrupt("return",Z.sent);case 31:case"end":return Z.stop()}},D,this)}));function k(D,L){return B.apply(this,arguments)}return k}(),x._getFileSize=function(){var B=(0,b.default)(p.default.mark(function D(L){return p.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:if(!C(L)){G.next=4;break}return G.abrupt("return",L.length);case 4:if(!(y(L)||T(L))){G.next=6;break}return G.abrupt("return",L.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return G.stop()}},D)}));function k(D){return B.apply(this,arguments)}return k}();var O=o("stream"),J=O.Readable;function P(B,k){if(!(this instanceof P))return new P(B,k);J.call(this,k),this.file=B,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}g.inherits(P,J),P.prototype.readFileAndPush=function(k){if(this.fileBuffer)for(var D=!0;D&&this.fileBuffer&&this.start<this.fileBuffer.length;){var L=this.start,q=L+k;q=q>this.fileBuffer.length?this.fileBuffer.length:q,this.start=q,D=this.push(this.fileBuffer.slice(L,q))}},P.prototype._read=function(k){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var D=16*1024;k=k||D;var L=this;this.reader.onload=function(G){L.fileBuffer=h.from(new Uint8Array(G.target.result)),L.file=null,L.readFileAndPush(k)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(k)};function X(B){return B.arrayBuffer?B.arrayBuffer():new Promise(function(k,D){var L=new FileReader;L.onload=function(q){k(q.target.result)},L.onerror=function(q){D(q)},L.readAsArrayBuffer(B)})}x._createBuffer=function(){var B=(0,b.default)(p.default.mark(function D(L,q,G){var F,N;return p.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(y(L)||T(L))){re.next=8;break}return F=L.slice(q,G),re.next=4,X(F);case 4:return N=re.sent,re.abrupt("return",h.from(N));case 8:if(!C(L)){re.next=12;break}return re.abrupt("return",L.subarray(q,G));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return re.stop()}},D)}));function k(D,L,q){return B.apply(this,arguments)}return k}(),x._getPartSize=function(k,D){var L=1e4,q=1*1024*1024;D||(D=q);var G=Math.ceil(k/L);return D<G&&(D=G,console.warn("partSize has been set to ".concat(D,", because the partSize you provided causes partNumber to be greater than 10,000"))),D},x._divideParts=function(k,D){for(var L=Math.ceil(k/D),q=[],G=0;G<L;G++){var F=D*G,N=Math.min(F+D,k);q.push({start:F,end:N})}return q}}).call(this)}).call(this,o("buffer").Buffer)},{"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,buffer:90,"copy-to":94,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,mime:374,path:378,stream:398,util:419}],5:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.number.constructor.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.promise.js");var d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("fs"),g=o("copy-to"),w=o("path"),c=o("mime"),m=o("../common/callback"),v=o("merge-descriptors"),y=o("../common/utils/isBlob"),E=y.isBlob,T=o("../common/utils/isFile"),S=T.isFile,C=o("../common/utils/isBuffer"),x=C.isBuffer,O=o("../common/utils/obj2xml"),J=O.obj2xml,P=j;P.append=function(){var X=(0,p.default)(d.default.mark(function k(D,L,q){var G;return d.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return q=q||{},q.position===void 0&&(q.position="0"),q.subres={append:"",position:q.position},q.method="POST",N.next=6,this.put(D,L,q);case 6:return G=N.sent,G.nextAppendPosition=G.res.headers["x-oss-next-append-position"],N.abrupt("return",G);case 9:case"end":return N.stop()}},k,this)}));function B(k,D,L){return X.apply(this,arguments)}return B}(),P.put=function(){var X=(0,p.default)(d.default.mark(function k(D,L,q){var G,F,N,K,re;return d.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(q=q||{},q.disabledMD5=q.disabledMD5===void 0?!0:!!q.disabledMD5,q.headers=q.headers||{},D=this._objectName(D),!x(L)){pe.next=8;break}G=L,pe.next=19;break;case 8:if(!(E(L)||S(L))){pe.next=18;break}return q.mime||(S(L)?q.mime=c.getType(w.extname(L.name)):q.mime=L.type),pe.next=12,this._createBuffer(L,0,L.size);case 12:return G=pe.sent,pe.next=15,this._getFileSize(L);case 15:q.contentLength=pe.sent,pe.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(q.meta,q.headers),F=q.method||"PUT",N=this._objectRequestParams(F,D,q),m.encodeCallback(N,q),N.mime=q.mime,N.disabledMD5=q.disabledMD5,N.content=G,N.successStatuses=[200],pe.next=29,this.request(N);case 29:return K=pe.sent,re={name:D,url:this._objectUrl(D),res:K.res},N.headers&&N.headers["x-oss-callback"]&&(re.data=JSON.parse(K.data.toString())),pe.abrupt("return",re);case 33:case"end":return pe.stop()}},k,this)}));function B(k,D,L){return X.apply(this,arguments)}return B}(),P.putStream=function(){var X=(0,p.default)(d.default.mark(function k(D,L,q){var G,F,N,K;return d.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return q=q||{},q.headers=q.headers||{},D=this._objectName(D),q.contentLength?q.headers["Content-Length"]=q.contentLength:q.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(q.meta,q.headers),G=q.method||"PUT",F=this._objectRequestParams(G,D,q),m.encodeCallback(F,q),F.mime=q.mime,F.stream=L,F.successStatuses=[200],ne.next=13,this.request(F);case 13:return N=ne.sent,K={name:D,url:this._objectUrl(D),res:N.res},F.headers&&F.headers["x-oss-callback"]&&(K.data=JSON.parse(N.data.toString())),ne.abrupt("return",K);case 17:case"end":return ne.stop()}},k,this)}));function B(k,D,L){return X.apply(this,arguments)}return B}(),v(P,o("../common/object/copyObject")),v(P,o("../common/object/getObjectTagging")),v(P,o("../common/object/putObjectTagging")),v(P,o("../common/object/deleteObjectTagging")),v(P,o("../common/image")),v(P,o("../common/object/getBucketVersions")),v(P,o("../common/object/getACL")),v(P,o("../common/object/putACL")),v(P,o("../common/object/head")),v(P,o("../common/object/delete")),v(P,o("../common/object/get")),v(P,o("../common/object/putSymlink")),v(P,o("../common/object/getSymlink")),v(P,o("../common/object/deleteMulti")),v(P,o("../common/object/getObjectMeta")),v(P,o("../common/object/getObjectUrl")),v(P,o("../common/object/generateObjectUrl")),v(P,o("../common/object/signatureUrl")),v(P,o("../common/object/asyncSignatureUrl")),P.putMeta=function(){var X=(0,p.default)(d.default.mark(function k(D,L,q){var G;return d.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,this.copy(D,D,{meta:L||{},timeout:q&&q.timeout,ctx:q&&q.ctx});case 2:return G=N.sent,N.abrupt("return",G);case 4:case"end":return N.stop()}},k,this)}));function B(k,D,L){return X.apply(this,arguments)}return B}(),P.list=function(){var X=(0,p.default)(d.default.mark(function k(D,L){var q,G,F,N,K;return d.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:return q=this._objectRequestParams("GET","",L),q.query=D,q.xmlResponse=!0,q.successStatuses=[200],ne.next=6,this.request(q);case 6:return G=ne.sent,F=G.data.Contents||[],N=this,F&&(Array.isArray(F)||(F=[F]),F=F.map(function(pe){return{name:pe.Key,url:N._objectUrl(pe.Key),lastModified:pe.LastModified,etag:pe.ETag,type:pe.Type,size:Number(pe.Size),storageClass:pe.StorageClass,owner:{id:pe.Owner.ID,displayName:pe.Owner.DisplayName}}})),K=G.data.CommonPrefixes||null,K&&(Array.isArray(K)||(K=[K]),K=K.map(function(pe){return pe.Prefix})),ne.abrupt("return",{res:G.res,objects:F,prefixes:K,nextMarker:G.data.NextMarker||null,isTruncated:G.data.IsTruncated==="true"});case 13:case"end":return ne.stop()}},k,this)}));function B(k,D){return X.apply(this,arguments)}return B}(),P.listV2=function(){var X=(0,p.default)(d.default.mark(function k(D){var L,q,G,F,N,K,re,ne=arguments;return d.default.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:return L=ne.length>1&&ne[1]!==void 0?ne[1]:{},q=D["continuation-token"]||D.continuationToken,q&&(L.subres=Object.assign({"continuation-token":q},L.subres)),G=this._objectRequestParams("GET","",L),G.query=Object.assign({"list-type":2},D),delete G.query["continuation-token"],delete G.query.continuationToken,G.xmlResponse=!0,G.successStatuses=[200],ie.next=11,this.request(G);case 11:return F=ie.sent,N=F.data.Contents||[],K=this,N&&(Array.isArray(N)||(N=[N]),N=N.map(function(Ae){var Y=null;return Ae.Owner&&(Y={id:Ae.Owner.ID,displayName:Ae.Owner.DisplayName}),{name:Ae.Key,url:K._objectUrl(Ae.Key),lastModified:Ae.LastModified,etag:Ae.ETag,type:Ae.Type,size:Number(Ae.Size),storageClass:Ae.StorageClass,owner:Y}})),re=F.data.CommonPrefixes||null,re&&(Array.isArray(re)||(re=[re]),re=re.map(function(Ae){return Ae.Prefix})),ie.abrupt("return",{res:F.res,objects:N,prefixes:re,isTruncated:F.data.IsTruncated==="true",keyCount:+F.data.KeyCount,continuationToken:F.data.ContinuationToken||null,nextContinuationToken:F.data.NextContinuationToken||null});case 18:case"end":return ie.stop()}},k,this)}));function B(k){return X.apply(this,arguments)}return B}(),P.restore=function(){var X=(0,p.default)(d.default.mark(function k(D){var L,q,G,F,N=arguments;return d.default.wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return L=N.length>1&&N[1]!==void 0?N[1]:{type:"Archive"},L=L||{},L.subres=Object.assign({restore:""},L.subres),L.versionId&&(L.subres.versionId=L.versionId),q=this._objectRequestParams("POST",D,L),L.type==="ColdArchive"&&(G={RestoreRequest:{Days:L.Days?L.Days:2,JobParameters:{Tier:L.JobParameters?L.JobParameters:"Standard"}}},q.content=J(G,{headers:!0}),q.mime="xml"),q.successStatuses=[202],re.next=9,this.request(q);case 9:return F=re.sent,re.abrupt("return",{res:F.res});case 11:case"end":return re.stop()}},k,this)}));function B(k){return X.apply(this,arguments)}return B}(),P._objectUrl=function(B){return this._getReqUrl({bucket:this.options.bucket,object:B})},P._objectRequestParams=function(B,k,D){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");D=D||{},k=this._objectName(k);var L={object:k,bucket:this.options.bucket,method:B,subres:D&&D.subres,timeout:D&&D.timeout,ctx:D&&D.ctx};return D.headers&&(L.headers={},g(D.headers).to(L.headers)),L},P._objectName=function(B){return B.replace(/^\/+/,"")},P._convertMetaToHeaders=function(B,k){B&&Object.keys(B).forEach(function(D){k["x-oss-meta-".concat(D)]=B[D]})},P._deleteFileSafe=function(B){var k=this;return new Promise(function(D){b.exists(B,function(L){L?b.unlink(B,function(q){q&&k.debug("unlink %j error: %s",B,q,"error"),D()}):D()})})}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signatureUrl":48,"../common/utils/isBlob":64,"../common/utils/isBuffer":65,"../common/utils/isFile":67,"../common/utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,fs:89,"merge-descriptors":372,mime:374,path:378}],6:[function(o,_,j){"use strict";j.version="6.18.1"},{}],7:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.abortBucketWorm=void 0;var b=o("../utils/checkBucketName");function g(c,m){return w.apply(this,arguments)}function w(){return w=(0,p.default)(d.default.mark(function c(m,v){var y,E;return d.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return b.checkBucketName(m),y=this._bucketRequestParams("DELETE",m,"worm",v),S.next=4,this.request(y);case 4:return E=S.sent,S.abrupt("return",{res:E.res,status:E.status});case 6:case"end":return S.stop()}},c,this)})),w.apply(this,arguments)}j.abortBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],8:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.completeBucketWorm=void 0;var b=o("../utils/checkBucketName");function g(c,m,v){return w.apply(this,arguments)}function w(){return w=(0,p.default)(d.default.mark(function c(m,v,y){var E,T;return d.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return b.checkBucketName(m),E=this._bucketRequestParams("POST",m,{wormId:v},y),C.next=4,this.request(E);case 4:return T=C.sent,C.abrupt("return",{res:T.res,status:T.status});case 6:case"end":return C.stop()}},c,this)})),w.apply(this,arguments)}j.completeBucketWorm=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],9:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.deleteBucketInventory=void 0;var b=o("../utils/checkBucketName");function g(c,m){return w.apply(this,arguments)}function w(){return w=(0,p.default)(d.default.mark(function c(m,v){var y,E,T,S,C=arguments;return d.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return y=C.length>2&&C[2]!==void 0?C[2]:{},E=Object.assign({inventory:"",inventoryId:v},y.subres),b.checkBucketName(m),T=this._bucketRequestParams("DELETE",m,E,y),T.successStatuses=[204],O.next=7,this.request(T);case 7:return S=O.sent,O.abrupt("return",{status:S.status,res:S.res});case 9:case"end":return O.stop()}},c,this)})),w.apply(this,arguments)}j.deleteBucketInventory=g},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],10:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=j;w.deleteBucketLifecycle=function(){var c=(0,p.default)(d.default.mark(function v(y,E){var T,S;return d.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return g(y),T=this._bucketRequestParams("DELETE",y,"lifecycle",E),T.successStatuses=[204],x.next=5,this.request(T);case 5:return S=x.sent,x.abrupt("return",{res:S.res});case 7:case"end":return x.stop()}},v,this)}));function m(v,y){return c.apply(this,arguments)}return m}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],11:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=j;w.deleteBucketWebsite=function(){var c=(0,p.default)(d.default.mark(function v(y,E){var T,S;return d.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return g(y),T=this._bucketRequestParams("DELETE",y,"website",E),T.successStatuses=[204],x.next=5,this.request(T);case 5:return S=x.sent,x.abrupt("return",{res:S.res});case 7:case"end":return x.stop()}},v,this)}));function m(v,y){return c.apply(this,arguments)}return m}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],12:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.extendBucketWorm=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/obj2xml");function w(m,v,y,E){return c.apply(this,arguments)}function c(){return c=(0,p.default)(d.default.mark(function m(v,y,E,T){var S,C,x;return d.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return b.checkBucketName(v),S=this._bucketRequestParams("POST",v,{wormExtend:"",wormId:y},T),C={ExtendWormConfiguration:{RetentionPeriodInDays:E}},S.mime="xml",S.content=g.obj2xml(C,{headers:!0}),S.successStatuses=[200],J.next=8,this.request(S);case 8:return x=J.sent,J.abrupt("return",{res:x.res,status:x.status});case 10:case"end":return J.stop()}},m,this)})),c.apply(this,arguments)}j.extendBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],13:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.getBucketInventory=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/formatInventoryConfig");function w(m,v){return c.apply(this,arguments)}function c(){return c=(0,p.default)(d.default.mark(function m(v,y){var E,T,S,C,x=arguments;return d.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return E=x.length>2&&x[2]!==void 0?x[2]:{},T=Object.assign({inventory:"",inventoryId:y},E.subres),b.checkBucketName(v),S=this._bucketRequestParams("GET",v,T,E),S.successStatuses=[200],S.xmlResponse=!0,J.next=8,this.request(S);case 8:return C=J.sent,J.abrupt("return",{status:C.status,res:C.res,inventory:g.formatInventoryConfig(C.data)});case 10:case"end":return J.stop()}},m,this)})),c.apply(this,arguments)}j.getBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],14:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.map.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/isArray"),c=w.isArray,m=o("../utils/formatObjKey"),v=m.formatObjKey,y=j;y.getBucketLifecycle=function(){var E=(0,p.default)(d.default.mark(function S(C,x){var O,J,P;return d.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return g(C),O=this._bucketRequestParams("GET",C,"lifecycle",x),O.successStatuses=[200],O.xmlResponse=!0,B.next=6,this.request(O);case 6:return J=B.sent,P=J.data.Rule||null,P&&(c(P)||(P=[P]),P=P.map(function(k){return k.ID&&(k.id=k.ID,delete k.ID),k.Tag&&!c(k.Tag)&&(k.Tag=[k.Tag]),v(k,"firstLowerCase")})),B.abrupt("return",{rules:P,res:J.res});case 10:case"end":return B.stop()}},S,this)}));function T(S,C){return E.apply(this,arguments)}return T}()},{"../utils/checkBucketName":51,"../utils/formatObjKey":61,"../utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280}],15:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=j;w.getBucketVersioning=function(){var c=(0,p.default)(d.default.mark(function v(y,E){var T,S,C;return d.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return g(y),T=this._bucketRequestParams("GET",y,"versioning",E),T.xmlResponse=!0,T.successStatuses=[200],O.next=6,this.request(T);case 6:return S=O.sent,C=S.data.Status,O.abrupt("return",{status:S.status,versionStatus:C,res:S.res});case 9:case"end":return O.stop()}},v,this)}));function m(v,y){return c.apply(this,arguments)}return m}()},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],16:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/isObject"),c=w.isObject,m=j;m.getBucketWebsite=function(){var v=(0,p.default)(d.default.mark(function E(T,S){var C,x,O;return d.default.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return g(T),C=this._bucketRequestParams("GET",T,"website",S),C.successStatuses=[200],C.xmlResponse=!0,P.next=6,this.request(C);case 6:return x=P.sent,O=[],x.data.RoutingRules&&x.data.RoutingRules.RoutingRule&&(c(x.data.RoutingRules.RoutingRule)?O=[x.data.RoutingRules.RoutingRule]:O=x.data.RoutingRules.RoutingRule),P.abrupt("return",{index:x.data.IndexDocument&&x.data.IndexDocument.Suffix||"",supportSubDir:x.data.IndexDocument&&x.data.IndexDocument.SupportSubDir||"false",type:x.data.IndexDocument&&x.data.IndexDocument.Type,routingRules:O,error:x.data.ErrorDocument&&x.data.ErrorDocument.Key||null,res:x.res});case 10:case"end":return P.stop()}},E,this)}));function y(E,T){return v.apply(this,arguments)}return y}()},{"../utils/checkBucketName":51,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],17:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.getBucketWorm=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/dataFix");function w(m,v){return c.apply(this,arguments)}function c(){return c=(0,p.default)(d.default.mark(function m(v,y){var E,T;return d.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return b.checkBucketName(v),E=this._bucketRequestParams("GET",v,"worm",y),E.successStatuses=[200],E.xmlResponse=!0,C.next=6,this.request(E);case 6:return T=C.sent,g.dataFix(T.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),C.abrupt("return",Object.assign(Object.assign({},T.data),{res:T.res,status:T.status}));case 9:case"end":return C.stop()}},m,this)})),c.apply(this,arguments)}j.getBucketWorm=w},{"../utils/checkBucketName":51,"../utils/dataFix":57,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],18:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.initiateBucketWorm=void 0;var b=o("../utils/obj2xml"),g=o("../utils/checkBucketName");function w(m,v,y){return c.apply(this,arguments)}function c(){return c=(0,p.default)(d.default.mark(function m(v,y,E){var T,S,C;return d.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return g.checkBucketName(v),T=this._bucketRequestParams("POST",v,"worm",E),S={InitiateWormConfiguration:{RetentionPeriodInDays:y}},T.mime="xml",T.content=b.obj2xml(S,{headers:!0}),T.successStatuses=[200],O.next=8,this.request(T);case 8:return C=O.sent,O.abrupt("return",{res:C.res,wormId:C.res.headers["x-oss-worm-id"],status:C.status});case 10:case"end":return O.stop()}},m,this)})),c.apply(this,arguments)}j.initiateBucketWorm=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],19:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.listBucketInventory=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/formatInventoryConfig");function w(m){return c.apply(this,arguments)}function c(){return c=(0,p.default)(d.default.mark(function m(v){var y,E,T,S,C,x,O,J,P=arguments;return d.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return y=P.length>1&&P[1]!==void 0?P[1]:{},E=y.continuationToken,T=Object.assign({inventory:""},E&&{"continuation-token":E},y.subres),b.checkBucketName(v),S=this._bucketRequestParams("GET",v,T,y),S.successStatuses=[200],S.xmlResponse=!0,B.next=9,this.request(S);case 9:return C=B.sent,x=C.data,O=C.res,J=C.status,B.abrupt("return",{isTruncated:x.IsTruncated==="true",nextContinuationToken:x.NextContinuationToken,inventoryList:g.formatInventoryConfig(x.InventoryConfiguration,!0),status:J,res:O});case 12:case"end":return B.stop()}},m,this)})),c.apply(this,arguments)}j.listBucketInventory=w},{"../utils/checkBucketName":51,"../utils/formatInventoryConfig":60,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],20:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.concat.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.putBucketInventory=void 0;var b=o("../utils/checkBucketName"),g=o("../utils/obj2xml");function w(m,v){return c.apply(this,arguments)}function c(){return c=(0,p.default)(d.default.mark(function m(v,y){var E,T,S,C,x,O,J,P,X,B,k,D=arguments;return d.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return E=D.length>2&&D[2]!==void 0?D[2]:{},T=Object.assign({inventory:"",inventoryId:y.id},E.subres),b.checkBucketName(v),S=y.OSSBucketDestination,C=y.optionalFields,x=y.includedObjectVersions,O="acs:oss:::",J="acs:ram::".concat(S.accountId,":role/"),P={InventoryConfiguration:{Id:y.id,IsEnabled:y.isEnabled,Filter:{Prefix:y.prefix||""},Destination:{OSSBucketDestination:{Format:S.format,AccountId:S.accountId,RoleArn:"".concat(J).concat(S.rolename),Bucket:"".concat(O).concat(S.bucket),Prefix:S.prefix||"",Encryption:S.encryption||""}},Schedule:{Frequency:y.frequency},IncludedObjectVersions:x,OptionalFields:{Field:(C==null?void 0:C.field)||[]}}},X=g.obj2xml(P,{headers:!0,firstUpperCase:!0}),B=this._bucketRequestParams("PUT",v,T,E),B.successStatuses=[200],B.mime="xml",B.content=X,q.next=14,this.request(B);case 14:return k=q.sent,q.abrupt("return",{status:k.status,res:k.res});case 16:case"end":return q.stop()}},m,this)})),c.apply(this,arguments)}j.putBucketInventory=w},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287}],21:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.array.includes.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/isArray"),c=w.isArray,m=o("../utils/deepCopy"),v=m.deepCopy,y=o("../utils/isObject"),E=y.isObject,T=o("../utils/obj2xml"),S=T.obj2xml,C=o("../utils/checkObjectTag"),x=C.checkObjectTag,O=o("../utils/getStrBytesCount"),J=O.getStrBytesCount,P=j;P.putBucketLifecycle=function(){var L=(0,p.default)(d.default.mark(function G(F,N,K){var re,ne,pe,ie,Ae;return d.default.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(g(F),c(N)){fe.next=3;break}throw new Error("rules must be Array");case 3:return re=this._bucketRequestParams("PUT",F,"lifecycle",K),ne=[],pe={LifecycleConfiguration:{Rule:ne}},N.forEach(function(ve){X(ve),D(ve),ve.id&&(ve.ID=ve.id,delete ve.id),ne.push(ve)}),ie=S(pe,{headers:!0,firstUpperCase:!0}),re.content=ie,re.mime="xml",re.successStatuses=[200],fe.next=13,this.request(re);case 13:return Ae=fe.sent,fe.abrupt("return",{res:Ae.res});case 15:case"end":return fe.stop()}},G,this)}));function q(G,F,N){return L.apply(this,arguments)}return q}();function X(L){L.days&&(L.expiration={days:L.days}),L.date&&(L.expiration={createdBeforeDate:L.date})}function B(L,q){var G=L.days,F=L.createdBeforeDate;if(!G&&!F)throw new Error("".concat(q," must includes days or createdBeforeDate"));if(G&&!/^[1-9][0-9]*$/.test(G))throw new Error("days must be a positive integer");if(F&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(F))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function k(L){if(!c(L)&&!E(L))throw new Error("tag must be Object or Array");L=E(L)?[L]:L;var q={},G=v(L);G.forEach(function(F){q[F.key]=F.value}),x(q)}function D(L){if(L.id&&J(L.id)>255)throw new Error("ID is composed of 255 bytes at most");if(L.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(L.status))throw new Error("Status must be Enabled or Disabled");if(L.transition){if(!["IA","Archive"].includes(L.transition.storageClass))throw new Error("StorageClass must be IA or Archive");B(L.transition,"Transition")}if(L.expiration){if(!L.expiration.expiredObjectDeleteMarker)B(L.expiration,"Expiration");else if(L.expiration.days||L.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(L.abortMultipartUpload&&B(L.abortMultipartUpload,"AbortMultipartUpload"),!L.expiration&&!L.abortMultipartUpload&&!L.transition&&!L.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(L.tag){if(L.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");k(L.tag)}}},{"../utils/checkBucketName":51,"../utils/checkObjectTag":54,"../utils/deepCopy":58,"../utils/getStrBytesCount":62,"../utils/isArray":63,"../utils/isObject":70,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],22:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.includes.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/obj2xml"),c=w.obj2xml,m=j;m.putBucketVersioning=function(){var v=(0,p.default)(d.default.mark(function E(T,S){var C,x,O,J,P=arguments;return d.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:if(C=P.length>2&&P[2]!==void 0?P[2]:{},g(T),["Enabled","Suspended"].includes(S)){B.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return x=this._bucketRequestParams("PUT",T,"versioning",C),O={VersioningConfiguration:{Status:S}},x.mime="xml",x.content=c(O,{headers:!0}),B.next=10,this.request(x);case 10:return J=B.sent,B.abrupt("return",{res:J.res,status:J.status});case 12:case"end":return B.stop()}},E,this)}));function y(E,T){return v.apply(this,arguments)}return y}()},{"../utils/checkBucketName":51,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.includes.js":277}],23:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("../utils/obj2xml"),c=w.obj2xml,m=o("../utils/isArray"),v=m.isArray,y=j;y.putBucketWebsite=function(){var E=(0,p.default)(d.default.mark(function S(C){var x,O,J,P,X,B,k,D=arguments;return d.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(x=D.length>1&&D[1]!==void 0?D[1]:{},O=D.length>2?D[2]:void 0,g(C),J=this._bucketRequestParams("PUT",C,"website",O),P={Suffix:x.index||"index.html"},X={IndexDocument:P},B={WebsiteConfiguration:X},x.supportSubDir&&(P.SupportSubDir=x.supportSubDir),x.type&&(P.Type=x.type),x.error&&(X.ErrorDocument={Key:x.error}),x.routingRules===void 0){q.next=14;break}if(v(x.routingRules)){q.next=13;break}throw new Error("RoutingRules must be Array");case 13:X.RoutingRules={RoutingRule:x.routingRules};case 14:return B=c(B),J.content=B,J.mime="xml",J.successStatuses=[200],q.next=20,this.request(J);case 20:return k=q.sent,q.abrupt("return",{res:k.res});case 22:case"end":return q.stop()}},S,this)}));function T(S){return E.apply(this,arguments)}return T}()},{"../utils/checkBucketName":51,"../utils/isArray":63,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80}],24:[function(o,_,j){(function(h){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),j.encodeCallback=function(p,b){if(p.headers=p.headers||{},!Object.prototype.hasOwnProperty.call(p.headers,"x-oss-callback")&&b.callback){var g={callbackUrl:encodeURI(b.callback.url),callbackBody:b.callback.body};b.callback.host&&(g.callbackHost=b.callback.host),b.callback.contentType&&(g.callbackBodyType=b.callback.contentType);var w=h.from(JSON.stringify(g)).toString("base64");if(p.headers["x-oss-callback"]=w,b.callback.customValue){var c={};Object.keys(b.callback.customValue).forEach(function(m){c["x:".concat(m)]=b.callback.customValue[m].toString()}),p.headers["x-oss-callback-var"]=h.from(JSON.stringify(c)).toString("base64")}}}}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/web.dom-collections.for-each.js":339}],25:[function(o,_,j){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js");var h=function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(j,"__esModule",{value:!0}),j.getReqUrl=void 0;var d=h(o("copy-to")),p=h(o("url")),b=h(o("merge-descriptors")),g=h(o("is-type-of")),w=o("../utils/isIP"),c=o("../utils/checkConfigValid");function m(v){var y={},E=this.options.cname;c.checkConfigValid(this.options.endpoint,"endpoint"),d.default(this.options.endpoint,!1).to(y),v.bucket&&!E&&!w.isIP(y.hostname)&&!this.options.sldEnable&&(y.host="".concat(v.bucket,".").concat(y.host));var T="/";v.bucket&&this.options.sldEnable&&(T+="".concat(v.bucket,"/")),v.object&&(T+=this._escape(v.object).replace(/\+/g,"%2B")),y.pathname=T;var S={};if(v.query&&b.default(S,v.query),v.subres){var C={};g.default.string(v.subres)?C[v.subres]="":g.default.array(v.subres)?v.subres.forEach(function(x){C[x]=""}):C=v.subres,b.default(S,C)}return y.query=S,p.default.format(y)}j.getReqUrl=m},{"../utils/checkConfigValid":52,"../utils/isIP":69,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466,"merge-descriptors":372,url:472}],26:[function(o,_,j){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.string.trim.js");var h=o("humanize-ms"),d=o("url"),p=o("../utils/checkBucketName"),b=p.checkBucketName,g=o("../utils/setRegion"),w=g.setRegion,c=o("../utils/checkConfigValid"),m=c.checkConfigValid;function v(y,E){m(y,"endpoint");var T=d.parse(y);if(T.protocol||(T=d.parse("http".concat(E?"s":"","://").concat(y))),T.protocol!=="http:"&&T.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return T}_.exports=function(y){if(!y||!y.accessKeyId||!y.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");y.stsToken&&!y.refreshSTSToken&&!y.refreshSTSTokenInterval&&console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken\u3001accessKeyId\u3001accessKeySecret automatically when sts token has expired"),y.bucket&&b(y.bucket);var E=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:6e4*5,retryMax:0},y);if(E.accessKeyId=E.accessKeyId.trim(),E.accessKeySecret=E.accessKeySecret.trim(),E.timeout&&(E.timeout=h(E.timeout)),E.endpoint)E.endpoint=v(E.endpoint,E.secure);else if(E.region)E.endpoint=w(E.region,E.internal,E.secure);else throw new Error("require options.endpoint or options.region");return E.inited=!0,E}},{"../utils/checkBucketName":51,"../utils/checkConfigValid":52,"../utils/setRegion":75,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.trim.js":308,"humanize-ms":356,url:472}],27:[function(o,_,j){"use strict";var h=o("merge-descriptors"),d=j;h(d,o("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":372}],28:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.concat.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkBucketName"),g=b.checkBucketName,w=o("querystring"),c=o("js-base64"),m=c.Base64.encode,v=j;v.processObjectSave=function(){var E=(0,p.default)(d.default.mark(function S(C,x,O,J){var P,X,B,k;return d.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return y(C,"sourceObject"),y(x,"targetObject"),y(O,"process"),x=this._objectName(x),J&&g(J),P=this._objectRequestParams("POST",C,{subres:"x-oss-process"}),X=J?",b_".concat(m(J)):"",x=m(x),B={"x-oss-process":"".concat(O,"|sys/saveas,o_").concat(x).concat(X)},P.content=w.stringify(B),L.next=12,this.request(P);case 12:return k=L.sent,L.abrupt("return",{res:k.res,status:k.res.status});case 14:case"end":return L.stop()}},S,this)}));function T(S,C,x,O){return E.apply(this,arguments)}return T}();function y(E,T){if(!E)throw new Error("".concat(T," is required"));if(typeof E!="string")throw new Error("".concat(T," must be String"))}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"js-base64":371,querystring:385}],29:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.regexp.to-string.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("debug")("ali-oss:multipart-copy"),g=o("copy-to"),w=j;w.uploadPartCopy=function(){var c=(0,p.default)(d.default.mark(function v(y,E,T,S,C){var x,O,J,P,X,B=arguments;return d.default.wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return x=B.length>5&&B[5]!==void 0?B[5]:{},x.headers=x.headers||{},O=x.versionId||x.subres&&x.subres.versionId||null,O?J="/".concat(C.sourceBucketName,"/").concat(encodeURIComponent(C.sourceKey),"?versionId=").concat(O):J="/".concat(C.sourceBucketName,"/").concat(encodeURIComponent(C.sourceKey)),x.headers["x-oss-copy-source"]=J,S&&(x.headers["x-oss-copy-source-range"]="bytes=".concat(S)),x.subres={partNumber:T,uploadId:E},P=this._objectRequestParams("PUT",y,x),P.mime=x.mime,P.successStatuses=[200],D.next=12,this.request(P);case 12:return X=D.sent,D.abrupt("return",{name:y,etag:X.res.headers.etag,res:X.res});case 14:case"end":return D.stop()}},v,this)}));function m(v,y,E,T,S){return c.apply(this,arguments)}return m}(),w.multipartUploadCopy=function(){var c=(0,p.default)(d.default.mark(function v(y,E){var T,S,C,x,O,J,P,X,B,k,D,L,q=arguments;return d.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return T=q.length>2&&q[2]!==void 0?q[2]:{},this.resetCancelFlag(),S=T.versionId,C=S===void 0?null:S,x={versionId:C},F.next=6,this._getObjectMeta(E.sourceBucketName,E.sourceKey,x);case 6:if(O=F.sent,J=O.res.headers["content-length"],E.startOffset=E.startOffset||0,E.endOffset=E.endOffset||J,!(T.checkpoint&&T.checkpoint.uploadId)){F.next=14;break}return F.next=13,this._resumeMultipartCopy(T.checkpoint,E,T);case 13:return F.abrupt("return",F.sent);case 14:if(P=102400,X=E.endOffset-E.startOffset,!(X<P)){F.next=18;break}throw new Error("copySize must not be smaller than ".concat(P));case 18:if(!(T.partSize&&T.partSize<P)){F.next=20;break}throw new Error("partSize must not be smaller than ".concat(P));case 20:return F.next=22,this.initMultipartUpload(y,T);case 22:if(B=F.sent,k=B.uploadId,D=this._getPartSize(X,T.partSize),L={name:y,copySize:X,partSize:D,uploadId:k,doneParts:[]},!(T&&T.progress)){F.next=29;break}return F.next=29,T.progress(0,L,B.res);case 29:return F.next=31,this._resumeMultipartCopy(L,E,T);case 31:return F.abrupt("return",F.sent);case 32:case"end":return F.stop()}},v,this)}));function m(v,y){return c.apply(this,arguments)}return m}(),w._resumeMultipartCopy=function(){var c=(0,p.default)(d.default.mark(function v(y,E,T){var S,C,x,O,J,P,X,B,k,D,L,q,G,F,N,K,re,ne,pe,ie,Ae;return d.default.wrap(function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(!this.isCancel()){fe.next=2;break}throw this._makeCancelEvent();case 2:if(S=T.versionId,C=S===void 0?null:S,x={versionId:C},O=y.copySize,J=y.partSize,P=y.uploadId,X=y.doneParts,B=y.name,k=this._divideMultipartCopyParts(O,J,E.startOffset),D=k.length,L={headers:{}},T.copyheaders&&g(T.copyheaders).to(L.headers),C&&g(x).to(L),q=function(be,le,ue){return new Promise(function(){var ge=(0,p.default)(d.default.mark(function Ee(ke,Ie){var de,Z,ye;return d.default.wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:if(Q.prev=0,be.isCancel()){Q.next=22;break}return de=k[le-1],Z="".concat(de.start,"-").concat(de.end-1),Q.prev=4,Q.next=7,be.uploadPartCopy(B,P,le,Z,ue,L);case 7:ye=Q.sent,Q.next=15;break;case 10:if(Q.prev=10,Q.t0=Q.catch(4),Q.t0.status!==404){Q.next=14;break}throw be._makeAbortEvent();case 14:throw Q.t0;case 15:if(be.isCancel()){Q.next=22;break}if(b("content-range ".concat(ye.res.headers["content-range"])),X.push({number:le,etag:ye.res.headers.etag}),y.doneParts=X,!(T&&T.progress)){Q.next=22;break}return Q.next=22,T.progress(X.length/D,y,ye.res);case 22:ke(),Q.next=29;break;case 25:Q.prev=25,Q.t1=Q.catch(0),Q.t1.partNum=le,Ie(Q.t1);case 29:case"end":return Q.stop()}},Ee,null,[[0,25],[4,10]])}));return function(Ee,ke){return ge.apply(this,arguments)}}())},G=Array.from(new Array(D),function(ve,be){return be+1}),F=X.map(function(ve){return ve.number}),N=G.filter(function(ve){return F.indexOf(ve)<0}),K=5,re=T.parallel||K,!(this.checkBrowserAndVersion("Internet Explorer","10")||re===1)){fe.next=28;break}ne=0;case 18:if(!(ne<N.length)){fe.next=26;break}if(!this.isCancel()){fe.next=21;break}throw this._makeCancelEvent();case 21:return fe.next=23,q(this,N[ne],E);case 23:ne++,fe.next=18;break;case 26:fe.next=40;break;case 28:return fe.next=30,this._parallelNode(N,re,q,E);case 30:if(pe=fe.sent,ie=pe.find(function(ve){return ve.name==="abort"}),!ie){fe.next=34;break}throw ie;case 34:if(!this.isCancel()){fe.next=36;break}throw this._makeCancelEvent();case 36:if(!(pe&&pe.length>0)){fe.next=40;break}throw Ae=pe[0],Ae.message="Failed to copy some parts with error: ".concat(Ae.toString()," part_num: ").concat(Ae.partNum),Ae;case 40:return fe.next=42,this.completeMultipartUpload(B,P,X,T);case 42:return fe.abrupt("return",fe.sent);case 43:case"end":return fe.stop()}},v,this)}));function m(v,y,E){return c.apply(this,arguments)}return m}(),w._divideMultipartCopyParts=function(m,v,y){for(var E=Math.ceil(m/v),T=[],S=0;S<E;S++){var C=v*S+y,x=Math.min(C+v,m+y);T.push({start:C,end:x})}return T},w._getObjectMeta=function(){var c=(0,p.default)(d.default.mark(function v(y,E,T){var S,C;return d.default.wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return S=this.getBucket(),this.setBucket(y),O.next=4,this.head(E,T);case 4:return C=O.sent,this.setBucket(S),O.abrupt("return",C);case 7:case"end":return O.stop()}},v,this)}));function m(v,y,E){return c.apply(this,arguments)}return m}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.iterator.js":303,debug:465}],30:[function(o,_,j){(function(h){(function(){"use strict";var d=o("@babel/runtime/helpers/interopRequireDefault"),p=d(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.map.js"),o("core-js/modules/es.array.filter.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.array.sort.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js");var b=d(o("@babel/runtime/helpers/asyncToGenerator")),g=o("copy-to"),w=o("./callback"),c=o("./utils/deepCopy"),m=c.deepCopyWith,v=o("./utils/isBuffer"),y=v.isBuffer,E=o("./utils/omit"),T=E.omit,S=j;S.listUploads=function(){var C=(0,b.default)(p.default.mark(function O(J,P){var X,B,k,D;return p.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return P=P||{},X={},g(P).to(X),X.subres="uploads",B=this._objectRequestParams("GET","",X),B.query=J,B.xmlResponse=!0,B.successStatuses=[200],q.next=10,this.request(B);case 10:return k=q.sent,D=k.data.Upload||[],Array.isArray(D)||(D=[D]),D=D.map(function(G){return{name:G.Key,uploadId:G.UploadId,initiated:G.Initiated}}),q.abrupt("return",{res:k.res,uploads:D,bucket:k.data.Bucket,nextKeyMarker:k.data.NextKeyMarker,nextUploadIdMarker:k.data.NextUploadIdMarker,isTruncated:k.data.IsTruncated==="true"});case 15:case"end":return q.stop()}},O,this)}));function x(O,J){return C.apply(this,arguments)}return x}(),S.listParts=function(){var C=(0,b.default)(p.default.mark(function O(J,P,X,B){var k,D,L;return p.default.wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return B=B||{},k={},g(B).to(k),k.subres={uploadId:P},D=this._objectRequestParams("GET",J,k),D.query=X,D.xmlResponse=!0,D.successStatuses=[200],G.next=10,this.request(D);case 10:return L=G.sent,G.abrupt("return",{res:L.res,uploadId:L.data.UploadId,bucket:L.data.Bucket,name:L.data.Key,partNumberMarker:L.data.PartNumberMarker,nextPartNumberMarker:L.data.NextPartNumberMarker,maxParts:L.data.MaxParts,isTruncated:L.data.IsTruncated,parts:L.data.Part||[]});case 12:case"end":return G.stop()}},O,this)}));function x(O,J,P,X){return C.apply(this,arguments)}return x}(),S.abortMultipartUpload=function(){var C=(0,b.default)(p.default.mark(function O(J,P,X){var B,k,D;return p.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return this._stop(),X=X||{},B={},g(X).to(B),B.subres={uploadId:P},k=this._objectRequestParams("DELETE",J,B),k.successStatuses=[204],q.next=9,this.request(k);case 9:return D=q.sent,q.abrupt("return",{res:D.res});case 11:case"end":return q.stop()}},O,this)}));function x(O,J,P){return C.apply(this,arguments)}return x}(),S.initMultipartUpload=function(){var C=(0,b.default)(p.default.mark(function O(J,P){var X,B,k;return p.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return P=P||{},X={},g(P).to(X),X.headers=X.headers||{},this._convertMetaToHeaders(P.meta,X.headers),X.subres="uploads",B=this._objectRequestParams("POST",J,X),B.mime=P.mime,B.xmlResponse=!0,B.successStatuses=[200],L.next=12,this.request(B);case 12:return k=L.sent,L.abrupt("return",{res:k.res,bucket:k.data.Bucket,name:k.data.Key,uploadId:k.data.UploadId});case 14:case"end":return L.stop()}},O,this)}));function x(O,J){return C.apply(this,arguments)}return x}(),S.uploadPart=function(){var C=(0,b.default)(p.default.mark(function O(J,P,X,B,k,D,L){var q,G;return p.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(q={size:D-k},G=h&&h.browser,!G){N.next=8;break}return N.next=5,this._createBuffer(B,k,D);case 5:q.content=N.sent,N.next=11;break;case 8:return N.next=10,this._createStream(B,k,D);case 10:q.stream=N.sent;case 11:return N.next=13,this._uploadPart(J,P,X,q,L);case 13:return N.abrupt("return",N.sent);case 14:case"end":return N.stop()}},O,this)}));function x(O,J,P,X,B,k,D){return C.apply(this,arguments)}return x}(),S.completeMultipartUpload=function(){var C=(0,b.default)(p.default.mark(function O(J,P,X,B){var k,D,L,q,G,F,N,K;return p.default.wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:for(k=X.concat().sort(function(pe,ie){return pe.number-ie.number}).filter(function(pe,ie,Ae){return!ie||pe.number!==Ae[ie-1].number}),D=`<?xml version="1.0" encoding="UTF-8"?>
|
|
<CompleteMultipartUpload>
|
|
`,L=0;L<k.length;L++)q=k[L],D+=`<Part>
|
|
`,D+="<PartNumber>".concat(q.number,`</PartNumber>
|
|
`),D+="<ETag>".concat(q.etag,`</ETag>
|
|
`),D+=`</Part>
|
|
`;return D+="</CompleteMultipartUpload>",B=B||{},G={},G=m(B,function(pe){if(y(pe))return null}),G.subres={uploadId:P},G.headers=T(G.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),F=this._objectRequestParams("POST",J,G),w.encodeCallback(F,G),F.mime="xml",F.content=D,F.headers&&F.headers["x-oss-callback"]||(F.xmlResponse=!0),F.successStatuses=[200],ne.next=17,this.request(F);case 17:if(N=ne.sent,!B.progress){ne.next=21;break}return ne.next=21,B.progress(1,null,N.res);case 21:return K={res:N.res,bucket:F.bucket,name:J,etag:N.res.headers.etag},F.headers&&F.headers["x-oss-callback"]&&(K.data=JSON.parse(N.data.toString())),ne.abrupt("return",K);case 24:case"end":return ne.stop()}},O,this)}));function x(O,J,P,X){return C.apply(this,arguments)}return x}(),S._uploadPart=function(){var C=(0,b.default)(p.default.mark(function O(J,P,X,B,k){var D,L,q,G;return p.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return k=k||{},D={},g(k).to(D),D.headers=D.headers||{},D.headers["Content-Length"]=B.size,D.headers=T(D.headers,["x-oss-server-side-encryption"]),D.subres={partNumber:X,uploadId:P},L=this._objectRequestParams("PUT",J,D),L.mime=D.mime,q=h&&h.browser,q?L.content=B.content:L.stream=B.stream,L.successStatuses=[200],L.disabledMD5=k.disabledMD5,N.next=15,this.request(L);case 15:if(G=N.sent,G.res.headers.etag){N.next=18;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
https://help.aliyun.com/document_detail/32069.html`);case 18:return B.stream&&(B.stream=null,L.stream=null),N.abrupt("return",{name:J,etag:G.res.headers.etag,res:G.res});case 20:case"end":return N.stop()}},O,this)}));function x(O,J,P,X,B){return C.apply(this,arguments)}return x}()}).call(this)}).call(this,o("_process"))},{"./callback":24,"./utils/deepCopy":58,"./utils/isBuffer":65,"./utils/omit":73,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.filter.js":274,"core-js/modules/es.array.map.js":280,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],31:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator")),p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("url"),g=o("utility"),w=o("copy-to"),c=o("../../common/signUtils"),m=o("../utils/isIP"),v=m.isIP,y=o("../utils/setSTSToken"),E=y.setSTSToken,T=o("../utils/isFunction"),S=T.isFunction,C=j;C.asyncSignatureUrl=function(){var x=(0,p.default)(d.default.mark(function J(P,X){var B,k,D,L,q;return d.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(!v(this.options.endpoint.hostname)){F.next=2;break}throw new Error("can not get the object URL when endpoint is IP");case 2:if(X=X||{},P=this._objectName(P),X.method=X.method||"GET",B=g.timestamp()+(X.expires||1800),k={bucket:this.options.bucket,object:P},D=this._getResource(k),!(this.options.stsToken&&S(this.options.refreshSTSToken))){F.next=11;break}return F.next=11,E.call(this);case 11:return this.options.stsToken&&(X["security-token"]=this.options.stsToken),L=c._signatureForURL(this.options.accessKeySecret,X,D,B),q=b.parse(this._getReqUrl(k)),q.query={OSSAccessKeyId:this.options.accessKeyId,Expires:B,Signature:L.Signature},w(L.subResource).to(q.query),F.abrupt("return",q.format());case 17:case"end":return F.stop()}},J,this)}));function O(J,P){return x.apply(this,arguments)}return O}()},{"../../common/signUtils":50,"../utils/isFunction":68,"../utils/isIP":69,"../utils/setSTSToken":76,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"copy-to":94,url:472,utility:474}],32:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js");var p=h(o("@babel/runtime/helpers/typeof")),b=h(o("@babel/runtime/helpers/asyncToGenerator")),g=o("../utils/checkBucketName"),w=g.checkBucketName,c=j,m=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];c.copy=function(){var v=(0,b.default)(d.default.mark(function E(T,S,C,x){var O,J,P;return d.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return(0,p.default)(C)==="object"&&(x=C),x=x||{},x.headers=x.headers||{},Object.keys(x.headers).forEach(function(k){x.headers["x-oss-copy-source-".concat(k.toLowerCase())]=x.headers[k]}),(x.meta||Object.keys(x.headers).find(function(k){return m.includes(k.toLowerCase())}))&&(x.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(x.meta,x.headers),S=this._getSourceName(S,C),x.versionId&&(S="".concat(S,"?versionId=").concat(x.versionId)),x.headers["x-oss-copy-source"]=S,O=this._objectRequestParams("PUT",T,x),O.xmlResponse=!0,O.successStatuses=[200,304],B.next=14,this.request(O);case 14:return J=B.sent,P=J.data,P&&(P={etag:P.ETag,lastModified:P.LastModified}),B.abrupt("return",{data:P,res:J.res});case 18:case"end":return B.stop()}},E,this)}));function y(E,T,S,C){return v.apply(this,arguments)}return y}(),c._getSourceName=function(y,E){return typeof E=="string"?y=this._objectName(y):y[0]!=="/"?E=this.options.bucket:(E=y.replace(/\/(.+?)(\/.*)/,"$1"),y=y.replace(/(\/.+?\/)(.*)/,"$2")),w(E),y=encodeURIComponent(y),y="/".concat(E,"/").concat(y),y}},{"../utils/checkBucketName":51,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"@babel/runtime/regenerator":80,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.find.js":275,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],33:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j;b.delete=function(){var g=(0,p.default)(d.default.mark(function c(m){var v,y,E,T=arguments;return d.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return v=T.length>1&&T[1]!==void 0?T[1]:{},v.subres=Object.assign({},v.subres),v.versionId&&(v.subres.versionId=v.versionId),y=this._objectRequestParams("DELETE",m,v),y.successStatuses=[204],C.next=7,this.request(y);case 7:return E=C.sent,C.abrupt("return",{res:E.res});case 9:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],34:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("utility"),g=o("../utils/obj2xml"),w=g.obj2xml,c=j;c.deleteMulti=function(){var m=(0,p.default)(d.default.mark(function y(E){var T,S,C,x,O,J,P,X,B,k,D,L,q,G=arguments;return d.default.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(T=G.length>1&&G[1]!==void 0?G[1]:{},S=[],!(!E||!E.length)){N.next=4;break}throw new Error("names is required");case 4:for(C=0;C<E.length;C++)x={},typeof E[C]=="string"?x.Key=b.escape(this._objectName(E[C])):(O=E[C],J=O.key,P=O.versionId,x.Key=b.escape(this._objectName(J)),x.VersionId=P),S.push(x);return X={Delete:{Quiet:!!T.quiet,Object:S}},B=w(X,{headers:!0}),T.subres=Object.assign({delete:""},T.subres),T.versionId&&(T.subres.versionId=T.versionId),k=this._objectRequestParams("POST","",T),k.mime="xml",k.content=B,k.xmlResponse=!0,k.successStatuses=[200],N.next=16,this.request(k);case 16:return D=N.sent,L=D.data,q=L&&L.Deleted||null,q&&(Array.isArray(q)||(q=[q])),N.abrupt("return",{res:D.res,deleted:q||[]});case 21:case"end":return N.stop()}},y,this)}));function v(y){return m.apply(this,arguments)}return v}()},{"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,utility:474}],35:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j;b.deleteObjectTagging=function(){var g=(0,p.default)(d.default.mark(function c(m){var v,y,E,T=arguments;return d.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return v=T.length>1&&T[1]!==void 0?T[1]:{},v.subres=Object.assign({tagging:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),m=this._objectName(m),y=this._objectRequestParams("DELETE",m,v),y.successStatuses=[204],C.next=8,this.request(y);case 8:return E=C.sent,C.abrupt("return",{status:E.status,res:E.res});case 10:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],36:[function(o,_,j){"use strict";o("core-js/modules/es.array.concat.js");var h=o("url"),d=o("../utils/isIP"),p=d.isIP,b=j;b.generateObjectUrl=function(w,c){if(p(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(c)c[c.length-1]!=="/"&&(c+="/");else{c=this.options.endpoint.format();var m=h.parse(c),v=this.options.bucket;m.hostname="".concat(v,".").concat(m.hostname),m.host="".concat(v,".").concat(m.host),c=m.format()}return c+this._escape(this._objectName(w))}},{"../utils/isIP":69,"core-js/modules/es.array.concat.js":272,url:472}],37:[function(o,_,j){(function(h){(function(){"use strict";var d=o("@babel/runtime/helpers/interopRequireDefault"),p=d(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var b=d(o("@babel/runtime/helpers/asyncToGenerator")),g=o("fs"),w=o("is-type-of"),c=j;c.get=function(){var m=(0,b.default)(p.default.mark(function y(E,T){var S,C,x,O,J,P,X,B,k=arguments;return p.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return S=k.length>2&&k[2]!==void 0?k[2]:{},C=null,x=!1,w.writableStream(T)?C=T:w.string(T)?(C=g.createWriteStream(T),x=!0):S=T,S=S||{},O=h&&h.browser,J=S.responseCacheControl===null?"":"no-cache",P=O&&J?{"response-cache-control":J}:{},S.subres=Object.assign(P,S.subres),S.versionId&&(S.subres.versionId=S.versionId),S.process&&(S.subres["x-oss-process"]=S.process),L.prev=11,B=this._objectRequestParams("GET",E,S),B.writeStream=C,B.successStatuses=[200,206,304],L.next=17,this.request(B);case 17:X=L.sent,x&&C.destroy(),L.next=28;break;case 21:if(L.prev=21,L.t0=L.catch(11),!x){L.next=27;break}return C.destroy(),L.next=27,this._deleteFileSafe(T);case 27:throw L.t0;case 28:return L.abrupt("return",{res:X.res,content:X.data});case 29:case"end":return L.stop()}},y,this,[[11,21]])}));function v(y,E){return m.apply(this,arguments)}return v}()}).call(this)}).call(this,o("_process"))},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,_process:467,"core-js/modules/es.object.assign.js":287,fs:89,"is-type-of":466}],38:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j;b.getACL=function(){var g=(0,p.default)(d.default.mark(function c(m){var v,y,E,T=arguments;return d.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return v=T.length>1&&T[1]!==void 0?T[1]:{},v.subres=Object.assign({acl:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),m=this._objectName(m),y=this._objectRequestParams("GET",m,v),y.successStatuses=[200],y.xmlResponse=!0,C.next=9,this.request(y);case 9:return E=C.sent,C.abrupt("return",{acl:E.data.AccessControlList.Grant,owner:{id:E.data.Owner.ID,displayName:E.data.Owner.DisplayName},res:E.res});case 11:case"end":return C.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],39:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.number.constructor.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j,g=o("../utils/isObject"),w=g.isObject,c=o("../utils/isArray"),m=c.isArray;b.getBucketVersions=v,b.listObjectVersions=v;function v(){return y.apply(this,arguments)}function y(){return y=(0,p.default)(d.default.mark(function S(){var C,x,O,J,P,X,B,k,D=arguments;return d.default.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(C=D.length>0&&D[0]!==void 0?D[0]:{},x=D.length>1&&D[1]!==void 0?D[1]:{},!(C.versionIdMarker&&C.keyMarker===void 0)){q.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return x.subres=Object.assign({versions:""},x.subres),x.versionId&&(x.subres.versionId=x.versionId),O=this._objectRequestParams("GET","",x),O.xmlResponse=!0,O.successStatuses=[200],O.query=T(C),q.next=12,this.request(O);case 12:return J=q.sent,P=J.data.Version||[],X=J.data.DeleteMarker||[],B=this,P&&(Array.isArray(P)||(P=[P]),P=P.map(function(G){return{name:G.Key,url:B._objectUrl(G.Key),lastModified:G.LastModified,isLatest:G.IsLatest==="true",versionId:G.VersionId,etag:G.ETag,type:G.Type,size:Number(G.Size),storageClass:G.StorageClass,owner:{id:G.Owner.ID,displayName:G.Owner.DisplayName}}})),X&&(m(X)||(X=[X]),X=X.map(function(G){return{name:G.Key,lastModified:G.LastModified,versionId:G.VersionId,owner:{id:G.Owner.ID,displayName:G.Owner.DisplayName}}})),k=J.data.CommonPrefixes||null,k&&(m(k)||(k=[k]),k=k.map(function(G){return G.Prefix})),q.abrupt("return",{res:J.res,objects:P,deleteMarker:X,prefixes:k,nextMarker:J.data.NextKeyMarker||null,NextVersionIdMarker:J.data.NextVersionIdMarker||null,nextKeyMarker:J.data.NextKeyMarker||null,nextVersionIdMarker:J.data.NextVersionIdMarker||null,isTruncated:J.data.IsTruncated==="true"});case 21:case"end":return q.stop()}},S,this)})),y.apply(this,arguments)}function E(S){return S.replace(/([A-Z])/g,"-$1").toLowerCase()}function T(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},C={};return w(S)&&Object.keys(S).forEach(function(x){C[E(x)]=S[x]}),C}},{"../utils/isArray":63,"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.number.constructor.js":286,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],40:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j;b.getObjectMeta=function(){var g=(0,p.default)(d.default.mark(function c(m,v){var y,E;return d.default.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return v=v||{},m=this._objectName(m),v.subres=Object.assign({objectMeta:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),y=this._objectRequestParams("HEAD",m,v),y.successStatuses=[200],S.next=8,this.request(y);case 8:return E=S.sent,S.abrupt("return",{status:E.status,res:E.res});case 10:case"end":return S.stop()}},c,this)}));function w(c,m){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],41:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j,g=o("../utils/isObject"),w=g.isObject;b.getObjectTagging=function(){var c=(0,p.default)(d.default.mark(function v(y){var E,T,S,C,x,O,J=arguments;return d.default.wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return E=J.length>1&&J[1]!==void 0?J[1]:{},E.subres=Object.assign({tagging:""},E.subres),E.versionId&&(E.subres.versionId=E.versionId),y=this._objectName(y),T=this._objectRequestParams("GET",y,E),T.successStatuses=[200],X.next=8,this.request(T);case 8:return S=X.sent,X.next=11,this.parseXML(S.data);case 11:return C=X.sent,x=C.TagSet.Tag,x=x&&w(x)?[x]:x||[],O={},x.forEach(function(B){O[B.Key]=B.Value}),X.abrupt("return",{status:S.status,res:S.res,tag:O});case 17:case"end":return X.stop()}},v,this)}));function m(v){return c.apply(this,arguments)}return m}()},{"../utils/isObject":70,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],42:[function(o,_,j){"use strict";var h=o("../utils/isIP"),d=h.isIP,p=j;p.getObjectUrl=function(g,w){if(d(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return w?w[w.length-1]!=="/"&&(w+="/"):w=this.options.endpoint.format(),w+this._escape(this._objectName(g))}},{"../utils/isIP":69}],43:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j;b.getSymlink=function(){var g=(0,p.default)(d.default.mark(function c(m){var v,y,E,T,S=arguments;return d.default.wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return v=S.length>1&&S[1]!==void 0?S[1]:{},v.subres=Object.assign({symlink:""},v.subres),v.versionId&&(v.subres.versionId=v.versionId),m=this._objectName(m),y=this._objectRequestParams("GET",m,v),y.successStatuses=[200],x.next=8,this.request(y);case 8:return E=x.sent,T=E.res.headers["x-oss-symlink-target"],x.abrupt("return",{targetName:decodeURIComponent(T),res:E.res});case 11:case"end":return x.stop()}},c,this)}));function w(c){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],44:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/checkEnv"),g=b.checkEnv,w=j;w.head=function(){var c=(0,p.default)(d.default.mark(function v(y){var E,T,S,C,x=arguments;return d.default.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return E=x.length>1&&x[1]!==void 0?x[1]:{},g("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),E.subres=Object.assign({},E.subres),E.versionId&&(E.subres.versionId=E.versionId),T=this._objectRequestParams("HEAD",y,E),T.successStatuses=[200,304],J.next=8,this.request(T);case 8:return S=J.sent,C={meta:null,res:S.res,status:S.status},S.status===200&&Object.keys(S.headers).forEach(function(P){P.indexOf("x-oss-meta-")===0&&(C.meta||(C.meta={}),C.meta[P.substring(11)]=S.headers[P])}),J.abrupt("return",C);case 12:case"end":return J.stop()}},v,this)}));function m(v){return c.apply(this,arguments)}return m}()},{"../utils/checkEnv":53,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],45:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j;b.putACL=function(){var g=(0,p.default)(d.default.mark(function c(m,v,y){var E,T;return d.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return y=y||{},y.subres=Object.assign({acl:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),y.headers=y.headers||{},y.headers["x-oss-object-acl"]=v,m=this._objectName(m),E=this._objectRequestParams("PUT",m,y),E.successStatuses=[200],C.next=10,this.request(E);case 10:return T=C.sent,C.abrupt("return",{res:T.res});case 12:case"end":return C.stop()}},c,this)}));function w(c,m,v){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],46:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.object.keys.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("../utils/obj2xml"),g=b.obj2xml,w=o("../utils/checkObjectTag"),c=w.checkObjectTag,m=j;m.putObjectTagging=function(){var v=(0,p.default)(d.default.mark(function E(T,S){var C,x,O,J,P=arguments;return d.default.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return C=P.length>2&&P[2]!==void 0?P[2]:{},c(S),C.subres=Object.assign({tagging:""},C.subres),C.versionId&&(C.subres.versionId=C.versionId),T=this._objectName(T),x=this._objectRequestParams("PUT",T,C),x.successStatuses=[200],S=Object.keys(S).map(function(k){return{Key:k,Value:S[k]}}),O={Tagging:{TagSet:{Tag:S}}},x.mime="xml",x.content=g(O),B.next=13,this.request(x);case 13:return J=B.sent,B.abrupt("return",{res:J.res,status:J.status});case 15:case"end":return B.stop()}},E,this)}));function y(E,T){return v.apply(this,arguments)}return y}()},{"../utils/checkObjectTag":54,"../utils/obj2xml":72,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290}],47:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=j;b.putSymlink=function(){var g=(0,p.default)(d.default.mark(function c(m,v,y){var E,T;return d.default.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return y=y||{},y.headers=y.headers||{},v=this._escape(this._objectName(v)),this._convertMetaToHeaders(y.meta,y.headers),y.headers["x-oss-symlink-target"]=v,y.subres=Object.assign({symlink:""},y.subres),y.versionId&&(y.subres.versionId=y.versionId),y.storageClass&&(y.headers["x-oss-storage-class"]=y.storageClass),m=this._objectName(m),E=this._objectRequestParams("PUT",m,y),E.successStatuses=[200],C.next=13,this.request(E);case 13:return T=C.sent,C.abrupt("return",{res:T.res});case 15:case"end":return C.stop()}},c,this)}));function w(c,m,v){return g.apply(this,arguments)}return w}()},{"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.object.assign.js":287}],48:[function(o,_,j){"use strict";var h=o("url"),d=o("utility"),p=o("copy-to"),b=o("../../common/signUtils"),g=o("../utils/isIP"),w=g.isIP,c=j;c.signatureUrl=function(v,y){if(w(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");y=y||{},v=this._objectName(v),y.method=y.method||"GET";var E=d.timestamp()+(y.expires||1800),T={bucket:this.options.bucket,object:v},S=this._getResource(T);this.options.stsToken&&(y["security-token"]=this.options.stsToken);var C=b._signatureForURL(this.options.accessKeySecret,y,S,E),x=h.parse(this._getReqUrl(T));return x.query={OSSAccessKeyId:this.options.accessKeyId,Expires:E,Signature:C.Signature},p(C.subResource).to(x.query),x.format()}},{"../../common/signUtils":50,"../utils/isIP":69,"copy-to":94,url:472,utility:474}],49:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/web.dom-collections.iterator.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.function.name.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator")),b=o("./utils/isArray"),g=b.isArray,w=j;w._parallelNode=function(){var c=(0,p.default)(d.default.mark(function v(y,E,T,S){var C,x,O,J,P,X,B,k;return d.default.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:C=this,x=[],O=[],J=y.length/E,P=y.length%E,X=P===0?J:(y.length-P)/E+1,B=1,k=0;case 8:if(!(k<y.length)){L.next=26;break}if(!C.isCancel()){L.next=11;break}return L.abrupt("break",26);case 11:if(S?O.push(T(C,y[k],S)):O.push(T(C,y[k])),!(O.length===E||B===X&&k===y.length-1)){L.next=23;break}return L.prev=13,B+=1,L.next=17,Promise.all(O);case 17:L.next=22;break;case 19:L.prev=19,L.t0=L.catch(13),x.push(L.t0);case 22:O=[];case 23:k++,L.next=8;break;case 26:return L.abrupt("return",x);case 27:case"end":return L.stop()}},v,this,[[13,19]])}));function m(v,y,E,T){return c.apply(this,arguments)}return m}(),w._parallel=function(m,v,y){var E=this;return new Promise(function(T){var S=[];if(v<=0||!m){T(S);return}function C(L){return function(){if(L===null)throw new Error("Callback was already called.");var q=L;L=null;for(var G=arguments.length,F=new Array(G),N=0;N<G;N++)F[N]=arguments[N];q.apply(this,F)}}function x(L){var q=-1,G=L.length;return function(){return++q<G&&!E.isCancel()?{value:L[q],key:q}:null}}var O=x(m),J=!1,P=0,X=!1;function B(L){P-=1,L?(J=!0,S.push(L),T(S)):J&&P<=0?(J=!0,T(S)):X||(E.isCancel()?T(S):D())}function k(L,q){y(L).then(function(G){q(null,G)}).catch(function(G){q(G)})}function D(){for(X=!0;P<v&&!J&&!E.isCancel();){var L=O();if(L===null||S.length>0){J=!0,P<=0&&T(S);return}P+=1,k(L.value,C(B))}X=!1}D()})},w.cancel=function(m){this.options.cancelFlag=!0,g(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach(function(v){if(v.destroyed===!1){var y={name:"cancel",message:"cancel"};v.destroy(y)}}),this.multipartUploadStreams=[],m&&this.abortMultipartUpload(m.name,m.uploadId,m.options)},w.isCancel=function(){return this.options.cancelFlag},w.resetCancelFlag=function(){this.options.cancelFlag=!1},w._stop=function(){this.options.cancelFlag=!0},w._makeCancelEvent=function(){var m={status:0,name:"cancel"};return m},w._makeAbortEvent=function(){var m={status:0,name:"abort",message:"upload task has been abort"};return m}},{"./utils/isArray":63,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.string.iterator.js":303,"core-js/modules/web.dom-collections.for-each.js":339,"core-js/modules/web.dom-collections.iterator.js":340}],50:[function(o,_,j){(function(h){(function(){"use strict";o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.array.sort.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.regexp.to-string.js");var d=o("./../../shims/crypto/crypto.js"),p=o("is-type-of"),b=o("./utils/lowercaseKeyHeader"),g=b.lowercaseKeyHeader;j.buildCanonicalizedResource=function(c,m){var v="".concat(c),y="?";if(p.string(m)&&m.trim()!=="")v+=y+m;else if(p.array(m))m.sort(),v+=y+m.join("&");else if(m){var E=function(C,x){return C[0]>x[0]?1:C[0]<x[0]?-1:0},T=function(C){v+=y+C,(m[C]||m[C]===0)&&(v+="=".concat(m[C])),y="&"};Object.keys(m).sort(E).forEach(T)}return v},j.buildCanonicalString=function(c,m,v,y){v=v||{};var E=g(v.headers),T="x-oss-",S=[],C={},x=[c.toUpperCase(),E["content-md5"]||"",E["content-type"],y||E["x-oss-date"]];return Object.keys(E).forEach(function(O){var J=O.toLowerCase();J.indexOf(T)===0&&(C[J]=String(E[O]).trim())}),Object.keys(C).sort().forEach(function(O){S.push("".concat(O,":").concat(C[O]))}),x=x.concat(S),x.push(this.buildCanonicalizedResource(m,v.parameters)),x.join(`
|
|
`)},j.computeSignature=function(c,m){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"utf-8",y=d.createHmac("sha1",c);return y.update(h.from(m,v)).digest("base64")},j.authorization=function(c,m,v,y){return"OSS ".concat(c,":").concat(this.computeSignature(m,v,y))},j._signatureForURL=function(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,y=arguments.length>3?arguments[3]:void 0,E=arguments.length>4?arguments[4]:void 0,T={},S=m.subResource,C=S===void 0?{}:S;if(m.process){var x="x-oss-process";C[x]=m.process}if(m.trafficLimit){var O="x-oss-traffic-limit";C[O]=m.trafficLimit}if(m.response&&Object.keys(m.response).forEach(function(B){var k="response-".concat(B.toLowerCase());C[k]=m.response[B]}),Object.keys(m).forEach(function(B){var k=B.toLowerCase(),D=m[B];k.indexOf("x-oss-")===0?T[k]=D:(k.indexOf("content-md5")===0||k.indexOf("content-type")===0)&&(T[B]=D)}),Object.prototype.hasOwnProperty.call(m,"security-token")&&(C["security-token"]=m["security-token"]),Object.prototype.hasOwnProperty.call(m,"callback")){var J={callbackUrl:encodeURI(m.callback.url),callbackBody:m.callback.body};if(m.callback.host&&(J.callbackHost=m.callback.host),m.callback.contentType&&(J.callbackBodyType=m.callback.contentType),C.callback=h.from(JSON.stringify(J)).toString("base64"),m.callback.customValue){var P={};Object.keys(m.callback.customValue).forEach(function(B){P["x:".concat(B)]=m.callback.customValue[B]}),C["callback-var"]=h.from(JSON.stringify(P)).toString("base64")}}var X=this.buildCanonicalString(m.method,v,{headers:T,parameters:C},y.toString());return{Signature:this.computeSignature(c,X,E),subResource:C}}}).call(this)}).call(this,o("buffer").Buffer)},{"./../../shims/crypto/crypto.js":461,"./utils/lowercaseKeyHeader":71,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.sort.js":282,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.trim.js":308,"core-js/modules/web.dom-collections.for-each.js":339,"is-type-of":466}],51:[function(o,_,j){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkBucketName=void 0,j.checkBucketName=function(h){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=d?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!p.test(h))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":300}],52:[function(o,_,j){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkConfigValid=void 0;var h={endpoint:d,region:/^[a-zA-Z0-9\-_]+$/};function d(p){return typeof p=="string"?/^[a-zA-Z0-9._:/-]+$/.test(p):p.host?/^[a-zA-Z0-9._:/-]+$/.test(p.host):!1}j.checkConfigValid=function(p,b){if(h[b]){var g=!0;if(h[b]instanceof Function?g=h[b](p):g=h[b].test(p),!g)throw new Error("The ".concat(b," must be conform to the specifications"))}}},{"core-js/modules/es.regexp.exec.js":300}],53:[function(o,_,j){(function(h){(function(){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.checkEnv=void 0;function d(p){h.browser&&console.warn(p)}j.checkEnv=d}).call(this)}).call(this,o("_process"))},{_process:467}],54:[function(o,_,j){"use strict";o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.entries.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkObjectTag=void 0;var h=o("./checkValid"),d=h.checkValid,p=o("./isObject"),b=p.isObject,g=[{validator:function(v){if(typeof v!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],w={key:[].concat(g,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(g,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function c(m){if(!b(m))throw new Error("tag must be Object");var v=Object.entries(m);if(v.length>10)throw new Error("maximum of 10 tags for a object");var y=["key","value"];v.forEach(function(E){E.forEach(function(T,S){d(T,w[y[S]])})})}j.checkObjectTag=c},{"./checkValid":55,"./isObject":70,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],55:[function(o,_,j){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.checkValid=void 0;function h(d,p){p.forEach(function(b){if(b.validator)b.validator(d);else if(b.pattern&&!b.pattern.test(d))throw new Error(b.msg)})}j.checkValid=h},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/web.dom-collections.for-each.js":339}],56:[function(o,_,j){(function(h){(function(){"use strict";o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),o("core-js/modules/es.object.assign.js"),o("core-js/modules/es.array.concat.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.createRequest=void 0;var d=o("./../../../shims/crypto/crypto.js"),p=o("debug")("ali-oss"),b=o("mime"),g=o("dateformat"),w=o("copy-to"),c=o("path"),m=o("./encoder"),v=m.encoder,y=o("./isIP"),E=y.isIP,T=o("./setRegion"),S=T.setRegion,C=o("../client/getReqUrl"),x=C.getReqUrl,O=o("./isDingTalk"),J=O.isDingTalk;function P(k,D){return k[D]||k[D.toLowerCase()]}function X(k,D){delete k[D],delete k[D.toLowerCase()]}function B(k){var D=new Date;this.options.amendTimeSkewed&&(D=+new Date+this.options.amendTimeSkewed);var L={"x-oss-date":g(D,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};typeof window!="undefined"&&(L["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(L["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(L,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(L["x-oss-security-token"]=this.options.stsToken),w(k.headers).to(L),P(L,"Content-Type")||(k.mime&&k.mime.indexOf("/")>0?L["Content-Type"]=k.mime:J()?L["Content-Type"]="application/octet-stream":L["Content-Type"]=b.getType(k.mime||c.extname(k.object||""))),P(L,"Content-Type")||X(L,"Content-Type"),k.content&&(k.disabledMD5||(!k.headers||!k.headers["Content-MD5"]?L["Content-MD5"]=d.createHash("md5").update(h.from(k.content,"utf8")).digest("base64"):L["Content-MD5"]=k.headers["Content-MD5"]),L["Content-Length"]||(L["Content-Length"]=k.content.length));var q=Object.prototype.hasOwnProperty;for(var G in L)L[G]&&q.call(L,G)&&(L[G]=v(String(L[G]),this.options.headerEncoding));var F=this._getResource(k);if(L.authorization=this.authorization(k.method,F,k.subres,L,this.options.headerEncoding),E(this.options.endpoint.hostname)){var N=this.options,K=N.region,re=N.internal,ne=N.secure,pe=S(K,re,ne);L.host="".concat(k.bucket,".").concat(pe.host)}var ie=x.bind(this)(k);p("request %s %s, with headers %j, !!stream: %s",k.method,ie,L,!!k.stream);var Ae=k.timeout||this.options.timeout,Y={method:k.method,content:k.content,stream:k.stream,headers:L,timeout:Ae,writeStream:k.writeStream,customResponse:k.customResponse,ctx:k.ctx||this.ctx};return this.agent&&(Y.agent=this.agent),this.httpsAgent&&(Y.httpsAgent=this.httpsAgent),Y.enableProxy=!!this.options.enableProxy,Y.proxy=this.options.proxy?this.options.proxy:null,{url:ie,params:Y}}j.createRequest=B}).call(this)}).call(this,o("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":461,"./encoder":59,"./isDingTalk":66,"./isIP":69,"./setRegion":75,buffer:90,"copy-to":94,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.string.includes.js":302,dateformat:342,debug:465,mime:374,path:378}],57:[function(o,_,j){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.entries.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.object.keys.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.dataFix=void 0;var h=o("./isObject"),d=["true","TRUE","1",1],p=["false","FALSE","0",0];function b(c,m,v){if(h.isObject(c)){var y=m.remove,E=y===void 0?[]:y,T=m.rename,S=T===void 0?{}:T,C=m.camel,x=C===void 0?[]:C,O=m.bool,J=O===void 0?[]:O,P=m.lowerFirst,X=P===void 0?!1:P;return E.forEach(function(B){return delete c[B]}),Object.entries(S).forEach(function(B){c[B[0]]&&(c[B[1]]||(c[B[1]]=c[B[0]],delete c[B[0]]))}),x.forEach(function(B){if(c[B]){var k=B.replace(/^(.)/,function(D){return D.toLowerCase()}).replace(/-(\w)/g,function(D,L){return L.toUpperCase()});c[k]||(c[k]=c[B])}}),J.forEach(function(B){c[B]=g(c[B])}),typeof v=="function"&&v(c),w(c,X),b}}j.dataFix=b;function g(c){return c?d.includes(c)?!0:p.includes(c)?!1:c:!1}function w(c,m){m&&Object.keys(c).forEach(function(v){var y=v.replace(/^\w/,function(E){return E.toLowerCase()});typeof c[y]=="undefined"&&(c[y]=c[v],delete c[v])})}},{"./isObject":70,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.entries.js":288,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],58:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js");var d=h(o("@babel/runtime/helpers/typeof"));Object.defineProperty(j,"__esModule",{value:!0}),j.deepCopyWith=j.deepCopy=void 0;var p=o("./isBuffer");j.deepCopy=function(b){if(b===null||(0,d.default)(b)!=="object")return b;if(p.isBuffer(b))return b.slice();var g=Array.isArray(b)?[]:{};return Object.keys(b).forEach(function(w){g[w]=j.deepCopy(b[w])}),g},j.deepCopyWith=function(b,g){function w(c,m,v){var y=g(c,m,v);if(y!==void 0)return y;if(c===null||(0,d.default)(c)!=="object")return c;if(p.isBuffer(c))return c.slice();var E=Array.isArray(c)?[]:{};return Object.keys(c).forEach(function(T){E[T]=w(c[T],T,c)}),E}return g?w(b,"",null):j.deepCopy(b)}},{"./isBuffer":65,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],59:[function(o,_,j){(function(h){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.encoder=void 0;function d(p){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"utf-8";return b==="utf-8"?p:h.from(p).toString("latin1")}j.encoder=d}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],60:[function(o,_,j){"use strict";o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.formatInventoryConfig=void 0;var h=o("../utils/dataFix"),d=o("../utils/isObject"),p=o("../utils/isArray"),b=o("../utils/formatObjKey");function g(c){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return m&&d.isObject(c)&&(c=[c]),p.isArray(c)?c=c.map(w):c=w(c),c}j.formatInventoryConfig=g;function w(c){return h.dataFix(c,{bool:["IsEnabled"]},function(m){var v,y;m.prefix=m.Filter.Prefix,delete m.Filter,m.OSSBucketDestination=m.Destination.OSSBucketDestination,m.OSSBucketDestination.rolename=m.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete m.OSSBucketDestination.RoleArn,m.OSSBucketDestination.bucket=m.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete m.OSSBucketDestination.Bucket,delete m.Destination,m.frequency=m.Schedule.Frequency,delete m.Schedule.Frequency,!((v=m==null?void 0:m.OptionalFields)===null||v===void 0)&&v.Field&&!p.isArray((y=m.OptionalFields)===null||y===void 0?void 0:y.Field)&&(m.OptionalFields.Field=[m.OptionalFields.Field])}),c=b.formatObjKey(c,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]}),c}},{"../utils/dataFix":57,"../utils/formatObjKey":61,"../utils/isArray":63,"../utils/isObject":70,"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.replace.js":305}],61:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault");o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js");var d=h(o("@babel/runtime/helpers/typeof"));Object.defineProperty(j,"__esModule",{value:!0}),j.formatObjKey=void 0;function p(g,w,c){if(g===null||(0,d.default)(g)!=="object")return g;var m;if(Array.isArray(g)){m=[];for(var v=0;v<g.length;v++)m.push(p(g[v],w,c))}else m={},Object.keys(g).forEach(function(y){m[b(y,w,c)]=p(g[y],w,c)});return m}j.formatObjKey=p;function b(g,w,c){return c&&c.exclude&&c.exclude.includes(g)||(w==="firstUpperCase"?g=g.replace(/^./,function(m){return m.toUpperCase()}):w==="firstLowerCase"&&(g=g.replace(/^./,function(m){return m.toLowerCase()}))),g}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.includes.js":302,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],62:[function(o,_,j){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.getStrBytesCount=void 0;function h(d){for(var p=0,b=0;b<d.length;b++){var g=d.charAt(b);/^[\u00-\uff]$/.test(g)?p+=1:p+=2}return p}j.getStrBytesCount=h},{"core-js/modules/es.regexp.exec.js":300}],63:[function(o,_,j){"use strict";o("core-js/modules/es.object.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isArray=void 0,j.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"}},{"core-js/modules/es.object.to-string.js":291}],64:[function(o,_,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isBlob=void 0;function h(d){return typeof Blob!="undefined"&&d instanceof Blob}j.isBlob=h},{}],65:[function(o,_,j){(function(h){(function(){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isBuffer=void 0;function d(p){return h.isBuffer(p)}j.isBuffer=d}).call(this)}).call(this,{isBuffer:o("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":366}],66:[function(o,_,j){(function(h){(function(){"use strict";o("core-js/modules/es.array.includes.js"),o("core-js/modules/es.string.includes.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isDingTalk=void 0;function d(){return!!(h.browser&&window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}j.isDingTalk=d}).call(this)}).call(this,o("_process"))},{_process:467,"core-js/modules/es.array.includes.js":277,"core-js/modules/es.string.includes.js":302}],67:[function(o,_,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isFile=void 0,j.isFile=function(h){return typeof File!="undefined"&&h instanceof File}},{}],68:[function(o,_,j){"use strict";Object.defineProperty(j,"__esModule",{value:!0}),j.isFunction=void 0,j.isFunction=function(h){return typeof h=="function"}},{}],69:[function(o,_,j){"use strict";o("core-js/modules/es.regexp.exec.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isIP=void 0,j.isIP=function(h){var d=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,p=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return d.test(h)||p.test(h)}},{"core-js/modules/es.regexp.exec.js":300}],70:[function(o,_,j){"use strict";o("core-js/modules/es.object.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.isObject=void 0,j.isObject=function(h){return Object.prototype.toString.call(h)==="[object Object]"}},{"core-js/modules/es.object.to-string.js":291}],71:[function(o,_,j){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.lowercaseKeyHeader=void 0;var h=o("./isObject");function d(p){var b={};return h.isObject(p)&&Object.keys(p).forEach(function(g){b[g.toLowerCase()]=p[g]}),b}j.lowercaseKeyHeader=d},{"./isObject":70,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/web.dom-collections.for-each.js":339}],72:[function(o,_,j){"use strict";o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.obj2xml=void 0;var h=o("./formatObjKey");function d(b){return Object.prototype.toString.call(b).replace(/(.*? |])/g,"").toLowerCase()}function p(b,g){var w="";return g&&g.headers&&(w=`<?xml version="1.0" encoding="UTF-8"?>
|
|
`),g&&g.firstUpperCase&&(b=h.formatObjKey(b,"firstUpperCase")),d(b)==="object"?Object.keys(b).forEach(function(c){d(b[c])!=="undefined"&&d(b[c])!=="null"&&(d(b[c])==="string"||d(b[c])==="number"?w+="<".concat(c,">").concat(b[c],"</").concat(c,">"):d(b[c])==="object"?w+="<".concat(c,">").concat(p(b[c]),"</").concat(c,">"):d(b[c])==="array"?w+=b[c].map(function(m){return"<".concat(c,">").concat(p(m),"</").concat(c,">")}).join(""):w+="<".concat(c,">").concat(b[c].toString(),"</").concat(c,">"))}):w+=b.toString(),w}j.obj2xml=p},{"./formatObjKey":61,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.map.js":280,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305,"core-js/modules/web.dom-collections.for-each.js":339}],73:[function(o,_,j){"use strict";o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.array.from.js"),o("core-js/modules/es.string.iterator.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.symbol.js"),o("core-js/modules/es.symbol.description.js"),o("core-js/modules/es.symbol.iterator.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/web.dom-collections.iterator.js"),o("core-js/modules/es.object.assign.js");function h(g,w){var c=typeof Symbol!="undefined"&&g[Symbol.iterator]||g["@@iterator"];if(!c){if(Array.isArray(g)||(c=d(g))||w&&g&&typeof g.length=="number"){c&&(g=c);var m=0,v=function(){};return{s:v,n:function(){return m>=g.length?{done:!0}:{done:!1,value:g[m++]}},e:function(C){throw C},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y=!0,E=!1,T;return{s:function(){c=c.call(g)},n:function(){var C=c.next();return y=C.done,C},e:function(C){E=!0,T=C},f:function(){try{!y&&c.return!=null&&c.return()}finally{if(E)throw T}}}}function d(g,w){if(g){if(typeof g=="string")return p(g,w);var c=Object.prototype.toString.call(g).slice(8,-1);if(c==="Object"&&g.constructor&&(c=g.constructor.name),c==="Map"||c==="Set")return Array.from(g);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return p(g,w)}}function p(g,w){(w==null||w>g.length)&&(w=g.length);for(var c=0,m=new Array(w);c<w;c++)m[c]=g[c];return m}Object.defineProperty(j,"__esModule",{value:!0}),j.omit=void 0;function b(g,w){var c=Object.assign({},g),m=h(w),v;try{for(m.s();!(v=m.n()).done;){var y=v.value;delete c[y]}}catch(E){m.e(E)}finally{m.f()}return c}j.omit=b},{"core-js/modules/es.array.from.js":276,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.iterator.js":303,"core-js/modules/es.symbol.description.js":310,"core-js/modules/es.symbol.iterator.js":312,"core-js/modules/es.symbol.js":313,"core-js/modules/web.dom-collections.iterator.js":340}],74:[function(o,_,j){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),Object.defineProperty(j,"__esModule",{value:!0}),j.retry=void 0;function h(d,p){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},g=0,w=b.retryDelay,c=w===void 0?500:w,m=b.errorHandler,v=m===void 0?function(){return!0}:m,y=function E(){for(var T=arguments.length,S=new Array(T),C=0;C<T;C++)S[C]=arguments[C];return new Promise(function(x,O){d.apply(void 0,S).then(function(J){g=0,x(J)}).catch(function(J){g<p&&v(J)?(g++,setTimeout(function(){x(E.apply(void 0,S))},c)):(g=0,O(J))})})};return y}j.retry=h},{"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],75:[function(o,_,j){"use strict";var h=function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(j,"__esModule",{value:!0}),j.setRegion=void 0;var d=h(o("url")),p=o("./checkConfigValid");function b(g){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;p.checkConfigValid(g,"region");var m=c?"https://":"http://",v=w?"-internal.aliyuncs.com":".aliyuncs.com",y="vpc100-oss-cn-";return g.substr(0,y.length)===y&&(v=".aliyuncs.com"),d.default.parse(m+g+v)}j.setRegion=b},{"./checkConfigValid":52,url:472}],76:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/regenerator"));o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.array.find.js"),o("core-js/modules/es.object.assign.js");var p=h(o("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(j,"__esModule",{value:!0}),j.checkCredentials=j.setSTSToken=void 0;var b=o("./formatObjKey");function g(){return w.apply(this,arguments)}function w(){return w=(0,p.default)(d.default.mark(function m(){var v,y;return d.default.wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(this.options||(this.options={}),v=new Date,!this.stsTokenFreshTime){T.next=14;break}if(!(+v-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){T.next=12;break}return this.stsTokenFreshTime=v,T.next=7,this.options.refreshSTSToken();case 7:y=T.sent,y=b.formatObjKey(y,"firstLowerCase"),y.securityToken&&(y.stsToken=y.securityToken),c(y),Object.assign(this.options,y);case 12:T.next=15;break;case 14:this.stsTokenFreshTime=v;case 15:return T.abrupt("return",null);case 16:case"end":return T.stop()}},m,this)})),w.apply(this,arguments)}j.setSTSToken=g;function c(m){var v=["accessKeySecret","accessKeyId","stsToken"],y=Object.keys(m);v.forEach(function(E){if(!y.find(function(T){return T===E}))throw Error("refreshSTSToken must return contains ".concat(E))})}j.checkCredentials=c},{"./formatObjKey":61,"@babel/runtime/helpers/asyncToGenerator":77,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/regenerator":80,"core-js/modules/es.array.find.js":275,"core-js/modules/es.object.assign.js":287,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291}],77:[function(o,_,j){function h(p,b,g,w,c,m,v){try{var y=p[m](v),E=y.value}catch(T){g(T);return}y.done?b(E):Promise.resolve(E).then(w,c)}function d(p){return function(){var b=this,g=arguments;return new Promise(function(w,c){var m=p.apply(b,g);function v(E){h(m,w,c,v,y,"next",E)}function y(E){h(m,w,c,v,y,"throw",E)}v(void 0)})}}_.exports=d,_.exports.__esModule=!0,_.exports.default=_.exports},{}],78:[function(o,_,j){function h(d){return d&&d.__esModule?d:{default:d}}_.exports=h,_.exports.__esModule=!0,_.exports.default=_.exports},{}],79:[function(o,_,j){function h(d){"@babel/helpers - typeof";return _.exports=h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},_.exports.__esModule=!0,_.exports.default=_.exports,h(d)}_.exports=h,_.exports.__esModule=!0,_.exports.default=_.exports},{}],80:[function(o,_,j){_.exports=o("regenerator-runtime")},{"regenerator-runtime":395}],81:[function(o,_,j){_.exports=h,_.exports.HttpsAgent=h;function h(){}},{}],82:[function(o,_,j){(function(h){(function(){"use strict";var d=o("object-assign");function p(K,re){if(K===re)return 0;for(var ne=K.length,pe=re.length,ie=0,Ae=Math.min(ne,pe);ie<Ae;++ie)if(K[ie]!==re[ie]){ne=K[ie],pe=re[ie];break}return ne<pe?-1:pe<ne?1:0}function b(K){return h.Buffer&&typeof h.Buffer.isBuffer=="function"?h.Buffer.isBuffer(K):!!(K!=null&&K._isBuffer)}var g=o("util/"),w=Object.prototype.hasOwnProperty,c=Array.prototype.slice,m=function(){return function(){}.name==="foo"}();function v(K){return Object.prototype.toString.call(K)}function y(K){return b(K)||typeof h.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(K):K?!!(K instanceof DataView||K.buffer&&K.buffer instanceof ArrayBuffer):!1}var E=_.exports=P,T=/\s*function\s+([^\(\s]*)\s*/;function S(K){if(g.isFunction(K)){if(m)return K.name;var re=K.toString(),ne=re.match(T);return ne&&ne[1]}}E.AssertionError=function(re){this.name="AssertionError",this.actual=re.actual,this.expected=re.expected,this.operator=re.operator,re.message?(this.message=re.message,this.generatedMessage=!1):(this.message=O(this),this.generatedMessage=!0);var ne=re.stackStartFunction||J;if(Error.captureStackTrace)Error.captureStackTrace(this,ne);else{var pe=new Error;if(pe.stack){var ie=pe.stack,Ae=S(ne),Y=ie.indexOf(`
|
|
`+Ae);if(Y>=0){var fe=ie.indexOf(`
|
|
`,Y+1);ie=ie.substring(fe+1)}this.stack=ie}}},g.inherits(E.AssertionError,Error);function C(K,re){return typeof K=="string"?K.length<re?K:K.slice(0,re):K}function x(K){if(m||!g.isFunction(K))return g.inspect(K);var re=S(K),ne=re?": "+re:"";return"[Function"+ne+"]"}function O(K){return C(x(K.actual),128)+" "+K.operator+" "+C(x(K.expected),128)}function J(K,re,ne,pe,ie){throw new E.AssertionError({message:ne,actual:K,expected:re,operator:pe,stackStartFunction:ie})}E.fail=J;function P(K,re){K||J(K,!0,re,"==",E.ok)}E.ok=P,E.equal=function(re,ne,pe){re!=ne&&J(re,ne,pe,"==",E.equal)},E.notEqual=function(re,ne,pe){re==ne&&J(re,ne,pe,"!=",E.notEqual)},E.deepEqual=function(re,ne,pe){X(re,ne,!1)||J(re,ne,pe,"deepEqual",E.deepEqual)},E.deepStrictEqual=function(re,ne,pe){X(re,ne,!0)||J(re,ne,pe,"deepStrictEqual",E.deepStrictEqual)};function X(K,re,ne,pe){if(K===re)return!0;if(b(K)&&b(re))return p(K,re)===0;if(g.isDate(K)&&g.isDate(re))return K.getTime()===re.getTime();if(g.isRegExp(K)&&g.isRegExp(re))return K.source===re.source&&K.global===re.global&&K.multiline===re.multiline&&K.lastIndex===re.lastIndex&&K.ignoreCase===re.ignoreCase;if((K===null||typeof K!="object")&&(re===null||typeof re!="object"))return ne?K===re:K==re;if(y(K)&&y(re)&&v(K)===v(re)&&!(K instanceof Float32Array||K instanceof Float64Array))return p(new Uint8Array(K.buffer),new Uint8Array(re.buffer))===0;if(b(K)!==b(re))return!1;pe=pe||{actual:[],expected:[]};var ie=pe.actual.indexOf(K);return ie!==-1&&ie===pe.expected.indexOf(re)?!0:(pe.actual.push(K),pe.expected.push(re),k(K,re,ne,pe))}function B(K){return Object.prototype.toString.call(K)=="[object Arguments]"}function k(K,re,ne,pe){if(K==null||re===null||re===void 0)return!1;if(g.isPrimitive(K)||g.isPrimitive(re))return K===re;if(ne&&Object.getPrototypeOf(K)!==Object.getPrototypeOf(re))return!1;var ie=B(K),Ae=B(re);if(ie&&!Ae||!ie&&Ae)return!1;if(ie)return K=c.call(K),re=c.call(re),X(K,re,ne);var Y=N(K),fe=N(re),ve,be;if(Y.length!==fe.length)return!1;for(Y.sort(),fe.sort(),be=Y.length-1;be>=0;be--)if(Y[be]!==fe[be])return!1;for(be=Y.length-1;be>=0;be--)if(ve=Y[be],!X(K[ve],re[ve],ne,pe))return!1;return!0}E.notDeepEqual=function(re,ne,pe){X(re,ne,!1)&&J(re,ne,pe,"notDeepEqual",E.notDeepEqual)},E.notDeepStrictEqual=D;function D(K,re,ne){X(K,re,!0)&&J(K,re,ne,"notDeepStrictEqual",D)}E.strictEqual=function(re,ne,pe){re!==ne&&J(re,ne,pe,"===",E.strictEqual)},E.notStrictEqual=function(re,ne,pe){re===ne&&J(re,ne,pe,"!==",E.notStrictEqual)};function L(K,re){if(!K||!re)return!1;if(Object.prototype.toString.call(re)=="[object RegExp]")return re.test(K);try{if(K instanceof re)return!0}catch(ne){}return Error.isPrototypeOf(re)?!1:re.call({},K)===!0}function q(K){var re;try{K()}catch(ne){re=ne}return re}function G(K,re,ne,pe){var ie;if(typeof re!="function")throw new TypeError('"block" argument must be a function');typeof ne=="string"&&(pe=ne,ne=null),ie=q(re),pe=(ne&&ne.name?" ("+ne.name+").":".")+(pe?" "+pe:"."),K&&!ie&&J(ie,ne,"Missing expected exception"+pe);var Ae=typeof pe=="string",Y=!K&&g.isError(ie),fe=!K&&ie&&!ne;if((Y&&Ae&&L(ie,ne)||fe)&&J(ie,ne,"Got unwanted exception"+pe),K&&ie&&ne&&!L(ie,ne)||!K&&ie)throw ie}E.throws=function(K,re,ne){G(!0,K,re,ne)},E.doesNotThrow=function(K,re,ne){G(!1,K,re,ne)},E.ifError=function(K){if(K)throw K};function F(K,re){K||J(K,!0,re,"==",F)}E.strict=d(F,E,{equal:E.strictEqual,deepEqual:E.deepStrictEqual,notEqual:E.notStrictEqual,notDeepEqual:E.notDeepStrictEqual}),E.strict.strict=E.strict;var N=Object.keys||function(K){var re=[];for(var ne in K)w.call(K,ne)&&re.push(ne);return re}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"object-assign":377,"util/":85}],83:[function(o,_,j){typeof Object.create=="function"?_.exports=function(d,p){d.super_=p,d.prototype=Object.create(p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}})}:_.exports=function(d,p){d.super_=p;var b=function(){};b.prototype=p.prototype,d.prototype=new b,d.prototype.constructor=d}},{}],84:[function(o,_,j){_.exports=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}},{}],85:[function(o,_,j){(function(h,d){(function(){var p=/%[sdj%]/g;j.format=function(fe){if(!k(fe)){for(var ve=[],be=0;be<arguments.length;be++)ve.push(w(arguments[be]));return ve.join(" ")}for(var be=1,le=arguments,ue=le.length,ge=String(fe).replace(p,function(ke){if(ke==="%%")return"%";if(be>=ue)return ke;switch(ke){case"%s":return String(le[be++]);case"%d":return Number(le[be++]);case"%j":try{return JSON.stringify(le[be++])}catch(Ie){return"[Circular]"}default:return ke}}),Ee=le[be];be<ue;Ee=le[++be])P(Ee)||!G(Ee)?ge+=" "+Ee:ge+=" "+w(Ee);return ge},j.deprecate=function(fe,ve){if(L(d.process))return function(){return j.deprecate(fe,ve).apply(this,arguments)};if(h.noDeprecation===!0)return fe;var be=!1;function le(){if(!be){if(h.throwDeprecation)throw new Error(ve);h.traceDeprecation?console.trace(ve):console.error(ve),be=!0}return fe.apply(this,arguments)}return le};var b={},g;j.debuglog=function(fe){if(L(g)&&(g=h.env.NODE_DEBUG||""),fe=fe.toUpperCase(),!b[fe])if(new RegExp("\\b"+fe+"\\b","i").test(g)){var ve=h.pid;b[fe]=function(){var be=j.format.apply(j,arguments);console.error("%s %d: %s",fe,ve,be)}}else b[fe]=function(){};return b[fe]};function w(fe,ve){var be={seen:[],stylize:m};return arguments.length>=3&&(be.depth=arguments[2]),arguments.length>=4&&(be.colors=arguments[3]),J(ve)?be.showHidden=ve:ve&&j._extend(be,ve),L(be.showHidden)&&(be.showHidden=!1),L(be.depth)&&(be.depth=2),L(be.colors)&&(be.colors=!1),L(be.customInspect)&&(be.customInspect=!0),be.colors&&(be.stylize=c),y(be,fe,be.depth)}j.inspect=w,w.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},w.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(fe,ve){var be=w.styles[ve];return be?"\x1B["+w.colors[be][0]+"m"+fe+"\x1B["+w.colors[be][1]+"m":fe}function m(fe,ve){return fe}function v(fe){var ve={};return fe.forEach(function(be,le){ve[be]=!0}),ve}function y(fe,ve,be){if(fe.customInspect&&ve&&K(ve.inspect)&&ve.inspect!==j.inspect&&!(ve.constructor&&ve.constructor.prototype===ve)){var le=ve.inspect(be,fe);return k(le)||(le=y(fe,le,be)),le}var ue=E(fe,ve);if(ue)return ue;var ge=Object.keys(ve),Ee=v(ge);if(fe.showHidden&&(ge=Object.getOwnPropertyNames(ve)),N(ve)&&(ge.indexOf("message")>=0||ge.indexOf("description")>=0))return T(ve);if(ge.length===0){if(K(ve)){var ke=ve.name?": "+ve.name:"";return fe.stylize("[Function"+ke+"]","special")}if(q(ve))return fe.stylize(RegExp.prototype.toString.call(ve),"regexp");if(F(ve))return fe.stylize(Date.prototype.toString.call(ve),"date");if(N(ve))return T(ve)}var Ie="",de=!1,Z=["{","}"];if(O(ve)&&(de=!0,Z=["[","]"]),K(ve)){var ye=ve.name?": "+ve.name:"";Ie=" [Function"+ye+"]"}if(q(ve)&&(Ie=" "+RegExp.prototype.toString.call(ve)),F(ve)&&(Ie=" "+Date.prototype.toUTCString.call(ve)),N(ve)&&(Ie=" "+T(ve)),ge.length===0&&(!de||ve.length==0))return Z[0]+Ie+Z[1];if(be<0)return q(ve)?fe.stylize(RegExp.prototype.toString.call(ve),"regexp"):fe.stylize("[Object]","special");fe.seen.push(ve);var V;return de?V=S(fe,ve,be,Ee,ge):V=ge.map(function(Q){return C(fe,ve,be,Ee,Q,de)}),fe.seen.pop(),x(V,Ie,Z)}function E(fe,ve){if(L(ve))return fe.stylize("undefined","undefined");if(k(ve)){var be="'"+JSON.stringify(ve).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return fe.stylize(be,"string")}if(B(ve))return fe.stylize(""+ve,"number");if(J(ve))return fe.stylize(""+ve,"boolean");if(P(ve))return fe.stylize("null","null")}function T(fe){return"["+Error.prototype.toString.call(fe)+"]"}function S(fe,ve,be,le,ue){for(var ge=[],Ee=0,ke=ve.length;Ee<ke;++Ee)Y(ve,String(Ee))?ge.push(C(fe,ve,be,le,String(Ee),!0)):ge.push("");return ue.forEach(function(Ie){Ie.match(/^\d+$/)||ge.push(C(fe,ve,be,le,Ie,!0))}),ge}function C(fe,ve,be,le,ue,ge){var Ee,ke,Ie;if(Ie=Object.getOwnPropertyDescriptor(ve,ue)||{value:ve[ue]},Ie.get?Ie.set?ke=fe.stylize("[Getter/Setter]","special"):ke=fe.stylize("[Getter]","special"):Ie.set&&(ke=fe.stylize("[Setter]","special")),Y(le,ue)||(Ee="["+ue+"]"),ke||(fe.seen.indexOf(Ie.value)<0?(P(be)?ke=y(fe,Ie.value,null):ke=y(fe,Ie.value,be-1),ke.indexOf(`
|
|
`)>-1&&(ge?ke=ke.split(`
|
|
`).map(function(de){return" "+de}).join(`
|
|
`).substr(2):ke=`
|
|
`+ke.split(`
|
|
`).map(function(de){return" "+de}).join(`
|
|
`))):ke=fe.stylize("[Circular]","special")),L(Ee)){if(ge&&ue.match(/^\d+$/))return ke;Ee=JSON.stringify(""+ue),Ee.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Ee=Ee.substr(1,Ee.length-2),Ee=fe.stylize(Ee,"name")):(Ee=Ee.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Ee=fe.stylize(Ee,"string"))}return Ee+": "+ke}function x(fe,ve,be){var le=0,ue=fe.reduce(function(ge,Ee){return le++,Ee.indexOf(`
|
|
`)>=0&&le++,ge+Ee.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ue>60?be[0]+(ve===""?"":ve+`
|
|
`)+" "+fe.join(`,
|
|
`)+" "+be[1]:be[0]+ve+" "+fe.join(", ")+" "+be[1]}function O(fe){return Array.isArray(fe)}j.isArray=O;function J(fe){return typeof fe=="boolean"}j.isBoolean=J;function P(fe){return fe===null}j.isNull=P;function X(fe){return fe==null}j.isNullOrUndefined=X;function B(fe){return typeof fe=="number"}j.isNumber=B;function k(fe){return typeof fe=="string"}j.isString=k;function D(fe){return typeof fe=="symbol"}j.isSymbol=D;function L(fe){return fe===void 0}j.isUndefined=L;function q(fe){return G(fe)&&ne(fe)==="[object RegExp]"}j.isRegExp=q;function G(fe){return typeof fe=="object"&&fe!==null}j.isObject=G;function F(fe){return G(fe)&&ne(fe)==="[object Date]"}j.isDate=F;function N(fe){return G(fe)&&(ne(fe)==="[object Error]"||fe instanceof Error)}j.isError=N;function K(fe){return typeof fe=="function"}j.isFunction=K;function re(fe){return fe===null||typeof fe=="boolean"||typeof fe=="number"||typeof fe=="string"||typeof fe=="symbol"||typeof fe=="undefined"}j.isPrimitive=re,j.isBuffer=o("./support/isBuffer");function ne(fe){return Object.prototype.toString.call(fe)}function pe(fe){return fe<10?"0"+fe.toString(10):fe.toString(10)}var ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ae(){var fe=new Date,ve=[pe(fe.getHours()),pe(fe.getMinutes()),pe(fe.getSeconds())].join(":");return[fe.getDate(),ie[fe.getMonth()],ve].join(" ")}j.log=function(){console.log("%s - %s",Ae(),j.format.apply(j,arguments))},j.inherits=o("inherits"),j._extend=function(fe,ve){if(!ve||!G(ve))return fe;for(var be=Object.keys(ve),le=be.length;le--;)fe[be[le]]=ve[be[le]];return fe};function Y(fe,ve){return Object.prototype.hasOwnProperty.call(fe,ve)}}).call(this)}).call(this,o("_process"),typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":84,_process:467,inherits:83}],86:[function(o,_,j){(function(h){(function(){"use strict";var d=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],p=typeof globalThis=="undefined"?h:globalThis;_.exports=function(){for(var g=[],w=0;w<d.length;w++)typeof p[d[w]]=="function"&&(g[g.length]=d[w]);return g}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],87:[function(o,_,j){"use strict";j.byteLength=m,j.toByteArray=y,j.fromByteArray=S;for(var h=[],d=[],p=typeof Uint8Array!="undefined"?Uint8Array:Array,b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,w=b.length;g<w;++g)h[g]=b[g],d[b.charCodeAt(g)]=g;d[45]=62,d[95]=63;function c(C){var x=C.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var O=C.indexOf("=");O===-1&&(O=x);var J=O===x?0:4-O%4;return[O,J]}function m(C){var x=c(C),O=x[0],J=x[1];return(O+J)*3/4-J}function v(C,x,O){return(x+O)*3/4-O}function y(C){var x,O=c(C),J=O[0],P=O[1],X=new p(v(C,J,P)),B=0,k=P>0?J-4:J,D;for(D=0;D<k;D+=4)x=d[C.charCodeAt(D)]<<18|d[C.charCodeAt(D+1)]<<12|d[C.charCodeAt(D+2)]<<6|d[C.charCodeAt(D+3)],X[B++]=x>>16&255,X[B++]=x>>8&255,X[B++]=x&255;return P===2&&(x=d[C.charCodeAt(D)]<<2|d[C.charCodeAt(D+1)]>>4,X[B++]=x&255),P===1&&(x=d[C.charCodeAt(D)]<<10|d[C.charCodeAt(D+1)]<<4|d[C.charCodeAt(D+2)]>>2,X[B++]=x>>8&255,X[B++]=x&255),X}function E(C){return h[C>>18&63]+h[C>>12&63]+h[C>>6&63]+h[C&63]}function T(C,x,O){for(var J,P=[],X=x;X<O;X+=3)J=(C[X]<<16&16711680)+(C[X+1]<<8&65280)+(C[X+2]&255),P.push(E(J));return P.join("")}function S(C){for(var x,O=C.length,J=O%3,P=[],X=16383,B=0,k=O-J;B<k;B+=X)P.push(T(C,B,B+X>k?k:B+X));return J===1?(x=C[O-1],P.push(h[x>>2]+h[x<<4&63]+"==")):J===2&&(x=(C[O-2]<<8)+C[O-1],P.push(h[x>>10]+h[x>>4&63]+h[x<<2&63]+"=")),P.join("")}},{}],88:[function(o,_,j){(function(h,d,p){typeof _!="undefined"&&_.exports?_.exports=p():typeof Le=="function"&&Le.amd?Le(d,p):h[d]=p()})(this,"bowser",function(){var h=!0;function d(v){function y(ve){var be=v.match(ve);return be&&be.length>1&&be[1]||""}function E(ve){var be=v.match(ve);return be&&be.length>1&&be[2]||""}var T=y(/(ipod|iphone|ipad)/i).toLowerCase(),S=/like android/i.test(v),C=!S&&/android/i.test(v),x=/nexus\s*[0-6]\s*/i.test(v),O=!x&&/nexus\s*[0-9]+/i.test(v),J=/CrOS/.test(v),P=/silk/i.test(v),X=/sailfish/i.test(v),B=/tizen/i.test(v),k=/(web|hpw)(o|0)s/i.test(v),D=/windows phone/i.test(v),L=/SamsungBrowser/i.test(v),q=!D&&/windows/i.test(v),G=!T&&!P&&/macintosh/i.test(v),F=!C&&!X&&!B&&!k&&/linux/i.test(v),N=E(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),K=y(/version\/(\d+(\.\d+)?)/i),re=/tablet/i.test(v)&&!/tablet pc/i.test(v),ne=!re&&/[^-]mobi/i.test(v),pe=/xbox/i.test(v),ie;/opera/i.test(v)?ie={name:"Opera",opera:h,version:K||y(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(v)?ie={name:"Opera",opera:h,version:y(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||K}:/SamsungBrowser/i.test(v)?ie={name:"Samsung Internet for Android",samsungBrowser:h,version:K||y(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(v)?ie={name:"NAVER Whale browser",whale:h,version:y(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(v)?ie={name:"MZ Browser",mzbrowser:h,version:y(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(v)?ie={name:"Opera Coast",coast:h,version:K||y(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(v)?ie={name:"Focus",focus:h,version:y(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(v)?ie={name:"Yandex Browser",yandexbrowser:h,version:K||y(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(v)?ie={name:"UC Browser",ucbrowser:h,version:y(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(v)?ie={name:"Maxthon",maxthon:h,version:y(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(v)?ie={name:"Epiphany",epiphany:h,version:y(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(v)?ie={name:"Puffin",puffin:h,version:y(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(v)?ie={name:"Sleipnir",sleipnir:h,version:y(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(v)?ie={name:"K-Meleon",kMeleon:h,version:y(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:D?(ie={name:"Windows Phone",osname:"Windows Phone",windowsphone:h},N?(ie.msedge=h,ie.version=N):(ie.msie=h,ie.version=y(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(v)?ie={name:"Internet Explorer",msie:h,version:y(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:J?ie={name:"Chrome",osname:"Chrome OS",chromeos:h,chromeBook:h,chrome:h,version:y(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(v)?ie={name:"Microsoft Edge",msedge:h,version:N}:/vivaldi/i.test(v)?ie={name:"Vivaldi",vivaldi:h,version:y(/vivaldi\/(\d+(\.\d+)?)/i)||K}:X?ie={name:"Sailfish",osname:"Sailfish OS",sailfish:h,version:y(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(v)?ie={name:"SeaMonkey",seamonkey:h,version:y(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(v)?(ie={name:"Firefox",firefox:h,version:y(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(v)&&(ie.firefoxos=h,ie.osname="Firefox OS")):P?ie={name:"Amazon Silk",silk:h,version:y(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(v)?ie={name:"PhantomJS",phantom:h,version:y(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(v)?ie={name:"SlimerJS",slimer:h,version:y(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(v)||/rim\stablet/i.test(v)?ie={name:"BlackBerry",osname:"BlackBerry OS",blackberry:h,version:K||y(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:k?(ie={name:"WebOS",osname:"WebOS",webos:h,version:K||y(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(v)&&(ie.touchpad=h)):/bada/i.test(v)?ie={name:"Bada",osname:"Bada",bada:h,version:y(/dolfin\/(\d+(\.\d+)?)/i)}:B?ie={name:"Tizen",osname:"Tizen",tizen:h,version:y(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||K}:/qupzilla/i.test(v)?ie={name:"QupZilla",qupzilla:h,version:y(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||K}:/chromium/i.test(v)?ie={name:"Chromium",chromium:h,version:y(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||K}:/chrome|crios|crmo/i.test(v)?ie={name:"Chrome",chrome:h,version:y(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:C?ie={name:"Android",version:K}:/safari|applewebkit/i.test(v)?(ie={name:"Safari",safari:h},K&&(ie.version=K)):T?(ie={name:T=="iphone"?"iPhone":T=="ipad"?"iPad":"iPod"},K&&(ie.version=K)):/googlebot/i.test(v)?ie={name:"Googlebot",googlebot:h,version:y(/googlebot\/(\d+(\.\d+))/i)||K}:ie={name:y(/^(.*)\/(.*) /),version:E(/^(.*)\/(.*) /)},!ie.msedge&&/(apple)?webkit/i.test(v)?(/(apple)?webkit\/537\.36/i.test(v)?(ie.name=ie.name||"Blink",ie.blink=h):(ie.name=ie.name||"Webkit",ie.webkit=h),!ie.version&&K&&(ie.version=K)):!ie.opera&&/gecko\//i.test(v)&&(ie.name=ie.name||"Gecko",ie.gecko=h,ie.version=ie.version||y(/gecko\/(\d+(\.\d+)?)/i)),!ie.windowsphone&&(C||ie.silk)?(ie.android=h,ie.osname="Android"):!ie.windowsphone&&T?(ie[T]=h,ie.ios=h,ie.osname="iOS"):G?(ie.mac=h,ie.osname="macOS"):pe?(ie.xbox=h,ie.osname="Xbox"):q?(ie.windows=h,ie.osname="Windows"):F&&(ie.linux=h,ie.osname="Linux");function Ae(ve){switch(ve){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}}var Y="";ie.windows?Y=Ae(y(/Windows ((NT|XP)( \d\d?.\d)?)/i)):ie.windowsphone?Y=y(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):ie.mac?(Y=y(/Mac OS X (\d+([_\.\s]\d+)*)/i),Y=Y.replace(/[_\s]/g,".")):T?(Y=y(/os (\d+([_\s]\d+)*) like mac os x/i),Y=Y.replace(/[_\s]/g,".")):C?Y=y(/android[ \/-](\d+(\.\d+)*)/i):ie.webos?Y=y(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):ie.blackberry?Y=y(/rim\stablet\sos\s(\d+(\.\d+)*)/i):ie.bada?Y=y(/bada\/(\d+(\.\d+)*)/i):ie.tizen&&(Y=y(/tizen[\/\s](\d+(\.\d+)*)/i)),Y&&(ie.osversion=Y);var fe=!ie.windows&&Y.split(".")[0];return re||O||T=="ipad"||C&&(fe==3||fe>=4&&!ne)||ie.silk?ie.tablet=h:(ne||T=="iphone"||T=="ipod"||C||x||ie.blackberry||ie.webos||ie.bada)&&(ie.mobile=h),ie.msedge||ie.msie&&ie.version>=10||ie.yandexbrowser&&ie.version>=15||ie.vivaldi&&ie.version>=1||ie.chrome&&ie.version>=20||ie.samsungBrowser&&ie.version>=4||ie.whale&&w([ie.version,"1.0"])===1||ie.mzbrowser&&w([ie.version,"6.0"])===1||ie.focus&&w([ie.version,"1.0"])===1||ie.firefox&&ie.version>=20||ie.safari&&ie.version>=6||ie.opera&&ie.version>=10||ie.ios&&ie.osversion&&ie.osversion.split(".")[0]>=6||ie.blackberry&&ie.version>=10.1||ie.chromium&&ie.version>=20?ie.a=h:ie.msie&&ie.version<10||ie.chrome&&ie.version<20||ie.firefox&&ie.version<20||ie.safari&&ie.version<6||ie.opera&&ie.version<10||ie.ios&&ie.osversion&&ie.osversion.split(".")[0]<6||ie.chromium&&ie.version<20?ie.c=h:ie.x=h,ie}var p=d(typeof navigator!="undefined"&&navigator.userAgent||"");p.test=function(v){for(var y=0;y<v.length;++y){var E=v[y];if(typeof E=="string"&&E in p)return!0}return!1};function b(v){return v.split(".").length}function g(v,y){var E=[],T;if(Array.prototype.map)return Array.prototype.map.call(v,y);for(T=0;T<v.length;T++)E.push(y(v[T]));return E}function w(v){for(var y=Math.max(b(v[0]),b(v[1])),E=g(v,function(T){var S=y-b(T);return T=T+new Array(S+1).join(".0"),g(T.split("."),function(C){return new Array(20-C.length).join("0")+C}).reverse()});--y>=0;){if(E[0][y]>E[1][y])return 1;if(E[0][y]===E[1][y]){if(y===0)return 0}else return-1}}function c(v,y,E){var T=p;typeof y=="string"&&(E=y,y=void 0),y===void 0&&(y=!1),E&&(T=d(E));var S=""+T.version;for(var C in v)if(v.hasOwnProperty(C)&&T[C]){if(typeof v[C]!="string")throw new Error("Browser version in the minVersion map should be a string: "+C+": "+String(v));return w([S,v[C]])<0}return y}function m(v,y,E){return!c(v,y,E)}return p.isUnsupportedBrowser=c,p.compareVersions=w,p.check=m,p._detect=d,p.detect=d,p})},{}],89:[function(o,_,j){},{}],90:[function(o,_,j){(function(h){(function(){"use strict";var d=o("base64-js"),p=o("ieee754");j.Buffer=c,j.SlowBuffer=J,j.INSPECT_MAX_BYTES=50;var b=2147483647;j.kMaxLength=b,c.TYPED_ARRAY_SUPPORT=g(),!c.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{var W=new Uint8Array(1);return W.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},W.foo()===42}catch(M){return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function w(W){if(W>b)throw new RangeError('The value "'+W+'" is invalid for option "size"');var M=new Uint8Array(W);return M.__proto__=c.prototype,M}function c(W,M,$){if(typeof W=="number"){if(typeof M=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(W)}return m(W,M,$)}typeof Symbol!="undefined"&&Symbol.species!=null&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192;function m(W,M,$){if(typeof W=="string")return T(W,M);if(ArrayBuffer.isView(W))return S(W);if(W==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W);if(H(W,ArrayBuffer)||W&&H(W.buffer,ArrayBuffer))return C(W,M,$);if(typeof W=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ce=W.valueOf&&W.valueOf();if(ce!=null&&ce!==W)return c.from(ce,M,$);var Ce=x(W);if(Ce)return Ce;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof W[Symbol.toPrimitive]=="function")return c.from(W[Symbol.toPrimitive]("string"),M,$);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof W)}c.from=function(W,M,$){return m(W,M,$)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array;function v(W){if(typeof W!="number")throw new TypeError('"size" argument must be of type number');if(W<0)throw new RangeError('The value "'+W+'" is invalid for option "size"')}function y(W,M,$){return v(W),W<=0?w(W):M!==void 0?typeof $=="string"?w(W).fill(M,$):w(W).fill(M):w(W)}c.alloc=function(W,M,$){return y(W,M,$)};function E(W){return v(W),w(W<0?0:O(W)|0)}c.allocUnsafe=function(W){return E(W)},c.allocUnsafeSlow=function(W){return E(W)};function T(W,M){if((typeof M!="string"||M==="")&&(M="utf8"),!c.isEncoding(M))throw new TypeError("Unknown encoding: "+M);var $=P(W,M)|0,ce=w($),Ce=ce.write(W,M);return Ce!==$&&(ce=ce.slice(0,Ce)),ce}function S(W){for(var M=W.length<0?0:O(W.length)|0,$=w(M),ce=0;ce<M;ce+=1)$[ce]=W[ce]&255;return $}function C(W,M,$){if(M<0||W.byteLength<M)throw new RangeError('"offset" is outside of buffer bounds');if(W.byteLength<M+($||0))throw new RangeError('"length" is outside of buffer bounds');var ce;return M===void 0&&$===void 0?ce=new Uint8Array(W):$===void 0?ce=new Uint8Array(W,M):ce=new Uint8Array(W,M,$),ce.__proto__=c.prototype,ce}function x(W){if(c.isBuffer(W)){var M=O(W.length)|0,$=w(M);return $.length===0||W.copy($,0,0,M),$}if(W.length!==void 0)return typeof W.length!="number"||ee(W.length)?w(0):S(W);if(W.type==="Buffer"&&Array.isArray(W.data))return S(W.data)}function O(W){if(W>=b)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+b.toString(16)+" bytes");return W|0}function J(W){return+W!=W&&(W=0),c.alloc(+W)}c.isBuffer=function(M){return M!=null&&M._isBuffer===!0&&M!==c.prototype},c.compare=function(M,$){if(H(M,Uint8Array)&&(M=c.from(M,M.offset,M.byteLength)),H($,Uint8Array)&&($=c.from($,$.offset,$.byteLength)),!c.isBuffer(M)||!c.isBuffer($))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(M===$)return 0;for(var ce=M.length,Ce=$.length,Ue=0,_e=Math.min(ce,Ce);Ue<_e;++Ue)if(M[Ue]!==$[Ue]){ce=M[Ue],Ce=$[Ue];break}return ce<Ce?-1:Ce<ce?1:0},c.isEncoding=function(M){switch(String(M).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(M,$){if(!Array.isArray(M))throw new TypeError('"list" argument must be an Array of Buffers');if(M.length===0)return c.alloc(0);var ce;if($===void 0)for($=0,ce=0;ce<M.length;++ce)$+=M[ce].length;var Ce=c.allocUnsafe($),Ue=0;for(ce=0;ce<M.length;++ce){var _e=M[ce];if(H(_e,Uint8Array)&&(_e=c.from(_e)),!c.isBuffer(_e))throw new TypeError('"list" argument must be an Array of Buffers');_e.copy(Ce,Ue),Ue+=_e.length}return Ce};function P(W,M){if(c.isBuffer(W))return W.length;if(ArrayBuffer.isView(W)||H(W,ArrayBuffer))return W.byteLength;if(typeof W!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof W);var $=W.length,ce=arguments.length>2&&arguments[2]===!0;if(!ce&&$===0)return 0;for(var Ce=!1;;)switch(M){case"ascii":case"latin1":case"binary":return $;case"utf8":case"utf-8":return Z(W).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $*2;case"hex":return $>>>1;case"base64":return Q(W).length;default:if(Ce)return ce?-1:Z(W).length;M=(""+M).toLowerCase(),Ce=!0}}c.byteLength=P;function X(W,M,$){var ce=!1;if((M===void 0||M<0)&&(M=0),M>this.length||(($===void 0||$>this.length)&&($=this.length),$<=0)||($>>>=0,M>>>=0,$<=M))return"";for(W||(W="utf8");;)switch(W){case"hex":return fe(this,M,$);case"utf8":case"utf-8":return ne(this,M,$);case"ascii":return Ae(this,M,$);case"latin1":case"binary":return Y(this,M,$);case"base64":return re(this,M,$);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,M,$);default:if(ce)throw new TypeError("Unknown encoding: "+W);W=(W+"").toLowerCase(),ce=!0}}c.prototype._isBuffer=!0;function B(W,M,$){var ce=W[M];W[M]=W[$],W[$]=ce}c.prototype.swap16=function(){var M=this.length;if(M%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var $=0;$<M;$+=2)B(this,$,$+1);return this},c.prototype.swap32=function(){var M=this.length;if(M%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var $=0;$<M;$+=4)B(this,$,$+3),B(this,$+1,$+2);return this},c.prototype.swap64=function(){var M=this.length;if(M%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var $=0;$<M;$+=8)B(this,$,$+7),B(this,$+1,$+6),B(this,$+2,$+5),B(this,$+3,$+4);return this},c.prototype.toString=function(){var M=this.length;return M===0?"":arguments.length===0?ne(this,0,M):X.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(M){if(!c.isBuffer(M))throw new TypeError("Argument must be a Buffer");return this===M?!0:c.compare(this,M)===0},c.prototype.inspect=function(){var M="",$=j.INSPECT_MAX_BYTES;return M=this.toString("hex",0,$).replace(/(.{2})/g,"$1 ").trim(),this.length>$&&(M+=" ... "),"<Buffer "+M+">"},c.prototype.compare=function(M,$,ce,Ce,Ue){if(H(M,Uint8Array)&&(M=c.from(M,M.offset,M.byteLength)),!c.isBuffer(M))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof M);if($===void 0&&($=0),ce===void 0&&(ce=M?M.length:0),Ce===void 0&&(Ce=0),Ue===void 0&&(Ue=this.length),$<0||ce>M.length||Ce<0||Ue>this.length)throw new RangeError("out of range index");if(Ce>=Ue&&$>=ce)return 0;if(Ce>=Ue)return-1;if($>=ce)return 1;if($>>>=0,ce>>>=0,Ce>>>=0,Ue>>>=0,this===M)return 0;for(var _e=Ue-Ce,he=ce-$,Te=Math.min(_e,he),Pe=this.slice(Ce,Ue),Ve=M.slice($,ce),De=0;De<Te;++De)if(Pe[De]!==Ve[De]){_e=Pe[De],he=Ve[De];break}return _e<he?-1:he<_e?1:0};function k(W,M,$,ce,Ce){if(W.length===0)return-1;if(typeof $=="string"?(ce=$,$=0):$>2147483647?$=2147483647:$<-2147483648&&($=-2147483648),$=+$,ee($)&&($=Ce?0:W.length-1),$<0&&($=W.length+$),$>=W.length){if(Ce)return-1;$=W.length-1}else if($<0)if(Ce)$=0;else return-1;if(typeof M=="string"&&(M=c.from(M,ce)),c.isBuffer(M))return M.length===0?-1:D(W,M,$,ce,Ce);if(typeof M=="number")return M=M&255,typeof Uint8Array.prototype.indexOf=="function"?Ce?Uint8Array.prototype.indexOf.call(W,M,$):Uint8Array.prototype.lastIndexOf.call(W,M,$):D(W,[M],$,ce,Ce);throw new TypeError("val must be string, number or Buffer")}function D(W,M,$,ce,Ce){var Ue=1,_e=W.length,he=M.length;if(ce!==void 0&&(ce=String(ce).toLowerCase(),ce==="ucs2"||ce==="ucs-2"||ce==="utf16le"||ce==="utf-16le")){if(W.length<2||M.length<2)return-1;Ue=2,_e/=2,he/=2,$/=2}function Te(Ke,$e){return Ue===1?Ke[$e]:Ke.readUInt16BE($e*Ue)}var Pe;if(Ce){var Ve=-1;for(Pe=$;Pe<_e;Pe++)if(Te(W,Pe)===Te(M,Ve===-1?0:Pe-Ve)){if(Ve===-1&&(Ve=Pe),Pe-Ve+1===he)return Ve*Ue}else Ve!==-1&&(Pe-=Pe-Ve),Ve=-1}else for($+he>_e&&($=_e-he),Pe=$;Pe>=0;Pe--){for(var De=!0,Xe=0;Xe<he;Xe++)if(Te(W,Pe+Xe)!==Te(M,Xe)){De=!1;break}if(De)return Pe}return-1}c.prototype.includes=function(M,$,ce){return this.indexOf(M,$,ce)!==-1},c.prototype.indexOf=function(M,$,ce){return k(this,M,$,ce,!0)},c.prototype.lastIndexOf=function(M,$,ce){return k(this,M,$,ce,!1)};function L(W,M,$,ce){$=Number($)||0;var Ce=W.length-$;ce?(ce=Number(ce),ce>Ce&&(ce=Ce)):ce=Ce;var Ue=M.length;ce>Ue/2&&(ce=Ue/2);for(var _e=0;_e<ce;++_e){var he=parseInt(M.substr(_e*2,2),16);if(ee(he))return _e;W[$+_e]=he}return _e}function q(W,M,$,ce){return U(Z(M,W.length-$),W,$,ce)}function G(W,M,$,ce){return U(ye(M),W,$,ce)}function F(W,M,$,ce){return G(W,M,$,ce)}function N(W,M,$,ce){return U(Q(M),W,$,ce)}function K(W,M,$,ce){return U(V(M,W.length-$),W,$,ce)}c.prototype.write=function(M,$,ce,Ce){if($===void 0)Ce="utf8",ce=this.length,$=0;else if(ce===void 0&&typeof $=="string")Ce=$,ce=this.length,$=0;else if(isFinite($))$=$>>>0,isFinite(ce)?(ce=ce>>>0,Ce===void 0&&(Ce="utf8")):(Ce=ce,ce=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ue=this.length-$;if((ce===void 0||ce>Ue)&&(ce=Ue),M.length>0&&(ce<0||$<0)||$>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ce||(Ce="utf8");for(var _e=!1;;)switch(Ce){case"hex":return L(this,M,$,ce);case"utf8":case"utf-8":return q(this,M,$,ce);case"ascii":return G(this,M,$,ce);case"latin1":case"binary":return F(this,M,$,ce);case"base64":return N(this,M,$,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,M,$,ce);default:if(_e)throw new TypeError("Unknown encoding: "+Ce);Ce=(""+Ce).toLowerCase(),_e=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(W,M,$){return M===0&&$===W.length?d.fromByteArray(W):d.fromByteArray(W.slice(M,$))}function ne(W,M,$){$=Math.min(W.length,$);for(var ce=[],Ce=M;Ce<$;){var Ue=W[Ce],_e=null,he=Ue>239?4:Ue>223?3:Ue>191?2:1;if(Ce+he<=$){var Te,Pe,Ve,De;switch(he){case 1:Ue<128&&(_e=Ue);break;case 2:Te=W[Ce+1],(Te&192)===128&&(De=(Ue&31)<<6|Te&63,De>127&&(_e=De));break;case 3:Te=W[Ce+1],Pe=W[Ce+2],(Te&192)===128&&(Pe&192)===128&&(De=(Ue&15)<<12|(Te&63)<<6|Pe&63,De>2047&&(De<55296||De>57343)&&(_e=De));break;case 4:Te=W[Ce+1],Pe=W[Ce+2],Ve=W[Ce+3],(Te&192)===128&&(Pe&192)===128&&(Ve&192)===128&&(De=(Ue&15)<<18|(Te&63)<<12|(Pe&63)<<6|Ve&63,De>65535&&De<1114112&&(_e=De))}}_e===null?(_e=65533,he=1):_e>65535&&(_e-=65536,ce.push(_e>>>10&1023|55296),_e=56320|_e&1023),ce.push(_e),Ce+=he}return ie(ce)}var pe=4096;function ie(W){var M=W.length;if(M<=pe)return String.fromCharCode.apply(String,W);for(var $="",ce=0;ce<M;)$+=String.fromCharCode.apply(String,W.slice(ce,ce+=pe));return $}function Ae(W,M,$){var ce="";$=Math.min(W.length,$);for(var Ce=M;Ce<$;++Ce)ce+=String.fromCharCode(W[Ce]&127);return ce}function Y(W,M,$){var ce="";$=Math.min(W.length,$);for(var Ce=M;Ce<$;++Ce)ce+=String.fromCharCode(W[Ce]);return ce}function fe(W,M,$){var ce=W.length;(!M||M<0)&&(M=0),(!$||$<0||$>ce)&&($=ce);for(var Ce="",Ue=M;Ue<$;++Ue)Ce+=de(W[Ue]);return Ce}function ve(W,M,$){for(var ce=W.slice(M,$),Ce="",Ue=0;Ue<ce.length;Ue+=2)Ce+=String.fromCharCode(ce[Ue]+ce[Ue+1]*256);return Ce}c.prototype.slice=function(M,$){var ce=this.length;M=~~M,$=$===void 0?ce:~~$,M<0?(M+=ce,M<0&&(M=0)):M>ce&&(M=ce),$<0?($+=ce,$<0&&($=0)):$>ce&&($=ce),$<M&&($=M);var Ce=this.subarray(M,$);return Ce.__proto__=c.prototype,Ce};function be(W,M,$){if(W%1!==0||W<0)throw new RangeError("offset is not uint");if(W+M>$)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUIntLE=function(M,$,ce){M=M>>>0,$=$>>>0,ce||be(M,$,this.length);for(var Ce=this[M],Ue=1,_e=0;++_e<$&&(Ue*=256);)Ce+=this[M+_e]*Ue;return Ce},c.prototype.readUIntBE=function(M,$,ce){M=M>>>0,$=$>>>0,ce||be(M,$,this.length);for(var Ce=this[M+--$],Ue=1;$>0&&(Ue*=256);)Ce+=this[M+--$]*Ue;return Ce},c.prototype.readUInt8=function(M,$){return M=M>>>0,$||be(M,1,this.length),this[M]},c.prototype.readUInt16LE=function(M,$){return M=M>>>0,$||be(M,2,this.length),this[M]|this[M+1]<<8},c.prototype.readUInt16BE=function(M,$){return M=M>>>0,$||be(M,2,this.length),this[M]<<8|this[M+1]},c.prototype.readUInt32LE=function(M,$){return M=M>>>0,$||be(M,4,this.length),(this[M]|this[M+1]<<8|this[M+2]<<16)+this[M+3]*16777216},c.prototype.readUInt32BE=function(M,$){return M=M>>>0,$||be(M,4,this.length),this[M]*16777216+(this[M+1]<<16|this[M+2]<<8|this[M+3])},c.prototype.readIntLE=function(M,$,ce){M=M>>>0,$=$>>>0,ce||be(M,$,this.length);for(var Ce=this[M],Ue=1,_e=0;++_e<$&&(Ue*=256);)Ce+=this[M+_e]*Ue;return Ue*=128,Ce>=Ue&&(Ce-=Math.pow(2,8*$)),Ce},c.prototype.readIntBE=function(M,$,ce){M=M>>>0,$=$>>>0,ce||be(M,$,this.length);for(var Ce=$,Ue=1,_e=this[M+--Ce];Ce>0&&(Ue*=256);)_e+=this[M+--Ce]*Ue;return Ue*=128,_e>=Ue&&(_e-=Math.pow(2,8*$)),_e},c.prototype.readInt8=function(M,$){return M=M>>>0,$||be(M,1,this.length),this[M]&128?(255-this[M]+1)*-1:this[M]},c.prototype.readInt16LE=function(M,$){M=M>>>0,$||be(M,2,this.length);var ce=this[M]|this[M+1]<<8;return ce&32768?ce|4294901760:ce},c.prototype.readInt16BE=function(M,$){M=M>>>0,$||be(M,2,this.length);var ce=this[M+1]|this[M]<<8;return ce&32768?ce|4294901760:ce},c.prototype.readInt32LE=function(M,$){return M=M>>>0,$||be(M,4,this.length),this[M]|this[M+1]<<8|this[M+2]<<16|this[M+3]<<24},c.prototype.readInt32BE=function(M,$){return M=M>>>0,$||be(M,4,this.length),this[M]<<24|this[M+1]<<16|this[M+2]<<8|this[M+3]},c.prototype.readFloatLE=function(M,$){return M=M>>>0,$||be(M,4,this.length),p.read(this,M,!0,23,4)},c.prototype.readFloatBE=function(M,$){return M=M>>>0,$||be(M,4,this.length),p.read(this,M,!1,23,4)},c.prototype.readDoubleLE=function(M,$){return M=M>>>0,$||be(M,8,this.length),p.read(this,M,!0,52,8)},c.prototype.readDoubleBE=function(M,$){return M=M>>>0,$||be(M,8,this.length),p.read(this,M,!1,52,8)};function le(W,M,$,ce,Ce,Ue){if(!c.isBuffer(W))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>Ce||M<Ue)throw new RangeError('"value" argument is out of bounds');if($+ce>W.length)throw new RangeError("Index out of range")}c.prototype.writeUIntLE=function(M,$,ce,Ce){if(M=+M,$=$>>>0,ce=ce>>>0,!Ce){var Ue=Math.pow(2,8*ce)-1;le(this,M,$,ce,Ue,0)}var _e=1,he=0;for(this[$]=M&255;++he<ce&&(_e*=256);)this[$+he]=M/_e&255;return $+ce},c.prototype.writeUIntBE=function(M,$,ce,Ce){if(M=+M,$=$>>>0,ce=ce>>>0,!Ce){var Ue=Math.pow(2,8*ce)-1;le(this,M,$,ce,Ue,0)}var _e=ce-1,he=1;for(this[$+_e]=M&255;--_e>=0&&(he*=256);)this[$+_e]=M/he&255;return $+ce},c.prototype.writeUInt8=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,1,255,0),this[$]=M&255,$+1},c.prototype.writeUInt16LE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,2,65535,0),this[$]=M&255,this[$+1]=M>>>8,$+2},c.prototype.writeUInt16BE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,2,65535,0),this[$]=M>>>8,this[$+1]=M&255,$+2},c.prototype.writeUInt32LE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,4,4294967295,0),this[$+3]=M>>>24,this[$+2]=M>>>16,this[$+1]=M>>>8,this[$]=M&255,$+4},c.prototype.writeUInt32BE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,4,4294967295,0),this[$]=M>>>24,this[$+1]=M>>>16,this[$+2]=M>>>8,this[$+3]=M&255,$+4},c.prototype.writeIntLE=function(M,$,ce,Ce){if(M=+M,$=$>>>0,!Ce){var Ue=Math.pow(2,8*ce-1);le(this,M,$,ce,Ue-1,-Ue)}var _e=0,he=1,Te=0;for(this[$]=M&255;++_e<ce&&(he*=256);)M<0&&Te===0&&this[$+_e-1]!==0&&(Te=1),this[$+_e]=(M/he>>0)-Te&255;return $+ce},c.prototype.writeIntBE=function(M,$,ce,Ce){if(M=+M,$=$>>>0,!Ce){var Ue=Math.pow(2,8*ce-1);le(this,M,$,ce,Ue-1,-Ue)}var _e=ce-1,he=1,Te=0;for(this[$+_e]=M&255;--_e>=0&&(he*=256);)M<0&&Te===0&&this[$+_e+1]!==0&&(Te=1),this[$+_e]=(M/he>>0)-Te&255;return $+ce},c.prototype.writeInt8=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,1,127,-128),M<0&&(M=255+M+1),this[$]=M&255,$+1},c.prototype.writeInt16LE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,2,32767,-32768),this[$]=M&255,this[$+1]=M>>>8,$+2},c.prototype.writeInt16BE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,2,32767,-32768),this[$]=M>>>8,this[$+1]=M&255,$+2},c.prototype.writeInt32LE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,4,2147483647,-2147483648),this[$]=M&255,this[$+1]=M>>>8,this[$+2]=M>>>16,this[$+3]=M>>>24,$+4},c.prototype.writeInt32BE=function(M,$,ce){return M=+M,$=$>>>0,ce||le(this,M,$,4,2147483647,-2147483648),M<0&&(M=4294967295+M+1),this[$]=M>>>24,this[$+1]=M>>>16,this[$+2]=M>>>8,this[$+3]=M&255,$+4};function ue(W,M,$,ce,Ce,Ue){if($+ce>W.length)throw new RangeError("Index out of range");if($<0)throw new RangeError("Index out of range")}function ge(W,M,$,ce,Ce){return M=+M,$=$>>>0,Ce||ue(W,M,$,4,34028234663852886e22,-34028234663852886e22),p.write(W,M,$,ce,23,4),$+4}c.prototype.writeFloatLE=function(M,$,ce){return ge(this,M,$,!0,ce)},c.prototype.writeFloatBE=function(M,$,ce){return ge(this,M,$,!1,ce)};function Ee(W,M,$,ce,Ce){return M=+M,$=$>>>0,Ce||ue(W,M,$,8,17976931348623157e292,-17976931348623157e292),p.write(W,M,$,ce,52,8),$+8}c.prototype.writeDoubleLE=function(M,$,ce){return Ee(this,M,$,!0,ce)},c.prototype.writeDoubleBE=function(M,$,ce){return Ee(this,M,$,!1,ce)},c.prototype.copy=function(M,$,ce,Ce){if(!c.isBuffer(M))throw new TypeError("argument should be a Buffer");if(ce||(ce=0),!Ce&&Ce!==0&&(Ce=this.length),$>=M.length&&($=M.length),$||($=0),Ce>0&&Ce<ce&&(Ce=ce),Ce===ce||M.length===0||this.length===0)return 0;if($<0)throw new RangeError("targetStart out of bounds");if(ce<0||ce>=this.length)throw new RangeError("Index out of range");if(Ce<0)throw new RangeError("sourceEnd out of bounds");Ce>this.length&&(Ce=this.length),M.length-$<Ce-ce&&(Ce=M.length-$+ce);var Ue=Ce-ce;if(this===M&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin($,ce,Ce);else if(this===M&&ce<$&&$<Ce)for(var _e=Ue-1;_e>=0;--_e)M[_e+$]=this[_e+ce];else Uint8Array.prototype.set.call(M,this.subarray(ce,Ce),$);return Ue},c.prototype.fill=function(M,$,ce,Ce){if(typeof M=="string"){if(typeof $=="string"?(Ce=$,$=0,ce=this.length):typeof ce=="string"&&(Ce=ce,ce=this.length),Ce!==void 0&&typeof Ce!="string")throw new TypeError("encoding must be a string");if(typeof Ce=="string"&&!c.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);if(M.length===1){var Ue=M.charCodeAt(0);(Ce==="utf8"&&Ue<128||Ce==="latin1")&&(M=Ue)}}else typeof M=="number"&&(M=M&255);if($<0||this.length<$||this.length<ce)throw new RangeError("Out of range index");if(ce<=$)return this;$=$>>>0,ce=ce===void 0?this.length:ce>>>0,M||(M=0);var _e;if(typeof M=="number")for(_e=$;_e<ce;++_e)this[_e]=M;else{var he=c.isBuffer(M)?M:c.from(M,Ce),Te=he.length;if(Te===0)throw new TypeError('The value "'+M+'" is invalid for argument "value"');for(_e=0;_e<ce-$;++_e)this[_e+$]=he[_e%Te]}return this};var ke=/[^+/0-9A-Za-z-_]/g;function Ie(W){if(W=W.split("=")[0],W=W.trim().replace(ke,""),W.length<2)return"";for(;W.length%4!==0;)W=W+"=";return W}function de(W){return W<16?"0"+W.toString(16):W.toString(16)}function Z(W,M){M=M||1/0;for(var $,ce=W.length,Ce=null,Ue=[],_e=0;_e<ce;++_e){if($=W.charCodeAt(_e),$>55295&&$<57344){if(!Ce){if($>56319){(M-=3)>-1&&Ue.push(239,191,189);continue}else if(_e+1===ce){(M-=3)>-1&&Ue.push(239,191,189);continue}Ce=$;continue}if($<56320){(M-=3)>-1&&Ue.push(239,191,189),Ce=$;continue}$=(Ce-55296<<10|$-56320)+65536}else Ce&&(M-=3)>-1&&Ue.push(239,191,189);if(Ce=null,$<128){if((M-=1)<0)break;Ue.push($)}else if($<2048){if((M-=2)<0)break;Ue.push($>>6|192,$&63|128)}else if($<65536){if((M-=3)<0)break;Ue.push($>>12|224,$>>6&63|128,$&63|128)}else if($<1114112){if((M-=4)<0)break;Ue.push($>>18|240,$>>12&63|128,$>>6&63|128,$&63|128)}else throw new Error("Invalid code point")}return Ue}function ye(W){for(var M=[],$=0;$<W.length;++$)M.push(W.charCodeAt($)&255);return M}function V(W,M){for(var $,ce,Ce,Ue=[],_e=0;_e<W.length&&!((M-=2)<0);++_e)$=W.charCodeAt(_e),ce=$>>8,Ce=$%256,Ue.push(Ce),Ue.push(ce);return Ue}function Q(W){return d.toByteArray(Ie(W))}function U(W,M,$,ce){for(var Ce=0;Ce<ce&&!(Ce+$>=M.length||Ce>=W.length);++Ce)M[Ce+$]=W[Ce];return Ce}function H(W,M){return W instanceof M||W!=null&&W.constructor!=null&&W.constructor.name!=null&&W.constructor.name===M.name}function ee(W){return W!==W}}).call(this)}).call(this,o("buffer").Buffer)},{"base64-js":87,buffer:90,ieee754:357}],91:[function(o,_,j){_.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],92:[function(o,_,j){"use strict";var h=o("get-intrinsic"),d=o("./"),p=d(h("String.prototype.indexOf"));_.exports=function(g,w){var c=h(g,!!w);return typeof c=="function"&&p(g,".prototype.")>-1?d(c):c}},{"./":93,"get-intrinsic":348}],93:[function(o,_,j){"use strict";var h=o("function-bind"),d=o("get-intrinsic"),p=d("%Function.prototype.apply%"),b=d("%Function.prototype.call%"),g=d("%Reflect.apply%",!0)||h.call(b,p),w=d("%Object.getOwnPropertyDescriptor%",!0),c=d("%Object.defineProperty%",!0),m=d("%Math.max%");if(c)try{c({},"a",{value:1})}catch(y){c=null}_.exports=function(E){var T=g(h,b,arguments);if(w&&c){var S=w(T,"length");S.configurable&&c(T,"length",{value:1+m(0,E.length-(arguments.length-1))})}return T};var v=function(){return g(h,p,arguments)};c?c(_.exports,"apply",{value:v}):_.exports.apply=v},{"function-bind":347,"get-intrinsic":348}],94:[function(o,_,j){"use strict";var h=Array.prototype.slice;_.exports=d;function d(b,g){if(!(this instanceof d))return new d(b,g);this.src=b,this._withAccess=g}d.prototype.withAccess=function(b){return this._withAccess=b!==!1,this},d.prototype.pick=function(b){return Array.isArray(b)||(b=h.call(arguments)),b.length&&(this.keys=b),this},d.prototype.to=function(b){if(b=b||{},!this.src)return b;var g=this.keys||Object.keys(this.src);if(!this._withAccess){for(var w=0;w<g.length;w++)c=g[w],b[c]===void 0&&(b[c]=this.src[c]);return b}for(var w=0;w<g.length;w++){var c=g[w];if(p(b,c)){var m=this.src.__lookupGetter__(c),v=this.src.__lookupSetter__(c);m&&b.__defineGetter__(c,m),v&&b.__defineSetter__(c,v),!m&&!v&&(b[c]=this.src[c])}}return b},d.prototype.toCover=function(b){for(var g=this.keys||Object.keys(this.src),w=0;w<g.length;w++){var c=g[w];delete b[c];var m=this.src.__lookupGetter__(c),v=this.src.__lookupSetter__(c);m&&b.__defineGetter__(c,m),v&&b.__defineSetter__(c,v),!m&&!v&&(b[c]=this.src[c])}},d.prototype.override=d.prototype.toCover,d.prototype.and=function(b){var g={};return this.to(g),this.src=b,this.to(g),this.src=g,this};function p(b,g){return b[g]===void 0&&b.__lookupGetter__(g)===void 0&&b.__lookupSetter__(g)===void 0}},{}],95:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-callable"),p=o("../internals/try-to-string"),b=h.TypeError;_.exports=function(g){if(d(g))return g;throw b(p(g)+" is not a function")}},{"../internals/global":163,"../internals/is-callable":176,"../internals/try-to-string":257}],96:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-constructor"),p=o("../internals/try-to-string"),b=h.TypeError;_.exports=function(g){if(d(g))return g;throw b(p(g)+" is not a constructor")}},{"../internals/global":163,"../internals/is-constructor":177,"../internals/try-to-string":257}],97:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-callable"),p=h.String,b=h.TypeError;_.exports=function(g){if(typeof g=="object"||d(g))return g;throw b("Can't set "+p(g)+" as a prototype")}},{"../internals/global":163,"../internals/is-callable":176}],98:[function(o,_,j){var h=o("../internals/well-known-symbol"),d=o("../internals/object-create"),p=o("../internals/object-define-property"),b=h("unscopables"),g=Array.prototype;g[b]==null&&p.f(g,b,{configurable:!0,value:d(null)}),_.exports=function(w){g[b][w]=!0}},{"../internals/object-create":196,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],99:[function(o,_,j){"use strict";var h=o("../internals/string-multibyte").charAt;_.exports=function(d,p,b){return p+(b?h(d,p).length:1)}},{"../internals/string-multibyte":239}],100:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/object-is-prototype-of"),p=h.TypeError;_.exports=function(b,g){if(d(g,b))return b;throw p("Incorrect invocation")}},{"../internals/global":163,"../internals/object-is-prototype-of":204}],101:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-object"),p=h.String,b=h.TypeError;_.exports=function(g){if(d(g))return g;throw b(p(g)+" is not an object")}},{"../internals/global":163,"../internals/is-object":180}],102:[function(o,_,j){_.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"},{}],103:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-native"),d=o("../internals/descriptors"),p=o("../internals/global"),b=o("../internals/is-callable"),g=o("../internals/is-object"),w=o("../internals/has-own-property"),c=o("../internals/classof"),m=o("../internals/try-to-string"),v=o("../internals/create-non-enumerable-property"),y=o("../internals/redefine"),E=o("../internals/object-define-property").f,T=o("../internals/object-is-prototype-of"),S=o("../internals/object-get-prototype-of"),C=o("../internals/object-set-prototype-of"),x=o("../internals/well-known-symbol"),O=o("../internals/uid"),J=p.Int8Array,P=J&&J.prototype,X=p.Uint8ClampedArray,B=X&&X.prototype,k=J&&S(J),D=P&&S(P),L=Object.prototype,q=p.TypeError,G=x("toStringTag"),F=O("TYPED_ARRAY_TAG"),N=O("TYPED_ARRAY_CONSTRUCTOR"),K=h&&!!C&&c(p.opera)!=="Opera",re=!1,ne,pe,ie,Ae={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Y={BigInt64Array:8,BigUint64Array:8},fe=function(ke){if(!g(ke))return!1;var Ie=c(ke);return Ie==="DataView"||w(Ae,Ie)||w(Y,Ie)},ve=function(Ee){if(!g(Ee))return!1;var ke=c(Ee);return w(Ae,ke)||w(Y,ke)},be=function(Ee){if(ve(Ee))return Ee;throw q("Target is not a typed array")},le=function(Ee){if(b(Ee)&&(!C||T(k,Ee)))return Ee;throw q(m(Ee)+" is not a typed array constructor")},ue=function(Ee,ke,Ie,de){if(d){if(Ie)for(var Z in Ae){var ye=p[Z];if(ye&&w(ye.prototype,Ee))try{delete ye.prototype[Ee]}catch(V){try{ye.prototype[Ee]=ke}catch(Q){}}}(!D[Ee]||Ie)&&y(D,Ee,Ie?ke:K&&P[Ee]||ke,de)}},ge=function(Ee,ke,Ie){var de,Z;if(d){if(C){if(Ie){for(de in Ae)if(Z=p[de],Z&&w(Z,Ee))try{delete Z[Ee]}catch(ye){}}if(!k[Ee]||Ie)try{return y(k,Ee,Ie?ke:K&&k[Ee]||ke)}catch(ye){}else return}for(de in Ae)Z=p[de],Z&&(!Z[Ee]||Ie)&&y(Z,Ee,ke)}};for(ne in Ae)pe=p[ne],ie=pe&&pe.prototype,ie?v(ie,N,pe):K=!1;for(ne in Y)pe=p[ne],ie=pe&&pe.prototype,ie&&v(ie,N,pe);if((!K||!b(k)||k===Function.prototype)&&(k=function(){throw q("Incorrect invocation")},K))for(ne in Ae)p[ne]&&C(p[ne],k);if((!K||!D||D===L)&&(D=k.prototype,K))for(ne in Ae)p[ne]&&C(p[ne].prototype,D);if(K&&S(B)!==D&&C(B,D),d&&!w(D,G)){re=!0,E(D,G,{get:function(){return g(this)?this[F]:void 0}});for(ne in Ae)p[ne]&&v(p[ne],F,ne)}_.exports={NATIVE_ARRAY_BUFFER_VIEWS:K,TYPED_ARRAY_CONSTRUCTOR:N,TYPED_ARRAY_TAG:re&&F,aTypedArray:be,aTypedArrayConstructor:le,exportTypedArrayMethod:ue,exportTypedArrayStaticMethod:ge,isView:fe,isTypedArray:ve,TypedArray:k,TypedArrayPrototype:D}},{"../internals/array-buffer-native":102,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-define-property":198,"../internals/object-get-prototype-of":203,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/try-to-string":257,"../internals/uid":263,"../internals/well-known-symbol":268}],104:[function(o,_,j){"use strict";var h=o("../internals/global"),d=o("../internals/function-uncurry-this"),p=o("../internals/descriptors"),b=o("../internals/array-buffer-native"),g=o("../internals/function-name"),w=o("../internals/create-non-enumerable-property"),c=o("../internals/redefine-all"),m=o("../internals/fails"),v=o("../internals/an-instance"),y=o("../internals/to-integer-or-infinity"),E=o("../internals/to-length"),T=o("../internals/to-index"),S=o("../internals/ieee754"),C=o("../internals/object-get-prototype-of"),x=o("../internals/object-set-prototype-of"),O=o("../internals/object-get-own-property-names").f,J=o("../internals/object-define-property").f,P=o("../internals/array-fill"),X=o("../internals/array-slice-simple"),B=o("../internals/set-to-string-tag"),k=o("../internals/internal-state"),D=g.PROPER,L=g.CONFIGURABLE,q=k.get,G=k.set,F="ArrayBuffer",N="DataView",K="prototype",re="Wrong length",ne="Wrong index",pe=h[F],ie=pe,Ae=ie&&ie[K],Y=h[N],fe=Y&&Y[K],ve=Object.prototype,be=h.Array,le=h.RangeError,ue=d(P),ge=d([].reverse),Ee=S.pack,ke=S.unpack,Ie=function(_e){return[_e&255]},de=function(_e){return[_e&255,_e>>8&255]},Z=function(_e){return[_e&255,_e>>8&255,_e>>16&255,_e>>24&255]},ye=function(_e){return _e[3]<<24|_e[2]<<16|_e[1]<<8|_e[0]},V=function(_e){return Ee(_e,23,4)},Q=function(_e){return Ee(_e,52,8)},U=function(_e,he){J(_e[K],he,{get:function(){return q(this)[he]}})},H=function(_e,he,Te,Pe){var Ve=T(Te),De=q(_e);if(Ve+he>De.byteLength)throw le(ne);var Xe=q(De.buffer).bytes,Ke=Ve+De.byteOffset,$e=X(Xe,Ke,Ke+he);return Pe?$e:ge($e)},ee=function(_e,he,Te,Pe,Ve,De){var Xe=T(Te),Ke=q(_e);if(Xe+he>Ke.byteLength)throw le(ne);for(var $e=q(Ke.buffer).bytes,Je=Xe+Ke.byteOffset,nt=Pe(+Ve),et=0;et<he;et++)$e[Je+et]=nt[De?et:he-et-1]};if(!b)ie=function(he){v(this,Ae);var Te=T(he);G(this,{bytes:ue(be(Te),0),byteLength:Te}),p||(this.byteLength=Te)},Ae=ie[K],Y=function(he,Te,Pe){v(this,fe),v(he,Ae);var Ve=q(he).byteLength,De=y(Te);if(De<0||De>Ve)throw le("Wrong offset");if(Pe=Pe===void 0?Ve-De:E(Pe),De+Pe>Ve)throw le(re);G(this,{buffer:he,byteLength:Pe,byteOffset:De}),p||(this.buffer=he,this.byteLength=Pe,this.byteOffset=De)},fe=Y[K],p&&(U(ie,"byteLength"),U(Y,"buffer"),U(Y,"byteLength"),U(Y,"byteOffset")),c(fe,{getInt8:function(he){return H(this,1,he)[0]<<24>>24},getUint8:function(he){return H(this,1,he)[0]},getInt16:function(he){var Te=H(this,2,he,arguments.length>1?arguments[1]:void 0);return(Te[1]<<8|Te[0])<<16>>16},getUint16:function(he){var Te=H(this,2,he,arguments.length>1?arguments[1]:void 0);return Te[1]<<8|Te[0]},getInt32:function(he){return ye(H(this,4,he,arguments.length>1?arguments[1]:void 0))},getUint32:function(he){return ye(H(this,4,he,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(he){return ke(H(this,4,he,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(he){return ke(H(this,8,he,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(he,Te){ee(this,1,he,Ie,Te)},setUint8:function(he,Te){ee(this,1,he,Ie,Te)},setInt16:function(he,Te){ee(this,2,he,de,Te,arguments.length>2?arguments[2]:void 0)},setUint16:function(he,Te){ee(this,2,he,de,Te,arguments.length>2?arguments[2]:void 0)},setInt32:function(he,Te){ee(this,4,he,Z,Te,arguments.length>2?arguments[2]:void 0)},setUint32:function(he,Te){ee(this,4,he,Z,Te,arguments.length>2?arguments[2]:void 0)},setFloat32:function(he,Te){ee(this,4,he,V,Te,arguments.length>2?arguments[2]:void 0)},setFloat64:function(he,Te){ee(this,8,he,Q,Te,arguments.length>2?arguments[2]:void 0)}});else{var W=D&&pe.name!==F;if(!m(function(){pe(1)})||!m(function(){new pe(-1)})||m(function(){return new pe,new pe(1.5),new pe(NaN),W&&!L})){ie=function(he){return v(this,Ae),new pe(T(he))},ie[K]=Ae;for(var M=O(pe),$=0,ce;M.length>$;)(ce=M[$++])in ie||w(ie,ce,pe[ce]);Ae.constructor=ie}else W&&L&&w(pe,"name",F);x&&C(fe)!==ve&&x(fe,ve);var Ce=new Y(new ie(2)),Ue=d(fe.setInt8);Ce.setInt8(0,2147483648),Ce.setInt8(1,2147483649),(Ce.getInt8(0)||!Ce.getInt8(1))&&c(fe,{setInt8:function(he,Te){Ue(this,he,Te<<24>>24)},setUint8:function(he,Te){Ue(this,he,Te<<24>>24)}},{unsafe:!0})}B(ie,F),B(Y,N),_.exports={ArrayBuffer:ie,DataView:Y}},{"../internals/an-instance":100,"../internals/array-buffer-native":102,"../internals/array-fill":106,"../internals/array-slice-simple":116,"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/ieee754":169,"../internals/internal-state":173,"../internals/object-define-property":198,"../internals/object-get-own-property-names":201,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine-all":221,"../internals/set-to-string-tag":234,"../internals/to-index":246,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],105:[function(o,_,j){"use strict";var h=o("../internals/to-object"),d=o("../internals/to-absolute-index"),p=o("../internals/length-of-array-like"),b=Math.min;_.exports=[].copyWithin||function(w,c){var m=h(this),v=p(m),y=d(w,v),E=d(c,v),T=arguments.length>2?arguments[2]:void 0,S=b((T===void 0?v:d(T,v))-E,v-y),C=1;for(E<y&&y<E+S&&(C=-1,E+=S-1,y+=S-1);S-- >0;)E in m?m[y]=m[E]:delete m[y],y+=C,E+=C;return m}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],106:[function(o,_,j){"use strict";var h=o("../internals/to-object"),d=o("../internals/to-absolute-index"),p=o("../internals/length-of-array-like");_.exports=function(g){for(var w=h(this),c=p(w),m=arguments.length,v=d(m>1?arguments[1]:void 0,c),y=m>2?arguments[2]:void 0,E=y===void 0?c:d(y,c);E>v;)w[v++]=g;return w}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-object":250}],107:[function(o,_,j){"use strict";var h=o("../internals/array-iteration").forEach,d=o("../internals/array-method-is-strict"),p=d("forEach");_.exports=p?[].forEach:function(g){return h(this,g,arguments.length>1?arguments[1]:void 0)}},{"../internals/array-iteration":111,"../internals/array-method-is-strict":114}],108:[function(o,_,j){var h=o("../internals/length-of-array-like");_.exports=function(d,p){for(var b=0,g=h(p),w=new d(g);g>b;)w[b]=p[b++];return w}},{"../internals/length-of-array-like":188}],109:[function(o,_,j){"use strict";var h=o("../internals/global"),d=o("../internals/function-bind-context"),p=o("../internals/function-call"),b=o("../internals/to-object"),g=o("../internals/call-with-safe-iteration-closing"),w=o("../internals/is-array-iterator-method"),c=o("../internals/is-constructor"),m=o("../internals/length-of-array-like"),v=o("../internals/create-property"),y=o("../internals/get-iterator"),E=o("../internals/get-iterator-method"),T=h.Array;_.exports=function(C){var x=b(C),O=c(this),J=arguments.length,P=J>1?arguments[1]:void 0,X=P!==void 0;X&&(P=d(P,J>2?arguments[2]:void 0));var B=E(x),k=0,D,L,q,G,F,N;if(B&&!(this==T&&w(B)))for(G=y(x,B),F=G.next,L=O?new this:[];!(q=p(F,G)).done;k++)N=X?g(G,P,[q.value,k],!0):q.value,v(L,k,N);else for(D=m(x),L=O?new this(D):T(D);D>k;k++)N=X?P(x[k],k):x[k],v(L,k,N);return L.length=k,L}},{"../internals/call-with-safe-iteration-closing":121,"../internals/create-property":131,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/is-constructor":177,"../internals/length-of-array-like":188,"../internals/to-object":250}],110:[function(o,_,j){var h=o("../internals/to-indexed-object"),d=o("../internals/to-absolute-index"),p=o("../internals/length-of-array-like"),b=function(g){return function(w,c,m){var v=h(w),y=p(v),E=d(m,y),T;if(g&&c!=c){for(;y>E;)if(T=v[E++],T!=T)return!0}else for(;y>E;E++)if((g||E in v)&&v[E]===c)return g||E||0;return!g&&-1}};_.exports={includes:b(!0),indexOf:b(!1)}},{"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247}],111:[function(o,_,j){var h=o("../internals/function-bind-context"),d=o("../internals/function-uncurry-this"),p=o("../internals/indexed-object"),b=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/array-species-create"),c=d([].push),m=function(v){var y=v==1,E=v==2,T=v==3,S=v==4,C=v==6,x=v==7,O=v==5||C;return function(J,P,X,B){for(var k=b(J),D=p(k),L=h(P,X),q=g(D),G=0,F=B||w,N=y?F(J,q):E||x?F(J,0):void 0,K,re;q>G;G++)if((O||G in D)&&(K=D[G],re=L(K,G,k),v))if(y)N[G]=re;else if(re)switch(v){case 3:return!0;case 5:return K;case 6:return G;case 2:c(N,K)}else switch(v){case 4:return!1;case 7:c(N,K)}return C?-1:T||S?S:N}};_.exports={forEach:m(0),map:m(1),filter:m(2),some:m(3),every:m(4),find:m(5),findIndex:m(6),filterReject:m(7)}},{"../internals/array-species-create":120,"../internals/function-bind-context":153,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],112:[function(o,_,j){"use strict";var h=o("../internals/function-apply"),d=o("../internals/to-indexed-object"),p=o("../internals/to-integer-or-infinity"),b=o("../internals/length-of-array-like"),g=o("../internals/array-method-is-strict"),w=Math.min,c=[].lastIndexOf,m=!!c&&1/[1].lastIndexOf(1,-0)<0,v=g("lastIndexOf"),y=m||!v;_.exports=y?function(T){if(m)return h(c,this,arguments)||0;var S=d(this),C=b(S),x=C-1;for(arguments.length>1&&(x=w(x,p(arguments[1]))),x<0&&(x=C+x);x>=0;x--)if(x in S&&S[x]===T)return x||0;return-1}:c},{"../internals/array-method-is-strict":114,"../internals/function-apply":152,"../internals/length-of-array-like":188,"../internals/to-indexed-object":247,"../internals/to-integer-or-infinity":248}],113:[function(o,_,j){var h=o("../internals/fails"),d=o("../internals/well-known-symbol"),p=o("../internals/engine-v8-version"),b=d("species");_.exports=function(g){return p>=51||!h(function(){var w=[],c=w.constructor={};return c[b]=function(){return{foo:1}},w[g](Boolean).foo!==1})}},{"../internals/engine-v8-version":146,"../internals/fails":150,"../internals/well-known-symbol":268}],114:[function(o,_,j){"use strict";var h=o("../internals/fails");_.exports=function(d,p){var b=[][d];return!!b&&h(function(){b.call(null,p||function(){return 1},1)})}},{"../internals/fails":150}],115:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/a-callable"),p=o("../internals/to-object"),b=o("../internals/indexed-object"),g=o("../internals/length-of-array-like"),w=h.TypeError,c=function(m){return function(v,y,E,T){d(y);var S=p(v),C=b(S),x=g(S),O=m?x-1:0,J=m?-1:1;if(E<2)for(;;){if(O in C){T=C[O],O+=J;break}if(O+=J,m?O<0:x<=O)throw w("Reduce of empty array with no initial value")}for(;m?O>=0:x>O;O+=J)O in C&&(T=y(T,C[O],O,S));return T}};_.exports={left:c(!1),right:c(!0)}},{"../internals/a-callable":95,"../internals/global":163,"../internals/indexed-object":170,"../internals/length-of-array-like":188,"../internals/to-object":250}],116:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/to-absolute-index"),p=o("../internals/length-of-array-like"),b=o("../internals/create-property"),g=h.Array,w=Math.max;_.exports=function(c,m,v){for(var y=p(c),E=d(m,y),T=d(v===void 0?y:v,y),S=g(w(T-E,0)),C=0;E<T;E++,C++)b(S,C,c[E]);return S.length=C,S}},{"../internals/create-property":131,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245}],117:[function(o,_,j){var h=o("../internals/function-uncurry-this");_.exports=h([].slice)},{"../internals/function-uncurry-this":157}],118:[function(o,_,j){var h=o("../internals/array-slice-simple"),d=Math.floor,p=function(w,c){var m=w.length,v=d(m/2);return m<8?b(w,c):g(w,p(h(w,0,v),c),p(h(w,v),c),c)},b=function(w,c){for(var m=w.length,v=1,y,E;v<m;){for(E=v,y=w[v];E&&c(w[E-1],y)>0;)w[E]=w[--E];E!==v++&&(w[E]=y)}return w},g=function(w,c,m,v){for(var y=c.length,E=m.length,T=0,S=0;T<y||S<E;)w[T+S]=T<y&&S<E?v(c[T],m[S])<=0?c[T++]:m[S++]:T<y?c[T++]:m[S++];return w};_.exports=p},{"../internals/array-slice-simple":116}],119:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-array"),p=o("../internals/is-constructor"),b=o("../internals/is-object"),g=o("../internals/well-known-symbol"),w=g("species"),c=h.Array;_.exports=function(m){var v;return d(m)&&(v=m.constructor,p(v)&&(v===c||d(v.prototype))?v=void 0:b(v)&&(v=v[w],v===null&&(v=void 0))),v===void 0?c:v}},{"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/well-known-symbol":268}],120:[function(o,_,j){var h=o("../internals/array-species-constructor");_.exports=function(d,p){return new(h(d))(p===0?0:p)}},{"../internals/array-species-constructor":119}],121:[function(o,_,j){var h=o("../internals/an-object"),d=o("../internals/iterator-close");_.exports=function(p,b,g,w){try{return w?b(h(g)[0],g[1]):b(g)}catch(c){d(p,"throw",c)}}},{"../internals/an-object":101,"../internals/iterator-close":185}],122:[function(o,_,j){var h=o("../internals/well-known-symbol"),d=h("iterator"),p=!1;try{var b=0,g={next:function(){return{done:!!b++}},return:function(){p=!0}};g[d]=function(){return this},Array.from(g,function(){throw 2})}catch(w){}_.exports=function(w,c){if(!c&&!p)return!1;var m=!1;try{var v={};v[d]=function(){return{next:function(){return{done:m=!0}}}},w(v)}catch(y){}return m}},{"../internals/well-known-symbol":268}],123:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=h({}.toString),p=h("".slice);_.exports=function(b){return p(d(b),8,-1)}},{"../internals/function-uncurry-this":157}],124:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/to-string-tag-support"),p=o("../internals/is-callable"),b=o("../internals/classof-raw"),g=o("../internals/well-known-symbol"),w=g("toStringTag"),c=h.Object,m=b(function(){return arguments}())=="Arguments",v=function(y,E){try{return y[E]}catch(T){}};_.exports=d?b:function(y){var E,T,S;return y===void 0?"Undefined":y===null?"Null":typeof(T=v(E=c(y),w))=="string"?T:m?b(E):(S=b(E))=="Object"&&p(E.callee)?"Arguments":S}},{"../internals/classof-raw":123,"../internals/global":163,"../internals/is-callable":176,"../internals/to-string-tag-support":255,"../internals/well-known-symbol":268}],125:[function(o,_,j){var h=o("../internals/has-own-property"),d=o("../internals/own-keys"),p=o("../internals/object-get-own-property-descriptor"),b=o("../internals/object-define-property");_.exports=function(g,w,c){for(var m=d(w),v=b.f,y=p.f,E=0;E<m.length;E++){var T=m[E];!h(g,T)&&!(c&&h(c,T))&&v(g,T,y(w,T))}}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/own-keys":212}],126:[function(o,_,j){var h=o("../internals/well-known-symbol"),d=h("match");_.exports=function(p){var b=/./;try{"/./"[p](b)}catch(g){try{return b[d]=!1,"/./"[p](b)}catch(w){}}return!1}},{"../internals/well-known-symbol":268}],127:[function(o,_,j){var h=o("../internals/fails");_.exports=!h(function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype})},{"../internals/fails":150}],128:[function(o,_,j){"use strict";var h=o("../internals/iterators-core").IteratorPrototype,d=o("../internals/object-create"),p=o("../internals/create-property-descriptor"),b=o("../internals/set-to-string-tag"),g=o("../internals/iterators"),w=function(){return this};_.exports=function(c,m,v,y){var E=m+" Iterator";return c.prototype=d(h,{next:p(+!y,v)}),b(c,E,!1,!0),g[E]=w,c}},{"../internals/create-property-descriptor":130,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-create":196,"../internals/set-to-string-tag":234}],129:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/object-define-property"),p=o("../internals/create-property-descriptor");_.exports=h?function(b,g,w){return d.f(b,g,p(1,w))}:function(b,g,w){return b[g]=w,b}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/object-define-property":198}],130:[function(o,_,j){_.exports=function(h,d){return{enumerable:!(h&1),configurable:!(h&2),writable:!(h&4),value:d}}},{}],131:[function(o,_,j){"use strict";var h=o("../internals/to-property-key"),d=o("../internals/object-define-property"),p=o("../internals/create-property-descriptor");_.exports=function(b,g,w){var c=h(g);c in b?d.f(b,c,p(0,w)):b[c]=w}},{"../internals/create-property-descriptor":130,"../internals/object-define-property":198,"../internals/to-property-key":254}],132:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-call"),p=o("../internals/is-pure"),b=o("../internals/function-name"),g=o("../internals/is-callable"),w=o("../internals/create-iterator-constructor"),c=o("../internals/object-get-prototype-of"),m=o("../internals/object-set-prototype-of"),v=o("../internals/set-to-string-tag"),y=o("../internals/create-non-enumerable-property"),E=o("../internals/redefine"),T=o("../internals/well-known-symbol"),S=o("../internals/iterators"),C=o("../internals/iterators-core"),x=b.PROPER,O=b.CONFIGURABLE,J=C.IteratorPrototype,P=C.BUGGY_SAFARI_ITERATORS,X=T("iterator"),B="keys",k="values",D="entries",L=function(){return this};_.exports=function(q,G,F,N,K,re,ne){w(F,G,N);var pe=function(Ee){if(Ee===K&&ve)return ve;if(!P&&Ee in Y)return Y[Ee];switch(Ee){case B:return function(){return new F(this,Ee)};case k:return function(){return new F(this,Ee)};case D:return function(){return new F(this,Ee)}}return function(){return new F(this)}},ie=G+" Iterator",Ae=!1,Y=q.prototype,fe=Y[X]||Y["@@iterator"]||K&&Y[K],ve=!P&&fe||pe(K),be=G=="Array"&&Y.entries||fe,le,ue,ge;if(be&&(le=c(be.call(new q)),le!==Object.prototype&&le.next&&(!p&&c(le)!==J&&(m?m(le,J):g(le[X])||E(le,X,L)),v(le,ie,!0,!0),p&&(S[ie]=L))),x&&K==k&&fe&&fe.name!==k&&(!p&&O?y(Y,"name",k):(Ae=!0,ve=function(){return d(fe,this)})),K)if(ue={values:pe(k),keys:re?ve:pe(B),entries:pe(D)},ne)for(ge in ue)(P||Ae||!(ge in Y))&&E(Y,ge,ue[ge]);else h({target:G,proto:!0,forced:P||Ae},ue);return(!p||ne)&&Y[X]!==ve&&E(Y,X,ve,{name:K}),S[G]=ve,ue}},{"../internals/create-iterator-constructor":128,"../internals/create-non-enumerable-property":129,"../internals/export":149,"../internals/function-call":155,"../internals/function-name":156,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/iterators":187,"../internals/iterators-core":186,"../internals/object-get-prototype-of":203,"../internals/object-set-prototype-of":208,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/well-known-symbol":268}],133:[function(o,_,j){var h=o("../internals/path"),d=o("../internals/has-own-property"),p=o("../internals/well-known-symbol-wrapped"),b=o("../internals/object-define-property").f;_.exports=function(g){var w=h.Symbol||(h.Symbol={});d(w,g)||b(w,g,{value:p.f(g)})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/path":213,"../internals/well-known-symbol-wrapped":267}],134:[function(o,_,j){var h=o("../internals/fails");_.exports=!h(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},{"../internals/fails":150}],135:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-object"),p=h.document,b=d(p)&&d(p.createElement);_.exports=function(g){return b?p.createElement(g):{}}},{"../internals/global":163,"../internals/is-object":180}],136:[function(o,_,j){_.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},{}],137:[function(o,_,j){var h=o("../internals/document-create-element"),d=h("span").classList,p=d&&d.constructor&&d.constructor.prototype;_.exports=p===Object.prototype?void 0:p},{"../internals/document-create-element":135}],138:[function(o,_,j){var h=o("../internals/engine-user-agent"),d=h.match(/firefox\/(\d+)/i);_.exports=!!d&&+d[1]},{"../internals/engine-user-agent":145}],139:[function(o,_,j){_.exports=typeof window=="object"&&typeof Deno!="object"},{}],140:[function(o,_,j){var h=o("../internals/engine-user-agent");_.exports=/MSIE|Trident/.test(h)},{"../internals/engine-user-agent":145}],141:[function(o,_,j){var h=o("../internals/engine-user-agent"),d=o("../internals/global");_.exports=/ipad|iphone|ipod/i.test(h)&&d.Pebble!==void 0},{"../internals/engine-user-agent":145,"../internals/global":163}],142:[function(o,_,j){var h=o("../internals/engine-user-agent");_.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(h)},{"../internals/engine-user-agent":145}],143:[function(o,_,j){var h=o("../internals/classof-raw"),d=o("../internals/global");_.exports=h(d.process)=="process"},{"../internals/classof-raw":123,"../internals/global":163}],144:[function(o,_,j){var h=o("../internals/engine-user-agent");_.exports=/web0s(?!.*chrome)/i.test(h)},{"../internals/engine-user-agent":145}],145:[function(o,_,j){var h=o("../internals/get-built-in");_.exports=h("navigator","userAgent")||""},{"../internals/get-built-in":158}],146:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/engine-user-agent"),p=h.process,b=h.Deno,g=p&&p.versions||b&&b.version,w=g&&g.v8,c,m;w&&(c=w.split("."),m=c[0]>0&&c[0]<4?1:+(c[0]+c[1])),!m&&d&&(c=d.match(/Edge\/(\d+)/),(!c||c[1]>=74)&&(c=d.match(/Chrome\/(\d+)/),c&&(m=+c[1]))),_.exports=m},{"../internals/engine-user-agent":145,"../internals/global":163}],147:[function(o,_,j){var h=o("../internals/engine-user-agent"),d=h.match(/AppleWebKit\/(\d+)\./);_.exports=!!d&&+d[1]},{"../internals/engine-user-agent":145}],148:[function(o,_,j){_.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],149:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/object-get-own-property-descriptor").f,p=o("../internals/create-non-enumerable-property"),b=o("../internals/redefine"),g=o("../internals/set-global"),w=o("../internals/copy-constructor-properties"),c=o("../internals/is-forced");_.exports=function(m,v){var y=m.target,E=m.global,T=m.stat,S,C,x,O,J,P;if(E?C=h:T?C=h[y]||g(y,{}):C=(h[y]||{}).prototype,C)for(x in v){if(J=v[x],m.noTargetGet?(P=d(C,x),O=P&&P.value):O=C[x],S=c(E?x:y+(T?".":"#")+x,m.forced),!S&&O!==void 0){if(typeof J==typeof O)continue;w(J,O)}(m.sham||O&&O.sham)&&p(J,"sham",!0),b(C,x,J,m)}}},{"../internals/copy-constructor-properties":125,"../internals/create-non-enumerable-property":129,"../internals/global":163,"../internals/is-forced":178,"../internals/object-get-own-property-descriptor":199,"../internals/redefine":222,"../internals/set-global":232}],150:[function(o,_,j){_.exports=function(h){try{return!!h()}catch(d){return!0}}},{}],151:[function(o,_,j){"use strict";o("../modules/es.regexp.exec");var h=o("../internals/function-uncurry-this"),d=o("../internals/redefine"),p=o("../internals/regexp-exec"),b=o("../internals/fails"),g=o("../internals/well-known-symbol"),w=o("../internals/create-non-enumerable-property"),c=g("species"),m=RegExp.prototype;_.exports=function(v,y,E,T){var S=g(v),C=!b(function(){var P={};return P[S]=function(){return 7},""[v](P)!=7}),x=C&&!b(function(){var P=!1,X=/a/;return v==="split"&&(X={},X.constructor={},X.constructor[c]=function(){return X},X.flags="",X[S]=/./[S]),X.exec=function(){return P=!0,null},X[S](""),!P});if(!C||!x||E){var O=h(/./[S]),J=y(S,""[v],function(P,X,B,k,D){var L=h(P),q=X.exec;return q===p||q===m.exec?C&&!D?{done:!0,value:O(X,B,k)}:{done:!0,value:L(B,X,k)}:{done:!1}});d(String.prototype,v,J[0]),d(m,S,J[1])}T&&w(m[S],"sham",!0)}},{"../internals/create-non-enumerable-property":129,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/redefine":222,"../internals/regexp-exec":224,"../internals/well-known-symbol":268,"../modules/es.regexp.exec":300}],152:[function(o,_,j){var h=o("../internals/function-bind-native"),d=Function.prototype,p=d.apply,b=d.call;_.exports=typeof Reflect=="object"&&Reflect.apply||(h?b.bind(p):function(){return b.apply(p,arguments)})},{"../internals/function-bind-native":154}],153:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/a-callable"),p=o("../internals/function-bind-native"),b=h(h.bind);_.exports=function(g,w){return d(g),w===void 0?g:p?b(g,w):function(){return g.apply(w,arguments)}}},{"../internals/a-callable":95,"../internals/function-bind-native":154,"../internals/function-uncurry-this":157}],154:[function(o,_,j){var h=o("../internals/fails");_.exports=!h(function(){var d=function(){}.bind();return typeof d!="function"||d.hasOwnProperty("prototype")})},{"../internals/fails":150}],155:[function(o,_,j){var h=o("../internals/function-bind-native"),d=Function.prototype.call;_.exports=h?d.bind(d):function(){return d.apply(d,arguments)}},{"../internals/function-bind-native":154}],156:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/has-own-property"),p=Function.prototype,b=h&&Object.getOwnPropertyDescriptor,g=d(p,"name"),w=g&&function(){}.name==="something",c=g&&(!h||h&&b(p,"name").configurable);_.exports={EXISTS:g,PROPER:w,CONFIGURABLE:c}},{"../internals/descriptors":134,"../internals/has-own-property":164}],157:[function(o,_,j){var h=o("../internals/function-bind-native"),d=Function.prototype,p=d.bind,b=d.call,g=h&&p.bind(b,b);_.exports=h?function(w){return w&&g(w)}:function(w){return w&&function(){return b.apply(w,arguments)}}},{"../internals/function-bind-native":154}],158:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-callable"),p=function(b){return d(b)?b:void 0};_.exports=function(b,g){return arguments.length<2?p(h[b]):h[b]&&h[b][g]}},{"../internals/global":163,"../internals/is-callable":176}],159:[function(o,_,j){var h=o("../internals/classof"),d=o("../internals/get-method"),p=o("../internals/iterators"),b=o("../internals/well-known-symbol"),g=b("iterator");_.exports=function(w){if(w!=null)return d(w,g)||d(w,"@@iterator")||p[h(w)]}},{"../internals/classof":124,"../internals/get-method":161,"../internals/iterators":187,"../internals/well-known-symbol":268}],160:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-call"),p=o("../internals/a-callable"),b=o("../internals/an-object"),g=o("../internals/try-to-string"),w=o("../internals/get-iterator-method"),c=h.TypeError;_.exports=function(m,v){var y=arguments.length<2?w(m):v;if(p(y))return b(d(y,m));throw c(g(m)+" is not iterable")}},{"../internals/a-callable":95,"../internals/an-object":101,"../internals/function-call":155,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/try-to-string":257}],161:[function(o,_,j){var h=o("../internals/a-callable");_.exports=function(d,p){var b=d[p];return b==null?void 0:h(b)}},{"../internals/a-callable":95}],162:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/to-object"),p=Math.floor,b=h("".charAt),g=h("".replace),w=h("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,m=/\$([$&'`]|\d{1,2})/g;_.exports=function(v,y,E,T,S,C){var x=E+v.length,O=T.length,J=m;return S!==void 0&&(S=d(S),J=c),g(C,J,function(P,X){var B;switch(b(X,0)){case"$":return"$";case"&":return v;case"`":return w(y,0,E);case"'":return w(y,x);case"<":B=S[w(X,1,-1)];break;default:var k=+X;if(k===0)return P;if(k>O){var D=p(k/10);return D===0?P:D<=O?T[D-1]===void 0?b(X,1):T[D-1]+b(X,1):P}B=T[k-1]}return B===void 0?"":B})}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],163:[function(o,_,j){(function(h){(function(){var d=function(p){return p&&p.Math==Math&&p};_.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof h=="object"&&h)||function(){return this}()||Function("return this")()}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],164:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/to-object"),p=h({}.hasOwnProperty);_.exports=Object.hasOwn||function(g,w){return p(d(g),w)}},{"../internals/function-uncurry-this":157,"../internals/to-object":250}],165:[function(o,_,j){_.exports={}},{}],166:[function(o,_,j){var h=o("../internals/global");_.exports=function(d,p){var b=h.console;b&&b.error&&(arguments.length==1?b.error(d):b.error(d,p))}},{"../internals/global":163}],167:[function(o,_,j){var h=o("../internals/get-built-in");_.exports=h("document","documentElement")},{"../internals/get-built-in":158}],168:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/fails"),p=o("../internals/document-create-element");_.exports=!h&&!d(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!=7})},{"../internals/descriptors":134,"../internals/document-create-element":135,"../internals/fails":150}],169:[function(o,_,j){var h=o("../internals/global"),d=h.Array,p=Math.abs,b=Math.pow,g=Math.floor,w=Math.log,c=Math.LN2,m=function(y,E,T){var S=d(T),C=T*8-E-1,x=(1<<C)-1,O=x>>1,J=E===23?b(2,-24)-b(2,-77):0,P=y<0||y===0&&1/y<0?1:0,X=0,B,k,D;for(y=p(y),y!=y||y===1/0?(k=y!=y?1:0,B=x):(B=g(w(y)/c),D=b(2,-B),y*D<1&&(B--,D*=2),B+O>=1?y+=J/D:y+=J*b(2,1-O),y*D>=2&&(B++,D/=2),B+O>=x?(k=0,B=x):B+O>=1?(k=(y*D-1)*b(2,E),B=B+O):(k=y*b(2,O-1)*b(2,E),B=0));E>=8;)S[X++]=k&255,k/=256,E-=8;for(B=B<<E|k,C+=E;C>0;)S[X++]=B&255,B/=256,C-=8;return S[--X]|=P*128,S},v=function(y,E){var T=y.length,S=T*8-E-1,C=(1<<S)-1,x=C>>1,O=S-7,J=T-1,P=y[J--],X=P&127,B;for(P>>=7;O>0;)X=X*256+y[J--],O-=8;for(B=X&(1<<-O)-1,X>>=-O,O+=E;O>0;)B=B*256+y[J--],O-=8;if(X===0)X=1-x;else{if(X===C)return B?NaN:P?-1/0:1/0;B=B+b(2,E),X=X-x}return(P?-1:1)*B*b(2,X-E)};_.exports={pack:m,unpack:v}},{"../internals/global":163}],170:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-uncurry-this"),p=o("../internals/fails"),b=o("../internals/classof-raw"),g=h.Object,w=d("".split);_.exports=p(function(){return!g("z").propertyIsEnumerable(0)})?function(c){return b(c)=="String"?w(c,""):g(c)}:g},{"../internals/classof-raw":123,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],171:[function(o,_,j){var h=o("../internals/is-callable"),d=o("../internals/is-object"),p=o("../internals/object-set-prototype-of");_.exports=function(b,g,w){var c,m;return p&&h(c=g.constructor)&&c!==w&&d(m=c.prototype)&&m!==w.prototype&&p(b,m),b}},{"../internals/is-callable":176,"../internals/is-object":180,"../internals/object-set-prototype-of":208}],172:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/is-callable"),p=o("../internals/shared-store"),b=h(Function.toString);d(p.inspectSource)||(p.inspectSource=function(g){return b(g)}),_.exports=p.inspectSource},{"../internals/function-uncurry-this":157,"../internals/is-callable":176,"../internals/shared-store":236}],173:[function(o,_,j){var h=o("../internals/native-weak-map"),d=o("../internals/global"),p=o("../internals/function-uncurry-this"),b=o("../internals/is-object"),g=o("../internals/create-non-enumerable-property"),w=o("../internals/has-own-property"),c=o("../internals/shared-store"),m=o("../internals/shared-key"),v=o("../internals/hidden-keys"),y="Object already initialized",E=d.TypeError,T=d.WeakMap,S,C,x,O=function(L){return x(L)?C(L):S(L,{})},J=function(L){return function(q){var G;if(!b(q)||(G=C(q)).type!==L)throw E("Incompatible receiver, "+L+" required");return G}};if(h||c.state){var P=c.state||(c.state=new T),X=p(P.get),B=p(P.has),k=p(P.set);S=function(L,q){if(B(P,L))throw new E(y);return q.facade=L,k(P,L,q),q},C=function(L){return X(P,L)||{}},x=function(L){return B(P,L)}}else{var D=m("state");v[D]=!0,S=function(L,q){if(w(L,D))throw new E(y);return q.facade=L,g(L,D,q),q},C=function(L){return w(L,D)?L[D]:{}},x=function(L){return w(L,D)}}_.exports={set:S,get:C,has:x,enforce:O,getterFor:J}},{"../internals/create-non-enumerable-property":129,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/is-object":180,"../internals/native-weak-map":192,"../internals/shared-key":235,"../internals/shared-store":236}],174:[function(o,_,j){var h=o("../internals/well-known-symbol"),d=o("../internals/iterators"),p=h("iterator"),b=Array.prototype;_.exports=function(g){return g!==void 0&&(d.Array===g||b[p]===g)}},{"../internals/iterators":187,"../internals/well-known-symbol":268}],175:[function(o,_,j){var h=o("../internals/classof-raw");_.exports=Array.isArray||function(p){return h(p)=="Array"}},{"../internals/classof-raw":123}],176:[function(o,_,j){_.exports=function(h){return typeof h=="function"}},{}],177:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/fails"),p=o("../internals/is-callable"),b=o("../internals/classof"),g=o("../internals/get-built-in"),w=o("../internals/inspect-source"),c=function(){},m=[],v=g("Reflect","construct"),y=/^\s*(?:class|function)\b/,E=h(y.exec),T=!y.exec(c),S=function(O){if(!p(O))return!1;try{return v(c,m,O),!0}catch(J){return!1}},C=function(O){if(!p(O))return!1;switch(b(O)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return T||!!E(y,w(O))}catch(J){return!0}};C.sham=!0,_.exports=!v||d(function(){var x;return S(S.call)||!S(Object)||!S(function(){x=!0})||x})?C:S},{"../internals/classof":124,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/inspect-source":172,"../internals/is-callable":176}],178:[function(o,_,j){var h=o("../internals/fails"),d=o("../internals/is-callable"),p=/#|\.prototype\./,b=function(v,y){var E=w[g(v)];return E==m?!0:E==c?!1:d(y)?h(y):!!y},g=b.normalize=function(v){return String(v).replace(p,".").toLowerCase()},w=b.data={},c=b.NATIVE="N",m=b.POLYFILL="P";_.exports=b},{"../internals/fails":150,"../internals/is-callable":176}],179:[function(o,_,j){var h=o("../internals/is-object"),d=Math.floor;_.exports=Number.isInteger||function(b){return!h(b)&&isFinite(b)&&d(b)===b}},{"../internals/is-object":180}],180:[function(o,_,j){var h=o("../internals/is-callable");_.exports=function(d){return typeof d=="object"?d!==null:h(d)}},{"../internals/is-callable":176}],181:[function(o,_,j){_.exports=!1},{}],182:[function(o,_,j){var h=o("../internals/is-object"),d=o("../internals/classof-raw"),p=o("../internals/well-known-symbol"),b=p("match");_.exports=function(g){var w;return h(g)&&((w=g[b])!==void 0?!!w:d(g)=="RegExp")}},{"../internals/classof-raw":123,"../internals/is-object":180,"../internals/well-known-symbol":268}],183:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/get-built-in"),p=o("../internals/is-callable"),b=o("../internals/object-is-prototype-of"),g=o("../internals/use-symbol-as-uid"),w=h.Object;_.exports=g?function(c){return typeof c=="symbol"}:function(c){var m=d("Symbol");return p(m)&&b(m.prototype,w(c))}},{"../internals/get-built-in":158,"../internals/global":163,"../internals/is-callable":176,"../internals/object-is-prototype-of":204,"../internals/use-symbol-as-uid":264}],184:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-bind-context"),p=o("../internals/function-call"),b=o("../internals/an-object"),g=o("../internals/try-to-string"),w=o("../internals/is-array-iterator-method"),c=o("../internals/length-of-array-like"),m=o("../internals/object-is-prototype-of"),v=o("../internals/get-iterator"),y=o("../internals/get-iterator-method"),E=o("../internals/iterator-close"),T=h.TypeError,S=function(x,O){this.stopped=x,this.result=O},C=S.prototype;_.exports=function(x,O,J){var P=J&&J.that,X=!!(J&&J.AS_ENTRIES),B=!!(J&&J.IS_ITERATOR),k=!!(J&&J.INTERRUPTED),D=d(O,P),L,q,G,F,N,K,re,ne=function(ie){return L&&E(L,"normal",ie),new S(!0,ie)},pe=function(ie){return X?(b(ie),k?D(ie[0],ie[1],ne):D(ie[0],ie[1])):k?D(ie,ne):D(ie)};if(B)L=x;else{if(q=y(x),!q)throw T(g(x)+" is not iterable");if(w(q)){for(G=0,F=c(x);F>G;G++)if(N=pe(x[G]),N&&m(C,N))return N;return new S(!1)}L=v(x,q)}for(K=L.next;!(re=p(K,L)).done;){try{N=pe(re.value)}catch(ie){E(L,"throw",ie)}if(typeof N=="object"&&N&&m(C,N))return N}return new S(!1)}},{"../internals/an-object":101,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/global":163,"../internals/is-array-iterator-method":174,"../internals/iterator-close":185,"../internals/length-of-array-like":188,"../internals/object-is-prototype-of":204,"../internals/try-to-string":257}],185:[function(o,_,j){var h=o("../internals/function-call"),d=o("../internals/an-object"),p=o("../internals/get-method");_.exports=function(b,g,w){var c,m;d(b);try{if(c=p(b,"return"),!c){if(g==="throw")throw w;return w}c=h(c,b)}catch(v){m=!0,c=v}if(g==="throw")throw w;if(m)throw c;return d(c),w}},{"../internals/an-object":101,"../internals/function-call":155,"../internals/get-method":161}],186:[function(o,_,j){"use strict";var h=o("../internals/fails"),d=o("../internals/is-callable"),p=o("../internals/object-create"),b=o("../internals/object-get-prototype-of"),g=o("../internals/redefine"),w=o("../internals/well-known-symbol"),c=o("../internals/is-pure"),m=w("iterator"),v=!1,y,E,T;[].keys&&(T=[].keys(),"next"in T?(E=b(b(T)),E!==Object.prototype&&(y=E)):v=!0);var S=y==null||h(function(){var C={};return y[m].call(C)!==C});S?y={}:c&&(y=p(y)),d(y[m])||g(y,m,function(){return this}),_.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:v}},{"../internals/fails":150,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/object-create":196,"../internals/object-get-prototype-of":203,"../internals/redefine":222,"../internals/well-known-symbol":268}],187:[function(o,_,j){arguments[4][165][0].apply(j,arguments)},{dup:165}],188:[function(o,_,j){var h=o("../internals/to-length");_.exports=function(d){return h(d.length)}},{"../internals/to-length":249}],189:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-bind-context"),p=o("../internals/object-get-own-property-descriptor").f,b=o("../internals/task").set,g=o("../internals/engine-is-ios"),w=o("../internals/engine-is-ios-pebble"),c=o("../internals/engine-is-webos-webkit"),m=o("../internals/engine-is-node"),v=h.MutationObserver||h.WebKitMutationObserver,y=h.document,E=h.process,T=h.Promise,S=p(h,"queueMicrotask"),C=S&&S.value,x,O,J,P,X,B,k,D;C||(x=function(){var L,q;for(m&&(L=E.domain)&&L.exit();O;){q=O.fn,O=O.next;try{q()}catch(G){throw O?P():J=void 0,G}}J=void 0,L&&L.enter()},!g&&!m&&!c&&v&&y?(X=!0,B=y.createTextNode(""),new v(x).observe(B,{characterData:!0}),P=function(){B.data=X=!X}):!w&&T&&T.resolve?(k=T.resolve(void 0),k.constructor=T,D=d(k.then,k),P=function(){D(x)}):m?P=function(){E.nextTick(x)}:(b=d(b,h),P=function(){b(x)})),_.exports=C||function(L){var q={fn:L,next:void 0};J&&(J.next=q),O||(O=q,P()),J=q}},{"../internals/engine-is-ios":142,"../internals/engine-is-ios-pebble":141,"../internals/engine-is-node":143,"../internals/engine-is-webos-webkit":144,"../internals/function-bind-context":153,"../internals/global":163,"../internals/object-get-own-property-descriptor":199,"../internals/task":243}],190:[function(o,_,j){var h=o("../internals/native-symbol");_.exports=h&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/native-symbol":191}],191:[function(o,_,j){var h=o("../internals/engine-v8-version"),d=o("../internals/fails");_.exports=!!Object.getOwnPropertySymbols&&!d(function(){var p=Symbol();return!String(p)||!(Object(p)instanceof Symbol)||!Symbol.sham&&h&&h<41})},{"../internals/engine-v8-version":146,"../internals/fails":150}],192:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-callable"),p=o("../internals/inspect-source"),b=h.WeakMap;_.exports=d(b)&&/native code/.test(p(b))},{"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176}],193:[function(o,_,j){"use strict";var h=o("../internals/a-callable"),d=function(p){var b,g;this.promise=new p(function(w,c){if(b!==void 0||g!==void 0)throw TypeError("Bad Promise constructor");b=w,g=c}),this.resolve=h(b),this.reject=h(g)};_.exports.f=function(p){return new d(p)}},{"../internals/a-callable":95}],194:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-regexp"),p=h.TypeError;_.exports=function(b){if(d(b))throw p("The method doesn't accept regular expressions");return b}},{"../internals/global":163,"../internals/is-regexp":182}],195:[function(o,_,j){"use strict";var h=o("../internals/descriptors"),d=o("../internals/function-uncurry-this"),p=o("../internals/function-call"),b=o("../internals/fails"),g=o("../internals/object-keys"),w=o("../internals/object-get-own-property-symbols"),c=o("../internals/object-property-is-enumerable"),m=o("../internals/to-object"),v=o("../internals/indexed-object"),y=Object.assign,E=Object.defineProperty,T=d([].concat);_.exports=!y||b(function(){if(h&&y({b:1},y(E({},"a",{enumerable:!0,get:function(){E(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var S={},C={},x=Symbol(),O="abcdefghijklmnopqrst";return S[x]=7,O.split("").forEach(function(J){C[J]=J}),y({},S)[x]!=7||g(y({},C)).join("")!=O})?function(C,x){for(var O=m(C),J=arguments.length,P=1,X=w.f,B=c.f;J>P;)for(var k=v(arguments[P++]),D=X?T(g(k),X(k)):g(k),L=D.length,q=0,G;L>q;)G=D[q++],(!h||p(B,k,G))&&(O[G]=k[G]);return O}:y},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/object-get-own-property-symbols":202,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-object":250}],196:[function(o,_,j){var h=o("../internals/an-object"),d=o("../internals/object-define-properties"),p=o("../internals/enum-bug-keys"),b=o("../internals/hidden-keys"),g=o("../internals/html"),w=o("../internals/document-create-element"),c=o("../internals/shared-key"),m=">",v="<",y="prototype",E="script",T=c("IE_PROTO"),S=function(){},C=function(X){return v+E+m+X+v+"/"+E+m},x=function(X){X.write(C("")),X.close();var B=X.parentWindow.Object;return X=null,B},O=function(){var X=w("iframe"),B="java"+E+":",k;return X.style.display="none",g.appendChild(X),X.src=String(B),k=X.contentWindow.document,k.open(),k.write(C("document.F=Object")),k.close(),k.F},J,P=function(){try{J=new ActiveXObject("htmlfile")}catch(B){}P=typeof document!="undefined"?document.domain&&J?x(J):O():x(J);for(var X=p.length;X--;)delete P[y][p[X]];return P()};b[T]=!0,_.exports=Object.create||function(B,k){var D;return B!==null?(S[y]=h(B),D=new S,S[y]=null,D[T]=B):D=P(),k===void 0?D:d.f(D,k)}},{"../internals/an-object":101,"../internals/document-create-element":135,"../internals/enum-bug-keys":148,"../internals/hidden-keys":165,"../internals/html":167,"../internals/object-define-properties":197,"../internals/shared-key":235}],197:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/v8-prototype-define-bug"),p=o("../internals/object-define-property"),b=o("../internals/an-object"),g=o("../internals/to-indexed-object"),w=o("../internals/object-keys");j.f=h&&!d?Object.defineProperties:function(m,v){b(m);for(var y=g(v),E=w(v),T=E.length,S=0,C;T>S;)p.f(m,C=E[S++],y[C]);return m}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/object-define-property":198,"../internals/object-keys":206,"../internals/to-indexed-object":247,"../internals/v8-prototype-define-bug":265}],198:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/descriptors"),p=o("../internals/ie8-dom-define"),b=o("../internals/v8-prototype-define-bug"),g=o("../internals/an-object"),w=o("../internals/to-property-key"),c=h.TypeError,m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,y="enumerable",E="configurable",T="writable";j.f=d?b?function(C,x,O){if(g(C),x=w(x),g(O),typeof C=="function"&&x==="prototype"&&"value"in O&&T in O&&!O[T]){var J=v(C,x);J&&J[T]&&(C[x]=O.value,O={configurable:E in O?O[E]:J[E],enumerable:y in O?O[y]:J[y],writable:!1})}return m(C,x,O)}:m:function(C,x,O){if(g(C),x=w(x),g(O),p)try{return m(C,x,O)}catch(J){}if("get"in O||"set"in O)throw c("Accessors not supported");return"value"in O&&(C[x]=O.value),C}},{"../internals/an-object":101,"../internals/descriptors":134,"../internals/global":163,"../internals/ie8-dom-define":168,"../internals/to-property-key":254,"../internals/v8-prototype-define-bug":265}],199:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/function-call"),p=o("../internals/object-property-is-enumerable"),b=o("../internals/create-property-descriptor"),g=o("../internals/to-indexed-object"),w=o("../internals/to-property-key"),c=o("../internals/has-own-property"),m=o("../internals/ie8-dom-define"),v=Object.getOwnPropertyDescriptor;j.f=h?v:function(E,T){if(E=g(E),T=w(T),m)try{return v(E,T)}catch(S){}if(c(E,T))return b(!d(p.f,E,T),E[T])}},{"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/function-call":155,"../internals/has-own-property":164,"../internals/ie8-dom-define":168,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247,"../internals/to-property-key":254}],200:[function(o,_,j){var h=o("../internals/classof-raw"),d=o("../internals/to-indexed-object"),p=o("../internals/object-get-own-property-names").f,b=o("../internals/array-slice-simple"),g=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],w=function(c){try{return p(c)}catch(m){return b(g)}};_.exports.f=function(m){return g&&h(m)=="Window"?w(m):p(d(m))}},{"../internals/array-slice-simple":116,"../internals/classof-raw":123,"../internals/object-get-own-property-names":201,"../internals/to-indexed-object":247}],201:[function(o,_,j){var h=o("../internals/object-keys-internal"),d=o("../internals/enum-bug-keys"),p=d.concat("length","prototype");j.f=Object.getOwnPropertyNames||function(g){return h(g,p)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],202:[function(o,_,j){j.f=Object.getOwnPropertySymbols},{}],203:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/has-own-property"),p=o("../internals/is-callable"),b=o("../internals/to-object"),g=o("../internals/shared-key"),w=o("../internals/correct-prototype-getter"),c=g("IE_PROTO"),m=h.Object,v=m.prototype;_.exports=w?m.getPrototypeOf:function(y){var E=b(y);if(d(E,c))return E[c];var T=E.constructor;return p(T)&&E instanceof T?T.prototype:E instanceof m?v:null}},{"../internals/correct-prototype-getter":127,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/shared-key":235,"../internals/to-object":250}],204:[function(o,_,j){var h=o("../internals/function-uncurry-this");_.exports=h({}.isPrototypeOf)},{"../internals/function-uncurry-this":157}],205:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/has-own-property"),p=o("../internals/to-indexed-object"),b=o("../internals/array-includes").indexOf,g=o("../internals/hidden-keys"),w=h([].push);_.exports=function(c,m){var v=p(c),y=0,E=[],T;for(T in v)!d(g,T)&&d(v,T)&&w(E,T);for(;m.length>y;)d(v,T=m[y++])&&(~b(E,T)||w(E,T));return E}},{"../internals/array-includes":110,"../internals/function-uncurry-this":157,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/to-indexed-object":247}],206:[function(o,_,j){var h=o("../internals/object-keys-internal"),d=o("../internals/enum-bug-keys");_.exports=Object.keys||function(b){return h(b,d)}},{"../internals/enum-bug-keys":148,"../internals/object-keys-internal":205}],207:[function(o,_,j){"use strict";var h={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,p=d&&!h.call({1:2},1);j.f=p?function(g){var w=d(this,g);return!!w&&w.enumerable}:h},{}],208:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/an-object"),p=o("../internals/a-possible-prototype");_.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b=!1,g={},w;try{w=h(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),w(g,[]),b=g instanceof Array}catch(c){}return function(m,v){return d(m),p(v),b?w(m,v):m.__proto__=v,m}}():void 0)},{"../internals/a-possible-prototype":97,"../internals/an-object":101,"../internals/function-uncurry-this":157}],209:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/function-uncurry-this"),p=o("../internals/object-keys"),b=o("../internals/to-indexed-object"),g=o("../internals/object-property-is-enumerable").f,w=d(g),c=d([].push),m=function(v){return function(y){for(var E=b(y),T=p(E),S=T.length,C=0,x=[],O;S>C;)O=T[C++],(!h||w(E,O))&&c(x,v?[O,E[O]]:E[O]);return x}};_.exports={entries:m(!0),values:m(!1)}},{"../internals/descriptors":134,"../internals/function-uncurry-this":157,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/to-indexed-object":247}],210:[function(o,_,j){"use strict";var h=o("../internals/to-string-tag-support"),d=o("../internals/classof");_.exports=h?{}.toString:function(){return"[object "+d(this)+"]"}},{"../internals/classof":124,"../internals/to-string-tag-support":255}],211:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-call"),p=o("../internals/is-callable"),b=o("../internals/is-object"),g=h.TypeError;_.exports=function(w,c){var m,v;if(c==="string"&&p(m=w.toString)&&!b(v=d(m,w))||p(m=w.valueOf)&&!b(v=d(m,w))||c!=="string"&&p(m=w.toString)&&!b(v=d(m,w)))return v;throw g("Can't convert object to primitive value")}},{"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/is-object":180}],212:[function(o,_,j){var h=o("../internals/get-built-in"),d=o("../internals/function-uncurry-this"),p=o("../internals/object-get-own-property-names"),b=o("../internals/object-get-own-property-symbols"),g=o("../internals/an-object"),w=d([].concat);_.exports=h("Reflect","ownKeys")||function(m){var v=p.f(g(m)),y=b.f;return y?w(v,y(m)):v}},{"../internals/an-object":101,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-symbols":202}],213:[function(o,_,j){var h=o("../internals/global");_.exports=h},{"../internals/global":163}],214:[function(o,_,j){_.exports=function(h){try{return{error:!1,value:h()}}catch(d){return{error:!0,value:d}}}},{}],215:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/promise-native-constructor"),p=o("../internals/is-callable"),b=o("../internals/is-forced"),g=o("../internals/inspect-source"),w=o("../internals/well-known-symbol"),c=o("../internals/engine-is-browser"),m=o("../internals/is-pure"),v=o("../internals/engine-v8-version"),y=d&&d.prototype,E=w("species"),T=!1,S=p(h.PromiseRejectionEvent),C=b("Promise",function(){var x=g(d),O=x!==String(d);if(!O&&v===66||m&&!(y.catch&&y.finally))return!0;if(v>=51&&/native code/.test(x))return!1;var J=new d(function(B){B(1)}),P=function(B){B(function(){},function(){})},X=J.constructor={};return X[E]=P,T=J.then(function(){})instanceof P,T?!O&&c&&!S:!0});_.exports={CONSTRUCTOR:C,REJECTION_EVENT:S,SUBCLASSING:T}},{"../internals/engine-is-browser":139,"../internals/engine-v8-version":146,"../internals/global":163,"../internals/inspect-source":172,"../internals/is-callable":176,"../internals/is-forced":178,"../internals/is-pure":181,"../internals/promise-native-constructor":216,"../internals/well-known-symbol":268}],216:[function(o,_,j){var h=o("../internals/global");_.exports=h.Promise},{"../internals/global":163}],217:[function(o,_,j){var h=o("../internals/an-object"),d=o("../internals/is-object"),p=o("../internals/new-promise-capability");_.exports=function(b,g){if(h(b),d(g)&&g.constructor===b)return g;var w=p.f(b),c=w.resolve;return c(g),w.promise}},{"../internals/an-object":101,"../internals/is-object":180,"../internals/new-promise-capability":193}],218:[function(o,_,j){var h=o("../internals/promise-native-constructor"),d=o("../internals/check-correctness-of-iteration"),p=o("../internals/promise-constructor-detection").CONSTRUCTOR;_.exports=p||!d(function(b){h.all(b).then(void 0,function(){})})},{"../internals/check-correctness-of-iteration":122,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216}],219:[function(o,_,j){var h=o("../internals/object-define-property").f;_.exports=function(d,p,b){b in d||h(d,b,{configurable:!0,get:function(){return p[b]},set:function(g){p[b]=g}})}},{"../internals/object-define-property":198}],220:[function(o,_,j){var h=function(){this.head=null,this.tail=null};h.prototype={add:function(d){var p={item:d,next:null};this.head?this.tail.next=p:this.head=p,this.tail=p},get:function(){var d=this.head;if(d)return this.head=d.next,this.tail===d&&(this.tail=null),d.item}},_.exports=h},{}],221:[function(o,_,j){var h=o("../internals/redefine");_.exports=function(d,p,b){for(var g in p)h(d,g,p[g],b);return d}},{"../internals/redefine":222}],222:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/is-callable"),p=o("../internals/has-own-property"),b=o("../internals/create-non-enumerable-property"),g=o("../internals/set-global"),w=o("../internals/inspect-source"),c=o("../internals/internal-state"),m=o("../internals/function-name").CONFIGURABLE,v=c.get,y=c.enforce,E=String(String).split("String");(_.exports=function(T,S,C,x){var O=x?!!x.unsafe:!1,J=x?!!x.enumerable:!1,P=x?!!x.noTargetGet:!1,X=x&&x.name!==void 0?x.name:S,B;if(d(C)&&(String(X).slice(0,7)==="Symbol("&&(X="["+String(X).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!p(C,"name")||m&&C.name!==X)&&b(C,"name",X),B=y(C),B.source||(B.source=E.join(typeof X=="string"?X:""))),T===h){J?T[S]=C:g(S,C);return}else O?!P&&T[S]&&(J=!0):delete T[S];J?T[S]=C:b(T,S,C)})(Function.prototype,"toString",function(){return d(this)&&v(this).source||w(this)})},{"../internals/create-non-enumerable-property":129,"../internals/function-name":156,"../internals/global":163,"../internals/has-own-property":164,"../internals/inspect-source":172,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/set-global":232}],223:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-call"),p=o("../internals/an-object"),b=o("../internals/is-callable"),g=o("../internals/classof-raw"),w=o("../internals/regexp-exec"),c=h.TypeError;_.exports=function(m,v){var y=m.exec;if(b(y)){var E=d(y,m,v);return E!==null&&p(E),E}if(g(m)==="RegExp")return d(w,m,v);throw c("RegExp#exec called on incompatible receiver")}},{"../internals/an-object":101,"../internals/classof-raw":123,"../internals/function-call":155,"../internals/global":163,"../internals/is-callable":176,"../internals/regexp-exec":224}],224:[function(o,_,j){"use strict";var h=o("../internals/function-call"),d=o("../internals/function-uncurry-this"),p=o("../internals/to-string"),b=o("../internals/regexp-flags"),g=o("../internals/regexp-sticky-helpers"),w=o("../internals/shared"),c=o("../internals/object-create"),m=o("../internals/internal-state").get,v=o("../internals/regexp-unsupported-dot-all"),y=o("../internals/regexp-unsupported-ncg"),E=w("native-string-replace",String.prototype.replace),T=RegExp.prototype.exec,S=T,C=d("".charAt),x=d("".indexOf),O=d("".replace),J=d("".slice),P=function(){var D=/a/,L=/b*/g;return h(T,D,"a"),h(T,L,"a"),D.lastIndex!==0||L.lastIndex!==0}(),X=g.BROKEN_CARET,B=/()??/.exec("")[1]!==void 0,k=P||B||X||v||y;k&&(S=function(L){var q=this,G=m(q),F=p(L),N=G.raw,K,re,ne,pe,ie,Ae,Y;if(N)return N.lastIndex=q.lastIndex,K=h(S,N,F),q.lastIndex=N.lastIndex,K;var fe=G.groups,ve=X&&q.sticky,be=h(b,q),le=q.source,ue=0,ge=F;if(ve&&(be=O(be,"y",""),x(be,"g")===-1&&(be+="g"),ge=J(F,q.lastIndex),q.lastIndex>0&&(!q.multiline||q.multiline&&C(F,q.lastIndex-1)!==`
|
|
`)&&(le="(?: "+le+")",ge=" "+ge,ue++),re=new RegExp("^(?:"+le+")",be)),B&&(re=new RegExp("^"+le+"$(?!\\s)",be)),P&&(ne=q.lastIndex),pe=h(T,ve?re:q,ge),ve?pe?(pe.input=J(pe.input,ue),pe[0]=J(pe[0],ue),pe.index=q.lastIndex,q.lastIndex+=pe[0].length):q.lastIndex=0:P&&pe&&(q.lastIndex=q.global?pe.index+pe[0].length:ne),B&&pe&&pe.length>1&&h(E,pe[0],re,function(){for(ie=1;ie<arguments.length-2;ie++)arguments[ie]===void 0&&(pe[ie]=void 0)}),pe&&fe)for(pe.groups=Ae=c(null),ie=0;ie<fe.length;ie++)Y=fe[ie],Ae[Y[0]]=pe[Y[1]];return pe}),_.exports=S},{"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/internal-state":173,"../internals/object-create":196,"../internals/regexp-flags":225,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/shared":237,"../internals/to-string":256}],225:[function(o,_,j){"use strict";var h=o("../internals/an-object");_.exports=function(){var d=h(this),p="";return d.hasIndices&&(p+="d"),d.global&&(p+="g"),d.ignoreCase&&(p+="i"),d.multiline&&(p+="m"),d.dotAll&&(p+="s"),d.unicode&&(p+="u"),d.sticky&&(p+="y"),p}},{"../internals/an-object":101}],226:[function(o,_,j){var h=o("../internals/function-call"),d=o("../internals/has-own-property"),p=o("../internals/object-is-prototype-of"),b=o("../internals/regexp-flags"),g=RegExp.prototype;_.exports=function(w){var c=w.flags;return c===void 0&&!("flags"in g)&&!d(w,"flags")&&p(g,w)?h(b,w):c}},{"../internals/function-call":155,"../internals/has-own-property":164,"../internals/object-is-prototype-of":204,"../internals/regexp-flags":225}],227:[function(o,_,j){var h=o("../internals/fails"),d=o("../internals/global"),p=d.RegExp,b=h(function(){var c=p("a","y");return c.lastIndex=2,c.exec("abcd")!=null}),g=b||h(function(){return!p("a","y").sticky}),w=b||h(function(){var c=p("^r","gy");return c.lastIndex=2,c.exec("str")!=null});_.exports={BROKEN_CARET:w,MISSED_STICKY:g,UNSUPPORTED_Y:b}},{"../internals/fails":150,"../internals/global":163}],228:[function(o,_,j){var h=o("../internals/fails"),d=o("../internals/global"),p=d.RegExp;_.exports=h(function(){var b=p(".","s");return!(b.dotAll&&b.exec(`
|
|
`)&&b.flags==="s")})},{"../internals/fails":150,"../internals/global":163}],229:[function(o,_,j){var h=o("../internals/fails"),d=o("../internals/global"),p=d.RegExp;_.exports=h(function(){var b=p("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},{"../internals/fails":150,"../internals/global":163}],230:[function(o,_,j){var h=o("../internals/global"),d=h.TypeError;_.exports=function(p){if(p==null)throw d("Can't call method on "+p);return p}},{"../internals/global":163}],231:[function(o,_,j){_.exports=Object.is||function(d,p){return d===p?d!==0||1/d===1/p:d!=d&&p!=p}},{}],232:[function(o,_,j){var h=o("../internals/global"),d=Object.defineProperty;_.exports=function(p,b){try{d(h,p,{value:b,configurable:!0,writable:!0})}catch(g){h[p]=b}return b}},{"../internals/global":163}],233:[function(o,_,j){"use strict";var h=o("../internals/get-built-in"),d=o("../internals/object-define-property"),p=o("../internals/well-known-symbol"),b=o("../internals/descriptors"),g=p("species");_.exports=function(w){var c=h(w),m=d.f;b&&c&&!c[g]&&m(c,g,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":134,"../internals/get-built-in":158,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],234:[function(o,_,j){var h=o("../internals/object-define-property").f,d=o("../internals/has-own-property"),p=o("../internals/well-known-symbol"),b=p("toStringTag");_.exports=function(g,w,c){g&&!c&&(g=g.prototype),g&&!d(g,b)&&h(g,b,{configurable:!0,value:w})}},{"../internals/has-own-property":164,"../internals/object-define-property":198,"../internals/well-known-symbol":268}],235:[function(o,_,j){var h=o("../internals/shared"),d=o("../internals/uid"),p=h("keys");_.exports=function(b){return p[b]||(p[b]=d(b))}},{"../internals/shared":237,"../internals/uid":263}],236:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/set-global"),p="__core-js_shared__",b=h[p]||d(p,{});_.exports=b},{"../internals/global":163,"../internals/set-global":232}],237:[function(o,_,j){var h=o("../internals/is-pure"),d=o("../internals/shared-store");(_.exports=function(p,b){return d[p]||(d[p]=b!==void 0?b:{})})("versions",[]).push({version:"3.22.1",mode:h?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":181,"../internals/shared-store":236}],238:[function(o,_,j){var h=o("../internals/an-object"),d=o("../internals/a-constructor"),p=o("../internals/well-known-symbol"),b=p("species");_.exports=function(g,w){var c=h(g).constructor,m;return c===void 0||(m=h(c)[b])==null?w:d(m)}},{"../internals/a-constructor":96,"../internals/an-object":101,"../internals/well-known-symbol":268}],239:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/to-integer-or-infinity"),p=o("../internals/to-string"),b=o("../internals/require-object-coercible"),g=h("".charAt),w=h("".charCodeAt),c=h("".slice),m=function(v){return function(y,E){var T=p(b(y)),S=d(E),C=T.length,x,O;return S<0||S>=C?v?"":void 0:(x=w(T,S),x<55296||x>56319||S+1===C||(O=w(T,S+1))<56320||O>57343?v?g(T,S):x:v?c(T,S,S+2):(x-55296<<10)+(O-56320)+65536)}};_.exports={codeAt:m(!1),charAt:m(!0)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-string":256}],240:[function(o,_,j){var h=o("../internals/function-name").PROPER,d=o("../internals/fails"),p=o("../internals/whitespaces"),b="\u200B\x85\u180E";_.exports=function(g){return d(function(){return!!p[g]()||b[g]()!==b||h&&p[g].name!==g})}},{"../internals/fails":150,"../internals/function-name":156,"../internals/whitespaces":269}],241:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=o("../internals/require-object-coercible"),p=o("../internals/to-string"),b=o("../internals/whitespaces"),g=h("".replace),w="["+b+"]",c=RegExp("^"+w+w+"*"),m=RegExp(w+w+"*$"),v=function(y){return function(E){var T=p(d(E));return y&1&&(T=g(T,c,"")),y&2&&(T=g(T,m,"")),T}};_.exports={start:v(1),end:v(2),trim:v(3)}},{"../internals/function-uncurry-this":157,"../internals/require-object-coercible":230,"../internals/to-string":256,"../internals/whitespaces":269}],242:[function(o,_,j){var h=o("../internals/function-call"),d=o("../internals/get-built-in"),p=o("../internals/well-known-symbol"),b=o("../internals/redefine");_.exports=function(){var g=d("Symbol"),w=g&&g.prototype,c=w&&w.valueOf,m=p("toPrimitive");w&&!w[m]&&b(w,m,function(v){return h(c,this)})}},{"../internals/function-call":155,"../internals/get-built-in":158,"../internals/redefine":222,"../internals/well-known-symbol":268}],243:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-apply"),p=o("../internals/function-bind-context"),b=o("../internals/is-callable"),g=o("../internals/has-own-property"),w=o("../internals/fails"),c=o("../internals/html"),m=o("../internals/array-slice"),v=o("../internals/document-create-element"),y=o("../internals/validate-arguments-length"),E=o("../internals/engine-is-ios"),T=o("../internals/engine-is-node"),S=h.setImmediate,C=h.clearImmediate,x=h.process,O=h.Dispatch,J=h.Function,P=h.MessageChannel,X=h.String,B=0,k={},D="onreadystatechange",L,q,G,F;try{L=h.location}catch(pe){}var N=function(pe){if(g(k,pe)){var ie=k[pe];delete k[pe],ie()}},K=function(pe){return function(){N(pe)}},re=function(pe){N(pe.data)},ne=function(pe){h.postMessage(X(pe),L.protocol+"//"+L.host)};(!S||!C)&&(S=function(ie){y(arguments.length,1);var Ae=b(ie)?ie:J(ie),Y=m(arguments,1);return k[++B]=function(){d(Ae,void 0,Y)},q(B),B},C=function(ie){delete k[ie]},T?q=function(pe){x.nextTick(K(pe))}:O&&O.now?q=function(pe){O.now(K(pe))}:P&&!E?(G=new P,F=G.port2,G.port1.onmessage=re,q=p(F.postMessage,F)):h.addEventListener&&b(h.postMessage)&&!h.importScripts&&L&&L.protocol!=="file:"&&!w(ne)?(q=ne,h.addEventListener("message",re,!1)):D in v("script")?q=function(pe){c.appendChild(v("script"))[D]=function(){c.removeChild(this),N(pe)}}:q=function(pe){setTimeout(K(pe),0)}),_.exports={set:S,clear:C}},{"../internals/array-slice":117,"../internals/document-create-element":135,"../internals/engine-is-ios":142,"../internals/engine-is-node":143,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-bind-context":153,"../internals/global":163,"../internals/has-own-property":164,"../internals/html":167,"../internals/is-callable":176,"../internals/validate-arguments-length":266}],244:[function(o,_,j){var h=o("../internals/function-uncurry-this");_.exports=h(1 .valueOf)},{"../internals/function-uncurry-this":157}],245:[function(o,_,j){var h=o("../internals/to-integer-or-infinity"),d=Math.max,p=Math.min;_.exports=function(b,g){var w=h(b);return w<0?d(w+g,0):p(w,g)}},{"../internals/to-integer-or-infinity":248}],246:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/to-integer-or-infinity"),p=o("../internals/to-length"),b=h.RangeError;_.exports=function(g){if(g===void 0)return 0;var w=d(g),c=p(w);if(w!==c)throw b("Wrong length or index");return c}},{"../internals/global":163,"../internals/to-integer-or-infinity":248,"../internals/to-length":249}],247:[function(o,_,j){var h=o("../internals/indexed-object"),d=o("../internals/require-object-coercible");_.exports=function(p){return h(d(p))}},{"../internals/indexed-object":170,"../internals/require-object-coercible":230}],248:[function(o,_,j){var h=Math.ceil,d=Math.floor;_.exports=function(p){var b=+p;return b!==b||b===0?0:(b>0?d:h)(b)}},{}],249:[function(o,_,j){var h=o("../internals/to-integer-or-infinity"),d=Math.min;_.exports=function(p){return p>0?d(h(p),9007199254740991):0}},{"../internals/to-integer-or-infinity":248}],250:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/require-object-coercible"),p=h.Object;_.exports=function(b){return p(d(b))}},{"../internals/global":163,"../internals/require-object-coercible":230}],251:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/to-positive-integer"),p=h.RangeError;_.exports=function(b,g){var w=d(b);if(w%g)throw p("Wrong offset");return w}},{"../internals/global":163,"../internals/to-positive-integer":252}],252:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/to-integer-or-infinity"),p=h.RangeError;_.exports=function(b){var g=d(b);if(g<0)throw p("The argument can't be less than 0");return g}},{"../internals/global":163,"../internals/to-integer-or-infinity":248}],253:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/function-call"),p=o("../internals/is-object"),b=o("../internals/is-symbol"),g=o("../internals/get-method"),w=o("../internals/ordinary-to-primitive"),c=o("../internals/well-known-symbol"),m=h.TypeError,v=c("toPrimitive");_.exports=function(y,E){if(!p(y)||b(y))return y;var T=g(y,v),S;if(T){if(E===void 0&&(E="default"),S=d(T,y,E),!p(S)||b(S))return S;throw m("Can't convert object to primitive value")}return E===void 0&&(E="number"),w(y,E)}},{"../internals/function-call":155,"../internals/get-method":161,"../internals/global":163,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/ordinary-to-primitive":211,"../internals/well-known-symbol":268}],254:[function(o,_,j){var h=o("../internals/to-primitive"),d=o("../internals/is-symbol");_.exports=function(p){var b=h(p,"string");return d(b)?b:b+""}},{"../internals/is-symbol":183,"../internals/to-primitive":253}],255:[function(o,_,j){var h=o("../internals/well-known-symbol"),d=h("toStringTag"),p={};p[d]="z",_.exports=String(p)==="[object z]"},{"../internals/well-known-symbol":268}],256:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/classof"),p=h.String;_.exports=function(b){if(d(b)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return p(b)}},{"../internals/classof":124,"../internals/global":163}],257:[function(o,_,j){var h=o("../internals/global"),d=h.String;_.exports=function(p){try{return d(p)}catch(b){return"Object"}}},{"../internals/global":163}],258:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/global"),p=o("../internals/function-call"),b=o("../internals/descriptors"),g=o("../internals/typed-array-constructors-require-wrappers"),w=o("../internals/array-buffer-view-core"),c=o("../internals/array-buffer"),m=o("../internals/an-instance"),v=o("../internals/create-property-descriptor"),y=o("../internals/create-non-enumerable-property"),E=o("../internals/is-integral-number"),T=o("../internals/to-length"),S=o("../internals/to-index"),C=o("../internals/to-offset"),x=o("../internals/to-property-key"),O=o("../internals/has-own-property"),J=o("../internals/classof"),P=o("../internals/is-object"),X=o("../internals/is-symbol"),B=o("../internals/object-create"),k=o("../internals/object-is-prototype-of"),D=o("../internals/object-set-prototype-of"),L=o("../internals/object-get-own-property-names").f,q=o("../internals/typed-array-from"),G=o("../internals/array-iteration").forEach,F=o("../internals/set-species"),N=o("../internals/object-define-property"),K=o("../internals/object-get-own-property-descriptor"),re=o("../internals/internal-state"),ne=o("../internals/inherit-if-required"),pe=re.get,ie=re.set,Ae=N.f,Y=K.f,fe=Math.round,ve=d.RangeError,be=c.ArrayBuffer,le=be.prototype,ue=c.DataView,ge=w.NATIVE_ARRAY_BUFFER_VIEWS,Ee=w.TYPED_ARRAY_CONSTRUCTOR,ke=w.TYPED_ARRAY_TAG,Ie=w.TypedArray,de=w.TypedArrayPrototype,Z=w.aTypedArrayConstructor,ye=w.isTypedArray,V="BYTES_PER_ELEMENT",Q="Wrong length",U=function(ce,Ce){Z(ce);for(var Ue=0,_e=Ce.length,he=new ce(_e);_e>Ue;)he[Ue]=Ce[Ue++];return he},H=function(ce,Ce){Ae(ce,Ce,{get:function(){return pe(this)[Ce]}})},ee=function(ce){var Ce;return k(le,ce)||(Ce=J(ce))=="ArrayBuffer"||Ce=="SharedArrayBuffer"},W=function(ce,Ce){return ye(ce)&&!X(Ce)&&Ce in ce&&E(+Ce)&&Ce>=0},M=function(Ce,Ue){return Ue=x(Ue),W(Ce,Ue)?v(2,Ce[Ue]):Y(Ce,Ue)},$=function(Ce,Ue,_e){return Ue=x(Ue),W(Ce,Ue)&&P(_e)&&O(_e,"value")&&!O(_e,"get")&&!O(_e,"set")&&!_e.configurable&&(!O(_e,"writable")||_e.writable)&&(!O(_e,"enumerable")||_e.enumerable)?(Ce[Ue]=_e.value,Ce):Ae(Ce,Ue,_e)};b?(ge||(K.f=M,N.f=$,H(de,"buffer"),H(de,"byteOffset"),H(de,"byteLength"),H(de,"length")),h({target:"Object",stat:!0,forced:!ge},{getOwnPropertyDescriptor:M,defineProperty:$}),_.exports=function(ce,Ce,Ue){var _e=ce.match(/\d+$/)[0]/8,he=ce+(Ue?"Clamped":"")+"Array",Te="get"+ce,Pe="set"+ce,Ve=d[he],De=Ve,Xe=De&&De.prototype,Ke={},$e=function(et,ht){var Et=pe(et);return Et.view[Te](ht*_e+Et.byteOffset,!0)},Je=function(et,ht,Et){var zt=pe(et);Ue&&(Et=(Et=fe(Et))<0?0:Et>255?255:Et&255),zt.view[Pe](ht*_e+zt.byteOffset,Et,!0)},nt=function(et,ht){Ae(et,ht,{get:function(){return $e(this,ht)},set:function(Et){return Je(this,ht,Et)},enumerable:!0})};ge?g&&(De=Ce(function(et,ht,Et,zt){return m(et,Xe),ne(function(){return P(ht)?ee(ht)?zt!==void 0?new Ve(ht,C(Et,_e),zt):Et!==void 0?new Ve(ht,C(Et,_e)):new Ve(ht):ye(ht)?U(De,ht):p(q,De,ht):new Ve(S(ht))}(),et,De)}),D&&D(De,Ie),G(L(Ve),function(et){et in De||y(De,et,Ve[et])}),De.prototype=Xe):(De=Ce(function(et,ht,Et,zt){m(et,Xe);var dr=0,wr=0,hr,nr,kt;if(!P(ht))kt=S(ht),nr=kt*_e,hr=new be(nr);else if(ee(ht)){hr=ht,wr=C(Et,_e);var Zt=ht.byteLength;if(zt===void 0){if(Zt%_e||(nr=Zt-wr,nr<0))throw ve(Q)}else if(nr=T(zt)*_e,nr+wr>Zt)throw ve(Q);kt=nr/_e}else return ye(ht)?U(De,ht):p(q,De,ht);for(ie(et,{buffer:hr,byteOffset:wr,byteLength:nr,length:kt,view:new ue(hr)});dr<kt;)nt(et,dr++)}),D&&D(De,Ie),Xe=De.prototype=B(de)),Xe.constructor!==De&&y(Xe,"constructor",De),y(Xe,Ee,De),ke&&y(Xe,ke,he),Ke[he]=De,h({global:!0,forced:De!=Ve,sham:!ge},Ke),V in De||y(De,V,_e),V in Xe||y(Xe,V,_e),F(he)}):_.exports=function(){}},{"../internals/an-instance":100,"../internals/array-buffer":104,"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/classof":124,"../internals/create-non-enumerable-property":129,"../internals/create-property-descriptor":130,"../internals/descriptors":134,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-integral-number":179,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/object-create":196,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/object-set-prototype-of":208,"../internals/set-species":233,"../internals/to-index":246,"../internals/to-length":249,"../internals/to-offset":251,"../internals/to-property-key":254,"../internals/typed-array-constructors-require-wrappers":259,"../internals/typed-array-from":261}],259:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/fails"),p=o("../internals/check-correctness-of-iteration"),b=o("../internals/array-buffer-view-core").NATIVE_ARRAY_BUFFER_VIEWS,g=h.ArrayBuffer,w=h.Int8Array;_.exports=!b||!d(function(){w(1)})||!d(function(){new w(-1)})||!p(function(c){new w,new w(null),new w(1.5),new w(c)},!0)||d(function(){return new w(new g(2),1,void 0).length!==1})},{"../internals/array-buffer-view-core":103,"../internals/check-correctness-of-iteration":122,"../internals/fails":150,"../internals/global":163}],260:[function(o,_,j){var h=o("../internals/array-from-constructor-and-list"),d=o("../internals/typed-array-species-constructor");_.exports=function(p,b){return h(d(p),b)}},{"../internals/array-from-constructor-and-list":108,"../internals/typed-array-species-constructor":262}],261:[function(o,_,j){var h=o("../internals/function-bind-context"),d=o("../internals/function-call"),p=o("../internals/a-constructor"),b=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/get-iterator"),c=o("../internals/get-iterator-method"),m=o("../internals/is-array-iterator-method"),v=o("../internals/array-buffer-view-core").aTypedArrayConstructor;_.exports=function(E){var T=p(this),S=b(E),C=arguments.length,x=C>1?arguments[1]:void 0,O=x!==void 0,J=c(S),P,X,B,k,D,L;if(J&&!m(J))for(D=w(S,J),L=D.next,S=[];!(k=d(L,D)).done;)S.push(k.value);for(O&&C>2&&(x=h(x,arguments[2])),X=g(S),B=new(v(T))(X),P=0;X>P;P++)B[P]=O?x(S[P],P):S[P];return B}},{"../internals/a-constructor":96,"../internals/array-buffer-view-core":103,"../internals/function-bind-context":153,"../internals/function-call":155,"../internals/get-iterator":160,"../internals/get-iterator-method":159,"../internals/is-array-iterator-method":174,"../internals/length-of-array-like":188,"../internals/to-object":250}],262:[function(o,_,j){var h=o("../internals/array-buffer-view-core"),d=o("../internals/species-constructor"),p=h.TYPED_ARRAY_CONSTRUCTOR,b=h.aTypedArrayConstructor;_.exports=function(g){return b(d(g,g[p]))}},{"../internals/array-buffer-view-core":103,"../internals/species-constructor":238}],263:[function(o,_,j){var h=o("../internals/function-uncurry-this"),d=0,p=Math.random(),b=h(1 .toString);_.exports=function(g){return"Symbol("+(g===void 0?"":g)+")_"+b(++d+p,36)}},{"../internals/function-uncurry-this":157}],264:[function(o,_,j){var h=o("../internals/native-symbol");_.exports=h&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/native-symbol":191}],265:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/fails");_.exports=h&&d(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})},{"../internals/descriptors":134,"../internals/fails":150}],266:[function(o,_,j){var h=o("../internals/global"),d=h.TypeError;_.exports=function(p,b){if(p<b)throw d("Not enough arguments");return p}},{"../internals/global":163}],267:[function(o,_,j){var h=o("../internals/well-known-symbol");j.f=h},{"../internals/well-known-symbol":268}],268:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/shared"),p=o("../internals/has-own-property"),b=o("../internals/uid"),g=o("../internals/native-symbol"),w=o("../internals/use-symbol-as-uid"),c=d("wks"),m=h.Symbol,v=m&&m.for,y=w?m:m&&m.withoutSetter||b;_.exports=function(E){if(!p(c,E)||!(g||typeof c[E]=="string")){var T="Symbol."+E;g&&p(m,E)?c[E]=m[E]:w&&v?c[E]=v(T):c[E]=y(T)}return c[E]}},{"../internals/global":163,"../internals/has-own-property":164,"../internals/native-symbol":191,"../internals/shared":237,"../internals/uid":263,"../internals/use-symbol-as-uid":264}],269:[function(o,_,j){_.exports=`
|
|
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`},{}],270:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/global"),p=o("../internals/array-buffer"),b=o("../internals/set-species"),g="ArrayBuffer",w=p[g],c=d[g];h({global:!0,forced:c!==w},{ArrayBuffer:w}),b(g)},{"../internals/array-buffer":104,"../internals/export":149,"../internals/global":163,"../internals/set-species":233}],271:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-uncurry-this"),p=o("../internals/fails"),b=o("../internals/array-buffer"),g=o("../internals/an-object"),w=o("../internals/to-absolute-index"),c=o("../internals/to-length"),m=o("../internals/species-constructor"),v=b.ArrayBuffer,y=b.DataView,E=y.prototype,T=d(v.prototype.slice),S=d(E.getUint8),C=d(E.setUint8),x=p(function(){return!new v(2).slice(1,void 0).byteLength});h({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:x},{slice:function(J,P){if(T&&P===void 0)return T(g(this),J);for(var X=g(this).byteLength,B=w(J,X),k=w(P===void 0?X:P,X),D=new(m(this,v))(c(k-B)),L=new y(this),q=new y(D),G=0;B<k;)C(q,G++,S(L,B++));return D}})},{"../internals/an-object":101,"../internals/array-buffer":104,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/species-constructor":238,"../internals/to-absolute-index":245,"../internals/to-length":249}],272:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/global"),p=o("../internals/fails"),b=o("../internals/is-array"),g=o("../internals/is-object"),w=o("../internals/to-object"),c=o("../internals/length-of-array-like"),m=o("../internals/create-property"),v=o("../internals/array-species-create"),y=o("../internals/array-method-has-species-support"),E=o("../internals/well-known-symbol"),T=o("../internals/engine-v8-version"),S=E("isConcatSpreadable"),C=9007199254740991,x="Maximum allowed index exceeded",O=d.TypeError,J=T>=51||!p(function(){var k=[];return k[S]=!1,k.concat()[0]!==k}),P=y("concat"),X=function(k){if(!g(k))return!1;var D=k[S];return D!==void 0?!!D:b(k)},B=!J||!P;h({target:"Array",proto:!0,forced:B},{concat:function(D){var L=w(this),q=v(L,0),G=0,F,N,K,re,ne;for(F=-1,K=arguments.length;F<K;F++)if(ne=F===-1?L:arguments[F],X(ne)){if(re=c(ne),G+re>C)throw O(x);for(N=0;N<re;N++,G++)N in ne&&m(q,G,ne[N])}else{if(G>=C)throw O(x);m(q,G++,ne)}return q.length=G,q}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/engine-v8-version":146,"../internals/export":149,"../internals/fails":150,"../internals/global":163,"../internals/is-array":175,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/well-known-symbol":268}],273:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/array-fill"),p=o("../internals/add-to-unscopables");h({target:"Array",proto:!0},{fill:d}),p("fill")},{"../internals/add-to-unscopables":98,"../internals/array-fill":106,"../internals/export":149}],274:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/array-iteration").filter,p=o("../internals/array-method-has-species-support"),b=p("filter");h({target:"Array",proto:!0,forced:!b},{filter:function(w){return d(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],275:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/array-iteration").find,p=o("../internals/add-to-unscopables"),b="find",g=!0;b in[]&&Array(1)[b](function(){g=!1}),h({target:"Array",proto:!0,forced:g},{find:function(c){return d(this,c,arguments.length>1?arguments[1]:void 0)}}),p(b)},{"../internals/add-to-unscopables":98,"../internals/array-iteration":111,"../internals/export":149}],276:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/array-from"),p=o("../internals/check-correctness-of-iteration"),b=!p(function(g){Array.from(g)});h({target:"Array",stat:!0,forced:b},{from:d})},{"../internals/array-from":109,"../internals/check-correctness-of-iteration":122,"../internals/export":149}],277:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/array-includes").includes,p=o("../internals/add-to-unscopables");h({target:"Array",proto:!0},{includes:function(g){return d(this,g,arguments.length>1?arguments[1]:void 0)}}),p("includes")},{"../internals/add-to-unscopables":98,"../internals/array-includes":110,"../internals/export":149}],278:[function(o,_,j){"use strict";var h=o("../internals/to-indexed-object"),d=o("../internals/add-to-unscopables"),p=o("../internals/iterators"),b=o("../internals/internal-state"),g=o("../internals/object-define-property").f,w=o("../internals/define-iterator"),c=o("../internals/is-pure"),m=o("../internals/descriptors"),v="Array Iterator",y=b.set,E=b.getterFor(v);_.exports=w(Array,"Array",function(S,C){y(this,{type:v,target:h(S),index:0,kind:C})},function(){var S=E(this),C=S.target,x=S.kind,O=S.index++;return!C||O>=C.length?(S.target=void 0,{value:void 0,done:!0}):x=="keys"?{value:O,done:!1}:x=="values"?{value:C[O],done:!1}:{value:[O,C[O]],done:!1}},"values");var T=p.Arguments=p.Array;if(d("keys"),d("values"),d("entries"),!c&&m&&T.name!=="values")try{g(T,"name",{value:"values"})}catch(S){}},{"../internals/add-to-unscopables":98,"../internals/define-iterator":132,"../internals/descriptors":134,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/iterators":187,"../internals/object-define-property":198,"../internals/to-indexed-object":247}],279:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-uncurry-this"),p=o("../internals/indexed-object"),b=o("../internals/to-indexed-object"),g=o("../internals/array-method-is-strict"),w=d([].join),c=p!=Object,m=g("join",",");h({target:"Array",proto:!0,forced:c||!m},{join:function(y){return w(b(this),y===void 0?",":y)}})},{"../internals/array-method-is-strict":114,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/indexed-object":170,"../internals/to-indexed-object":247}],280:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/array-iteration").map,p=o("../internals/array-method-has-species-support"),b=p("map");h({target:"Array",proto:!0,forced:!b},{map:function(w){return d(this,w,arguments.length>1?arguments[1]:void 0)}})},{"../internals/array-iteration":111,"../internals/array-method-has-species-support":113,"../internals/export":149}],281:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/global"),p=o("../internals/is-array"),b=o("../internals/is-constructor"),g=o("../internals/is-object"),w=o("../internals/to-absolute-index"),c=o("../internals/length-of-array-like"),m=o("../internals/to-indexed-object"),v=o("../internals/create-property"),y=o("../internals/well-known-symbol"),E=o("../internals/array-method-has-species-support"),T=o("../internals/array-slice"),S=E("slice"),C=y("species"),x=d.Array,O=Math.max;h({target:"Array",proto:!0,forced:!S},{slice:function(P,X){var B=m(this),k=c(B),D=w(P,k),L=w(X===void 0?k:X,k),q,G,F;if(p(B)&&(q=B.constructor,b(q)&&(q===x||p(q.prototype))?q=void 0:g(q)&&(q=q[C],q===null&&(q=void 0)),q===x||q===void 0))return T(B,D,L);for(G=new(q===void 0?x:q)(O(L-D,0)),F=0;D<L;D++,F++)D in B&&v(G,F,B[D]);return G.length=F,G}})},{"../internals/array-method-has-species-support":113,"../internals/array-slice":117,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/is-array":175,"../internals/is-constructor":177,"../internals/is-object":180,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-indexed-object":247,"../internals/well-known-symbol":268}],282:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-uncurry-this"),p=o("../internals/a-callable"),b=o("../internals/to-object"),g=o("../internals/length-of-array-like"),w=o("../internals/to-string"),c=o("../internals/fails"),m=o("../internals/array-sort"),v=o("../internals/array-method-is-strict"),y=o("../internals/engine-ff-version"),E=o("../internals/engine-is-ie-or-edge"),T=o("../internals/engine-v8-version"),S=o("../internals/engine-webkit-version"),C=[],x=d(C.sort),O=d(C.push),J=c(function(){C.sort(void 0)}),P=c(function(){C.sort(null)}),X=v("sort"),B=!c(function(){if(T)return T<70;if(!(y&&y>3)){if(E)return!0;if(S)return S<603;var L="",q,G,F,N;for(q=65;q<76;q++){switch(G=String.fromCharCode(q),q){case 66:case 69:case 70:case 72:F=3;break;case 68:case 71:F=4;break;default:F=2}for(N=0;N<47;N++)C.push({k:G+N,v:F})}for(C.sort(function(K,re){return re.v-K.v}),N=0;N<C.length;N++)G=C[N].k.charAt(0),L.charAt(L.length-1)!==G&&(L+=G);return L!=="DGBEFHACIJK"}}),k=J||!P||!X||!B,D=function(L){return function(q,G){return G===void 0?-1:q===void 0?1:L!==void 0?+L(q,G)||0:w(q)>w(G)?1:-1}};h({target:"Array",proto:!0,forced:k},{sort:function(q){q!==void 0&&p(q);var G=b(this);if(B)return q===void 0?x(G):x(G,q);var F=[],N=g(G),K,re;for(re=0;re<N;re++)re in G&&O(F,G[re]);for(m(F,D(q)),K=F.length,re=0;re<K;)G[re]=F[re++];for(;re<N;)delete G[re++];return G}})},{"../internals/a-callable":95,"../internals/array-method-is-strict":114,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/export":149,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-string":256}],283:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/global"),p=o("../internals/to-absolute-index"),b=o("../internals/to-integer-or-infinity"),g=o("../internals/length-of-array-like"),w=o("../internals/to-object"),c=o("../internals/array-species-create"),m=o("../internals/create-property"),v=o("../internals/array-method-has-species-support"),y=v("splice"),E=d.TypeError,T=Math.max,S=Math.min,C=9007199254740991,x="Maximum allowed length exceeded";h({target:"Array",proto:!0,forced:!y},{splice:function(J,P){var X=w(this),B=g(X),k=p(J,B),D=arguments.length,L,q,G,F,N,K;if(D===0?L=q=0:D===1?(L=0,q=B-k):(L=D-2,q=S(T(b(P),0),B-k)),B+L-q>C)throw E(x);for(G=c(X,q),F=0;F<q;F++)N=k+F,N in X&&m(G,F,X[N]);if(G.length=q,L<q){for(F=k;F<B-q;F++)N=F+q,K=F+L,N in X?X[K]=X[N]:delete X[K];for(F=B;F>B-q+L;F--)delete X[F-1]}else if(L>q)for(F=B-q;F>k;F--)N=F+q-1,K=F+L-1,N in X?X[K]=X[N]:delete X[K];for(F=0;F<L;F++)X[F+k]=arguments[F+2];return X.length=B-q+L,G}})},{"../internals/array-method-has-species-support":113,"../internals/array-species-create":120,"../internals/create-property":131,"../internals/export":149,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-absolute-index":245,"../internals/to-integer-or-infinity":248,"../internals/to-object":250}],284:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/function-name").EXISTS,p=o("../internals/function-uncurry-this"),b=o("../internals/object-define-property").f,g=Function.prototype,w=p(g.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,m=p(c.exec),v="name";h&&!d&&b(g,v,{configurable:!0,get:function(){try{return m(c,w(this))[1]}catch(y){return""}}})},{"../internals/descriptors":134,"../internals/function-name":156,"../internals/function-uncurry-this":157,"../internals/object-define-property":198}],285:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/get-built-in"),p=o("../internals/function-apply"),b=o("../internals/function-call"),g=o("../internals/function-uncurry-this"),w=o("../internals/fails"),c=o("../internals/is-array"),m=o("../internals/is-callable"),v=o("../internals/is-object"),y=o("../internals/is-symbol"),E=o("../internals/array-slice"),T=o("../internals/native-symbol"),S=d("JSON","stringify"),C=g(/./.exec),x=g("".charAt),O=g("".charCodeAt),J=g("".replace),P=g(1 .toString),X=/[\uD800-\uDFFF]/g,B=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,D=!T||w(function(){var F=d("Symbol")();return S([F])!="[null]"||S({a:F})!="{}"||S(Object(F))!="{}"}),L=w(function(){return S("\uDF06\uD834")!=='"\\udf06\\ud834"'||S("\uDEAD")!=='"\\udead"'}),q=function(F,N){var K=E(arguments),re=N;if(!(!v(N)&&F===void 0||y(F)))return c(N)||(N=function(ne,pe){if(m(re)&&(pe=b(re,this,ne,pe)),!y(pe))return pe}),K[1]=N,p(S,null,K)},G=function(F,N,K){var re=x(K,N-1),ne=x(K,N+1);return C(B,F)&&!C(k,ne)||C(k,F)&&!C(B,re)?"\\u"+P(O(F,0),16):F};S&&h({target:"JSON",stat:!0,forced:D||L},{stringify:function(N,K,re){var ne=E(arguments),pe=p(D?q:S,null,ne);return L&&typeof pe=="string"?J(pe,X,G):pe}})},{"../internals/array-slice":117,"../internals/export":149,"../internals/fails":150,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-built-in":158,"../internals/is-array":175,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-symbol":183,"../internals/native-symbol":191}],286:[function(o,_,j){"use strict";var h=o("../internals/descriptors"),d=o("../internals/global"),p=o("../internals/function-uncurry-this"),b=o("../internals/is-forced"),g=o("../internals/redefine"),w=o("../internals/has-own-property"),c=o("../internals/inherit-if-required"),m=o("../internals/object-is-prototype-of"),v=o("../internals/is-symbol"),y=o("../internals/to-primitive"),E=o("../internals/fails"),T=o("../internals/object-get-own-property-names").f,S=o("../internals/object-get-own-property-descriptor").f,C=o("../internals/object-define-property").f,x=o("../internals/this-number-value"),O=o("../internals/string-trim").trim,J="Number",P=d[J],X=P.prototype,B=d.TypeError,k=p("".slice),D=p("".charCodeAt),L=function(re){var ne=y(re,"number");return typeof ne=="bigint"?ne:q(ne)},q=function(re){var ne=y(re,"number"),pe,ie,Ae,Y,fe,ve,be,le;if(v(ne))throw B("Cannot convert a Symbol value to a number");if(typeof ne=="string"&&ne.length>2){if(ne=O(ne),pe=D(ne,0),pe===43||pe===45){if(ie=D(ne,2),ie===88||ie===120)return NaN}else if(pe===48){switch(D(ne,1)){case 66:case 98:Ae=2,Y=49;break;case 79:case 111:Ae=8,Y=55;break;default:return+ne}for(fe=k(ne,2),ve=fe.length,be=0;be<ve;be++)if(le=D(fe,be),le<48||le>Y)return NaN;return parseInt(fe,Ae)}}return+ne};if(b(J,!P(" 0o1")||!P("0b1")||P("+0x1"))){for(var G=function(ne){var pe=arguments.length<1?0:P(L(ne)),ie=this;return m(X,ie)&&E(function(){x(ie)})?c(Object(pe),ie,G):pe},F=h?T(P):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),N=0,K;F.length>N;N++)w(P,K=F[N])&&!w(G,K)&&C(G,K,S(P,K));G.prototype=X,X.constructor=G,g(d,J,G)}},{"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/is-forced":178,"../internals/is-symbol":183,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/redefine":222,"../internals/string-trim":241,"../internals/this-number-value":244,"../internals/to-primitive":253}],287:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/object-assign");h({target:"Object",stat:!0,forced:Object.assign!==d},{assign:d})},{"../internals/export":149,"../internals/object-assign":195}],288:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/object-to-array").entries;h({target:"Object",stat:!0},{entries:function(b){return d(b)}})},{"../internals/export":149,"../internals/object-to-array":209}],289:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/native-symbol"),p=o("../internals/fails"),b=o("../internals/object-get-own-property-symbols"),g=o("../internals/to-object"),w=!d||p(function(){b.f(1)});h({target:"Object",stat:!0,forced:w},{getOwnPropertySymbols:function(m){var v=b.f;return v?v(g(m)):[]}})},{"../internals/export":149,"../internals/fails":150,"../internals/native-symbol":191,"../internals/object-get-own-property-symbols":202,"../internals/to-object":250}],290:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/to-object"),p=o("../internals/object-keys"),b=o("../internals/fails"),g=b(function(){p(1)});h({target:"Object",stat:!0,forced:g},{keys:function(c){return p(d(c))}})},{"../internals/export":149,"../internals/fails":150,"../internals/object-keys":206,"../internals/to-object":250}],291:[function(o,_,j){var h=o("../internals/to-string-tag-support"),d=o("../internals/redefine"),p=o("../internals/object-to-string");h||d(Object.prototype,"toString",p,{unsafe:!0})},{"../internals/object-to-string":210,"../internals/redefine":222,"../internals/to-string-tag-support":255}],292:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-call"),p=o("../internals/a-callable"),b=o("../internals/new-promise-capability"),g=o("../internals/perform"),w=o("../internals/iterate"),c=o("../internals/promise-statics-incorrect-iteration");h({target:"Promise",stat:!0,forced:c},{all:function(v){var y=this,E=b.f(y),T=E.resolve,S=E.reject,C=g(function(){var x=p(y.resolve),O=[],J=0,P=1;w(v,function(X){var B=J++,k=!1;P++,d(x,y,X).then(function(D){k||(k=!0,O[B]=D,--P||T(O))},S)}),--P||T(O)});return C.error&&S(C.value),E.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],293:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/is-pure"),p=o("../internals/promise-constructor-detection").CONSTRUCTOR,b=o("../internals/promise-native-constructor"),g=o("../internals/get-built-in"),w=o("../internals/is-callable"),c=o("../internals/redefine"),m=b&&b.prototype;if(h({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(y){return this.then(void 0,y)}}),!d&&w(b)){var v=g("Promise").prototype.catch;m.catch!==v&&c(m,"catch",v,{unsafe:!0})}},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-callable":176,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/redefine":222}],294:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/is-pure"),p=o("../internals/engine-is-node"),b=o("../internals/global"),g=o("../internals/function-call"),w=o("../internals/redefine"),c=o("../internals/redefine-all"),m=o("../internals/object-set-prototype-of"),v=o("../internals/set-to-string-tag"),y=o("../internals/set-species"),E=o("../internals/a-callable"),T=o("../internals/is-callable"),S=o("../internals/is-object"),C=o("../internals/an-instance"),x=o("../internals/species-constructor"),O=o("../internals/task").set,J=o("../internals/microtask"),P=o("../internals/host-report-errors"),X=o("../internals/perform"),B=o("../internals/queue"),k=o("../internals/internal-state"),D=o("../internals/promise-native-constructor"),L=o("../internals/promise-constructor-detection"),q=o("../internals/new-promise-capability"),G="Promise",F=L.CONSTRUCTOR,N=L.REJECTION_EVENT,K=L.SUBCLASSING,re=k.getterFor(G),ne=k.set,pe=D&&D.prototype,ie=D,Ae=pe,Y=b.TypeError,fe=b.document,ve=b.process,be=q.f,le=be,ue=!!(fe&&fe.createEvent&&b.dispatchEvent),ge="unhandledrejection",Ee="rejectionhandled",ke=0,Ie=1,de=2,Z=1,ye=2,V,Q,U,H,ee=function(Pe){var Ve;return S(Pe)&&T(Ve=Pe.then)?Ve:!1},W=function(Pe,Ve){var De=Ve.value,Xe=Ve.state==Ie,Ke=Xe?Pe.ok:Pe.fail,$e=Pe.resolve,Je=Pe.reject,nt=Pe.domain,et,ht,Et;try{Ke?(Xe||(Ve.rejection===ye&&Ue(Ve),Ve.rejection=Z),Ke===!0?et=De:(nt&&nt.enter(),et=Ke(De),nt&&(nt.exit(),Et=!0)),et===Pe.promise?Je(Y("Promise-chain cycle")):(ht=ee(et))?g(ht,et,$e,Je):$e(et)):Je(De)}catch(zt){nt&&!Et&&nt.exit(),Je(zt)}},M=function(Pe,Ve){Pe.notified||(Pe.notified=!0,J(function(){for(var De=Pe.reactions,Xe;Xe=De.get();)W(Xe,Pe);Pe.notified=!1,Ve&&!Pe.rejection&&ce(Pe)}))},$=function(Pe,Ve,De){var Xe,Ke;ue?(Xe=fe.createEvent("Event"),Xe.promise=Ve,Xe.reason=De,Xe.initEvent(Pe,!1,!0),b.dispatchEvent(Xe)):Xe={promise:Ve,reason:De},!N&&(Ke=b["on"+Pe])?Ke(Xe):Pe===ge&&P("Unhandled promise rejection",De)},ce=function(Pe){g(O,b,function(){var Ve=Pe.facade,De=Pe.value,Xe=Ce(Pe),Ke;if(Xe&&(Ke=X(function(){p?ve.emit("unhandledRejection",De,Ve):$(ge,Ve,De)}),Pe.rejection=p||Ce(Pe)?ye:Z,Ke.error))throw Ke.value})},Ce=function(Pe){return Pe.rejection!==Z&&!Pe.parent},Ue=function(Pe){g(O,b,function(){var Ve=Pe.facade;p?ve.emit("rejectionHandled",Ve):$(Ee,Ve,Pe.value)})},_e=function(Pe,Ve,De){return function(Xe){Pe(Ve,Xe,De)}},he=function(Pe,Ve,De){Pe.done||(Pe.done=!0,De&&(Pe=De),Pe.value=Ve,Pe.state=de,M(Pe,!0))},Te=function(Pe,Ve,De){if(!Pe.done){Pe.done=!0,De&&(Pe=De);try{if(Pe.facade===Ve)throw Y("Promise can't be resolved itself");var Xe=ee(Ve);Xe?J(function(){var Ke={done:!1};try{g(Xe,Ve,_e(Te,Ke,Pe),_e(he,Ke,Pe))}catch($e){he(Ke,$e,Pe)}}):(Pe.value=Ve,Pe.state=Ie,M(Pe,!1))}catch(Ke){he({done:!1},Ke,Pe)}}};if(F&&(ie=function(Ve){C(this,Ae),E(Ve),g(V,this);var De=re(this);try{Ve(_e(Te,De),_e(he,De))}catch(Xe){he(De,Xe)}},Ae=ie.prototype,V=function(Ve){ne(this,{type:G,done:!1,notified:!1,parent:!1,reactions:new B,rejection:!1,state:ke,value:void 0})},V.prototype=c(Ae,{then:function(Ve,De){var Xe=re(this),Ke=be(x(this,ie));return Xe.parent=!0,Ke.ok=T(Ve)?Ve:!0,Ke.fail=T(De)&&De,Ke.domain=p?ve.domain:void 0,Xe.state==ke?Xe.reactions.add(Ke):J(function(){W(Ke,Xe)}),Ke.promise}}),Q=function(){var Pe=new V,Ve=re(Pe);this.promise=Pe,this.resolve=_e(Te,Ve),this.reject=_e(he,Ve)},q.f=be=function(Pe){return Pe===ie||Pe===U?new Q(Pe):le(Pe)},!d&&T(D)&&pe!==Object.prototype)){H=pe.then,K||w(pe,"then",function(Ve,De){var Xe=this;return new ie(function(Ke,$e){g(H,Xe,Ke,$e)}).then(Ve,De)},{unsafe:!0});try{delete pe.constructor}catch(Pe){}m&&m(pe,Ae)}h({global:!0,wrap:!0,forced:F},{Promise:ie}),v(ie,G,!1,!0),y(G)},{"../internals/a-callable":95,"../internals/an-instance":100,"../internals/engine-is-node":143,"../internals/export":149,"../internals/function-call":155,"../internals/global":163,"../internals/host-report-errors":166,"../internals/internal-state":173,"../internals/is-callable":176,"../internals/is-object":180,"../internals/is-pure":181,"../internals/microtask":189,"../internals/new-promise-capability":193,"../internals/object-set-prototype-of":208,"../internals/perform":214,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/queue":220,"../internals/redefine":222,"../internals/redefine-all":221,"../internals/set-species":233,"../internals/set-to-string-tag":234,"../internals/species-constructor":238,"../internals/task":243}],295:[function(o,_,j){o("../modules/es.promise.constructor"),o("../modules/es.promise.all"),o("../modules/es.promise.catch"),o("../modules/es.promise.race"),o("../modules/es.promise.reject"),o("../modules/es.promise.resolve")},{"../modules/es.promise.all":292,"../modules/es.promise.catch":293,"../modules/es.promise.constructor":294,"../modules/es.promise.race":296,"../modules/es.promise.reject":297,"../modules/es.promise.resolve":298}],296:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-call"),p=o("../internals/a-callable"),b=o("../internals/new-promise-capability"),g=o("../internals/perform"),w=o("../internals/iterate"),c=o("../internals/promise-statics-incorrect-iteration");h({target:"Promise",stat:!0,forced:c},{race:function(v){var y=this,E=b.f(y),T=E.reject,S=g(function(){var C=p(y.resolve);w(v,function(x){d(C,y,x).then(E.resolve,T)})});return S.error&&T(S.value),E.promise}})},{"../internals/a-callable":95,"../internals/export":149,"../internals/function-call":155,"../internals/iterate":184,"../internals/new-promise-capability":193,"../internals/perform":214,"../internals/promise-statics-incorrect-iteration":218}],297:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-call"),p=o("../internals/new-promise-capability"),b=o("../internals/promise-constructor-detection").CONSTRUCTOR;h({target:"Promise",stat:!0,forced:b},{reject:function(w){var c=p.f(this);return d(c.reject,void 0,w),c.promise}})},{"../internals/export":149,"../internals/function-call":155,"../internals/new-promise-capability":193,"../internals/promise-constructor-detection":215}],298:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/get-built-in"),p=o("../internals/is-pure"),b=o("../internals/promise-native-constructor"),g=o("../internals/promise-constructor-detection").CONSTRUCTOR,w=o("../internals/promise-resolve"),c=d("Promise"),m=p&&!g;h({target:"Promise",stat:!0,forced:p||g},{resolve:function(y){return w(m&&this===c?b:this,y)}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/is-pure":181,"../internals/promise-constructor-detection":215,"../internals/promise-native-constructor":216,"../internals/promise-resolve":217}],299:[function(o,_,j){var h=o("../internals/descriptors"),d=o("../internals/global"),p=o("../internals/function-uncurry-this"),b=o("../internals/is-forced"),g=o("../internals/inherit-if-required"),w=o("../internals/create-non-enumerable-property"),c=o("../internals/object-get-own-property-names").f,m=o("../internals/object-is-prototype-of"),v=o("../internals/is-regexp"),y=o("../internals/to-string"),E=o("../internals/regexp-get-flags"),T=o("../internals/regexp-sticky-helpers"),S=o("../internals/proxy-accessor"),C=o("../internals/redefine"),x=o("../internals/fails"),O=o("../internals/has-own-property"),J=o("../internals/internal-state").enforce,P=o("../internals/set-species"),X=o("../internals/well-known-symbol"),B=o("../internals/regexp-unsupported-dot-all"),k=o("../internals/regexp-unsupported-ncg"),D=X("match"),L=d.RegExp,q=L.prototype,G=d.SyntaxError,F=p(q.exec),N=p("".charAt),K=p("".replace),re=p("".indexOf),ne=p("".slice),pe=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,ie=/a/g,Ae=/a/g,Y=new L(ie)!==ie,fe=T.MISSED_STICKY,ve=T.UNSUPPORTED_Y,be=h&&(!Y||fe||B||k||x(function(){return Ae[D]=!1,L(ie)!=ie||L(Ae)==Ae||L(ie,"i")!="/a/i"})),le=function(Ie){for(var de=Ie.length,Z=0,ye="",V=!1,Q;Z<=de;Z++){if(Q=N(Ie,Z),Q==="\\"){ye+=Q+N(Ie,++Z);continue}!V&&Q==="."?ye+="[\\s\\S]":(Q==="["?V=!0:Q==="]"&&(V=!1),ye+=Q)}return ye},ue=function(Ie){for(var de=Ie.length,Z=0,ye="",V=[],Q={},U=!1,H=!1,ee=0,W="",M;Z<=de;Z++){if(M=N(Ie,Z),M==="\\")M=M+N(Ie,++Z);else if(M==="]")U=!1;else if(!U)switch(!0){case M==="[":U=!0;break;case M==="(":F(pe,ne(Ie,Z+1))&&(Z+=2,H=!0),ye+=M,ee++;continue;case(M===">"&&H):if(W===""||O(Q,W))throw new G("Invalid capture group name");Q[W]=!0,V[V.length]=[W,ee],H=!1,W="";continue}H?W+=M:ye+=M}return[ye,V]};if(b("RegExp",be)){for(var ge=function(de,Z){var ye=m(q,this),V=v(de),Q=Z===void 0,U=[],H=de,ee,W,M,$,ce,Ce;if(!ye&&V&&Q&&de.constructor===ge)return de;if((V||m(q,de))&&(de=de.source,Q&&(Z=E(H))),de=de===void 0?"":y(de),Z=Z===void 0?"":y(Z),H=de,B&&"dotAll"in ie&&(W=!!Z&&re(Z,"s")>-1,W&&(Z=K(Z,/s/g,""))),ee=Z,fe&&"sticky"in ie&&(M=!!Z&&re(Z,"y")>-1,M&&ve&&(Z=K(Z,/y/g,""))),k&&($=ue(de),de=$[0],U=$[1]),ce=g(L(de,Z),ye?this:q,ge),(W||M||U.length)&&(Ce=J(ce),W&&(Ce.dotAll=!0,Ce.raw=ge(le(de),ee)),M&&(Ce.sticky=!0),U.length&&(Ce.groups=U)),de!==H)try{w(ce,"source",H===""?"(?:)":H)}catch(Ue){}return ce},Ee=c(L),ke=0;Ee.length>ke;)S(ge,L,Ee[ke++]);q.constructor=ge,ge.prototype=q,C(d,"RegExp",ge)}P("RegExp")},{"../internals/create-non-enumerable-property":129,"../internals/descriptors":134,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/inherit-if-required":171,"../internals/internal-state":173,"../internals/is-forced":178,"../internals/is-regexp":182,"../internals/object-get-own-property-names":201,"../internals/object-is-prototype-of":204,"../internals/proxy-accessor":219,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/regexp-sticky-helpers":227,"../internals/regexp-unsupported-dot-all":228,"../internals/regexp-unsupported-ncg":229,"../internals/set-species":233,"../internals/to-string":256,"../internals/well-known-symbol":268}],300:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/regexp-exec");h({target:"RegExp",proto:!0,forced:/./.exec!==d},{exec:d})},{"../internals/export":149,"../internals/regexp-exec":224}],301:[function(o,_,j){"use strict";var h=o("../internals/function-name").PROPER,d=o("../internals/redefine"),p=o("../internals/an-object"),b=o("../internals/to-string"),g=o("../internals/fails"),w=o("../internals/regexp-get-flags"),c="toString",m=RegExp.prototype,v=m[c],y=g(function(){return v.call({source:"a",flags:"b"})!="/a/b"}),E=h&&v.name!=c;(y||E)&&d(RegExp.prototype,c,function(){var S=p(this),C=b(S.source),x=b(w(S));return"/"+C+"/"+x},{unsafe:!0})},{"../internals/an-object":101,"../internals/fails":150,"../internals/function-name":156,"../internals/redefine":222,"../internals/regexp-get-flags":226,"../internals/to-string":256}],302:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/function-uncurry-this"),p=o("../internals/not-a-regexp"),b=o("../internals/require-object-coercible"),g=o("../internals/to-string"),w=o("../internals/correct-is-regexp-logic"),c=d("".indexOf);h({target:"String",proto:!0,forced:!w("includes")},{includes:function(v){return!!~c(g(b(this)),g(p(v)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":126,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/not-a-regexp":194,"../internals/require-object-coercible":230,"../internals/to-string":256}],303:[function(o,_,j){"use strict";var h=o("../internals/string-multibyte").charAt,d=o("../internals/to-string"),p=o("../internals/internal-state"),b=o("../internals/define-iterator"),g="String Iterator",w=p.set,c=p.getterFor(g);b(String,"String",function(m){w(this,{type:g,string:d(m),index:0})},function(){var v=c(this),y=v.string,E=v.index,T;return E>=y.length?{value:void 0,done:!0}:(T=h(y,E),v.index+=T.length,{value:T,done:!1})})},{"../internals/define-iterator":132,"../internals/internal-state":173,"../internals/string-multibyte":239,"../internals/to-string":256}],304:[function(o,_,j){"use strict";var h=o("../internals/function-call"),d=o("../internals/fix-regexp-well-known-symbol-logic"),p=o("../internals/an-object"),b=o("../internals/to-length"),g=o("../internals/to-string"),w=o("../internals/require-object-coercible"),c=o("../internals/get-method"),m=o("../internals/advance-string-index"),v=o("../internals/regexp-exec-abstract");d("match",function(y,E,T){return[function(C){var x=w(this),O=C==null?void 0:c(C,y);return O?h(O,C,x):new RegExp(C)[y](g(x))},function(S){var C=p(this),x=g(S),O=T(E,C,x);if(O.done)return O.value;if(!C.global)return v(C,x);var J=C.unicode;C.lastIndex=0;for(var P=[],X=0,B;(B=v(C,x))!==null;){var k=g(B[0]);P[X]=k,k===""&&(C.lastIndex=m(x,b(C.lastIndex),J)),X++}return X===0?null:P}]})},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-length":249,"../internals/to-string":256}],305:[function(o,_,j){"use strict";var h=o("../internals/function-apply"),d=o("../internals/function-call"),p=o("../internals/function-uncurry-this"),b=o("../internals/fix-regexp-well-known-symbol-logic"),g=o("../internals/fails"),w=o("../internals/an-object"),c=o("../internals/is-callable"),m=o("../internals/to-integer-or-infinity"),v=o("../internals/to-length"),y=o("../internals/to-string"),E=o("../internals/require-object-coercible"),T=o("../internals/advance-string-index"),S=o("../internals/get-method"),C=o("../internals/get-substitution"),x=o("../internals/regexp-exec-abstract"),O=o("../internals/well-known-symbol"),J=O("replace"),P=Math.max,X=Math.min,B=p([].concat),k=p([].push),D=p("".indexOf),L=p("".slice),q=function(K){return K===void 0?K:String(K)},G=function(){return"a".replace(/./,"$0")==="$0"}(),F=function(){return/./[J]?/./[J]("a","$0")==="":!1}(),N=!g(function(){var K=/./;return K.exec=function(){var re=[];return re.groups={a:"7"},re},"".replace(K,"$<a>")!=="7"});b("replace",function(K,re,ne){var pe=F?"$":"$0";return[function(Ae,Y){var fe=E(this),ve=Ae==null?void 0:S(Ae,J);return ve?d(ve,Ae,fe,Y):d(re,y(fe),Ae,Y)},function(ie,Ae){var Y=w(this),fe=y(ie);if(typeof Ae=="string"&&D(Ae,pe)===-1&&D(Ae,"$<")===-1){var ve=ne(re,Y,fe,Ae);if(ve.done)return ve.value}var be=c(Ae);be||(Ae=y(Ae));var le=Y.global;if(le){var ue=Y.unicode;Y.lastIndex=0}for(var ge=[];;){var Ee=x(Y,fe);if(Ee===null||(k(ge,Ee),!le))break;var ke=y(Ee[0]);ke===""&&(Y.lastIndex=T(fe,v(Y.lastIndex),ue))}for(var Ie="",de=0,Z=0;Z<ge.length;Z++){Ee=ge[Z];for(var ye=y(Ee[0]),V=P(X(m(Ee.index),fe.length),0),Q=[],U=1;U<Ee.length;U++)k(Q,q(Ee[U]));var H=Ee.groups;if(be){var ee=B([ye],Q,V,fe);H!==void 0&&k(ee,H);var W=y(h(Ae,void 0,ee))}else W=C(ye,fe,V,Q,H,Ae);V>=de&&(Ie+=L(fe,de,V)+W,de=V+ye.length)}return Ie+L(fe,de)}]},!N||!G||F)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/get-substitution":162,"../internals/is-callable":176,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/to-integer-or-infinity":248,"../internals/to-length":249,"../internals/to-string":256,"../internals/well-known-symbol":268}],306:[function(o,_,j){"use strict";var h=o("../internals/function-call"),d=o("../internals/fix-regexp-well-known-symbol-logic"),p=o("../internals/an-object"),b=o("../internals/require-object-coercible"),g=o("../internals/same-value"),w=o("../internals/to-string"),c=o("../internals/get-method"),m=o("../internals/regexp-exec-abstract");d("search",function(v,y,E){return[function(S){var C=b(this),x=S==null?void 0:c(S,v);return x?h(x,S,C):new RegExp(S)[v](w(C))},function(T){var S=p(this),C=w(T),x=E(y,S,C);if(x.done)return x.value;var O=S.lastIndex;g(O,0)||(S.lastIndex=0);var J=m(S,C);return g(S.lastIndex,O)||(S.lastIndex=O),J===null?-1:J.index}]})},{"../internals/an-object":101,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-call":155,"../internals/get-method":161,"../internals/regexp-exec-abstract":223,"../internals/require-object-coercible":230,"../internals/same-value":231,"../internals/to-string":256}],307:[function(o,_,j){"use strict";var h=o("../internals/function-apply"),d=o("../internals/function-call"),p=o("../internals/function-uncurry-this"),b=o("../internals/fix-regexp-well-known-symbol-logic"),g=o("../internals/is-regexp"),w=o("../internals/an-object"),c=o("../internals/require-object-coercible"),m=o("../internals/species-constructor"),v=o("../internals/advance-string-index"),y=o("../internals/to-length"),E=o("../internals/to-string"),T=o("../internals/get-method"),S=o("../internals/array-slice-simple"),C=o("../internals/regexp-exec-abstract"),x=o("../internals/regexp-exec"),O=o("../internals/regexp-sticky-helpers"),J=o("../internals/fails"),P=O.UNSUPPORTED_Y,X=4294967295,B=Math.min,k=[].push,D=p(/./.exec),L=p(k),q=p("".slice),G=!J(function(){var F=/(?:)/,N=F.exec;F.exec=function(){return N.apply(this,arguments)};var K="ab".split(F);return K.length!==2||K[0]!=="a"||K[1]!=="b"});b("split",function(F,N,K){var re;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?re=function(ne,pe){var ie=E(c(this)),Ae=pe===void 0?X:pe>>>0;if(Ae===0)return[];if(ne===void 0)return[ie];if(!g(ne))return d(N,ie,ne,Ae);for(var Y=[],fe=(ne.ignoreCase?"i":"")+(ne.multiline?"m":"")+(ne.unicode?"u":"")+(ne.sticky?"y":""),ve=0,be=new RegExp(ne.source,fe+"g"),le,ue,ge;(le=d(x,be,ie))&&(ue=be.lastIndex,!(ue>ve&&(L(Y,q(ie,ve,le.index)),le.length>1&&le.index<ie.length&&h(k,Y,S(le,1)),ge=le[0].length,ve=ue,Y.length>=Ae)));)be.lastIndex===le.index&&be.lastIndex++;return ve===ie.length?(ge||!D(be,""))&&L(Y,""):L(Y,q(ie,ve)),Y.length>Ae?S(Y,0,Ae):Y}:"0".split(void 0,0).length?re=function(ne,pe){return ne===void 0&&pe===0?[]:d(N,this,ne,pe)}:re=N,[function(pe,ie){var Ae=c(this),Y=pe==null?void 0:T(pe,F);return Y?d(Y,pe,Ae,ie):d(re,E(Ae),pe,ie)},function(ne,pe){var ie=w(this),Ae=E(ne),Y=K(re,ie,Ae,pe,re!==N);if(Y.done)return Y.value;var fe=m(ie,RegExp),ve=ie.unicode,be=(ie.ignoreCase?"i":"")+(ie.multiline?"m":"")+(ie.unicode?"u":"")+(P?"g":"y"),le=new fe(P?"^(?:"+ie.source+")":ie,be),ue=pe===void 0?X:pe>>>0;if(ue===0)return[];if(Ae.length===0)return C(le,Ae)===null?[Ae]:[];for(var ge=0,Ee=0,ke=[];Ee<Ae.length;){le.lastIndex=P?0:Ee;var Ie=C(le,P?q(Ae,Ee):Ae),de;if(Ie===null||(de=B(y(le.lastIndex+(P?Ee:0)),Ae.length))===ge)Ee=v(Ae,Ee,ve);else{if(L(ke,q(Ae,ge,Ee)),ke.length===ue)return ke;for(var Z=1;Z<=Ie.length-1;Z++)if(L(ke,Ie[Z]),ke.length===ue)return ke;Ee=ge=de}}return L(ke,q(Ae,ge)),ke}]},!G,P)},{"../internals/advance-string-index":99,"../internals/an-object":101,"../internals/array-slice-simple":116,"../internals/fails":150,"../internals/fix-regexp-well-known-symbol-logic":151,"../internals/function-apply":152,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/get-method":161,"../internals/is-regexp":182,"../internals/regexp-exec":224,"../internals/regexp-exec-abstract":223,"../internals/regexp-sticky-helpers":227,"../internals/require-object-coercible":230,"../internals/species-constructor":238,"../internals/to-length":249,"../internals/to-string":256}],308:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/string-trim").trim,p=o("../internals/string-trim-forced");h({target:"String",proto:!0,forced:p("trim")},{trim:function(){return d(this)}})},{"../internals/export":149,"../internals/string-trim":241,"../internals/string-trim-forced":240}],309:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/global"),p=o("../internals/function-call"),b=o("../internals/function-uncurry-this"),g=o("../internals/is-pure"),w=o("../internals/descriptors"),c=o("../internals/native-symbol"),m=o("../internals/fails"),v=o("../internals/has-own-property"),y=o("../internals/object-is-prototype-of"),E=o("../internals/an-object"),T=o("../internals/to-indexed-object"),S=o("../internals/to-property-key"),C=o("../internals/to-string"),x=o("../internals/create-property-descriptor"),O=o("../internals/object-create"),J=o("../internals/object-keys"),P=o("../internals/object-get-own-property-names"),X=o("../internals/object-get-own-property-names-external"),B=o("../internals/object-get-own-property-symbols"),k=o("../internals/object-get-own-property-descriptor"),D=o("../internals/object-define-property"),L=o("../internals/object-define-properties"),q=o("../internals/object-property-is-enumerable"),G=o("../internals/redefine"),F=o("../internals/shared"),N=o("../internals/shared-key"),K=o("../internals/hidden-keys"),re=o("../internals/uid"),ne=o("../internals/well-known-symbol"),pe=o("../internals/well-known-symbol-wrapped"),ie=o("../internals/define-well-known-symbol"),Ae=o("../internals/symbol-define-to-primitive"),Y=o("../internals/set-to-string-tag"),fe=o("../internals/internal-state"),ve=o("../internals/array-iteration").forEach,be=N("hidden"),le="Symbol",ue="prototype",ge=fe.set,Ee=fe.getterFor(le),ke=Object[ue],Ie=d.Symbol,de=Ie&&Ie[ue],Z=d.TypeError,ye=d.QObject,V=k.f,Q=D.f,U=X.f,H=q.f,ee=b([].push),W=F("symbols"),M=F("op-symbols"),$=F("wks"),ce=!ye||!ye[ue]||!ye[ue].findChild,Ce=w&&m(function(){return O(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a!=7})?function(Ke,$e,Je){var nt=V(ke,$e);nt&&delete ke[$e],Q(Ke,$e,Je),nt&&Ke!==ke&&Q(ke,$e,nt)}:Q,Ue=function(Ke,$e){var Je=W[Ke]=O(de);return ge(Je,{type:le,tag:Ke,description:$e}),w||(Je.description=$e),Je},_e=function($e,Je,nt){$e===ke&&_e(M,Je,nt),E($e);var et=S(Je);return E(nt),v(W,et)?(nt.enumerable?(v($e,be)&&$e[be][et]&&($e[be][et]=!1),nt=O(nt,{enumerable:x(0,!1)})):(v($e,be)||Q($e,be,x(1,{})),$e[be][et]=!0),Ce($e,et,nt)):Q($e,et,nt)},he=function($e,Je){E($e);var nt=T(Je),et=J(nt).concat(Xe(nt));return ve(et,function(ht){(!w||p(Pe,nt,ht))&&_e($e,ht,nt[ht])}),$e},Te=function($e,Je){return Je===void 0?O($e):he(O($e),Je)},Pe=function($e){var Je=S($e),nt=p(H,this,Je);return this===ke&&v(W,Je)&&!v(M,Je)?!1:nt||!v(this,Je)||!v(W,Je)||v(this,be)&&this[be][Je]?nt:!0},Ve=function($e,Je){var nt=T($e),et=S(Je);if(!(nt===ke&&v(W,et)&&!v(M,et))){var ht=V(nt,et);return ht&&v(W,et)&&!(v(nt,be)&&nt[be][et])&&(ht.enumerable=!0),ht}},De=function($e){var Je=U(T($e)),nt=[];return ve(Je,function(et){!v(W,et)&&!v(K,et)&&ee(nt,et)}),nt},Xe=function(Ke){var $e=Ke===ke,Je=U($e?M:T(Ke)),nt=[];return ve(Je,function(et){v(W,et)&&(!$e||v(ke,et))&&ee(nt,W[et])}),nt};c||(Ie=function(){if(y(de,this))throw Z("Symbol is not a constructor");var $e=!arguments.length||arguments[0]===void 0?void 0:C(arguments[0]),Je=re($e),nt=function(et){this===ke&&p(nt,M,et),v(this,be)&&v(this[be],Je)&&(this[be][Je]=!1),Ce(this,Je,x(1,et))};return w&&ce&&Ce(ke,Je,{configurable:!0,set:nt}),Ue(Je,$e)},de=Ie[ue],G(de,"toString",function(){return Ee(this).tag}),G(Ie,"withoutSetter",function(Ke){return Ue(re(Ke),Ke)}),q.f=Pe,D.f=_e,L.f=he,k.f=Ve,P.f=X.f=De,B.f=Xe,pe.f=function(Ke){return Ue(ne(Ke),Ke)},w&&(Q(de,"description",{configurable:!0,get:function(){return Ee(this).description}}),g||G(ke,"propertyIsEnumerable",Pe,{unsafe:!0}))),h({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:Ie}),ve(J($),function(Ke){ie(Ke)}),h({target:le,stat:!0,forced:!c},{useSetter:function(){ce=!0},useSimple:function(){ce=!1}}),h({target:"Object",stat:!0,forced:!c,sham:!w},{create:Te,defineProperty:_e,defineProperties:he,getOwnPropertyDescriptor:Ve}),h({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:De}),Ae(),Y(Ie,le),K[be]=!0},{"../internals/an-object":101,"../internals/array-iteration":111,"../internals/create-property-descriptor":130,"../internals/define-well-known-symbol":133,"../internals/descriptors":134,"../internals/export":149,"../internals/fails":150,"../internals/function-call":155,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/hidden-keys":165,"../internals/internal-state":173,"../internals/is-pure":181,"../internals/native-symbol":191,"../internals/object-create":196,"../internals/object-define-properties":197,"../internals/object-define-property":198,"../internals/object-get-own-property-descriptor":199,"../internals/object-get-own-property-names":201,"../internals/object-get-own-property-names-external":200,"../internals/object-get-own-property-symbols":202,"../internals/object-is-prototype-of":204,"../internals/object-keys":206,"../internals/object-property-is-enumerable":207,"../internals/redefine":222,"../internals/set-to-string-tag":234,"../internals/shared":237,"../internals/shared-key":235,"../internals/symbol-define-to-primitive":242,"../internals/to-indexed-object":247,"../internals/to-property-key":254,"../internals/to-string":256,"../internals/uid":263,"../internals/well-known-symbol":268,"../internals/well-known-symbol-wrapped":267}],310:[function(o,_,j){"use strict";var h=o("../internals/export"),d=o("../internals/descriptors"),p=o("../internals/global"),b=o("../internals/function-uncurry-this"),g=o("../internals/has-own-property"),w=o("../internals/is-callable"),c=o("../internals/object-is-prototype-of"),m=o("../internals/to-string"),v=o("../internals/object-define-property").f,y=o("../internals/copy-constructor-properties"),E=p.Symbol,T=E&&E.prototype;if(d&&w(E)&&(!("description"in T)||E().description!==void 0)){var S={},C=function(){var D=arguments.length<1||arguments[0]===void 0?void 0:m(arguments[0]),L=c(T,this)?new E(D):D===void 0?E():E(D);return D===""&&(S[L]=!0),L};y(C,E),C.prototype=T,T.constructor=C;var x=String(E("test"))=="Symbol(test)",O=b(T.toString),J=b(T.valueOf),P=/^Symbol\((.*)\)[^)]+$/,X=b("".replace),B=b("".slice);v(T,"description",{configurable:!0,get:function(){var D=J(this),L=O(D);if(g(S,D))return"";var q=x?B(L,7,-1):X(L,P,"$1");return q===""?void 0:q}}),h({global:!0,forced:!0},{Symbol:C})}},{"../internals/copy-constructor-properties":125,"../internals/descriptors":134,"../internals/export":149,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/has-own-property":164,"../internals/is-callable":176,"../internals/object-define-property":198,"../internals/object-is-prototype-of":204,"../internals/to-string":256}],311:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/get-built-in"),p=o("../internals/has-own-property"),b=o("../internals/to-string"),g=o("../internals/shared"),w=o("../internals/native-symbol-registry"),c=g("string-to-symbol-registry"),m=g("symbol-to-string-registry");h({target:"Symbol",stat:!0,forced:!w},{for:function(v){var y=b(v);if(p(c,y))return c[y];var E=d("Symbol")(y);return c[y]=E,m[E]=y,E}})},{"../internals/export":149,"../internals/get-built-in":158,"../internals/has-own-property":164,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/to-string":256}],312:[function(o,_,j){var h=o("../internals/define-well-known-symbol");h("iterator")},{"../internals/define-well-known-symbol":133}],313:[function(o,_,j){o("../modules/es.symbol.constructor"),o("../modules/es.symbol.for"),o("../modules/es.symbol.key-for"),o("../modules/es.json.stringify"),o("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":285,"../modules/es.object.get-own-property-symbols":289,"../modules/es.symbol.constructor":309,"../modules/es.symbol.for":311,"../modules/es.symbol.key-for":314}],314:[function(o,_,j){var h=o("../internals/export"),d=o("../internals/has-own-property"),p=o("../internals/is-symbol"),b=o("../internals/try-to-string"),g=o("../internals/shared"),w=o("../internals/native-symbol-registry"),c=g("symbol-to-string-registry");h({target:"Symbol",stat:!0,forced:!w},{keyFor:function(v){if(!p(v))throw TypeError(b(v)+" is not a symbol");if(d(c,v))return c[v]}})},{"../internals/export":149,"../internals/has-own-property":164,"../internals/is-symbol":183,"../internals/native-symbol-registry":190,"../internals/shared":237,"../internals/try-to-string":257}],315:[function(o,_,j){"use strict";var h=o("../internals/function-uncurry-this"),d=o("../internals/array-buffer-view-core"),p=o("../internals/array-copy-within"),b=h(p),g=d.aTypedArray,w=d.exportTypedArrayMethod;w("copyWithin",function(m,v){return b(g(this),m,v,arguments.length>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-copy-within":105,"../internals/function-uncurry-this":157}],316:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-iteration").every,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("every",function(w){return d(p(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],317:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/function-call"),p=o("../internals/array-fill"),b=h.aTypedArray,g=h.exportTypedArrayMethod;g("fill",function(c){var m=arguments.length;return d(p,b(this),c,m>1?arguments[1]:void 0,m>2?arguments[2]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-fill":106,"../internals/function-call":155}],318:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-iteration").filter,p=o("../internals/typed-array-from-species-and-list"),b=h.aTypedArray,g=h.exportTypedArrayMethod;g("filter",function(c){var m=d(b(this),c,arguments.length>1?arguments[1]:void 0);return p(this,m)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-from-species-and-list":260}],319:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-iteration").findIndex,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("findIndex",function(w){return d(p(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],320:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-iteration").find,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("find",function(w){return d(p(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],321:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-iteration").forEach,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("forEach",function(w){d(p(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],322:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-includes").includes,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("includes",function(w){return d(p(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],323:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-includes").indexOf,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("indexOf",function(w){return d(p(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-includes":110}],324:[function(o,_,j){"use strict";var h=o("../internals/global"),d=o("../internals/fails"),p=o("../internals/function-uncurry-this"),b=o("../internals/array-buffer-view-core"),g=o("../modules/es.array.iterator"),w=o("../internals/well-known-symbol"),c=w("iterator"),m=h.Uint8Array,v=p(g.values),y=p(g.keys),E=p(g.entries),T=b.aTypedArray,S=b.exportTypedArrayMethod,C=m&&m.prototype,x=!d(function(){C[c].call([1])}),O=!!C&&C.values&&C[c]===C.values&&C.values.name==="values",J=function(){return v(T(this))};S("entries",function(){return E(T(this))},x),S("keys",function(){return y(T(this))},x),S("values",J,x||!O,{name:"values"}),S(c,J,x||!O,{name:"values"})},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],325:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/function-uncurry-this"),p=h.aTypedArray,b=h.exportTypedArrayMethod,g=d([].join);b("join",function(c){return g(p(this),c)})},{"../internals/array-buffer-view-core":103,"../internals/function-uncurry-this":157}],326:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/function-apply"),p=o("../internals/array-last-index-of"),b=h.aTypedArray,g=h.exportTypedArrayMethod;g("lastIndexOf",function(c){var m=arguments.length;return d(p,b(this),m>1?[c,arguments[1]]:[c])})},{"../internals/array-buffer-view-core":103,"../internals/array-last-index-of":112,"../internals/function-apply":152}],327:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-iteration").map,p=o("../internals/typed-array-species-constructor"),b=h.aTypedArray,g=h.exportTypedArrayMethod;g("map",function(c){return d(b(this),c,arguments.length>1?arguments[1]:void 0,function(m,v){return new(p(m))(v)})})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111,"../internals/typed-array-species-constructor":262}],328:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-reduce").right,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("reduceRight",function(w){var c=arguments.length;return d(p(this),w,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],329:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-reduce").left,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("reduce",function(w){var c=arguments.length;return d(p(this),w,c,c>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-reduce":115}],330:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=h.aTypedArray,p=h.exportTypedArrayMethod,b=Math.floor;p("reverse",function(){for(var w=this,c=d(w).length,m=b(c/2),v=0,y;v<m;)y=w[v],w[v++]=w[--c],w[c]=y;return w})},{"../internals/array-buffer-view-core":103}],331:[function(o,_,j){"use strict";var h=o("../internals/global"),d=o("../internals/function-call"),p=o("../internals/array-buffer-view-core"),b=o("../internals/length-of-array-like"),g=o("../internals/to-offset"),w=o("../internals/to-object"),c=o("../internals/fails"),m=h.RangeError,v=h.Int8Array,y=v&&v.prototype,E=y&&y.set,T=p.aTypedArray,S=p.exportTypedArrayMethod,C=!c(function(){var O=new Uint8ClampedArray(2);return d(E,O,{length:1,0:3},1),O[1]!==3}),x=C&&p.NATIVE_ARRAY_BUFFER_VIEWS&&c(function(){var O=new v(2);return O.set(1),O.set("2",1),O[0]!==0||O[1]!==2});S("set",function(J){T(this);var P=g(arguments.length>1?arguments[1]:void 0,1),X=w(J);if(C)return d(E,this,X,P);var B=this.length,k=b(X),D=0;if(k+P>B)throw m("Wrong length");for(;D<k;)this[P+D]=X[D++]},!C||x)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-call":155,"../internals/global":163,"../internals/length-of-array-like":188,"../internals/to-object":250,"../internals/to-offset":251}],332:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/typed-array-species-constructor"),p=o("../internals/fails"),b=o("../internals/array-slice"),g=h.aTypedArray,w=h.exportTypedArrayMethod,c=p(function(){new Int8Array(1).slice()});w("slice",function(v,y){for(var E=b(g(this),v,y),T=d(this),S=0,C=E.length,x=new T(C);C>S;)x[S]=E[S++];return x},c)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/typed-array-species-constructor":262}],333:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/array-iteration").some,p=h.aTypedArray,b=h.exportTypedArrayMethod;b("some",function(w){return d(p(this),w,arguments.length>1?arguments[1]:void 0)})},{"../internals/array-buffer-view-core":103,"../internals/array-iteration":111}],334:[function(o,_,j){"use strict";var h=o("../internals/global"),d=o("../internals/function-uncurry-this"),p=o("../internals/fails"),b=o("../internals/a-callable"),g=o("../internals/array-sort"),w=o("../internals/array-buffer-view-core"),c=o("../internals/engine-ff-version"),m=o("../internals/engine-is-ie-or-edge"),v=o("../internals/engine-v8-version"),y=o("../internals/engine-webkit-version"),E=w.aTypedArray,T=w.exportTypedArrayMethod,S=h.Uint16Array,C=S&&d(S.prototype.sort),x=!!C&&!(p(function(){C(new S(2),null)})&&p(function(){C(new S(2),{})})),O=!!C&&!p(function(){if(v)return v<74;if(c)return c<67;if(m)return!0;if(y)return y<602;var P=new S(516),X=Array(516),B,k;for(B=0;B<516;B++)k=B%4,P[B]=515-B,X[B]=B-2*k+3;for(C(P,function(D,L){return(D/4|0)-(L/4|0)}),B=0;B<516;B++)if(P[B]!==X[B])return!0}),J=function(P){return function(X,B){return P!==void 0?+P(X,B)||0:B!==B?-1:X!==X?1:X===0&&B===0?1/X>0&&1/B<0?1:-1:X>B}};T("sort",function(X){return X!==void 0&&b(X),O?C(this,X):g(E(this),J(X))},!O||x)},{"../internals/a-callable":95,"../internals/array-buffer-view-core":103,"../internals/array-sort":118,"../internals/engine-ff-version":138,"../internals/engine-is-ie-or-edge":140,"../internals/engine-v8-version":146,"../internals/engine-webkit-version":147,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],335:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core"),d=o("../internals/to-length"),p=o("../internals/to-absolute-index"),b=o("../internals/typed-array-species-constructor"),g=h.aTypedArray,w=h.exportTypedArrayMethod;w("subarray",function(m,v){var y=g(this),E=y.length,T=p(m,E),S=b(y);return new S(y.buffer,y.byteOffset+T*y.BYTES_PER_ELEMENT,d((v===void 0?E:p(v,E))-T))})},{"../internals/array-buffer-view-core":103,"../internals/to-absolute-index":245,"../internals/to-length":249,"../internals/typed-array-species-constructor":262}],336:[function(o,_,j){"use strict";var h=o("../internals/global"),d=o("../internals/function-apply"),p=o("../internals/array-buffer-view-core"),b=o("../internals/fails"),g=o("../internals/array-slice"),w=h.Int8Array,c=p.aTypedArray,m=p.exportTypedArrayMethod,v=[].toLocaleString,y=!!w&&b(function(){v.call(new w(1))}),E=b(function(){return[1,2].toLocaleString()!=new w([1,2]).toLocaleString()})||!b(function(){w.prototype.toLocaleString.call([1,2])});m("toLocaleString",function(){return d(v,y?g(c(this)):c(this),g(arguments))},E)},{"../internals/array-buffer-view-core":103,"../internals/array-slice":117,"../internals/fails":150,"../internals/function-apply":152,"../internals/global":163}],337:[function(o,_,j){"use strict";var h=o("../internals/array-buffer-view-core").exportTypedArrayMethod,d=o("../internals/fails"),p=o("../internals/global"),b=o("../internals/function-uncurry-this"),g=p.Uint8Array,w=g&&g.prototype||{},c=[].toString,m=b([].join);d(function(){c.call({})})&&(c=function(){return m(this)});var v=w.toString!=c;h("toString",c,v)},{"../internals/array-buffer-view-core":103,"../internals/fails":150,"../internals/function-uncurry-this":157,"../internals/global":163}],338:[function(o,_,j){var h=o("../internals/typed-array-constructor");h("Uint8",function(d){return function(b,g,w){return d(this,b,g,w)}})},{"../internals/typed-array-constructor":258}],339:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/dom-iterables"),p=o("../internals/dom-token-list-prototype"),b=o("../internals/array-for-each"),g=o("../internals/create-non-enumerable-property"),w=function(m){if(m&&m.forEach!==b)try{g(m,"forEach",b)}catch(v){m.forEach=b}};for(var c in d)d[c]&&w(h[c]&&h[c].prototype);w(p)},{"../internals/array-for-each":107,"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163}],340:[function(o,_,j){var h=o("../internals/global"),d=o("../internals/dom-iterables"),p=o("../internals/dom-token-list-prototype"),b=o("../modules/es.array.iterator"),g=o("../internals/create-non-enumerable-property"),w=o("../internals/well-known-symbol"),c=w("iterator"),m=w("toStringTag"),v=b.values,y=function(T,S){if(T){if(T[c]!==v)try{g(T,c,v)}catch(x){T[c]=v}if(T[m]||g(T,m,S),d[S]){for(var C in b)if(T[C]!==b[C])try{g(T,C,b[C])}catch(x){T[C]=b[C]}}}};for(var E in d)y(h[E]&&h[E].prototype,E);y(p,"DOMTokenList")},{"../internals/create-non-enumerable-property":129,"../internals/dom-iterables":136,"../internals/dom-token-list-prototype":137,"../internals/global":163,"../internals/well-known-symbol":268,"../modules/es.array.iterator":278}],341:[function(o,_,j){function h(O){return Array.isArray?Array.isArray(O):x(O)==="[object Array]"}j.isArray=h;function d(O){return typeof O=="boolean"}j.isBoolean=d;function p(O){return O===null}j.isNull=p;function b(O){return O==null}j.isNullOrUndefined=b;function g(O){return typeof O=="number"}j.isNumber=g;function w(O){return typeof O=="string"}j.isString=w;function c(O){return typeof O=="symbol"}j.isSymbol=c;function m(O){return O===void 0}j.isUndefined=m;function v(O){return x(O)==="[object RegExp]"}j.isRegExp=v;function y(O){return typeof O=="object"&&O!==null}j.isObject=y;function E(O){return x(O)==="[object Date]"}j.isDate=E;function T(O){return x(O)==="[object Error]"||O instanceof Error}j.isError=T;function S(O){return typeof O=="function"}j.isFunction=S;function C(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O=="undefined"}j.isPrimitive=C,j.isBuffer=o("buffer").Buffer.isBuffer;function x(O){return Object.prototype.toString.call(O)}},{buffer:90}],342:[function(o,_,j){(function(h){"use strict";var d=function(){var c=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,m=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,v=/[^-+\dA-Z]/g;return function(y,E,T,S){if(arguments.length===1&&w(y)==="string"&&!/\d/.test(y)&&(E=y,y=void 0),y=y||new Date,y instanceof Date||(y=new Date(y)),isNaN(y))throw TypeError("Invalid date");E=String(d.masks[E]||E||d.masks.default);var C=E.slice(0,4);(C==="UTC:"||C==="GMT:")&&(E=E.slice(4),T=!0,C==="GMT:"&&(S=!0));var x=T?"getUTC":"get",O=y[x+"Date"](),J=y[x+"Day"](),P=y[x+"Month"](),X=y[x+"FullYear"](),B=y[x+"Hours"](),k=y[x+"Minutes"](),D=y[x+"Seconds"](),L=y[x+"Milliseconds"](),q=T?0:y.getTimezoneOffset(),G=b(y),F=g(y),N={d:O,dd:p(O),ddd:d.i18n.dayNames[J],dddd:d.i18n.dayNames[J+7],m:P+1,mm:p(P+1),mmm:d.i18n.monthNames[P],mmmm:d.i18n.monthNames[P+12],yy:String(X).slice(2),yyyy:X,h:B%12||12,hh:p(B%12||12),H:B,HH:p(B),M:k,MM:p(k),s:D,ss:p(D),l:p(L,3),L:p(Math.round(L/10)),t:B<12?"a":"p",tt:B<12?"am":"pm",T:B<12?"A":"P",TT:B<12?"AM":"PM",Z:S?"GMT":T?"UTC":(String(y).match(m)||[""]).pop().replace(v,""),o:(q>0?"-":"+")+p(Math.floor(Math.abs(q)/60)*100+Math.abs(q)%60,4),S:["th","st","nd","rd"][O%10>3?0:(O%100-O%10!=10)*O%10],W:G,N:F};return E.replace(c,function(K){return K in N?N[K]:K.slice(1,K.length-1)})}}();d.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},d.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]};function p(c,m){for(c=String(c),m=m||2;c.length<m;)c="0"+c;return c}function b(c){var m=new Date(c.getFullYear(),c.getMonth(),c.getDate());m.setDate(m.getDate()-(m.getDay()+6)%7+3);var v=new Date(m.getFullYear(),0,4);v.setDate(v.getDate()-(v.getDay()+6)%7+3);var y=m.getTimezoneOffset()-v.getTimezoneOffset();m.setHours(m.getHours()-y);var E=(m-v)/(864e5*7);return 1+Math.floor(E)}function g(c){var m=c.getDay();return m===0&&(m=7),m}function w(c){return c===null?"null":c===void 0?"undefined":typeof c!="object"?typeof c:Array.isArray(c)?"array":{}.toString.call(c).slice(8,-1).toLowerCase()}typeof Le=="function"&&Le.amd?Le(function(){return d}):typeof j=="object"?_.exports=d:h.dateFormat=d})(this)},{}],343:[function(o,_,j){"use strict";var h=/["'&<>]/;_.exports=d;function d(p){var b=""+p,g=h.exec(b);if(!g)return b;var w,c="",m=0,v=0;for(m=g.index;m<b.length;m++){switch(b.charCodeAt(m)){case 34:w=""";break;case 38:w="&";break;case 39:w="'";break;case 60:w="<";break;case 62:w=">";break;default:continue}v!==m&&(c+=b.substring(v,m)),v=m+1,c+=w}return v!==m?c+b.substring(v,m):c}},{}],344:[function(o,_,j){"use strict";var h=typeof Reflect=="object"?Reflect:null,d=h&&typeof h.apply=="function"?h.apply:function(D,L,q){return Function.prototype.apply.call(D,L,q)},p;h&&typeof h.ownKeys=="function"?p=h.ownKeys:Object.getOwnPropertySymbols?p=function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:p=function(D){return Object.getOwnPropertyNames(D)};function b(k){console&&console.warn&&console.warn(k)}var g=Number.isNaN||function(D){return D!==D};function w(){w.init.call(this)}_.exports=w,_.exports.once=P,w.EventEmitter=w,w.prototype._events=void 0,w.prototype._eventsCount=0,w.prototype._maxListeners=void 0;var c=10;function m(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}Object.defineProperty(w,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(k){if(typeof k!="number"||k<0||g(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");c=k}}),w.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},w.prototype.setMaxListeners=function(D){if(typeof D!="number"||D<0||g(D))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+D+".");return this._maxListeners=D,this};function v(k){return k._maxListeners===void 0?w.defaultMaxListeners:k._maxListeners}w.prototype.getMaxListeners=function(){return v(this)},w.prototype.emit=function(D){for(var L=[],q=1;q<arguments.length;q++)L.push(arguments[q]);var G=D==="error",F=this._events;if(F!==void 0)G=G&&F.error===void 0;else if(!G)return!1;if(G){var N;if(L.length>0&&(N=L[0]),N instanceof Error)throw N;var K=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw K.context=N,K}var re=F[D];if(re===void 0)return!1;if(typeof re=="function")d(re,this,L);else for(var ne=re.length,pe=x(re,ne),q=0;q<ne;++q)d(pe[q],this,L);return!0};function y(k,D,L,q){var G,F,N;if(m(L),F=k._events,F===void 0?(F=k._events=Object.create(null),k._eventsCount=0):(F.newListener!==void 0&&(k.emit("newListener",D,L.listener?L.listener:L),F=k._events),N=F[D]),N===void 0)N=F[D]=L,++k._eventsCount;else if(typeof N=="function"?N=F[D]=q?[L,N]:[N,L]:q?N.unshift(L):N.push(L),G=v(k),G>0&&N.length>G&&!N.warned){N.warned=!0;var K=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=k,K.type=D,K.count=N.length,b(K)}return k}w.prototype.addListener=function(D,L){return y(this,D,L,!1)},w.prototype.on=w.prototype.addListener,w.prototype.prependListener=function(D,L){return y(this,D,L,!0)};function E(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function T(k,D,L){var q={fired:!1,wrapFn:void 0,target:k,type:D,listener:L},G=E.bind(q);return G.listener=L,q.wrapFn=G,G}w.prototype.once=function(D,L){return m(L),this.on(D,T(this,D,L)),this},w.prototype.prependOnceListener=function(D,L){return m(L),this.prependListener(D,T(this,D,L)),this},w.prototype.removeListener=function(D,L){var q,G,F,N,K;if(m(L),G=this._events,G===void 0)return this;if(q=G[D],q===void 0)return this;if(q===L||q.listener===L)--this._eventsCount===0?this._events=Object.create(null):(delete G[D],G.removeListener&&this.emit("removeListener",D,q.listener||L));else if(typeof q!="function"){for(F=-1,N=q.length-1;N>=0;N--)if(q[N]===L||q[N].listener===L){K=q[N].listener,F=N;break}if(F<0)return this;F===0?q.shift():O(q,F),q.length===1&&(G[D]=q[0]),G.removeListener!==void 0&&this.emit("removeListener",D,K||L)}return this},w.prototype.off=w.prototype.removeListener,w.prototype.removeAllListeners=function(D){var L,q,G;if(q=this._events,q===void 0)return this;if(q.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):q[D]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete q[D]),this;if(arguments.length===0){var F=Object.keys(q),N;for(G=0;G<F.length;++G)N=F[G],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(L=q[D],typeof L=="function")this.removeListener(D,L);else if(L!==void 0)for(G=L.length-1;G>=0;G--)this.removeListener(D,L[G]);return this};function S(k,D,L){var q=k._events;if(q===void 0)return[];var G=q[D];return G===void 0?[]:typeof G=="function"?L?[G.listener||G]:[G]:L?J(G):x(G,G.length)}w.prototype.listeners=function(D){return S(this,D,!0)},w.prototype.rawListeners=function(D){return S(this,D,!1)},w.listenerCount=function(k,D){return typeof k.listenerCount=="function"?k.listenerCount(D):C.call(k,D)},w.prototype.listenerCount=C;function C(k){var D=this._events;if(D!==void 0){var L=D[k];if(typeof L=="function")return 1;if(L!==void 0)return L.length}return 0}w.prototype.eventNames=function(){return this._eventsCount>0?p(this._events):[]};function x(k,D){for(var L=new Array(D),q=0;q<D;++q)L[q]=k[q];return L}function O(k,D){for(;D+1<k.length;D++)k[D]=k[D+1];k.pop()}function J(k){for(var D=new Array(k.length),L=0;L<D.length;++L)D[L]=k[L].listener||k[L];return D}function P(k,D){return new Promise(function(L,q){function G(N){k.removeListener(D,F),q(N)}function F(){typeof k.removeListener=="function"&&k.removeListener("error",G),L([].slice.call(arguments))}B(k,D,F,{once:!0}),D!=="error"&&X(k,G,{once:!0})})}function X(k,D,L){typeof k.on=="function"&&B(k,"error",D,L)}function B(k,D,L,q){if(typeof k.on=="function")q.once?k.once(D,L):k.on(D,L);else if(typeof k.addEventListener=="function")k.addEventListener(D,function G(F){q.once&&k.removeEventListener(D,G),L(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k)}},{}],345:[function(o,_,j){"use strict";var h=o("is-callable"),d=Object.prototype.toString,p=Object.prototype.hasOwnProperty,b=function(v,y,E){for(var T=0,S=v.length;T<S;T++)p.call(v,T)&&(E==null?y(v[T],T,v):y.call(E,v[T],T,v))},g=function(v,y,E){for(var T=0,S=v.length;T<S;T++)E==null?y(v.charAt(T),T,v):y.call(E,v.charAt(T),T,v)},w=function(v,y,E){for(var T in v)p.call(v,T)&&(E==null?y(v[T],T,v):y.call(E,v[T],T,v))},c=function(v,y,E){if(!h(y))throw new TypeError("iterator must be a function");var T;arguments.length>=3&&(T=E),d.call(v)==="[object Array]"?b(v,y,T):typeof v=="string"?g(v,y,T):w(v,y,T)};_.exports=c},{"is-callable":367}],346:[function(o,_,j){"use strict";var h="Function.prototype.bind called on incompatible ",d=Array.prototype.slice,p=Object.prototype.toString,b="[object Function]";_.exports=function(w){var c=this;if(typeof c!="function"||p.call(c)!==b)throw new TypeError(h+c);for(var m=d.call(arguments,1),v,y=function(){if(this instanceof v){var x=c.apply(this,m.concat(d.call(arguments)));return Object(x)===x?x:this}else return c.apply(w,m.concat(d.call(arguments)))},E=Math.max(0,c.length-m.length),T=[],S=0;S<E;S++)T.push("$"+S);if(v=Function("binder","return function ("+T.join(",")+"){ return binder.apply(this,arguments); }")(y),c.prototype){var C=function(){};C.prototype=c.prototype,v.prototype=new C,C.prototype=null}return v}},{}],347:[function(o,_,j){"use strict";var h=o("./implementation");_.exports=Function.prototype.bind||h},{"./implementation":346}],348:[function(o,_,j){"use strict";var h,d=SyntaxError,p=Function,b=TypeError,g=function(re){try{return p('"use strict"; return ('+re+").constructor;")()}catch(ne){}},w=Object.getOwnPropertyDescriptor;if(w)try{w({},"")}catch(re){w=null}var c=function(){throw new b},m=w?function(){try{return arguments.callee,c}catch(re){try{return w(arguments,"callee").get}catch(ne){return c}}}():c,v=o("has-symbols")(),y=o("has-proto")(),E=Object.getPrototypeOf||(y?function(re){return re.__proto__}:null),T={},S=typeof Uint8Array=="undefined"||!E?h:E(Uint8Array),C={"%AggregateError%":typeof AggregateError=="undefined"?h:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?h:ArrayBuffer,"%ArrayIteratorPrototype%":v&&E?E([][Symbol.iterator]()):h,"%AsyncFromSyncIteratorPrototype%":h,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":typeof Atomics=="undefined"?h:Atomics,"%BigInt%":typeof BigInt=="undefined"?h:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?h:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?h:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?h:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?h:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?h:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?h:FinalizationRegistry,"%Function%":p,"%GeneratorFunction%":T,"%Int8Array%":typeof Int8Array=="undefined"?h:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?h:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?h:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&E?E(E([][Symbol.iterator]())):h,"%JSON%":typeof JSON=="object"?JSON:h,"%Map%":typeof Map=="undefined"?h:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!v||!E?h:E(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?h:Promise,"%Proxy%":typeof Proxy=="undefined"?h:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?h:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?h:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!v||!E?h:E(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?h:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&E?E(""[Symbol.iterator]()):h,"%Symbol%":v?Symbol:h,"%SyntaxError%":d,"%ThrowTypeError%":m,"%TypedArray%":S,"%TypeError%":b,"%Uint8Array%":typeof Uint8Array=="undefined"?h:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?h:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?h:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?h:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?h:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?h:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?h:WeakSet};if(E)try{null.error}catch(re){var x=E(E(re));C["%Error.prototype%"]=x}var O=function re(ne){var pe;if(ne==="%AsyncFunction%")pe=g("async function () {}");else if(ne==="%GeneratorFunction%")pe=g("function* () {}");else if(ne==="%AsyncGeneratorFunction%")pe=g("async function* () {}");else if(ne==="%AsyncGenerator%"){var ie=re("%AsyncGeneratorFunction%");ie&&(pe=ie.prototype)}else if(ne==="%AsyncIteratorPrototype%"){var Ae=re("%AsyncGenerator%");Ae&&E&&(pe=E(Ae.prototype))}return C[ne]=pe,pe},J={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=o("function-bind"),X=o("has"),B=P.call(Function.call,Array.prototype.concat),k=P.call(Function.apply,Array.prototype.splice),D=P.call(Function.call,String.prototype.replace),L=P.call(Function.call,String.prototype.slice),q=P.call(Function.call,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,N=function(ne){var pe=L(ne,0,1),ie=L(ne,-1);if(pe==="%"&&ie!=="%")throw new d("invalid intrinsic syntax, expected closing `%`");if(ie==="%"&&pe!=="%")throw new d("invalid intrinsic syntax, expected opening `%`");var Ae=[];return D(ne,G,function(Y,fe,ve,be){Ae[Ae.length]=ve?D(be,F,"$1"):fe||Y}),Ae},K=function(ne,pe){var ie=ne,Ae;if(X(J,ie)&&(Ae=J[ie],ie="%"+Ae[0]+"%"),X(C,ie)){var Y=C[ie];if(Y===T&&(Y=O(ie)),typeof Y=="undefined"&&!pe)throw new b("intrinsic "+ne+" exists, but is not available. Please file an issue!");return{alias:Ae,name:ie,value:Y}}throw new d("intrinsic "+ne+" does not exist!")};_.exports=function(ne,pe){if(typeof ne!="string"||ne.length===0)throw new b("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new b('"allowMissing" argument must be a boolean');if(q(/^%?[^%]*%?$/,ne)===null)throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ie=N(ne),Ae=ie.length>0?ie[0]:"",Y=K("%"+Ae+"%",pe),fe=Y.name,ve=Y.value,be=!1,le=Y.alias;le&&(Ae=le[0],k(ie,B([0,1],le)));for(var ue=1,ge=!0;ue<ie.length;ue+=1){var Ee=ie[ue],ke=L(Ee,0,1),Ie=L(Ee,-1);if((ke==='"'||ke==="'"||ke==="`"||Ie==='"'||Ie==="'"||Ie==="`")&&ke!==Ie)throw new d("property names with quotes must have matching quotes");if((Ee==="constructor"||!ge)&&(be=!0),Ae+="."+Ee,fe="%"+Ae+"%",X(C,fe))ve=C[fe];else if(ve!=null){if(!(Ee in ve)){if(!pe)throw new b("base intrinsic for "+ne+" exists, but the property is not available.");return}if(w&&ue+1>=ie.length){var de=w(ve,Ee);ge=!!de,ge&&"get"in de&&!("originalValue"in de.get)?ve=de.get:ve=ve[Ee]}else ge=X(ve,Ee),ve=ve[Ee];ge&&!be&&(C[fe]=ve)}}return ve}},{"function-bind":347,has:354,"has-proto":350,"has-symbols":351}],349:[function(o,_,j){"use strict";var h=o("get-intrinsic"),d=h("%Object.getOwnPropertyDescriptor%",!0);if(d)try{d([],"length")}catch(p){d=null}_.exports=d},{"get-intrinsic":348}],350:[function(o,_,j){"use strict";var h={foo:{}},d=Object;_.exports=function(){return{__proto__:h}.foo===h.foo&&!({__proto__:null}instanceof d)}},{}],351:[function(o,_,j){"use strict";var h=typeof Symbol!="undefined"&&Symbol,d=o("./shams");_.exports=function(){return typeof h!="function"||typeof Symbol!="function"||typeof h("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:d()}},{"./shams":352}],352:[function(o,_,j){"use strict";_.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var d={},p=Symbol("test"),b=Object(p);if(typeof p=="string"||Object.prototype.toString.call(p)!=="[object Symbol]"||Object.prototype.toString.call(b)!=="[object Symbol]")return!1;var g=42;d[p]=g;for(p in d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var w=Object.getOwnPropertySymbols(d);if(w.length!==1||w[0]!==p||!Object.prototype.propertyIsEnumerable.call(d,p))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(d,p);if(c.value!==g||c.enumerable!==!0)return!1}return!0}},{}],353:[function(o,_,j){"use strict";var h=o("has-symbols/shams");_.exports=function(){return h()&&!!Symbol.toStringTag}},{"has-symbols/shams":352}],354:[function(o,_,j){"use strict";var h=o("function-bind");_.exports=h.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":347}],355:[function(o,_,j){var h=o("http"),d=o("url"),p=_.exports;for(var b in h)h.hasOwnProperty(b)&&(p[b]=h[b]);p.request=function(w,c){return w=g(w),h.request.call(this,w,c)},p.get=function(w,c){return w=g(w),h.get.call(this,w,c)};function g(w){if(typeof w=="string"&&(w=d.parse(w)),w.protocol||(w.protocol="https:"),w.protocol!=="https:")throw new Error('Protocol "'+w.protocol+'" not supported. Expected "https:"');return w}},{http:468,url:472}],356:[function(o,_,j){"use strict";var h=o("util"),d=o("ms");_.exports=function(p){if(typeof p=="number")return p;var b=d(p);if(b===void 0){var g=new Error(h.format("humanize-ms(%j) result undefined",p));console.warn(g.stack)}return b}},{ms:376,util:419}],357:[function(o,_,j){j.read=function(h,d,p,b,g){var w,c,m=g*8-b-1,v=(1<<m)-1,y=v>>1,E=-7,T=p?g-1:0,S=p?-1:1,C=h[d+T];for(T+=S,w=C&(1<<-E)-1,C>>=-E,E+=m;E>0;w=w*256+h[d+T],T+=S,E-=8);for(c=w&(1<<-E)-1,w>>=-E,E+=b;E>0;c=c*256+h[d+T],T+=S,E-=8);if(w===0)w=1-y;else{if(w===v)return c?NaN:(C?-1:1)*(1/0);c=c+Math.pow(2,b),w=w-y}return(C?-1:1)*c*Math.pow(2,w-b)},j.write=function(h,d,p,b,g,w){var c,m,v,y=w*8-g-1,E=(1<<y)-1,T=E>>1,S=g===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=b?0:w-1,x=b?1:-1,O=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(m=isNaN(d)?1:0,c=E):(c=Math.floor(Math.log(d)/Math.LN2),d*(v=Math.pow(2,-c))<1&&(c--,v*=2),c+T>=1?d+=S/v:d+=S*Math.pow(2,1-T),d*v>=2&&(c++,v/=2),c+T>=E?(m=0,c=E):c+T>=1?(m=(d*v-1)*Math.pow(2,g),c=c+T):(m=d*Math.pow(2,T-1)*Math.pow(2,g),c=0));g>=8;h[p+C]=m&255,C+=x,m/=256,g-=8);for(c=c<<g|m,y+=g;y>0;h[p+C]=c&255,C+=x,c/=256,y-=8);h[p+C-x]|=O*128}},{}],358:[function(o,_,j){"use strict";var h=[o("./nextTick"),o("./queueMicrotask"),o("./mutation.js"),o("./messageChannel"),o("./stateChange"),o("./timeout")],d,p,b=-1,g=[],w=!1;function c(){!d||!p||(d=!1,p.length?g=p.concat(g):b=-1,g.length&&m())}function m(){if(!d){w=!1,d=!0;for(var C=g.length,x=setTimeout(c);C;){for(p=g,g=[];p&&++b<C;)p[b].run();b=-1,C=g.length}p=null,b=-1,d=!1,clearTimeout(x)}}for(var v,y=-1,E=h.length;++y<E;)if(h[y]&&h[y].test&&h[y].test()){v=h[y].install(m);break}function T(C,x){this.fun=C,this.array=x}T.prototype.run=function(){var C=this.fun,x=this.array;switch(x.length){case 0:return C();case 1:return C(x[0]);case 2:return C(x[0],x[1]);case 3:return C(x[0],x[1],x[2]);default:return C.apply(null,x)}},_.exports=S;function S(C){var x=new Array(arguments.length-1);if(arguments.length>1)for(var O=1;O<arguments.length;O++)x[O-1]=arguments[O];g.push(new T(C,x)),!w&&!d&&(w=!0,v())}},{"./messageChannel":359,"./mutation.js":360,"./nextTick":89,"./queueMicrotask":361,"./stateChange":362,"./timeout":363}],359:[function(o,_,j){(function(h){(function(){"use strict";j.test=function(){return h.setImmediate?!1:typeof h.MessageChannel!="undefined"},j.install=function(d){var p=new h.MessageChannel;return p.port1.onmessage=d,function(){p.port2.postMessage(0)}}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],360:[function(o,_,j){(function(h){(function(){"use strict";var d=h.MutationObserver||h.WebKitMutationObserver;j.test=function(){return d},j.install=function(p){var b=0,g=new d(p),w=h.document.createTextNode("");return g.observe(w,{characterData:!0}),function(){w.data=b=++b%2}}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],361:[function(o,_,j){(function(h){(function(){"use strict";j.test=function(){return typeof h.queueMicrotask=="function"},j.install=function(d){return function(){h.queueMicrotask(d)}}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],362:[function(o,_,j){(function(h){(function(){"use strict";j.test=function(){return"document"in h&&"onreadystatechange"in h.document.createElement("script")},j.install=function(d){return function(){var p=h.document.createElement("script");return p.onreadystatechange=function(){d(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},h.document.documentElement.appendChild(p),d}}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],363:[function(o,_,j){"use strict";j.test=function(){return!0},j.install=function(h){return function(){setTimeout(h,0)}}},{}],364:[function(o,_,j){typeof Object.create=="function"?_.exports=function(d,p){p&&(d.super_=p,d.prototype=Object.create(p.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:_.exports=function(d,p){if(p){d.super_=p;var b=function(){};b.prototype=p.prototype,d.prototype=new b,d.prototype.constructor=d}}},{}],365:[function(o,_,j){"use strict";var h=o("has-tostringtag/shams")(),d=o("call-bind/callBound"),p=d("Object.prototype.toString"),b=function(m){return h&&m&&typeof m=="object"&&Symbol.toStringTag in m?!1:p(m)==="[object Arguments]"},g=function(m){return b(m)?!0:m!==null&&typeof m=="object"&&typeof m.length=="number"&&m.length>=0&&p(m)!=="[object Array]"&&p(m.callee)==="[object Function]"},w=function(){return b(arguments)}();b.isLegacyArguments=g,_.exports=w?b:g},{"call-bind/callBound":92,"has-tostringtag/shams":353}],366:[function(o,_,j){_.exports=function(p){return p!=null&&(h(p)||d(p)||!!p._isBuffer)};function h(p){return!!p.constructor&&typeof p.constructor.isBuffer=="function"&&p.constructor.isBuffer(p)}function d(p){return typeof p.readFloatLE=="function"&&typeof p.slice=="function"&&h(p.slice(0,0))}},{}],367:[function(o,_,j){"use strict";var h=Function.prototype.toString,d=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,p,b;if(typeof d=="function"&&typeof Object.defineProperty=="function")try{p=Object.defineProperty({},"length",{get:function(){throw b}}),b={},d(function(){throw 42},null,p)}catch(X){X!==b&&(d=null)}else d=null;var g=/^\s*class\b/,w=function(B){try{var k=h.call(B);return g.test(k)}catch(D){return!1}},c=function(B){try{return w(B)?!1:(h.call(B),!0)}catch(k){return!1}},m=Object.prototype.toString,v="[object Object]",y="[object Function]",E="[object GeneratorFunction]",T="[object HTMLAllCollection]",S="[object HTML document.all class]",C="[object HTMLCollection]",x=typeof Symbol=="function"&&!!Symbol.toStringTag,O=!(0 in[,]),J=function(){return!1};if(typeof document=="object"){var P=document.all;m.call(P)===m.call(document.all)&&(J=function(B){if((O||!B)&&(typeof B=="undefined"||typeof B=="object"))try{var k=m.call(B);return(k===T||k===S||k===C||k===v)&&B("")==null}catch(D){}return!1})}_.exports=d?function(B){if(J(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;try{d(B,null,p)}catch(k){if(k!==b)return!1}return!w(B)&&c(B)}:function(B){if(J(B))return!0;if(!B||typeof B!="function"&&typeof B!="object")return!1;if(x)return c(B);if(w(B))return!1;var k=m.call(B);return k!==y&&k!==E&&!/^\[object HTML/.test(k)?!1:c(B)}},{}],368:[function(o,_,j){"use strict";var h=Object.prototype.toString,d=Function.prototype.toString,p=/^\s*(?:function)?\*/,b=o("has-tostringtag/shams")(),g=Object.getPrototypeOf,w=function(){if(!b)return!1;try{return Function("return function*() {}")()}catch(m){}},c;_.exports=function(v){if(typeof v!="function")return!1;if(p.test(d.call(v)))return!0;if(!b){var y=h.call(v);return y==="[object GeneratorFunction]"}if(!g)return!1;if(typeof c=="undefined"){var E=w();c=E?g(E):!1}return g(v)===c}},{"has-tostringtag/shams":353}],369:[function(o,_,j){"use strict";var h=o("which-typed-array");_.exports=function(p){return!!h(p)}},{"which-typed-array":420}],370:[function(o,_,j){var h={}.toString;_.exports=Array.isArray||function(d){return h.call(d)=="[object Array]"}},{}],371:[function(o,_,j){(function(h){(function(){(function(d,p){typeof j=="object"&&typeof _!="undefined"?_.exports=p(d):typeof Le=="function"&&Le.amd?Le(p):p(d)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof h!="undefined"?h:this,function(d){"use strict";d=d||{};var p=d.Base64,b="2.6.4",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=function(ne){for(var pe={},ie=0,Ae=ne.length;ie<Ae;ie++)pe[ne.charAt(ie)]=ie;return pe}(g),c=String.fromCharCode,m=function(ne){if(ne.length<2){var pe=ne.charCodeAt(0);return pe<128?ne:pe<2048?c(192|pe>>>6)+c(128|pe&63):c(224|pe>>>12&15)+c(128|pe>>>6&63)+c(128|pe&63)}else{var pe=65536+(ne.charCodeAt(0)-55296)*1024+(ne.charCodeAt(1)-56320);return c(240|pe>>>18&7)+c(128|pe>>>12&63)+c(128|pe>>>6&63)+c(128|pe&63)}},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,y=function(ne){return ne.replace(v,m)},E=function(ne){var pe=[0,2,1][ne.length%3],ie=ne.charCodeAt(0)<<16|(ne.length>1?ne.charCodeAt(1):0)<<8|(ne.length>2?ne.charCodeAt(2):0),Ae=[g.charAt(ie>>>18),g.charAt(ie>>>12&63),pe>=2?"=":g.charAt(ie>>>6&63),pe>=1?"=":g.charAt(ie&63)];return Ae.join("")},T=d.btoa&&typeof d.btoa=="function"?function(ne){return d.btoa(ne)}:function(ne){if(ne.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return ne.replace(/[\s\S]{1,3}/g,E)},S=function(ne){return T(y(String(ne)))},C=function(ne){return ne.replace(/[+\/]/g,function(pe){return pe=="+"?"-":"_"}).replace(/=/g,"")},x=function(ne,pe){return pe?C(S(ne)):S(ne)},O=function(ne){return x(ne,!0)},J;d.Uint8Array&&(J=function(ne,pe){for(var ie="",Ae=0,Y=ne.length;Ae<Y;Ae+=3){var fe=ne[Ae],ve=ne[Ae+1],be=ne[Ae+2],le=fe<<16|ve<<8|be;ie+=g.charAt(le>>>18)+g.charAt(le>>>12&63)+(typeof ve!="undefined"?g.charAt(le>>>6&63):"=")+(typeof be!="undefined"?g.charAt(le&63):"=")}return pe?C(ie):ie});var P=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,X=function(ne){switch(ne.length){case 4:var pe=(7&ne.charCodeAt(0))<<18|(63&ne.charCodeAt(1))<<12|(63&ne.charCodeAt(2))<<6|63&ne.charCodeAt(3),ie=pe-65536;return c((ie>>>10)+55296)+c((ie&1023)+56320);case 3:return c((15&ne.charCodeAt(0))<<12|(63&ne.charCodeAt(1))<<6|63&ne.charCodeAt(2));default:return c((31&ne.charCodeAt(0))<<6|63&ne.charCodeAt(1))}},B=function(ne){return ne.replace(P,X)},k=function(ne){var pe=ne.length,ie=pe%4,Ae=(pe>0?w[ne.charAt(0)]<<18:0)|(pe>1?w[ne.charAt(1)]<<12:0)|(pe>2?w[ne.charAt(2)]<<6:0)|(pe>3?w[ne.charAt(3)]:0),Y=[c(Ae>>>16),c(Ae>>>8&255),c(Ae&255)];return Y.length-=[0,0,2,1][ie],Y.join("")},D=d.atob&&typeof d.atob=="function"?function(ne){return d.atob(ne)}:function(ne){return ne.replace(/\S{1,4}/g,k)},L=function(ne){return D(String(ne).replace(/[^A-Za-z0-9\+\/]/g,""))},q=function(ne){return B(D(ne))},G=function(ne){return String(ne).replace(/[-_]/g,function(pe){return pe=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},F=function(ne){return q(G(ne))},N;d.Uint8Array&&(N=function(ne){return Uint8Array.from(L(G(ne)),function(pe){return pe.charCodeAt(0)})});var K=function(){var ne=d.Base64;return d.Base64=p,ne};if(d.Base64={VERSION:b,atob:L,btoa:T,fromBase64:F,toBase64:x,utob:y,encode:x,encodeURI:O,btou:B,decode:F,noConflict:K,fromUint8Array:J,toUint8Array:N},typeof Object.defineProperty=="function"){var re=function(ne){return{value:ne,enumerable:!1,writable:!0,configurable:!0}};d.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",re(function(){return F(this)})),Object.defineProperty(String.prototype,"toBase64",re(function(ne){return x(this,ne)})),Object.defineProperty(String.prototype,"toBase64URI",re(function(){return x(this,!0)}))}}return d.Meteor&&(Base64=d.Base64),typeof _!="undefined"&&_.exports?_.exports.Base64=d.Base64:typeof Le=="function"&&Le.amd&&Le([],function(){return d.Base64}),{Base64:d.Base64}})}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],372:[function(o,_,j){"use strict";_.exports=d;var h=Object.prototype.hasOwnProperty;function d(p,b,g){if(!p)throw new TypeError("argument dest is required");if(!b)throw new TypeError("argument src is required");return g===void 0&&(g=!0),Object.getOwnPropertyNames(b).forEach(function(c){if(!(!g&&h.call(p,c))){var m=Object.getOwnPropertyDescriptor(b,c);Object.defineProperty(p,c,m)}}),p}},{}],373:[function(o,_,j){"use strict";o("core-js/modules/es.array.map.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.regexp.constructor.js"),o("core-js/modules/es.regexp.to-string.js");function h(){this._types=Object.create(null),this._extensions=Object.create(null);for(var d=0;d<arguments.length;d++)this.define(arguments[d]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}h.prototype.define=function(d,p){for(var b in d){var g=d[b].map(function(v){return v.toLowerCase()});b=b.toLowerCase();for(var w=0;w<g.length;w++){var c=g[w];if(c[0]!=="*"){if(!p&&c in this._types)throw new Error('Attempt to change mapping for "'+c+'" extension from "'+this._types[c]+'" to "'+b+'". Pass `force=true` to allow this, otherwise remove "'+c+'" from the list of extensions for "'+b+'".');this._types[c]=b}}if(p||!this._extensions[b]){var m=g[0];this._extensions[b]=m[0]!=="*"?m:m.substr(1)}}},h.prototype.getType=function(d){d=String(d);var p=d.replace(/^.*[/\\]/,"").toLowerCase(),b=p.replace(/^.*\./,"").toLowerCase(),g=p.length<d.length,w=b.length<p.length-1;return(w||!g)&&this._types[b]||null},h.prototype.getExtension=function(d){return d=/^\s*([^;\s]*)/.test(d)&&RegExp.$1,d&&this._extensions[d.toLowerCase()]||null},_.exports=h},{"core-js/modules/es.array.map.js":280,"core-js/modules/es.regexp.constructor.js":299,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.replace.js":305}],374:[function(o,_,j){"use strict";var h=o("./Mime");_.exports=new h(o("./types/standard"))},{"./Mime":373,"./types/standard":375}],375:[function(o,_,j){"use strict";_.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}],376:[function(o,_,j){var h=1e3,d=h*60,p=d*60,b=p*24,g=b*7,w=b*365.25;_.exports=function(E,T){T=T||{};var S=typeof E;if(S==="string"&&E.length>0)return c(E);if(S==="number"&&isFinite(E))return T.long?v(E):m(E);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(E))};function c(E){if(E=String(E),!(E.length>100)){var T=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(E);if(T){var S=parseFloat(T[1]),C=(T[2]||"ms").toLowerCase();switch(C){case"years":case"year":case"yrs":case"yr":case"y":return S*w;case"weeks":case"week":case"w":return S*g;case"days":case"day":case"d":return S*b;case"hours":case"hour":case"hrs":case"hr":case"h":return S*p;case"minutes":case"minute":case"mins":case"min":case"m":return S*d;case"seconds":case"second":case"secs":case"sec":case"s":return S*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return S;default:return}}}}function m(E){var T=Math.abs(E);return T>=b?Math.round(E/b)+"d":T>=p?Math.round(E/p)+"h":T>=d?Math.round(E/d)+"m":T>=h?Math.round(E/h)+"s":E+"ms"}function v(E){var T=Math.abs(E);return T>=b?y(E,T,b,"day"):T>=p?y(E,T,p,"hour"):T>=d?y(E,T,d,"minute"):T>=h?y(E,T,h,"second"):E+" ms"}function y(E,T,S,C){var x=T>=S*1.5;return Math.round(E/S)+" "+C+(x?"s":"")}},{}],377:[function(o,_,j){"use strict";var h=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable;function b(w){if(w==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(w)}function g(){try{if(!Object.assign)return!1;var w=new String("abc");if(w[5]="de",Object.getOwnPropertyNames(w)[0]==="5")return!1;for(var c={},m=0;m<10;m++)c["_"+String.fromCharCode(m)]=m;var v=Object.getOwnPropertyNames(c).map(function(E){return c[E]});if(v.join("")!=="0123456789")return!1;var y={};return"abcdefghijklmnopqrst".split("").forEach(function(E){y[E]=E}),Object.keys(Object.assign({},y)).join("")==="abcdefghijklmnopqrst"}catch(E){return!1}}_.exports=g()?Object.assign:function(w,c){for(var m,v=b(w),y,E=1;E<arguments.length;E++){m=Object(arguments[E]);for(var T in m)d.call(m,T)&&(v[T]=m[T]);if(h){y=h(m);for(var S=0;S<y.length;S++)p.call(m,y[S])&&(v[y[S]]=m[y[S]])}}return v}},{}],378:[function(o,_,j){(function(h){(function(){"use strict";function d(w){if(typeof w!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(w))}function p(w,c){for(var m="",v=0,y=-1,E=0,T,S=0;S<=w.length;++S){if(S<w.length)T=w.charCodeAt(S);else{if(T===47)break;T=47}if(T===47){if(!(y===S-1||E===1))if(y!==S-1&&E===2){if(m.length<2||v!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var C=m.lastIndexOf("/");if(C!==m.length-1){C===-1?(m="",v=0):(m=m.slice(0,C),v=m.length-1-m.lastIndexOf("/")),y=S,E=0;continue}}else if(m.length===2||m.length===1){m="",v=0,y=S,E=0;continue}}c&&(m.length>0?m+="/..":m="..",v=2)}else m.length>0?m+="/"+w.slice(y+1,S):m=w.slice(y+1,S),v=S-y-1;y=S,E=0}else T===46&&E!==-1?++E:E=-1}return m}function b(w,c){var m=c.dir||c.root,v=c.base||(c.name||"")+(c.ext||"");return m?m===c.root?m+v:m+w+v:v}var g={resolve:function(){for(var c="",m=!1,v,y=arguments.length-1;y>=-1&&!m;y--){var E;y>=0?E=arguments[y]:(v===void 0&&(v=h.cwd()),E=v),d(E),E.length!==0&&(c=E+"/"+c,m=E.charCodeAt(0)===47)}return c=p(c,!m),m?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(c){if(d(c),c.length===0)return".";var m=c.charCodeAt(0)===47,v=c.charCodeAt(c.length-1)===47;return c=p(c,!m),c.length===0&&!m&&(c="."),c.length>0&&v&&(c+="/"),m?"/"+c:c},isAbsolute:function(c){return d(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,m=0;m<arguments.length;++m){var v=arguments[m];d(v),v.length>0&&(c===void 0?c=v:c+="/"+v)}return c===void 0?".":g.normalize(c)},relative:function(c,m){if(d(c),d(m),c===m||(c=g.resolve(c),m=g.resolve(m),c===m))return"";for(var v=1;v<c.length&&c.charCodeAt(v)===47;++v);for(var y=c.length,E=y-v,T=1;T<m.length&&m.charCodeAt(T)===47;++T);for(var S=m.length,C=S-T,x=E<C?E:C,O=-1,J=0;J<=x;++J){if(J===x){if(C>x){if(m.charCodeAt(T+J)===47)return m.slice(T+J+1);if(J===0)return m.slice(T+J)}else E>x&&(c.charCodeAt(v+J)===47?O=J:J===0&&(O=0));break}var P=c.charCodeAt(v+J),X=m.charCodeAt(T+J);if(P!==X)break;P===47&&(O=J)}var B="";for(J=v+O+1;J<=y;++J)(J===y||c.charCodeAt(J)===47)&&(B.length===0?B+="..":B+="/..");return B.length>0?B+m.slice(T+O):(T+=O,m.charCodeAt(T)===47&&++T,m.slice(T))},_makeLong:function(c){return c},dirname:function(c){if(d(c),c.length===0)return".";for(var m=c.charCodeAt(0),v=m===47,y=-1,E=!0,T=c.length-1;T>=1;--T)if(m=c.charCodeAt(T),m===47){if(!E){y=T;break}}else E=!1;return y===-1?v?"/":".":v&&y===1?"//":c.slice(0,y)},basename:function(c,m){if(m!==void 0&&typeof m!="string")throw new TypeError('"ext" argument must be a string');d(c);var v=0,y=-1,E=!0,T;if(m!==void 0&&m.length>0&&m.length<=c.length){if(m.length===c.length&&m===c)return"";var S=m.length-1,C=-1;for(T=c.length-1;T>=0;--T){var x=c.charCodeAt(T);if(x===47){if(!E){v=T+1;break}}else C===-1&&(E=!1,C=T+1),S>=0&&(x===m.charCodeAt(S)?--S===-1&&(y=T):(S=-1,y=C))}return v===y?y=C:y===-1&&(y=c.length),c.slice(v,y)}else{for(T=c.length-1;T>=0;--T)if(c.charCodeAt(T)===47){if(!E){v=T+1;break}}else y===-1&&(E=!1,y=T+1);return y===-1?"":c.slice(v,y)}},extname:function(c){d(c);for(var m=-1,v=0,y=-1,E=!0,T=0,S=c.length-1;S>=0;--S){var C=c.charCodeAt(S);if(C===47){if(!E){v=S+1;break}continue}y===-1&&(E=!1,y=S+1),C===46?m===-1?m=S:T!==1&&(T=1):m!==-1&&(T=-1)}return m===-1||y===-1||T===0||T===1&&m===y-1&&m===v+1?"":c.slice(m,y)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return b("/",c)},parse:function(c){d(c);var m={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return m;var v=c.charCodeAt(0),y=v===47,E;y?(m.root="/",E=1):E=0;for(var T=-1,S=0,C=-1,x=!0,O=c.length-1,J=0;O>=E;--O){if(v=c.charCodeAt(O),v===47){if(!x){S=O+1;break}continue}C===-1&&(x=!1,C=O+1),v===46?T===-1?T=O:J!==1&&(J=1):T!==-1&&(J=-1)}return T===-1||C===-1||J===0||J===1&&T===C-1&&T===S+1?C!==-1&&(S===0&&y?m.base=m.name=c.slice(1,C):m.base=m.name=c.slice(S,C)):(S===0&&y?(m.name=c.slice(1,T),m.base=c.slice(1,C)):(m.name=c.slice(S,T),m.base=c.slice(S,C)),m.ext=c.slice(T,C)),S>0?m.dir=c.slice(0,S-1):y&&(m.dir="/"),m},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g,_.exports=g}).call(this)}).call(this,o("_process"))},{_process:467}],379:[function(o,_,j){(function(h){(function(){(function(){"use strict";var d={function:!0,object:!0},p=d[typeof window]&&window||this,b=p,g=d[typeof j]&&j,w=d[typeof _]&&_&&!_.nodeType&&_,c=g&&w&&typeof h=="object"&&h;c&&(c.global===c||c.window===c||c.self===c)&&(p=c);var m=Math.pow(2,53)-1,v=/\bOpera/,y=this,E=Object.prototype,T=E.hasOwnProperty,S=E.toString;function C(F){return F=String(F),F.charAt(0).toUpperCase()+F.slice(1)}function x(F,N,K){var re={"10.0":"10","6.4":"10 Technical Preview","6.3":"8.1","6.2":"8","6.1":"Server 2008 R2 / 7","6.0":"Server 2008 / Vista","5.2":"Server 2003 / XP 64-bit","5.1":"XP","5.01":"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return N&&K&&/^Win/i.test(F)&&!/^Windows Phone /i.test(F)&&(re=re[/[\d.]+$/.exec(F)])&&(F="Windows "+re),F=String(F),N&&K&&(F=F.replace(RegExp(N,"i"),K)),F=J(F.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0]),F}function O(F,N){var K=-1,re=F?F.length:0;if(typeof re=="number"&&re>-1&&re<=m)for(;++K<re;)N(F[K],K,F);else P(F,N)}function J(F){return F=L(F),/^(?:webOS|i(?:OS|P))/.test(F)?F:C(F)}function P(F,N){for(var K in F)T.call(F,K)&&N(F[K],K,F)}function X(F){return F==null?C(F):S.call(F).slice(8,-1)}function B(F,N){var K=F!=null?typeof F[N]:"number";return!/^(?:boolean|number|string|undefined)$/.test(K)&&(K=="object"?!!F[N]:!0)}function k(F){return String(F).replace(/([ -])(?!$)/g,"$1?")}function D(F,N){var K=null;return O(F,function(re,ne){K=N(K,re,ne,F)}),K}function L(F){return String(F).replace(/^ +| +$/g,"")}function q(F){var N=p,K=F&&typeof F=="object"&&X(F)!="String";K&&(N=F,F=null);var re=N.navigator||{},ne=re.userAgent||"";F||(F=ne);var pe=K||y==b,ie=K?!!re.likeChrome:/\bChrome\b/.test(F)&&!/internal|\n/i.test(S.toString()),Ae="Object",Y=K?Ae:"ScriptBridgingProxyObject",fe=K?Ae:"Environment",ve=K&&N.java?"JavaPackage":X(N.java),be=K?Ae:"RuntimeObject",le=/\bJava/.test(ve)&&N.java,ue=le&&X(N.environment)==fe,ge=le?"a":"\u03B1",Ee=le?"b":"\u03B2",ke=N.document||{},Ie=N.operamini||N.opera,de=v.test(de=K&&Ie?Ie["[[Class]]"]:X(Ie))?de:Ie=null,Z,ye=F,V=[],Q=null,U=F==ne,H=U&&Ie&&typeof Ie.version=="function"&&Ie.version(),ee,W=Ue([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),M=he(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),$=Pe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),ce=_e({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),Ce=Te(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function Ue(Ke){return D(Ke,function($e,Je){return $e||RegExp("\\b"+(Je.pattern||k(Je))+"\\b","i").exec(F)&&(Je.label||Je)})}function _e(Ke){return D(Ke,function($e,Je,nt){return $e||(Je[$]||Je[/^[a-z]+(?: +[a-z]+\b)*/i.exec($)]||RegExp("\\b"+k(nt)+"(?:\\b|\\w*\\d)","i").exec(F))&&nt})}function he(Ke){return D(Ke,function($e,Je){return $e||RegExp("\\b"+(Je.pattern||k(Je))+"\\b","i").exec(F)&&(Je.label||Je)})}function Te(Ke){return D(Ke,function($e,Je){var nt=Je.pattern||k(Je);return!$e&&($e=RegExp("\\b"+nt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(F))&&($e=x($e,nt,Je.label||Je)),$e})}function Pe(Ke){return D(Ke,function($e,Je){var nt=Je.pattern||k(Je);return!$e&&($e=RegExp("\\b"+nt+" *\\d+[.\\w_]*","i").exec(F)||RegExp("\\b"+nt+" *\\w+-[\\w]*","i").exec(F)||RegExp("\\b"+nt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(F))&&(($e=String(Je.label&&!RegExp(nt,"i").test(Je.label)?Je.label:$e).split("/"))[1]&&!/[\d.]+/.test($e[0])&&($e[0]+=" "+$e[1]),Je=Je.label||Je,$e=J($e[0].replace(RegExp(nt,"i"),Je).replace(RegExp("; *(?:"+Je+"[_-])?","i")," ").replace(RegExp("("+Je+")[-_.]?(\\w)","i"),"$1 $2"))),$e})}function Ve(Ke){return D(Ke,function($e,Je){return $e||(RegExp(Je+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(F)||0)[1]||null})}function De(){return this.description||""}if(W&&(W=[W]),/\bAndroid\b/.test(Ce)&&!$&&(Z=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(F))&&($=L(Z[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),ce&&!$?$=Pe([ce]):ce&&$&&($=$.replace(RegExp("^("+k(ce)+")[-_.\\s]","i"),ce+" ").replace(RegExp("^("+k(ce)+")[-_.]?(\\w)","i"),ce+" $2")),(Z=/\bGoogle TV\b/.exec($))&&($=Z[0]),/\bSimulator\b/i.test(F)&&($=($?$+" ":"")+"Simulator"),M=="Opera Mini"&&/\bOPiOS\b/.test(F)&&V.push("running in Turbo/Uncompressed mode"),M=="IE"&&/\blike iPhone OS\b/.test(F)?(Z=q(F.replace(/like iPhone OS/,"")),ce=Z.manufacturer,$=Z.product):/^iP/.test($)?(M||(M="Safari"),Ce="iOS"+((Z=/ OS ([\d_]+)/i.exec(F))?" "+Z[1].replace(/_/g,"."):"")):M=="Konqueror"&&/^Linux\b/i.test(Ce)?Ce="Kubuntu":ce&&ce!="Google"&&(/Chrome/.test(M)&&!/\bMobile Safari\b/i.test(F)||/\bVita\b/.test($))||/\bAndroid\b/.test(Ce)&&/^Chrome/.test(M)&&/\bVersion\//i.test(F)?(M="Android Browser",Ce=/\bAndroid\b/.test(Ce)?Ce:"Android"):M=="Silk"?(/\bMobi/i.test(F)||(Ce="Android",V.unshift("desktop mode")),/Accelerated *= *true/i.test(F)&&V.unshift("accelerated")):M=="UC Browser"&&/\bUCWEB\b/.test(F)?V.push("speed mode"):M=="PaleMoon"&&(Z=/\bFirefox\/([\d.]+)\b/.exec(F))?V.push("identifying as Firefox "+Z[1]):M=="Firefox"&&(Z=/\b(Mobile|Tablet|TV)\b/i.exec(F))?(Ce||(Ce="Firefox OS"),$||($=Z[1])):!M||(Z=!/\bMinefield\b/i.test(F)&&/\b(?:Firefox|Safari)\b/.exec(M))?(M&&!$&&/[\/,]|^[^(]+?\)/.test(F.slice(F.indexOf(Z+"/")+8))&&(M=null),(Z=$||ce||Ce)&&($||ce||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Ce))&&(M=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Ce)?Ce:Z)+" Browser")):M=="Electron"&&(Z=(/\bChrome\/([\d.]+)\b/.exec(F)||0)[1])&&V.push("Chromium "+Z),H||(H=Ve(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",k(M),"(?:Firefox|Minefield|NetFront)"])),(Z=W=="iCab"&&parseFloat(H)>3&&"WebKit"||/\bOpera\b/.test(M)&&(/\bOPR\b/.test(F)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(F)&&!/^(?:Trident|EdgeHTML)$/.test(W)&&"WebKit"||!W&&/\bMSIE\b/i.test(F)&&(Ce=="Mac OS"?"Tasman":"Trident")||W=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(M)&&"NetFront")&&(W=[Z]),M=="IE"&&(Z=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(F)||0)[1])?(M+=" Mobile",Ce="Windows Phone "+(/\+$/.test(Z)?Z:Z+".x"),V.unshift("desktop mode")):/\bWPDesktop\b/i.test(F)?(M="IE Mobile",Ce="Windows Phone 8.x",V.unshift("desktop mode"),H||(H=(/\brv:([\d.]+)/.exec(F)||0)[1])):M!="IE"&&W=="Trident"&&(Z=/\brv:([\d.]+)/.exec(F))&&(M&&V.push("identifying as "+M+(H?" "+H:"")),M="IE",H=Z[1]),U){if(B(N,"global"))if(le&&(Z=le.lang.System,ye=Z.getProperty("os.arch"),Ce=Ce||Z.getProperty("os.name")+" "+Z.getProperty("os.version")),ue){try{H=N.require("ringo/engine").version.join("."),M="RingoJS"}catch(Ke){(Z=N.system)&&Z.global.system==N.system&&(M="Narwhal",Ce||(Ce=Z[0].os||null))}M||(M="Rhino")}else typeof N.process=="object"&&!N.process.browser&&(Z=N.process)&&(typeof Z.versions=="object"&&(typeof Z.versions.electron=="string"?(V.push("Node "+Z.versions.node),M="Electron",H=Z.versions.electron):typeof Z.versions.nw=="string"&&(V.push("Chromium "+H,"Node "+Z.versions.node),M="NW.js",H=Z.versions.nw)),M||(M="Node.js",ye=Z.arch,Ce=Z.platform,H=/[\d.]+/.exec(Z.version),H=H?H[0]:null));else X(Z=N.runtime)==Y?(M="Adobe AIR",Ce=Z.flash.system.Capabilities.os):X(Z=N.phantom)==be?(M="PhantomJS",H=(Z=Z.version||null)&&Z.major+"."+Z.minor+"."+Z.patch):typeof ke.documentMode=="number"&&(Z=/\bTrident\/(\d+)/i.exec(F))?(H=[H,ke.documentMode],(Z=+Z[1]+4)!=H[1]&&(V.push("IE "+H[1]+" mode"),W&&(W[1]=""),H[1]=Z),H=M=="IE"?String(H[1].toFixed(1)):H[0]):typeof ke.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(M)&&(V.push("masking as "+M+" "+H),M="IE",H="11.0",W=["Trident"],Ce="Windows");Ce=Ce&&J(Ce)}if(H&&(Z=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(H)||/(?:alpha|beta)(?: ?\d)?/i.exec(F+";"+(U&&re.appMinorVersion))||/\bMinefield\b/i.test(F)&&"a")&&(Q=/b/i.test(Z)?"beta":"alpha",H=H.replace(RegExp(Z+"\\+?$"),"")+(Q=="beta"?Ee:ge)+(/\d+\+?/.exec(Z)||"")),M=="Fennec"||M=="Firefox"&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(Ce))M="Firefox Mobile";else if(M=="Maxthon"&&H)H=H.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test($))$=="Xbox 360"&&(Ce=null),$=="Xbox 360"&&/\bIEMobile\b/.test(F)&&V.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(M)||M&&!$&&!/Browser|Mobi/.test(M))&&(Ce=="Windows CE"||/Mobi/i.test(F)))M+=" Mobile";else if(M=="IE"&&U)try{N.external===null&&V.unshift("platform preview")}catch(Ke){V.unshift("embedded")}else(/\bBlackBerry\b/.test($)||/\bBB10\b/.test(F))&&(Z=(RegExp($.replace(/ +/g," *")+"/([.\\d]+)","i").exec(F)||0)[1]||H)?(Z=[Z,/BB10/.test(F)],Ce=(Z[1]?($=null,ce="BlackBerry"):"Device Software")+" "+Z[0],H=null):this!=P&&$!="Wii"&&(U&&Ie||/Opera/.test(M)&&/\b(?:MSIE|Firefox)\b/i.test(F)||M=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Ce)||M=="IE"&&(Ce&&!/^Win/.test(Ce)&&H>5.5||/\bWindows XP\b/.test(Ce)&&H>8||H==8&&!/\bTrident\b/.test(F)))&&!v.test(Z=q.call(P,F.replace(v,"")+";"))&&Z.name&&(Z="ing as "+Z.name+((Z=Z.version)?" "+Z:""),v.test(M)?(/\bIE\b/.test(Z)&&Ce=="Mac OS"&&(Ce=null),Z="identify"+Z):(Z="mask"+Z,de?M=J(de.replace(/([a-z])([A-Z])/g,"$1 $2")):M="Opera",/\bIE\b/.test(Z)&&(Ce=null),U||(H=null)),W=["Presto"],V.push(Z));(Z=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(F)||0)[1])&&(Z=[parseFloat(Z.replace(/\.(\d)$/,".0$1")),Z],M=="Safari"&&Z[1].slice(-1)=="+"?(M="WebKit Nightly",Q="alpha",H=Z[1].slice(0,-1)):(H==Z[1]||H==(Z[2]=(/\bSafari\/([\d.]+\+?)/i.exec(F)||0)[1]))&&(H=null),Z[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(F)||0)[1],Z[0]==537.36&&Z[2]==537.36&&parseFloat(Z[1])>=28&&W=="WebKit"&&(W=["Blink"]),!U||!ie&&!Z[1]?(W&&(W[1]="like Safari"),Z=(Z=Z[0],Z<400?1:Z<500?2:Z<526?3:Z<533?4:Z<534?"4+":Z<535?5:Z<537?6:Z<538?7:Z<601?8:Z<602?9:Z<604?10:Z<606?11:Z<608?12:"12")):(W&&(W[1]="like Chrome"),Z=Z[1]||(Z=Z[0],Z<530?1:Z<532?2:Z<532.05?3:Z<533?4:Z<534.03?5:Z<534.07?6:Z<534.1?7:Z<534.13?8:Z<534.16?9:Z<534.24?10:Z<534.3?11:Z<535.01?12:Z<535.02?"13+":Z<535.07?15:Z<535.11?16:Z<535.19?17:Z<536.05?18:Z<536.1?19:Z<537.01?20:Z<537.11?"21+":Z<537.13?23:Z<537.18?24:Z<537.24?25:Z<537.36?26:W!="Blink"?"27":"28")),W&&(W[1]+=" "+(Z+=typeof Z=="number"?".x":/[.+]/.test(Z)?"":"+")),M=="Safari"&&(!H||parseInt(H)>45)?H=Z:M=="Chrome"&&/\bHeadlessChrome/i.test(F)&&V.unshift("headless")),M=="Opera"&&(Z=/\bzbov|zvav$/.exec(Ce))?(M+=" ",V.unshift("desktop mode"),Z=="zvav"?(M+="Mini",H=null):M+="Mobile",Ce=Ce.replace(RegExp(" *"+Z+"$"),"")):M=="Safari"&&/\bChrome\b/.exec(W&&W[1])?(V.unshift("desktop mode"),M="Chrome Mobile",H=null,/\bOS X\b/.test(Ce)?(ce="Apple",Ce="iOS 4.3+"):Ce=null):/\bSRWare Iron\b/.test(M)&&!H&&(H=Ve("Chrome")),H&&H.indexOf(Z=/[\d.]+$/.exec(Ce))==0&&F.indexOf("/"+Z+"-")>-1&&(Ce=L(Ce.replace(Z,""))),Ce&&Ce.indexOf(M)!=-1&&!RegExp(M+" OS").test(Ce)&&(Ce=Ce.replace(RegExp(" *"+k(M)+" *"),"")),W&&!/\b(?:Avant|Nook)\b/.test(M)&&(/Browser|Lunascape|Maxthon/.test(M)||M!="Safari"&&/^iOS/.test(Ce)&&/\bSafari\b/.test(W[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(M)&&W[1])&&(Z=W[W.length-1])&&V.push(Z),V.length&&(V=["("+V.join("; ")+")"]),ce&&$&&$.indexOf(ce)<0&&V.push("on "+ce),$&&V.push((/^on /.test(V[V.length-1])?"":"on ")+$),Ce&&(Z=/ ([\d.+]+)$/.exec(Ce),ee=Z&&Ce.charAt(Ce.length-Z[0].length-1)=="/",Ce={architecture:32,family:Z&&!ee?Ce.replace(Z[0],""):Ce,version:Z?Z[1]:null,toString:function(){var Ke=this.version;return this.family+(Ke&&!ee?" "+Ke:"")+(this.architecture==64?" 64-bit":"")}}),(Z=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(ye))&&!/\bi686\b/i.test(ye)?(Ce&&(Ce.architecture=64,Ce.family=Ce.family.replace(RegExp(" *"+Z),"")),M&&(/\bWOW64\b/i.test(F)||U&&/\w(?:86|32)$/.test(re.cpuClass||re.platform)&&!/\bWin64; x64\b/i.test(F))&&V.unshift("32-bit")):Ce&&/^OS X/.test(Ce.family)&&M=="Chrome"&&parseFloat(H)>=39&&(Ce.architecture=64),F||(F=null);var Xe={};return Xe.description=F,Xe.layout=W&&W[0],Xe.manufacturer=ce,Xe.name=M,Xe.prerelease=Q,Xe.product=$,Xe.ua=F,Xe.version=M&&H,Xe.os=Ce||{architecture:null,family:null,version:null,toString:function(){return"null"}},Xe.parse=q,Xe.toString=De,Xe.version&&V.unshift(H),Xe.name&&V.unshift(M),Ce&&M&&!(Ce==String(Ce).split(" ")[0]&&(Ce==M.split(" ")[0]||$))&&V.push($?"("+Ce+")":"on "+Ce),V.length&&(Xe.description=V.join(" ")),Xe}var G=q();typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd?(p.platform=G,Le(function(){return G})):g&&w?P(G,function(F,N){g[N]=F}):p.platform=G}).call(this)}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],380:[function(o,_,j){(function(h){(function(){"use strict";typeof h=="undefined"||!h.version||h.version.indexOf("v0.")===0||h.version.indexOf("v1.")===0&&h.version.indexOf("v1.8.")!==0?_.exports={nextTick:d}:_.exports=h;function d(p,b,g,w){if(typeof p!="function")throw new TypeError('"callback" argument must be a function');var c=arguments.length,m,v;switch(c){case 0:case 1:return h.nextTick(p);case 2:return h.nextTick(function(){p.call(null,b)});case 3:return h.nextTick(function(){p.call(null,b,g)});case 4:return h.nextTick(function(){p.call(null,b,g,w)});default:for(m=new Array(c-1),v=0;v<m.length;)m[v++]=arguments[v];return h.nextTick(function(){p.apply(null,m)})}}}).call(this)}).call(this,o("_process"))},{_process:467}],381:[function(o,_,j){var h=_.exports={},d,p;function b(){throw new Error("setTimeout has not been defined")}function g(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?d=setTimeout:d=b}catch(O){d=b}try{typeof clearTimeout=="function"?p=clearTimeout:p=g}catch(O){p=g}})();function w(O){if(d===setTimeout)return setTimeout(O,0);if((d===b||!d)&&setTimeout)return d=setTimeout,setTimeout(O,0);try{return d(O,0)}catch(J){try{return d.call(null,O,0)}catch(P){return d.call(this,O,0)}}}function c(O){if(p===clearTimeout)return clearTimeout(O);if((p===g||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(O);try{return p(O)}catch(J){try{return p.call(null,O)}catch(P){return p.call(this,O)}}}var m=[],v=!1,y,E=-1;function T(){!v||!y||(v=!1,y.length?m=y.concat(m):E=-1,m.length&&S())}function S(){if(!v){var O=w(T);v=!0;for(var J=m.length;J;){for(y=m,m=[];++E<J;)y&&y[E].run();E=-1,J=m.length}y=null,v=!1,c(O)}}h.nextTick=function(O){var J=new Array(arguments.length-1);if(arguments.length>1)for(var P=1;P<arguments.length;P++)J[P-1]=arguments[P];m.push(new C(O,J)),m.length===1&&!v&&w(S)};function C(O,J){this.fun=O,this.array=J}C.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={};function x(){}h.on=x,h.addListener=x,h.once=x,h.off=x,h.removeListener=x,h.removeAllListeners=x,h.emit=x,h.prependListener=x,h.prependOnceListener=x,h.listeners=function(O){return[]},h.binding=function(O){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(O){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],382:[function(o,_,j){(function(h){(function(){(function(d){var p=typeof j=="object"&&j&&!j.nodeType&&j,b=typeof _=="object"&&_&&!_.nodeType&&_,g=typeof h=="object"&&h;(g.global===g||g.window===g||g.self===g)&&(d=g);var w,c=2147483647,m=36,v=1,y=26,E=38,T=700,S=72,C=128,x="-",O=/^xn--/,J=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,X={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},B=m-v,k=Math.floor,D=String.fromCharCode,L;function q(ve){throw new RangeError(X[ve])}function G(ve,be){for(var le=ve.length,ue=[];le--;)ue[le]=be(ve[le]);return ue}function F(ve,be){var le=ve.split("@"),ue="";le.length>1&&(ue=le[0]+"@",ve=le[1]),ve=ve.replace(P,".");var ge=ve.split("."),Ee=G(ge,be).join(".");return ue+Ee}function N(ve){for(var be=[],le=0,ue=ve.length,ge,Ee;le<ue;)ge=ve.charCodeAt(le++),ge>=55296&&ge<=56319&&le<ue?(Ee=ve.charCodeAt(le++),(Ee&64512)==56320?be.push(((ge&1023)<<10)+(Ee&1023)+65536):(be.push(ge),le--)):be.push(ge);return be}function K(ve){return G(ve,function(be){var le="";return be>65535&&(be-=65536,le+=D(be>>>10&1023|55296),be=56320|be&1023),le+=D(be),le}).join("")}function re(ve){return ve-48<10?ve-22:ve-65<26?ve-65:ve-97<26?ve-97:m}function ne(ve,be){return ve+22+75*(ve<26)-((be!=0)<<5)}function pe(ve,be,le){var ue=0;for(ve=le?k(ve/T):ve>>1,ve+=k(ve/be);ve>B*y>>1;ue+=m)ve=k(ve/B);return k(ue+(B+1)*ve/(ve+E))}function ie(ve){var be=[],le=ve.length,ue,ge=0,Ee=C,ke=S,Ie,de,Z,ye,V,Q,U,H,ee;for(Ie=ve.lastIndexOf(x),Ie<0&&(Ie=0),de=0;de<Ie;++de)ve.charCodeAt(de)>=128&&q("not-basic"),be.push(ve.charCodeAt(de));for(Z=Ie>0?Ie+1:0;Z<le;){for(ye=ge,V=1,Q=m;Z>=le&&q("invalid-input"),U=re(ve.charCodeAt(Z++)),(U>=m||U>k((c-ge)/V))&&q("overflow"),ge+=U*V,H=Q<=ke?v:Q>=ke+y?y:Q-ke,!(U<H);Q+=m)ee=m-H,V>k(c/ee)&&q("overflow"),V*=ee;ue=be.length+1,ke=pe(ge-ye,ue,ye==0),k(ge/ue)>c-Ee&&q("overflow"),Ee+=k(ge/ue),ge%=ue,be.splice(ge++,0,Ee)}return K(be)}function Ae(ve){var be,le,ue,ge,Ee,ke,Ie,de,Z,ye,V,Q=[],U,H,ee,W;for(ve=N(ve),U=ve.length,be=C,le=0,Ee=S,ke=0;ke<U;++ke)V=ve[ke],V<128&&Q.push(D(V));for(ue=ge=Q.length,ge&&Q.push(x);ue<U;){for(Ie=c,ke=0;ke<U;++ke)V=ve[ke],V>=be&&V<Ie&&(Ie=V);for(H=ue+1,Ie-be>k((c-le)/H)&&q("overflow"),le+=(Ie-be)*H,be=Ie,ke=0;ke<U;++ke)if(V=ve[ke],V<be&&++le>c&&q("overflow"),V==be){for(de=le,Z=m;ye=Z<=Ee?v:Z>=Ee+y?y:Z-Ee,!(de<ye);Z+=m)W=de-ye,ee=m-ye,Q.push(D(ne(ye+W%ee,0))),de=k(W/ee);Q.push(D(ne(de,0))),Ee=pe(le,H,ue==ge),le=0,++ue}++le,++be}return Q.join("")}function Y(ve){return F(ve,function(be){return O.test(be)?ie(be.slice(4).toLowerCase()):be})}function fe(ve){return F(ve,function(be){return J.test(be)?"xn--"+Ae(be):be})}if(w={version:"1.4.1",ucs2:{decode:N,encode:K},decode:ie,encode:Ae,toASCII:fe,toUnicode:Y},typeof Le=="function"&&typeof Le.amd=="object"&&Le.amd)Le("punycode",function(){return w});else if(p&&b)if(_.exports==p)b.exports=w;else for(L in w)w.hasOwnProperty(L)&&(p[L]=w[L]);else d.punycode=w})(this)}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],383:[function(o,_,j){"use strict";function h(p,b){return Object.prototype.hasOwnProperty.call(p,b)}_.exports=function(p,b,g,w){b=b||"&",g=g||"=";var c={};if(typeof p!="string"||p.length===0)return c;var m=/\+/g;p=p.split(b);var v=1e3;w&&typeof w.maxKeys=="number"&&(v=w.maxKeys);var y=p.length;v>0&&y>v&&(y=v);for(var E=0;E<y;++E){var T=p[E].replace(m,"%20"),S=T.indexOf(g),C,x,O,J;S>=0?(C=T.substr(0,S),x=T.substr(S+1)):(C=T,x=""),O=decodeURIComponent(C),J=decodeURIComponent(x),h(c,O)?d(c[O])?c[O].push(J):c[O]=[c[O],J]:c[O]=J}return c};var d=Array.isArray||function(p){return Object.prototype.toString.call(p)==="[object Array]"}},{}],384:[function(o,_,j){"use strict";var h=function(g){switch(typeof g){case"string":return g;case"boolean":return g?"true":"false";case"number":return isFinite(g)?g:"";default:return""}};_.exports=function(g,w,c,m){return w=w||"&",c=c||"=",g===null&&(g=void 0),typeof g=="object"?p(b(g),function(v){var y=encodeURIComponent(h(v))+c;return d(g[v])?p(g[v],function(E){return y+encodeURIComponent(h(E))}).join(w):y+encodeURIComponent(h(g[v]))}).join(w):m?encodeURIComponent(h(m))+c+encodeURIComponent(h(g)):""};var d=Array.isArray||function(g){return Object.prototype.toString.call(g)==="[object Array]"};function p(g,w){if(g.map)return g.map(w);for(var c=[],m=0;m<g.length;m++)c.push(w(g[m],m));return c}var b=Object.keys||function(g){var w=[];for(var c in g)Object.prototype.hasOwnProperty.call(g,c)&&w.push(c);return w}},{}],385:[function(o,_,j){"use strict";j.decode=j.parse=o("./decode"),j.encode=j.stringify=o("./encode")},{"./decode":383,"./encode":384}],386:[function(o,_,j){"use strict";var h=o("process-nextick-args"),d=Object.keys||function(T){var S=[];for(var C in T)S.push(C);return S};_.exports=v;var p=Object.create(o("core-util-is"));p.inherits=o("inherits");var b=o("./_stream_readable"),g=o("./_stream_writable");p.inherits(v,b);for(var w=d(g.prototype),c=0;c<w.length;c++){var m=w[c];v.prototype[m]||(v.prototype[m]=g.prototype[m])}function v(T){if(!(this instanceof v))return new v(T);b.call(this,T),g.call(this,T),T&&T.readable===!1&&(this.readable=!1),T&&T.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,T&&T.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",y)}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function y(){this.allowHalfOpen||this._writableState.ended||h.nextTick(E,this)}function E(T){T.end()}Object.defineProperty(v.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(T){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=T,this._writableState.destroyed=T)}}),v.prototype._destroy=function(T,S){this.push(null),this.end(),h.nextTick(S,T)}},{"./_stream_readable":388,"./_stream_writable":390,"core-util-is":341,inherits:364,"process-nextick-args":380}],387:[function(o,_,j){"use strict";_.exports=p;var h=o("./_stream_transform"),d=Object.create(o("core-util-is"));d.inherits=o("inherits"),d.inherits(p,h);function p(b){if(!(this instanceof p))return new p(b);h.call(this,b)}p.prototype._transform=function(b,g,w){w(null,b)}},{"./_stream_transform":389,"core-util-is":341,inherits:364}],388:[function(o,_,j){(function(h,d){(function(){"use strict";var p=o("process-nextick-args");_.exports=D;var b=o("isarray"),g;D.ReadableState=k;var w=o("events").EventEmitter,c=function(V,Q){return V.listeners(Q).length},m=o("./internal/streams/stream"),v=o("safe-buffer").Buffer,y=d.Uint8Array||function(){};function E(V){return v.from(V)}function T(V){return v.isBuffer(V)||V instanceof y}var S=Object.create(o("core-util-is"));S.inherits=o("inherits");var C=o("util"),x=void 0;C&&C.debuglog?x=C.debuglog("stream"):x=function(){};var O=o("./internal/streams/BufferList"),J=o("./internal/streams/destroy"),P;S.inherits(D,m);var X=["error","close","destroy","pause","resume"];function B(V,Q,U){if(typeof V.prependListener=="function")return V.prependListener(Q,U);!V._events||!V._events[Q]?V.on(Q,U):b(V._events[Q])?V._events[Q].unshift(U):V._events[Q]=[U,V._events[Q]]}function k(V,Q){g=g||o("./_stream_duplex"),V=V||{};var U=Q instanceof g;this.objectMode=!!V.objectMode,U&&(this.objectMode=this.objectMode||!!V.readableObjectMode);var H=V.highWaterMark,ee=V.readableHighWaterMark,W=this.objectMode?16:16*1024;H||H===0?this.highWaterMark=H:U&&(ee||ee===0)?this.highWaterMark=ee:this.highWaterMark=W,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new O,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=V.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,V.encoding&&(P||(P=o("string_decoder/").StringDecoder),this.decoder=new P(V.encoding),this.encoding=V.encoding)}function D(V){if(g=g||o("./_stream_duplex"),!(this instanceof D))return new D(V);this._readableState=new k(V,this),this.readable=!0,V&&(typeof V.read=="function"&&(this._read=V.read),typeof V.destroy=="function"&&(this._destroy=V.destroy)),m.call(this)}Object.defineProperty(D.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(V){this._readableState&&(this._readableState.destroyed=V)}}),D.prototype.destroy=J.destroy,D.prototype._undestroy=J.undestroy,D.prototype._destroy=function(V,Q){this.push(null),Q(V)},D.prototype.push=function(V,Q){var U=this._readableState,H;return U.objectMode?H=!0:typeof V=="string"&&(Q=Q||U.defaultEncoding,Q!==U.encoding&&(V=v.from(V,Q),Q=""),H=!0),L(this,V,Q,!1,H)},D.prototype.unshift=function(V){return L(this,V,null,!0,!1)};function L(V,Q,U,H,ee){var W=V._readableState;if(Q===null)W.reading=!1,ne(V,W);else{var M;ee||(M=G(W,Q)),M?V.emit("error",M):W.objectMode||Q&&Q.length>0?(typeof Q!="string"&&!W.objectMode&&Object.getPrototypeOf(Q)!==v.prototype&&(Q=E(Q)),H?W.endEmitted?V.emit("error",new Error("stream.unshift() after end event")):q(V,W,Q,!0):W.ended?V.emit("error",new Error("stream.push() after EOF")):(W.reading=!1,W.decoder&&!U?(Q=W.decoder.write(Q),W.objectMode||Q.length!==0?q(V,W,Q,!1):Ae(V,W)):q(V,W,Q,!1))):H||(W.reading=!1)}return F(W)}function q(V,Q,U,H){Q.flowing&&Q.length===0&&!Q.sync?(V.emit("data",U),V.read(0)):(Q.length+=Q.objectMode?1:U.length,H?Q.buffer.unshift(U):Q.buffer.push(U),Q.needReadable&&pe(V)),Ae(V,Q)}function G(V,Q){var U;return!T(Q)&&typeof Q!="string"&&Q!==void 0&&!V.objectMode&&(U=new TypeError("Invalid non-string/buffer chunk")),U}function F(V){return!V.ended&&(V.needReadable||V.length<V.highWaterMark||V.length===0)}D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(V){return P||(P=o("string_decoder/").StringDecoder),this._readableState.decoder=new P(V),this._readableState.encoding=V,this};var N=8388608;function K(V){return V>=N?V=N:(V--,V|=V>>>1,V|=V>>>2,V|=V>>>4,V|=V>>>8,V|=V>>>16,V++),V}function re(V,Q){return V<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:V!==V?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(V>Q.highWaterMark&&(Q.highWaterMark=K(V)),V<=Q.length?V:Q.ended?Q.length:(Q.needReadable=!0,0))}D.prototype.read=function(V){x("read",V),V=parseInt(V,10);var Q=this._readableState,U=V;if(V!==0&&(Q.emittedReadable=!1),V===0&&Q.needReadable&&(Q.length>=Q.highWaterMark||Q.ended))return x("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?de(this):pe(this),null;if(V=re(V,Q),V===0&&Q.ended)return Q.length===0&&de(this),null;var H=Q.needReadable;x("need readable",H),(Q.length===0||Q.length-V<Q.highWaterMark)&&(H=!0,x("length less than watermark",H)),Q.ended||Q.reading?(H=!1,x("reading or ended",H)):H&&(x("do read"),Q.reading=!0,Q.sync=!0,Q.length===0&&(Q.needReadable=!0),this._read(Q.highWaterMark),Q.sync=!1,Q.reading||(V=re(U,Q)));var ee;return V>0?ee=ge(V,Q):ee=null,ee===null?(Q.needReadable=!0,V=0):Q.length-=V,Q.length===0&&(Q.ended||(Q.needReadable=!0),U!==V&&Q.ended&&de(this)),ee!==null&&this.emit("data",ee),ee};function ne(V,Q){if(!Q.ended){if(Q.decoder){var U=Q.decoder.end();U&&U.length&&(Q.buffer.push(U),Q.length+=Q.objectMode?1:U.length)}Q.ended=!0,pe(V)}}function pe(V){var Q=V._readableState;Q.needReadable=!1,Q.emittedReadable||(x("emitReadable",Q.flowing),Q.emittedReadable=!0,Q.sync?p.nextTick(ie,V):ie(V))}function ie(V){x("emit readable"),V.emit("readable"),ue(V)}function Ae(V,Q){Q.readingMore||(Q.readingMore=!0,p.nextTick(Y,V,Q))}function Y(V,Q){for(var U=Q.length;!Q.reading&&!Q.flowing&&!Q.ended&&Q.length<Q.highWaterMark&&(x("maybeReadMore read 0"),V.read(0),U!==Q.length);)U=Q.length;Q.readingMore=!1}D.prototype._read=function(V){this.emit("error",new Error("_read() is not implemented"))},D.prototype.pipe=function(V,Q){var U=this,H=this._readableState;switch(H.pipesCount){case 0:H.pipes=V;break;case 1:H.pipes=[H.pipes,V];break;default:H.pipes.push(V);break}H.pipesCount+=1,x("pipe count=%d opts=%j",H.pipesCount,Q);var ee=(!Q||Q.end!==!1)&&V!==h.stdout&&V!==h.stderr,W=ee?$:De;H.endEmitted?p.nextTick(W):U.once("end",W),V.on("unpipe",M);function M(Xe,Ke){x("onunpipe"),Xe===U&&Ke&&Ke.hasUnpiped===!1&&(Ke.hasUnpiped=!0,Ue())}function $(){x("onend"),V.end()}var ce=fe(U);V.on("drain",ce);var Ce=!1;function Ue(){x("cleanup"),V.removeListener("close",Pe),V.removeListener("finish",Ve),V.removeListener("drain",ce),V.removeListener("error",Te),V.removeListener("unpipe",M),U.removeListener("end",$),U.removeListener("end",De),U.removeListener("data",he),Ce=!0,H.awaitDrain&&(!V._writableState||V._writableState.needDrain)&&ce()}var _e=!1;U.on("data",he);function he(Xe){x("ondata"),_e=!1;var Ke=V.write(Xe);Ke===!1&&!_e&&((H.pipesCount===1&&H.pipes===V||H.pipesCount>1&&ye(H.pipes,V)!==-1)&&!Ce&&(x("false write response, pause",U._readableState.awaitDrain),U._readableState.awaitDrain++,_e=!0),U.pause())}function Te(Xe){x("onerror",Xe),De(),V.removeListener("error",Te),c(V,"error")===0&&V.emit("error",Xe)}B(V,"error",Te);function Pe(){V.removeListener("finish",Ve),De()}V.once("close",Pe);function Ve(){x("onfinish"),V.removeListener("close",Pe),De()}V.once("finish",Ve);function De(){x("unpipe"),U.unpipe(V)}return V.emit("pipe",U),H.flowing||(x("pipe resume"),U.resume()),V};function fe(V){return function(){var Q=V._readableState;x("pipeOnDrain",Q.awaitDrain),Q.awaitDrain&&Q.awaitDrain--,Q.awaitDrain===0&&c(V,"data")&&(Q.flowing=!0,ue(V))}}D.prototype.unpipe=function(V){var Q=this._readableState,U={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return V&&V!==Q.pipes?this:(V||(V=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,V&&V.emit("unpipe",this,U),this);if(!V){var H=Q.pipes,ee=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var W=0;W<ee;W++)H[W].emit("unpipe",this,U);return this}var M=ye(Q.pipes,V);return M===-1?this:(Q.pipes.splice(M,1),Q.pipesCount-=1,Q.pipesCount===1&&(Q.pipes=Q.pipes[0]),V.emit("unpipe",this,U),this)},D.prototype.on=function(V,Q){var U=m.prototype.on.call(this,V,Q);if(V==="data")this._readableState.flowing!==!1&&this.resume();else if(V==="readable"){var H=this._readableState;!H.endEmitted&&!H.readableListening&&(H.readableListening=H.needReadable=!0,H.emittedReadable=!1,H.reading?H.length&&pe(this):p.nextTick(ve,this))}return U},D.prototype.addListener=D.prototype.on;function ve(V){x("readable nexttick read 0"),V.read(0)}D.prototype.resume=function(){var V=this._readableState;return V.flowing||(x("resume"),V.flowing=!0,be(this,V)),this};function be(V,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,p.nextTick(le,V,Q))}function le(V,Q){Q.reading||(x("resume read 0"),V.read(0)),Q.resumeScheduled=!1,Q.awaitDrain=0,V.emit("resume"),ue(V),Q.flowing&&!Q.reading&&V.read(0)}D.prototype.pause=function(){return x("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(x("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ue(V){var Q=V._readableState;for(x("flow",Q.flowing);Q.flowing&&V.read()!==null;);}D.prototype.wrap=function(V){var Q=this,U=this._readableState,H=!1;V.on("end",function(){if(x("wrapped end"),U.decoder&&!U.ended){var M=U.decoder.end();M&&M.length&&Q.push(M)}Q.push(null)}),V.on("data",function(M){if(x("wrapped data"),U.decoder&&(M=U.decoder.write(M)),!(U.objectMode&&M==null)&&!(!U.objectMode&&(!M||!M.length))){var $=Q.push(M);$||(H=!0,V.pause())}});for(var ee in V)this[ee]===void 0&&typeof V[ee]=="function"&&(this[ee]=function(M){return function(){return V[M].apply(V,arguments)}}(ee));for(var W=0;W<X.length;W++)V.on(X[W],this.emit.bind(this,X[W]));return this._read=function(M){x("wrapped _read",M),H&&(H=!1,V.resume())},this},Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),D._fromList=ge;function ge(V,Q){if(Q.length===0)return null;var U;return Q.objectMode?U=Q.buffer.shift():!V||V>=Q.length?(Q.decoder?U=Q.buffer.join(""):Q.buffer.length===1?U=Q.buffer.head.data:U=Q.buffer.concat(Q.length),Q.buffer.clear()):U=Ee(V,Q.buffer,Q.decoder),U}function Ee(V,Q,U){var H;return V<Q.head.data.length?(H=Q.head.data.slice(0,V),Q.head.data=Q.head.data.slice(V)):V===Q.head.data.length?H=Q.shift():H=U?ke(V,Q):Ie(V,Q),H}function ke(V,Q){var U=Q.head,H=1,ee=U.data;for(V-=ee.length;U=U.next;){var W=U.data,M=V>W.length?W.length:V;if(M===W.length?ee+=W:ee+=W.slice(0,V),V-=M,V===0){M===W.length?(++H,U.next?Q.head=U.next:Q.head=Q.tail=null):(Q.head=U,U.data=W.slice(M));break}++H}return Q.length-=H,ee}function Ie(V,Q){var U=v.allocUnsafe(V),H=Q.head,ee=1;for(H.data.copy(U),V-=H.data.length;H=H.next;){var W=H.data,M=V>W.length?W.length:V;if(W.copy(U,U.length-V,0,M),V-=M,V===0){M===W.length?(++ee,H.next?Q.head=H.next:Q.head=Q.tail=null):(Q.head=H,H.data=W.slice(M));break}++ee}return Q.length-=ee,U}function de(V){var Q=V._readableState;if(Q.length>0)throw new Error('"endReadable()" called on non-empty stream');Q.endEmitted||(Q.ended=!0,p.nextTick(Z,Q,V))}function Z(V,Q){!V.endEmitted&&V.length===0&&(V.endEmitted=!0,Q.readable=!1,Q.emit("end"))}function ye(V,Q){for(var U=0,H=V.length;U<H;U++)if(V[U]===Q)return U;return-1}}).call(this)}).call(this,o("_process"),typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":386,"./internal/streams/BufferList":391,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,events:344,inherits:364,isarray:370,"process-nextick-args":380,"safe-buffer":396,"string_decoder/":413,util:89}],389:[function(o,_,j){"use strict";_.exports=b;var h=o("./_stream_duplex"),d=Object.create(o("core-util-is"));d.inherits=o("inherits"),d.inherits(b,h);function p(c,m){var v=this._transformState;v.transforming=!1;var y=v.writecb;if(!y)return this.emit("error",new Error("write callback called multiple times"));v.writechunk=null,v.writecb=null,m!=null&&this.push(m),y(c);var E=this._readableState;E.reading=!1,(E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}function b(c){if(!(this instanceof b))return new b(c);h.call(this,c),this._transformState={afterTransform:p.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",g)}function g(){var c=this;typeof this._flush=="function"?this._flush(function(m,v){w(c,m,v)}):w(this,null,null)}b.prototype.push=function(c,m){return this._transformState.needTransform=!1,h.prototype.push.call(this,c,m)},b.prototype._transform=function(c,m,v){throw new Error("_transform() is not implemented")},b.prototype._write=function(c,m,v){var y=this._transformState;if(y.writecb=v,y.writechunk=c,y.writeencoding=m,!y.transforming){var E=this._readableState;(y.needTransform||E.needReadable||E.length<E.highWaterMark)&&this._read(E.highWaterMark)}},b.prototype._read=function(c){var m=this._transformState;m.writechunk!==null&&m.writecb&&!m.transforming?(m.transforming=!0,this._transform(m.writechunk,m.writeencoding,m.afterTransform)):m.needTransform=!0},b.prototype._destroy=function(c,m){var v=this;h.prototype._destroy.call(this,c,function(y){m(y),v.emit("close")})};function w(c,m,v){if(m)return c.emit("error",m);if(v!=null&&c.push(v),c._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(c._transformState.transforming)throw new Error("Calling transform done when still transforming");return c.push(null)}},{"./_stream_duplex":386,"core-util-is":341,inherits:364}],390:[function(o,_,j){(function(h,d,p){(function(){"use strict";var b=o("process-nextick-args");_.exports=B;function g(le,ue,ge){this.chunk=le,this.encoding=ue,this.callback=ge,this.next=null}function w(le){var ue=this;this.next=null,this.entry=null,this.finish=function(){be(ue,le)}}var c=!h.browser&&["v0.10","v0.9."].indexOf(h.version.slice(0,5))>-1?p:b.nextTick,m;B.WritableState=P;var v=Object.create(o("core-util-is"));v.inherits=o("inherits");var y={deprecate:o("util-deprecate")},E=o("./internal/streams/stream"),T=o("safe-buffer").Buffer,S=d.Uint8Array||function(){};function C(le){return T.from(le)}function x(le){return T.isBuffer(le)||le instanceof S}var O=o("./internal/streams/destroy");v.inherits(B,E);function J(){}function P(le,ue){m=m||o("./_stream_duplex"),le=le||{};var ge=ue instanceof m;this.objectMode=!!le.objectMode,ge&&(this.objectMode=this.objectMode||!!le.writableObjectMode);var Ee=le.highWaterMark,ke=le.writableHighWaterMark,Ie=this.objectMode?16:16*1024;Ee||Ee===0?this.highWaterMark=Ee:ge&&(ke||ke===0)?this.highWaterMark=ke:this.highWaterMark=Ie,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var de=le.decodeStrings===!1;this.decodeStrings=!de,this.defaultEncoding=le.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){K(ue,Z)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new w(this)}P.prototype.getBuffer=function(){for(var ue=this.bufferedRequest,ge=[];ue;)ge.push(ue),ue=ue.next;return ge},function(){try{Object.defineProperty(P.prototype,"buffer",{get:y.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(le){}}();var X;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(X=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(le){return X.call(this,le)?!0:this!==B?!1:le&&le._writableState instanceof P}})):X=function(le){return le instanceof this};function B(le){if(m=m||o("./_stream_duplex"),!X.call(B,this)&&!(this instanceof m))return new B(le);this._writableState=new P(le,this),this.writable=!0,le&&(typeof le.write=="function"&&(this._write=le.write),typeof le.writev=="function"&&(this._writev=le.writev),typeof le.destroy=="function"&&(this._destroy=le.destroy),typeof le.final=="function"&&(this._final=le.final)),E.call(this)}B.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function k(le,ue){var ge=new Error("write after end");le.emit("error",ge),b.nextTick(ue,ge)}function D(le,ue,ge,Ee){var ke=!0,Ie=!1;return ge===null?Ie=new TypeError("May not write null values to stream"):typeof ge!="string"&&ge!==void 0&&!ue.objectMode&&(Ie=new TypeError("Invalid non-string/buffer chunk")),Ie&&(le.emit("error",Ie),b.nextTick(Ee,Ie),ke=!1),ke}B.prototype.write=function(le,ue,ge){var Ee=this._writableState,ke=!1,Ie=!Ee.objectMode&&x(le);return Ie&&!T.isBuffer(le)&&(le=C(le)),typeof ue=="function"&&(ge=ue,ue=null),Ie?ue="buffer":ue||(ue=Ee.defaultEncoding),typeof ge!="function"&&(ge=J),Ee.ended?k(this,ge):(Ie||D(this,Ee,le,ge))&&(Ee.pendingcb++,ke=q(this,Ee,Ie,le,ue,ge)),ke},B.prototype.cork=function(){var le=this._writableState;le.corked++},B.prototype.uncork=function(){var le=this._writableState;le.corked&&(le.corked--,!le.writing&&!le.corked&&!le.finished&&!le.bufferProcessing&&le.bufferedRequest&&pe(this,le))},B.prototype.setDefaultEncoding=function(ue){if(typeof ue=="string"&&(ue=ue.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ue+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+ue);return this._writableState.defaultEncoding=ue,this};function L(le,ue,ge){return!le.objectMode&&le.decodeStrings!==!1&&typeof ue=="string"&&(ue=T.from(ue,ge)),ue}Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function q(le,ue,ge,Ee,ke,Ie){if(!ge){var de=L(ue,Ee,ke);Ee!==de&&(ge=!0,ke="buffer",Ee=de)}var Z=ue.objectMode?1:Ee.length;ue.length+=Z;var ye=ue.length<ue.highWaterMark;if(ye||(ue.needDrain=!0),ue.writing||ue.corked){var V=ue.lastBufferedRequest;ue.lastBufferedRequest={chunk:Ee,encoding:ke,isBuf:ge,callback:Ie,next:null},V?V.next=ue.lastBufferedRequest:ue.bufferedRequest=ue.lastBufferedRequest,ue.bufferedRequestCount+=1}else G(le,ue,!1,Z,Ee,ke,Ie);return ye}function G(le,ue,ge,Ee,ke,Ie,de){ue.writelen=Ee,ue.writecb=de,ue.writing=!0,ue.sync=!0,ge?le._writev(ke,ue.onwrite):le._write(ke,Ie,ue.onwrite),ue.sync=!1}function F(le,ue,ge,Ee,ke){--ue.pendingcb,ge?(b.nextTick(ke,Ee),b.nextTick(fe,le,ue),le._writableState.errorEmitted=!0,le.emit("error",Ee)):(ke(Ee),le._writableState.errorEmitted=!0,le.emit("error",Ee),fe(le,ue))}function N(le){le.writing=!1,le.writecb=null,le.length-=le.writelen,le.writelen=0}function K(le,ue){var ge=le._writableState,Ee=ge.sync,ke=ge.writecb;if(N(ge),ue)F(le,ge,Ee,ue,ke);else{var Ie=ie(ge);!Ie&&!ge.corked&&!ge.bufferProcessing&&ge.bufferedRequest&&pe(le,ge),Ee?c(re,le,ge,Ie,ke):re(le,ge,Ie,ke)}}function re(le,ue,ge,Ee){ge||ne(le,ue),ue.pendingcb--,Ee(),fe(le,ue)}function ne(le,ue){ue.length===0&&ue.needDrain&&(ue.needDrain=!1,le.emit("drain"))}function pe(le,ue){ue.bufferProcessing=!0;var ge=ue.bufferedRequest;if(le._writev&&ge&&ge.next){var Ee=ue.bufferedRequestCount,ke=new Array(Ee),Ie=ue.corkedRequestsFree;Ie.entry=ge;for(var de=0,Z=!0;ge;)ke[de]=ge,ge.isBuf||(Z=!1),ge=ge.next,de+=1;ke.allBuffers=Z,G(le,ue,!0,ue.length,ke,"",Ie.finish),ue.pendingcb++,ue.lastBufferedRequest=null,Ie.next?(ue.corkedRequestsFree=Ie.next,Ie.next=null):ue.corkedRequestsFree=new w(ue),ue.bufferedRequestCount=0}else{for(;ge;){var ye=ge.chunk,V=ge.encoding,Q=ge.callback,U=ue.objectMode?1:ye.length;if(G(le,ue,!1,U,ye,V,Q),ge=ge.next,ue.bufferedRequestCount--,ue.writing)break}ge===null&&(ue.lastBufferedRequest=null)}ue.bufferedRequest=ge,ue.bufferProcessing=!1}B.prototype._write=function(le,ue,ge){ge(new Error("_write() is not implemented"))},B.prototype._writev=null,B.prototype.end=function(le,ue,ge){var Ee=this._writableState;typeof le=="function"?(ge=le,le=null,ue=null):typeof ue=="function"&&(ge=ue,ue=null),le!=null&&this.write(le,ue),Ee.corked&&(Ee.corked=1,this.uncork()),!Ee.ending&&!Ee.finished&&ve(this,Ee,ge)};function ie(le){return le.ending&&le.length===0&&le.bufferedRequest===null&&!le.finished&&!le.writing}function Ae(le,ue){le._final(function(ge){ue.pendingcb--,ge&&le.emit("error",ge),ue.prefinished=!0,le.emit("prefinish"),fe(le,ue)})}function Y(le,ue){!ue.prefinished&&!ue.finalCalled&&(typeof le._final=="function"?(ue.pendingcb++,ue.finalCalled=!0,b.nextTick(Ae,le,ue)):(ue.prefinished=!0,le.emit("prefinish")))}function fe(le,ue){var ge=ie(ue);return ge&&(Y(le,ue),ue.pendingcb===0&&(ue.finished=!0,le.emit("finish"))),ge}function ve(le,ue,ge){ue.ending=!0,fe(le,ue),ge&&(ue.finished?b.nextTick(ge):le.once("finish",ge)),ue.ended=!0,le.writable=!1}function be(le,ue,ge){var Ee=le.entry;for(le.entry=null;Ee;){var ke=Ee.callback;ue.pendingcb--,ke(ge),Ee=Ee.next}ue.corkedRequestsFree?ue.corkedRequestsFree.next=le:ue.corkedRequestsFree=le}Object.defineProperty(B.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(le){this._writableState&&(this._writableState.destroyed=le)}}),B.prototype.destroy=O.destroy,B.prototype._undestroy=O.undestroy,B.prototype._destroy=function(le,ue){this.end(),ue(le)}}).call(this)}).call(this,o("_process"),typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("timers").setImmediate)},{"./_stream_duplex":386,"./internal/streams/destroy":392,"./internal/streams/stream":393,_process:467,"core-util-is":341,inherits:364,"process-nextick-args":380,"safe-buffer":396,timers:414,"util-deprecate":416}],391:[function(o,_,j){"use strict";function h(g,w){if(!(g instanceof w))throw new TypeError("Cannot call a class as a function")}var d=o("safe-buffer").Buffer,p=o("util");function b(g,w,c){g.copy(w,c)}_.exports=function(){function g(){h(this,g),this.head=null,this.tail=null,this.length=0}return g.prototype.push=function(c){var m={data:c,next:null};this.length>0?this.tail.next=m:this.head=m,this.tail=m,++this.length},g.prototype.unshift=function(c){var m={data:c,next:this.head};this.length===0&&(this.tail=m),this.head=m,++this.length},g.prototype.shift=function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}},g.prototype.clear=function(){this.head=this.tail=null,this.length=0},g.prototype.join=function(c){if(this.length===0)return"";for(var m=this.head,v=""+m.data;m=m.next;)v+=c+m.data;return v},g.prototype.concat=function(c){if(this.length===0)return d.alloc(0);if(this.length===1)return this.head.data;for(var m=d.allocUnsafe(c>>>0),v=this.head,y=0;v;)b(v.data,m,y),y+=v.data.length,v=v.next;return m},g}(),p&&p.inspect&&p.inspect.custom&&(_.exports.prototype[p.inspect.custom]=function(){var g=p.inspect({length:this.length});return this.constructor.name+" "+g})},{"safe-buffer":396,util:89}],392:[function(o,_,j){"use strict";var h=o("process-nextick-args");function d(g,w){var c=this,m=this._readableState&&this._readableState.destroyed,v=this._writableState&&this._writableState.destroyed;return m||v?(w?w(g):g&&(!this._writableState||!this._writableState.errorEmitted)&&h.nextTick(b,this,g),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(g||null,function(y){!w&&y?(h.nextTick(b,c,y),c._writableState&&(c._writableState.errorEmitted=!0)):w&&w(y)}),this)}function p(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function b(g,w){g.emit("error",w)}_.exports={destroy:d,undestroy:p}},{"process-nextick-args":380}],393:[function(o,_,j){_.exports=o("events").EventEmitter},{events:344}],394:[function(o,_,j){j=_.exports=o("./lib/_stream_readable.js"),j.Stream=j,j.Readable=j,j.Writable=o("./lib/_stream_writable.js"),j.Duplex=o("./lib/_stream_duplex.js"),j.Transform=o("./lib/_stream_transform.js"),j.PassThrough=o("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":386,"./lib/_stream_passthrough.js":387,"./lib/_stream_readable.js":388,"./lib/_stream_transform.js":389,"./lib/_stream_writable.js":390}],395:[function(o,_,j){var h=function(d){"use strict";var p=Object.prototype,b=p.hasOwnProperty,g,w=typeof Symbol=="function"?Symbol:{},c=w.iterator||"@@iterator",m=w.asyncIterator||"@@asyncIterator",v=w.toStringTag||"@@toStringTag";function y(Y,fe,ve){return Object.defineProperty(Y,fe,{value:ve,enumerable:!0,configurable:!0,writable:!0}),Y[fe]}try{y({},"")}catch(Y){y=function(fe,ve,be){return fe[ve]=be}}function E(Y,fe,ve,be){var le=fe&&fe.prototype instanceof P?fe:P,ue=Object.create(le.prototype),ge=new pe(be||[]);return ue._invoke=N(Y,ve,ge),ue}d.wrap=E;function T(Y,fe,ve){try{return{type:"normal",arg:Y.call(fe,ve)}}catch(be){return{type:"throw",arg:be}}}var S="suspendedStart",C="suspendedYield",x="executing",O="completed",J={};function P(){}function X(){}function B(){}var k={};y(k,c,function(){return this});var D=Object.getPrototypeOf,L=D&&D(D(ie([])));L&&L!==p&&b.call(L,c)&&(k=L);var q=B.prototype=P.prototype=Object.create(k);X.prototype=B,y(q,"constructor",B),y(B,"constructor",X),X.displayName=y(B,v,"GeneratorFunction");function G(Y){["next","throw","return"].forEach(function(fe){y(Y,fe,function(ve){return this._invoke(fe,ve)})})}d.isGeneratorFunction=function(Y){var fe=typeof Y=="function"&&Y.constructor;return fe?fe===X||(fe.displayName||fe.name)==="GeneratorFunction":!1},d.mark=function(Y){return Object.setPrototypeOf?Object.setPrototypeOf(Y,B):(Y.__proto__=B,y(Y,v,"GeneratorFunction")),Y.prototype=Object.create(q),Y},d.awrap=function(Y){return{__await:Y}};function F(Y,fe){function ve(ue,ge,Ee,ke){var Ie=T(Y[ue],Y,ge);if(Ie.type==="throw")ke(Ie.arg);else{var de=Ie.arg,Z=de.value;return Z&&typeof Z=="object"&&b.call(Z,"__await")?fe.resolve(Z.__await).then(function(ye){ve("next",ye,Ee,ke)},function(ye){ve("throw",ye,Ee,ke)}):fe.resolve(Z).then(function(ye){de.value=ye,Ee(de)},function(ye){return ve("throw",ye,Ee,ke)})}}var be;function le(ue,ge){function Ee(){return new fe(function(ke,Ie){ve(ue,ge,ke,Ie)})}return be=be?be.then(Ee,Ee):Ee()}this._invoke=le}G(F.prototype),y(F.prototype,m,function(){return this}),d.AsyncIterator=F,d.async=function(Y,fe,ve,be,le){le===void 0&&(le=Promise);var ue=new F(E(Y,fe,ve,be),le);return d.isGeneratorFunction(fe)?ue:ue.next().then(function(ge){return ge.done?ge.value:ue.next()})};function N(Y,fe,ve){var be=S;return function(ue,ge){if(be===x)throw new Error("Generator is already running");if(be===O){if(ue==="throw")throw ge;return Ae()}for(ve.method=ue,ve.arg=ge;;){var Ee=ve.delegate;if(Ee){var ke=K(Ee,ve);if(ke){if(ke===J)continue;return ke}}if(ve.method==="next")ve.sent=ve._sent=ve.arg;else if(ve.method==="throw"){if(be===S)throw be=O,ve.arg;ve.dispatchException(ve.arg)}else ve.method==="return"&&ve.abrupt("return",ve.arg);be=x;var Ie=T(Y,fe,ve);if(Ie.type==="normal"){if(be=ve.done?O:C,Ie.arg===J)continue;return{value:Ie.arg,done:ve.done}}else Ie.type==="throw"&&(be=O,ve.method="throw",ve.arg=Ie.arg)}}}function K(Y,fe){var ve=Y.iterator[fe.method];if(ve===g){if(fe.delegate=null,fe.method==="throw"){if(Y.iterator.return&&(fe.method="return",fe.arg=g,K(Y,fe),fe.method==="throw"))return J;fe.method="throw",fe.arg=new TypeError("The iterator does not provide a 'throw' method")}return J}var be=T(ve,Y.iterator,fe.arg);if(be.type==="throw")return fe.method="throw",fe.arg=be.arg,fe.delegate=null,J;var le=be.arg;if(!le)return fe.method="throw",fe.arg=new TypeError("iterator result is not an object"),fe.delegate=null,J;if(le.done)fe[Y.resultName]=le.value,fe.next=Y.nextLoc,fe.method!=="return"&&(fe.method="next",fe.arg=g);else return le;return fe.delegate=null,J}G(q),y(q,v,"Generator"),y(q,c,function(){return this}),y(q,"toString",function(){return"[object Generator]"});function re(Y){var fe={tryLoc:Y[0]};1 in Y&&(fe.catchLoc=Y[1]),2 in Y&&(fe.finallyLoc=Y[2],fe.afterLoc=Y[3]),this.tryEntries.push(fe)}function ne(Y){var fe=Y.completion||{};fe.type="normal",delete fe.arg,Y.completion=fe}function pe(Y){this.tryEntries=[{tryLoc:"root"}],Y.forEach(re,this),this.reset(!0)}d.keys=function(Y){var fe=[];for(var ve in Y)fe.push(ve);return fe.reverse(),function be(){for(;fe.length;){var le=fe.pop();if(le in Y)return be.value=le,be.done=!1,be}return be.done=!0,be}};function ie(Y){if(Y){var fe=Y[c];if(fe)return fe.call(Y);if(typeof Y.next=="function")return Y;if(!isNaN(Y.length)){var ve=-1,be=function le(){for(;++ve<Y.length;)if(b.call(Y,ve))return le.value=Y[ve],le.done=!1,le;return le.value=g,le.done=!0,le};return be.next=be}}return{next:Ae}}d.values=ie;function Ae(){return{value:g,done:!0}}return pe.prototype={constructor:pe,reset:function(Y){if(this.prev=0,this.next=0,this.sent=this._sent=g,this.done=!1,this.delegate=null,this.method="next",this.arg=g,this.tryEntries.forEach(ne),!Y)for(var fe in this)fe.charAt(0)==="t"&&b.call(this,fe)&&!isNaN(+fe.slice(1))&&(this[fe]=g)},stop:function(){this.done=!0;var Y=this.tryEntries[0],fe=Y.completion;if(fe.type==="throw")throw fe.arg;return this.rval},dispatchException:function(Y){if(this.done)throw Y;var fe=this;function ve(ke,Ie){return ue.type="throw",ue.arg=Y,fe.next=ke,Ie&&(fe.method="next",fe.arg=g),!!Ie}for(var be=this.tryEntries.length-1;be>=0;--be){var le=this.tryEntries[be],ue=le.completion;if(le.tryLoc==="root")return ve("end");if(le.tryLoc<=this.prev){var ge=b.call(le,"catchLoc"),Ee=b.call(le,"finallyLoc");if(ge&&Ee){if(this.prev<le.catchLoc)return ve(le.catchLoc,!0);if(this.prev<le.finallyLoc)return ve(le.finallyLoc)}else if(ge){if(this.prev<le.catchLoc)return ve(le.catchLoc,!0)}else if(Ee){if(this.prev<le.finallyLoc)return ve(le.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(Y,fe){for(var ve=this.tryEntries.length-1;ve>=0;--ve){var be=this.tryEntries[ve];if(be.tryLoc<=this.prev&&b.call(be,"finallyLoc")&&this.prev<be.finallyLoc){var le=be;break}}le&&(Y==="break"||Y==="continue")&&le.tryLoc<=fe&&fe<=le.finallyLoc&&(le=null);var ue=le?le.completion:{};return ue.type=Y,ue.arg=fe,le?(this.method="next",this.next=le.finallyLoc,J):this.complete(ue)},complete:function(Y,fe){if(Y.type==="throw")throw Y.arg;return Y.type==="break"||Y.type==="continue"?this.next=Y.arg:Y.type==="return"?(this.rval=this.arg=Y.arg,this.method="return",this.next="end"):Y.type==="normal"&&fe&&(this.next=fe),J},finish:function(Y){for(var fe=this.tryEntries.length-1;fe>=0;--fe){var ve=this.tryEntries[fe];if(ve.finallyLoc===Y)return this.complete(ve.completion,ve.afterLoc),ne(ve),J}},catch:function(Y){for(var fe=this.tryEntries.length-1;fe>=0;--fe){var ve=this.tryEntries[fe];if(ve.tryLoc===Y){var be=ve.completion;if(be.type==="throw"){var le=be.arg;ne(ve)}return le}}throw new Error("illegal catch attempt")},delegateYield:function(Y,fe,ve){return this.delegate={iterator:ie(Y),resultName:fe,nextLoc:ve},this.method==="next"&&(this.arg=g),J}},d}(typeof _=="object"?_.exports:{});try{regeneratorRuntime=h}catch(d){typeof globalThis=="object"?globalThis.regeneratorRuntime=h:Function("r","regeneratorRuntime = r")(h)}},{}],396:[function(o,_,j){var h=o("buffer"),d=h.Buffer;function p(g,w){for(var c in g)w[c]=g[c]}d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?_.exports=h:(p(h,j),j.Buffer=b);function b(g,w,c){return d(g,w,c)}p(d,b),b.from=function(g,w,c){if(typeof g=="number")throw new TypeError("Argument must not be a number");return d(g,w,c)},b.alloc=function(g,w,c){if(typeof g!="number")throw new TypeError("Argument must be a number");var m=d(g);return w!==void 0?typeof c=="string"?m.fill(w,c):m.fill(w):m.fill(0),m},b.allocUnsafe=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return d(g)},b.allocUnsafeSlow=function(g){if(typeof g!="number")throw new TypeError("Argument must be a number");return h.SlowBuffer(g)}},{buffer:90}],397:[function(o,_,j){(function(h){(function(){(function(d){d.parser=function(de,Z){return new b(de,Z)},d.SAXParser=b,d.SAXStream=E,d.createStream=y,d.MAX_BUFFER_LENGTH=64*1024;var p=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];d.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function b(de,Z){if(!(this instanceof b))return new b(de,Z);var ye=this;w(ye),ye.q=ye.c="",ye.bufferCheckPosition=d.MAX_BUFFER_LENGTH,ye.opt=Z||{},ye.opt.lowercase=ye.opt.lowercase||ye.opt.lowercasetags,ye.looseCase=ye.opt.lowercase?"toLowerCase":"toUpperCase",ye.tags=[],ye.closed=ye.closedRoot=ye.sawRoot=!1,ye.tag=ye.error=null,ye.strict=!!de,ye.noscript=!!(de||ye.opt.noscript),ye.state=F.BEGIN,ye.strictEntities=ye.opt.strictEntities,ye.ENTITIES=ye.strictEntities?Object.create(d.XML_ENTITIES):Object.create(d.ENTITIES),ye.attribList=[],ye.opt.xmlns&&(ye.ns=Object.create(O)),ye.trackPosition=ye.opt.position!==!1,ye.trackPosition&&(ye.position=ye.line=ye.column=0),K(ye,"onready")}Object.create||(Object.create=function(de){function Z(){}Z.prototype=de;var ye=new Z;return ye}),Object.keys||(Object.keys=function(de){var Z=[];for(var ye in de)de.hasOwnProperty(ye)&&Z.push(ye);return Z});function g(de){for(var Z=Math.max(d.MAX_BUFFER_LENGTH,10),ye=0,V=0,Q=p.length;V<Q;V++){var U=de[p[V]].length;if(U>Z)switch(p[V]){case"textNode":ne(de);break;case"cdata":re(de,"oncdata",de.cdata),de.cdata="";break;case"script":re(de,"onscript",de.script),de.script="";break;default:ie(de,"Max buffer length exceeded: "+p[V])}ye=Math.max(ye,U)}var H=d.MAX_BUFFER_LENGTH-ye;de.bufferCheckPosition=H+de.position}function w(de){for(var Z=0,ye=p.length;Z<ye;Z++)de[p[Z]]=""}function c(de){ne(de),de.cdata!==""&&(re(de,"oncdata",de.cdata),de.cdata=""),de.script!==""&&(re(de,"onscript",de.script),de.script="")}b.prototype={end:function(){Ae(this)},write:Ie,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){c(this)}};var m;try{m=o("stream").Stream}catch(de){m=function(){}}var v=d.EVENTS.filter(function(de){return de!=="error"&&de!=="end"});function y(de,Z){return new E(de,Z)}function E(de,Z){if(!(this instanceof E))return new E(de,Z);m.apply(this),this._parser=new b(de,Z),this.writable=!0,this.readable=!0;var ye=this;this._parser.onend=function(){ye.emit("end")},this._parser.onerror=function(V){ye.emit("error",V),ye._parser.error=null},this._decoder=null,v.forEach(function(V){Object.defineProperty(ye,"on"+V,{get:function(){return ye._parser["on"+V]},set:function(Q){if(!Q)return ye.removeAllListeners(V),ye._parser["on"+V]=Q,Q;ye.on(V,Q)},enumerable:!0,configurable:!1})})}E.prototype=Object.create(m.prototype,{constructor:{value:E}}),E.prototype.write=function(de){if(typeof h=="function"&&typeof h.isBuffer=="function"&&h.isBuffer(de)){if(!this._decoder){var Z=o("string_decoder").StringDecoder;this._decoder=new Z("utf8")}de=this._decoder.write(de)}return this._parser.write(de.toString()),this.emit("data",de),!0},E.prototype.end=function(de){return de&&de.length&&this.write(de),this._parser.end(),!0},E.prototype.on=function(de,Z){var ye=this;return!ye._parser["on"+de]&&v.indexOf(de)!==-1&&(ye._parser["on"+de]=function(){var V=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);V.splice(0,0,de),ye.emit.apply(ye,V)}),m.prototype.on.call(ye,de,Z)};var T="[CDATA[",S="DOCTYPE",C="http://www.w3.org/XML/1998/namespace",x="http://www.w3.org/2000/xmlns/",O={xml:C,xmlns:x},J=/[:_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]/,P=/[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,X=/[#:_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]/,B=/[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function k(de){return de===" "||de===`
|
|
`||de==="\r"||de===" "}function D(de){return de==='"'||de==="'"}function L(de){return de===">"||k(de)}function q(de,Z){return de.test(Z)}function G(de,Z){return!q(de,Z)}var F=0;d.STATE={BEGIN:F++,BEGIN_WHITESPACE:F++,TEXT:F++,TEXT_ENTITY:F++,OPEN_WAKA:F++,SGML_DECL:F++,SGML_DECL_QUOTED:F++,DOCTYPE:F++,DOCTYPE_QUOTED:F++,DOCTYPE_DTD:F++,DOCTYPE_DTD_QUOTED:F++,COMMENT_STARTING:F++,COMMENT:F++,COMMENT_ENDING:F++,COMMENT_ENDED:F++,CDATA:F++,CDATA_ENDING:F++,CDATA_ENDING_2:F++,PROC_INST:F++,PROC_INST_BODY:F++,PROC_INST_ENDING:F++,OPEN_TAG:F++,OPEN_TAG_SLASH:F++,ATTRIB:F++,ATTRIB_NAME:F++,ATTRIB_NAME_SAW_WHITE:F++,ATTRIB_VALUE:F++,ATTRIB_VALUE_QUOTED:F++,ATTRIB_VALUE_CLOSED:F++,ATTRIB_VALUE_UNQUOTED:F++,ATTRIB_VALUE_ENTITY_Q:F++,ATTRIB_VALUE_ENTITY_U:F++,CLOSE_TAG:F++,CLOSE_TAG_SAW_WHITE:F++,SCRIPT:F++,SCRIPT_ENDING:F++},d.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},d.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(d.ENTITIES).forEach(function(de){var Z=d.ENTITIES[de],ye=typeof Z=="number"?String.fromCharCode(Z):Z;d.ENTITIES[de]=ye});for(var N in d.STATE)d.STATE[d.STATE[N]]=N;F=d.STATE;function K(de,Z,ye){de[Z]&&de[Z](ye)}function re(de,Z,ye){de.textNode&&ne(de),K(de,Z,ye)}function ne(de){de.textNode=pe(de.opt,de.textNode),de.textNode&&K(de,"ontext",de.textNode),de.textNode=""}function pe(de,Z){return de.trim&&(Z=Z.trim()),de.normalize&&(Z=Z.replace(/\s+/g," ")),Z}function ie(de,Z){return ne(de),de.trackPosition&&(Z+=`
|
|
Line: `+de.line+`
|
|
Column: `+de.column+`
|
|
Char: `+de.c),Z=new Error(Z),de.error=Z,K(de,"onerror",Z),de}function Ae(de){return de.sawRoot&&!de.closedRoot&&Y(de,"Unclosed root tag"),de.state!==F.BEGIN&&de.state!==F.BEGIN_WHITESPACE&&de.state!==F.TEXT&&ie(de,"Unexpected end"),ne(de),de.c="",de.closed=!0,K(de,"onend"),b.call(de,de.strict,de.opt),de}function Y(de,Z){if(typeof de!="object"||!(de instanceof b))throw new Error("bad call to strictFail");de.strict&&ie(de,Z)}function fe(de){de.strict||(de.tagName=de.tagName[de.looseCase]());var Z=de.tags[de.tags.length-1]||de,ye=de.tag={name:de.tagName,attributes:{}};de.opt.xmlns&&(ye.ns=Z.ns),de.attribList.length=0,re(de,"onopentagstart",ye)}function ve(de,Z){var ye=de.indexOf(":"),V=ye<0?["",de]:de.split(":"),Q=V[0],U=V[1];return Z&&de==="xmlns"&&(Q="xmlns",U=""),{prefix:Q,local:U}}function be(de){if(de.strict||(de.attribName=de.attribName[de.looseCase]()),de.attribList.indexOf(de.attribName)!==-1||de.tag.attributes.hasOwnProperty(de.attribName)){de.attribName=de.attribValue="";return}if(de.opt.xmlns){var Z=ve(de.attribName,!0),ye=Z.prefix,V=Z.local;if(ye==="xmlns")if(V==="xml"&&de.attribValue!==C)Y(de,"xml: prefix must be bound to "+C+`
|
|
Actual: `+de.attribValue);else if(V==="xmlns"&&de.attribValue!==x)Y(de,"xmlns: prefix must be bound to "+x+`
|
|
Actual: `+de.attribValue);else{var Q=de.tag,U=de.tags[de.tags.length-1]||de;Q.ns===U.ns&&(Q.ns=Object.create(U.ns)),Q.ns[V]=de.attribValue}de.attribList.push([de.attribName,de.attribValue])}else de.tag.attributes[de.attribName]=de.attribValue,re(de,"onattribute",{name:de.attribName,value:de.attribValue});de.attribName=de.attribValue=""}function le(de,Z){if(de.opt.xmlns){var ye=de.tag,V=ve(de.tagName);ye.prefix=V.prefix,ye.local=V.local,ye.uri=ye.ns[V.prefix]||"",ye.prefix&&!ye.uri&&(Y(de,"Unbound namespace prefix: "+JSON.stringify(de.tagName)),ye.uri=V.prefix);var Q=de.tags[de.tags.length-1]||de;ye.ns&&Q.ns!==ye.ns&&Object.keys(ye.ns).forEach(function(he){re(de,"onopennamespace",{prefix:he,uri:ye.ns[he]})});for(var U=0,H=de.attribList.length;U<H;U++){var ee=de.attribList[U],W=ee[0],M=ee[1],$=ve(W,!0),ce=$.prefix,Ce=$.local,Ue=ce===""?"":ye.ns[ce]||"",_e={name:W,value:M,prefix:ce,local:Ce,uri:Ue};ce&&ce!=="xmlns"&&!Ue&&(Y(de,"Unbound namespace prefix: "+JSON.stringify(ce)),_e.uri=ce),de.tag.attributes[W]=_e,re(de,"onattribute",_e)}de.attribList.length=0}de.tag.isSelfClosing=!!Z,de.sawRoot=!0,de.tags.push(de.tag),re(de,"onopentag",de.tag),Z||(!de.noscript&&de.tagName.toLowerCase()==="script"?de.state=F.SCRIPT:de.state=F.TEXT,de.tag=null,de.tagName=""),de.attribName=de.attribValue="",de.attribList.length=0}function ue(de){if(!de.tagName){Y(de,"Weird empty close tag."),de.textNode+="</>",de.state=F.TEXT;return}if(de.script){if(de.tagName!=="script"){de.script+="</"+de.tagName+">",de.tagName="",de.state=F.SCRIPT;return}re(de,"onscript",de.script),de.script=""}var Z=de.tags.length,ye=de.tagName;de.strict||(ye=ye[de.looseCase]());for(var V=ye;Z--;){var Q=de.tags[Z];if(Q.name!==V)Y(de,"Unexpected close tag");else break}if(Z<0){Y(de,"Unmatched closing tag: "+de.tagName),de.textNode+="</"+de.tagName+">",de.state=F.TEXT;return}de.tagName=ye;for(var U=de.tags.length;U-- >Z;){var H=de.tag=de.tags.pop();de.tagName=de.tag.name,re(de,"onclosetag",de.tagName);var ee={};for(var W in H.ns)ee[W]=H.ns[W];var M=de.tags[de.tags.length-1]||de;de.opt.xmlns&&H.ns!==M.ns&&Object.keys(H.ns).forEach(function($){var ce=H.ns[$];re(de,"onclosenamespace",{prefix:$,uri:ce})})}Z===0&&(de.closedRoot=!0),de.tagName=de.attribValue=de.attribName="",de.attribList.length=0,de.state=F.TEXT}function ge(de){var Z=de.entity,ye=Z.toLowerCase(),V,Q="";return de.ENTITIES[Z]?de.ENTITIES[Z]:de.ENTITIES[ye]?de.ENTITIES[ye]:(Z=ye,Z.charAt(0)==="#"&&(Z.charAt(1)==="x"?(Z=Z.slice(2),V=parseInt(Z,16),Q=V.toString(16)):(Z=Z.slice(1),V=parseInt(Z,10),Q=V.toString(10))),Z=Z.replace(/^0+/,""),isNaN(V)||Q.toLowerCase()!==Z?(Y(de,"Invalid character entity"),"&"+de.entity+";"):String.fromCodePoint(V))}function Ee(de,Z){Z==="<"?(de.state=F.OPEN_WAKA,de.startTagPosition=de.position):k(Z)||(Y(de,"Non-whitespace before first tag."),de.textNode=Z,de.state=F.TEXT)}function ke(de,Z){var ye="";return Z<de.length&&(ye=de.charAt(Z)),ye}function Ie(de){var Z=this;if(this.error)throw this.error;if(Z.closed)return ie(Z,"Cannot write after close. Assign an onready handler.");if(de===null)return Ae(Z);typeof de=="object"&&(de=de.toString());for(var ye=0,V="";V=ke(de,ye++),Z.c=V,!!V;)switch(Z.trackPosition&&(Z.position++,V===`
|
|
`?(Z.line++,Z.column=0):Z.column++),Z.state){case F.BEGIN:if(Z.state=F.BEGIN_WHITESPACE,V==="\uFEFF")continue;Ee(Z,V);continue;case F.BEGIN_WHITESPACE:Ee(Z,V);continue;case F.TEXT:if(Z.sawRoot&&!Z.closedRoot){for(var Q=ye-1;V&&V!=="<"&&V!=="&";)V=ke(de,ye++),V&&Z.trackPosition&&(Z.position++,V===`
|
|
`?(Z.line++,Z.column=0):Z.column++);Z.textNode+=de.substring(Q,ye-1)}V==="<"&&!(Z.sawRoot&&Z.closedRoot&&!Z.strict)?(Z.state=F.OPEN_WAKA,Z.startTagPosition=Z.position):(!k(V)&&(!Z.sawRoot||Z.closedRoot)&&Y(Z,"Text data outside of root node."),V==="&"?Z.state=F.TEXT_ENTITY:Z.textNode+=V);continue;case F.SCRIPT:V==="<"?Z.state=F.SCRIPT_ENDING:Z.script+=V;continue;case F.SCRIPT_ENDING:V==="/"?Z.state=F.CLOSE_TAG:(Z.script+="<"+V,Z.state=F.SCRIPT);continue;case F.OPEN_WAKA:if(V==="!")Z.state=F.SGML_DECL,Z.sgmlDecl="";else if(!k(V))if(q(J,V))Z.state=F.OPEN_TAG,Z.tagName=V;else if(V==="/")Z.state=F.CLOSE_TAG,Z.tagName="";else if(V==="?")Z.state=F.PROC_INST,Z.procInstName=Z.procInstBody="";else{if(Y(Z,"Unencoded <"),Z.startTagPosition+1<Z.position){var U=Z.position-Z.startTagPosition;V=new Array(U).join(" ")+V}Z.textNode+="<"+V,Z.state=F.TEXT}continue;case F.SGML_DECL:(Z.sgmlDecl+V).toUpperCase()===T?(re(Z,"onopencdata"),Z.state=F.CDATA,Z.sgmlDecl="",Z.cdata=""):Z.sgmlDecl+V==="--"?(Z.state=F.COMMENT,Z.comment="",Z.sgmlDecl=""):(Z.sgmlDecl+V).toUpperCase()===S?(Z.state=F.DOCTYPE,(Z.doctype||Z.sawRoot)&&Y(Z,"Inappropriately located doctype declaration"),Z.doctype="",Z.sgmlDecl=""):V===">"?(re(Z,"onsgmldeclaration",Z.sgmlDecl),Z.sgmlDecl="",Z.state=F.TEXT):(D(V)&&(Z.state=F.SGML_DECL_QUOTED),Z.sgmlDecl+=V);continue;case F.SGML_DECL_QUOTED:V===Z.q&&(Z.state=F.SGML_DECL,Z.q=""),Z.sgmlDecl+=V;continue;case F.DOCTYPE:V===">"?(Z.state=F.TEXT,re(Z,"ondoctype",Z.doctype),Z.doctype=!0):(Z.doctype+=V,V==="["?Z.state=F.DOCTYPE_DTD:D(V)&&(Z.state=F.DOCTYPE_QUOTED,Z.q=V));continue;case F.DOCTYPE_QUOTED:Z.doctype+=V,V===Z.q&&(Z.q="",Z.state=F.DOCTYPE);continue;case F.DOCTYPE_DTD:Z.doctype+=V,V==="]"?Z.state=F.DOCTYPE:D(V)&&(Z.state=F.DOCTYPE_DTD_QUOTED,Z.q=V);continue;case F.DOCTYPE_DTD_QUOTED:Z.doctype+=V,V===Z.q&&(Z.state=F.DOCTYPE_DTD,Z.q="");continue;case F.COMMENT:V==="-"?Z.state=F.COMMENT_ENDING:Z.comment+=V;continue;case F.COMMENT_ENDING:V==="-"?(Z.state=F.COMMENT_ENDED,Z.comment=pe(Z.opt,Z.comment),Z.comment&&re(Z,"oncomment",Z.comment),Z.comment=""):(Z.comment+="-"+V,Z.state=F.COMMENT);continue;case F.COMMENT_ENDED:V!==">"?(Y(Z,"Malformed comment"),Z.comment+="--"+V,Z.state=F.COMMENT):Z.state=F.TEXT;continue;case F.CDATA:V==="]"?Z.state=F.CDATA_ENDING:Z.cdata+=V;continue;case F.CDATA_ENDING:V==="]"?Z.state=F.CDATA_ENDING_2:(Z.cdata+="]"+V,Z.state=F.CDATA);continue;case F.CDATA_ENDING_2:V===">"?(Z.cdata&&re(Z,"oncdata",Z.cdata),re(Z,"onclosecdata"),Z.cdata="",Z.state=F.TEXT):V==="]"?Z.cdata+="]":(Z.cdata+="]]"+V,Z.state=F.CDATA);continue;case F.PROC_INST:V==="?"?Z.state=F.PROC_INST_ENDING:k(V)?Z.state=F.PROC_INST_BODY:Z.procInstName+=V;continue;case F.PROC_INST_BODY:if(!Z.procInstBody&&k(V))continue;V==="?"?Z.state=F.PROC_INST_ENDING:Z.procInstBody+=V;continue;case F.PROC_INST_ENDING:V===">"?(re(Z,"onprocessinginstruction",{name:Z.procInstName,body:Z.procInstBody}),Z.procInstName=Z.procInstBody="",Z.state=F.TEXT):(Z.procInstBody+="?"+V,Z.state=F.PROC_INST_BODY);continue;case F.OPEN_TAG:q(P,V)?Z.tagName+=V:(fe(Z),V===">"?le(Z):V==="/"?Z.state=F.OPEN_TAG_SLASH:(k(V)||Y(Z,"Invalid character in tag name"),Z.state=F.ATTRIB));continue;case F.OPEN_TAG_SLASH:V===">"?(le(Z,!0),ue(Z)):(Y(Z,"Forward-slash in opening tag not followed by >"),Z.state=F.ATTRIB);continue;case F.ATTRIB:if(k(V))continue;V===">"?le(Z):V==="/"?Z.state=F.OPEN_TAG_SLASH:q(J,V)?(Z.attribName=V,Z.attribValue="",Z.state=F.ATTRIB_NAME):Y(Z,"Invalid attribute name");continue;case F.ATTRIB_NAME:V==="="?Z.state=F.ATTRIB_VALUE:V===">"?(Y(Z,"Attribute without value"),Z.attribValue=Z.attribName,be(Z),le(Z)):k(V)?Z.state=F.ATTRIB_NAME_SAW_WHITE:q(P,V)?Z.attribName+=V:Y(Z,"Invalid attribute name");continue;case F.ATTRIB_NAME_SAW_WHITE:if(V==="=")Z.state=F.ATTRIB_VALUE;else{if(k(V))continue;Y(Z,"Attribute without value"),Z.tag.attributes[Z.attribName]="",Z.attribValue="",re(Z,"onattribute",{name:Z.attribName,value:""}),Z.attribName="",V===">"?le(Z):q(J,V)?(Z.attribName=V,Z.state=F.ATTRIB_NAME):(Y(Z,"Invalid attribute name"),Z.state=F.ATTRIB)}continue;case F.ATTRIB_VALUE:if(k(V))continue;D(V)?(Z.q=V,Z.state=F.ATTRIB_VALUE_QUOTED):(Y(Z,"Unquoted attribute value"),Z.state=F.ATTRIB_VALUE_UNQUOTED,Z.attribValue=V);continue;case F.ATTRIB_VALUE_QUOTED:if(V!==Z.q){V==="&"?Z.state=F.ATTRIB_VALUE_ENTITY_Q:Z.attribValue+=V;continue}be(Z),Z.q="",Z.state=F.ATTRIB_VALUE_CLOSED;continue;case F.ATTRIB_VALUE_CLOSED:k(V)?Z.state=F.ATTRIB:V===">"?le(Z):V==="/"?Z.state=F.OPEN_TAG_SLASH:q(J,V)?(Y(Z,"No whitespace between attributes"),Z.attribName=V,Z.attribValue="",Z.state=F.ATTRIB_NAME):Y(Z,"Invalid attribute name");continue;case F.ATTRIB_VALUE_UNQUOTED:if(!L(V)){V==="&"?Z.state=F.ATTRIB_VALUE_ENTITY_U:Z.attribValue+=V;continue}be(Z),V===">"?le(Z):Z.state=F.ATTRIB;continue;case F.CLOSE_TAG:if(Z.tagName)V===">"?ue(Z):q(P,V)?Z.tagName+=V:Z.script?(Z.script+="</"+Z.tagName,Z.tagName="",Z.state=F.SCRIPT):(k(V)||Y(Z,"Invalid tagname in closing tag"),Z.state=F.CLOSE_TAG_SAW_WHITE);else{if(k(V))continue;G(J,V)?Z.script?(Z.script+="</"+V,Z.state=F.SCRIPT):Y(Z,"Invalid tagname in closing tag."):Z.tagName=V}continue;case F.CLOSE_TAG_SAW_WHITE:if(k(V))continue;V===">"?ue(Z):Y(Z,"Invalid characters in closing tag");continue;case F.TEXT_ENTITY:case F.ATTRIB_VALUE_ENTITY_Q:case F.ATTRIB_VALUE_ENTITY_U:var H,ee;switch(Z.state){case F.TEXT_ENTITY:H=F.TEXT,ee="textNode";break;case F.ATTRIB_VALUE_ENTITY_Q:H=F.ATTRIB_VALUE_QUOTED,ee="attribValue";break;case F.ATTRIB_VALUE_ENTITY_U:H=F.ATTRIB_VALUE_UNQUOTED,ee="attribValue";break}V===";"?(Z[ee]+=ge(Z),Z.entity="",Z.state=H):q(Z.entity.length?B:X,V)?Z.entity+=V:(Y(Z,"Invalid character in entity name"),Z[ee]+="&"+Z.entity+V,Z.entity="",Z.state=H);continue;default:throw new Error(Z,"Unknown state: "+Z.state)}return Z.position>=Z.bufferCheckPosition&&g(Z),Z}String.fromCodePoint||function(){var de=String.fromCharCode,Z=Math.floor,ye=function(){var V=16384,Q=[],U,H,ee=-1,W=arguments.length;if(!W)return"";for(var M="";++ee<W;){var $=Number(arguments[ee]);if(!isFinite($)||$<0||$>1114111||Z($)!==$)throw RangeError("Invalid code point: "+$);$<=65535?Q.push($):($-=65536,U=($>>10)+55296,H=$%1024+56320,Q.push(U,H)),(ee+1===W||Q.length>V)&&(M+=de.apply(null,Q),Q.length=0)}return M};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:ye,configurable:!0,writable:!0}):String.fromCodePoint=ye}()})(typeof j=="undefined"?this.sax={}:j)}).call(this)}).call(this,o("buffer").Buffer)},{buffer:90,stream:398,string_decoder:413}],398:[function(o,_,j){_.exports=p;var h=o("events").EventEmitter,d=o("inherits");d(p,h),p.Readable=o("readable-stream/lib/_stream_readable.js"),p.Writable=o("readable-stream/lib/_stream_writable.js"),p.Duplex=o("readable-stream/lib/_stream_duplex.js"),p.Transform=o("readable-stream/lib/_stream_transform.js"),p.PassThrough=o("readable-stream/lib/_stream_passthrough.js"),p.finished=o("readable-stream/lib/internal/streams/end-of-stream.js"),p.pipeline=o("readable-stream/lib/internal/streams/pipeline.js"),p.Stream=p;function p(){h.call(this)}p.prototype.pipe=function(b,g){var w=this;function c(C){b.writable&&b.write(C)===!1&&w.pause&&w.pause()}w.on("data",c);function m(){w.readable&&w.resume&&w.resume()}b.on("drain",m),!b._isStdio&&(!g||g.end!==!1)&&(w.on("end",y),w.on("close",E));var v=!1;function y(){v||(v=!0,b.end())}function E(){v||(v=!0,typeof b.destroy=="function"&&b.destroy())}function T(C){if(S(),h.listenerCount(this,"error")===0)throw C}w.on("error",T),b.on("error",T);function S(){w.removeListener("data",c),b.removeListener("drain",m),w.removeListener("end",y),w.removeListener("close",E),w.removeListener("error",T),b.removeListener("error",T),w.removeListener("end",S),w.removeListener("close",S),b.removeListener("close",S)}return w.on("end",S),w.on("close",S),b.on("close",S),b.emit("pipe",w),b}},{events:344,inherits:364,"readable-stream/lib/_stream_duplex.js":400,"readable-stream/lib/_stream_passthrough.js":401,"readable-stream/lib/_stream_readable.js":402,"readable-stream/lib/_stream_transform.js":403,"readable-stream/lib/_stream_writable.js":404,"readable-stream/lib/internal/streams/end-of-stream.js":408,"readable-stream/lib/internal/streams/pipeline.js":410}],399:[function(o,_,j){"use strict";function h(m,v){m.prototype=Object.create(v.prototype),m.prototype.constructor=m,m.__proto__=v}var d={};function p(m,v,y){y||(y=Error);function E(S,C,x){return typeof v=="string"?v:v(S,C,x)}var T=function(S){h(C,S);function C(x,O,J){return S.call(this,E(x,O,J))||this}return C}(y);T.prototype.name=y.name,T.prototype.code=m,d[m]=T}function b(m,v){if(Array.isArray(m)){var y=m.length;return m=m.map(function(E){return String(E)}),y>2?"one of ".concat(v," ").concat(m.slice(0,y-1).join(", "),", or ")+m[y-1]:y===2?"one of ".concat(v," ").concat(m[0]," or ").concat(m[1]):"of ".concat(v," ").concat(m[0])}else return"of ".concat(v," ").concat(String(m))}function g(m,v,y){return m.substr(!y||y<0?0:+y,v.length)===v}function w(m,v,y){return(y===void 0||y>m.length)&&(y=m.length),m.substring(y-v.length,y)===v}function c(m,v,y){return typeof y!="number"&&(y=0),y+v.length>m.length?!1:m.indexOf(v,y)!==-1}p("ERR_INVALID_OPT_VALUE",function(m,v){return'The value "'+v+'" is invalid for option "'+m+'"'},TypeError),p("ERR_INVALID_ARG_TYPE",function(m,v,y){var E;typeof v=="string"&&g(v,"not ")?(E="must not be",v=v.replace(/^not /,"")):E="must be";var T;if(w(m," argument"))T="The ".concat(m," ").concat(E," ").concat(b(v,"type"));else{var S=c(m,".")?"property":"argument";T='The "'.concat(m,'" ').concat(S," ").concat(E," ").concat(b(v,"type"))}return T+=". Received type ".concat(typeof y),T},TypeError),p("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),p("ERR_METHOD_NOT_IMPLEMENTED",function(m){return"The "+m+" method is not implemented"}),p("ERR_STREAM_PREMATURE_CLOSE","Premature close"),p("ERR_STREAM_DESTROYED",function(m){return"Cannot call "+m+" after a stream was destroyed"}),p("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),p("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),p("ERR_STREAM_WRITE_AFTER_END","write after end"),p("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),p("ERR_UNKNOWN_ENCODING",function(m){return"Unknown encoding: "+m},TypeError),p("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),_.exports.codes=d},{}],400:[function(o,_,j){(function(h){(function(){"use strict";var d=Object.keys||function(E){var T=[];for(var S in E)T.push(S);return T};_.exports=m;var p=o("./_stream_readable"),b=o("./_stream_writable");o("inherits")(m,p);for(var g=d(b.prototype),w=0;w<g.length;w++){var c=g[w];m.prototype[c]||(m.prototype[c]=b.prototype[c])}function m(E){if(!(this instanceof m))return new m(E);p.call(this,E),b.call(this,E),this.allowHalfOpen=!0,E&&(E.readable===!1&&(this.readable=!1),E.writable===!1&&(this.writable=!1),E.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v)))}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(m.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v(){this._writableState.ended||h.nextTick(y,this)}function y(E){E.end()}Object.defineProperty(m.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(T){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=T,this._writableState.destroyed=T)}})}).call(this)}).call(this,o("_process"))},{"./_stream_readable":402,"./_stream_writable":404,_process:467,inherits:364}],401:[function(o,_,j){"use strict";_.exports=d;var h=o("./_stream_transform");o("inherits")(d,h);function d(p){if(!(this instanceof d))return new d(p);h.call(this,p)}d.prototype._transform=function(p,b,g){g(null,p)}},{"./_stream_transform":403,inherits:364}],402:[function(o,_,j){(function(h,d){(function(){"use strict";_.exports=re;var p;re.ReadableState=K;var b=o("events").EventEmitter,g=function(W,M){return W.listeners(M).length},w=o("./internal/streams/stream"),c=o("buffer").Buffer,m=(typeof d!="undefined"?d:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function v(ee){return c.from(ee)}function y(ee){return c.isBuffer(ee)||ee instanceof m}var E=o("util"),T;E&&E.debuglog?T=E.debuglog("stream"):T=function(){};var S=o("./internal/streams/buffer_list"),C=o("./internal/streams/destroy"),x=o("./internal/streams/state"),O=x.getHighWaterMark,J=o("../errors").codes,P=J.ERR_INVALID_ARG_TYPE,X=J.ERR_STREAM_PUSH_AFTER_EOF,B=J.ERR_METHOD_NOT_IMPLEMENTED,k=J.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,D,L,q;o("inherits")(re,w);var G=C.errorOrDestroy,F=["error","close","destroy","pause","resume"];function N(ee,W,M){if(typeof ee.prependListener=="function")return ee.prependListener(W,M);!ee._events||!ee._events[W]?ee.on(W,M):Array.isArray(ee._events[W])?ee._events[W].unshift(M):ee._events[W]=[M,ee._events[W]]}function K(ee,W,M){p=p||o("./_stream_duplex"),ee=ee||{},typeof M!="boolean"&&(M=W instanceof p),this.objectMode=!!ee.objectMode,M&&(this.objectMode=this.objectMode||!!ee.readableObjectMode),this.highWaterMark=O(this,ee,"readableHighWaterMark",M),this.buffer=new S,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=ee.emitClose!==!1,this.autoDestroy=!!ee.autoDestroy,this.destroyed=!1,this.defaultEncoding=ee.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ee.encoding&&(D||(D=o("string_decoder/").StringDecoder),this.decoder=new D(ee.encoding),this.encoding=ee.encoding)}function re(ee){if(p=p||o("./_stream_duplex"),!(this instanceof re))return new re(ee);var W=this instanceof p;this._readableState=new K(ee,this,W),this.readable=!0,ee&&(typeof ee.read=="function"&&(this._read=ee.read),typeof ee.destroy=="function"&&(this._destroy=ee.destroy)),w.call(this)}Object.defineProperty(re.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(W){this._readableState&&(this._readableState.destroyed=W)}}),re.prototype.destroy=C.destroy,re.prototype._undestroy=C.undestroy,re.prototype._destroy=function(ee,W){W(ee)},re.prototype.push=function(ee,W){var M=this._readableState,$;return M.objectMode?$=!0:typeof ee=="string"&&(W=W||M.defaultEncoding,W!==M.encoding&&(ee=c.from(ee,W),W=""),$=!0),ne(this,ee,W,!1,$)},re.prototype.unshift=function(ee){return ne(this,ee,null,!0,!1)};function ne(ee,W,M,$,ce){T("readableAddChunk",W);var Ce=ee._readableState;if(W===null)Ce.reading=!1,ve(ee,Ce);else{var Ue;if(ce||(Ue=ie(Ce,W)),Ue)G(ee,Ue);else if(Ce.objectMode||W&&W.length>0)if(typeof W!="string"&&!Ce.objectMode&&Object.getPrototypeOf(W)!==c.prototype&&(W=v(W)),$)Ce.endEmitted?G(ee,new k):pe(ee,Ce,W,!0);else if(Ce.ended)G(ee,new X);else{if(Ce.destroyed)return!1;Ce.reading=!1,Ce.decoder&&!M?(W=Ce.decoder.write(W),Ce.objectMode||W.length!==0?pe(ee,Ce,W,!1):ue(ee,Ce)):pe(ee,Ce,W,!1)}else $||(Ce.reading=!1,ue(ee,Ce))}return!Ce.ended&&(Ce.length<Ce.highWaterMark||Ce.length===0)}function pe(ee,W,M,$){W.flowing&&W.length===0&&!W.sync?(W.awaitDrain=0,ee.emit("data",M)):(W.length+=W.objectMode?1:M.length,$?W.buffer.unshift(M):W.buffer.push(M),W.needReadable&&be(ee)),ue(ee,W)}function ie(ee,W){var M;return!y(W)&&typeof W!="string"&&W!==void 0&&!ee.objectMode&&(M=new P("chunk",["string","Buffer","Uint8Array"],W)),M}re.prototype.isPaused=function(){return this._readableState.flowing===!1},re.prototype.setEncoding=function(ee){D||(D=o("string_decoder/").StringDecoder);var W=new D(ee);this._readableState.decoder=W,this._readableState.encoding=this._readableState.decoder.encoding;for(var M=this._readableState.buffer.head,$="";M!==null;)$+=W.write(M.data),M=M.next;return this._readableState.buffer.clear(),$!==""&&this._readableState.buffer.push($),this._readableState.length=$.length,this};var Ae=1073741824;function Y(ee){return ee>=Ae?ee=Ae:(ee--,ee|=ee>>>1,ee|=ee>>>2,ee|=ee>>>4,ee|=ee>>>8,ee|=ee>>>16,ee++),ee}function fe(ee,W){return ee<=0||W.length===0&&W.ended?0:W.objectMode?1:ee!==ee?W.flowing&&W.length?W.buffer.head.data.length:W.length:(ee>W.highWaterMark&&(W.highWaterMark=Y(ee)),ee<=W.length?ee:W.ended?W.length:(W.needReadable=!0,0))}re.prototype.read=function(ee){T("read",ee),ee=parseInt(ee,10);var W=this._readableState,M=ee;if(ee!==0&&(W.emittedReadable=!1),ee===0&&W.needReadable&&((W.highWaterMark!==0?W.length>=W.highWaterMark:W.length>0)||W.ended))return T("read: emitReadable",W.length,W.ended),W.length===0&&W.ended?Q(this):be(this),null;if(ee=fe(ee,W),ee===0&&W.ended)return W.length===0&&Q(this),null;var $=W.needReadable;T("need readable",$),(W.length===0||W.length-ee<W.highWaterMark)&&($=!0,T("length less than watermark",$)),W.ended||W.reading?($=!1,T("reading or ended",$)):$&&(T("do read"),W.reading=!0,W.sync=!0,W.length===0&&(W.needReadable=!0),this._read(W.highWaterMark),W.sync=!1,W.reading||(ee=fe(M,W)));var ce;return ee>0?ce=V(ee,W):ce=null,ce===null?(W.needReadable=W.length<=W.highWaterMark,ee=0):(W.length-=ee,W.awaitDrain=0),W.length===0&&(W.ended||(W.needReadable=!0),M!==ee&&W.ended&&Q(this)),ce!==null&&this.emit("data",ce),ce};function ve(ee,W){if(T("onEofChunk"),!W.ended){if(W.decoder){var M=W.decoder.end();M&&M.length&&(W.buffer.push(M),W.length+=W.objectMode?1:M.length)}W.ended=!0,W.sync?be(ee):(W.needReadable=!1,W.emittedReadable||(W.emittedReadable=!0,le(ee)))}}function be(ee){var W=ee._readableState;T("emitReadable",W.needReadable,W.emittedReadable),W.needReadable=!1,W.emittedReadable||(T("emitReadable",W.flowing),W.emittedReadable=!0,h.nextTick(le,ee))}function le(ee){var W=ee._readableState;T("emitReadable_",W.destroyed,W.length,W.ended),!W.destroyed&&(W.length||W.ended)&&(ee.emit("readable"),W.emittedReadable=!1),W.needReadable=!W.flowing&&!W.ended&&W.length<=W.highWaterMark,ye(ee)}function ue(ee,W){W.readingMore||(W.readingMore=!0,h.nextTick(ge,ee,W))}function ge(ee,W){for(;!W.reading&&!W.ended&&(W.length<W.highWaterMark||W.flowing&&W.length===0);){var M=W.length;if(T("maybeReadMore read 0"),ee.read(0),M===W.length)break}W.readingMore=!1}re.prototype._read=function(ee){G(this,new B("_read()"))},re.prototype.pipe=function(ee,W){var M=this,$=this._readableState;switch($.pipesCount){case 0:$.pipes=ee;break;case 1:$.pipes=[$.pipes,ee];break;default:$.pipes.push(ee);break}$.pipesCount+=1,T("pipe count=%d opts=%j",$.pipesCount,W);var ce=(!W||W.end!==!1)&&ee!==h.stdout&&ee!==h.stderr,Ce=ce?_e:$e;$.endEmitted?h.nextTick(Ce):M.once("end",Ce),ee.on("unpipe",Ue);function Ue(Je,nt){T("onunpipe"),Je===M&&nt&&nt.hasUnpiped===!1&&(nt.hasUnpiped=!0,Pe())}function _e(){T("onend"),ee.end()}var he=Ee(M);ee.on("drain",he);var Te=!1;function Pe(){T("cleanup"),ee.removeListener("close",Xe),ee.removeListener("finish",Ke),ee.removeListener("drain",he),ee.removeListener("error",De),ee.removeListener("unpipe",Ue),M.removeListener("end",_e),M.removeListener("end",$e),M.removeListener("data",Ve),Te=!0,$.awaitDrain&&(!ee._writableState||ee._writableState.needDrain)&&he()}M.on("data",Ve);function Ve(Je){T("ondata");var nt=ee.write(Je);T("dest.write",nt),nt===!1&&(($.pipesCount===1&&$.pipes===ee||$.pipesCount>1&&H($.pipes,ee)!==-1)&&!Te&&(T("false write response, pause",$.awaitDrain),$.awaitDrain++),M.pause())}function De(Je){T("onerror",Je),$e(),ee.removeListener("error",De),g(ee,"error")===0&&G(ee,Je)}N(ee,"error",De);function Xe(){ee.removeListener("finish",Ke),$e()}ee.once("close",Xe);function Ke(){T("onfinish"),ee.removeListener("close",Xe),$e()}ee.once("finish",Ke);function $e(){T("unpipe"),M.unpipe(ee)}return ee.emit("pipe",M),$.flowing||(T("pipe resume"),M.resume()),ee};function Ee(ee){return function(){var M=ee._readableState;T("pipeOnDrain",M.awaitDrain),M.awaitDrain&&M.awaitDrain--,M.awaitDrain===0&&g(ee,"data")&&(M.flowing=!0,ye(ee))}}re.prototype.unpipe=function(ee){var W=this._readableState,M={hasUnpiped:!1};if(W.pipesCount===0)return this;if(W.pipesCount===1)return ee&&ee!==W.pipes?this:(ee||(ee=W.pipes),W.pipes=null,W.pipesCount=0,W.flowing=!1,ee&&ee.emit("unpipe",this,M),this);if(!ee){var $=W.pipes,ce=W.pipesCount;W.pipes=null,W.pipesCount=0,W.flowing=!1;for(var Ce=0;Ce<ce;Ce++)$[Ce].emit("unpipe",this,{hasUnpiped:!1});return this}var Ue=H(W.pipes,ee);return Ue===-1?this:(W.pipes.splice(Ue,1),W.pipesCount-=1,W.pipesCount===1&&(W.pipes=W.pipes[0]),ee.emit("unpipe",this,M),this)},re.prototype.on=function(ee,W){var M=w.prototype.on.call(this,ee,W),$=this._readableState;return ee==="data"?($.readableListening=this.listenerCount("readable")>0,$.flowing!==!1&&this.resume()):ee==="readable"&&!$.endEmitted&&!$.readableListening&&($.readableListening=$.needReadable=!0,$.flowing=!1,$.emittedReadable=!1,T("on readable",$.length,$.reading),$.length?be(this):$.reading||h.nextTick(Ie,this)),M},re.prototype.addListener=re.prototype.on,re.prototype.removeListener=function(ee,W){var M=w.prototype.removeListener.call(this,ee,W);return ee==="readable"&&h.nextTick(ke,this),M},re.prototype.removeAllListeners=function(ee){var W=w.prototype.removeAllListeners.apply(this,arguments);return(ee==="readable"||ee===void 0)&&h.nextTick(ke,this),W};function ke(ee){var W=ee._readableState;W.readableListening=ee.listenerCount("readable")>0,W.resumeScheduled&&!W.paused?W.flowing=!0:ee.listenerCount("data")>0&&ee.resume()}function Ie(ee){T("readable nexttick read 0"),ee.read(0)}re.prototype.resume=function(){var ee=this._readableState;return ee.flowing||(T("resume"),ee.flowing=!ee.readableListening,de(this,ee)),ee.paused=!1,this};function de(ee,W){W.resumeScheduled||(W.resumeScheduled=!0,h.nextTick(Z,ee,W))}function Z(ee,W){T("resume",W.reading),W.reading||ee.read(0),W.resumeScheduled=!1,ee.emit("resume"),ye(ee),W.flowing&&!W.reading&&ee.read(0)}re.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ye(ee){var W=ee._readableState;for(T("flow",W.flowing);W.flowing&&ee.read()!==null;);}re.prototype.wrap=function(ee){var W=this,M=this._readableState,$=!1;ee.on("end",function(){if(T("wrapped end"),M.decoder&&!M.ended){var Ue=M.decoder.end();Ue&&Ue.length&&W.push(Ue)}W.push(null)}),ee.on("data",function(Ue){if(T("wrapped data"),M.decoder&&(Ue=M.decoder.write(Ue)),!(M.objectMode&&Ue==null)&&!(!M.objectMode&&(!Ue||!Ue.length))){var _e=W.push(Ue);_e||($=!0,ee.pause())}});for(var ce in ee)this[ce]===void 0&&typeof ee[ce]=="function"&&(this[ce]=function(_e){return function(){return ee[_e].apply(ee,arguments)}}(ce));for(var Ce=0;Ce<F.length;Ce++)ee.on(F[Ce],this.emit.bind(this,F[Ce]));return this._read=function(Ue){T("wrapped _read",Ue),$&&($=!1,ee.resume())},this},typeof Symbol=="function"&&(re.prototype[Symbol.asyncIterator]=function(){return L===void 0&&(L=o("./internal/streams/async_iterator")),L(this)}),Object.defineProperty(re.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(re.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(re.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(W){this._readableState&&(this._readableState.flowing=W)}}),re._fromList=V,Object.defineProperty(re.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function V(ee,W){if(W.length===0)return null;var M;return W.objectMode?M=W.buffer.shift():!ee||ee>=W.length?(W.decoder?M=W.buffer.join(""):W.buffer.length===1?M=W.buffer.first():M=W.buffer.concat(W.length),W.buffer.clear()):M=W.buffer.consume(ee,W.decoder),M}function Q(ee){var W=ee._readableState;T("endReadable",W.endEmitted),W.endEmitted||(W.ended=!0,h.nextTick(U,W,ee))}function U(ee,W){if(T("endReadableNT",ee.endEmitted,ee.length),!ee.endEmitted&&ee.length===0&&(ee.endEmitted=!0,W.readable=!1,W.emit("end"),ee.autoDestroy)){var M=W._writableState;(!M||M.autoDestroy&&M.finished)&&W.destroy()}}typeof Symbol=="function"&&(re.from=function(ee,W){return q===void 0&&(q=o("./internal/streams/from")),q(re,ee,W)});function H(ee,W){for(var M=0,$=ee.length;M<$;M++)if(ee[M]===W)return M;return-1}}).call(this)}).call(this,o("_process"),typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/async_iterator":405,"./internal/streams/buffer_list":406,"./internal/streams/destroy":407,"./internal/streams/from":409,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,events:344,inherits:364,"string_decoder/":413,util:89}],403:[function(o,_,j){"use strict";_.exports=m;var h=o("../errors").codes,d=h.ERR_METHOD_NOT_IMPLEMENTED,p=h.ERR_MULTIPLE_CALLBACK,b=h.ERR_TRANSFORM_ALREADY_TRANSFORMING,g=h.ERR_TRANSFORM_WITH_LENGTH_0,w=o("./_stream_duplex");o("inherits")(m,w);function c(E,T){var S=this._transformState;S.transforming=!1;var C=S.writecb;if(C===null)return this.emit("error",new p);S.writechunk=null,S.writecb=null,T!=null&&this.push(T),C(E);var x=this._readableState;x.reading=!1,(x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}function m(E){if(!(this instanceof m))return new m(E);w.call(this,E),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,E&&(typeof E.transform=="function"&&(this._transform=E.transform),typeof E.flush=="function"&&(this._flush=E.flush)),this.on("prefinish",v)}function v(){var E=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(T,S){y(E,T,S)}):y(this,null,null)}m.prototype.push=function(E,T){return this._transformState.needTransform=!1,w.prototype.push.call(this,E,T)},m.prototype._transform=function(E,T,S){S(new d("_transform()"))},m.prototype._write=function(E,T,S){var C=this._transformState;if(C.writecb=S,C.writechunk=E,C.writeencoding=T,!C.transforming){var x=this._readableState;(C.needTransform||x.needReadable||x.length<x.highWaterMark)&&this._read(x.highWaterMark)}},m.prototype._read=function(E){var T=this._transformState;T.writechunk!==null&&!T.transforming?(T.transforming=!0,this._transform(T.writechunk,T.writeencoding,T.afterTransform)):T.needTransform=!0},m.prototype._destroy=function(E,T){w.prototype._destroy.call(this,E,function(S){T(S)})};function y(E,T,S){if(T)return E.emit("error",T);if(S!=null&&E.push(S),E._writableState.length)throw new g;if(E._transformState.transforming)throw new b;return E.push(null)}},{"../errors":399,"./_stream_duplex":400,inherits:364}],404:[function(o,_,j){(function(h,d){(function(){"use strict";_.exports=K;function p(ye,V,Q){this.chunk=ye,this.encoding=V,this.callback=Q,this.next=null}function b(ye){var V=this;this.next=null,this.entry=null,this.finish=function(){Z(V,ye)}}var g;K.WritableState=F;var w={deprecate:o("util-deprecate")},c=o("./internal/streams/stream"),m=o("buffer").Buffer,v=(typeof d!="undefined"?d:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function y(ye){return m.from(ye)}function E(ye){return m.isBuffer(ye)||ye instanceof v}var T=o("./internal/streams/destroy"),S=o("./internal/streams/state"),C=S.getHighWaterMark,x=o("../errors").codes,O=x.ERR_INVALID_ARG_TYPE,J=x.ERR_METHOD_NOT_IMPLEMENTED,P=x.ERR_MULTIPLE_CALLBACK,X=x.ERR_STREAM_CANNOT_PIPE,B=x.ERR_STREAM_DESTROYED,k=x.ERR_STREAM_NULL_VALUES,D=x.ERR_STREAM_WRITE_AFTER_END,L=x.ERR_UNKNOWN_ENCODING,q=T.errorOrDestroy;o("inherits")(K,c);function G(){}function F(ye,V,Q){g=g||o("./_stream_duplex"),ye=ye||{},typeof Q!="boolean"&&(Q=V instanceof g),this.objectMode=!!ye.objectMode,Q&&(this.objectMode=this.objectMode||!!ye.writableObjectMode),this.highWaterMark=C(this,ye,"writableHighWaterMark",Q),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var U=ye.decodeStrings===!1;this.decodeStrings=!U,this.defaultEncoding=ye.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){ve(V,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ye.emitClose!==!1,this.autoDestroy=!!ye.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new b(this)}F.prototype.getBuffer=function(){for(var V=this.bufferedRequest,Q=[];V;)Q.push(V),V=V.next;return Q},function(){try{Object.defineProperty(F.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(ye){}}();var N;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(N=Function.prototype[Symbol.hasInstance],Object.defineProperty(K,Symbol.hasInstance,{value:function(V){return N.call(this,V)?!0:this!==K?!1:V&&V._writableState instanceof F}})):N=function(V){return V instanceof this};function K(ye){g=g||o("./_stream_duplex");var V=this instanceof g;if(!V&&!N.call(K,this))return new K(ye);this._writableState=new F(ye,this,V),this.writable=!0,ye&&(typeof ye.write=="function"&&(this._write=ye.write),typeof ye.writev=="function"&&(this._writev=ye.writev),typeof ye.destroy=="function"&&(this._destroy=ye.destroy),typeof ye.final=="function"&&(this._final=ye.final)),c.call(this)}K.prototype.pipe=function(){q(this,new X)};function re(ye,V){var Q=new D;q(ye,Q),h.nextTick(V,Q)}function ne(ye,V,Q,U){var H;return Q===null?H=new k:typeof Q!="string"&&!V.objectMode&&(H=new O("chunk",["string","Buffer"],Q)),H?(q(ye,H),h.nextTick(U,H),!1):!0}K.prototype.write=function(ye,V,Q){var U=this._writableState,H=!1,ee=!U.objectMode&&E(ye);return ee&&!m.isBuffer(ye)&&(ye=y(ye)),typeof V=="function"&&(Q=V,V=null),ee?V="buffer":V||(V=U.defaultEncoding),typeof Q!="function"&&(Q=G),U.ending?re(this,Q):(ee||ne(this,U,ye,Q))&&(U.pendingcb++,H=ie(this,U,ee,ye,V,Q)),H},K.prototype.cork=function(){this._writableState.corked++},K.prototype.uncork=function(){var ye=this._writableState;ye.corked&&(ye.corked--,!ye.writing&&!ye.corked&&!ye.bufferProcessing&&ye.bufferedRequest&&ue(this,ye))},K.prototype.setDefaultEncoding=function(V){if(typeof V=="string"&&(V=V.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((V+"").toLowerCase())>-1))throw new L(V);return this._writableState.defaultEncoding=V,this},Object.defineProperty(K.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function pe(ye,V,Q){return!ye.objectMode&&ye.decodeStrings!==!1&&typeof V=="string"&&(V=m.from(V,Q)),V}Object.defineProperty(K.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function ie(ye,V,Q,U,H,ee){if(!Q){var W=pe(V,U,H);U!==W&&(Q=!0,H="buffer",U=W)}var M=V.objectMode?1:U.length;V.length+=M;var $=V.length<V.highWaterMark;if($||(V.needDrain=!0),V.writing||V.corked){var ce=V.lastBufferedRequest;V.lastBufferedRequest={chunk:U,encoding:H,isBuf:Q,callback:ee,next:null},ce?ce.next=V.lastBufferedRequest:V.bufferedRequest=V.lastBufferedRequest,V.bufferedRequestCount+=1}else Ae(ye,V,!1,M,U,H,ee);return $}function Ae(ye,V,Q,U,H,ee,W){V.writelen=U,V.writecb=W,V.writing=!0,V.sync=!0,V.destroyed?V.onwrite(new B("write")):Q?ye._writev(H,V.onwrite):ye._write(H,ee,V.onwrite),V.sync=!1}function Y(ye,V,Q,U,H){--V.pendingcb,Q?(h.nextTick(H,U),h.nextTick(Ie,ye,V),ye._writableState.errorEmitted=!0,q(ye,U)):(H(U),ye._writableState.errorEmitted=!0,q(ye,U),Ie(ye,V))}function fe(ye){ye.writing=!1,ye.writecb=null,ye.length-=ye.writelen,ye.writelen=0}function ve(ye,V){var Q=ye._writableState,U=Q.sync,H=Q.writecb;if(typeof H!="function")throw new P;if(fe(Q),V)Y(ye,Q,U,V,H);else{var ee=ge(Q)||ye.destroyed;!ee&&!Q.corked&&!Q.bufferProcessing&&Q.bufferedRequest&&ue(ye,Q),U?h.nextTick(be,ye,Q,ee,H):be(ye,Q,ee,H)}}function be(ye,V,Q,U){Q||le(ye,V),V.pendingcb--,U(),Ie(ye,V)}function le(ye,V){V.length===0&&V.needDrain&&(V.needDrain=!1,ye.emit("drain"))}function ue(ye,V){V.bufferProcessing=!0;var Q=V.bufferedRequest;if(ye._writev&&Q&&Q.next){var U=V.bufferedRequestCount,H=new Array(U),ee=V.corkedRequestsFree;ee.entry=Q;for(var W=0,M=!0;Q;)H[W]=Q,Q.isBuf||(M=!1),Q=Q.next,W+=1;H.allBuffers=M,Ae(ye,V,!0,V.length,H,"",ee.finish),V.pendingcb++,V.lastBufferedRequest=null,ee.next?(V.corkedRequestsFree=ee.next,ee.next=null):V.corkedRequestsFree=new b(V),V.bufferedRequestCount=0}else{for(;Q;){var $=Q.chunk,ce=Q.encoding,Ce=Q.callback,Ue=V.objectMode?1:$.length;if(Ae(ye,V,!1,Ue,$,ce,Ce),Q=Q.next,V.bufferedRequestCount--,V.writing)break}Q===null&&(V.lastBufferedRequest=null)}V.bufferedRequest=Q,V.bufferProcessing=!1}K.prototype._write=function(ye,V,Q){Q(new J("_write()"))},K.prototype._writev=null,K.prototype.end=function(ye,V,Q){var U=this._writableState;return typeof ye=="function"?(Q=ye,ye=null,V=null):typeof V=="function"&&(Q=V,V=null),ye!=null&&this.write(ye,V),U.corked&&(U.corked=1,this.uncork()),U.ending||de(this,U,Q),this},Object.defineProperty(K.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(ye){return ye.ending&&ye.length===0&&ye.bufferedRequest===null&&!ye.finished&&!ye.writing}function Ee(ye,V){ye._final(function(Q){V.pendingcb--,Q&&q(ye,Q),V.prefinished=!0,ye.emit("prefinish"),Ie(ye,V)})}function ke(ye,V){!V.prefinished&&!V.finalCalled&&(typeof ye._final=="function"&&!V.destroyed?(V.pendingcb++,V.finalCalled=!0,h.nextTick(Ee,ye,V)):(V.prefinished=!0,ye.emit("prefinish")))}function Ie(ye,V){var Q=ge(V);if(Q&&(ke(ye,V),V.pendingcb===0&&(V.finished=!0,ye.emit("finish"),V.autoDestroy))){var U=ye._readableState;(!U||U.autoDestroy&&U.endEmitted)&&ye.destroy()}return Q}function de(ye,V,Q){V.ending=!0,Ie(ye,V),Q&&(V.finished?h.nextTick(Q):ye.once("finish",Q)),V.ended=!0,ye.writable=!1}function Z(ye,V,Q){var U=ye.entry;for(ye.entry=null;U;){var H=U.callback;V.pendingcb--,H(Q),U=U.next}V.corkedRequestsFree.next=ye}Object.defineProperty(K.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(V){this._writableState&&(this._writableState.destroyed=V)}}),K.prototype.destroy=T.destroy,K.prototype._undestroy=T.undestroy,K.prototype._destroy=function(ye,V){V(ye)}}).call(this)}).call(this,o("_process"),typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"../errors":399,"./_stream_duplex":400,"./internal/streams/destroy":407,"./internal/streams/state":411,"./internal/streams/stream":412,_process:467,buffer:90,inherits:364,"util-deprecate":416}],405:[function(o,_,j){(function(h){(function(){"use strict";var d;function p(k,D,L){return D=b(D),D in k?Object.defineProperty(k,D,{value:L,enumerable:!0,configurable:!0,writable:!0}):k[D]=L,k}function b(k){var D=g(k,"string");return typeof D=="symbol"?D:String(D)}function g(k,D){if(typeof k!="object"||k===null)return k;var L=k[Symbol.toPrimitive];if(L!==void 0){var q=L.call(k,D||"default");if(typeof q!="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(k)}var w=o("./end-of-stream"),c=Symbol("lastResolve"),m=Symbol("lastReject"),v=Symbol("error"),y=Symbol("ended"),E=Symbol("lastPromise"),T=Symbol("handlePromise"),S=Symbol("stream");function C(k,D){return{value:k,done:D}}function x(k){var D=k[c];if(D!==null){var L=k[S].read();L!==null&&(k[E]=null,k[c]=null,k[m]=null,D(C(L,!1)))}}function O(k){h.nextTick(x,k)}function J(k,D){return function(L,q){k.then(function(){if(D[y]){L(C(void 0,!0));return}D[T](L,q)},q)}}var P=Object.getPrototypeOf(function(){}),X=Object.setPrototypeOf((d={get stream(){return this[S]},next:function(){var D=this,L=this[v];if(L!==null)return Promise.reject(L);if(this[y])return Promise.resolve(C(void 0,!0));if(this[S].destroyed)return new Promise(function(N,K){h.nextTick(function(){D[v]?K(D[v]):N(C(void 0,!0))})});var q=this[E],G;if(q)G=new Promise(J(q,this));else{var F=this[S].read();if(F!==null)return Promise.resolve(C(F,!1));G=new Promise(this[T])}return this[E]=G,G}},p(d,Symbol.asyncIterator,function(){return this}),p(d,"return",function(){var D=this;return new Promise(function(L,q){D[S].destroy(null,function(G){if(G){q(G);return}L(C(void 0,!0))})})}),d),P),B=function(D){var L,q=Object.create(X,(L={},p(L,S,{value:D,writable:!0}),p(L,c,{value:null,writable:!0}),p(L,m,{value:null,writable:!0}),p(L,v,{value:null,writable:!0}),p(L,y,{value:D._readableState.endEmitted,writable:!0}),p(L,T,{value:function(F,N){var K=q[S].read();K?(q[E]=null,q[c]=null,q[m]=null,F(C(K,!1))):(q[c]=F,q[m]=N)},writable:!0}),L));return q[E]=null,w(D,function(G){if(G&&G.code!=="ERR_STREAM_PREMATURE_CLOSE"){var F=q[m];F!==null&&(q[E]=null,q[c]=null,q[m]=null,F(G)),q[v]=G;return}var N=q[c];N!==null&&(q[E]=null,q[c]=null,q[m]=null,N(C(void 0,!0))),q[y]=!0}),D.on("readable",O.bind(null,q)),q};_.exports=B}).call(this)}).call(this,o("_process"))},{"./end-of-stream":408,_process:467}],406:[function(o,_,j){"use strict";function h(x,O){var J=Object.keys(x);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(x);O&&(P=P.filter(function(X){return Object.getOwnPropertyDescriptor(x,X).enumerable})),J.push.apply(J,P)}return J}function d(x){for(var O=1;O<arguments.length;O++){var J=arguments[O]!=null?arguments[O]:{};O%2?h(Object(J),!0).forEach(function(P){p(x,P,J[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(J)):h(Object(J)).forEach(function(P){Object.defineProperty(x,P,Object.getOwnPropertyDescriptor(J,P))})}return x}function p(x,O,J){return O=c(O),O in x?Object.defineProperty(x,O,{value:J,enumerable:!0,configurable:!0,writable:!0}):x[O]=J,x}function b(x,O){if(!(x instanceof O))throw new TypeError("Cannot call a class as a function")}function g(x,O){for(var J=0;J<O.length;J++){var P=O[J];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(x,c(P.key),P)}}function w(x,O,J){return O&&g(x.prototype,O),J&&g(x,J),Object.defineProperty(x,"prototype",{writable:!1}),x}function c(x){var O=m(x,"string");return typeof O=="symbol"?O:String(O)}function m(x,O){if(typeof x!="object"||x===null)return x;var J=x[Symbol.toPrimitive];if(J!==void 0){var P=J.call(x,O||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(x)}var v=o("buffer"),y=v.Buffer,E=o("util"),T=E.inspect,S=T&&T.custom||"inspect";function C(x,O,J){y.prototype.copy.call(x,O,J)}_.exports=function(){function x(){b(this,x),this.head=null,this.tail=null,this.length=0}return w(x,[{key:"push",value:function(J){var P={data:J,next:null};this.length>0?this.tail.next=P:this.head=P,this.tail=P,++this.length}},{key:"unshift",value:function(J){var P={data:J,next:this.head};this.length===0&&(this.tail=P),this.head=P,++this.length}},{key:"shift",value:function(){if(this.length!==0){var J=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,J}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(J){if(this.length===0)return"";for(var P=this.head,X=""+P.data;P=P.next;)X+=J+P.data;return X}},{key:"concat",value:function(J){if(this.length===0)return y.alloc(0);for(var P=y.allocUnsafe(J>>>0),X=this.head,B=0;X;)C(X.data,P,B),B+=X.data.length,X=X.next;return P}},{key:"consume",value:function(J,P){var X;return J<this.head.data.length?(X=this.head.data.slice(0,J),this.head.data=this.head.data.slice(J)):J===this.head.data.length?X=this.shift():X=P?this._getString(J):this._getBuffer(J),X}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(J){var P=this.head,X=1,B=P.data;for(J-=B.length;P=P.next;){var k=P.data,D=J>k.length?k.length:J;if(D===k.length?B+=k:B+=k.slice(0,J),J-=D,J===0){D===k.length?(++X,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=k.slice(D));break}++X}return this.length-=X,B}},{key:"_getBuffer",value:function(J){var P=y.allocUnsafe(J),X=this.head,B=1;for(X.data.copy(P),J-=X.data.length;X=X.next;){var k=X.data,D=J>k.length?k.length:J;if(k.copy(P,P.length-J,0,D),J-=D,J===0){D===k.length?(++B,X.next?this.head=X.next:this.head=this.tail=null):(this.head=X,X.data=k.slice(D));break}++B}return this.length-=B,P}},{key:S,value:function(J,P){return T(this,d(d({},P),{},{depth:0,customInspect:!1}))}}]),x}()},{buffer:90,util:89}],407:[function(o,_,j){(function(h){(function(){"use strict";function d(m,v){var y=this,E=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;return E||T?(v?v(m):m&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,h.nextTick(w,this,m)):h.nextTick(w,this,m)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(m||null,function(S){!v&&S?y._writableState?y._writableState.errorEmitted?h.nextTick(b,y):(y._writableState.errorEmitted=!0,h.nextTick(p,y,S)):h.nextTick(p,y,S):v?(h.nextTick(b,y),v(S)):h.nextTick(b,y)}),this)}function p(m,v){w(m,v),b(m)}function b(m){m._writableState&&!m._writableState.emitClose||m._readableState&&!m._readableState.emitClose||m.emit("close")}function g(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function w(m,v){m.emit("error",v)}function c(m,v){var y=m._readableState,E=m._writableState;y&&y.autoDestroy||E&&E.autoDestroy?m.destroy(v):m.emit("error",v)}_.exports={destroy:d,undestroy:g,errorOrDestroy:c}}).call(this)}).call(this,o("_process"))},{_process:467}],408:[function(o,_,j){"use strict";var h=o("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function d(w){var c=!1;return function(){if(!c){c=!0;for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];w.apply(this,v)}}}function p(){}function b(w){return w.setHeader&&typeof w.abort=="function"}function g(w,c,m){if(typeof c=="function")return g(w,null,c);c||(c={}),m=d(m||p);var v=c.readable||c.readable!==!1&&w.readable,y=c.writable||c.writable!==!1&&w.writable,E=function(){w.writable||S()},T=w._writableState&&w._writableState.finished,S=function(){y=!1,T=!0,v||m.call(w)},C=w._readableState&&w._readableState.endEmitted,x=function(){v=!1,C=!0,y||m.call(w)},O=function(B){m.call(w,B)},J=function(){var B;if(v&&!C)return(!w._readableState||!w._readableState.ended)&&(B=new h),m.call(w,B);if(y&&!T)return(!w._writableState||!w._writableState.ended)&&(B=new h),m.call(w,B)},P=function(){w.req.on("finish",S)};return b(w)?(w.on("complete",S),w.on("abort",J),w.req?P():w.on("request",P)):y&&!w._writableState&&(w.on("end",E),w.on("close",E)),w.on("end",x),w.on("finish",S),c.error!==!1&&w.on("error",O),w.on("close",J),function(){w.removeListener("complete",S),w.removeListener("abort",J),w.removeListener("request",P),w.req&&w.req.removeListener("finish",S),w.removeListener("end",E),w.removeListener("close",E),w.removeListener("finish",S),w.removeListener("end",x),w.removeListener("error",O),w.removeListener("close",J)}}_.exports=g},{"../../../errors":399}],409:[function(o,_,j){_.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],410:[function(o,_,j){"use strict";var h;function d(S){var C=!1;return function(){C||(C=!0,S.apply(void 0,arguments))}}var p=o("../../../errors").codes,b=p.ERR_MISSING_ARGS,g=p.ERR_STREAM_DESTROYED;function w(S){if(S)throw S}function c(S){return S.setHeader&&typeof S.abort=="function"}function m(S,C,x,O){O=d(O);var J=!1;S.on("close",function(){J=!0}),h===void 0&&(h=o("./end-of-stream")),h(S,{readable:C,writable:x},function(X){if(X)return O(X);J=!0,O()});var P=!1;return function(X){if(!J&&!P){if(P=!0,c(S))return S.abort();if(typeof S.destroy=="function")return S.destroy();O(X||new g("pipe"))}}}function v(S){S()}function y(S,C){return S.pipe(C)}function E(S){return!S.length||typeof S[S.length-1]!="function"?w:S.pop()}function T(){for(var S=arguments.length,C=new Array(S),x=0;x<S;x++)C[x]=arguments[x];var O=E(C);if(Array.isArray(C[0])&&(C=C[0]),C.length<2)throw new b("streams");var J,P=C.map(function(X,B){var k=B<C.length-1,D=B>0;return m(X,k,D,function(L){J||(J=L),L&&P.forEach(v),!k&&(P.forEach(v),O(J))})});return C.reduce(y)}_.exports=T},{"../../../errors":399,"./end-of-stream":408}],411:[function(o,_,j){"use strict";var h=o("../../../errors").codes.ERR_INVALID_OPT_VALUE;function d(b,g,w){return b.highWaterMark!=null?b.highWaterMark:g?b[w]:null}function p(b,g,w,c){var m=d(g,c,w);if(m!=null){if(!(isFinite(m)&&Math.floor(m)===m)||m<0){var v=c?w:"highWaterMark";throw new h(v,m)}return Math.floor(m)}return b.objectMode?16:16*1024}_.exports={getHighWaterMark:p}},{"../../../errors":399}],412:[function(o,_,j){arguments[4][393][0].apply(j,arguments)},{dup:393,events:344}],413:[function(o,_,j){"use strict";var h=o("safe-buffer").Buffer,d=h.isEncoding||function(P){switch(P=""+P,P&&P.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function p(P){if(!P)return"utf8";for(var X;;)switch(P){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return P;default:if(X)return;P=(""+P).toLowerCase(),X=!0}}function b(P){var X=p(P);if(typeof X!="string"&&(h.isEncoding===d||!d(P)))throw new Error("Unknown encoding: "+P);return X||P}j.StringDecoder=g;function g(P){this.encoding=b(P);var X;switch(this.encoding){case"utf16le":this.text=T,this.end=S,X=4;break;case"utf8":this.fillLast=v,X=4;break;case"base64":this.text=C,this.end=x,X=3;break;default:this.write=O,this.end=J;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(X)}g.prototype.write=function(P){if(P.length===0)return"";var X,B;if(this.lastNeed){if(X=this.fillLast(P),X===void 0)return"";B=this.lastNeed,this.lastNeed=0}else B=0;return B<P.length?X?X+this.text(P,B):this.text(P,B):X||""},g.prototype.end=E,g.prototype.text=y,g.prototype.fillLast=function(P){if(this.lastNeed<=P.length)return P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,this.lastTotal-this.lastNeed,0,P.length),this.lastNeed-=P.length};function w(P){return P<=127?0:P>>5===6?2:P>>4===14?3:P>>3===30?4:P>>6===2?-1:-2}function c(P,X,B){var k=X.length-1;if(k<B)return 0;var D=w(X[k]);return D>=0?(D>0&&(P.lastNeed=D-1),D):--k<B||D===-2?0:(D=w(X[k]),D>=0?(D>0&&(P.lastNeed=D-2),D):--k<B||D===-2?0:(D=w(X[k]),D>=0?(D>0&&(D===2?D=0:P.lastNeed=D-3),D):0))}function m(P,X,B){if((X[0]&192)!==128)return P.lastNeed=0,"\uFFFD";if(P.lastNeed>1&&X.length>1){if((X[1]&192)!==128)return P.lastNeed=1,"\uFFFD";if(P.lastNeed>2&&X.length>2&&(X[2]&192)!==128)return P.lastNeed=2,"\uFFFD"}}function v(P){var X=this.lastTotal-this.lastNeed,B=m(this,P,X);if(B!==void 0)return B;if(this.lastNeed<=P.length)return P.copy(this.lastChar,X,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);P.copy(this.lastChar,X,0,P.length),this.lastNeed-=P.length}function y(P,X){var B=c(this,P,X);if(!this.lastNeed)return P.toString("utf8",X);this.lastTotal=B;var k=P.length-(B-this.lastNeed);return P.copy(this.lastChar,0,k),P.toString("utf8",X,k)}function E(P){var X=P&&P.length?this.write(P):"";return this.lastNeed?X+"\uFFFD":X}function T(P,X){if((P.length-X)%2===0){var B=P.toString("utf16le",X);if(B){var k=B.charCodeAt(B.length-1);if(k>=55296&&k<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1],B.slice(0,-1)}return B}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=P[P.length-1],P.toString("utf16le",X,P.length-1)}function S(P){var X=P&&P.length?this.write(P):"";if(this.lastNeed){var B=this.lastTotal-this.lastNeed;return X+this.lastChar.toString("utf16le",0,B)}return X}function C(P,X){var B=(P.length-X)%3;return B===0?P.toString("base64",X):(this.lastNeed=3-B,this.lastTotal=3,B===1?this.lastChar[0]=P[P.length-1]:(this.lastChar[0]=P[P.length-2],this.lastChar[1]=P[P.length-1]),P.toString("base64",X,P.length-B))}function x(P){var X=P&&P.length?this.write(P):"";return this.lastNeed?X+this.lastChar.toString("base64",0,3-this.lastNeed):X}function O(P){return P.toString(this.encoding)}function J(P){return P&&P.length?this.write(P):""}},{"safe-buffer":396}],414:[function(o,_,j){(function(h,d){(function(){var p=o("process/browser.js").nextTick,b=Function.prototype.apply,g=Array.prototype.slice,w={},c=0;j.setTimeout=function(){return new m(b.call(setTimeout,window,arguments),clearTimeout)},j.setInterval=function(){return new m(b.call(setInterval,window,arguments),clearInterval)},j.clearTimeout=j.clearInterval=function(v){v.close()};function m(v,y){this._id=v,this._clearFn=y}m.prototype.unref=m.prototype.ref=function(){},m.prototype.close=function(){this._clearFn.call(window,this._id)},j.enroll=function(v,y){clearTimeout(v._idleTimeoutId),v._idleTimeout=y},j.unenroll=function(v){clearTimeout(v._idleTimeoutId),v._idleTimeout=-1},j._unrefActive=j.active=function(v){clearTimeout(v._idleTimeoutId);var y=v._idleTimeout;y>=0&&(v._idleTimeoutId=setTimeout(function(){v._onTimeout&&v._onTimeout()},y))},j.setImmediate=typeof h=="function"?h:function(v){var y=c++,E=arguments.length<2?!1:g.call(arguments,1);return w[y]=!0,p(function(){w[y]&&(E?v.apply(null,E):v.call(null),j.clearImmediate(y))}),y},j.clearImmediate=typeof d=="function"?d:function(v){delete w[v]}}).call(this)}).call(this,o("timers").setImmediate,o("timers").clearImmediate)},{"process/browser.js":381,timers:414}],415:[function(o,_,j){var h=o("buffer").Buffer;_.exports=function(d){if(d instanceof Uint8Array){if(d.byteOffset===0&&d.byteLength===d.buffer.byteLength)return d.buffer;if(typeof d.buffer.slice=="function")return d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength)}if(h.isBuffer(d)){for(var p=new Uint8Array(d.length),b=d.length,g=0;g<b;g++)p[g]=d[g];return p.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:90}],416:[function(o,_,j){(function(h){(function(){_.exports=d;function d(b,g){if(p("noDeprecation"))return b;var w=!1;function c(){if(!w){if(p("throwDeprecation"))throw new Error(g);p("traceDeprecation")?console.trace(g):console.warn(g),w=!0}return b.apply(this,arguments)}return c}function p(b){try{if(!h.localStorage)return!1}catch(w){return!1}var g=h.localStorage[b];return g==null?!1:String(g).toLowerCase()==="true"}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],417:[function(o,_,j){arguments[4][84][0].apply(j,arguments)},{dup:84}],418:[function(o,_,j){"use strict";var h=o("is-arguments"),d=o("is-generator-function"),p=o("which-typed-array"),b=o("is-typed-array");function g(ce){return ce.call.bind(ce)}var w=typeof BigInt!="undefined",c=typeof Symbol!="undefined",m=g(Object.prototype.toString),v=g(Number.prototype.valueOf),y=g(String.prototype.valueOf),E=g(Boolean.prototype.valueOf);if(w)var T=g(BigInt.prototype.valueOf);if(c)var S=g(Symbol.prototype.valueOf);function C(ce,Ce){if(typeof ce!="object")return!1;try{return Ce(ce),!0}catch(Ue){return!1}}j.isArgumentsObject=h,j.isGeneratorFunction=d,j.isTypedArray=b;function x(ce){return typeof Promise!="undefined"&&ce instanceof Promise||ce!==null&&typeof ce=="object"&&typeof ce.then=="function"&&typeof ce.catch=="function"}j.isPromise=x;function O(ce){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(ce):b(ce)||ue(ce)}j.isArrayBufferView=O;function J(ce){return p(ce)==="Uint8Array"}j.isUint8Array=J;function P(ce){return p(ce)==="Uint8ClampedArray"}j.isUint8ClampedArray=P;function X(ce){return p(ce)==="Uint16Array"}j.isUint16Array=X;function B(ce){return p(ce)==="Uint32Array"}j.isUint32Array=B;function k(ce){return p(ce)==="Int8Array"}j.isInt8Array=k;function D(ce){return p(ce)==="Int16Array"}j.isInt16Array=D;function L(ce){return p(ce)==="Int32Array"}j.isInt32Array=L;function q(ce){return p(ce)==="Float32Array"}j.isFloat32Array=q;function G(ce){return p(ce)==="Float64Array"}j.isFloat64Array=G;function F(ce){return p(ce)==="BigInt64Array"}j.isBigInt64Array=F;function N(ce){return p(ce)==="BigUint64Array"}j.isBigUint64Array=N;function K(ce){return m(ce)==="[object Map]"}K.working=typeof Map!="undefined"&&K(new Map);function re(ce){return typeof Map=="undefined"?!1:K.working?K(ce):ce instanceof Map}j.isMap=re;function ne(ce){return m(ce)==="[object Set]"}ne.working=typeof Set!="undefined"&&ne(new Set);function pe(ce){return typeof Set=="undefined"?!1:ne.working?ne(ce):ce instanceof Set}j.isSet=pe;function ie(ce){return m(ce)==="[object WeakMap]"}ie.working=typeof WeakMap!="undefined"&&ie(new WeakMap);function Ae(ce){return typeof WeakMap=="undefined"?!1:ie.working?ie(ce):ce instanceof WeakMap}j.isWeakMap=Ae;function Y(ce){return m(ce)==="[object WeakSet]"}Y.working=typeof WeakSet!="undefined"&&Y(new WeakSet);function fe(ce){return Y(ce)}j.isWeakSet=fe;function ve(ce){return m(ce)==="[object ArrayBuffer]"}ve.working=typeof ArrayBuffer!="undefined"&&ve(new ArrayBuffer);function be(ce){return typeof ArrayBuffer=="undefined"?!1:ve.working?ve(ce):ce instanceof ArrayBuffer}j.isArrayBuffer=be;function le(ce){return m(ce)==="[object DataView]"}le.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&le(new DataView(new ArrayBuffer(1),0,1));function ue(ce){return typeof DataView=="undefined"?!1:le.working?le(ce):ce instanceof DataView}j.isDataView=ue;var ge=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function Ee(ce){return m(ce)==="[object SharedArrayBuffer]"}function ke(ce){return typeof ge=="undefined"?!1:(typeof Ee.working=="undefined"&&(Ee.working=Ee(new ge)),Ee.working?Ee(ce):ce instanceof ge)}j.isSharedArrayBuffer=ke;function Ie(ce){return m(ce)==="[object AsyncFunction]"}j.isAsyncFunction=Ie;function de(ce){return m(ce)==="[object Map Iterator]"}j.isMapIterator=de;function Z(ce){return m(ce)==="[object Set Iterator]"}j.isSetIterator=Z;function ye(ce){return m(ce)==="[object Generator]"}j.isGeneratorObject=ye;function V(ce){return m(ce)==="[object WebAssembly.Module]"}j.isWebAssemblyCompiledModule=V;function Q(ce){return C(ce,v)}j.isNumberObject=Q;function U(ce){return C(ce,y)}j.isStringObject=U;function H(ce){return C(ce,E)}j.isBooleanObject=H;function ee(ce){return w&&C(ce,T)}j.isBigIntObject=ee;function W(ce){return c&&C(ce,S)}j.isSymbolObject=W;function M(ce){return Q(ce)||U(ce)||H(ce)||ee(ce)||W(ce)}j.isBoxedPrimitive=M;function $(ce){return typeof Uint8Array!="undefined"&&(be(ce)||ke(ce))}j.isAnyArrayBuffer=$,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ce){Object.defineProperty(j,ce,{enumerable:!1,value:function(){throw new Error(ce+" is not supported in userland")}})})},{"is-arguments":365,"is-generator-function":368,"is-typed-array":369,"which-typed-array":420}],419:[function(o,_,j){(function(h){(function(){var d=Object.getOwnPropertyDescriptors||function(ge){for(var Ee=Object.keys(ge),ke={},Ie=0;Ie<Ee.length;Ie++)ke[Ee[Ie]]=Object.getOwnPropertyDescriptor(ge,Ee[Ie]);return ke},p=/%[sdj%]/g;j.format=function(ue){if(!D(ue)){for(var ge=[],Ee=0;Ee<arguments.length;Ee++)ge.push(c(arguments[Ee]));return ge.join(" ")}for(var Ee=1,ke=arguments,Ie=ke.length,de=String(ue).replace(p,function(ye){if(ye==="%%")return"%";if(Ee>=Ie)return ye;switch(ye){case"%s":return String(ke[Ee++]);case"%d":return Number(ke[Ee++]);case"%j":try{return JSON.stringify(ke[Ee++])}catch(V){return"[Circular]"}default:return ye}}),Z=ke[Ee];Ee<Ie;Z=ke[++Ee])X(Z)||!F(Z)?de+=" "+Z:de+=" "+c(Z);return de},j.deprecate=function(ue,ge){if(typeof h!="undefined"&&h.noDeprecation===!0)return ue;if(typeof h=="undefined")return function(){return j.deprecate(ue,ge).apply(this,arguments)};var Ee=!1;function ke(){if(!Ee){if(h.throwDeprecation)throw new Error(ge);h.traceDeprecation?console.trace(ge):console.error(ge),Ee=!0}return ue.apply(this,arguments)}return ke};var b={},g=/^$/;if(h.env.NODE_DEBUG){var w=h.env.NODE_DEBUG;w=w.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),g=new RegExp("^"+w+"$","i")}j.debuglog=function(ue){if(ue=ue.toUpperCase(),!b[ue])if(g.test(ue)){var ge=h.pid;b[ue]=function(){var Ee=j.format.apply(j,arguments);console.error("%s %d: %s",ue,ge,Ee)}}else b[ue]=function(){};return b[ue]};function c(ue,ge){var Ee={seen:[],stylize:v};return arguments.length>=3&&(Ee.depth=arguments[2]),arguments.length>=4&&(Ee.colors=arguments[3]),P(ge)?Ee.showHidden=ge:ge&&j._extend(Ee,ge),q(Ee.showHidden)&&(Ee.showHidden=!1),q(Ee.depth)&&(Ee.depth=2),q(Ee.colors)&&(Ee.colors=!1),q(Ee.customInspect)&&(Ee.customInspect=!0),Ee.colors&&(Ee.stylize=m),E(Ee,ue,Ee.depth)}j.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function m(ue,ge){var Ee=c.styles[ge];return Ee?"\x1B["+c.colors[Ee][0]+"m"+ue+"\x1B["+c.colors[Ee][1]+"m":ue}function v(ue,ge){return ue}function y(ue){var ge={};return ue.forEach(function(Ee,ke){ge[Ee]=!0}),ge}function E(ue,ge,Ee){if(ue.customInspect&&ge&&re(ge.inspect)&&ge.inspect!==j.inspect&&!(ge.constructor&&ge.constructor.prototype===ge)){var ke=ge.inspect(Ee,ue);return D(ke)||(ke=E(ue,ke,Ee)),ke}var Ie=T(ue,ge);if(Ie)return Ie;var de=Object.keys(ge),Z=y(de);if(ue.showHidden&&(de=Object.getOwnPropertyNames(ge)),K(ge)&&(de.indexOf("message")>=0||de.indexOf("description")>=0))return S(ge);if(de.length===0){if(re(ge)){var ye=ge.name?": "+ge.name:"";return ue.stylize("[Function"+ye+"]","special")}if(G(ge))return ue.stylize(RegExp.prototype.toString.call(ge),"regexp");if(N(ge))return ue.stylize(Date.prototype.toString.call(ge),"date");if(K(ge))return S(ge)}var V="",Q=!1,U=["{","}"];if(J(ge)&&(Q=!0,U=["[","]"]),re(ge)){var H=ge.name?": "+ge.name:"";V=" [Function"+H+"]"}if(G(ge)&&(V=" "+RegExp.prototype.toString.call(ge)),N(ge)&&(V=" "+Date.prototype.toUTCString.call(ge)),K(ge)&&(V=" "+S(ge)),de.length===0&&(!Q||ge.length==0))return U[0]+V+U[1];if(Ee<0)return G(ge)?ue.stylize(RegExp.prototype.toString.call(ge),"regexp"):ue.stylize("[Object]","special");ue.seen.push(ge);var ee;return Q?ee=C(ue,ge,Ee,Z,de):ee=de.map(function(W){return x(ue,ge,Ee,Z,W,Q)}),ue.seen.pop(),O(ee,V,U)}function T(ue,ge){if(q(ge))return ue.stylize("undefined","undefined");if(D(ge)){var Ee="'"+JSON.stringify(ge).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ue.stylize(Ee,"string")}if(k(ge))return ue.stylize(""+ge,"number");if(P(ge))return ue.stylize(""+ge,"boolean");if(X(ge))return ue.stylize("null","null")}function S(ue){return"["+Error.prototype.toString.call(ue)+"]"}function C(ue,ge,Ee,ke,Ie){for(var de=[],Z=0,ye=ge.length;Z<ye;++Z)fe(ge,String(Z))?de.push(x(ue,ge,Ee,ke,String(Z),!0)):de.push("");return Ie.forEach(function(V){V.match(/^\d+$/)||de.push(x(ue,ge,Ee,ke,V,!0))}),de}function x(ue,ge,Ee,ke,Ie,de){var Z,ye,V;if(V=Object.getOwnPropertyDescriptor(ge,Ie)||{value:ge[Ie]},V.get?V.set?ye=ue.stylize("[Getter/Setter]","special"):ye=ue.stylize("[Getter]","special"):V.set&&(ye=ue.stylize("[Setter]","special")),fe(ke,Ie)||(Z="["+Ie+"]"),ye||(ue.seen.indexOf(V.value)<0?(X(Ee)?ye=E(ue,V.value,null):ye=E(ue,V.value,Ee-1),ye.indexOf(`
|
|
`)>-1&&(de?ye=ye.split(`
|
|
`).map(function(Q){return" "+Q}).join(`
|
|
`).slice(2):ye=`
|
|
`+ye.split(`
|
|
`).map(function(Q){return" "+Q}).join(`
|
|
`))):ye=ue.stylize("[Circular]","special")),q(Z)){if(de&&Ie.match(/^\d+$/))return ye;Z=JSON.stringify(""+Ie),Z.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Z=Z.slice(1,-1),Z=ue.stylize(Z,"name")):(Z=Z.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Z=ue.stylize(Z,"string"))}return Z+": "+ye}function O(ue,ge,Ee){var ke=0,Ie=ue.reduce(function(de,Z){return ke++,Z.indexOf(`
|
|
`)>=0&&ke++,de+Z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Ie>60?Ee[0]+(ge===""?"":ge+`
|
|
`)+" "+ue.join(`,
|
|
`)+" "+Ee[1]:Ee[0]+ge+" "+ue.join(", ")+" "+Ee[1]}j.types=o("./support/types");function J(ue){return Array.isArray(ue)}j.isArray=J;function P(ue){return typeof ue=="boolean"}j.isBoolean=P;function X(ue){return ue===null}j.isNull=X;function B(ue){return ue==null}j.isNullOrUndefined=B;function k(ue){return typeof ue=="number"}j.isNumber=k;function D(ue){return typeof ue=="string"}j.isString=D;function L(ue){return typeof ue=="symbol"}j.isSymbol=L;function q(ue){return ue===void 0}j.isUndefined=q;function G(ue){return F(ue)&&pe(ue)==="[object RegExp]"}j.isRegExp=G,j.types.isRegExp=G;function F(ue){return typeof ue=="object"&&ue!==null}j.isObject=F;function N(ue){return F(ue)&&pe(ue)==="[object Date]"}j.isDate=N,j.types.isDate=N;function K(ue){return F(ue)&&(pe(ue)==="[object Error]"||ue instanceof Error)}j.isError=K,j.types.isNativeError=K;function re(ue){return typeof ue=="function"}j.isFunction=re;function ne(ue){return ue===null||typeof ue=="boolean"||typeof ue=="number"||typeof ue=="string"||typeof ue=="symbol"||typeof ue=="undefined"}j.isPrimitive=ne,j.isBuffer=o("./support/isBuffer");function pe(ue){return Object.prototype.toString.call(ue)}function ie(ue){return ue<10?"0"+ue.toString(10):ue.toString(10)}var Ae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Y(){var ue=new Date,ge=[ie(ue.getHours()),ie(ue.getMinutes()),ie(ue.getSeconds())].join(":");return[ue.getDate(),Ae[ue.getMonth()],ge].join(" ")}j.log=function(){console.log("%s - %s",Y(),j.format.apply(j,arguments))},j.inherits=o("inherits"),j._extend=function(ue,ge){if(!ge||!F(ge))return ue;for(var Ee=Object.keys(ge),ke=Ee.length;ke--;)ue[Ee[ke]]=ge[Ee[ke]];return ue};function fe(ue,ge){return Object.prototype.hasOwnProperty.call(ue,ge)}var ve=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;j.promisify=function(ge){if(typeof ge!="function")throw new TypeError('The "original" argument must be of type Function');if(ve&&ge[ve]){var Ee=ge[ve];if(typeof Ee!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Ee,ve,{value:Ee,enumerable:!1,writable:!1,configurable:!0}),Ee}function Ee(){for(var ke,Ie,de=new Promise(function(V,Q){ke=V,Ie=Q}),Z=[],ye=0;ye<arguments.length;ye++)Z.push(arguments[ye]);Z.push(function(V,Q){V?Ie(V):ke(Q)});try{ge.apply(this,Z)}catch(V){Ie(V)}return de}return Object.setPrototypeOf(Ee,Object.getPrototypeOf(ge)),ve&&Object.defineProperty(Ee,ve,{value:Ee,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(Ee,d(ge))},j.promisify.custom=ve;function be(ue,ge){if(!ue){var Ee=new Error("Promise was rejected with a falsy value");Ee.reason=ue,ue=Ee}return ge(ue)}function le(ue){if(typeof ue!="function")throw new TypeError('The "original" argument must be of type Function');function ge(){for(var Ee=[],ke=0;ke<arguments.length;ke++)Ee.push(arguments[ke]);var Ie=Ee.pop();if(typeof Ie!="function")throw new TypeError("The last argument must be of type Function");var de=this,Z=function(){return Ie.apply(de,arguments)};ue.apply(this,Ee).then(function(ye){h.nextTick(Z.bind(null,null,ye))},function(ye){h.nextTick(be.bind(null,ye,Z))})}return Object.setPrototypeOf(ge,Object.getPrototypeOf(ue)),Object.defineProperties(ge,d(ue)),ge}j.callbackify=le}).call(this)}).call(this,o("_process"))},{"./support/isBuffer":417,"./support/types":418,_process:467,inherits:364}],420:[function(o,_,j){(function(h){(function(){"use strict";var d=o("for-each"),p=o("available-typed-arrays"),b=o("call-bind"),g=o("call-bind/callBound"),w=o("gopd"),c=g("Object.prototype.toString"),m=o("has-tostringtag/shams")(),v=typeof globalThis=="undefined"?h:globalThis,y=p(),E=g("String.prototype.slice"),T=Object.getPrototypeOf,S=g("Array.prototype.indexOf",!0)||function(P,X){for(var B=0;B<P.length;B+=1)if(P[B]===X)return B;return-1},C={__proto__:null};m&&w&&T?d(y,function(J){var P=new v[J];if(Symbol.toStringTag in P){var X=T(P),B=w(X,Symbol.toStringTag);if(!B){var k=T(X);B=w(k,Symbol.toStringTag)}C["$"+J]=b(B.get)}}):d(y,function(J){var P=new v[J];C["$"+J]=b(P.slice)});var x=function(P){var X=!1;return d(C,function(B,k){if(!X)try{"$"+B(P)===k&&(X=E(k,1))}catch(D){}}),X},O=function(P){var X=!1;return d(C,function(B,k){if(!X)try{B(P),X=E(k,1)}catch(D){}}),X};_.exports=function(P){if(!P||typeof P!="object")return!1;if(!m){var X=E(c(P),8,-1);return S(y,X)>-1?X:X!=="Object"?!1:O(P)}return w?x(P):null}}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"available-typed-arrays":86,"call-bind":93,"call-bind/callBound":92,"for-each":345,gopd:349,"has-tostringtag/shams":353}],421:[function(o,_,j){(function(){"use strict";j.stripBOM=function(h){return h[0]==="\uFEFF"?h.substring(1):h}}).call(this)},{}],422:[function(o,_,j){(function(){"use strict";var h,d,p,b,g,w={}.hasOwnProperty;h=o("xmlbuilder"),d=o("./defaults").defaults,b=function(c){return typeof c=="string"&&(c.indexOf("&")>=0||c.indexOf(">")>=0||c.indexOf("<")>=0)},g=function(c){return"<![CDATA["+p(c)+"]]>"},p=function(c){return c.replace("]]>","]]]]><![CDATA[>")},j.Builder=function(){function c(m){var v,y,E;this.options={},y=d["0.2"];for(v in y)w.call(y,v)&&(E=y[v],this.options[v]=E);for(v in m)w.call(m,v)&&(E=m[v],this.options[v]=E)}return c.prototype.buildObject=function(m){var v,y,E,T,S;return v=this.options.attrkey,y=this.options.charkey,Object.keys(m).length===1&&this.options.rootName===d["0.2"].rootName?(S=Object.keys(m)[0],m=m[S]):S=this.options.rootName,E=function(C){return function(x,O){var J,P,X,B,k,D;if(typeof O!="object")C.options.cdata&&b(O)?x.raw(g(O)):x.txt(O);else if(Array.isArray(O)){for(B in O)if(w.call(O,B)){P=O[B];for(k in P)X=P[k],x=E(x.ele(k),X).up()}}else for(k in O)if(w.call(O,k))if(P=O[k],k===v){if(typeof P=="object")for(J in P)D=P[J],x=x.att(J,D)}else if(k===y)C.options.cdata&&b(P)?x=x.raw(g(P)):x=x.txt(P);else if(Array.isArray(P))for(B in P)w.call(P,B)&&(X=P[B],typeof X=="string"?C.options.cdata&&b(X)?x=x.ele(k).raw(g(X)).up():x=x.ele(k,X).up():x=E(x.ele(k),X).up());else typeof P=="object"?x=E(x.ele(k),P).up():typeof P=="string"&&C.options.cdata&&b(P)?x=x.ele(k).raw(g(P)).up():(P==null&&(P=""),x=x.ele(k,P.toString()).up());return x}}(this),T=h.create(S,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),E(T,m).end(this.options.renderOpts)},c}()}).call(this)},{"./defaults":423,xmlbuilder:459}],423:[function(o,_,j){(function(){j.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},{}],424:[function(o,_,j){(function(){"use strict";var h,d,p,b,g,w,c,m,v,y=function(S,C){return function(){return S.apply(C,arguments)}},E=function(S,C){for(var x in C)T.call(C,x)&&(S[x]=C[x]);function O(){this.constructor=S}return O.prototype=C.prototype,S.prototype=new O,S.__super__=C.prototype,S},T={}.hasOwnProperty;m=o("sax"),b=o("events"),h=o("./bom"),c=o("./processors"),v=o("timers").setImmediate,d=o("./defaults").defaults,g=function(S){return typeof S=="object"&&S!=null&&Object.keys(S).length===0},w=function(S,C,x){var O,J,P;for(O=0,J=S.length;O<J;O++)P=S[O],C=P(C,x);return C},p=function(S,C,x){var O;return O=Object.create(null),O.value=x,O.writable=!0,O.enumerable=!0,O.configurable=!0,Object.defineProperty(S,C,O)},j.Parser=function(S){E(C,S);function C(x){this.parseStringPromise=y(this.parseStringPromise,this),this.parseString=y(this.parseString,this),this.reset=y(this.reset,this),this.assignOrPush=y(this.assignOrPush,this),this.processAsync=y(this.processAsync,this);var O,J,P;if(!(this instanceof j.Parser))return new j.Parser(x);this.options={},J=d["0.2"];for(O in J)T.call(J,O)&&(P=J[O],this.options[O]=P);for(O in x)T.call(x,O)&&(P=x[O],this.options[O]=P);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(c.normalize)),this.reset()}return C.prototype.processAsync=function(){var x,O;try{return this.remaining.length<=this.options.chunkSize?(x=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(x),this.saxParser.close()):(x=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(x),v(this.processAsync))}catch(J){if(O=J,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(O)}},C.prototype.assignOrPush=function(x,O,J){return O in x?(x[O]instanceof Array||p(x,O,[x[O]]),x[O].push(J)):this.options.explicitArray?p(x,O,[J]):p(x,O,J)},C.prototype.reset=function(){var x,O,J,P;return this.removeAllListeners(),this.saxParser=m.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(X){return function(B){if(X.saxParser.resume(),!X.saxParser.errThrown)return X.saxParser.errThrown=!0,X.emit("error",B)}}(this),this.saxParser.onend=function(X){return function(){if(!X.saxParser.ended)return X.saxParser.ended=!0,X.emit("end",X.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,P=[],x=this.options.attrkey,O=this.options.charkey,this.saxParser.onopentag=function(X){return function(B){var k,D,L,q,G;if(L={},L[O]="",!X.options.ignoreAttrs){G=B.attributes;for(k in G)T.call(G,k)&&(!(x in L)&&!X.options.mergeAttrs&&(L[x]={}),D=X.options.attrValueProcessors?w(X.options.attrValueProcessors,B.attributes[k],k):B.attributes[k],q=X.options.attrNameProcessors?w(X.options.attrNameProcessors,k):k,X.options.mergeAttrs?X.assignOrPush(L,q,D):p(L[x],q,D))}return L["#name"]=X.options.tagNameProcessors?w(X.options.tagNameProcessors,B.name):B.name,X.options.xmlns&&(L[X.options.xmlnskey]={uri:B.uri,local:B.local}),P.push(L)}}(this),this.saxParser.onclosetag=function(X){return function(){var B,k,D,L,q,G,F,N,K,re;if(G=P.pop(),q=G["#name"],(!X.options.explicitChildren||!X.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(B=G.cdata,delete G.cdata),K=P[P.length-1],G[O].match(/^\s*$/)&&!B?(k=G[O],delete G[O]):(X.options.trim&&(G[O]=G[O].trim()),X.options.normalize&&(G[O]=G[O].replace(/\s{2,}/g," ").trim()),G[O]=X.options.valueProcessors?w(X.options.valueProcessors,G[O],q):G[O],Object.keys(G).length===1&&O in G&&!X.EXPLICIT_CHARKEY&&(G=G[O])),g(G)&&(typeof X.options.emptyTag=="function"?G=X.options.emptyTag():G=X.options.emptyTag!==""?X.options.emptyTag:k),X.options.validator!=null&&(re="/"+function(){var ne,pe,ie;for(ie=[],ne=0,pe=P.length;ne<pe;ne++)L=P[ne],ie.push(L["#name"]);return ie}().concat(q).join("/"),function(){var ne;try{return G=X.options.validator(re,K&&K[q],G)}catch(pe){return ne=pe,X.emit("error",ne)}}()),X.options.explicitChildren&&!X.options.mergeAttrs&&typeof G=="object"){if(!X.options.preserveChildrenOrder)L={},X.options.attrkey in G&&(L[X.options.attrkey]=G[X.options.attrkey],delete G[X.options.attrkey]),!X.options.charsAsChildren&&X.options.charkey in G&&(L[X.options.charkey]=G[X.options.charkey],delete G[X.options.charkey]),Object.getOwnPropertyNames(G).length>0&&(L[X.options.childkey]=G),G=L;else if(K){K[X.options.childkey]=K[X.options.childkey]||[],F={};for(D in G)T.call(G,D)&&p(F,D,G[D]);K[X.options.childkey].push(F),delete G["#name"],Object.keys(G).length===1&&O in G&&!X.EXPLICIT_CHARKEY&&(G=G[O])}}return P.length>0?X.assignOrPush(K,q,G):(X.options.explicitRoot&&(N=G,G={},p(G,q,N)),X.resultObject=G,X.saxParser.ended=!0,X.emit("end",X.resultObject))}}(this),J=function(X){return function(B){var k,D;if(D=P[P.length-1],D)return D[O]+=B,X.options.explicitChildren&&X.options.preserveChildrenOrder&&X.options.charsAsChildren&&(X.options.includeWhiteChars||B.replace(/\\n/g,"").trim()!=="")&&(D[X.options.childkey]=D[X.options.childkey]||[],k={"#name":"__text__"},k[O]=B,X.options.normalize&&(k[O]=k[O].replace(/\s{2,}/g," ").trim()),D[X.options.childkey].push(k)),D}}(this),this.saxParser.ontext=J,this.saxParser.oncdata=function(X){return function(B){var k;if(k=J(B),k)return k.cdata=!0}}(this)},C.prototype.parseString=function(x,O){var J;O!=null&&typeof O=="function"&&(this.on("end",function(P){return this.reset(),O(null,P)}),this.on("error",function(P){return this.reset(),O(P)}));try{return x=x.toString(),x.trim()===""?(this.emit("end",null),!0):(x=h.stripBOM(x),this.options.async?(this.remaining=x,v(this.processAsync),this.saxParser):this.saxParser.write(x).close())}catch(P){if(J=P,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw J}else return this.emit("error",J),this.saxParser.errThrown=!0}},C.prototype.parseStringPromise=function(x){return new Promise(function(O){return function(J,P){return O.parseString(x,function(X,B){return X?P(X):J(B)})}}(this))},C}(b),j.parseString=function(S,C,x){var O,J,P;return x!=null?(typeof x=="function"&&(O=x),typeof C=="object"&&(J=C)):(typeof C=="function"&&(O=C),J={}),P=new j.Parser(J),P.parseString(S,O)},j.parseStringPromise=function(S,C){var x,O;return typeof C=="object"&&(x=C),O=new j.Parser(x),O.parseStringPromise(S)}}).call(this)},{"./bom":421,"./defaults":423,"./processors":425,events:344,sax:397,timers:414}],425:[function(o,_,j){(function(){"use strict";var h;h=new RegExp(/(?!xmlns)^.*:/),j.normalize=function(d){return d.toLowerCase()},j.firstCharLowerCase=function(d){return d.charAt(0).toLowerCase()+d.slice(1)},j.stripPrefix=function(d){return d.replace(h,"")},j.parseNumbers=function(d){return isNaN(d)||(d=d%1===0?parseInt(d,10):parseFloat(d)),d},j.parseBooleans=function(d){return/^(?:true|false)$/i.test(d)&&(d=d.toLowerCase()==="true"),d}}).call(this)},{}],426:[function(o,_,j){(function(){"use strict";var h,d,p,b,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function y(){this.constructor=c}return y.prototype=m.prototype,c.prototype=new y,c.__super__=m.prototype,c},w={}.hasOwnProperty;d=o("./defaults"),h=o("./builder"),p=o("./parser"),b=o("./processors"),j.defaults=d.defaults,j.processors=b,j.ValidationError=function(c){g(m,c);function m(v){this.message=v}return m}(Error),j.Builder=h.Builder,j.Parser=p.Parser,j.parseString=p.parseString,j.parseStringPromise=p.parseStringPromise}).call(this)},{"./builder":422,"./defaults":423,"./parser":424,"./processors":425}],427:[function(o,_,j){(function(){_.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(this)},{}],428:[function(o,_,j){(function(){_.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},{}],429:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m=[].slice,v={}.hasOwnProperty;h=function(){var y,E,T,S,C,x;if(x=arguments[0],C=2<=arguments.length?m.call(arguments,1):[],g(Object.assign))Object.assign.apply(null,arguments);else for(y=0,T=C.length;y<T;y++)if(S=C[y],S!=null)for(E in S)v.call(S,E)&&(x[E]=S[E]);return x},g=function(y){return!!y&&Object.prototype.toString.call(y)==="[object Function]"},w=function(y){var E;return!!y&&((E=typeof y)=="function"||E==="object")},p=function(y){return g(Array.isArray)?Array.isArray(y):Object.prototype.toString.call(y)==="[object Array]"},b=function(y){var E;if(p(y))return!y.length;for(E in y)if(v.call(y,E))return!1;return!0},c=function(y){var E,T;return w(y)&&(T=Object.getPrototypeOf(y))&&(E=T.constructor)&&typeof E=="function"&&E instanceof E&&Function.prototype.toString.call(E)===Function.prototype.toString.call(Object)},d=function(y){return g(y.valueOf)?y.valueOf():y},_.exports.assign=h,_.exports.isFunction=g,_.exports.isObject=w,_.exports.isArray=p,_.exports.isEmpty=b,_.exports.isPlainObject=c,_.exports.getValue=d}).call(this)},{}],430:[function(o,_,j){(function(){_.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},{}],431:[function(o,_,j){(function(){var h,d,p;h=o("./NodeType"),p=o("./XMLNode"),_.exports=d=function(){function b(g,w,c){if(this.parent=g,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),w==null)throw new Error("Missing attribute name. "+this.debugInfo(w));this.name=this.stringify.name(w),this.value=this.stringify.attValue(c),this.type=h.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(b.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(b.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(b.prototype,"textContent",{get:function(){return this.value},set:function(g){return this.value=g||""}}),Object.defineProperty(b.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(b.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(b.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(b.prototype,"specified",{get:function(){return!0}}),b.prototype.clone=function(){return Object.create(this)},b.prototype.toString=function(g){return this.options.writer.attribute(this,this.options.writer.filterOptions(g))},b.prototype.debugInfo=function(g){return g=g||this.name,g==null?"parent: <"+this.parent.name+">":"attribute: {"+g+"}, parent: <"+this.parent.name+">"},b.prototype.isEqualNode=function(g){return!(g.namespaceURI!==this.namespaceURI||g.prefix!==this.prefix||g.localName!==this.localName||g.value!==this.value)},b}()}).call(this)},{"./NodeType":428,"./XMLNode":450}],432:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./NodeType"),p=o("./XMLCharacterData"),_.exports=d=function(w){b(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=h.CData,this.value=this.stringify.cdata(v)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.cdata(this,this.options.writer.filterOptions(m))},c}(p)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],433:[function(o,_,j){(function(){var h,d,p=function(g,w){for(var c in w)b.call(w,c)&&(g[c]=w[c]);function m(){this.constructor=g}return m.prototype=w.prototype,g.prototype=new m,g.__super__=w.prototype,g},b={}.hasOwnProperty;d=o("./XMLNode"),_.exports=h=function(g){p(w,g);function w(c){w.__super__.constructor.call(this,c),this.value=""}return Object.defineProperty(w.prototype,"data",{get:function(){return this.value},set:function(c){return this.value=c||""}}),Object.defineProperty(w.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(w.prototype,"textContent",{get:function(){return this.value},set:function(c){return this.value=c||""}}),w.prototype.clone=function(){return Object.create(this)},w.prototype.substringData=function(c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.appendData=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.insertData=function(c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.deleteData=function(c,m){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.replaceData=function(c,m,v){throw new Error("This DOM method is not implemented."+this.debugInfo())},w.prototype.isEqualNode=function(c){return!(!w.__super__.isEqualNode.apply(this,arguments).isEqualNode(c)||c.data!==this.data)},w}(d)}).call(this)},{"./XMLNode":450}],434:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./NodeType"),d=o("./XMLCharacterData"),_.exports=p=function(w){b(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=h.Comment,this.value=this.stringify.comment(v)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.comment(this,this.options.writer.filterOptions(m))},c}(d)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],435:[function(o,_,j){(function(){var h,d,p;d=o("./XMLDOMErrorHandler"),p=o("./XMLDOMStringList"),_.exports=h=function(){function b(){var g;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new d,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=g=Object.create(this.defaultParams)}return Object.defineProperty(b.prototype,"parameterNames",{get:function(){return new p(Object.keys(this.defaultParams))}}),b.prototype.getParameter=function(g){return this.params.hasOwnProperty(g)?this.params[g]:null},b.prototype.canSetParameter=function(g,w){return!0},b.prototype.setParameter=function(g,w){return w!=null?this.params[g]=w:delete this.params[g]},b}()}).call(this)},{"./XMLDOMErrorHandler":436,"./XMLDOMStringList":438}],436:[function(o,_,j){(function(){var h;_.exports=h=function(){function d(){}return d.prototype.handleError=function(p){throw new Error(p)},d}()}).call(this)},{}],437:[function(o,_,j){(function(){var h;_.exports=h=function(){function d(){}return d.prototype.hasFeature=function(p,b){return!0},d.prototype.createDocumentType=function(p,b,g){throw new Error("This DOM method is not implemented.")},d.prototype.createDocument=function(p,b,g){throw new Error("This DOM method is not implemented.")},d.prototype.createHTMLDocument=function(p){throw new Error("This DOM method is not implemented.")},d.prototype.getFeature=function(p,b){throw new Error("This DOM method is not implemented.")},d}()}).call(this)},{}],438:[function(o,_,j){(function(){var h;_.exports=h=function(){function d(p){this.arr=p||[]}return Object.defineProperty(d.prototype,"length",{get:function(){return this.arr.length}}),d.prototype.item=function(p){return this.arr[p]||null},d.prototype.contains=function(p){return this.arr.indexOf(p)!==-1},d}()}).call(this)},{}],439:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./XMLNode"),h=o("./NodeType"),_.exports=d=function(w){b(c,w);function c(m,v,y,E,T,S){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(y==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(v));if(!E)throw new Error("Missing DTD attribute type. "+this.debugInfo(v));if(!T)throw new Error("Missing DTD attribute default. "+this.debugInfo(v));if(T.indexOf("#")!==0&&(T="#"+T),!T.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(v));if(S&&!T.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(v));this.elementName=this.stringify.name(v),this.type=h.AttributeDeclaration,this.attributeName=this.stringify.name(y),this.attributeType=this.stringify.dtdAttType(E),S&&(this.defaultValue=this.stringify.dtdAttDefault(S)),this.defaultValueType=T}return c.prototype.toString=function(m){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(m))},c}(p)}).call(this)},{"./NodeType":428,"./XMLNode":450}],440:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./XMLNode"),h=o("./NodeType"),_.exports=d=function(w){b(c,w);function c(m,v,y){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing DTD element name. "+this.debugInfo());y||(y="(#PCDATA)"),Array.isArray(y)&&(y="("+y.join(",")+")"),this.name=this.stringify.name(v),this.type=h.ElementDeclaration,this.value=this.stringify.dtdElementValue(y)}return c.prototype.toString=function(m){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(m))},c}(p)}).call(this)},{"./NodeType":428,"./XMLNode":450}],441:[function(o,_,j){(function(){var h,d,p,b,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function y(){this.constructor=c}return y.prototype=m.prototype,c.prototype=new y,c.__super__=m.prototype,c},w={}.hasOwnProperty;b=o("./Utility").isObject,p=o("./XMLNode"),h=o("./NodeType"),_.exports=d=function(c){g(m,c);function m(v,y,E,T){if(m.__super__.constructor.call(this,v),E==null)throw new Error("Missing DTD entity name. "+this.debugInfo(E));if(T==null)throw new Error("Missing DTD entity value. "+this.debugInfo(E));if(this.pe=!!y,this.name=this.stringify.name(E),this.type=h.EntityDeclaration,!b(T))this.value=this.stringify.dtdEntityValue(T),this.internal=!0;else{if(!T.pubID&&!T.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(E));if(T.pubID&&!T.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(E));if(this.internal=!1,T.pubID!=null&&(this.pubID=this.stringify.dtdPubID(T.pubID)),T.sysID!=null&&(this.sysID=this.stringify.dtdSysID(T.sysID)),T.nData!=null&&(this.nData=this.stringify.dtdNData(T.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(E))}}return Object.defineProperty(m.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(m.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(m.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(m.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(m.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(m.prototype,"xmlVersion",{get:function(){return null}}),m.prototype.toString=function(v){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(v))},m}(p)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],442:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./XMLNode"),h=o("./NodeType"),_.exports=d=function(w){b(c,w);function c(m,v,y){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing DTD notation name. "+this.debugInfo(v));if(!y.pubID&&!y.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(v));this.name=this.stringify.name(v),this.type=h.NotationDeclaration,y.pubID!=null&&(this.pubID=this.stringify.dtdPubID(y.pubID)),y.sysID!=null&&(this.sysID=this.stringify.dtdSysID(y.sysID))}return Object.defineProperty(c.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(c.prototype,"systemId",{get:function(){return this.sysID}}),c.prototype.toString=function(m){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(m))},c}(p)}).call(this)},{"./NodeType":428,"./XMLNode":450}],443:[function(o,_,j){(function(){var h,d,p,b,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function y(){this.constructor=c}return y.prototype=m.prototype,c.prototype=new y,c.__super__=m.prototype,c},w={}.hasOwnProperty;b=o("./Utility").isObject,p=o("./XMLNode"),h=o("./NodeType"),_.exports=d=function(c){g(m,c);function m(v,y,E,T){var S;m.__super__.constructor.call(this,v),b(y)&&(S=y,y=S.version,E=S.encoding,T=S.standalone),y||(y="1.0"),this.type=h.Declaration,this.version=this.stringify.xmlVersion(y),E!=null&&(this.encoding=this.stringify.xmlEncoding(E)),T!=null&&(this.standalone=this.stringify.xmlStandalone(T))}return m.prototype.toString=function(v){return this.options.writer.declaration(this,this.options.writer.filterOptions(v))},m}(p)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLNode":450}],444:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m,v,y=function(T,S){for(var C in S)E.call(S,C)&&(T[C]=S[C]);function x(){this.constructor=T}return x.prototype=S.prototype,T.prototype=new x,T.__super__=S.prototype,T},E={}.hasOwnProperty;v=o("./Utility").isObject,m=o("./XMLNode"),h=o("./NodeType"),d=o("./XMLDTDAttList"),b=o("./XMLDTDEntity"),p=o("./XMLDTDElement"),g=o("./XMLDTDNotation"),c=o("./XMLNamedNodeMap"),_.exports=w=function(T){y(S,T);function S(C,x,O){var J,P,X,B,k,D;if(S.__super__.constructor.call(this,C),this.type=h.DocType,C.children){for(B=C.children,P=0,X=B.length;P<X;P++)if(J=B[P],J.type===h.Element){this.name=J.name;break}}this.documentObject=C,v(x)&&(k=x,x=k.pubID,O=k.sysID),O==null&&(D=[x,O],O=D[0],x=D[1]),x!=null&&(this.pubID=this.stringify.dtdPubID(x)),O!=null&&(this.sysID=this.stringify.dtdSysID(O))}return Object.defineProperty(S.prototype,"entities",{get:function(){var C,x,O,J,P;for(J={},P=this.children,x=0,O=P.length;x<O;x++)C=P[x],C.type===h.EntityDeclaration&&!C.pe&&(J[C.name]=C);return new c(J)}}),Object.defineProperty(S.prototype,"notations",{get:function(){var C,x,O,J,P;for(J={},P=this.children,x=0,O=P.length;x<O;x++)C=P[x],C.type===h.NotationDeclaration&&(J[C.name]=C);return new c(J)}}),Object.defineProperty(S.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(S.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(S.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),S.prototype.element=function(C,x){var O;return O=new p(this,C,x),this.children.push(O),this},S.prototype.attList=function(C,x,O,J,P){var X;return X=new d(this,C,x,O,J,P),this.children.push(X),this},S.prototype.entity=function(C,x){var O;return O=new b(this,!1,C,x),this.children.push(O),this},S.prototype.pEntity=function(C,x){var O;return O=new b(this,!0,C,x),this.children.push(O),this},S.prototype.notation=function(C,x){var O;return O=new g(this,C,x),this.children.push(O),this},S.prototype.toString=function(C){return this.options.writer.docType(this,this.options.writer.filterOptions(C))},S.prototype.ele=function(C,x){return this.element(C,x)},S.prototype.att=function(C,x,O,J,P){return this.attList(C,x,O,J,P)},S.prototype.ent=function(C,x){return this.entity(C,x)},S.prototype.pent=function(C,x){return this.pEntity(C,x)},S.prototype.not=function(C,x){return this.notation(C,x)},S.prototype.up=function(){return this.root()||this.documentObject},S.prototype.isEqualNode=function(C){return!(!S.__super__.isEqualNode.apply(this,arguments).isEqualNode(C)||C.name!==this.name||C.publicId!==this.publicId||C.systemId!==this.systemId)},S}(m)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLNamedNodeMap":449,"./XMLNode":450}],445:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m,v=function(E,T){for(var S in T)y.call(T,S)&&(E[S]=T[S]);function C(){this.constructor=E}return C.prototype=T.prototype,E.prototype=new C,E.__super__=T.prototype,E},y={}.hasOwnProperty;m=o("./Utility").isPlainObject,p=o("./XMLDOMImplementation"),d=o("./XMLDOMConfiguration"),g=o("./XMLNode"),h=o("./NodeType"),c=o("./XMLStringifier"),w=o("./XMLStringWriter"),_.exports=b=function(E){v(T,E);function T(S){T.__super__.constructor.call(this,null),this.name="#document",this.type=h.Document,this.documentURI=null,this.domConfig=new d,S||(S={}),S.writer||(S.writer=new w),this.options=S,this.stringify=new c(S)}return Object.defineProperty(T.prototype,"implementation",{value:new p}),Object.defineProperty(T.prototype,"doctype",{get:function(){var S,C,x,O;for(O=this.children,C=0,x=O.length;C<x;C++)if(S=O[C],S.type===h.DocType)return S;return null}}),Object.defineProperty(T.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(T.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(T.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(T.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===h.Declaration?this.children[0].encoding:null}}),Object.defineProperty(T.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===h.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(T.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===h.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(T.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(T.prototype,"origin",{get:function(){return null}}),Object.defineProperty(T.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(T.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(T.prototype,"contentType",{get:function(){return null}}),T.prototype.end=function(S){var C;return C={},S?m(S)&&(C=S,S=this.options.writer):S=this.options.writer,S.document(this,S.filterOptions(C))},T.prototype.toString=function(S){return this.options.writer.document(this,this.options.writer.filterOptions(S))},T.prototype.createElement=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createTextNode=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createComment=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createCDATASection=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createProcessingInstruction=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createAttribute=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createEntityReference=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagName=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.importNode=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createElementNS=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createAttributeNS=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByTagNameNS=function(S,C){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementById=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.adoptNode=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.renameNode=function(S,C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.getElementsByClassName=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createEvent=function(S){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createNodeIterator=function(S,C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},T.prototype.createTreeWalker=function(S,C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},T}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLDOMConfiguration":435,"./XMLDOMImplementation":437,"./XMLNode":450,"./XMLStringWriter":455,"./XMLStringifier":456}],446:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m,v,y,E,T,S,C,x,O,J,P,X,B,k,D,L,q,G={}.hasOwnProperty;q=o("./Utility"),D=q.isObject,k=q.isFunction,L=q.isPlainObject,B=q.getValue,h=o("./NodeType"),T=o("./XMLDocument"),C=o("./XMLElement"),b=o("./XMLCData"),g=o("./XMLComment"),O=o("./XMLRaw"),X=o("./XMLText"),x=o("./XMLProcessingInstruction"),y=o("./XMLDeclaration"),E=o("./XMLDocType"),w=o("./XMLDTDAttList"),m=o("./XMLDTDEntity"),c=o("./XMLDTDElement"),v=o("./XMLDTDNotation"),p=o("./XMLAttribute"),P=o("./XMLStringifier"),J=o("./XMLStringWriter"),d=o("./WriterState"),_.exports=S=function(){function F(N,K,re){var ne;this.name="?xml",this.type=h.Document,N||(N={}),ne={},N.writer?L(N.writer)&&(ne=N.writer,N.writer=new J):N.writer=new J,this.options=N,this.writer=N.writer,this.writerOptions=this.writer.filterOptions(ne),this.stringify=new P(N),this.onDataCallback=K||function(){},this.onEndCallback=re||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return F.prototype.createChildNode=function(N){var K,re,ne,pe,ie,Ae,Y,fe;switch(N.type){case h.CData:this.cdata(N.value);break;case h.Comment:this.comment(N.value);break;case h.Element:ne={},Y=N.attribs;for(re in Y)G.call(Y,re)&&(K=Y[re],ne[re]=K.value);this.node(N.name,ne);break;case h.Dummy:this.dummy();break;case h.Raw:this.raw(N.value);break;case h.Text:this.text(N.value);break;case h.ProcessingInstruction:this.instruction(N.target,N.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+N.constructor.name)}for(fe=N.children,ie=0,Ae=fe.length;ie<Ae;ie++)pe=fe[ie],this.createChildNode(pe),pe.type===h.Element&&this.up();return this},F.prototype.dummy=function(){return this},F.prototype.node=function(N,K,re){var ne;if(N==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(N));return this.openCurrent(),N=B(N),K==null&&(K={}),K=B(K),D(K)||(ne=[K,re],re=ne[0],K=ne[1]),this.currentNode=new C(this,N,K),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,re!=null&&this.text(re),this},F.prototype.element=function(N,K,re){var ne,pe,ie,Ae,Y,fe;if(this.currentNode&&this.currentNode.type===h.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(N)||D(N)||k(N))for(Ae=this.options.noValidation,this.options.noValidation=!0,fe=new T(this.options).element("TEMP_ROOT"),fe.element(N),this.options.noValidation=Ae,Y=fe.children,pe=0,ie=Y.length;pe<ie;pe++)ne=Y[pe],this.createChildNode(ne),ne.type===h.Element&&this.up();else this.node(N,K,re);return this},F.prototype.attribute=function(N,K){var re,ne;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(N));if(N!=null&&(N=B(N)),D(N))for(re in N)G.call(N,re)&&(ne=N[re],this.attribute(re,ne));else k(K)&&(K=K.apply()),this.options.keepNullAttributes&&K==null?this.currentNode.attribs[N]=new p(this,N,""):K!=null&&(this.currentNode.attribs[N]=new p(this,N,K));return this},F.prototype.text=function(N){var K;return this.openCurrent(),K=new X(this,N),this.onData(this.writer.text(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.cdata=function(N){var K;return this.openCurrent(),K=new b(this,N),this.onData(this.writer.cdata(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.comment=function(N){var K;return this.openCurrent(),K=new g(this,N),this.onData(this.writer.comment(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.raw=function(N){var K;return this.openCurrent(),K=new O(this,N),this.onData(this.writer.raw(K,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.instruction=function(N,K){var re,ne,pe,ie,Ae;if(this.openCurrent(),N!=null&&(N=B(N)),K!=null&&(K=B(K)),Array.isArray(N))for(re=0,ie=N.length;re<ie;re++)ne=N[re],this.instruction(ne);else if(D(N))for(ne in N)G.call(N,ne)&&(pe=N[ne],this.instruction(ne,pe));else k(K)&&(K=K.apply()),Ae=new x(this,N,K),this.onData(this.writer.processingInstruction(Ae,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},F.prototype.declaration=function(N,K,re){var ne;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return ne=new y(this,N,K,re),this.onData(this.writer.declaration(ne,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.doctype=function(N,K,re){if(this.openCurrent(),N==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new E(this,K,re),this.currentNode.rootNodeName=N,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},F.prototype.dtdElement=function(N,K){var re;return this.openCurrent(),re=new c(this,N,K),this.onData(this.writer.dtdElement(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.attList=function(N,K,re,ne,pe){var ie;return this.openCurrent(),ie=new w(this,N,K,re,ne,pe),this.onData(this.writer.dtdAttList(ie,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.entity=function(N,K){var re;return this.openCurrent(),re=new m(this,!1,N,K),this.onData(this.writer.dtdEntity(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.pEntity=function(N,K){var re;return this.openCurrent(),re=new m(this,!0,N,K),this.onData(this.writer.dtdEntity(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.notation=function(N,K){var re;return this.openCurrent(),re=new v(this,N,K),this.onData(this.writer.dtdNotation(re,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},F.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},F.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},F.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},F.prototype.openNode=function(N){var K,re,ne,pe;if(!N.isOpen){if(!this.root&&this.currentLevel===0&&N.type===h.Element&&(this.root=N),re="",N.type===h.Element){this.writerOptions.state=d.OpenTag,re=this.writer.indent(N,this.writerOptions,this.currentLevel)+"<"+N.name,pe=N.attribs;for(ne in pe)G.call(pe,ne)&&(K=pe[ne],re+=this.writer.attribute(K,this.writerOptions,this.currentLevel));re+=(N.children?">":"/>")+this.writer.endline(N,this.writerOptions,this.currentLevel),this.writerOptions.state=d.InsideTag}else this.writerOptions.state=d.OpenTag,re=this.writer.indent(N,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+N.rootNodeName,N.pubID&&N.sysID?re+=' PUBLIC "'+N.pubID+'" "'+N.sysID+'"':N.sysID&&(re+=' SYSTEM "'+N.sysID+'"'),N.children?(re+=" [",this.writerOptions.state=d.InsideTag):(this.writerOptions.state=d.CloseTag,re+=">"),re+=this.writer.endline(N,this.writerOptions,this.currentLevel);return this.onData(re,this.currentLevel),N.isOpen=!0}},F.prototype.closeNode=function(N){var K;if(!N.isClosed)return K="",this.writerOptions.state=d.CloseTag,N.type===h.Element?K=this.writer.indent(N,this.writerOptions,this.currentLevel)+"</"+N.name+">"+this.writer.endline(N,this.writerOptions,this.currentLevel):K=this.writer.indent(N,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(N,this.writerOptions,this.currentLevel),this.writerOptions.state=d.None,this.onData(K,this.currentLevel),N.isClosed=!0},F.prototype.onData=function(N,K){return this.documentStarted=!0,this.onDataCallback(N,K+1)},F.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},F.prototype.debugInfo=function(N){return N==null?"":"node: <"+N+">"},F.prototype.ele=function(){return this.element.apply(this,arguments)},F.prototype.nod=function(N,K,re){return this.node(N,K,re)},F.prototype.txt=function(N){return this.text(N)},F.prototype.dat=function(N){return this.cdata(N)},F.prototype.com=function(N){return this.comment(N)},F.prototype.ins=function(N,K){return this.instruction(N,K)},F.prototype.dec=function(N,K,re){return this.declaration(N,K,re)},F.prototype.dtd=function(N,K,re){return this.doctype(N,K,re)},F.prototype.e=function(N,K,re){return this.element(N,K,re)},F.prototype.n=function(N,K,re){return this.node(N,K,re)},F.prototype.t=function(N){return this.text(N)},F.prototype.d=function(N){return this.cdata(N)},F.prototype.c=function(N){return this.comment(N)},F.prototype.r=function(N){return this.raw(N)},F.prototype.i=function(N,K){return this.instruction(N,K)},F.prototype.att=function(){return this.currentNode&&this.currentNode.type===h.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},F.prototype.a=function(){return this.currentNode&&this.currentNode.type===h.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},F.prototype.ent=function(N,K){return this.entity(N,K)},F.prototype.pent=function(N,K){return this.pEntity(N,K)},F.prototype.not=function(N,K){return this.notation(N,K)},F}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLAttribute":431,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDocument":445,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLStringWriter":455,"./XMLStringifier":456,"./XMLText":457}],447:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;p=o("./XMLNode"),h=o("./NodeType"),_.exports=d=function(w){b(c,w);function c(m){c.__super__.constructor.call(this,m),this.type=h.Dummy}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return""},c}(p)}).call(this)},{"./NodeType":428,"./XMLNode":450}],448:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m,v,y=function(T,S){for(var C in S)E.call(S,C)&&(T[C]=S[C]);function x(){this.constructor=T}return x.prototype=S.prototype,T.prototype=new x,T.__super__=S.prototype,T},E={}.hasOwnProperty;v=o("./Utility"),m=v.isObject,c=v.isFunction,w=v.getValue,g=o("./XMLNode"),h=o("./NodeType"),d=o("./XMLAttribute"),b=o("./XMLNamedNodeMap"),_.exports=p=function(T){y(S,T);function S(C,x,O){var J,P,X,B;if(S.__super__.constructor.call(this,C),x==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(x),this.type=h.Element,this.attribs={},this.schemaTypeInfo=null,O!=null&&this.attribute(O),C.type===h.Document&&(this.isRoot=!0,this.documentObject=C,C.rootObject=this,C.children)){for(B=C.children,P=0,X=B.length;P<X;P++)if(J=B[P],J.type===h.DocType){J.name=this.name;break}}}return Object.defineProperty(S.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(S.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(S.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(S.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(S.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new b(this.attribs)),this.attributeMap}}),S.prototype.clone=function(){var C,x,O,J;O=Object.create(this),O.isRoot&&(O.documentObject=null),O.attribs={},J=this.attribs;for(x in J)E.call(J,x)&&(C=J[x],O.attribs[x]=C.clone());return O.children=[],this.children.forEach(function(P){var X;return X=P.clone(),X.parent=O,O.children.push(X)}),O},S.prototype.attribute=function(C,x){var O,J;if(C!=null&&(C=w(C)),m(C))for(O in C)E.call(C,O)&&(J=C[O],this.attribute(O,J));else c(x)&&(x=x.apply()),this.options.keepNullAttributes&&x==null?this.attribs[C]=new d(this,C,""):x!=null&&(this.attribs[C]=new d(this,C,x));return this},S.prototype.removeAttribute=function(C){var x,O,J;if(C==null)throw new Error("Missing attribute name. "+this.debugInfo());if(C=w(C),Array.isArray(C))for(O=0,J=C.length;O<J;O++)x=C[O],delete this.attribs[x];else delete this.attribs[C];return this},S.prototype.toString=function(C){return this.options.writer.element(this,this.options.writer.filterOptions(C))},S.prototype.att=function(C,x){return this.attribute(C,x)},S.prototype.a=function(C,x){return this.attribute(C,x)},S.prototype.getAttribute=function(C){return this.attribs.hasOwnProperty(C)?this.attribs[C].value:null},S.prototype.setAttribute=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNode=function(C){return this.attribs.hasOwnProperty(C)?this.attribs[C]:null},S.prototype.setAttributeNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeAttributeNode=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNS=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setAttributeNS=function(C,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.removeAttributeNS=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getAttributeNodeNS=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setAttributeNodeNS=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagNameNS=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.hasAttribute=function(C){return this.attribs.hasOwnProperty(C)},S.prototype.hasAttributeNS=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setIdAttribute=function(C,x){return this.attribs.hasOwnProperty(C)?this.attribs[C].isId:x},S.prototype.setIdAttributeNS=function(C,x,O){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.setIdAttributeNode=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByTagNameNS=function(C,x){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.getElementsByClassName=function(C){throw new Error("This DOM method is not implemented."+this.debugInfo())},S.prototype.isEqualNode=function(C){var x,O,J;if(!S.__super__.isEqualNode.apply(this,arguments).isEqualNode(C)||C.namespaceURI!==this.namespaceURI||C.prefix!==this.prefix||C.localName!==this.localName||C.attribs.length!==this.attribs.length)return!1;for(x=O=0,J=this.attribs.length-1;0<=J?O<=J:O>=J;x=0<=J?++O:--O)if(!this.attribs[x].isEqualNode(C.attribs[x]))return!1;return!0},S}(g)}).call(this)},{"./NodeType":428,"./Utility":429,"./XMLAttribute":431,"./XMLNamedNodeMap":449,"./XMLNode":450}],449:[function(o,_,j){(function(){var h;_.exports=h=function(){function d(p){this.nodes=p}return Object.defineProperty(d.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),d.prototype.clone=function(){return this.nodes=null},d.prototype.getNamedItem=function(p){return this.nodes[p]},d.prototype.setNamedItem=function(p){var b;return b=this.nodes[p.nodeName],this.nodes[p.nodeName]=p,b||null},d.prototype.removeNamedItem=function(p){var b;return b=this.nodes[p],delete this.nodes[p],b||null},d.prototype.item=function(p){return this.nodes[Object.keys(this.nodes)[p]]||null},d.prototype.getNamedItemNS=function(p,b){throw new Error("This DOM method is not implemented.")},d.prototype.setNamedItemNS=function(p){throw new Error("This DOM method is not implemented.")},d.prototype.removeNamedItemNS=function(p,b){throw new Error("This DOM method is not implemented.")},d}()}).call(this)},{}],450:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m,v,y,E,T,S,C,x,O,J,P,X,B={}.hasOwnProperty;X=o("./Utility"),P=X.isObject,J=X.isFunction,O=X.isEmpty,x=X.getValue,m=null,p=null,b=null,g=null,w=null,S=null,C=null,T=null,c=null,d=null,E=null,v=null,h=null,_.exports=y=function(){function k(D){this.parent=D,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,m||(m=o("./XMLElement"),p=o("./XMLCData"),b=o("./XMLComment"),g=o("./XMLDeclaration"),w=o("./XMLDocType"),S=o("./XMLRaw"),C=o("./XMLText"),T=o("./XMLProcessingInstruction"),c=o("./XMLDummy"),d=o("./NodeType"),E=o("./XMLNodeList"),v=o("./XMLNamedNodeMap"),h=o("./DocumentPosition"))}return Object.defineProperty(k.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(k.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(k.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(k.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(k.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new E(this.children)),this.childNodeList}}),Object.defineProperty(k.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(k.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(k.prototype,"previousSibling",{get:function(){var D;return D=this.parent.children.indexOf(this),this.parent.children[D-1]||null}}),Object.defineProperty(k.prototype,"nextSibling",{get:function(){var D;return D=this.parent.children.indexOf(this),this.parent.children[D+1]||null}}),Object.defineProperty(k.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(k.prototype,"textContent",{get:function(){var D,L,q,G,F;if(this.nodeType===d.Element||this.nodeType===d.DocumentFragment){for(F="",G=this.children,L=0,q=G.length;L<q;L++)D=G[L],D.textContent&&(F+=D.textContent);return F}else return null},set:function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),k.prototype.setParent=function(D){var L,q,G,F,N;for(this.parent=D,D&&(this.options=D.options,this.stringify=D.stringify),F=this.children,N=[],q=0,G=F.length;q<G;q++)L=F[q],N.push(L.setParent(this));return N},k.prototype.element=function(D,L,q){var G,F,N,K,re,ne,pe,ie,Ae,Y,fe;if(ne=null,L===null&&q==null&&(Ae=[{},null],L=Ae[0],q=Ae[1]),L==null&&(L={}),L=x(L),P(L)||(Y=[L,q],q=Y[0],L=Y[1]),D!=null&&(D=x(D)),Array.isArray(D))for(N=0,pe=D.length;N<pe;N++)F=D[N],ne=this.element(F);else if(J(D))ne=this.element(D.apply());else if(P(D)){for(re in D)if(B.call(D,re))if(fe=D[re],J(fe)&&(fe=fe.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&re.indexOf(this.stringify.convertAttKey)===0)ne=this.attribute(re.substr(this.stringify.convertAttKey.length),fe);else if(!this.options.separateArrayItems&&Array.isArray(fe)&&O(fe))ne=this.dummy();else if(P(fe)&&O(fe))ne=this.element(re);else if(!this.options.keepNullNodes&&fe==null)ne=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(fe))for(K=0,ie=fe.length;K<ie;K++)F=fe[K],G={},G[re]=F,ne=this.element(G);else P(fe)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&re.indexOf(this.stringify.convertTextKey)===0?ne=this.element(fe):(ne=this.element(re),ne.element(fe)):ne=this.element(re,fe)}else!this.options.keepNullNodes&&q===null?ne=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&D.indexOf(this.stringify.convertTextKey)===0?ne=this.text(q):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&D.indexOf(this.stringify.convertCDataKey)===0?ne=this.cdata(q):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&D.indexOf(this.stringify.convertCommentKey)===0?ne=this.comment(q):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&D.indexOf(this.stringify.convertRawKey)===0?ne=this.raw(q):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&D.indexOf(this.stringify.convertPIKey)===0?ne=this.instruction(D.substr(this.stringify.convertPIKey.length),q):ne=this.node(D,L,q);if(ne==null)throw new Error("Could not create any elements with: "+D+". "+this.debugInfo());return ne},k.prototype.insertBefore=function(D,L,q){var G,F,N,K,re;if(D!=null&&D.type)return N=D,K=L,N.setParent(this),K?(F=children.indexOf(K),re=children.splice(F),children.push(N),Array.prototype.push.apply(children,re)):children.push(N),N;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(D));return F=this.parent.children.indexOf(this),re=this.parent.children.splice(F),G=this.parent.element(D,L,q),Array.prototype.push.apply(this.parent.children,re),G},k.prototype.insertAfter=function(D,L,q){var G,F,N;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(D));return F=this.parent.children.indexOf(this),N=this.parent.children.splice(F+1),G=this.parent.element(D,L,q),Array.prototype.push.apply(this.parent.children,N),G},k.prototype.remove=function(){var D,L;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return D=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[D,D-D+1].concat(L=[])),this.parent},k.prototype.node=function(D,L,q){var G,F;return D!=null&&(D=x(D)),L||(L={}),L=x(L),P(L)||(F=[L,q],q=F[0],L=F[1]),G=new m(this,D,L),q!=null&&G.text(q),this.children.push(G),G},k.prototype.text=function(D){var L;return P(D)&&this.element(D),L=new C(this,D),this.children.push(L),this},k.prototype.cdata=function(D){var L;return L=new p(this,D),this.children.push(L),this},k.prototype.comment=function(D){var L;return L=new b(this,D),this.children.push(L),this},k.prototype.commentBefore=function(D){var L,q,G;return q=this.parent.children.indexOf(this),G=this.parent.children.splice(q),L=this.parent.comment(D),Array.prototype.push.apply(this.parent.children,G),this},k.prototype.commentAfter=function(D){var L,q,G;return q=this.parent.children.indexOf(this),G=this.parent.children.splice(q+1),L=this.parent.comment(D),Array.prototype.push.apply(this.parent.children,G),this},k.prototype.raw=function(D){var L;return L=new S(this,D),this.children.push(L),this},k.prototype.dummy=function(){var D;return D=new c(this),D},k.prototype.instruction=function(D,L){var q,G,F,N,K;if(D!=null&&(D=x(D)),L!=null&&(L=x(L)),Array.isArray(D))for(N=0,K=D.length;N<K;N++)q=D[N],this.instruction(q);else if(P(D))for(q in D)B.call(D,q)&&(G=D[q],this.instruction(q,G));else J(L)&&(L=L.apply()),F=new T(this,D,L),this.children.push(F);return this},k.prototype.instructionBefore=function(D,L){var q,G,F;return G=this.parent.children.indexOf(this),F=this.parent.children.splice(G),q=this.parent.instruction(D,L),Array.prototype.push.apply(this.parent.children,F),this},k.prototype.instructionAfter=function(D,L){var q,G,F;return G=this.parent.children.indexOf(this),F=this.parent.children.splice(G+1),q=this.parent.instruction(D,L),Array.prototype.push.apply(this.parent.children,F),this},k.prototype.declaration=function(D,L,q){var G,F;return G=this.document(),F=new g(G,D,L,q),G.children.length===0?G.children.unshift(F):G.children[0].type===d.Declaration?G.children[0]=F:G.children.unshift(F),G.root()||G},k.prototype.dtd=function(D,L){var q,G,F,N,K,re,ne,pe,ie,Ae;for(G=this.document(),F=new w(G,D,L),ie=G.children,N=K=0,ne=ie.length;K<ne;N=++K)if(q=ie[N],q.type===d.DocType)return G.children[N]=F,F;for(Ae=G.children,N=re=0,pe=Ae.length;re<pe;N=++re)if(q=Ae[N],q.isRoot)return G.children.splice(N,0,F),F;return G.children.push(F),F},k.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},k.prototype.root=function(){var D;for(D=this;D;){if(D.type===d.Document)return D.rootObject;if(D.isRoot)return D;D=D.parent}},k.prototype.document=function(){var D;for(D=this;D;){if(D.type===d.Document)return D;D=D.parent}},k.prototype.end=function(D){return this.document().end(D)},k.prototype.prev=function(){var D;if(D=this.parent.children.indexOf(this),D<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[D-1]},k.prototype.next=function(){var D;if(D=this.parent.children.indexOf(this),D===-1||D===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[D+1]},k.prototype.importDocument=function(D){var L;return L=D.root().clone(),L.parent=this,L.isRoot=!1,this.children.push(L),this},k.prototype.debugInfo=function(D){var L,q;return D=D||this.name,D==null&&!((L=this.parent)!=null&&L.name)?"":D==null?"parent: <"+this.parent.name+">":(q=this.parent)!=null&&q.name?"node: <"+D+">, parent: <"+this.parent.name+">":"node: <"+D+">"},k.prototype.ele=function(D,L,q){return this.element(D,L,q)},k.prototype.nod=function(D,L,q){return this.node(D,L,q)},k.prototype.txt=function(D){return this.text(D)},k.prototype.dat=function(D){return this.cdata(D)},k.prototype.com=function(D){return this.comment(D)},k.prototype.ins=function(D,L){return this.instruction(D,L)},k.prototype.doc=function(){return this.document()},k.prototype.dec=function(D,L,q){return this.declaration(D,L,q)},k.prototype.e=function(D,L,q){return this.element(D,L,q)},k.prototype.n=function(D,L,q){return this.node(D,L,q)},k.prototype.t=function(D){return this.text(D)},k.prototype.d=function(D){return this.cdata(D)},k.prototype.c=function(D){return this.comment(D)},k.prototype.r=function(D){return this.raw(D)},k.prototype.i=function(D,L){return this.instruction(D,L)},k.prototype.u=function(){return this.up()},k.prototype.importXMLBuilder=function(D){return this.importDocument(D)},k.prototype.replaceChild=function(D,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.removeChild=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.appendChild=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.hasChildNodes=function(){return this.children.length!==0},k.prototype.cloneNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isSupported=function(D,L){return!0},k.prototype.hasAttributes=function(){return this.attribs.length!==0},k.prototype.compareDocumentPosition=function(D){var L,q;return L=this,L===D?0:this.document()!==D.document()?(q=h.Disconnected|h.ImplementationSpecific,Math.random()<.5?q|=h.Preceding:q|=h.Following,q):L.isAncestor(D)?h.Contains|h.Preceding:L.isDescendant(D)?h.Contains|h.Following:L.isPreceding(D)?h.Preceding:h.Following},k.prototype.isSameNode=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.lookupPrefix=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isDefaultNamespace=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.lookupNamespaceURI=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.isEqualNode=function(D){var L,q,G;if(D.nodeType!==this.nodeType||D.children.length!==this.children.length)return!1;for(L=q=0,G=this.children.length-1;0<=G?q<=G:q>=G;L=0<=G?++q:--q)if(!this.children[L].isEqualNode(D.children[L]))return!1;return!0},k.prototype.getFeature=function(D,L){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.setUserData=function(D,L,q){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.getUserData=function(D){throw new Error("This DOM method is not implemented."+this.debugInfo())},k.prototype.contains=function(D){return D?D===this||this.isDescendant(D):!1},k.prototype.isDescendant=function(D){var L,q,G,F,N;for(N=this.children,G=0,F=N.length;G<F;G++)if(L=N[G],D===L||(q=L.isDescendant(D),q))return!0;return!1},k.prototype.isAncestor=function(D){return D.isDescendant(this)},k.prototype.isPreceding=function(D){var L,q;return L=this.treePosition(D),q=this.treePosition(this),L===-1||q===-1?!1:L<q},k.prototype.isFollowing=function(D){var L,q;return L=this.treePosition(D),q=this.treePosition(this),L===-1||q===-1?!1:L>q},k.prototype.treePosition=function(D){var L,q;return q=0,L=!1,this.foreachTreeNode(this.document(),function(G){if(q++,!L&&G===D)return L=!0}),L?q:-1},k.prototype.foreachTreeNode=function(D,L){var q,G,F,N,K;for(D||(D=this.document()),N=D.children,G=0,F=N.length;G<F;G++){if(q=N[G],K=L(q))return K;if(K=this.foreachTreeNode(q,L),K)return K}},k}()}).call(this)},{"./DocumentPosition":427,"./NodeType":428,"./Utility":429,"./XMLCData":432,"./XMLComment":434,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLNamedNodeMap":449,"./XMLNodeList":451,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],451:[function(o,_,j){(function(){var h;_.exports=h=function(){function d(p){this.nodes=p}return Object.defineProperty(d.prototype,"length",{get:function(){return this.nodes.length||0}}),d.prototype.clone=function(){return this.nodes=null},d.prototype.item=function(p){return this.nodes[p]||null},d}()}).call(this)},{}],452:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./NodeType"),d=o("./XMLCharacterData"),_.exports=p=function(w){b(c,w);function c(m,v,y){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=h.ProcessingInstruction,this.target=this.stringify.insTarget(v),this.name=this.target,y&&(this.value=this.stringify.insValue(y))}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(m))},c.prototype.isEqualNode=function(m){return!(!c.__super__.isEqualNode.apply(this,arguments).isEqualNode(m)||m.target!==this.target)},c}(d)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],453:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./NodeType"),d=o("./XMLNode"),_.exports=p=function(w){b(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=h.Raw,this.value=this.stringify.raw(v)}return c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.raw(this,this.options.writer.filterOptions(m))},c}(d)}).call(this)},{"./NodeType":428,"./XMLNode":450}],454:[function(o,_,j){(function(){var h,d,p,b,g=function(c,m){for(var v in m)w.call(m,v)&&(c[v]=m[v]);function y(){this.constructor=c}return y.prototype=m.prototype,c.prototype=new y,c.__super__=m.prototype,c},w={}.hasOwnProperty;h=o("./NodeType"),b=o("./XMLWriterBase"),d=o("./WriterState"),_.exports=p=function(c){g(m,c);function m(v,y){this.stream=v,m.__super__.constructor.call(this,y)}return m.prototype.endline=function(v,y,E){return v.isLastRootNode&&y.state===d.CloseTag?"":m.__super__.endline.call(this,v,y,E)},m.prototype.document=function(v,y){var E,T,S,C,x,O,J,P,X;for(J=v.children,T=S=0,x=J.length;S<x;T=++S)E=J[T],E.isLastRootNode=T===v.children.length-1;for(y=this.filterOptions(y),P=v.children,X=[],C=0,O=P.length;C<O;C++)E=P[C],X.push(this.writeChildNode(E,y,0));return X},m.prototype.attribute=function(v,y,E){return this.stream.write(m.__super__.attribute.call(this,v,y,E))},m.prototype.cdata=function(v,y,E){return this.stream.write(m.__super__.cdata.call(this,v,y,E))},m.prototype.comment=function(v,y,E){return this.stream.write(m.__super__.comment.call(this,v,y,E))},m.prototype.declaration=function(v,y,E){return this.stream.write(m.__super__.declaration.call(this,v,y,E))},m.prototype.docType=function(v,y,E){var T,S,C,x;if(E||(E=0),this.openNode(v,y,E),y.state=d.OpenTag,this.stream.write(this.indent(v,y,E)),this.stream.write("<!DOCTYPE "+v.root().name),v.pubID&&v.sysID?this.stream.write(' PUBLIC "'+v.pubID+'" "'+v.sysID+'"'):v.sysID&&this.stream.write(' SYSTEM "'+v.sysID+'"'),v.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(v,y,E)),y.state=d.InsideTag,x=v.children,S=0,C=x.length;S<C;S++)T=x[S],this.writeChildNode(T,y,E+1);y.state=d.CloseTag,this.stream.write("]")}return y.state=d.CloseTag,this.stream.write(y.spaceBeforeSlash+">"),this.stream.write(this.endline(v,y,E)),y.state=d.None,this.closeNode(v,y,E)},m.prototype.element=function(v,y,E){var T,S,C,x,O,J,P,X,B,k;E||(E=0),this.openNode(v,y,E),y.state=d.OpenTag,this.stream.write(this.indent(v,y,E)+"<"+v.name),B=v.attribs;for(P in B)w.call(B,P)&&(T=B[P],this.attribute(T,y,E));if(C=v.children.length,x=C===0?null:v.children[0],C===0||v.children.every(function(D){return(D.type===h.Text||D.type===h.Raw)&&D.value===""}))y.allowEmpty?(this.stream.write(">"),y.state=d.CloseTag,this.stream.write("</"+v.name+">")):(y.state=d.CloseTag,this.stream.write(y.spaceBeforeSlash+"/>"));else if(y.pretty&&C===1&&(x.type===h.Text||x.type===h.Raw)&&x.value!=null)this.stream.write(">"),y.state=d.InsideTag,y.suppressPrettyCount++,X=!0,this.writeChildNode(x,y,E+1),y.suppressPrettyCount--,X=!1,y.state=d.CloseTag,this.stream.write("</"+v.name+">");else{for(this.stream.write(">"+this.endline(v,y,E)),y.state=d.InsideTag,k=v.children,O=0,J=k.length;O<J;O++)S=k[O],this.writeChildNode(S,y,E+1);y.state=d.CloseTag,this.stream.write(this.indent(v,y,E)+"</"+v.name+">")}return this.stream.write(this.endline(v,y,E)),y.state=d.None,this.closeNode(v,y,E)},m.prototype.processingInstruction=function(v,y,E){return this.stream.write(m.__super__.processingInstruction.call(this,v,y,E))},m.prototype.raw=function(v,y,E){return this.stream.write(m.__super__.raw.call(this,v,y,E))},m.prototype.text=function(v,y,E){return this.stream.write(m.__super__.text.call(this,v,y,E))},m.prototype.dtdAttList=function(v,y,E){return this.stream.write(m.__super__.dtdAttList.call(this,v,y,E))},m.prototype.dtdElement=function(v,y,E){return this.stream.write(m.__super__.dtdElement.call(this,v,y,E))},m.prototype.dtdEntity=function(v,y,E){return this.stream.write(m.__super__.dtdEntity.call(this,v,y,E))},m.prototype.dtdNotation=function(v,y,E){return this.stream.write(m.__super__.dtdNotation.call(this,v,y,E))},m}(b)}).call(this)},{"./NodeType":428,"./WriterState":430,"./XMLWriterBase":458}],455:[function(o,_,j){(function(){var h,d,p=function(g,w){for(var c in w)b.call(w,c)&&(g[c]=w[c]);function m(){this.constructor=g}return m.prototype=w.prototype,g.prototype=new m,g.__super__=w.prototype,g},b={}.hasOwnProperty;d=o("./XMLWriterBase"),_.exports=h=function(g){p(w,g);function w(c){w.__super__.constructor.call(this,c)}return w.prototype.document=function(c,m){var v,y,E,T,S;for(m=this.filterOptions(m),T="",S=c.children,y=0,E=S.length;y<E;y++)v=S[y],T+=this.writeChildNode(v,m,0);return m.pretty&&T.slice(-m.newline.length)===m.newline&&(T=T.slice(0,-m.newline.length)),T},w}(d)}).call(this)},{"./XMLWriterBase":458}],456:[function(o,_,j){(function(){var h,d=function(b,g){return function(){return b.apply(g,arguments)}},p={}.hasOwnProperty;_.exports=h=function(){function b(g){this.assertLegalName=d(this.assertLegalName,this),this.assertLegalChar=d(this.assertLegalChar,this);var w,c,m;g||(g={}),this.options=g,this.options.version||(this.options.version="1.0"),c=g.stringify||{};for(w in c)p.call(c,w)&&(m=c[w],this[w]=m)}return b.prototype.name=function(g){return this.options.noValidation?g:this.assertLegalName(""+g||"")},b.prototype.text=function(g){return this.options.noValidation?g:this.assertLegalChar(this.textEscape(""+g||""))},b.prototype.cdata=function(g){return this.options.noValidation?g:(g=""+g||"",g=g.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(g))},b.prototype.comment=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+g);return this.assertLegalChar(g)},b.prototype.raw=function(g){return this.options.noValidation?g:""+g||""},b.prototype.attValue=function(g){return this.options.noValidation?g:this.assertLegalChar(this.attEscape(g=""+g||""))},b.prototype.insTarget=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.insValue=function(g){if(this.options.noValidation)return g;if(g=""+g||"",g.match(/\?>/))throw new Error("Invalid processing instruction value: "+g);return this.assertLegalChar(g)},b.prototype.xmlVersion=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+g);return g},b.prototype.xmlEncoding=function(g){if(this.options.noValidation)return g;if(g=""+g||"",!g.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+g);return this.assertLegalChar(g)},b.prototype.xmlStandalone=function(g){return this.options.noValidation?g:g?"yes":"no"},b.prototype.dtdPubID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdSysID=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdElementValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdAttType=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdAttDefault=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdEntityValue=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.dtdNData=function(g){return this.options.noValidation?g:this.assertLegalChar(""+g||"")},b.prototype.convertAttKey="@",b.prototype.convertPIKey="?",b.prototype.convertTextKey="#text",b.prototype.convertCDataKey="#cdata",b.prototype.convertCommentKey="#comment",b.prototype.convertRawKey="#raw",b.prototype.assertLegalChar=function(g){var w,c;if(this.options.noValidation)return g;if(w="",this.options.version==="1.0"){if(w=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=g.match(w))throw new Error("Invalid character in string: "+g+" at index "+c.index)}else if(this.options.version==="1.1"&&(w=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=g.match(w)))throw new Error("Invalid character in string: "+g+" at index "+c.index);return g},b.prototype.assertLegalName=function(g){var w;if(this.options.noValidation)return g;if(this.assertLegalChar(g),w=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!g.match(w))throw new Error("Invalid character in name");return g},b.prototype.textEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},b.prototype.attEscape=function(g){var w;return this.options.noValidation?g:(w=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,g.replace(w,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},b}()}).call(this)},{}],457:[function(o,_,j){(function(){var h,d,p,b=function(w,c){for(var m in c)g.call(c,m)&&(w[m]=c[m]);function v(){this.constructor=w}return v.prototype=c.prototype,w.prototype=new v,w.__super__=c.prototype,w},g={}.hasOwnProperty;h=o("./NodeType"),d=o("./XMLCharacterData"),_.exports=p=function(w){b(c,w);function c(m,v){if(c.__super__.constructor.call(this,m),v==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=h.Text,this.value=this.stringify.text(v)}return Object.defineProperty(c.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(c.prototype,"wholeText",{get:function(){var m,v,y;for(y="",v=this.previousSibling;v;)y=v.data+y,v=v.previousSibling;for(y+=this.data,m=this.nextSibling;m;)y=y+m.data,m=m.nextSibling;return y}}),c.prototype.clone=function(){return Object.create(this)},c.prototype.toString=function(m){return this.options.writer.text(this,this.options.writer.filterOptions(m))},c.prototype.splitText=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},c.prototype.replaceWholeText=function(m){throw new Error("This DOM method is not implemented."+this.debugInfo())},c}(d)}).call(this)},{"./NodeType":428,"./XMLCharacterData":433}],458:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m,v,y,E,T,S,C,x,O,J,P={}.hasOwnProperty;J=o("./Utility").assign,h=o("./NodeType"),v=o("./XMLDeclaration"),y=o("./XMLDocType"),p=o("./XMLCData"),b=o("./XMLComment"),T=o("./XMLElement"),C=o("./XMLRaw"),x=o("./XMLText"),S=o("./XMLProcessingInstruction"),E=o("./XMLDummy"),g=o("./XMLDTDAttList"),w=o("./XMLDTDElement"),c=o("./XMLDTDEntity"),m=o("./XMLDTDNotation"),d=o("./WriterState"),_.exports=O=function(){function X(B){var k,D,L;B||(B={}),this.options=B,D=B.writer||{};for(k in D)P.call(D,k)&&(L=D[k],this["_"+k]=this[k],this[k]=L)}return X.prototype.filterOptions=function(B){var k,D,L,q,G,F,N,K;return B||(B={}),B=J({},this.options,B),k={writer:this},k.pretty=B.pretty||!1,k.allowEmpty=B.allowEmpty||!1,k.indent=(D=B.indent)!=null?D:" ",k.newline=(L=B.newline)!=null?L:`
|
|
`,k.offset=(q=B.offset)!=null?q:0,k.dontPrettyTextNodes=(G=(F=B.dontPrettyTextNodes)!=null?F:B.dontprettytextnodes)!=null?G:0,k.spaceBeforeSlash=(N=(K=B.spaceBeforeSlash)!=null?K:B.spacebeforeslash)!=null?N:"",k.spaceBeforeSlash===!0&&(k.spaceBeforeSlash=" "),k.suppressPrettyCount=0,k.user={},k.state=d.None,k},X.prototype.indent=function(B,k,D){var L;return!k.pretty||k.suppressPrettyCount?"":k.pretty&&(L=(D||0)+k.offset+1,L>0)?new Array(L).join(k.indent):""},X.prototype.endline=function(B,k,D){return!k.pretty||k.suppressPrettyCount?"":k.newline},X.prototype.attribute=function(B,k,D){var L;return this.openAttribute(B,k,D),L=" "+B.name+'="'+B.value+'"',this.closeAttribute(B,k,D),L},X.prototype.cdata=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<![CDATA[",k.state=d.InsideTag,L+=B.value,k.state=d.CloseTag,L+="]]>"+this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.comment=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<!-- ",k.state=d.InsideTag,L+=B.value,k.state=d.CloseTag,L+=" -->"+this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.declaration=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<?xml",k.state=d.InsideTag,L+=' version="'+B.version+'"',B.encoding!=null&&(L+=' encoding="'+B.encoding+'"'),B.standalone!=null&&(L+=' standalone="'+B.standalone+'"'),k.state=d.CloseTag,L+=k.spaceBeforeSlash+"?>",L+=this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.docType=function(B,k,D){var L,q,G,F,N;if(D||(D=0),this.openNode(B,k,D),k.state=d.OpenTag,F=this.indent(B,k,D),F+="<!DOCTYPE "+B.root().name,B.pubID&&B.sysID?F+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.sysID&&(F+=' SYSTEM "'+B.sysID+'"'),B.children.length>0){for(F+=" [",F+=this.endline(B,k,D),k.state=d.InsideTag,N=B.children,q=0,G=N.length;q<G;q++)L=N[q],F+=this.writeChildNode(L,k,D+1);k.state=d.CloseTag,F+="]"}return k.state=d.CloseTag,F+=k.spaceBeforeSlash+">",F+=this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),F},X.prototype.element=function(B,k,D){var L,q,G,F,N,K,re,ne,pe,ie,Ae,Y,fe,ve;D||(D=0),ie=!1,Ae="",this.openNode(B,k,D),k.state=d.OpenTag,Ae+=this.indent(B,k,D)+"<"+B.name,Y=B.attribs;for(pe in Y)P.call(Y,pe)&&(L=Y[pe],Ae+=this.attribute(L,k,D));if(G=B.children.length,F=G===0?null:B.children[0],G===0||B.children.every(function(be){return(be.type===h.Text||be.type===h.Raw)&&be.value===""}))k.allowEmpty?(Ae+=">",k.state=d.CloseTag,Ae+="</"+B.name+">"+this.endline(B,k,D)):(k.state=d.CloseTag,Ae+=k.spaceBeforeSlash+"/>"+this.endline(B,k,D));else if(k.pretty&&G===1&&(F.type===h.Text||F.type===h.Raw)&&F.value!=null)Ae+=">",k.state=d.InsideTag,k.suppressPrettyCount++,ie=!0,Ae+=this.writeChildNode(F,k,D+1),k.suppressPrettyCount--,ie=!1,k.state=d.CloseTag,Ae+="</"+B.name+">"+this.endline(B,k,D);else{if(k.dontPrettyTextNodes){for(fe=B.children,N=0,re=fe.length;N<re;N++)if(q=fe[N],(q.type===h.Text||q.type===h.Raw)&&q.value!=null){k.suppressPrettyCount++,ie=!0;break}}for(Ae+=">"+this.endline(B,k,D),k.state=d.InsideTag,ve=B.children,K=0,ne=ve.length;K<ne;K++)q=ve[K],Ae+=this.writeChildNode(q,k,D+1);k.state=d.CloseTag,Ae+=this.indent(B,k,D)+"</"+B.name+">",ie&&k.suppressPrettyCount--,Ae+=this.endline(B,k,D),k.state=d.None}return this.closeNode(B,k,D),Ae},X.prototype.writeChildNode=function(B,k,D){switch(B.type){case h.CData:return this.cdata(B,k,D);case h.Comment:return this.comment(B,k,D);case h.Element:return this.element(B,k,D);case h.Raw:return this.raw(B,k,D);case h.Text:return this.text(B,k,D);case h.ProcessingInstruction:return this.processingInstruction(B,k,D);case h.Dummy:return"";case h.Declaration:return this.declaration(B,k,D);case h.DocType:return this.docType(B,k,D);case h.AttributeDeclaration:return this.dtdAttList(B,k,D);case h.ElementDeclaration:return this.dtdElement(B,k,D);case h.EntityDeclaration:return this.dtdEntity(B,k,D);case h.NotationDeclaration:return this.dtdNotation(B,k,D);default:throw new Error("Unknown XML node type: "+B.constructor.name)}},X.prototype.processingInstruction=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<?",k.state=d.InsideTag,L+=B.target,B.value&&(L+=" "+B.value),k.state=d.CloseTag,L+=k.spaceBeforeSlash+"?>",L+=this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.raw=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D),k.state=d.InsideTag,L+=B.value,k.state=d.CloseTag,L+=this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.text=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D),k.state=d.InsideTag,L+=B.value,k.state=d.CloseTag,L+=this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.dtdAttList=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<!ATTLIST",k.state=d.InsideTag,L+=" "+B.elementName+" "+B.attributeName+" "+B.attributeType,B.defaultValueType!=="#DEFAULT"&&(L+=" "+B.defaultValueType),B.defaultValue&&(L+=' "'+B.defaultValue+'"'),k.state=d.CloseTag,L+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.dtdElement=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<!ELEMENT",k.state=d.InsideTag,L+=" "+B.name+" "+B.value,k.state=d.CloseTag,L+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.dtdEntity=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<!ENTITY",k.state=d.InsideTag,B.pe&&(L+=" %"),L+=" "+B.name,B.value?L+=' "'+B.value+'"':(B.pubID&&B.sysID?L+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.sysID&&(L+=' SYSTEM "'+B.sysID+'"'),B.nData&&(L+=" NDATA "+B.nData)),k.state=d.CloseTag,L+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.dtdNotation=function(B,k,D){var L;return this.openNode(B,k,D),k.state=d.OpenTag,L=this.indent(B,k,D)+"<!NOTATION",k.state=d.InsideTag,L+=" "+B.name,B.pubID&&B.sysID?L+=' PUBLIC "'+B.pubID+'" "'+B.sysID+'"':B.pubID?L+=' PUBLIC "'+B.pubID+'"':B.sysID&&(L+=' SYSTEM "'+B.sysID+'"'),k.state=d.CloseTag,L+=k.spaceBeforeSlash+">"+this.endline(B,k,D),k.state=d.None,this.closeNode(B,k,D),L},X.prototype.openNode=function(B,k,D){},X.prototype.closeNode=function(B,k,D){},X.prototype.openAttribute=function(B,k,D){},X.prototype.closeAttribute=function(B,k,D){},X}()}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLCData":432,"./XMLComment":434,"./XMLDTDAttList":439,"./XMLDTDElement":440,"./XMLDTDEntity":441,"./XMLDTDNotation":442,"./XMLDeclaration":443,"./XMLDocType":444,"./XMLDummy":447,"./XMLElement":448,"./XMLProcessingInstruction":452,"./XMLRaw":453,"./XMLText":457}],459:[function(o,_,j){(function(){var h,d,p,b,g,w,c,m,v,y;y=o("./Utility"),m=y.assign,v=y.isFunction,p=o("./XMLDOMImplementation"),b=o("./XMLDocument"),g=o("./XMLDocumentCB"),c=o("./XMLStringWriter"),w=o("./XMLStreamWriter"),h=o("./NodeType"),d=o("./WriterState"),_.exports.create=function(E,T,S,C){var x,O;if(E==null)throw new Error("Root element needs a name.");return C=m({},T,S,C),x=new b(C),O=x.element(E),C.headless||(x.declaration(C),(C.pubID!=null||C.sysID!=null)&&x.dtd(C)),O},_.exports.begin=function(E,T,S){var C;return v(E)&&(C=[E,T],T=C[0],S=C[1],E={}),T?new g(E,T,S):new b(E)},_.exports.stringWriter=function(E){return new c(E)},_.exports.streamWriter=function(E,T){return new w(E,T)},_.exports.implementation=new p,_.exports.nodeType=h,_.exports.writerState=d}).call(this)},{"./NodeType":428,"./Utility":429,"./WriterState":430,"./XMLDOMImplementation":437,"./XMLDocument":445,"./XMLDocumentCB":446,"./XMLStreamWriter":454,"./XMLStringWriter":455}],460:[function(o,_,j){_.exports=d;var h=Object.prototype.hasOwnProperty;function d(){for(var p={},b=0;b<arguments.length;b++){var g=arguments[b];for(var w in g)h.call(g,w)&&(p[w]=g[w])}return p}},{}],461:[function(o,_,j){"use strict";o("core-js/modules/es.array.fill.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.array.slice.js");var h=o("buffer").Buffer,d=o("./sha"),p=o("./md5"),b={sha1:d,md5:p},g=64,w=h.alloc(g);w.fill(0);function c(y,E,T){h.isBuffer(E)||(E=h.from(E)),h.isBuffer(T)||(T=h.from(T)),E.length>g?E=y(E):E.length<g&&(E=h.concat([E,w],g));for(var S=h.alloc(g),C=h.alloc(g),x=0;x<g;x++)S[x]=E[x]^54,C[x]=E[x]^92;var O=y(h.concat([S,T]));return y(h.concat([C,O]))}function m(y,E){y=y||"sha1";var T=b[y],S=[],C=0;return T||v("algorithm:",y,"is not yet supported"),{update:function(O){return h.isBuffer(O)||(O=h.from(O)),S.push(O),C+=O.length,this},digest:function(O){var J=h.concat(S),P=E?c(T,E,J):T(J);return S=null,O?P.toString(O):P}}}function v(){var y=[].slice.call(arguments).join(" ");throw new Error([y,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
`))}j.createHash=function(y){return m(y)},j.createHmac=function(y,E){return m(y,E)},j.createCredentials=function(){v("sorry,createCredentials is not implemented yet")},j.createCipher=function(){v("sorry,createCipher is not implemented yet")},j.createCipheriv=function(){v("sorry,createCipheriv is not implemented yet")},j.createDecipher=function(){v("sorry,createDecipher is not implemented yet")},j.createDecipheriv=function(){v("sorry,createDecipheriv is not implemented yet")},j.createSign=function(){v("sorry,createSign is not implemented yet")},j.createVerify=function(){v("sorry,createVerify is not implemented yet")},j.createDiffieHellman=function(){v("sorry,createDiffieHellman is not implemented yet")},j.pbkdf2=function(){v("sorry,pbkdf2 is not implemented yet")}},{"./md5":463,"./sha":464,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.regexp.to-string.js":301}],462:[function(o,_,j){"use strict";o("core-js/modules/es.array.fill.js"),o("core-js/modules/es.array.concat.js");var h=o("buffer").Buffer,d=4,p=h.alloc(d);p.fill(0);var b=8;function g(m,v){if(m.length%d!==0){var y=m.length+(d-m.length%d);m=h.concat([m,p],y)}for(var E=[],T=v?m.readInt32BE:m.readInt32LE,S=0;S<m.length;S+=d)E.push(T.call(m,S));return E}function w(m,v,y){for(var E=h.alloc(v),T=y?E.writeInt32BE:E.writeInt32LE,S=0;S<m.length;S++)T.call(E,m[S],S*4,!0);return E}function c(m,v,y,E){h.isBuffer(m)||(m=h.from(m));var T=v(g(m,E),m.length*b);return w(T,y,E)}_.exports={hash:c}},{buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.fill.js":273}],463:[function(o,_,j){"use strict";var h=o("./helpers");function d(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function p(E,T){E[T>>5]|=128<<T%32,E[(T+64>>>9<<4)+14]=T;for(var S=1732584193,C=-271733879,x=-1732584194,O=271733878,J=0;J<E.length;J+=16){var P=S,X=C,B=x,k=O;S=g(S,C,x,O,E[J+0],7,-680876936),O=g(O,S,C,x,E[J+1],12,-389564586),x=g(x,O,S,C,E[J+2],17,606105819),C=g(C,x,O,S,E[J+3],22,-1044525330),S=g(S,C,x,O,E[J+4],7,-176418897),O=g(O,S,C,x,E[J+5],12,1200080426),x=g(x,O,S,C,E[J+6],17,-1473231341),C=g(C,x,O,S,E[J+7],22,-45705983),S=g(S,C,x,O,E[J+8],7,1770035416),O=g(O,S,C,x,E[J+9],12,-1958414417),x=g(x,O,S,C,E[J+10],17,-42063),C=g(C,x,O,S,E[J+11],22,-1990404162),S=g(S,C,x,O,E[J+12],7,1804603682),O=g(O,S,C,x,E[J+13],12,-40341101),x=g(x,O,S,C,E[J+14],17,-1502002290),C=g(C,x,O,S,E[J+15],22,1236535329),S=w(S,C,x,O,E[J+1],5,-165796510),O=w(O,S,C,x,E[J+6],9,-1069501632),x=w(x,O,S,C,E[J+11],14,643717713),C=w(C,x,O,S,E[J+0],20,-373897302),S=w(S,C,x,O,E[J+5],5,-701558691),O=w(O,S,C,x,E[J+10],9,38016083),x=w(x,O,S,C,E[J+15],14,-660478335),C=w(C,x,O,S,E[J+4],20,-405537848),S=w(S,C,x,O,E[J+9],5,568446438),O=w(O,S,C,x,E[J+14],9,-1019803690),x=w(x,O,S,C,E[J+3],14,-187363961),C=w(C,x,O,S,E[J+8],20,1163531501),S=w(S,C,x,O,E[J+13],5,-1444681467),O=w(O,S,C,x,E[J+2],9,-51403784),x=w(x,O,S,C,E[J+7],14,1735328473),C=w(C,x,O,S,E[J+12],20,-1926607734),S=c(S,C,x,O,E[J+5],4,-378558),O=c(O,S,C,x,E[J+8],11,-2022574463),x=c(x,O,S,C,E[J+11],16,1839030562),C=c(C,x,O,S,E[J+14],23,-35309556),S=c(S,C,x,O,E[J+1],4,-1530992060),O=c(O,S,C,x,E[J+4],11,1272893353),x=c(x,O,S,C,E[J+7],16,-155497632),C=c(C,x,O,S,E[J+10],23,-1094730640),S=c(S,C,x,O,E[J+13],4,681279174),O=c(O,S,C,x,E[J+0],11,-358537222),x=c(x,O,S,C,E[J+3],16,-722521979),C=c(C,x,O,S,E[J+6],23,76029189),S=c(S,C,x,O,E[J+9],4,-640364487),O=c(O,S,C,x,E[J+12],11,-421815835),x=c(x,O,S,C,E[J+15],16,530742520),C=c(C,x,O,S,E[J+2],23,-995338651),S=m(S,C,x,O,E[J+0],6,-198630844),O=m(O,S,C,x,E[J+7],10,1126891415),x=m(x,O,S,C,E[J+14],15,-1416354905),C=m(C,x,O,S,E[J+5],21,-57434055),S=m(S,C,x,O,E[J+12],6,1700485571),O=m(O,S,C,x,E[J+3],10,-1894986606),x=m(x,O,S,C,E[J+10],15,-1051523),C=m(C,x,O,S,E[J+1],21,-2054922799),S=m(S,C,x,O,E[J+8],6,1873313359),O=m(O,S,C,x,E[J+15],10,-30611744),x=m(x,O,S,C,E[J+6],15,-1560198380),C=m(C,x,O,S,E[J+13],21,1309151649),S=m(S,C,x,O,E[J+4],6,-145523070),O=m(O,S,C,x,E[J+11],10,-1120210379),x=m(x,O,S,C,E[J+2],15,718787259),C=m(C,x,O,S,E[J+9],21,-343485551),S=v(S,P),C=v(C,X),x=v(x,B),O=v(O,k)}return Array(S,C,x,O)}function b(E,T,S,C,x,O){return v(y(v(v(T,E),v(C,O)),x),S)}function g(E,T,S,C,x,O,J){return b(T&S|~T&C,E,T,x,O,J)}function w(E,T,S,C,x,O,J){return b(T&C|S&~C,E,T,x,O,J)}function c(E,T,S,C,x,O,J){return b(T^S^C,E,T,x,O,J)}function m(E,T,S,C,x,O,J){return b(S^(T|~C),E,T,x,O,J)}function v(E,T){var S=(E&65535)+(T&65535),C=(E>>16)+(T>>16)+(S>>16);return C<<16|S&65535}function y(E,T){return E<<T|E>>>32-T}_.exports=function(T){return h.hash(T,p,16)}},{"./helpers":462}],464:[function(o,_,j){"use strict";var h=o("./helpers");function d(c,m){c[m>>5]|=128<<24-m%32,c[(m+64>>9<<4)+15]=m;for(var v=Array(80),y=1732584193,E=-271733879,T=-1732584194,S=271733878,C=-1009589776,x=0;x<c.length;x+=16){for(var O=y,J=E,P=T,X=S,B=C,k=0;k<80;k++){k<16?v[k]=c[x+k]:v[k]=w(v[k-3]^v[k-8]^v[k-14]^v[k-16],1);var D=g(g(w(y,5),p(k,E,T,S)),g(g(C,v[k]),b(k)));C=S,S=T,T=w(E,30),E=y,y=D}y=g(y,O),E=g(E,J),T=g(T,P),S=g(S,X),C=g(C,B)}return Array(y,E,T,S,C)}function p(c,m,v,y){return c<20?m&v|~m&y:c<40?m^v^y:c<60?m&v|m&y|v&y:m^v^y}function b(c){return c<20?1518500249:c<40?1859775393:c<60?-1894007588:-899497514}function g(c,m){var v=(c&65535)+(m&65535),y=(c>>16)+(m>>16)+(v>>16);return y<<16|v&65535}function w(c,m){return c<<m|c>>>32-m}_.exports=function(m){return h.hash(m,d,20,!0)}},{"./helpers":462}],465:[function(o,_,j){"use strict";_.exports=function(){return function(){}}},{}],466:[function(o,_,j){(function(h){(function(){"use strict";var d=o("@babel/runtime/helpers/interopRequireDefault"),p=d(o("@babel/runtime/helpers/typeof")),b=o("stream"),g=b.Stream,w=o("../lib/common/utils/isArray"),c=w.isArray;_.exports.string=function(y){return typeof y=="string"},_.exports.array=c,_.exports.buffer=h.isBuffer;function m(v){return v instanceof g}_.exports.writableStream=function(y){return m(y)&&typeof y._write=="function"&&(0,p.default)(y._writableState)==="object"}}).call(this)}).call(this,{isBuffer:o("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":63,"../node_modules/is-buffer/index.js":366,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,stream:398}],467:[function(o,_,j){"use strict";var h=o("immediate"),d=_.exports={};d.nextTick=h,d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={};function p(){}d.on=p,d.addListener=p,d.once=p,d.off=p,d.removeListener=p,d.removeAllListeners=p,d.emit=p,d.prependListener=p,d.prependOnceListener=p,d.listeners=function(b){return[]},d.binding=function(b){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(b){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{immediate:358}],468:[function(o,_,j){(function(h){(function(){"use strict";o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.search.js");var d=o("./lib/request"),p=o("./lib/response"),b=o("xtend"),g=o("builtin-status-codes"),w=o("url"),c=j;c.request=function(m,v){typeof m=="string"?m=w.parse(m):m=b(m);var y=h.location.protocol.search(/^https?:$/)===-1?"http:":"",E=m.protocol||y,T=m.hostname||m.host,S=m.port,C=m.path||"/";T&&T.indexOf(":")!==-1&&(T="["+T+"]"),m.url=(T?E+"//"+T:"")+(S?":"+S:"")+C,m.method=(m.method||"GET").toUpperCase(),m.headers=m.headers||{};var x=new d(m);return v&&x.on("response",v),x},c.get=function(v,y){var E=c.request(v,y);return E.end(),E},c.ClientRequest=d,c.IncomingMessage=p.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=g,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":470,"./lib/response":471,"builtin-status-codes":91,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.search.js":306,url:472,xtend:460}],469:[function(o,_,j){(function(h){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.array-buffer.constructor.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.array.slice.js"),j.fetch=c(h.fetch)&&c(h.ReadableStream),j.writableStream=c(h.WritableStream),j.abortController=c(h.AbortController),j.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),j.blobConstructor=!0}catch(m){}var d;function p(){if(d!==void 0)return d;if(h.XMLHttpRequest){d=new h.XMLHttpRequest;try{d.open("GET",h.XDomainRequest?"/":"https://example.com")}catch(m){d=null}}else d=null;return d}function b(m){var v=p();if(!v)return!1;try{return v.responseType=m,v.responseType===m}catch(y){}return!1}var g=typeof h.ArrayBuffer!="undefined",w=g&&c(h.ArrayBuffer.prototype.slice);j.arraybuffer=j.fetch||g&&b("arraybuffer"),j.msstream=!j.fetch&&w&&b("ms-stream"),j.mozchunkedarraybuffer=!j.fetch&&g&&b("moz-chunked-arraybuffer"),j.overrideMimeType=j.fetch||(p()?c(p().overrideMimeType):!1),j.vbArray=c(h.VBArray);function c(m){return typeof m=="function"}d=null}).call(this)}).call(this,typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"core-js/modules/es.array-buffer.constructor.js":270,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295}],470:[function(o,_,j){(function(h,d,p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.regexp.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.array.map.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js");var b=o("./capability"),g=o("inherits"),w=o("./response"),c=o("readable-stream"),m=o("to-arraybuffer"),v=w.IncomingMessage,y=w.readyStates;function E(x,O){return b.fetch&&O?"fetch":b.mozchunkedarraybuffer?"moz-chunked-arraybuffer":b.msstream?"ms-stream":b.arraybuffer&&x?"arraybuffer":b.vbArray&&x?"text:vbarray":"text"}var T=_.exports=function(x){var O=this;c.Writable.call(O),O._opts=x,O._body=[],O._headers={},x.auth&&O.setHeader("Authorization","Basic "+new p(x.auth).toString("base64")),Object.keys(x.headers).forEach(function(X){O.setHeader(X,x.headers[X])});var J,P=!0;if(x.mode==="disable-fetch"||"requestTimeout"in x&&!b.abortController)P=!1,J=!0;else if(x.mode==="prefer-streaming")J=!1;else if(x.mode==="allow-wrong-content-type")J=!b.overrideMimeType;else if(!x.mode||x.mode==="default"||x.mode==="prefer-fast")J=!0;else throw new Error("Invalid value for opts.mode");O._mode=E(J,P),O._fetchTimer=null,O.on("finish",function(){O._onFinish()})};g(T,c.Writable),T.prototype.setHeader=function(x,O){var J=this,P=x.toLowerCase();C.indexOf(P)===-1&&(J._headers[P]={name:x,value:O})},T.prototype.getHeader=function(x){var O=this._headers[x.toLowerCase()];return O?O.value:null},T.prototype.removeHeader=function(x){var O=this;delete O._headers[x.toLowerCase()]},T.prototype._onFinish=function(){var x=this;if(!x._destroyed){var O=x._opts,J=x._headers,P=null;O.method!=="GET"&&O.method!=="HEAD"&&(b.arraybuffer?P=m(p.concat(x._body)):b.blobConstructor?P=new d.Blob(x._body.map(function(q){return m(q)}),{type:(J["content-type"]||{}).value||""}):P=p.concat(x._body).toString());var X=[];if(Object.keys(J).forEach(function(q){var G=J[q].name,F=J[q].value;Array.isArray(F)?F.forEach(function(N){X.push([G,N])}):X.push([G,F])}),x._mode==="fetch"){var B=null,k=null;if(b.abortController){var D=new AbortController;B=D.signal,x._fetchAbortController=D,"requestTimeout"in O&&O.requestTimeout!==0&&(x._fetchTimer=d.setTimeout(function(){x.emit("requestTimeout"),x._fetchAbortController&&x._fetchAbortController.abort()},O.requestTimeout))}d.fetch(x._opts.url,{method:x._opts.method,headers:X,body:P||void 0,mode:"cors",credentials:O.withCredentials?"include":"same-origin",signal:B}).then(function(q){x._fetchResponse=q,x._connect()},function(q){d.clearTimeout(x._fetchTimer),x._destroyed||x.emit("error",q)})}else{var L=x._xhr=new d.XMLHttpRequest;try{L.open(x._opts.method,x._opts.url,!0)}catch(q){h.nextTick(function(){x.emit("error",q)});return}"responseType"in L&&(L.responseType=x._mode.split(":")[0]),"withCredentials"in L&&(L.withCredentials=!!O.withCredentials),x._mode==="text"&&"overrideMimeType"in L&&L.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in O&&(L.timeout=O.requestTimeout,L.ontimeout=function(){x.emit("requestTimeout")}),X.forEach(function(q){L.setRequestHeader(q[0],q[1])}),x._response=null,L.onreadystatechange=function(){switch(L.readyState){case y.LOADING:case y.DONE:x._onXHRProgress();break}},x._mode==="moz-chunked-arraybuffer"&&(L.onprogress=function(){x._onXHRProgress()}),L.onerror=function(){x._destroyed||x.emit("error",new Error("XHR error"))};try{L.send(P)}catch(q){h.nextTick(function(){x.emit("error",q)});return}}}};function S(x){try{var O=x.status;return O!==null&&O!==0}catch(J){return!1}}T.prototype._onXHRProgress=function(){var x=this;!S(x._xhr)||x._destroyed||(x._response||x._connect(),x._response._onXHRProgress())},T.prototype._connect=function(){var x=this;x._destroyed||(x._response=new v(x._xhr,x._fetchResponse,x._mode,x._fetchTimer),x._response.on("error",function(O){x.emit("error",O)}),x.emit("response",x._response))},T.prototype._write=function(x,O,J){var P=this;P._body.push(x),J()},T.prototype.abort=T.prototype.destroy=function(){var x=this;x._destroyed=!0,d.clearTimeout(x._fetchTimer),x._response&&(x._response._destroyed=!0),x._xhr?x._xhr.abort():x._fetchAbortController&&x._fetchAbortController.abort()},T.prototype.end=function(x,O,J){var P=this;typeof x=="function"&&(J=x,x=void 0),c.Writable.prototype.end.call(P,x,O,J)},T.prototype.flushHeaders=function(){},T.prototype.setTimeout=function(){},T.prototype.setNoDelay=function(){},T.prototype.setSocketKeepAlive=function(){};var C=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this)}).call(this,o("_process"),typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("buffer").Buffer)},{"./capability":469,"./response":471,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.map.js":280,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.regexp.to-string.js":301,"core-js/modules/es.string.split.js":307,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394,"to-arraybuffer":415}],471:[function(o,_,j){(function(h,d,p){(function(){"use strict";o("core-js/modules/es.object.to-string.js"),o("core-js/modules/web.dom-collections.for-each.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.string.match.js"),o("core-js/modules/es.array.iterator.js"),o("core-js/modules/es.array-buffer.slice.js"),o("core-js/modules/es.typed-array.uint8-array.js"),o("core-js/modules/es.typed-array.copy-within.js"),o("core-js/modules/es.typed-array.every.js"),o("core-js/modules/es.typed-array.fill.js"),o("core-js/modules/es.typed-array.filter.js"),o("core-js/modules/es.typed-array.find.js"),o("core-js/modules/es.typed-array.find-index.js"),o("core-js/modules/es.typed-array.for-each.js"),o("core-js/modules/es.typed-array.includes.js"),o("core-js/modules/es.typed-array.index-of.js"),o("core-js/modules/es.typed-array.iterator.js"),o("core-js/modules/es.typed-array.join.js"),o("core-js/modules/es.typed-array.last-index-of.js"),o("core-js/modules/es.typed-array.map.js"),o("core-js/modules/es.typed-array.reduce.js"),o("core-js/modules/es.typed-array.reduce-right.js"),o("core-js/modules/es.typed-array.reverse.js"),o("core-js/modules/es.typed-array.set.js"),o("core-js/modules/es.typed-array.slice.js"),o("core-js/modules/es.typed-array.some.js"),o("core-js/modules/es.typed-array.sort.js"),o("core-js/modules/es.typed-array.subarray.js"),o("core-js/modules/es.typed-array.to-locale-string.js"),o("core-js/modules/es.typed-array.to-string.js"),o("core-js/modules/es.array.slice.js");var b=o("./capability"),g=o("inherits"),w=o("readable-stream"),c=j.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},m=j.IncomingMessage=function(v,y,E,T){var S=this;if(w.Readable.call(S),S._mode=E,S.headers={},S.rawHeaders=[],S.trailers={},S.rawTrailers=[],S.on("end",function(){h.nextTick(function(){S.emit("close")})}),E==="fetch"){var C=function B(){O.read().then(function(k){if(!S._destroyed){if(k.done){d.clearTimeout(T),S.push(null);return}S.push(new p(k.value)),B()}}).catch(function(k){d.clearTimeout(T),S._destroyed||S.emit("error",k)})};if(S._fetchResponse=y,S.url=y.url,S.statusCode=y.status,S.statusMessage=y.statusText,y.headers.forEach(function(B,k){S.headers[k.toLowerCase()]=B,S.rawHeaders.push(k,B)}),b.writableStream){var x=new WritableStream({write:function(k){return new Promise(function(D,L){S._destroyed?L():S.push(new p(k))?D():S._resumeFetch=D})},close:function(){d.clearTimeout(T),S._destroyed||S.push(null)},abort:function(k){S._destroyed||S.emit("error",k)}});try{y.body.pipeTo(x).catch(function(B){d.clearTimeout(T),S._destroyed||S.emit("error",B)});return}catch(B){}}var O=y.body.getReader();C()}else{S._xhr=v,S._pos=0,S.url=v.responseURL,S.statusCode=v.status,S.statusMessage=v.statusText;var J=v.getAllResponseHeaders().split(/\r?\n/);if(J.forEach(function(B){var k=B.match(/^([^:]+):\s*(.*)/);if(k){var D=k[1].toLowerCase();D==="set-cookie"?(S.headers[D]===void 0&&(S.headers[D]=[]),S.headers[D].push(k[2])):S.headers[D]!==void 0?S.headers[D]+=", "+k[2]:S.headers[D]=k[2],S.rawHeaders.push(k[1],k[2])}}),S._charset="x-user-defined",!b.overrideMimeType){var P=S.rawHeaders["mime-type"];if(P){var X=P.match(/;\s*charset=([^;])(;|$)/);X&&(S._charset=X[1].toLowerCase())}S._charset||(S._charset="utf-8")}}};g(m,w.Readable),m.prototype._read=function(){var v=this,y=v._resumeFetch;y&&(v._resumeFetch=null,y())},m.prototype._onXHRProgress=function(){var v=this,y=v._xhr,E=null;switch(v._mode){case"text:vbarray":if(y.readyState!==c.DONE)break;try{E=new d.VBArray(y.responseBody).toArray()}catch(O){}if(E!==null){v.push(new p(E));break}case"text":try{E=y.responseText}catch(O){v._mode="text:vbarray";break}if(E.length>v._pos){var T=E.substr(v._pos);if(v._charset==="x-user-defined"){for(var S=new p(T.length),C=0;C<T.length;C++)S[C]=T.charCodeAt(C)&255;v.push(S)}else v.push(T,v._charset);v._pos=E.length}break;case"arraybuffer":if(y.readyState!==c.DONE||!y.response)break;E=y.response,v.push(new p(new Uint8Array(E)));break;case"moz-chunked-arraybuffer":if(E=y.response,y.readyState!==c.LOADING||!E)break;v.push(new p(new Uint8Array(E)));break;case"ms-stream":if(E=y.response,y.readyState!==c.LOADING)break;var x=new d.MSStreamReader;x.onprogress=function(){x.result.byteLength>v._pos&&(v.push(new p(new Uint8Array(x.result.slice(v._pos)))),v._pos=x.result.byteLength)},x.onload=function(){v.push(null)},x.readAsArrayBuffer(E);break}v._xhr.readyState===c.DONE&&v._mode!=="ms-stream"&&v.push(null)}}).call(this)}).call(this,o("_process"),typeof ct!="undefined"?ct:typeof self!="undefined"?self:typeof window!="undefined"?window:{},o("buffer").Buffer)},{"./capability":469,_process:467,buffer:90,"core-js/modules/es.array-buffer.slice.js":271,"core-js/modules/es.array.iterator.js":278,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.split.js":307,"core-js/modules/es.typed-array.copy-within.js":315,"core-js/modules/es.typed-array.every.js":316,"core-js/modules/es.typed-array.fill.js":317,"core-js/modules/es.typed-array.filter.js":318,"core-js/modules/es.typed-array.find-index.js":319,"core-js/modules/es.typed-array.find.js":320,"core-js/modules/es.typed-array.for-each.js":321,"core-js/modules/es.typed-array.includes.js":322,"core-js/modules/es.typed-array.index-of.js":323,"core-js/modules/es.typed-array.iterator.js":324,"core-js/modules/es.typed-array.join.js":325,"core-js/modules/es.typed-array.last-index-of.js":326,"core-js/modules/es.typed-array.map.js":327,"core-js/modules/es.typed-array.reduce-right.js":328,"core-js/modules/es.typed-array.reduce.js":329,"core-js/modules/es.typed-array.reverse.js":330,"core-js/modules/es.typed-array.set.js":331,"core-js/modules/es.typed-array.slice.js":332,"core-js/modules/es.typed-array.some.js":333,"core-js/modules/es.typed-array.sort.js":334,"core-js/modules/es.typed-array.subarray.js":335,"core-js/modules/es.typed-array.to-locale-string.js":336,"core-js/modules/es.typed-array.to-string.js":337,"core-js/modules/es.typed-array.uint8-array.js":338,"core-js/modules/web.dom-collections.for-each.js":339,inherits:364,"readable-stream":394}],472:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/helpers/typeof"));o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.search.js"),o("core-js/modules/es.array.concat.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.string.replace.js"),o("core-js/modules/es.array.join.js"),o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.string.match.js"),o("core-js/modules/es.array.slice.js"),o("core-js/modules/es.object.keys.js"),o("core-js/modules/es.array.splice.js");var p=o("punycode"),b=o("./util");j.parse=k,j.resolve=L,j.resolveObject=q,j.format=D,j.Url=g;function g(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var w=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,m=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,v=["<",">",'"',"`"," ","\r",`
|
|
`," "],y=["{","}","|","\\","^","`"].concat(v),E=["'"].concat(y),T=["%","/","?",";","#"].concat(E),S=["/","?","#"],C=255,x=/^[+a-z0-9A-Z_-]{0,63}$/,O=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,J={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},X={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},B=o("querystring");function k(G,F,N){if(G&&b.isObject(G)&&G instanceof g)return G;var K=new g;return K.parse(G,F,N),K}g.prototype.parse=function(G,F,N){if(!b.isString(G))throw new TypeError("Parameter 'url' must be a string, not "+(0,d.default)(G));var K=G.indexOf("?"),re=K!==-1&&K<G.indexOf("#")?"?":"#",ne=G.split(re),pe=/\\/g;ne[0]=ne[0].replace(pe,"/"),G=ne.join(re);var ie=G;if(ie=ie.trim(),!N&&G.split("#").length===1){var Ae=m.exec(ie);if(Ae)return this.path=ie,this.href=ie,this.pathname=Ae[1],Ae[2]?(this.search=Ae[2],F?this.query=B.parse(this.search.substr(1)):this.query=this.search.substr(1)):F&&(this.search="",this.query={}),this}var Y=w.exec(ie);if(Y){Y=Y[0];var fe=Y.toLowerCase();this.protocol=fe,ie=ie.substr(Y.length)}if(N||Y||ie.match(/^\/\/[^@\/]+@[^@\/]+/)){var ve=ie.substr(0,2)==="//";ve&&!(Y&&P[Y])&&(ie=ie.substr(2),this.slashes=!0)}if(!P[Y]&&(ve||Y&&!X[Y])){for(var be=-1,le=0;le<S.length;le++){var ue=ie.indexOf(S[le]);ue!==-1&&(be===-1||ue<be)&&(be=ue)}var ge,Ee;be===-1?Ee=ie.lastIndexOf("@"):Ee=ie.lastIndexOf("@",be),Ee!==-1&&(ge=ie.slice(0,Ee),ie=ie.slice(Ee+1),this.auth=decodeURIComponent(ge)),be=-1;for(var le=0;le<T.length;le++){var ue=ie.indexOf(T[le]);ue!==-1&&(be===-1||ue<be)&&(be=ue)}be===-1&&(be=ie.length),this.host=ie.slice(0,be),ie=ie.slice(be),this.parseHost(),this.hostname=this.hostname||"";var ke=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ke)for(var Ie=this.hostname.split("."),le=0,de=Ie.length;le<de;le++){var Z=Ie[le];if(Z&&!Z.match(x)){for(var ye="",V=0,Q=Z.length;V<Q;V++)Z.charCodeAt(V)>127?ye+="x":ye+=Z[V];if(!ye.match(x)){var U=Ie.slice(0,le),H=Ie.slice(le+1),ee=Z.match(O);ee&&(U.push(ee[1]),H.unshift(ee[2])),H.length&&(ie="/"+H.join(".")+ie),this.hostname=U.join(".");break}}}this.hostname.length>C?this.hostname="":this.hostname=this.hostname.toLowerCase(),ke||(this.hostname=p.toASCII(this.hostname));var W=this.port?":"+this.port:"",M=this.hostname||"";this.host=M+W,this.href+=this.host,ke&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),ie[0]!=="/"&&(ie="/"+ie))}if(!J[fe])for(var le=0,de=E.length;le<de;le++){var $=E[le];if(ie.indexOf($)!==-1){var ce=encodeURIComponent($);ce===$&&(ce=escape($)),ie=ie.split($).join(ce)}}var Ce=ie.indexOf("#");Ce!==-1&&(this.hash=ie.substr(Ce),ie=ie.slice(0,Ce));var Ue=ie.indexOf("?");if(Ue!==-1?(this.search=ie.substr(Ue),this.query=ie.substr(Ue+1),F&&(this.query=B.parse(this.query)),ie=ie.slice(0,Ue)):F&&(this.search="",this.query={}),ie&&(this.pathname=ie),X[fe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var W=this.pathname||"",_e=this.search||"";this.path=W+_e}return this.href=this.format(),this};function D(G){return b.isString(G)&&(G=k(G)),G instanceof g?G.format():g.prototype.format.call(G)}g.prototype.format=function(){var G=this.auth||"";G&&(G=encodeURIComponent(G),G=G.replace(/%3A/i,":"),G+="@");var F=this.protocol||"",N=this.pathname||"",K=this.hash||"",re=!1,ne="";this.host?re=G+this.host:this.hostname&&(re=G+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(re+=":"+this.port)),this.query&&b.isObject(this.query)&&Object.keys(this.query).length&&(ne=B.stringify(this.query));var pe=this.search||ne&&"?"+ne||"";return F&&F.substr(-1)!==":"&&(F+=":"),this.slashes||(!F||X[F])&&re!==!1?(re="//"+(re||""),N&&N.charAt(0)!=="/"&&(N="/"+N)):re||(re=""),K&&K.charAt(0)!=="#"&&(K="#"+K),pe&&pe.charAt(0)!=="?"&&(pe="?"+pe),N=N.replace(/[?#]/g,function(ie){return encodeURIComponent(ie)}),pe=pe.replace("#","%23"),F+re+N+pe+K};function L(G,F){return k(G,!1,!0).resolve(F)}g.prototype.resolve=function(G){return this.resolveObject(k(G,!1,!0)).format()};function q(G,F){return G?k(G,!1,!0).resolveObject(F):F}g.prototype.resolveObject=function(G){if(b.isString(G)){var F=new g;F.parse(G,!1,!0),G=F}for(var N=new g,K=Object.keys(this),re=0;re<K.length;re++){var ne=K[re];N[ne]=this[ne]}if(N.hash=G.hash,G.href==="")return N.href=N.format(),N;if(G.slashes&&!G.protocol){for(var pe=Object.keys(G),ie=0;ie<pe.length;ie++){var Ae=pe[ie];Ae!=="protocol"&&(N[Ae]=G[Ae])}return X[N.protocol]&&N.hostname&&!N.pathname&&(N.path=N.pathname="/"),N.href=N.format(),N}if(G.protocol&&G.protocol!==N.protocol){if(!X[G.protocol]){for(var Y=Object.keys(G),fe=0;fe<Y.length;fe++){var ve=Y[fe];N[ve]=G[ve]}return N.href=N.format(),N}if(N.protocol=G.protocol,!G.host&&!P[G.protocol]){for(var de=(G.pathname||"").split("/");de.length&&!(G.host=de.shift()););G.host||(G.host=""),G.hostname||(G.hostname=""),de[0]!==""&&de.unshift(""),de.length<2&&de.unshift(""),N.pathname=de.join("/")}else N.pathname=G.pathname;if(N.search=G.search,N.query=G.query,N.host=G.host||"",N.auth=G.auth,N.hostname=G.hostname||G.host,N.port=G.port,N.pathname||N.search){var be=N.pathname||"",le=N.search||"";N.path=be+le}return N.slashes=N.slashes||G.slashes,N.href=N.format(),N}var ue=N.pathname&&N.pathname.charAt(0)==="/",ge=G.host||G.pathname&&G.pathname.charAt(0)==="/",Ee=ge||ue||N.host&&G.pathname,ke=Ee,Ie=N.pathname&&N.pathname.split("/")||[],de=G.pathname&&G.pathname.split("/")||[],Z=N.protocol&&!X[N.protocol];if(Z&&(N.hostname="",N.port=null,N.host&&(Ie[0]===""?Ie[0]=N.host:Ie.unshift(N.host)),N.host="",G.protocol&&(G.hostname=null,G.port=null,G.host&&(de[0]===""?de[0]=G.host:de.unshift(G.host)),G.host=null),Ee=Ee&&(de[0]===""||Ie[0]==="")),ge)N.host=G.host||G.host===""?G.host:N.host,N.hostname=G.hostname||G.hostname===""?G.hostname:N.hostname,N.search=G.search,N.query=G.query,Ie=de;else if(de.length)Ie||(Ie=[]),Ie.pop(),Ie=Ie.concat(de),N.search=G.search,N.query=G.query;else if(!b.isNullOrUndefined(G.search)){if(Z){N.hostname=N.host=Ie.shift();var ye=N.host&&N.host.indexOf("@")>0?N.host.split("@"):!1;ye&&(N.auth=ye.shift(),N.host=N.hostname=ye.shift())}return N.search=G.search,N.query=G.query,(!b.isNull(N.pathname)||!b.isNull(N.search))&&(N.path=(N.pathname?N.pathname:"")+(N.search?N.search:"")),N.href=N.format(),N}if(!Ie.length)return N.pathname=null,N.search?N.path="/"+N.search:N.path=null,N.href=N.format(),N;for(var V=Ie.slice(-1)[0],Q=(N.host||G.host||Ie.length>1)&&(V==="."||V==="..")||V==="",U=0,H=Ie.length;H>=0;H--)V=Ie[H],V==="."?Ie.splice(H,1):V===".."?(Ie.splice(H,1),U++):U&&(Ie.splice(H,1),U--);if(!Ee&&!ke)for(;U--;U)Ie.unshift("..");Ee&&Ie[0]!==""&&(!Ie[0]||Ie[0].charAt(0)!=="/")&&Ie.unshift(""),Q&&Ie.join("/").substr(-1)!=="/"&&Ie.push("");var ee=Ie[0]===""||Ie[0]&&Ie[0].charAt(0)==="/";if(Z){N.hostname=N.host=ee?"":Ie.length?Ie.shift():"";var ye=N.host&&N.host.indexOf("@")>0?N.host.split("@"):!1;ye&&(N.auth=ye.shift(),N.host=N.hostname=ye.shift())}return Ee=Ee||N.host&&Ie.length,Ee&&!ee&&Ie.unshift(""),Ie.length?N.pathname=Ie.join("/"):(N.pathname=null,N.path=null),(!b.isNull(N.pathname)||!b.isNull(N.search))&&(N.path=(N.pathname?N.pathname:"")+(N.search?N.search:"")),N.auth=G.auth||N.auth,N.slashes=N.slashes||G.slashes,N.href=N.format(),N},g.prototype.parseHost=function(){var G=this.host,F=c.exec(G);F&&(F=F[0],F!==":"&&(this.port=F.substr(1)),G=G.substr(0,G.length-F.length)),G&&(this.hostname=G)}},{"./util":473,"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.array.join.js":279,"core-js/modules/es.array.slice.js":281,"core-js/modules/es.array.splice.js":283,"core-js/modules/es.object.keys.js":290,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.match.js":304,"core-js/modules/es.string.replace.js":305,"core-js/modules/es.string.search.js":306,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,punycode:382,querystring:385}],473:[function(o,_,j){"use strict";var h=o("@babel/runtime/helpers/interopRequireDefault"),d=h(o("@babel/runtime/helpers/typeof"));_.exports={isString:function(b){return typeof b=="string"},isObject:function(b){return(0,d.default)(b)==="object"&&b!==null},isNull:function(b){return b===null},isNullOrUndefined:function(b){return b==null}}},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79}],474:[function(o,_,j){"use strict";o("core-js/modules/es.number.constructor.js"),j.encodeURIComponent=function(h){try{return encodeURIComponent(h)}catch(d){return h}},j.escape=o("escape-html"),j.timestamp=function(d){if(d){var p=d;return typeof p=="string"&&(p=Number(p)),String(d).length===10&&(p*=1e3),new Date(p)}return Math.round(Date.now()/1e3)}},{"core-js/modules/es.number.constructor.js":286,"escape-html":343}],475:[function(o,_,j){(function(h,d){(function(){"use strict";var p=o("@babel/runtime/helpers/interopRequireDefault"),b=p(o("@babel/runtime/helpers/typeof"));o("core-js/modules/es.string.trim.js"),o("core-js/modules/es.regexp.exec.js"),o("core-js/modules/es.string.split.js"),o("core-js/modules/es.object.to-string.js"),o("core-js/modules/es.promise.js"),o("core-js/modules/es.function.name.js"),o("core-js/modules/es.array.concat.js");var g=o("util"),w=o("url"),c=o("http"),m=o("https"),v=o("debug")("urllib"),y=o("humanize-ms"),E=0,T=Math.pow(2,31)-10,S=/^https?:\/\//i;function C(P,X){return P===void 0?X:P}function x(P){return P?P.split(";")[0].trim().toLowerCase():""}function O(P,X){return function(B,k,D){if(B)return X(B);P({data:k,status:D.statusCode,headers:D.headers,res:D})}}j.TIMEOUTS=[y("300s"),y("300s")];var J=["json","text"];j.request=function(X,B,k){return arguments.length===2&&typeof B=="function"&&(k=B,B=null),typeof k=="function"?j.requestWithCallback(X,B,k):new Promise(function(D,L){j.requestWithCallback(X,B,O(D,L))})},j.requestWithCallback=function(X,B,k){if(!X||typeof X!="string"&&(0,b.default)(X)!=="object"){var D=g.format("expect request url to be a string or a http request options, but got %j",X);throw new Error(D)}arguments.length===2&&typeof B=="function"&&(k=B,B=null),B=B||{},E>=T&&(E=0);var L=++E;B.requestUrls=B.requestUrls||[];var q={requestId:L,url:X,args:B,ctx:B.ctx};B.emitter&&B.emitter.emit("request",q),B.timeout=B.timeout||j.TIMEOUTS,B.maxRedirects=B.maxRedirects||10,B.streaming=B.streaming||B.customResponse;var G=Date.now(),F;typeof X=="string"?(S.test(X)||(X="https://"+X),F=w.parse(X)):F=X;var N=(B.type||B.method||F.method||"GET").toUpperCase(),K=F.port||80,re=c,ne=C(B.agent,j.agent),pe=B.fixJSONCtlChars;F.protocol==="https:"&&(re=m,ne=C(B.httpsAgent,j.httpsAgent),F.port||(K=443));var ie={host:F.hostname||F.host||"localhost",path:F.path||"/",method:N,port:K,agent:ne,headers:B.headers||{},lookup:B.lookup};Array.isArray(B.timeout)?ie.requestTimeout=B.timeout[B.timeout.length-1]:typeof B.timeout!="undefined"&&(ie.requestTimeout=B.timeout);var Ae=B.auth||F.auth;Ae&&(ie.auth=Ae);var Y=B.content||B.data,fe=N==="GET"||N==="HEAD"||B.dataAsQueryString;if(!B.content&&Y&&!(typeof Y=="string"||d.isBuffer(Y)))if(fe)Y=B.nestedQuerystring?qs.stringify(Y):querystring.stringify(Y);else{var ve=ie.headers["Content-Type"]||ie.headers["content-type"];ve||(B.contentType==="json"?ve="application/json":ve="application/x-www-form-urlencoded",ie.headers["Content-Type"]=ve),x(ve)==="application/json"?Y=JSON.stringify(Y):Y=B.nestedQuerystring?qs.stringify(Y):querystring.stringify(Y)}fe&&Y&&(ie.path+=(F.query?"&":"?")+Y,Y=null);var be=0;if(Y){var le=Y.length;d.isBuffer(Y)||(le=d.byteLength(Y)),be=ie.headers["Content-Length"]=le}B.dataType==="json"&&(ie.headers.Accept="application/json"),typeof B.beforeRequest=="function"&&B.beforeRequest(ie);var ue=null,ge=null,Ee=null,ke=!1,Ie=!1,de=0,Z=-1,ye=!1,V="",Q="",U=null;B.timing&&(U={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function H(){ue&&(clearTimeout(ue),ue=null)}function ee(){ge&&(clearTimeout(ge),ge=null)}function W(De,Xe,Ke){if(ee(),!k){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),L,h.pid,ie.method,X),De&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
stack: %s`,Date(),L,h.pid,De.name,De.message,De.stack);return}var $e=k;k=null;var Je={};Ke&&(Z=Ke.statusCode,Je=Ke.headers);var nt=Date.now()-G;U&&(U.contentDownload=nt),v("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",nt,de,Z,ie.method,ie.host,ie.path,Ie,U);var et={status:Z,statusCode:Z,headers:Je,size:de,aborted:ye,rt:nt,keepAliveSocket:Ie,data:Xe,requestUrls:B.requestUrls,timing:U,remoteAddress:V,remotePort:Q};if(De){var ht="";ne&&typeof ne.getCurrentStatus=="function"&&(ht=", agent status: "+JSON.stringify(ne.getCurrentStatus())),De.message+=", "+ie.method+" "+X+" "+Z+" (connected: "+ke+", keepalive socket: "+Ie+ht+`)
|
|
headers: `+JSON.stringify(Je),De.data=Xe,De.path=ie.path,De.status=Z,De.headers=Je,De.res=et}$e(De,Xe,B.streaming?Ke:et),B.emitter&&(q.url=X,q.socket=Pe&&Pe.connection,q.options=ie,q.size=be,B.emitter.emit("response",{requestId:L,error:De,ctx:B.ctx,req:q,res:et}))}function M(De){var Xe=null;if(B.followRedirect&&statuses.redirect[De.statusCode]){B._followRedirectCount=(B._followRedirectCount||0)+1;var Ke=De.headers.location;if(!Ke)Xe=new Error("Got statusCode "+De.statusCode+" but cannot resolve next location from headers"),Xe.name="FollowRedirectError";else if(B._followRedirectCount>B.maxRedirects)Xe=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+X),Xe.name="MaxRedirectError";else{var $e=B.formatRedirectUrl?B.formatRedirectUrl(X,Ke):w.resolve(X,Ke);v("Request#%d %s: `redirected` from %s to %s",L,ie.path,X,$e),ee(),B.headers&&B.headers.Host&&S.test(Ke)&&(B.headers.Host=null);var Je=k;return k=null,j.requestWithCallback($e,B,Je),{redirect:!0,error:null}}}return{redirect:!1,error:Xe}}B.gzip&&!ie.headers["Accept-Encoding"]&&!ie.headers["accept-encoding"]&&(ie.headers["Accept-Encoding"]="gzip");function $(De,Xe,Ke){var $e=De.headers["content-encoding"];return Ke(null,Xe,$e)}var ce=B.writeStream;v("Request#%d %s %s with headers %j, options.path: %s",L,N,X,ie.headers,ie.path),B.requestUrls.push(X);function Ce(De){if(U&&(U.waiting=Date.now()-G),v("Request#%d %s `req response` event emit: status %d, headers: %j",L,X,De.statusCode,De.headers),B.streaming){var Xe=M(De);if(Xe.redirect){De.resume();return}return Xe.error?(De.resume(),W(Xe.error,null,De)):W(null,null,De)}if(De.on("close",function(){v("Request#%d %s: `res close` event emit, total size %d",L,X,de)}),De.on("error",function(){v("Request#%d %s: `res error` event emit, total size %d",L,X,de)}),De.on("aborted",function(){ye=!0,v("Request#%d %s: `res aborted` event emit, total size %d",L,X,de)}),ce){var Ke=M(De);if(Ke.redirect){De.resume();return}return Ke.error?(De.resume(),ce.end(),W(Ke.error,null,De)):(B.consumeWriteStream===!1?De.on("end",W.bind(null,null,null,De)):ce.on("close",function(){v("Request#%d %s: writeStream close event emitted",L,X),W(Ee||null,null,De)}),De.pipe(ce))}var $e=[];De.on("data",function(Je){v("Request#%d %s: `res data` event emit, size %d",L,X,Je.length),de+=Je.length,$e.push(Je)}),De.on("end",function(){var Je=d.concat($e,de);if(v("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",L,X,de,De._dumped),Ee)return W(Ee,Je,De);var nt=M(De);if(nt.error)return W(nt.error,Je,De);nt.redirect||$(De,Je,function(et,ht,Et){if(et)return W(et,Je,De);if(!Et&&J.indexOf(B.dataType)>=0){try{ht=decodeBodyByCharset(ht,De)}catch(dr){return v("decodeBodyByCharset error: %s",dr),W(null,ht,De)}if(B.dataType==="json")if(de===0)ht=null;else{var zt=parseJSON(ht,pe);zt.error?et=zt.error:ht=zt.data}}ye&&v("Request#%d %s: Remote socket was terminated before `response.end()` was called",L,X),W(et,ht,De)})})}var Ue,_e;Array.isArray(B.timeout)?(Ue=y(B.timeout[0]),_e=y(B.timeout[1])):Ue=_e=y(B.timeout),v("ConnectTimeout: %d, ResponseTimeout: %d",Ue,_e);function he(){v("Connect timer ticking, timeout: %d",Ue),ue=setTimeout(function(){ue=null,Z===-1&&(Z=-2);var De="Connect timeout for "+Ue+"ms",Xe="ConnectionTimeoutError";Pe.socket||(Xe="SocketAssignTimeoutError",De+=", working sockets is full"),Ee=new Error(De),Ee.name=Xe,Ee.requestId=L,v("ConnectTimeout: Request#%d %s %s: %s, connected: %s",L,X,Ee.name,De,ke),Ve()},Ue)}function Te(){v("Response timer ticking, timeout: %d",_e),ge=setTimeout(function(){ge=null;var De="Response timeout for "+_e+"ms",Xe="ResponseTimeoutError";Ee=new Error(De),Ee.name=Xe,Ee.requestId=L,v("ResponseTimeout: Request#%d %s %s: %s, connected: %s",L,X,Ee.name,De,ke),Ve()},_e)}var Pe;ie.mode=B.mode?B.mode:"";try{Pe=re.request(ie,Ce)}catch(De){return W(De)}typeof window=="undefined"?he():Pe.on("requestTimeout",function(){Z===-1&&(Z=-2);var De="Connect timeout for "+Ue+"ms",Xe="ConnectionTimeoutError";Ee=new Error(De),Ee.name=Xe,Ee.requestId=L,Ve()});function Ve(){v("Request#%d %s abort, connected: %s",L,X,ke),Pe.socket||(Ee.noSocket=!0,W(Ee)),Pe.abort()}return U&&Pe.on("finish",function(){U.requestSent=Date.now()-G}),Pe.once("socket",function(De){U&&(U.queuing=Date.now()-G);var Xe=De.readyState;if(Xe==="opening"){De.once("lookup",function(Ke,$e,Je){v("Request#%d %s lookup: %s, %s, %s",L,X,Ke,$e,Je),U&&(U.dnslookup=Date.now()-G),$e&&(V=$e)}),De.once("connect",function(){U&&(U.connected=Date.now()-G),H(),Te(),v("Request#%d %s new socket connected",L,X),ke=!0,V||(V=De.remoteAddress),Q=De.remotePort});return}v("Request#%d %s reuse socket connected, readyState: %s",L,X,Xe),ke=!0,Ie=!0,V||(V=De.remoteAddress),Q=De.remotePort,H(),Te()}),Pe.on("error",function(De){(De.name==="Error"||De.name==="TypeError")&&(De.name=ke?"ResponseError":"RequestError"),De.message+=' (req "error")',v("Request#%d %s `req error` event emit, %s: %s",L,X,De.name,De.message),W(Ee||De)}),ce&&ce.once("error",function(De){De.message+=' (writeStream "error")',Ee=De,v("Request#%d %s `writeStream error` event emit, %s: %s",L,X,De.name,De.message),Ve()}),B.stream?(B.stream.pipe(Pe),B.stream.once("error",function(De){De.message+=' (stream "error")',Ee=De,v("Request#%d %s `readStream error` event emit, %s: %s",L,X,De.name,De.message),Ve()})):Pe.end(Y),Pe.requestId=L,Pe}}).call(this)}).call(this,o("_process"),o("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":78,"@babel/runtime/helpers/typeof":79,_process:467,buffer:90,"core-js/modules/es.array.concat.js":272,"core-js/modules/es.function.name.js":284,"core-js/modules/es.object.to-string.js":291,"core-js/modules/es.promise.js":295,"core-js/modules/es.regexp.exec.js":300,"core-js/modules/es.string.split.js":307,"core-js/modules/es.string.trim.js":308,debug:465,http:468,https:355,"humanize-ms":356,url:472,util:419}]},{},[1])(1)})})(window)},10846:function(Qt,ct,Le){"use strict";Le.d(ct,{default:function(){return _e}});var Ne=Le(59301),ot=Le(40001),o=Le(99267),_=Le(92310),j=Le.n(_),h=Le(54476),d=Le(33885),p=Le(20068),b=Le(75931),g=Le(10228),w=["className","prefixCls","style","active","status","iconPrefix","icon","wrapperStyle","stepNumber","disabled","description","title","subTitle","progressDot","stepIcon","tailContent","icons","stepIndex","onStepClick","onClick","render"];function c(he){return typeof he=="string"}function m(he){var Te,Pe=he.className,Ve=he.prefixCls,De=he.style,Xe=he.active,Ke=he.status,$e=he.iconPrefix,Je=he.icon,nt=he.wrapperStyle,et=he.stepNumber,ht=he.disabled,Et=he.description,zt=he.title,dr=he.subTitle,wr=he.progressDot,hr=he.stepIcon,nr=he.tailContent,kt=he.icons,Zt=he.stepIndex,Xt=he.onStepClick,Jt=he.onClick,Ot=he.render,pr=(0,b.Z)(he,w),ur=!!Xt&&!ht,Vt={};ur&&(Vt.role="button",Vt.tabIndex=0,Vt.onClick=function(Wr){Jt==null||Jt(Wr),Xt(Zt)},Vt.onKeyDown=function(Wr){var er=Wr.which;(er===g.Z.ENTER||er===g.Z.SPACE)&&Xt(Zt)});var He=function(){var er,jt,Ar=j()("".concat(Ve,"-icon"),"".concat($e,"icon"),(er={},(0,p.Z)(er,"".concat($e,"icon-").concat(Je),Je&&c(Je)),(0,p.Z)(er,"".concat($e,"icon-check"),!Je&&Ke==="finish"&&(kt&&!kt.finish||!kt)),(0,p.Z)(er,"".concat($e,"icon-cross"),!Je&&Ke==="error"&&(kt&&!kt.error||!kt)),er)),Hr=Ne.createElement("span",{className:"".concat(Ve,"-icon-dot")});return wr?typeof wr=="function"?jt=Ne.createElement("span",{className:"".concat(Ve,"-icon")},wr(Hr,{index:et-1,status:Ke,title:zt,description:Et})):jt=Ne.createElement("span",{className:"".concat(Ve,"-icon")},Hr):Je&&!c(Je)?jt=Ne.createElement("span",{className:"".concat(Ve,"-icon")},Je):kt&&kt.finish&&Ke==="finish"?jt=Ne.createElement("span",{className:"".concat(Ve,"-icon")},kt.finish):kt&&kt.error&&Ke==="error"?jt=Ne.createElement("span",{className:"".concat(Ve,"-icon")},kt.error):Je||Ke==="finish"||Ke==="error"?jt=Ne.createElement("span",{className:Ar}):jt=Ne.createElement("span",{className:"".concat(Ve,"-icon")},et),hr&&(jt=hr({index:et-1,status:Ke,title:zt,description:Et,node:jt})),jt},kr=Ke||"wait",Dt=j()("".concat(Ve,"-item"),"".concat(Ve,"-item-").concat(kr),Pe,(Te={},(0,p.Z)(Te,"".concat(Ve,"-item-custom"),Je),(0,p.Z)(Te,"".concat(Ve,"-item-active"),Xe),(0,p.Z)(Te,"".concat(Ve,"-item-disabled"),ht===!0),Te)),Ur=(0,d.Z)({},De),vr=Ne.createElement("div",(0,h.Z)({},pr,{className:Dt,style:Ur}),Ne.createElement("div",(0,h.Z)({onClick:Jt},Vt,{className:"".concat(Ve,"-item-container")}),Ne.createElement("div",{className:"".concat(Ve,"-item-tail")},nr),Ne.createElement("div",{className:"".concat(Ve,"-item-icon")},He()),Ne.createElement("div",{className:"".concat(Ve,"-item-content")},Ne.createElement("div",{className:"".concat(Ve,"-item-title")},zt,dr&&Ne.createElement("div",{title:typeof dr=="string"?dr:void 0,className:"".concat(Ve,"-item-subtitle")},dr)),Et&&Ne.createElement("div",{className:"".concat(Ve,"-item-description")},Et))));return Ot&&(vr=Ot(vr)||null),vr}var v=m,y=["prefixCls","style","className","children","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","stepIcon","initial","icons","onChange","itemRender","items"];function E(he){var Te,Pe=he.prefixCls,Ve=Pe===void 0?"rc-steps":Pe,De=he.style,Xe=De===void 0?{}:De,Ke=he.className,$e=he.children,Je=he.direction,nt=Je===void 0?"horizontal":Je,et=he.type,ht=et===void 0?"default":et,Et=he.labelPlacement,zt=Et===void 0?"horizontal":Et,dr=he.iconPrefix,wr=dr===void 0?"rc":dr,hr=he.status,nr=hr===void 0?"process":hr,kt=he.size,Zt=he.current,Xt=Zt===void 0?0:Zt,Jt=he.progressDot,Ot=Jt===void 0?!1:Jt,pr=he.stepIcon,ur=he.initial,Vt=ur===void 0?0:ur,He=he.icons,kr=he.onChange,Dt=he.itemRender,Ur=he.items,vr=Ur===void 0?[]:Ur,Wr=(0,b.Z)(he,y),er=ht==="navigation",jt=ht==="inline",Ar=jt||Ot,Hr=jt?"horizontal":nt,tr=jt?void 0:kt,Jr=Ar?"vertical":zt,_t=j()(Ve,"".concat(Ve,"-").concat(Hr),Ke,(Te={},(0,p.Z)(Te,"".concat(Ve,"-").concat(tr),tr),(0,p.Z)(Te,"".concat(Ve,"-label-").concat(Jr),Hr==="horizontal"),(0,p.Z)(Te,"".concat(Ve,"-dot"),!!Ar),(0,p.Z)(Te,"".concat(Ve,"-navigation"),er),(0,p.Z)(Te,"".concat(Ve,"-inline"),jt),Te)),Or=function(vn){kr&&Xt!==vn&&kr(vn)},un=function(vn,Dr){var Ir=(0,d.Z)({},vn),ze=Vt+Dr;return nr==="error"&&Dr===Xt-1&&(Ir.className="".concat(Ve,"-next-error")),Ir.status||(ze===Xt?Ir.status=nr:ze<Xt?Ir.status="finish":Ir.status="wait"),jt&&(Ir.icon=void 0,Ir.subTitle=void 0),!Ir.render&&Dt&&(Ir.render=function(On){return Dt(Ir,On)}),Ne.createElement(v,(0,h.Z)({},Ir,{active:ze===Xt,stepNumber:ze+1,stepIndex:ze,key:ze,prefixCls:Ve,iconPrefix:wr,wrapperStyle:Xe,progressDot:Ar,stepIcon:pr,icons:He,onStepClick:kr&&Or}))};return Ne.createElement("div",(0,h.Z)({className:_t,style:Xe},Wr),vr.filter(function(Yr){return Yr}).map(un))}E.Step=v;var T=E,S=T,C=Le(48755),x=Le(31756),O=Le(13783),J=Le(60242),P=Le(25399),X=Le(36237),B=Le(63356),k=Le(16931),D=Le(51636),q=he=>{const{componentCls:Te,customIconTop:Pe,customIconSize:Ve,customIconFontSize:De}=he;return{[`${Te}-item-custom`]:{[`> ${Te}-item-container > ${Te}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${Te}-icon`]:{top:Pe,width:Ve,height:Ve,fontSize:De,lineHeight:(0,X.unit)(Ve)}}},[`&:not(${Te}-vertical)`]:{[`${Te}-item-custom`]:{[`${Te}-item-icon`]:{width:"auto",background:"none"}}}}},F=he=>{const{componentCls:Te}=he,Pe=`${Te}-item`;return{[`${Te}-horizontal`]:{[`${Pe}-tail`]:{transform:"translateY(-50%)"}}}},K=he=>{const{componentCls:Te,inlineDotSize:Pe,inlineTitleColor:Ve,inlineTailColor:De}=he,Xe=he.calc(he.paddingXS).add(he.lineWidth).equal(),Ke={[`${Te}-item-container ${Te}-item-content ${Te}-item-title`]:{color:Ve}};return{[`&${Te}-inline`]:{width:"auto",display:"inline-flex",[`${Te}-item`]:{flex:"none","&-container":{padding:`${(0,X.unit)(Xe)} ${(0,X.unit)(he.paddingXXS)} 0`,margin:`0 ${(0,X.unit)(he.calc(he.marginXXS).div(2).equal())}`,borderRadius:he.borderRadiusSM,cursor:"pointer",transition:`background-color ${he.motionDurationMid}`,"&:hover":{background:he.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:Pe,height:Pe,marginInlineStart:`calc(50% - ${(0,X.unit)(he.calc(Pe).div(2).equal())})`,[`> ${Te}-icon`]:{top:0},[`${Te}-icon-dot`]:{borderRadius:he.calc(he.fontSizeSM).div(4).equal(),"&::after":{display:"none"}}},"&-content":{width:"auto",marginTop:he.calc(he.marginXS).sub(he.lineWidth).equal()},"&-title":{color:Ve,fontSize:he.fontSizeSM,lineHeight:he.lineHeightSM,fontWeight:"normal",marginBottom:he.calc(he.marginXXS).div(2).equal()},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:he.calc(Pe).div(2).add(Xe).equal(),transform:"translateY(-50%)","&:after":{width:"100%",height:he.lineWidth,borderRadius:0,marginInlineStart:0,background:De}},[`&:first-child ${Te}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${Te}-item-tail`]:{display:"block",width:"50%"},"&-wait":Object.assign({[`${Te}-item-icon ${Te}-icon ${Te}-icon-dot`]:{backgroundColor:he.colorBorderBg,border:`${(0,X.unit)(he.lineWidth)} ${he.lineType} ${De}`}},Ke),"&-finish":Object.assign({[`${Te}-item-tail::after`]:{backgroundColor:De},[`${Te}-item-icon ${Te}-icon ${Te}-icon-dot`]:{backgroundColor:De,border:`${(0,X.unit)(he.lineWidth)} ${he.lineType} ${De}`}},Ke),"&-error":Ke,"&-active, &-process":Object.assign({[`${Te}-item-icon`]:{width:Pe,height:Pe,marginInlineStart:`calc(50% - ${(0,X.unit)(he.calc(Pe).div(2).equal())})`,top:0}},Ke),[`&:not(${Te}-item-active) > ${Te}-item-container[role='button']:hover`]:{[`${Te}-item-title`]:{color:Ve}}}}}},ne=he=>{const{componentCls:Te,iconSize:Pe,lineHeight:Ve,iconSizeSM:De}=he;return{[`&${Te}-label-vertical`]:{[`${Te}-item`]:{overflow:"visible","&-tail":{marginInlineStart:he.calc(Pe).div(2).add(he.controlHeightLG).equal(),padding:`0 ${(0,X.unit)(he.paddingLG)}`},"&-content":{display:"block",width:he.calc(Pe).div(2).add(he.controlHeightLG).mul(2).equal(),marginTop:he.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:he.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:he.marginXXS,marginInlineStart:0,lineHeight:Ve}},[`&${Te}-small:not(${Te}-dot)`]:{[`${Te}-item`]:{"&-icon":{marginInlineStart:he.calc(Pe).sub(De).div(2).add(he.controlHeightLG).equal()}}}}}},ie=he=>{const{componentCls:Te,navContentMaxWidth:Pe,navArrowColor:Ve,stepsNavActiveColor:De,motionDurationSlow:Xe}=he;return{[`&${Te}-navigation`]:{paddingTop:he.paddingSM,[`&${Te}-small`]:{[`${Te}-item`]:{"&-container":{marginInlineStart:he.calc(he.marginSM).mul(-1).equal()}}},[`${Te}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:he.calc(he.margin).mul(-1).equal(),paddingBottom:he.paddingSM,textAlign:"start",transition:`opacity ${Xe}`,[`${Te}-item-content`]:{maxWidth:Pe},[`${Te}-item-title`]:Object.assign(Object.assign({maxWidth:"100%",paddingInlineEnd:0},B.vS),{"&::after":{display:"none"}})},[`&:not(${Te}-item-active)`]:{[`${Te}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${(0,X.unit)(he.calc(he.paddingSM).div(2).equal())})`,insetInlineStart:"100%",display:"inline-block",width:he.fontSizeIcon,height:he.fontSizeIcon,borderTop:`${(0,X.unit)(he.lineWidth)} ${he.lineType} ${Ve}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${(0,X.unit)(he.lineWidth)} ${he.lineType} ${Ve}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:he.lineWidthBold,backgroundColor:De,transition:`width ${Xe}, inset-inline-start ${Xe}`,transitionTimingFunction:"ease-out",content:'""'}},[`${Te}-item${Te}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${Te}-navigation${Te}-vertical`]:{[`> ${Te}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${Te}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:he.calc(he.lineWidth).mul(3).equal(),height:`calc(100% - ${(0,X.unit)(he.marginLG)})`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:he.calc(he.controlHeight).mul(.25).equal(),height:he.calc(he.controlHeight).mul(.25).equal(),marginBottom:he.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},"&:last-child":{"&::after":{display:"none"}},[`> ${Te}-item-container > ${Te}-item-tail`]:{visibility:"hidden"}}},[`&${Te}-navigation${Te}-horizontal`]:{[`> ${Te}-item > ${Te}-item-container > ${Te}-item-tail`]:{visibility:"hidden"}}}},Y=he=>{const{antCls:Te,componentCls:Pe,iconSize:Ve,iconSizeSM:De,processIconColor:Xe,marginXXS:Ke,lineWidthBold:$e,lineWidth:Je,paddingXXS:nt}=he,et=he.calc(Ve).add(he.calc($e).mul(4).equal()).equal(),ht=he.calc(De).add(he.calc(he.lineWidth).mul(4).equal()).equal();return{[`&${Pe}-with-progress`]:{[`${Pe}-item`]:{paddingTop:nt,[`&-process ${Pe}-item-container ${Pe}-item-icon ${Pe}-icon`]:{color:Xe}},[`&${Pe}-vertical > ${Pe}-item `]:{paddingInlineStart:nt,[`> ${Pe}-item-container > ${Pe}-item-tail`]:{top:Ke,insetInlineStart:he.calc(Ve).div(2).sub(Je).add(nt).equal()}},[`&, &${Pe}-small`]:{[`&${Pe}-horizontal ${Pe}-item:first-child`]:{paddingBottom:nt,paddingInlineStart:nt}},[`&${Pe}-small${Pe}-vertical > ${Pe}-item > ${Pe}-item-container > ${Pe}-item-tail`]:{insetInlineStart:he.calc(De).div(2).sub(Je).add(nt).equal()},[`&${Pe}-label-vertical ${Pe}-item ${Pe}-item-tail`]:{top:he.calc(Ve).div(2).add(nt).equal()},[`${Pe}-item-icon`]:{position:"relative",[`${Te}-progress`]:{position:"absolute",insetInlineStart:"50%",top:"50%",transform:"translate(-50%, -50%)","&-inner":{width:`${(0,X.unit)(et)} !important`,height:`${(0,X.unit)(et)} !important`}}},[`&${Pe}-small`]:{[`&${Pe}-label-vertical ${Pe}-item ${Pe}-item-tail`]:{top:he.calc(De).div(2).add(nt).equal()},[`${Pe}-item-icon ${Te}-progress-inner`]:{width:`${(0,X.unit)(ht)} !important`,height:`${(0,X.unit)(ht)} !important`}}}}},ve=he=>{const{componentCls:Te,descriptionMaxWidth:Pe,lineHeight:Ve,dotCurrentSize:De,dotSize:Xe,motionDurationSlow:Ke}=he;return{[`&${Te}-dot, &${Te}-dot${Te}-small`]:{[`${Te}-item`]:{"&-title":{lineHeight:Ve},"&-tail":{top:he.calc(he.dotSize).sub(he.calc(he.lineWidth).mul(3).equal()).div(2).equal(),width:"100%",marginTop:0,marginBottom:0,marginInline:`${(0,X.unit)(he.calc(Pe).div(2).equal())} 0`,padding:0,"&::after":{width:`calc(100% - ${(0,X.unit)(he.calc(he.marginSM).mul(2).equal())})`,height:he.calc(he.lineWidth).mul(3).equal(),marginInlineStart:he.marginSM}},"&-icon":{width:Xe,height:Xe,marginInlineStart:he.calc(he.descriptionMaxWidth).sub(Xe).div(2).equal(),paddingInlineEnd:0,lineHeight:(0,X.unit)(Xe),background:"transparent",border:0,[`${Te}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${Ke}`,"&::after":{position:"absolute",top:he.calc(he.marginSM).mul(-1).equal(),insetInlineStart:he.calc(Xe).sub(he.calc(he.controlHeightLG).mul(1.5).equal()).div(2).equal(),width:he.calc(he.controlHeightLG).mul(1.5).equal(),height:he.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:Pe},[`&-process ${Te}-item-icon`]:{position:"relative",top:he.calc(Xe).sub(De).div(2).equal(),width:De,height:De,lineHeight:(0,X.unit)(De),background:"none",marginInlineStart:he.calc(he.descriptionMaxWidth).sub(De).div(2).equal()},[`&-process ${Te}-icon`]:{[`&:first-child ${Te}-icon-dot`]:{insetInlineStart:0}}}},[`&${Te}-vertical${Te}-dot`]:{[`${Te}-item-icon`]:{marginTop:he.calc(he.controlHeight).sub(Xe).div(2).equal(),marginInlineStart:0,background:"none"},[`${Te}-item-process ${Te}-item-icon`]:{marginTop:he.calc(he.controlHeight).sub(De).div(2).equal(),top:0,insetInlineStart:he.calc(Xe).sub(De).div(2).equal(),marginInlineStart:0},[`${Te}-item > ${Te}-item-container > ${Te}-item-tail`]:{top:he.calc(he.controlHeight).sub(Xe).div(2).equal(),insetInlineStart:0,margin:0,padding:`${(0,X.unit)(he.calc(Xe).add(he.paddingXS).equal())} 0 ${(0,X.unit)(he.paddingXS)}`,"&::after":{marginInlineStart:he.calc(Xe).sub(he.lineWidth).div(2).equal()}},[`&${Te}-small`]:{[`${Te}-item-icon`]:{marginTop:he.calc(he.controlHeightSM).sub(Xe).div(2).equal()},[`${Te}-item-process ${Te}-item-icon`]:{marginTop:he.calc(he.controlHeightSM).sub(De).div(2).equal()},[`${Te}-item > ${Te}-item-container > ${Te}-item-tail`]:{top:he.calc(he.controlHeightSM).sub(Xe).div(2).equal()}},[`${Te}-item:first-child ${Te}-icon-dot`]:{insetInlineStart:0},[`${Te}-item-content`]:{width:"inherit"}}}},le=he=>{const{componentCls:Te}=he;return{[`&${Te}-rtl`]:{direction:"rtl",[`${Te}-item`]:{"&-subtitle":{float:"left"}},[`&${Te}-navigation`]:{[`${Te}-item::after`]:{transform:"rotate(-45deg)"}},[`&${Te}-vertical`]:{[`> ${Te}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${Te}-item-icon`]:{float:"right"}}},[`&${Te}-dot`]:{[`${Te}-item-icon ${Te}-icon-dot, &${Te}-small ${Te}-item-icon ${Te}-icon-dot`]:{float:"right"}}}}},ge=he=>{const{componentCls:Te,iconSizeSM:Pe,fontSizeSM:Ve,fontSize:De,colorTextDescription:Xe}=he;return{[`&${Te}-small`]:{[`&${Te}-horizontal:not(${Te}-label-vertical) ${Te}-item`]:{paddingInlineStart:he.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${Te}-item-icon`]:{width:Pe,height:Pe,marginTop:0,marginBottom:0,marginInline:`0 ${(0,X.unit)(he.marginXS)}`,fontSize:Ve,lineHeight:(0,X.unit)(Pe),textAlign:"center",borderRadius:Pe},[`${Te}-item-title`]:{paddingInlineEnd:he.paddingSM,fontSize:De,lineHeight:(0,X.unit)(Pe),"&::after":{top:he.calc(Pe).div(2).equal()}},[`${Te}-item-description`]:{color:Xe,fontSize:De},[`${Te}-item-tail`]:{top:he.calc(Pe).div(2).sub(he.paddingXXS).equal()},[`${Te}-item-custom ${Te}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${Te}-icon`]:{fontSize:Pe,lineHeight:(0,X.unit)(Pe),transform:"none"}}}}},ke=he=>{const{componentCls:Te,iconSizeSM:Pe,iconSize:Ve}=he;return{[`&${Te}-vertical`]:{display:"flex",flexDirection:"column",[`> ${Te}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${Te}-item-icon`]:{float:"left",marginInlineEnd:he.margin},[`${Te}-item-content`]:{display:"block",minHeight:he.calc(he.controlHeight).mul(1.5).equal(),overflow:"hidden"},[`${Te}-item-title`]:{lineHeight:(0,X.unit)(Ve)},[`${Te}-item-description`]:{paddingBottom:he.paddingSM}},[`> ${Te}-item > ${Te}-item-container > ${Te}-item-tail`]:{position:"absolute",top:0,insetInlineStart:he.calc(Ve).div(2).sub(he.lineWidth).equal(),width:he.lineWidth,height:"100%",padding:`${(0,X.unit)(he.calc(he.marginXXS).mul(1.5).add(Ve).equal())} 0 ${(0,X.unit)(he.calc(he.marginXXS).mul(1.5).equal())}`,"&::after":{width:he.lineWidth,height:"100%"}},[`> ${Te}-item:not(:last-child) > ${Te}-item-container > ${Te}-item-tail`]:{display:"block"},[` > ${Te}-item > ${Te}-item-container > ${Te}-item-content > ${Te}-item-title`]:{"&::after":{display:"none"}},[`&${Te}-small ${Te}-item-container`]:{[`${Te}-item-tail`]:{position:"absolute",top:0,insetInlineStart:he.calc(Pe).div(2).sub(he.lineWidth).equal(),padding:`${(0,X.unit)(he.calc(he.marginXXS).mul(1.5).add(Pe).equal())} 0 ${(0,X.unit)(he.calc(he.marginXXS).mul(1.5).equal())}`},[`${Te}-item-title`]:{lineHeight:(0,X.unit)(Pe)}}}}};const Ie="wait",de="process",Z="finish",ye="error",V=(he,Te)=>{const Pe=`${Te.componentCls}-item`,Ve=`${he}IconColor`,De=`${he}TitleColor`,Xe=`${he}DescriptionColor`,Ke=`${he}TailColor`,$e=`${he}IconBgColor`,Je=`${he}IconBorderColor`,nt=`${he}DotColor`;return{[`${Pe}-${he} ${Pe}-icon`]:{backgroundColor:Te[$e],borderColor:Te[Je],[`> ${Te.componentCls}-icon`]:{color:Te[Ve],[`${Te.componentCls}-icon-dot`]:{background:Te[nt]}}},[`${Pe}-${he}${Pe}-custom ${Pe}-icon`]:{[`> ${Te.componentCls}-icon`]:{color:Te[nt]}},[`${Pe}-${he} > ${Pe}-container > ${Pe}-content > ${Pe}-title`]:{color:Te[De],"&::after":{backgroundColor:Te[Ke]}},[`${Pe}-${he} > ${Pe}-container > ${Pe}-content > ${Pe}-description`]:{color:Te[Xe]},[`${Pe}-${he} > ${Pe}-container > ${Pe}-tail::after`]:{backgroundColor:Te[Ke]}}},Q=he=>{const{componentCls:Te,motionDurationSlow:Pe}=he,Ve=`${Te}-item`,De=`${Ve}-icon`;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[Ve]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${Ve}-container > ${Ve}-tail, > ${Ve}-container > ${Ve}-content > ${Ve}-title::after`]:{display:"none"}}},[`${Ve}-container`]:{outline:"none","&:focus-visible":{[De]:Object.assign({},(0,B.oN)(he))}},[`${De}, ${Ve}-content`]:{display:"inline-block",verticalAlign:"top"},[De]:{width:he.iconSize,height:he.iconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:he.marginXS,fontSize:he.iconFontSize,fontFamily:he.fontFamily,lineHeight:(0,X.unit)(he.iconSize),textAlign:"center",borderRadius:he.iconSize,border:`${(0,X.unit)(he.lineWidth)} ${he.lineType} transparent`,transition:`background-color ${Pe}, border-color ${Pe}`,[`${Te}-icon`]:{position:"relative",top:he.iconTop,color:he.colorPrimary,lineHeight:1}},[`${Ve}-tail`]:{position:"absolute",top:he.calc(he.iconSize).div(2).equal(),insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:he.lineWidth,background:he.colorSplit,borderRadius:he.lineWidth,transition:`background ${Pe}`,content:'""'}},[`${Ve}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:he.padding,color:he.colorText,fontSize:he.fontSizeLG,lineHeight:(0,X.unit)(he.titleLineHeight),"&::after":{position:"absolute",top:he.calc(he.titleLineHeight).div(2).equal(),insetInlineStart:"100%",display:"block",width:9999,height:he.lineWidth,background:he.processTailColor,content:'""'}},[`${Ve}-subtitle`]:{display:"inline",marginInlineStart:he.marginXS,color:he.colorTextDescription,fontWeight:"normal",fontSize:he.fontSize},[`${Ve}-description`]:{color:he.colorTextDescription,fontSize:he.fontSize}},V(Ie,he)),V(de,he)),{[`${Ve}-process > ${Ve}-container > ${Ve}-title`]:{fontWeight:he.fontWeightStrong}}),V(Z,he)),V(ye,he)),{[`${Ve}${Te}-next-error > ${Te}-item-title::after`]:{background:he.colorError},[`${Ve}-disabled`]:{cursor:"not-allowed"}})},U=he=>{const{componentCls:Te,motionDurationSlow:Pe}=he;return{[`& ${Te}-item`]:{[`&:not(${Te}-item-active)`]:{[`& > ${Te}-item-container[role='button']`]:{cursor:"pointer",[`${Te}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${Te}-icon`]:{transition:`color ${Pe}`}},"&:hover":{[`${Te}-item`]:{"&-title, &-subtitle, &-description":{color:he.colorPrimary}}}},[`&:not(${Te}-item-process)`]:{[`& > ${Te}-item-container[role='button']:hover`]:{[`${Te}-item`]:{"&-icon":{borderColor:he.colorPrimary,[`${Te}-icon`]:{color:he.colorPrimary}}}}}}},[`&${Te}-horizontal:not(${Te}-label-vertical)`]:{[`${Te}-item`]:{paddingInlineStart:he.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${Te}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:he.descriptionMaxWidth,whiteSpace:"normal"}}}}},H=he=>{const{componentCls:Te}=he;return{[Te]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,B.Wf)(he)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),Q(he)),U(he)),q(he)),ge(he)),ke(he)),F(he)),ne(he)),ve(he)),ie(he)),le(he)),Y(he)),K(he))}},ee=he=>({titleLineHeight:he.controlHeight,customIconSize:he.controlHeight,customIconTop:0,customIconFontSize:he.controlHeightSM,iconSize:he.controlHeight,iconTop:-.5,iconFontSize:he.fontSize,iconSizeSM:he.fontSizeHeading3,dotSize:he.controlHeight/4,dotCurrentSize:he.controlHeightLG/4,navArrowColor:he.colorTextDisabled,navContentMaxWidth:"unset",descriptionMaxWidth:140,waitIconColor:he.wireframe?he.colorTextDisabled:he.colorTextLabel,waitIconBgColor:he.wireframe?he.colorBgContainer:he.colorFillContent,waitIconBorderColor:he.wireframe?he.colorTextDisabled:"transparent",finishIconBgColor:he.wireframe?he.colorBgContainer:he.controlItemBgActive,finishIconBorderColor:he.wireframe?he.colorPrimary:he.controlItemBgActive});var W=(0,k.I$)("Steps",he=>{const{colorTextDisabled:Te,controlHeightLG:Pe,colorTextLightSolid:Ve,colorText:De,colorPrimary:Xe,colorTextDescription:Ke,colorTextQuaternary:$e,colorError:Je,colorBorderSecondary:nt,colorSplit:et}=he,ht=(0,D.mergeToken)(he,{processIconColor:Ve,processTitleColor:De,processDescriptionColor:De,processIconBgColor:Xe,processIconBorderColor:Xe,processDotColor:Xe,processTailColor:et,waitTitleColor:Ke,waitDescriptionColor:Ke,waitTailColor:et,waitDotColor:Te,finishIconColor:Xe,finishTitleColor:De,finishDescriptionColor:Ke,finishTailColor:Xe,finishDotColor:Xe,errorIconColor:Ve,errorTitleColor:Je,errorDescriptionColor:Je,errorTailColor:et,errorIconBgColor:Je,errorIconBorderColor:Je,errorDotColor:Je,stepsNavActiveColor:Xe,stepsProgressSize:Pe,inlineDotSize:6,inlineTitleColor:$e,inlineTailColor:nt});return[H(ht)]},ee),M=Le(11592);function $(he){return he.filter(Te=>Te)}function ce(he,Te){if(he)return he;const Pe=(0,M.Z)(Te).map(Ve=>{if(Ne.isValidElement(Ve)){const{props:De}=Ve;return Object.assign({},De)}return null});return $(Pe)}var Ce=function(he,Te){var Pe={};for(var Ve in he)Object.prototype.hasOwnProperty.call(he,Ve)&&Te.indexOf(Ve)<0&&(Pe[Ve]=he[Ve]);if(he!=null&&typeof Object.getOwnPropertySymbols=="function")for(var De=0,Ve=Object.getOwnPropertySymbols(he);De<Ve.length;De++)Te.indexOf(Ve[De])<0&&Object.prototype.propertyIsEnumerable.call(he,Ve[De])&&(Pe[Ve[De]]=he[Ve[De]]);return Pe};const Ue=he=>{const{percent:Te,size:Pe,className:Ve,rootClassName:De,direction:Xe,items:Ke,responsive:$e=!0,current:Je=0,children:nt,style:et}=he,ht=Ce(he,["percent","size","className","rootClassName","direction","items","responsive","current","children","style"]),{xs:Et}=(0,O.Z)($e),{getPrefixCls:zt,direction:dr,className:wr,style:hr}=(0,C.dj)("steps"),nr=Ne.useMemo(()=>$e&&Et?"vertical":Xe,[Et,Xe]),kt=(0,x.Z)(Pe),Zt=zt("steps",he.prefixCls),[Xt,Jt,Ot]=W(Zt),pr=he.type==="inline",ur=zt("",he.iconPrefix),Vt=ce(Ke,nt),He=pr?void 0:Te,kr=Object.assign(Object.assign({},hr),et),Dt=j()(wr,{[`${Zt}-rtl`]:dr==="rtl",[`${Zt}-with-progress`]:He!==void 0},Ve,De,Jt,Ot),Ur={finish:Ne.createElement(ot.Z,{className:`${Zt}-finish-icon`}),error:Ne.createElement(o.Z,{className:`${Zt}-error-icon`})},vr=er=>{let{node:jt,status:Ar}=er;if(Ar==="process"&&He!==void 0){const Hr=kt==="small"?32:40;return Ne.createElement("div",{className:`${Zt}-progress-icon`},Ne.createElement(J.Z,{type:"circle",percent:He,size:Hr,strokeWidth:4,format:()=>null}),jt)}return jt},Wr=(er,jt)=>er.description?Ne.createElement(P.Z,{title:er.description},jt):jt;return Xt(Ne.createElement(S,Object.assign({icons:Ur},ht,{style:kr,current:Je,size:kt,items:Vt,itemRender:pr?Wr:void 0,stepIcon:vr,direction:nr,prefixCls:Zt,iconPrefix:ur,className:Dt})))};Ue.Step=S.Step;var _e=Ue},86251:function(Qt,ct){"use strict";ct.byteLength=d,ct.toByteArray=b,ct.fromByteArray=c;for(var Le=[],Ne=[],ot=typeof Uint8Array!="undefined"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=0,j=o.length;_<j;++_)Le[_]=o[_],Ne[o.charCodeAt(_)]=_;Ne[45]=62,Ne[95]=63;function h(m){var v=m.length;if(v%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=m.indexOf("=");y===-1&&(y=v);var E=y===v?0:4-y%4;return[y,E]}function d(m){var v=h(m),y=v[0],E=v[1];return(y+E)*3/4-E}function p(m,v,y){return(v+y)*3/4-y}function b(m){var v,y=h(m),E=y[0],T=y[1],S=new ot(p(m,E,T)),C=0,x=T>0?E-4:E,O;for(O=0;O<x;O+=4)v=Ne[m.charCodeAt(O)]<<18|Ne[m.charCodeAt(O+1)]<<12|Ne[m.charCodeAt(O+2)]<<6|Ne[m.charCodeAt(O+3)],S[C++]=v>>16&255,S[C++]=v>>8&255,S[C++]=v&255;return T===2&&(v=Ne[m.charCodeAt(O)]<<2|Ne[m.charCodeAt(O+1)]>>4,S[C++]=v&255),T===1&&(v=Ne[m.charCodeAt(O)]<<10|Ne[m.charCodeAt(O+1)]<<4|Ne[m.charCodeAt(O+2)]>>2,S[C++]=v>>8&255,S[C++]=v&255),S}function g(m){return Le[m>>18&63]+Le[m>>12&63]+Le[m>>6&63]+Le[m&63]}function w(m,v,y){for(var E,T=[],S=v;S<y;S+=3)E=(m[S]<<16&16711680)+(m[S+1]<<8&65280)+(m[S+2]&255),T.push(g(E));return T.join("")}function c(m){for(var v,y=m.length,E=y%3,T=[],S=16383,C=0,x=y-E;C<x;C+=S)T.push(w(m,C,C+S>x?x:C+S));return E===1?(v=m[y-1],T.push(Le[v>>2]+Le[v<<4&63]+"==")):E===2&&(v=(m[y-2]<<8)+m[y-1],T.push(Le[v>>10]+Le[v>>4&63]+Le[v<<2&63]+"=")),T.join("")}},19208:function(Qt,ct,Le){"use strict";var Ne;var ot=Le(86251),o=Le(67467),_=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ct.lW=p,Ne=C,ct.h2=50;var j=2147483647;Ne=j,p.TYPED_ARRAY_SUPPORT=h(),!p.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function h(){try{var Q=new Uint8Array(1),U={foo:function(){return 42}};return Object.setPrototypeOf(U,Uint8Array.prototype),Object.setPrototypeOf(Q,U),Q.foo()===42}catch(H){return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function d(Q){if(Q>j)throw new RangeError('The value "'+Q+'" is invalid for option "size"');var U=new Uint8Array(Q);return Object.setPrototypeOf(U,p.prototype),U}function p(Q,U,H){if(typeof Q=="number"){if(typeof U=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(Q)}return b(Q,U,H)}p.poolSize=8192;function b(Q,U,H){if(typeof Q=="string")return m(Q,U);if(ArrayBuffer.isView(Q))return y(Q);if(Q==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q);if(Z(Q,ArrayBuffer)||Q&&Z(Q.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(Z(Q,SharedArrayBuffer)||Q&&Z(Q.buffer,SharedArrayBuffer)))return E(Q,U,H);if(typeof Q=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ee=Q.valueOf&&Q.valueOf();if(ee!=null&&ee!==Q)return p.from(ee,U,H);var W=T(Q);if(W)return W;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Q[Symbol.toPrimitive]=="function")return p.from(Q[Symbol.toPrimitive]("string"),U,H);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Q)}p.from=function(Q,U,H){return b(Q,U,H)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function g(Q){if(typeof Q!="number")throw new TypeError('"size" argument must be of type number');if(Q<0)throw new RangeError('The value "'+Q+'" is invalid for option "size"')}function w(Q,U,H){return g(Q),Q<=0?d(Q):U!==void 0?typeof H=="string"?d(Q).fill(U,H):d(Q).fill(U):d(Q)}p.alloc=function(Q,U,H){return w(Q,U,H)};function c(Q){return g(Q),d(Q<0?0:S(Q)|0)}p.allocUnsafe=function(Q){return c(Q)},p.allocUnsafeSlow=function(Q){return c(Q)};function m(Q,U){if((typeof U!="string"||U==="")&&(U="utf8"),!p.isEncoding(U))throw new TypeError("Unknown encoding: "+U);var H=x(Q,U)|0,ee=d(H),W=ee.write(Q,U);return W!==H&&(ee=ee.slice(0,W)),ee}function v(Q){for(var U=Q.length<0?0:S(Q.length)|0,H=d(U),ee=0;ee<U;ee+=1)H[ee]=Q[ee]&255;return H}function y(Q){if(Z(Q,Uint8Array)){var U=new Uint8Array(Q);return E(U.buffer,U.byteOffset,U.byteLength)}return v(Q)}function E(Q,U,H){if(U<0||Q.byteLength<U)throw new RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<U+(H||0))throw new RangeError('"length" is outside of buffer bounds');var ee;return U===void 0&&H===void 0?ee=new Uint8Array(Q):H===void 0?ee=new Uint8Array(Q,U):ee=new Uint8Array(Q,U,H),Object.setPrototypeOf(ee,p.prototype),ee}function T(Q){if(p.isBuffer(Q)){var U=S(Q.length)|0,H=d(U);return H.length===0||Q.copy(H,0,0,U),H}if(Q.length!==void 0)return typeof Q.length!="number"||ye(Q.length)?d(0):v(Q);if(Q.type==="Buffer"&&Array.isArray(Q.data))return v(Q.data)}function S(Q){if(Q>=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return Q|0}function C(Q){return+Q!=Q&&(Q=0),p.alloc(+Q)}p.isBuffer=function(U){return U!=null&&U._isBuffer===!0&&U!==p.prototype},p.compare=function(U,H){if(Z(U,Uint8Array)&&(U=p.from(U,U.offset,U.byteLength)),Z(H,Uint8Array)&&(H=p.from(H,H.offset,H.byteLength)),!p.isBuffer(U)||!p.isBuffer(H))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(U===H)return 0;for(var ee=U.length,W=H.length,M=0,$=Math.min(ee,W);M<$;++M)if(U[M]!==H[M]){ee=U[M],W=H[M];break}return ee<W?-1:W<ee?1:0},p.isEncoding=function(U){switch(String(U).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(U,H){if(!Array.isArray(U))throw new TypeError('"list" argument must be an Array of Buffers');if(U.length===0)return p.alloc(0);var ee;if(H===void 0)for(H=0,ee=0;ee<U.length;++ee)H+=U[ee].length;var W=p.allocUnsafe(H),M=0;for(ee=0;ee<U.length;++ee){var $=U[ee];if(Z($,Uint8Array))M+$.length>W.length?p.from($).copy(W,M):Uint8Array.prototype.set.call(W,$,M);else if(p.isBuffer($))$.copy(W,M);else throw new TypeError('"list" argument must be an Array of Buffers');M+=$.length}return W};function x(Q,U){if(p.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||Z(Q,ArrayBuffer))return Q.byteLength;if(typeof Q!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Q);var H=Q.length,ee=arguments.length>2&&arguments[2]===!0;if(!ee&&H===0)return 0;for(var W=!1;;)switch(U){case"ascii":case"latin1":case"binary":return H;case"utf8":case"utf-8":return ge(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H*2;case"hex":return H>>>1;case"base64":return Ie(Q).length;default:if(W)return ee?-1:ge(Q).length;U=(""+U).toLowerCase(),W=!0}}p.byteLength=x;function O(Q,U,H){var ee=!1;if((U===void 0||U<0)&&(U=0),U>this.length||((H===void 0||H>this.length)&&(H=this.length),H<=0)||(H>>>=0,U>>>=0,H<=U))return"";for(Q||(Q="utf8");;)switch(Q){case"hex":return pe(this,U,H);case"utf8":case"utf-8":return F(this,U,H);case"ascii":return re(this,U,H);case"latin1":case"binary":return ne(this,U,H);case"base64":return G(this,U,H);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie(this,U,H);default:if(ee)throw new TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),ee=!0}}p.prototype._isBuffer=!0;function J(Q,U,H){var ee=Q[U];Q[U]=Q[H],Q[H]=ee}p.prototype.swap16=function(){var U=this.length;if(U%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var H=0;H<U;H+=2)J(this,H,H+1);return this},p.prototype.swap32=function(){var U=this.length;if(U%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var H=0;H<U;H+=4)J(this,H,H+3),J(this,H+1,H+2);return this},p.prototype.swap64=function(){var U=this.length;if(U%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var H=0;H<U;H+=8)J(this,H,H+7),J(this,H+1,H+6),J(this,H+2,H+5),J(this,H+3,H+4);return this},p.prototype.toString=function(){var U=this.length;return U===0?"":arguments.length===0?F(this,0,U):O.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(U){if(!p.isBuffer(U))throw new TypeError("Argument must be a Buffer");return this===U?!0:p.compare(this,U)===0},p.prototype.inspect=function(){var U="",H=ct.h2;return U=this.toString("hex",0,H).replace(/(.{2})/g,"$1 ").trim(),this.length>H&&(U+=" ... "),"<Buffer "+U+">"},_&&(p.prototype[_]=p.prototype.inspect),p.prototype.compare=function(U,H,ee,W,M){if(Z(U,Uint8Array)&&(U=p.from(U,U.offset,U.byteLength)),!p.isBuffer(U))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof U);if(H===void 0&&(H=0),ee===void 0&&(ee=U?U.length:0),W===void 0&&(W=0),M===void 0&&(M=this.length),H<0||ee>U.length||W<0||M>this.length)throw new RangeError("out of range index");if(W>=M&&H>=ee)return 0;if(W>=M)return-1;if(H>=ee)return 1;if(H>>>=0,ee>>>=0,W>>>=0,M>>>=0,this===U)return 0;for(var $=M-W,ce=ee-H,Ce=Math.min($,ce),Ue=this.slice(W,M),_e=U.slice(H,ee),he=0;he<Ce;++he)if(Ue[he]!==_e[he]){$=Ue[he],ce=_e[he];break}return $<ce?-1:ce<$?1:0};function P(Q,U,H,ee,W){if(Q.length===0)return-1;if(typeof H=="string"?(ee=H,H=0):H>2147483647?H=2147483647:H<-2147483648&&(H=-2147483648),H=+H,ye(H)&&(H=W?0:Q.length-1),H<0&&(H=Q.length+H),H>=Q.length){if(W)return-1;H=Q.length-1}else if(H<0)if(W)H=0;else return-1;if(typeof U=="string"&&(U=p.from(U,ee)),p.isBuffer(U))return U.length===0?-1:X(Q,U,H,ee,W);if(typeof U=="number")return U=U&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(Q,U,H):Uint8Array.prototype.lastIndexOf.call(Q,U,H):X(Q,[U],H,ee,W);throw new TypeError("val must be string, number or Buffer")}function X(Q,U,H,ee,W){var M=1,$=Q.length,ce=U.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(Q.length<2||U.length<2)return-1;M=2,$/=2,ce/=2,H/=2}function Ce(Pe,Ve){return M===1?Pe[Ve]:Pe.readUInt16BE(Ve*M)}var Ue;if(W){var _e=-1;for(Ue=H;Ue<$;Ue++)if(Ce(Q,Ue)===Ce(U,_e===-1?0:Ue-_e)){if(_e===-1&&(_e=Ue),Ue-_e+1===ce)return _e*M}else _e!==-1&&(Ue-=Ue-_e),_e=-1}else for(H+ce>$&&(H=$-ce),Ue=H;Ue>=0;Ue--){for(var he=!0,Te=0;Te<ce;Te++)if(Ce(Q,Ue+Te)!==Ce(U,Te)){he=!1;break}if(he)return Ue}return-1}p.prototype.includes=function(U,H,ee){return this.indexOf(U,H,ee)!==-1},p.prototype.indexOf=function(U,H,ee){return P(this,U,H,ee,!0)},p.prototype.lastIndexOf=function(U,H,ee){return P(this,U,H,ee,!1)};function B(Q,U,H,ee){H=Number(H)||0;var W=Q.length-H;ee?(ee=Number(ee),ee>W&&(ee=W)):ee=W;var M=U.length;ee>M/2&&(ee=M/2);for(var $=0;$<ee;++$){var ce=parseInt(U.substr($*2,2),16);if(ye(ce))return $;Q[H+$]=ce}return $}function k(Q,U,H,ee){return de(ge(U,Q.length-H),Q,H,ee)}function D(Q,U,H,ee){return de(Ee(U),Q,H,ee)}function L(Q,U,H,ee){return de(Ie(U),Q,H,ee)}function q(Q,U,H,ee){return de(ke(U,Q.length-H),Q,H,ee)}p.prototype.write=function(U,H,ee,W){if(H===void 0)W="utf8",ee=this.length,H=0;else if(ee===void 0&&typeof H=="string")W=H,ee=this.length,H=0;else if(isFinite(H))H=H>>>0,isFinite(ee)?(ee=ee>>>0,W===void 0&&(W="utf8")):(W=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var M=this.length-H;if((ee===void 0||ee>M)&&(ee=M),U.length>0&&(ee<0||H<0)||H>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");for(var $=!1;;)switch(W){case"hex":return B(this,U,H,ee);case"utf8":case"utf-8":return k(this,U,H,ee);case"ascii":case"latin1":case"binary":return D(this,U,H,ee);case"base64":return L(this,U,H,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,U,H,ee);default:if($)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),$=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function G(Q,U,H){return U===0&&H===Q.length?ot.fromByteArray(Q):ot.fromByteArray(Q.slice(U,H))}function F(Q,U,H){H=Math.min(Q.length,H);for(var ee=[],W=U;W<H;){var M=Q[W],$=null,ce=M>239?4:M>223?3:M>191?2:1;if(W+ce<=H){var Ce,Ue,_e,he;switch(ce){case 1:M<128&&($=M);break;case 2:Ce=Q[W+1],(Ce&192)===128&&(he=(M&31)<<6|Ce&63,he>127&&($=he));break;case 3:Ce=Q[W+1],Ue=Q[W+2],(Ce&192)===128&&(Ue&192)===128&&(he=(M&15)<<12|(Ce&63)<<6|Ue&63,he>2047&&(he<55296||he>57343)&&($=he));break;case 4:Ce=Q[W+1],Ue=Q[W+2],_e=Q[W+3],(Ce&192)===128&&(Ue&192)===128&&(_e&192)===128&&(he=(M&15)<<18|(Ce&63)<<12|(Ue&63)<<6|_e&63,he>65535&&he<1114112&&($=he))}}$===null?($=65533,ce=1):$>65535&&($-=65536,ee.push($>>>10&1023|55296),$=56320|$&1023),ee.push($),W+=ce}return K(ee)}var N=4096;function K(Q){var U=Q.length;if(U<=N)return String.fromCharCode.apply(String,Q);for(var H="",ee=0;ee<U;)H+=String.fromCharCode.apply(String,Q.slice(ee,ee+=N));return H}function re(Q,U,H){var ee="";H=Math.min(Q.length,H);for(var W=U;W<H;++W)ee+=String.fromCharCode(Q[W]&127);return ee}function ne(Q,U,H){var ee="";H=Math.min(Q.length,H);for(var W=U;W<H;++W)ee+=String.fromCharCode(Q[W]);return ee}function pe(Q,U,H){var ee=Q.length;(!U||U<0)&&(U=0),(!H||H<0||H>ee)&&(H=ee);for(var W="",M=U;M<H;++M)W+=V[Q[M]];return W}function ie(Q,U,H){for(var ee=Q.slice(U,H),W="",M=0;M<ee.length-1;M+=2)W+=String.fromCharCode(ee[M]+ee[M+1]*256);return W}p.prototype.slice=function(U,H){var ee=this.length;U=~~U,H=H===void 0?ee:~~H,U<0?(U+=ee,U<0&&(U=0)):U>ee&&(U=ee),H<0?(H+=ee,H<0&&(H=0)):H>ee&&(H=ee),H<U&&(H=U);var W=this.subarray(U,H);return Object.setPrototypeOf(W,p.prototype),W};function Ae(Q,U,H){if(Q%1!==0||Q<0)throw new RangeError("offset is not uint");if(Q+U>H)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(U,H,ee){U=U>>>0,H=H>>>0,ee||Ae(U,H,this.length);for(var W=this[U],M=1,$=0;++$<H&&(M*=256);)W+=this[U+$]*M;return W},p.prototype.readUintBE=p.prototype.readUIntBE=function(U,H,ee){U=U>>>0,H=H>>>0,ee||Ae(U,H,this.length);for(var W=this[U+--H],M=1;H>0&&(M*=256);)W+=this[U+--H]*M;return W},p.prototype.readUint8=p.prototype.readUInt8=function(U,H){return U=U>>>0,H||Ae(U,1,this.length),this[U]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(U,H){return U=U>>>0,H||Ae(U,2,this.length),this[U]|this[U+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(U,H){return U=U>>>0,H||Ae(U,2,this.length),this[U]<<8|this[U+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(U,H){return U=U>>>0,H||Ae(U,4,this.length),(this[U]|this[U+1]<<8|this[U+2]<<16)+this[U+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(U,H){return U=U>>>0,H||Ae(U,4,this.length),this[U]*16777216+(this[U+1]<<16|this[U+2]<<8|this[U+3])},p.prototype.readIntLE=function(U,H,ee){U=U>>>0,H=H>>>0,ee||Ae(U,H,this.length);for(var W=this[U],M=1,$=0;++$<H&&(M*=256);)W+=this[U+$]*M;return M*=128,W>=M&&(W-=Math.pow(2,8*H)),W},p.prototype.readIntBE=function(U,H,ee){U=U>>>0,H=H>>>0,ee||Ae(U,H,this.length);for(var W=H,M=1,$=this[U+--W];W>0&&(M*=256);)$+=this[U+--W]*M;return M*=128,$>=M&&($-=Math.pow(2,8*H)),$},p.prototype.readInt8=function(U,H){return U=U>>>0,H||Ae(U,1,this.length),this[U]&128?(255-this[U]+1)*-1:this[U]},p.prototype.readInt16LE=function(U,H){U=U>>>0,H||Ae(U,2,this.length);var ee=this[U]|this[U+1]<<8;return ee&32768?ee|4294901760:ee},p.prototype.readInt16BE=function(U,H){U=U>>>0,H||Ae(U,2,this.length);var ee=this[U+1]|this[U]<<8;return ee&32768?ee|4294901760:ee},p.prototype.readInt32LE=function(U,H){return U=U>>>0,H||Ae(U,4,this.length),this[U]|this[U+1]<<8|this[U+2]<<16|this[U+3]<<24},p.prototype.readInt32BE=function(U,H){return U=U>>>0,H||Ae(U,4,this.length),this[U]<<24|this[U+1]<<16|this[U+2]<<8|this[U+3]},p.prototype.readFloatLE=function(U,H){return U=U>>>0,H||Ae(U,4,this.length),o.read(this,U,!0,23,4)},p.prototype.readFloatBE=function(U,H){return U=U>>>0,H||Ae(U,4,this.length),o.read(this,U,!1,23,4)},p.prototype.readDoubleLE=function(U,H){return U=U>>>0,H||Ae(U,8,this.length),o.read(this,U,!0,52,8)},p.prototype.readDoubleBE=function(U,H){return U=U>>>0,H||Ae(U,8,this.length),o.read(this,U,!1,52,8)};function Y(Q,U,H,ee,W,M){if(!p.isBuffer(Q))throw new TypeError('"buffer" argument must be a Buffer instance');if(U>W||U<M)throw new RangeError('"value" argument is out of bounds');if(H+ee>Q.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(U,H,ee,W){if(U=+U,H=H>>>0,ee=ee>>>0,!W){var M=Math.pow(2,8*ee)-1;Y(this,U,H,ee,M,0)}var $=1,ce=0;for(this[H]=U&255;++ce<ee&&($*=256);)this[H+ce]=U/$&255;return H+ee},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(U,H,ee,W){if(U=+U,H=H>>>0,ee=ee>>>0,!W){var M=Math.pow(2,8*ee)-1;Y(this,U,H,ee,M,0)}var $=ee-1,ce=1;for(this[H+$]=U&255;--$>=0&&(ce*=256);)this[H+$]=U/ce&255;return H+ee},p.prototype.writeUint8=p.prototype.writeUInt8=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,1,255,0),this[H]=U&255,H+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,2,65535,0),this[H]=U&255,this[H+1]=U>>>8,H+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,2,65535,0),this[H]=U>>>8,this[H+1]=U&255,H+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,4,4294967295,0),this[H+3]=U>>>24,this[H+2]=U>>>16,this[H+1]=U>>>8,this[H]=U&255,H+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,4,4294967295,0),this[H]=U>>>24,this[H+1]=U>>>16,this[H+2]=U>>>8,this[H+3]=U&255,H+4},p.prototype.writeIntLE=function(U,H,ee,W){if(U=+U,H=H>>>0,!W){var M=Math.pow(2,8*ee-1);Y(this,U,H,ee,M-1,-M)}var $=0,ce=1,Ce=0;for(this[H]=U&255;++$<ee&&(ce*=256);)U<0&&Ce===0&&this[H+$-1]!==0&&(Ce=1),this[H+$]=(U/ce>>0)-Ce&255;return H+ee},p.prototype.writeIntBE=function(U,H,ee,W){if(U=+U,H=H>>>0,!W){var M=Math.pow(2,8*ee-1);Y(this,U,H,ee,M-1,-M)}var $=ee-1,ce=1,Ce=0;for(this[H+$]=U&255;--$>=0&&(ce*=256);)U<0&&Ce===0&&this[H+$+1]!==0&&(Ce=1),this[H+$]=(U/ce>>0)-Ce&255;return H+ee},p.prototype.writeInt8=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,1,127,-128),U<0&&(U=255+U+1),this[H]=U&255,H+1},p.prototype.writeInt16LE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,2,32767,-32768),this[H]=U&255,this[H+1]=U>>>8,H+2},p.prototype.writeInt16BE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,2,32767,-32768),this[H]=U>>>8,this[H+1]=U&255,H+2},p.prototype.writeInt32LE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,4,2147483647,-2147483648),this[H]=U&255,this[H+1]=U>>>8,this[H+2]=U>>>16,this[H+3]=U>>>24,H+4},p.prototype.writeInt32BE=function(U,H,ee){return U=+U,H=H>>>0,ee||Y(this,U,H,4,2147483647,-2147483648),U<0&&(U=4294967295+U+1),this[H]=U>>>24,this[H+1]=U>>>16,this[H+2]=U>>>8,this[H+3]=U&255,H+4};function fe(Q,U,H,ee,W,M){if(H+ee>Q.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("Index out of range")}function ve(Q,U,H,ee,W){return U=+U,H=H>>>0,W||fe(Q,U,H,4,34028234663852886e22,-34028234663852886e22),o.write(Q,U,H,ee,23,4),H+4}p.prototype.writeFloatLE=function(U,H,ee){return ve(this,U,H,!0,ee)},p.prototype.writeFloatBE=function(U,H,ee){return ve(this,U,H,!1,ee)};function be(Q,U,H,ee,W){return U=+U,H=H>>>0,W||fe(Q,U,H,8,17976931348623157e292,-17976931348623157e292),o.write(Q,U,H,ee,52,8),H+8}p.prototype.writeDoubleLE=function(U,H,ee){return be(this,U,H,!0,ee)},p.prototype.writeDoubleBE=function(U,H,ee){return be(this,U,H,!1,ee)},p.prototype.copy=function(U,H,ee,W){if(!p.isBuffer(U))throw new TypeError("argument should be a Buffer");if(ee||(ee=0),!W&&W!==0&&(W=this.length),H>=U.length&&(H=U.length),H||(H=0),W>0&&W<ee&&(W=ee),W===ee||U.length===0||this.length===0)return 0;if(H<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),U.length-H<W-ee&&(W=U.length-H+ee);var M=W-ee;return this===U&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(H,ee,W):Uint8Array.prototype.set.call(U,this.subarray(ee,W),H),M},p.prototype.fill=function(U,H,ee,W){if(typeof U=="string"){if(typeof H=="string"?(W=H,H=0,ee=this.length):typeof ee=="string"&&(W=ee,ee=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!p.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(U.length===1){var M=U.charCodeAt(0);(W==="utf8"&&M<128||W==="latin1")&&(U=M)}}else typeof U=="number"?U=U&255:typeof U=="boolean"&&(U=Number(U));if(H<0||this.length<H||this.length<ee)throw new RangeError("Out of range index");if(ee<=H)return this;H=H>>>0,ee=ee===void 0?this.length:ee>>>0,U||(U=0);var $;if(typeof U=="number")for($=H;$<ee;++$)this[$]=U;else{var ce=p.isBuffer(U)?U:p.from(U,W),Ce=ce.length;if(Ce===0)throw new TypeError('The value "'+U+'" is invalid for argument "value"');for($=0;$<ee-H;++$)this[$+H]=ce[$%Ce]}return this};var le=/[^+/0-9A-Za-z-_]/g;function ue(Q){if(Q=Q.split("=")[0],Q=Q.trim().replace(le,""),Q.length<2)return"";for(;Q.length%4!==0;)Q=Q+"=";return Q}function ge(Q,U){U=U||1/0;for(var H,ee=Q.length,W=null,M=[],$=0;$<ee;++$){if(H=Q.charCodeAt($),H>55295&&H<57344){if(!W){if(H>56319){(U-=3)>-1&&M.push(239,191,189);continue}else if($+1===ee){(U-=3)>-1&&M.push(239,191,189);continue}W=H;continue}if(H<56320){(U-=3)>-1&&M.push(239,191,189),W=H;continue}H=(W-55296<<10|H-56320)+65536}else W&&(U-=3)>-1&&M.push(239,191,189);if(W=null,H<128){if((U-=1)<0)break;M.push(H)}else if(H<2048){if((U-=2)<0)break;M.push(H>>6|192,H&63|128)}else if(H<65536){if((U-=3)<0)break;M.push(H>>12|224,H>>6&63|128,H&63|128)}else if(H<1114112){if((U-=4)<0)break;M.push(H>>18|240,H>>12&63|128,H>>6&63|128,H&63|128)}else throw new Error("Invalid code point")}return M}function Ee(Q){for(var U=[],H=0;H<Q.length;++H)U.push(Q.charCodeAt(H)&255);return U}function ke(Q,U){for(var H,ee,W,M=[],$=0;$<Q.length&&!((U-=2)<0);++$)H=Q.charCodeAt($),ee=H>>8,W=H%256,M.push(W),M.push(ee);return M}function Ie(Q){return ot.toByteArray(ue(Q))}function de(Q,U,H,ee){for(var W=0;W<ee&&!(W+H>=U.length||W>=Q.length);++W)U[W+H]=Q[W];return W}function Z(Q,U){return Q instanceof U||Q!=null&&Q.constructor!=null&&Q.constructor.name!=null&&Q.constructor.name===U.name}function ye(Q){return Q!==Q}var V=function(){for(var Q="0123456789abcdef",U=new Array(256),H=0;H<16;++H)for(var ee=H*16,W=0;W<16;++W)U[ee+W]=Q[H]+Q[W];return U}()},67467:function(Qt,ct){ct.read=function(Le,Ne,ot,o,_){var j,h,d=_*8-o-1,p=(1<<d)-1,b=p>>1,g=-7,w=ot?_-1:0,c=ot?-1:1,m=Le[Ne+w];for(w+=c,j=m&(1<<-g)-1,m>>=-g,g+=d;g>0;j=j*256+Le[Ne+w],w+=c,g-=8);for(h=j&(1<<-g)-1,j>>=-g,g+=o;g>0;h=h*256+Le[Ne+w],w+=c,g-=8);if(j===0)j=1-b;else{if(j===p)return h?NaN:(m?-1:1)*(1/0);h=h+Math.pow(2,o),j=j-b}return(m?-1:1)*h*Math.pow(2,j-o)},ct.write=function(Le,Ne,ot,o,_,j){var h,d,p,b=j*8-_-1,g=(1<<b)-1,w=g>>1,c=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:j-1,v=o?1:-1,y=Ne<0||Ne===0&&1/Ne<0?1:0;for(Ne=Math.abs(Ne),isNaN(Ne)||Ne===1/0?(d=isNaN(Ne)?1:0,h=g):(h=Math.floor(Math.log(Ne)/Math.LN2),Ne*(p=Math.pow(2,-h))<1&&(h--,p*=2),h+w>=1?Ne+=c/p:Ne+=c*Math.pow(2,1-w),Ne*p>=2&&(h++,p/=2),h+w>=g?(d=0,h=g):h+w>=1?(d=(Ne*p-1)*Math.pow(2,_),h=h+w):(d=Ne*Math.pow(2,w-1)*Math.pow(2,_),h=0));_>=8;Le[ot+m]=d&255,m+=v,d/=256,_-=8);for(h=h<<_|d,b+=_;b>0;Le[ot+m]=h&255,m+=v,h/=256,b-=8);Le[ot+m-v]|=y*128}},31193:function(Qt,ct,Le){var Ne=Le(48955);function ot(o){this.mode=Ne.MODE_8BIT_BYTE,this.data=o}ot.prototype={getLength:function(o){return this.data.length},write:function(o){for(var _=0;_<this.data.length;_++)o.put(this.data.charCodeAt(_),8)}},Qt.exports=ot},31144:function(Qt){function ct(){this.buffer=new Array,this.length=0}ct.prototype={get:function(Le){var Ne=Math.floor(Le/8);return(this.buffer[Ne]>>>7-Le%8&1)==1},put:function(Le,Ne){for(var ot=0;ot<Ne;ot++)this.putBit((Le>>>Ne-ot-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(Le){var Ne=Math.floor(this.length/8);this.buffer.length<=Ne&&this.buffer.push(0),Le&&(this.buffer[Ne]|=128>>>this.length%8),this.length++}},Qt.exports=ct},78485:function(Qt){Qt.exports={L:1,M:0,Q:3,H:2}},13679:function(Qt,ct,Le){var Ne=Le(87532);function ot(o,_){if(o.length==null)throw new Error(o.length+"/"+_);for(var j=0;j<o.length&&o[j]==0;)j++;this.num=new Array(o.length-j+_);for(var h=0;h<o.length-j;h++)this.num[h]=o[h+j]}ot.prototype={get:function(o){return this.num[o]},getLength:function(){return this.num.length},multiply:function(o){for(var _=new Array(this.getLength()+o.getLength()-1),j=0;j<this.getLength();j++)for(var h=0;h<o.getLength();h++)_[j+h]^=Ne.gexp(Ne.glog(this.get(j))+Ne.glog(o.get(h)));return new ot(_,0)},mod:function(o){if(this.getLength()-o.getLength()<0)return this;for(var _=Ne.glog(this.get(0))-Ne.glog(o.get(0)),j=new Array(this.getLength()),h=0;h<this.getLength();h++)j[h]=this.get(h);for(var h=0;h<o.getLength();h++)j[h]^=Ne.gexp(Ne.glog(o.get(h))+_);return new ot(j,0).mod(o)}},Qt.exports=ot},86397:function(Qt,ct,Le){var Ne=Le(31193),ot=Le(84590),o=Le(31144),_=Le(28688),j=Le(13679);function h(p,b){this.typeNumber=p,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var d=h.prototype;d.addData=function(p){var b=new Ne(p);this.dataList.push(b),this.dataCache=null},d.isDark=function(p,b){if(p<0||this.moduleCount<=p||b<0||this.moduleCount<=b)throw new Error(p+","+b);return this.modules[p][b]},d.getModuleCount=function(){return this.moduleCount},d.make=function(){if(this.typeNumber<1){var p=1;for(p=1;p<40;p++){for(var b=ot.getRSBlocks(p,this.errorCorrectLevel),g=new o,w=0,c=0;c<b.length;c++)w+=b[c].dataCount;for(var c=0;c<this.dataList.length;c++){var m=this.dataList[c];g.put(m.mode,4),g.put(m.getLength(),_.getLengthInBits(m.mode,p)),m.write(g)}if(g.getLengthInBits()<=w*8)break}this.typeNumber=p}this.makeImpl(!1,this.getBestMaskPattern())},d.makeImpl=function(p,b){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++){this.modules[g]=new Array(this.moduleCount);for(var w=0;w<this.moduleCount;w++)this.modules[g][w]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(p,b),this.typeNumber>=7&&this.setupTypeNumber(p),this.dataCache==null&&(this.dataCache=h.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,b)},d.setupPositionProbePattern=function(p,b){for(var g=-1;g<=7;g++)if(!(p+g<=-1||this.moduleCount<=p+g))for(var w=-1;w<=7;w++)b+w<=-1||this.moduleCount<=b+w||(0<=g&&g<=6&&(w==0||w==6)||0<=w&&w<=6&&(g==0||g==6)||2<=g&&g<=4&&2<=w&&w<=4?this.modules[p+g][b+w]=!0:this.modules[p+g][b+w]=!1)},d.getBestMaskPattern=function(){for(var p=0,b=0,g=0;g<8;g++){this.makeImpl(!0,g);var w=_.getLostPoint(this);(g==0||p>w)&&(p=w,b=g)}return b},d.createMovieClip=function(p,b,g){var w=p.createEmptyMovieClip(b,g),c=1;this.make();for(var m=0;m<this.modules.length;m++)for(var v=m*c,y=0;y<this.modules[m].length;y++){var E=y*c,T=this.modules[m][y];T&&(w.beginFill(0,100),w.moveTo(E,v),w.lineTo(E+c,v),w.lineTo(E+c,v+c),w.lineTo(E,v+c),w.endFill())}return w},d.setupTimingPattern=function(){for(var p=8;p<this.moduleCount-8;p++)this.modules[p][6]==null&&(this.modules[p][6]=p%2==0);for(var b=8;b<this.moduleCount-8;b++)this.modules[6][b]==null&&(this.modules[6][b]=b%2==0)},d.setupPositionAdjustPattern=function(){for(var p=_.getPatternPosition(this.typeNumber),b=0;b<p.length;b++)for(var g=0;g<p.length;g++){var w=p[b],c=p[g];if(this.modules[w][c]==null)for(var m=-2;m<=2;m++)for(var v=-2;v<=2;v++)m==-2||m==2||v==-2||v==2||m==0&&v==0?this.modules[w+m][c+v]=!0:this.modules[w+m][c+v]=!1}},d.setupTypeNumber=function(p){for(var b=_.getBCHTypeNumber(this.typeNumber),g=0;g<18;g++){var w=!p&&(b>>g&1)==1;this.modules[Math.floor(g/3)][g%3+this.moduleCount-8-3]=w}for(var g=0;g<18;g++){var w=!p&&(b>>g&1)==1;this.modules[g%3+this.moduleCount-8-3][Math.floor(g/3)]=w}},d.setupTypeInfo=function(p,b){for(var g=this.errorCorrectLevel<<3|b,w=_.getBCHTypeInfo(g),c=0;c<15;c++){var m=!p&&(w>>c&1)==1;c<6?this.modules[c][8]=m:c<8?this.modules[c+1][8]=m:this.modules[this.moduleCount-15+c][8]=m}for(var c=0;c<15;c++){var m=!p&&(w>>c&1)==1;c<8?this.modules[8][this.moduleCount-c-1]=m:c<9?this.modules[8][15-c-1+1]=m:this.modules[8][15-c-1]=m}this.modules[this.moduleCount-8][8]=!p},d.mapData=function(p,b){for(var g=-1,w=this.moduleCount-1,c=7,m=0,v=this.moduleCount-1;v>0;v-=2)for(v==6&&v--;;){for(var y=0;y<2;y++)if(this.modules[w][v-y]==null){var E=!1;m<p.length&&(E=(p[m]>>>c&1)==1);var T=_.getMask(b,w,v-y);T&&(E=!E),this.modules[w][v-y]=E,c--,c==-1&&(m++,c=7)}if(w+=g,w<0||this.moduleCount<=w){w-=g,g=-g;break}}},h.PAD0=236,h.PAD1=17,h.createData=function(p,b,g){for(var w=ot.getRSBlocks(p,b),c=new o,m=0;m<g.length;m++){var v=g[m];c.put(v.mode,4),c.put(v.getLength(),_.getLengthInBits(v.mode,p)),v.write(c)}for(var y=0,m=0;m<w.length;m++)y+=w[m].dataCount;if(c.getLengthInBits()>y*8)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+y*8+")");for(c.getLengthInBits()+4<=y*8&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;!(c.getLengthInBits()>=y*8||(c.put(h.PAD0,8),c.getLengthInBits()>=y*8));)c.put(h.PAD1,8);return h.createBytes(c,w)},h.createBytes=function(p,b){for(var g=0,w=0,c=0,m=new Array(b.length),v=new Array(b.length),y=0;y<b.length;y++){var E=b[y].dataCount,T=b[y].totalCount-E;w=Math.max(w,E),c=Math.max(c,T),m[y]=new Array(E);for(var S=0;S<m[y].length;S++)m[y][S]=255&p.buffer[S+g];g+=E;var C=_.getErrorCorrectPolynomial(T),x=new j(m[y],C.getLength()-1),O=x.mod(C);v[y]=new Array(C.getLength()-1);for(var S=0;S<v[y].length;S++){var J=S+O.getLength()-v[y].length;v[y][S]=J>=0?O.get(J):0}}for(var P=0,S=0;S<b.length;S++)P+=b[S].totalCount;for(var X=new Array(P),B=0,S=0;S<w;S++)for(var y=0;y<b.length;y++)S<m[y].length&&(X[B++]=m[y][S]);for(var S=0;S<c;S++)for(var y=0;y<b.length;y++)S<v[y].length&&(X[B++]=v[y][S]);return X},Qt.exports=h},84590:function(Qt,ct,Le){var Ne=Le(78485);function ot(o,_){this.totalCount=o,this.dataCount=_}ot.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],ot.getRSBlocks=function(o,_){var j=ot.getRsBlockTable(o,_);if(j==null)throw new Error("bad rs block @ typeNumber:"+o+"/errorCorrectLevel:"+_);for(var h=j.length/3,d=new Array,p=0;p<h;p++)for(var b=j[p*3+0],g=j[p*3+1],w=j[p*3+2],c=0;c<b;c++)d.push(new ot(g,w));return d},ot.getRsBlockTable=function(o,_){switch(_){case Ne.L:return ot.RS_BLOCK_TABLE[(o-1)*4+0];case Ne.M:return ot.RS_BLOCK_TABLE[(o-1)*4+1];case Ne.Q:return ot.RS_BLOCK_TABLE[(o-1)*4+2];case Ne.H:return ot.RS_BLOCK_TABLE[(o-1)*4+3];default:return}},Qt.exports=ot},87532:function(Qt){for(var ct={glog:function(Ne){if(Ne<1)throw new Error("glog("+Ne+")");return ct.LOG_TABLE[Ne]},gexp:function(Ne){for(;Ne<0;)Ne+=255;for(;Ne>=256;)Ne-=255;return ct.EXP_TABLE[Ne]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},Le=0;Le<8;Le++)ct.EXP_TABLE[Le]=1<<Le;for(var Le=8;Le<256;Le++)ct.EXP_TABLE[Le]=ct.EXP_TABLE[Le-4]^ct.EXP_TABLE[Le-5]^ct.EXP_TABLE[Le-6]^ct.EXP_TABLE[Le-8];for(var Le=0;Le<255;Le++)ct.LOG_TABLE[ct.EXP_TABLE[Le]]=Le;Qt.exports=ct},48955:function(Qt){Qt.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},28688:function(Qt,ct,Le){var Ne=Le(48955),ot=Le(13679),o=Le(87532),_={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},j={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(h){for(var d=h<<10;j.getBCHDigit(d)-j.getBCHDigit(j.G15)>=0;)d^=j.G15<<j.getBCHDigit(d)-j.getBCHDigit(j.G15);return(h<<10|d)^j.G15_MASK},getBCHTypeNumber:function(h){for(var d=h<<12;j.getBCHDigit(d)-j.getBCHDigit(j.G18)>=0;)d^=j.G18<<j.getBCHDigit(d)-j.getBCHDigit(j.G18);return h<<12|d},getBCHDigit:function(h){for(var d=0;h!=0;)d++,h>>>=1;return d},getPatternPosition:function(h){return j.PATTERN_POSITION_TABLE[h-1]},getMask:function(h,d,p){switch(h){case _.PATTERN000:return(d+p)%2==0;case _.PATTERN001:return d%2==0;case _.PATTERN010:return p%3==0;case _.PATTERN011:return(d+p)%3==0;case _.PATTERN100:return(Math.floor(d/2)+Math.floor(p/3))%2==0;case _.PATTERN101:return d*p%2+d*p%3==0;case _.PATTERN110:return(d*p%2+d*p%3)%2==0;case _.PATTERN111:return(d*p%3+(d+p)%2)%2==0;default:throw new Error("bad maskPattern:"+h)}},getErrorCorrectPolynomial:function(h){for(var d=new ot([1],0),p=0;p<h;p++)d=d.multiply(new ot([1,o.gexp(p)],0));return d},getLengthInBits:function(h,d){if(1<=d&&d<10)switch(h){case Ne.MODE_NUMBER:return 10;case Ne.MODE_ALPHA_NUM:return 9;case Ne.MODE_8BIT_BYTE:return 8;case Ne.MODE_KANJI:return 8;default:throw new Error("mode:"+h)}else if(d<27)switch(h){case Ne.MODE_NUMBER:return 12;case Ne.MODE_ALPHA_NUM:return 11;case Ne.MODE_8BIT_BYTE:return 16;case Ne.MODE_KANJI:return 10;default:throw new Error("mode:"+h)}else if(d<41)switch(h){case Ne.MODE_NUMBER:return 14;case Ne.MODE_ALPHA_NUM:return 13;case Ne.MODE_8BIT_BYTE:return 16;case Ne.MODE_KANJI:return 12;default:throw new Error("mode:"+h)}else throw new Error("type:"+d)},getLostPoint:function(h){for(var d=h.getModuleCount(),p=0,b=0;b<d;b++)for(var g=0;g<d;g++){for(var w=0,c=h.isDark(b,g),m=-1;m<=1;m++)if(!(b+m<0||d<=b+m))for(var v=-1;v<=1;v++)g+v<0||d<=g+v||m==0&&v==0||c==h.isDark(b+m,g+v)&&w++;w>5&&(p+=3+w-5)}for(var b=0;b<d-1;b++)for(var g=0;g<d-1;g++){var y=0;h.isDark(b,g)&&y++,h.isDark(b+1,g)&&y++,h.isDark(b,g+1)&&y++,h.isDark(b+1,g+1)&&y++,(y==0||y==4)&&(p+=3)}for(var b=0;b<d;b++)for(var g=0;g<d-6;g++)h.isDark(b,g)&&!h.isDark(b,g+1)&&h.isDark(b,g+2)&&h.isDark(b,g+3)&&h.isDark(b,g+4)&&!h.isDark(b,g+5)&&h.isDark(b,g+6)&&(p+=40);for(var g=0;g<d;g++)for(var b=0;b<d-6;b++)h.isDark(b,g)&&!h.isDark(b+1,g)&&h.isDark(b+2,g)&&h.isDark(b+3,g)&&h.isDark(b+4,g)&&!h.isDark(b+5,g)&&h.isDark(b+6,g)&&(p+=40);for(var E=0,g=0;g<d;g++)for(var b=0;b<d;b++)h.isDark(b,g)&&E++;var T=Math.abs(100*E/d/d-50)/5;return p+=T*10,p}};Qt.exports=j},15845:function(Qt,ct,Le){"use strict";function Ne(N){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ne=function(re){return typeof re}:Ne=function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},Ne(N)}function ot(){return ot=Object.assign||function(N){for(var K=1;K<arguments.length;K++){var re=arguments[K];for(var ne in re)Object.prototype.hasOwnProperty.call(re,ne)&&(N[ne]=re[ne])}return N},ot.apply(this,arguments)}function o(N,K){var re=Object.keys(N);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(N);K&&(ne=ne.filter(function(pe){return Object.getOwnPropertyDescriptor(N,pe).enumerable})),re.push.apply(re,ne)}return re}function _(N){for(var K=1;K<arguments.length;K++){var re=arguments[K]!=null?arguments[K]:{};K%2?o(re,!0).forEach(function(ne){y(N,ne,re[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(re)):o(re).forEach(function(ne){Object.defineProperty(N,ne,Object.getOwnPropertyDescriptor(re,ne))})}return N}function j(N,K){if(N==null)return{};var re=h(N,K),ne,pe;if(Object.getOwnPropertySymbols){var ie=Object.getOwnPropertySymbols(N);for(pe=0;pe<ie.length;pe++)ne=ie[pe],!(K.indexOf(ne)>=0)&&Object.prototype.propertyIsEnumerable.call(N,ne)&&(re[ne]=N[ne])}return re}function h(N,K){if(N==null)return{};var re={},ne=Object.keys(N),pe,ie;for(ie=0;ie<ne.length;ie++)pe=ne[ie],!(K.indexOf(pe)>=0)&&(re[pe]=N[pe]);return re}function d(N,K){if(!(N instanceof K))throw new TypeError("Cannot call a class as a function")}function p(N,K){for(var re=0;re<K.length;re++){var ne=K[re];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(N,ne.key,ne)}}function b(N,K,re){return K&&p(N.prototype,K),re&&p(N,re),N}function g(N,K){return K&&(Ne(K)==="object"||typeof K=="function")?K:c(N)}function w(N){return w=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},w(N)}function c(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function m(N,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(K&&K.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),K&&v(N,K)}function v(N,K){return v=Object.setPrototypeOf||function(ne,pe){return ne.__proto__=pe,ne},v(N,K)}function y(N,K,re){return K in N?Object.defineProperty(N,K,{value:re,enumerable:!0,configurable:!0,writable:!0}):N[K]=re,N}var E=Le(59301),T=Le(12708),S=Le(86397),C=Le(78485);function x(N){for(var K="",re=0;re<N.length;re++){var ne=N.charCodeAt(re);ne<128?K+=String.fromCharCode(ne):ne<2048?(K+=String.fromCharCode(192|ne>>6),K+=String.fromCharCode(128|ne&63)):ne<55296||ne>=57344?(K+=String.fromCharCode(224|ne>>12),K+=String.fromCharCode(128|ne>>6&63),K+=String.fromCharCode(128|ne&63)):(re++,ne=65536+((ne&1023)<<10|N.charCodeAt(re)&1023),K+=String.fromCharCode(240|ne>>18),K+=String.fromCharCode(128|ne>>12&63),K+=String.fromCharCode(128|ne>>6&63),K+=String.fromCharCode(128|ne&63))}return K}var O={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},J={},P=4,X=.1;function B(N){var K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,re=[];return N.forEach(function(ne,pe){var ie=null;ne.forEach(function(Ae,Y){if(!Ae&&ie!==null){re.push("M".concat(ie+K," ").concat(pe+K,"h").concat(Y-ie,"v1H").concat(ie+K,"z")),ie=null;return}if(Y===ne.length-1){if(!Ae)return;ie===null?re.push("M".concat(Y+K,",").concat(pe+K," h1v1H").concat(Y+K,"z")):re.push("M".concat(ie+K,",").concat(pe+K," h").concat(Y+1-ie,"v1H").concat(ie+K,"z"));return}Ae&&ie===null&&(ie=Y)})}),re.join("")}function k(N,K){return N.slice().map(function(re,ne){return ne<K.y||ne>=K.y+K.h?re:re.map(function(pe,ie){return ie<K.x||ie>=K.x+K.w?pe:!1})})}function D(N,K){var re=N.imageSettings,ne=N.size,pe=N.includeMargin;if(re==null)return null;var ie=pe?P:0,Ae=K.length+ie*2,Y=Math.floor(ne*X),fe=Ae/ne,ve=(re.width||Y)*fe,be=(re.height||Y)*fe,le=re.x==null?K.length/2-ve/2:re.x*fe,ue=re.y==null?K.length/2-be/2:re.y*fe,ge=null;if(re.excavate){var Ee=Math.floor(le),ke=Math.floor(ue),Ie=Math.ceil(ve+le-Ee),de=Math.ceil(be+ue-ke);ge={x:Ee,y:ke,w:Ie,h:de}}return{x:le,y:ue,h:be,w:ve,excavation:ge}}var L=function(){try{new Path2D().addPath(new Path2D)}catch(N){return!1}return!0}(),q=function(N){m(K,N);function K(){var re,ne;d(this,K);for(var pe=arguments.length,ie=new Array(pe),Ae=0;Ae<pe;Ae++)ie[Ae]=arguments[Ae];return ne=g(this,(re=w(K)).call.apply(re,[this].concat(ie))),y(c(ne),"_canvas",void 0),y(c(ne),"_image",void 0),y(c(ne),"state",{imgLoaded:!1}),y(c(ne),"handleImageLoad",function(){ne.setState({imgLoaded:!0})}),ne}return b(K,[{key:"componentDidMount",value:function(){this.update()}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var ne=this.props,pe=ne.value,ie=ne.size,Ae=ne.level,Y=ne.bgColor,fe=ne.fgColor,ve=ne.includeMargin,be=ne.imageSettings,le=new S(-1,C[Ae]);if(le.addData(x(pe)),le.make(),this._canvas!=null){var ue=this._canvas,ge=ue.getContext("2d");if(!ge)return;var Ee=le.modules;if(Ee===null)return;var ke=ve?P:0,Ie=Ee.length+ke*2,de=D(this.props,Ee);be!=null&&de!=null&&de.excavation!=null&&(Ee=k(Ee,de.excavation));var Z=window.devicePixelRatio||1;ue.height=ue.width=ie*Z;var ye=ie/Ie*Z;ge.scale(ye,ye),ge.fillStyle=Y,ge.fillRect(0,0,Ie,Ie),ge.fillStyle=fe,L?ge.fill(new Path2D(B(Ee,ke))):Ee.forEach(function(V,Q){V.forEach(function(U,H){U&&ge.fillRect(H+ke,Q+ke,1,1)})}),this.state.imgLoaded&&this._image&&de!=null&&ge.drawImage(this._image,de.x+ke,de.y+ke,de.w,de.h)}}},{key:"render",value:function(){var ne=this,pe=this.props,ie=pe.value,Ae=pe.size,Y=pe.level,fe=pe.bgColor,ve=pe.fgColor,be=pe.style,le=pe.includeMargin,ue=pe.imageSettings,ge=j(pe,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),Ee=_({height:Ae,width:Ae},be),ke=null,Ie=ue&&ue.src;return ue!=null&&Ie!=null&&(ke=E.createElement("img",{src:Ie,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(Z){return ne._image=Z}})),E.createElement(E.Fragment,null,E.createElement("canvas",ot({style:Ee,height:Ae,width:Ae,ref:function(Z){return ne._canvas=Z}},ge)),ke)}}]),K}(E.PureComponent);y(q,"defaultProps",O);var G=function(N){m(K,N);function K(){return d(this,K),g(this,w(K).apply(this,arguments))}return b(K,[{key:"render",value:function(){var ne=this.props,pe=ne.value,ie=ne.size,Ae=ne.level,Y=ne.bgColor,fe=ne.fgColor,ve=ne.includeMargin,be=ne.imageSettings,le=j(ne,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),ue=new S(-1,C[Ae]);ue.addData(x(pe)),ue.make();var ge=ue.modules;if(ge===null)return null;var Ee=ve?P:0,ke=ge.length+Ee*2,Ie=D(this.props,ge),de=null;be!=null&&Ie!=null&&(Ie.excavation!=null&&(ge=k(ge,Ie.excavation)),de=E.createElement("image",{xlinkHref:be.src,height:Ie.h,width:Ie.w,x:Ie.x+Ee,y:Ie.y+Ee,preserveAspectRatio:"none"}));var Z=B(ge,Ee);return E.createElement("svg",ot({shapeRendering:"crispEdges",height:ie,width:ie,viewBox:"0 0 ".concat(ke," ").concat(ke)},le),E.createElement("path",{fill:Y,d:"M0,0 h".concat(ke,"v").concat(ke,"H0z")}),E.createElement("path",{fill:fe,d:Z}),de)}}]),K}(E.PureComponent);y(G,"defaultProps",O);var F=function(K){var re=K.renderAs,ne=j(K,["renderAs"]),pe=re==="svg"?G:q;return E.createElement(pe,ne)};F.defaultProps=_({renderAs:"canvas"},O),Qt.exports=F},25930:function(Qt,ct,Le){"use strict";Le.d(ct,{Cd:function(){return L}});var Ne=Le(54476),ot=Le(33885),o=Le(75931),_=Le(59301),j=Le(92310),h=Le.n(j),d={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},p=function(){var F=(0,_.useRef)([]),N=(0,_.useRef)(null);return(0,_.useEffect)(function(){var K=Date.now(),re=!1;F.current.forEach(function(ne){if(ne){re=!0;var pe=ne.style;pe.transitionDuration=".3s, .3s, .3s, .06s",N.current&&K-N.current<100&&(pe.transitionDuration="0s, 0s")}}),re&&(N.current=Date.now())}),F.current},b=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],g=function(F){var N=(0,ot.Z)((0,ot.Z)({},d),F),K=N.className,re=N.percent,ne=N.prefixCls,pe=N.strokeColor,ie=N.strokeLinecap,Ae=N.strokeWidth,Y=N.style,fe=N.trailColor,ve=N.trailWidth,be=N.transition,le=(0,o.Z)(N,b);delete le.gapPosition;var ue=Array.isArray(re)?re:[re],ge=Array.isArray(pe)?pe:[pe],Ee=p(),ke=Ae/2,Ie=100-Ae/2,de="M ".concat(ie==="round"?ke:0,",").concat(ke,`
|
|
L `).concat(ie==="round"?Ie:100,",").concat(ke),Z="0 0 100 ".concat(Ae),ye=0;return _.createElement("svg",(0,Ne.Z)({className:h()("".concat(ne,"-line"),K),viewBox:Z,preserveAspectRatio:"none",style:Y},le),_.createElement("path",{className:"".concat(ne,"-line-trail"),d:de,strokeLinecap:ie,stroke:fe,strokeWidth:ve||Ae,fillOpacity:"0"}),ue.map(function(V,Q){var U=1;switch(ie){case"round":U=1-Ae/100;break;case"square":U=1-Ae/2/100;break;default:U=1;break}var H={strokeDasharray:"".concat(V*U,"px, 100px"),strokeDashoffset:"-".concat(ye,"px"),transition:be||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ee=ge[Q]||ge[ge.length-1];return ye+=V,_.createElement("path",{key:Q,className:"".concat(ne,"-line-path"),d:de,strokeLinecap:ie,stroke:ee,strokeWidth:Ae,fillOpacity:"0",ref:function(M){Ee[Q]=M},style:H})}))},w=g,c=Le(76190),m=Le(42978),v=Le(47273),y=0,E=(0,v.Z)();function T(){var G;return E?(G=y,y+=1):G="TEST_OR_SSR",G}var S=function(G){var F=_.useState(),N=(0,m.Z)(F,2),K=N[0],re=N[1];return _.useEffect(function(){re("rc_progress_".concat(T()))},[]),G||K},C=function(F){var N=F.bg,K=F.children;return _.createElement("div",{style:{width:"100%",height:"100%",background:N}},K)};function x(G,F){return Object.keys(G).map(function(N){var K=parseFloat(N),re="".concat(Math.floor(K*F),"%");return"".concat(G[N]," ").concat(re)})}var O=_.forwardRef(function(G,F){var N=G.prefixCls,K=G.color,re=G.gradientId,ne=G.radius,pe=G.style,ie=G.ptg,Ae=G.strokeLinecap,Y=G.strokeWidth,fe=G.size,ve=G.gapDegree,be=K&&(0,c.Z)(K)==="object",le=be?"#FFF":void 0,ue=fe/2,ge=_.createElement("circle",{className:"".concat(N,"-circle-path"),r:ne,cx:ue,cy:ue,stroke:le,strokeLinecap:Ae,strokeWidth:Y,opacity:ie===0?0:1,style:pe,ref:F});if(!be)return ge;var Ee="".concat(re,"-conic"),ke=ve?"".concat(180+ve/2,"deg"):"0deg",Ie=x(K,(360-ve)/360),de=x(K,1),Z="conic-gradient(from ".concat(ke,", ").concat(Ie.join(", "),")"),ye="linear-gradient(to ".concat(ve?"bottom":"top",", ").concat(de.join(", "),")");return _.createElement(_.Fragment,null,_.createElement("mask",{id:Ee},ge),_.createElement("foreignObject",{x:0,y:0,width:fe,height:fe,mask:"url(#".concat(Ee,")")},_.createElement(C,{bg:ye},_.createElement(C,{bg:Z}))))}),J=O,P=100,X=function(F,N,K,re,ne,pe,ie,Ae,Y,fe){var ve=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,be=K/100*360*((360-pe)/360),le=pe===0?0:{bottom:0,top:180,left:90,right:-90}[ie],ue=(100-re)/100*N;Y==="round"&&re!==100&&(ue+=fe/2,ue>=N&&(ue=N-.01));var ge=P/2;return{stroke:typeof Ae=="string"?Ae:void 0,strokeDasharray:"".concat(N,"px ").concat(F),strokeDashoffset:ue+ve,transform:"rotate(".concat(ne+be+le,"deg)"),transformOrigin:"".concat(ge,"px ").concat(ge,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},B=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function k(G){var F=G!=null?G:[];return Array.isArray(F)?F:[F]}var D=function(F){var N=(0,ot.Z)((0,ot.Z)({},d),F),K=N.id,re=N.prefixCls,ne=N.steps,pe=N.strokeWidth,ie=N.trailWidth,Ae=N.gapDegree,Y=Ae===void 0?0:Ae,fe=N.gapPosition,ve=N.trailColor,be=N.strokeLinecap,le=N.style,ue=N.className,ge=N.strokeColor,Ee=N.percent,ke=(0,o.Z)(N,B),Ie=P/2,de=S(K),Z="".concat(de,"-gradient"),ye=Ie-pe/2,V=Math.PI*2*ye,Q=Y>0?90+Y/2:-90,U=V*((360-Y)/360),H=(0,c.Z)(ne)==="object"?ne:{count:ne,gap:2},ee=H.count,W=H.gap,M=k(Ee),$=k(ge),ce=$.find(function(Ve){return Ve&&(0,c.Z)(Ve)==="object"}),Ce=ce&&(0,c.Z)(ce)==="object",Ue=Ce?"butt":be,_e=X(V,U,0,100,Q,Y,fe,ve,Ue,pe),he=p(),Te=function(){var De=0;return M.map(function(Xe,Ke){var $e=$[Ke]||$[$.length-1],Je=X(V,U,De,Xe,Q,Y,fe,$e,Ue,pe);return De+=Xe,_.createElement(J,{key:Ke,color:$e,ptg:Xe,radius:ye,prefixCls:re,gradientId:Z,style:Je,strokeLinecap:Ue,strokeWidth:pe,gapDegree:Y,ref:function(et){he[Ke]=et},size:P})}).reverse()},Pe=function(){var De=Math.round(ee*(M[0]/100)),Xe=100/ee,Ke=0;return new Array(ee).fill(null).map(function($e,Je){var nt=Je<=De-1?$[0]:ve,et=nt&&(0,c.Z)(nt)==="object"?"url(#".concat(Z,")"):void 0,ht=X(V,U,Ke,Xe,Q,Y,fe,nt,"butt",pe,W);return Ke+=(U-ht.strokeDashoffset+W)*100/U,_.createElement("circle",{key:Je,className:"".concat(re,"-circle-path"),r:ye,cx:Ie,cy:Ie,stroke:et,strokeWidth:pe,opacity:1,style:ht,ref:function(zt){he[Je]=zt}})})};return _.createElement("svg",(0,Ne.Z)({className:h()("".concat(re,"-circle"),ue),viewBox:"0 0 ".concat(P," ").concat(P),style:le,id:K,role:"presentation"},ke),!ee&&_.createElement("circle",{className:"".concat(re,"-circle-trail"),r:ye,cx:Ie,cy:Ie,stroke:ve,strokeLinecap:Ue,strokeWidth:ie||pe,style:_e}),ee?Pe():Te())},L=D,q={Line:w,Circle:L}},29301:function(Qt,ct,Le){"use strict";Le.d(ct,{Z:function(){return G}});var Ne=Le(54476),ot=Le(59301),o=Le(11592),_=Le(48736),j=Le(33885),h=Le(76190),d=Le(76846),p=Le(8654),b=ot.createContext(null);function g(F){var N=F.children,K=F.onBatchResize,re=ot.useRef(0),ne=ot.useRef([]),pe=ot.useContext(b),ie=ot.useCallback(function(Ae,Y,fe){re.current+=1;var ve=re.current;ne.current.push({size:Ae,element:Y,data:fe}),Promise.resolve().then(function(){ve===re.current&&(K==null||K(ne.current),ne.current=[])}),pe==null||pe(Ae,Y,fe)},[K,pe]);return ot.createElement(b.Provider,{value:ie},N)}var w=Le(76374),c=new Map;function m(F){F.forEach(function(N){var K,re=N.target;(K=c.get(re))===null||K===void 0||K.forEach(function(ne){return ne(re)})})}var v=new w.Z(m),y=null,E=null;function T(F,N){c.has(F)||(c.set(F,new Set),v.observe(F)),c.get(F).add(N)}function S(F,N){c.has(F)&&(c.get(F).delete(N),c.get(F).size||(v.unobserve(F),c.delete(F)))}var C=Le(67732),x=Le(83652),O=Le(42403),J=Le(158),P=function(F){(0,O.Z)(K,F);var N=(0,J.Z)(K);function K(){return(0,C.Z)(this,K),N.apply(this,arguments)}return(0,x.Z)(K,[{key:"render",value:function(){return this.props.children}}]),K}(ot.Component);function X(F,N){var K=F.children,re=F.disabled,ne=ot.useRef(null),pe=ot.useRef(null),ie=ot.useContext(b),Ae=typeof K=="function",Y=Ae?K(ne):K,fe=ot.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),ve=!Ae&&ot.isValidElement(Y)&&(0,p.Yr)(Y),be=ve?(0,p.C4)(Y):null,le=(0,p.x1)(be,ne),ue=function(){var Ie;return(0,d.ZP)(ne.current)||(ne.current&&(0,h.Z)(ne.current)==="object"?(0,d.ZP)((Ie=ne.current)===null||Ie===void 0?void 0:Ie.nativeElement):null)||(0,d.ZP)(pe.current)};ot.useImperativeHandle(N,function(){return ue()});var ge=ot.useRef(F);ge.current=F;var Ee=ot.useCallback(function(ke){var Ie=ge.current,de=Ie.onResize,Z=Ie.data,ye=ke.getBoundingClientRect(),V=ye.width,Q=ye.height,U=ke.offsetWidth,H=ke.offsetHeight,ee=Math.floor(V),W=Math.floor(Q);if(fe.current.width!==ee||fe.current.height!==W||fe.current.offsetWidth!==U||fe.current.offsetHeight!==H){var M={width:ee,height:W,offsetWidth:U,offsetHeight:H};fe.current=M;var $=U===Math.round(V)?V:U,ce=H===Math.round(Q)?Q:H,Ce=(0,j.Z)((0,j.Z)({},M),{},{offsetWidth:$,offsetHeight:ce});ie==null||ie(Ce,ke,Z),de&&Promise.resolve().then(function(){de(Ce,ke)})}},[]);return ot.useEffect(function(){var ke=ue();return ke&&!re&&T(ke,Ee),function(){return S(ke,Ee)}},[ne.current,re]),ot.createElement(P,{ref:pe},ve?ot.cloneElement(Y,{ref:le}):Y)}var B=ot.forwardRef(X),k=B,D="rc-observer-key";function L(F,N){var K=F.children,re=typeof K=="function"?[K]:(0,o.Z)(K);return re.map(function(ne,pe){var ie=(ne==null?void 0:ne.key)||"".concat(D,"-").concat(pe);return ot.createElement(k,(0,Ne.Z)({},F,{key:ie,ref:pe===0?N:void 0}),ne)})}var q=ot.forwardRef(L);q.Collection=g;var G=q},29125:function(Qt,ct,Le){"use strict";Le.d(ct,{G:function(){return _},Z:function(){return S}});var Ne=Le(92310),ot=Le.n(Ne),o=Le(59301);function _(C){var x=C.children,O=C.prefixCls,J=C.id,P=C.overlayInnerStyle,X=C.bodyClassName,B=C.className,k=C.style;return o.createElement("div",{className:ot()("".concat(O,"-content"),B),style:k},o.createElement("div",{className:ot()("".concat(O,"-inner"),X),id:J,role:"tooltip",style:P},typeof x=="function"?x():x))}var j=Le(54476),h=Le(33885),d=Le(75931),p=Le(65030),b={shiftX:64,adjustY:1},g={adjustX:1,shiftY:!0},w=[0,0],c={left:{points:["cr","cl"],overflow:g,offset:[-4,0],targetOffset:w},right:{points:["cl","cr"],overflow:g,offset:[4,0],targetOffset:w},top:{points:["bc","tc"],overflow:b,offset:[0,-4],targetOffset:w},bottom:{points:["tc","bc"],overflow:b,offset:[0,4],targetOffset:w},topLeft:{points:["bl","tl"],overflow:b,offset:[0,-4],targetOffset:w},leftTop:{points:["tr","tl"],overflow:g,offset:[-4,0],targetOffset:w},topRight:{points:["br","tr"],overflow:b,offset:[0,-4],targetOffset:w},rightTop:{points:["tl","tr"],overflow:g,offset:[4,0],targetOffset:w},bottomRight:{points:["tr","br"],overflow:b,offset:[0,4],targetOffset:w},rightBottom:{points:["bl","br"],overflow:g,offset:[4,0],targetOffset:w},bottomLeft:{points:["tl","bl"],overflow:b,offset:[0,4],targetOffset:w},leftBottom:{points:["br","bl"],overflow:g,offset:[-4,0],targetOffset:w}},m=null,v=Le(80402),y=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],E=function(x,O){var J=x.overlayClassName,P=x.trigger,X=P===void 0?["hover"]:P,B=x.mouseEnterDelay,k=B===void 0?0:B,D=x.mouseLeaveDelay,L=D===void 0?.1:D,q=x.overlayStyle,G=x.prefixCls,F=G===void 0?"rc-tooltip":G,N=x.children,K=x.onVisibleChange,re=x.afterVisibleChange,ne=x.transitionName,pe=x.animation,ie=x.motion,Ae=x.placement,Y=Ae===void 0?"right":Ae,fe=x.align,ve=fe===void 0?{}:fe,be=x.destroyTooltipOnHide,le=be===void 0?!1:be,ue=x.defaultVisible,ge=x.getTooltipContainer,Ee=x.overlayInnerStyle,ke=x.arrowContent,Ie=x.overlay,de=x.id,Z=x.showArrow,ye=Z===void 0?!0:Z,V=x.classNames,Q=x.styles,U=(0,d.Z)(x,y),H=(0,v.Z)(de),ee=(0,o.useRef)(null);(0,o.useImperativeHandle)(O,function(){return ee.current});var W=(0,h.Z)({},U);"visible"in x&&(W.popupVisible=x.visible);var M=function(){return o.createElement(_,{key:"content",prefixCls:F,id:H,bodyClassName:V==null?void 0:V.body,overlayInnerStyle:(0,h.Z)((0,h.Z)({},Ee),Q==null?void 0:Q.body)},Ie)},$=function(){var Ce=o.Children.only(N),Ue=(Ce==null?void 0:Ce.props)||{},_e=(0,h.Z)((0,h.Z)({},Ue),{},{"aria-describedby":Ie?H:null});return o.cloneElement(N,_e)};return o.createElement(p.Z,(0,j.Z)({popupClassName:ot()(J,V==null?void 0:V.root),prefixCls:F,popup:M,action:X,builtinPlacements:c,popupPlacement:Y,ref:ee,popupAlign:ve,getPopupContainer:ge,onPopupVisibleChange:K,afterPopupVisibleChange:re,popupTransitionName:ne,popupAnimation:pe,popupMotion:ie,defaultPopupVisible:ue,autoDestroy:le,mouseLeaveDelay:L,popupStyle:(0,h.Z)((0,h.Z)({},q),Q==null?void 0:Q.root),mouseEnterDelay:k,arrow:ye},W),$())},T=(0,o.forwardRef)(E),S=T},90472:function(Qt,ct,Le){"use strict";Le.d(ct,{Z:function(){return re}});var Ne=Le(54476),ot=Le(67732),o=Le(83652),_=Le(31226),j=Le(42403),h=Le(158),d=Le(20068),p=Le(59301),b=Le(33885),g=Le(75931),w=Le(76190),c=Le(75044),m=Le(3202),v=Le(94480),y=Le(92310),E=Le.n(y),T=Le(26112),S=Le(48736),C=function(ne,pe){if(ne&&pe){var ie=Array.isArray(pe)?pe:pe.split(","),Ae=ne.name||"",Y=ne.type||"",fe=Y.replace(/\/.*$/,"");return ie.some(function(ve){var be=ve.trim();if(/^\*(\/\*)?$/.test(ve))return!0;if(be.charAt(0)==="."){var le=Ae.toLowerCase(),ue=be.toLowerCase(),ge=[ue];return(ue===".jpg"||ue===".jpeg")&&(ge=[".jpg",".jpeg"]),ge.some(function(Ee){return le.endsWith(Ee)})}return/\/\*$/.test(be)?fe===be.replace(/\/.*$/,""):Y===be?!0:/^\w+$/.test(be)?((0,S.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(be,"'.Skip for check.")),!0):!1})}return!0};function x(ne,pe){var ie="cannot ".concat(ne.method," ").concat(ne.action," ").concat(pe.status,"'"),Ae=new Error(ie);return Ae.status=pe.status,Ae.method=ne.method,Ae.url=ne.action,Ae}function O(ne){var pe=ne.responseText||ne.response;if(!pe)return pe;try{return JSON.parse(pe)}catch(ie){return pe}}function J(ne){var pe=new XMLHttpRequest;ne.onProgress&&pe.upload&&(pe.upload.onprogress=function(fe){fe.total>0&&(fe.percent=fe.loaded/fe.total*100),ne.onProgress(fe)});var ie=new FormData;ne.data&&Object.keys(ne.data).forEach(function(Y){var fe=ne.data[Y];if(Array.isArray(fe)){fe.forEach(function(ve){ie.append("".concat(Y,"[]"),ve)});return}ie.append(Y,fe)}),ne.file instanceof Blob?ie.append(ne.filename,ne.file,ne.file.name):ie.append(ne.filename,ne.file),pe.onerror=function(fe){ne.onError(fe)},pe.onload=function(){return pe.status<200||pe.status>=300?ne.onError(x(ne,pe),O(pe)):ne.onSuccess(O(pe),pe)},pe.open(ne.method,ne.action,!0),ne.withCredentials&&"withCredentials"in pe&&(pe.withCredentials=!0);var Ae=ne.headers||{};return Ae["X-Requested-With"]!==null&&pe.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(Ae).forEach(function(Y){Ae[Y]!==null&&pe.setRequestHeader(Y,Ae[Y])}),pe.send(ie),{abort:function(){pe.abort()}}}var P=function(){var ne=(0,m.Z)((0,c.Z)().mark(function pe(ie,Ae){var Y,fe,ve,be,le,ue,ge,Ee;return(0,c.Z)().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:ue=function(){return ue=(0,m.Z)((0,c.Z)().mark(function Z(ye){return(0,c.Z)().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return Q.abrupt("return",new Promise(function(U){ye.file(function(H){Ae(H)?(ye.fullPath&&!H.webkitRelativePath&&(Object.defineProperties(H,{webkitRelativePath:{writable:!0}}),H.webkitRelativePath=ye.fullPath.replace(/^\//,""),Object.defineProperties(H,{webkitRelativePath:{writable:!1}})),U(H)):U(null)})}));case 1:case"end":return Q.stop()}},Z)})),ue.apply(this,arguments)},le=function(Z){return ue.apply(this,arguments)},be=function(){return be=(0,m.Z)((0,c.Z)().mark(function Z(ye){var V,Q,U,H,ee;return(0,c.Z)().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:V=ye.createReader(),Q=[];case 2:return M.next=5,new Promise(function($){V.readEntries($,function(){return $([])})});case 5:if(U=M.sent,H=U.length,H){M.next=9;break}return M.abrupt("break",12);case 9:for(ee=0;ee<H;ee++)Q.push(U[ee]);M.next=2;break;case 12:return M.abrupt("return",Q);case 13:case"end":return M.stop()}},Z)})),be.apply(this,arguments)},ve=function(Z){return be.apply(this,arguments)},Y=[],fe=[],ie.forEach(function(de){return fe.push(de.webkitGetAsEntry())}),ge=function(){var de=(0,m.Z)((0,c.Z)().mark(function Z(ye,V){var Q,U;return(0,c.Z)().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(ye){ee.next=2;break}return ee.abrupt("return");case 2:if(ye.path=V||"",!ye.isFile){ee.next=10;break}return ee.next=6,le(ye);case 6:Q=ee.sent,Q&&Y.push(Q),ee.next=15;break;case 10:if(!ye.isDirectory){ee.next=15;break}return ee.next=13,ve(ye);case 13:U=ee.sent,fe.push.apply(fe,(0,v.Z)(U));case 15:case"end":return ee.stop()}},Z)}));return function(ye,V){return de.apply(this,arguments)}}(),Ee=0;case 9:if(!(Ee<fe.length)){Ie.next=15;break}return Ie.next=12,ge(fe[Ee]);case 12:Ee++,Ie.next=9;break;case 15:return Ie.abrupt("return",Y);case 16:case"end":return Ie.stop()}},pe)}));return function(ie,Ae){return ne.apply(this,arguments)}}(),X=P,B=+new Date,k=0;function D(){return"rc-upload-".concat(B,"-").concat(++k)}var L=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],q=function(ne){(0,j.Z)(ie,ne);var pe=(0,h.Z)(ie);function ie(){var Ae;(0,ot.Z)(this,ie);for(var Y=arguments.length,fe=new Array(Y),ve=0;ve<Y;ve++)fe[ve]=arguments[ve];return Ae=pe.call.apply(pe,[this].concat(fe)),(0,d.Z)((0,_.Z)(Ae),"state",{uid:D()}),(0,d.Z)((0,_.Z)(Ae),"reqs",{}),(0,d.Z)((0,_.Z)(Ae),"fileInput",void 0),(0,d.Z)((0,_.Z)(Ae),"_isMounted",void 0),(0,d.Z)((0,_.Z)(Ae),"onChange",function(be){var le=Ae.props,ue=le.accept,ge=le.directory,Ee=be.target.files,ke=(0,v.Z)(Ee).filter(function(Ie){return!ge||C(Ie,ue)});Ae.uploadFiles(ke),Ae.reset()}),(0,d.Z)((0,_.Z)(Ae),"onClick",function(be){var le=Ae.fileInput;if(le){var ue=be.target,ge=Ae.props.onClick;if(ue&&ue.tagName==="BUTTON"){var Ee=le.parentNode;Ee.focus(),ue.blur()}le.click(),ge&&ge(be)}}),(0,d.Z)((0,_.Z)(Ae),"onKeyDown",function(be){be.key==="Enter"&&Ae.onClick(be)}),(0,d.Z)((0,_.Z)(Ae),"onFileDrop",function(){var be=(0,m.Z)((0,c.Z)().mark(function le(ue){var ge,Ee,ke;return(0,c.Z)().wrap(function(de){for(;;)switch(de.prev=de.next){case 0:if(ge=Ae.props.multiple,ue.preventDefault(),ue.type!=="dragover"){de.next=4;break}return de.abrupt("return");case 4:if(!Ae.props.directory){de.next=11;break}return de.next=7,X(Array.prototype.slice.call(ue.dataTransfer.items),function(Z){return C(Z,Ae.props.accept)});case 7:Ee=de.sent,Ae.uploadFiles(Ee),de.next=14;break;case 11:ke=(0,v.Z)(ue.dataTransfer.files).filter(function(Z){return C(Z,Ae.props.accept)}),ge===!1&&(ke=ke.slice(0,1)),Ae.uploadFiles(ke);case 14:case"end":return de.stop()}},le)}));return function(le){return be.apply(this,arguments)}}()),(0,d.Z)((0,_.Z)(Ae),"uploadFiles",function(be){var le=(0,v.Z)(be),ue=le.map(function(ge){return ge.uid=D(),Ae.processFile(ge,le)});Promise.all(ue).then(function(ge){var Ee=Ae.props.onBatchStart;Ee==null||Ee(ge.map(function(ke){var Ie=ke.origin,de=ke.parsedFile;return{file:Ie,parsedFile:de}})),ge.filter(function(ke){return ke.parsedFile!==null}).forEach(function(ke){Ae.post(ke)})})}),(0,d.Z)((0,_.Z)(Ae),"processFile",function(){var be=(0,m.Z)((0,c.Z)().mark(function le(ue,ge){var Ee,ke,Ie,de,Z,ye,V,Q,U;return(0,c.Z)().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(Ee=Ae.props.beforeUpload,ke=ue,!Ee){ee.next=14;break}return ee.prev=3,ee.next=6,Ee(ue,ge);case 6:ke=ee.sent,ee.next=12;break;case 9:ee.prev=9,ee.t0=ee.catch(3),ke=!1;case 12:if(ke!==!1){ee.next=14;break}return ee.abrupt("return",{origin:ue,parsedFile:null,action:null,data:null});case 14:if(Ie=Ae.props.action,typeof Ie!="function"){ee.next=21;break}return ee.next=18,Ie(ue);case 18:de=ee.sent,ee.next=22;break;case 21:de=Ie;case 22:if(Z=Ae.props.data,typeof Z!="function"){ee.next=29;break}return ee.next=26,Z(ue);case 26:ye=ee.sent,ee.next=30;break;case 29:ye=Z;case 30:return V=((0,w.Z)(ke)==="object"||typeof ke=="string")&&ke?ke:ue,V instanceof File?Q=V:Q=new File([V],ue.name,{type:ue.type}),U=Q,U.uid=ue.uid,ee.abrupt("return",{origin:ue,data:ye,parsedFile:U,action:de});case 35:case"end":return ee.stop()}},le,null,[[3,9]])}));return function(le,ue){return be.apply(this,arguments)}}()),(0,d.Z)((0,_.Z)(Ae),"saveFileInput",function(be){Ae.fileInput=be}),Ae}return(0,o.Z)(ie,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(Y){var fe=this,ve=Y.data,be=Y.origin,le=Y.action,ue=Y.parsedFile;if(this._isMounted){var ge=this.props,Ee=ge.onStart,ke=ge.customRequest,Ie=ge.name,de=ge.headers,Z=ge.withCredentials,ye=ge.method,V=be.uid,Q=ke||J,U={action:le,filename:Ie,data:ve,file:ue,headers:de,withCredentials:Z,method:ye||"post",onProgress:function(ee){var W=fe.props.onProgress;W==null||W(ee,ue)},onSuccess:function(ee,W){var M=fe.props.onSuccess;M==null||M(ee,ue,W),delete fe.reqs[V]},onError:function(ee,W){var M=fe.props.onError;M==null||M(ee,W,ue),delete fe.reqs[V]}};Ee(be),this.reqs[V]=Q(U)}}},{key:"reset",value:function(){this.setState({uid:D()})}},{key:"abort",value:function(Y){var fe=this.reqs;if(Y){var ve=Y.uid?Y.uid:Y;fe[ve]&&fe[ve].abort&&fe[ve].abort(),delete fe[ve]}else Object.keys(fe).forEach(function(be){fe[be]&&fe[be].abort&&fe[be].abort(),delete fe[be]})}},{key:"render",value:function(){var Y=this.props,fe=Y.component,ve=Y.prefixCls,be=Y.className,le=Y.classNames,ue=le===void 0?{}:le,ge=Y.disabled,Ee=Y.id,ke=Y.name,Ie=Y.style,de=Y.styles,Z=de===void 0?{}:de,ye=Y.multiple,V=Y.accept,Q=Y.capture,U=Y.children,H=Y.directory,ee=Y.openFileDialogOnClick,W=Y.onMouseEnter,M=Y.onMouseLeave,$=Y.hasControlInside,ce=(0,g.Z)(Y,L),Ce=E()((0,d.Z)((0,d.Z)((0,d.Z)({},ve,!0),"".concat(ve,"-disabled"),ge),be,be)),Ue=H?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},_e=ge?{}:{onClick:ee?this.onClick:function(){},onKeyDown:ee?this.onKeyDown:function(){},onMouseEnter:W,onMouseLeave:M,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:$?void 0:"0"};return p.createElement(fe,(0,Ne.Z)({},_e,{className:Ce,role:$?void 0:"button",style:Ie}),p.createElement("input",(0,Ne.Z)({},(0,T.Z)(ce,{aria:!0,data:!0}),{id:Ee,name:ke,disabled:ge,type:"file",ref:this.saveFileInput,onClick:function(Te){return Te.stopPropagation()},key:this.state.uid,style:(0,b.Z)({display:"none"},Z.input),className:ue.input,accept:V},Ue,{multiple:ye,onChange:this.onChange},Q!=null?{capture:Q}:{})),U)}}]),ie}(p.Component),G=q;function F(){}var N=function(ne){(0,j.Z)(ie,ne);var pe=(0,h.Z)(ie);function ie(){var Ae;(0,ot.Z)(this,ie);for(var Y=arguments.length,fe=new Array(Y),ve=0;ve<Y;ve++)fe[ve]=arguments[ve];return Ae=pe.call.apply(pe,[this].concat(fe)),(0,d.Z)((0,_.Z)(Ae),"uploader",void 0),(0,d.Z)((0,_.Z)(Ae),"saveUploader",function(be){Ae.uploader=be}),Ae}return(0,o.Z)(ie,[{key:"abort",value:function(Y){this.uploader.abort(Y)}},{key:"render",value:function(){return p.createElement(G,(0,Ne.Z)({},this.props,{ref:this.saveUploader}))}}]),ie}(p.Component);(0,d.Z)(N,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:F,onError:F,onSuccess:F,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});var K=N,re=K},49658:function(Qt,ct){"use strict";ct.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var Le=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(Le)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(Le==null?void 0:Le.substr(0,4))}},76374:function(Qt,ct,Le){"use strict";var Ne=function(){if(typeof Map!="undefined")return Map;function G(F,N){var K=-1;return F.some(function(re,ne){return re[0]===N?(K=ne,!0):!1}),K}return function(){function F(){this.__entries__=[]}return Object.defineProperty(F.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),F.prototype.get=function(N){var K=G(this.__entries__,N),re=this.__entries__[K];return re&&re[1]},F.prototype.set=function(N,K){var re=G(this.__entries__,N);~re?this.__entries__[re][1]=K:this.__entries__.push([N,K])},F.prototype.delete=function(N){var K=this.__entries__,re=G(K,N);~re&&K.splice(re,1)},F.prototype.has=function(N){return!!~G(this.__entries__,N)},F.prototype.clear=function(){this.__entries__.splice(0)},F.prototype.forEach=function(N,K){K===void 0&&(K=null);for(var re=0,ne=this.__entries__;re<ne.length;re++){var pe=ne[re];N.call(K,pe[1],pe[0])}},F}()}(),ot=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,o=function(){return typeof Le.g!="undefined"&&Le.g.Math===Math?Le.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),_=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(o):function(G){return setTimeout(function(){return G(Date.now())},1e3/60)}}(),j=2;function h(G,F){var N=!1,K=!1,re=0;function ne(){N&&(N=!1,G()),K&&ie()}function pe(){_(ne)}function ie(){var Ae=Date.now();if(N){if(Ae-re<j)return;K=!0}else N=!0,K=!1,setTimeout(pe,F);re=Ae}return ie}var d=20,p=["top","right","bottom","left","width","height","size","weight"],b=typeof MutationObserver!="undefined",g=function(){function G(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=h(this.refresh.bind(this),d)}return G.prototype.addObserver=function(F){~this.observers_.indexOf(F)||this.observers_.push(F),this.connected_||this.connect_()},G.prototype.removeObserver=function(F){var N=this.observers_,K=N.indexOf(F);~K&&N.splice(K,1),!N.length&&this.connected_&&this.disconnect_()},G.prototype.refresh=function(){var F=this.updateObservers_();F&&this.refresh()},G.prototype.updateObservers_=function(){var F=this.observers_.filter(function(N){return N.gatherActive(),N.hasActive()});return F.forEach(function(N){return N.broadcastActive()}),F.length>0},G.prototype.connect_=function(){!ot||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),b?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},G.prototype.disconnect_=function(){!ot||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},G.prototype.onTransitionEnd_=function(F){var N=F.propertyName,K=N===void 0?"":N,re=p.some(function(ne){return!!~K.indexOf(ne)});re&&this.refresh()},G.getInstance=function(){return this.instance_||(this.instance_=new G),this.instance_},G.instance_=null,G}(),w=function(G,F){for(var N=0,K=Object.keys(F);N<K.length;N++){var re=K[N];Object.defineProperty(G,re,{value:F[re],enumerable:!1,writable:!1,configurable:!0})}return G},c=function(G){var F=G&&G.ownerDocument&&G.ownerDocument.defaultView;return F||o},m=P(0,0,0,0);function v(G){return parseFloat(G)||0}function y(G){for(var F=[],N=1;N<arguments.length;N++)F[N-1]=arguments[N];return F.reduce(function(K,re){var ne=G["border-"+re+"-width"];return K+v(ne)},0)}function E(G){for(var F=["top","right","bottom","left"],N={},K=0,re=F;K<re.length;K++){var ne=re[K],pe=G["padding-"+ne];N[ne]=v(pe)}return N}function T(G){var F=G.getBBox();return P(0,0,F.width,F.height)}function S(G){var F=G.clientWidth,N=G.clientHeight;if(!F&&!N)return m;var K=c(G).getComputedStyle(G),re=E(K),ne=re.left+re.right,pe=re.top+re.bottom,ie=v(K.width),Ae=v(K.height);if(K.boxSizing==="border-box"&&(Math.round(ie+ne)!==F&&(ie-=y(K,"left","right")+ne),Math.round(Ae+pe)!==N&&(Ae-=y(K,"top","bottom")+pe)),!x(G)){var Y=Math.round(ie+ne)-F,fe=Math.round(Ae+pe)-N;Math.abs(Y)!==1&&(ie-=Y),Math.abs(fe)!==1&&(Ae-=fe)}return P(re.left,re.top,ie,Ae)}var C=function(){return typeof SVGGraphicsElement!="undefined"?function(G){return G instanceof c(G).SVGGraphicsElement}:function(G){return G instanceof c(G).SVGElement&&typeof G.getBBox=="function"}}();function x(G){return G===c(G).document.documentElement}function O(G){return ot?C(G)?T(G):S(G):m}function J(G){var F=G.x,N=G.y,K=G.width,re=G.height,ne=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,pe=Object.create(ne.prototype);return w(pe,{x:F,y:N,width:K,height:re,top:N,right:F+K,bottom:re+N,left:F}),pe}function P(G,F,N,K){return{x:G,y:F,width:N,height:K}}var X=function(){function G(F){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=P(0,0,0,0),this.target=F}return G.prototype.isActive=function(){var F=O(this.target);return this.contentRect_=F,F.width!==this.broadcastWidth||F.height!==this.broadcastHeight},G.prototype.broadcastRect=function(){var F=this.contentRect_;return this.broadcastWidth=F.width,this.broadcastHeight=F.height,F},G}(),B=function(){function G(F,N){var K=J(N);w(this,{target:F,contentRect:K})}return G}(),k=function(){function G(F,N,K){if(this.activeObservations_=[],this.observations_=new Ne,typeof F!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=F,this.controller_=N,this.callbackCtx_=K}return G.prototype.observe=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof c(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var N=this.observations_;N.has(F)||(N.set(F,new X(F)),this.controller_.addObserver(this),this.controller_.refresh())}},G.prototype.unobserve=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof c(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var N=this.observations_;N.has(F)&&(N.delete(F),N.size||this.controller_.removeObserver(this))}},G.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},G.prototype.gatherActive=function(){var F=this;this.clearActive(),this.observations_.forEach(function(N){N.isActive()&&F.activeObservations_.push(N)})},G.prototype.broadcastActive=function(){if(this.hasActive()){var F=this.callbackCtx_,N=this.activeObservations_.map(function(K){return new B(K.target,K.broadcastRect())});this.callback_.call(F,N,F),this.clearActive()}},G.prototype.clearActive=function(){this.activeObservations_.splice(0)},G.prototype.hasActive=function(){return this.activeObservations_.length>0},G}(),D=typeof WeakMap!="undefined"?new WeakMap:new Ne,L=function(){function G(F){if(!(this instanceof G))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var N=g.getInstance(),K=new k(F,N,this);D.set(this,K)}return G}();["observe","unobserve","disconnect"].forEach(function(G){L.prototype[G]=function(){var F;return(F=D.get(this))[G].apply(F,arguments)}});var q=function(){return typeof o.ResizeObserver!="undefined"?o.ResizeObserver:L}();ct.Z=q},91423:function(){},22591:function(){},24726:function(){},90872:function(){}}]);
|